Salome HOME
If study is loaded from HDF file, init_geom() has to load data to the engine calling...
[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, theName="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, theName=("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Pack an argument into a list
521 def ToList( arg ):
522     if isinstance( arg, list ):
523         return arg
524     if hasattr( arg, "__getitem__" ):
525         return list( arg )
526     return [ arg ]
527
528 ## Information about closed/unclosed state of shell or wire
529 #  @ingroup l1_geomBuilder_auxiliary
530 class info:
531     """
532     Information about closed/unclosed state of shell or wire
533     """
534     UNKNOWN  = 0
535     CLOSED   = 1
536     UNCLOSED = 2
537
538 ## Private class used to bind calls of plugin operations to geomBuilder
539 class PluginOperation:
540   def __init__(self, operation, function):
541     self.operation = operation
542     self.function = function
543     pass
544
545   @ManageTransactions("operation")
546   def __call__(self, *args):
547     res = self.function(self.operation, *args)
548     RaiseIfFailed(self.function.__name__, self.operation)
549     return res
550
551 # Warning: geom is a singleton
552 geom = None
553 engine = None
554 doLcc = False
555 created = False
556
557 class geomBuilder(object, GEOM._objref_GEOM_Gen):
558
559         ## Enumeration ShapeType as a dictionary. \n
560         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
561         #  @ingroup l1_geomBuilder_auxiliary
562         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8, "FLAT":9}
563
564         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
565         #  and a list of parameters, describing the shape.
566         #  List of parameters, describing the shape:
567         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
568         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
569         #
570         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
571         #
572         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
573         #
574         #  - SPHERE:       [xc yc zc            R]
575         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
576         #  - BOX:          [xc yc zc                      ax ay az]
577         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
578         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
579         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
580         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
581         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
582         #
583         #  - SPHERE2D:     [xc yc zc            R]
584         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
585         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
586         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
587         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
588         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
589         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
590         #  - PLANE:        [xo yo zo  dx dy dz]
591         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
592         #  - FACE:                                       [nb_edges  nb_vertices]
593         #
594         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
595         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
596         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
597         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
598         #  - LINE:         [xo yo zo  dx dy dz]
599         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
600         #  - EDGE:                                                 [nb_vertices]
601         #
602         #  - VERTEX:       [x  y  z]
603         #  @ingroup l1_geomBuilder_auxiliary
604         kind = GEOM.GEOM_IKindOfShape
605
606         def __new__(cls):
607             global engine
608             global geom
609             global doLcc
610             global created
611             #print "==== __new__ ", engine, geom, doLcc, created
612             if geom is None:
613                 # geom engine is either retrieved from engine, or created
614                 geom = engine
615                 # Following test avoids a recursive loop
616                 if doLcc:
617                     if geom is not None:
618                         # geom engine not created: existing engine found
619                         doLcc = False
620                     if doLcc and not created:
621                         doLcc = False
622                         # FindOrLoadComponent called:
623                         # 1. CORBA resolution of server
624                         # 2. the __new__ method is called again
625                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
626                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
627                         #print "====1 ",geom
628                 else:
629                     # FindOrLoadComponent not called
630                     if geom is None:
631                         # geomBuilder instance is created from lcc.FindOrLoadComponent
632                         #print "==== super ", engine, geom, doLcc, created
633                         geom = super(geomBuilder,cls).__new__(cls)
634                         #print "====2 ",geom
635                     else:
636                         # geom engine not created: existing engine found
637                         #print "==== existing ", engine, geom, doLcc, created
638                         pass
639                 #print "return geom 1 ", geom
640                 return geom
641
642             #print "return geom 2 ", geom
643             return geom
644
645         def __init__(self):
646             global created
647             #print "-------- geomBuilder __init__ --- ", created, self
648             if not created:
649               created = True
650               GEOM._objref_GEOM_Gen.__init__(self)
651               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
652               self.myBuilder = None
653               self.myStudyId = 0
654               self.father    = None
655
656               self.BasicOp  = None
657               self.CurvesOp = None
658               self.PrimOp   = None
659               self.ShapesOp = None
660               self.HealOp   = None
661               self.InsertOp = None
662               self.BoolOp   = None
663               self.TrsfOp   = None
664               self.LocalOp  = None
665               self.MeasuOp  = None
666               self.BlocksOp = None
667               self.GroupOp  = None
668               self.FieldOp  = None
669             pass
670
671         ## Process object publication in the study, as follows:
672         #  - if @a theName is specified (not None), the object is published in the study
673         #    with this name, not taking into account "auto-publishing" option;
674         #  - if @a theName is NOT specified, the object is published in the study
675         #    (using default name, which can be customized using @a theDefaultName parameter)
676         #    only if auto-publishing is switched on.
677         #
678         #  @param theObj  object, a subject for publishing
679         #  @param theName object name for study
680         #  @param theDefaultName default name for the auto-publishing
681         #
682         #  @sa addToStudyAuto()
683         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
684             # ---
685             def _item_name(_names, _defname, _idx=-1):
686                 if not _names: _names = _defname
687                 if type(_names) in [types.ListType, types.TupleType]:
688                     if _idx >= 0:
689                         if _idx >= len(_names) or not _names[_idx]:
690                             if type(_defname) not in [types.ListType, types.TupleType]:
691                                 _name = "%s_%d"%(_defname, _idx+1)
692                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
693                                 _name = _defname[_idx]
694                             else:
695                                 _name = "%noname_%d"%(dn, _idx+1)
696                             pass
697                         else:
698                             _name = _names[_idx]
699                         pass
700                     else:
701                         # must be wrong  usage
702                         _name = _names[0]
703                     pass
704                 else:
705                     if _idx >= 0:
706                         _name = "%s_%d"%(_names, _idx+1)
707                     else:
708                         _name = _names
709                     pass
710                 return _name
711             # ---
712             def _publish( _name, _obj ):
713                 fatherObj = None
714                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
715                     fatherObj = _obj.GetShape()
716                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
717                     fatherObj = _obj.GetField()
718                 elif not _obj.IsMainShape():
719                     fatherObj = _obj.GetMainShape()
720                     pass
721                 if fatherObj and fatherObj.GetStudyEntry():
722                     self.addToStudyInFather(fatherObj, _obj, _name)
723                 else:
724                     self.addToStudy(_obj, _name)
725                     pass
726                 return
727             # ---
728             if not theObj:
729                 return # null object
730             if not theName and not self.myMaxNbSubShapesAllowed:
731                 return # nothing to do: auto-publishing is disabled
732             if not theName and not theDefaultName:
733                 return # neither theName nor theDefaultName is given
734             import types
735             if type(theObj) in [types.ListType, types.TupleType]:
736                 # list of objects is being published
737                 idx = 0
738                 for obj in theObj:
739                     if not obj: continue # bad object
740                     name = _item_name(theName, theDefaultName, idx)
741                     _publish( name, obj )
742                     idx = idx+1
743                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
744                     pass
745                 pass
746             else:
747                 # single object is published
748                 name = _item_name(theName, theDefaultName)
749                 _publish( name, theObj )
750             pass
751
752         ## @addtogroup l1_geomBuilder_auxiliary
753         ## @{
754         def init_geom(self,theStudy):
755             self.myStudy = theStudy
756             self.myStudyId = self.myStudy._get_StudyId()
757             self.myBuilder = self.myStudy.NewBuilder()
758             self.father = self.myStudy.FindComponent("GEOM")
759             notebook.myStudy = theStudy
760             if self.father is None:
761                 self.father = self.myBuilder.NewComponent("GEOM")
762                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
763                 FName = A1._narrow(SALOMEDS.AttributeName)
764                 FName.SetValue("Geometry")
765                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
766                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
767                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
768                 self.myBuilder.DefineComponentInstance(self.father,self)
769                 pass
770             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
771             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
772             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
773             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
774             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
775             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
776             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
777             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
778             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
779             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
780             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
781             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
782             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
783
784             # set GEOM as root in the use case tree
785             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
786             self.myUseCaseBuilder.SetRootCurrent()
787             self.myUseCaseBuilder.Append(self.father)
788
789             # load data from the study file, if necessary
790             self.myBuilder.LoadWith(self.father, self)
791             pass
792
793         def GetPluginOperations(self, studyID, libraryName):
794             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
795             return op
796
797         ## Enable / disable results auto-publishing
798         #
799         #  The automatic publishing is managed in the following way:
800         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
801         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
802         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
803         #  value passed as parameter has the same effect.
804         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
805         #  maximum number of sub-shapes allowed for publishing is set to specified value.
806         #
807         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
808         #  @ingroup l1_publish_data
809         def addToStudyAuto(self, maxNbSubShapes=-1):
810             """
811             Enable / disable results auto-publishing
812
813             The automatic publishing is managed in the following way:
814             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
815             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
816             maximum number of sub-shapes allowed for publishing is unlimited; any negative
817             value passed as parameter has the same effect.
818             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
819             maximum number of sub-shapes allowed for publishing is set to this value.
820
821             Parameters:
822                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
823
824             Example of usage:
825                 geompy.addToStudyAuto()   # enable auto-publishing
826                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
827                 geompy.addToStudyAuto(0)  # disable auto-publishing
828             """
829             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
830             pass
831
832         ## Dump component to the Python script
833         #  This method overrides IDL function to allow default values for the parameters.
834         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
835             """
836             Dump component to the Python script
837             This method overrides IDL function to allow default values for the parameters.
838             """
839             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
840
841         ## Get name for sub-shape aSubObj of shape aMainObj
842         #
843         # @ref swig_SubShapeName "Example"
844         @ManageTransactions("ShapesOp")
845         def SubShapeName(self,aSubObj, aMainObj):
846             """
847             Get name for sub-shape aSubObj of shape aMainObj
848             """
849             # Example: see GEOM_TestAll.py
850
851             #aSubId  = orb.object_to_string(aSubObj)
852             #aMainId = orb.object_to_string(aMainObj)
853             #index = gg.getIndexTopology(aSubId, aMainId)
854             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
855             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
856             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
857             return name
858
859         ## Publish in study aShape with name aName
860         #
861         #  \param aShape the shape to be published
862         #  \param aName  the name for the shape
863         #  \param doRestoreSubShapes if True, finds and publishes also
864         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
865         #         and published sub-shapes of arguments
866         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
867         #                                                  these arguments description
868         #  \return study entry of the published shape in form of string
869         #
870         #  @ingroup l1_publish_data
871         #  @ref swig_all_addtostudy "Example"
872         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
873                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
874             """
875             Publish in study aShape with name aName
876
877             Parameters:
878                 aShape the shape to be published
879                 aName  the name for the shape
880                 doRestoreSubShapes if True, finds and publishes also
881                                    sub-shapes of aShape, corresponding to its arguments
882                                    and published sub-shapes of arguments
883                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
884                                                          these arguments description
885
886             Returns:
887                 study entry of the published shape in form of string
888
889             Example of usage:
890                 id_block1 = geompy.addToStudy(Block1, "Block 1")
891             """
892             # Example: see GEOM_TestAll.py
893             try:
894                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
895                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
896                 if doRestoreSubShapes:
897                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
898                                             theFindMethod, theInheritFirstArg, True )
899             except:
900                 print "addToStudy() failed"
901                 return ""
902             return aShape.GetStudyEntry()
903
904         ## Publish in study aShape with name aName as sub-object of previously published aFather
905         #  \param aFather previously published object
906         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
907         #  \param aName  the name for the shape
908         #
909         #  \return study entry of the published shape in form of string
910         #
911         #  @ingroup l1_publish_data
912         #  @ref swig_all_addtostudyInFather "Example"
913         def addToStudyInFather(self, aFather, aShape, aName):
914             """
915             Publish in study aShape with name aName as sub-object of previously published aFather
916
917             Parameters:
918                 aFather previously published object
919                 aShape the shape to be published as sub-object of aFather
920                 aName  the name for the shape
921
922             Returns:
923                 study entry of the published shape in form of string
924             """
925             # Example: see GEOM_TestAll.py
926             try:
927                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
928                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
929             except:
930                 print "addToStudyInFather() failed"
931                 return ""
932             return aShape.GetStudyEntry()
933
934         ## Unpublish object in study
935         #
936         #  \param obj the object to be unpublished
937         def hideInStudy(self, obj):
938             """
939             Unpublish object in study
940
941             Parameters:
942                 obj the object to be unpublished
943             """
944             ior = salome.orb.object_to_string(obj)
945             aSObject = self.myStudy.FindObjectIOR(ior)
946             if aSObject is not None:
947                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
948                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
949                 drwAttribute.SetDrawable(False)
950                 # hide references if any
951                 vso = self.myStudy.FindDependances(aSObject);
952                 for refObj in vso :
953                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
954                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
955                     drwAttribute.SetDrawable(False)
956                     pass
957                 pass
958
959         # end of l1_geomBuilder_auxiliary
960         ## @}
961
962         ## @addtogroup l3_restore_ss
963         ## @{
964
965         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
966         #  To be used from python scripts out of addToStudy() (non-default usage)
967         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
968         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
969         #                   If this list is empty, all operation arguments will be published
970         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
971         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
972         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
973         #                            Do not publish sub-shapes in place of arguments, but only
974         #                            in place of sub-shapes of the first argument,
975         #                            because the whole shape corresponds to the first argument.
976         #                            Mainly to be used after transformations, but it also can be
977         #                            usefull after partition with one object shape, and some other
978         #                            operations, where only the first argument has to be considered.
979         #                            If theObject has only one argument shape, this flag is automatically
980         #                            considered as True, not regarding really passed value.
981         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
982         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
983         #  \return list of published sub-shapes
984         #
985         #  @ref tui_restore_prs_params "Example"
986         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
987                               theInheritFirstArg=False, theAddPrefix=True):
988             """
989             Publish sub-shapes, standing for arguments and sub-shapes of arguments
990             To be used from python scripts out of geompy.addToStudy (non-default usage)
991
992             Parameters:
993                 theObject published GEOM.GEOM_Object, arguments of which will be published
994                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
995                           If this list is empty, all operation arguments will be published
996                 theFindMethod method to search sub-shapes, corresponding to arguments and
997                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
998                 theInheritFirstArg set properties of the first argument for theObject.
999                                    Do not publish sub-shapes in place of arguments, but only
1000                                    in place of sub-shapes of the first argument,
1001                                    because the whole shape corresponds to the first argument.
1002                                    Mainly to be used after transformations, but it also can be
1003                                    usefull after partition with one object shape, and some other
1004                                    operations, where only the first argument has to be considered.
1005                                    If theObject has only one argument shape, this flag is automatically
1006                                    considered as True, not regarding really passed value.
1007                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1008                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1009             Returns:
1010                 list of published sub-shapes
1011             """
1012             # Example: see GEOM_TestAll.py
1013             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1014                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1015
1016         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1017         #  To be used from python scripts out of addToStudy() (non-default usage)
1018         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1019         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1020         #                   If this list is empty, all operation arguments will be published
1021         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1022         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1023         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1024         #                            Do not publish sub-shapes in place of arguments, but only
1025         #                            in place of sub-shapes of the first argument,
1026         #                            because the whole shape corresponds to the first argument.
1027         #                            Mainly to be used after transformations, but it also can be
1028         #                            usefull after partition with one object shape, and some other
1029         #                            operations, where only the first argument has to be considered.
1030         #                            If theObject has only one argument shape, this flag is automatically
1031         #                            considered as True, not regarding really passed value.
1032         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1033         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1034         #  \return list of published sub-shapes
1035         #
1036         #  @ref tui_restore_prs_params "Example"
1037         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1038                                    theInheritFirstArg=False, theAddPrefix=True):
1039             """
1040             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1041             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1042
1043             Parameters:
1044                 theObject published GEOM.GEOM_Object, arguments of which will be published
1045                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1046                           If this list is empty, all operation arguments will be published
1047                 theFindMethod method to search sub-shapes, corresponding to arguments and
1048                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1049                 theInheritFirstArg set properties of the first argument for theObject.
1050                                    Do not publish sub-shapes in place of arguments, but only
1051                                    in place of sub-shapes of the first argument,
1052                                    because the whole shape corresponds to the first argument.
1053                                    Mainly to be used after transformations, but it also can be
1054                                    usefull after partition with one object shape, and some other
1055                                    operations, where only the first argument has to be considered.
1056                                    If theObject has only one argument shape, this flag is automatically
1057                                    considered as True, not regarding really passed value.
1058                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1059                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1060
1061             Returns:
1062                 list of published sub-shapes
1063             """
1064             # Example: see GEOM_TestAll.py
1065             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1066                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1067
1068         # end of l3_restore_ss
1069         ## @}
1070
1071         ## @addtogroup l3_basic_go
1072         ## @{
1073
1074         ## Create point by three coordinates.
1075         #  @param theX The X coordinate of the point.
1076         #  @param theY The Y coordinate of the point.
1077         #  @param theZ The Z coordinate of the point.
1078         #  @param theName Object name; when specified, this parameter is used
1079         #         for result publication in the study. Otherwise, if automatic
1080         #         publication is switched on, default value is used for result name.
1081         #
1082         #  @return New GEOM.GEOM_Object, containing the created point.
1083         #
1084         #  @ref tui_creation_point "Example"
1085         @ManageTransactions("BasicOp")
1086         def MakeVertex(self, theX, theY, theZ, theName=None):
1087             """
1088             Create point by three coordinates.
1089
1090             Parameters:
1091                 theX The X coordinate of the point.
1092                 theY The Y coordinate of the point.
1093                 theZ The Z coordinate of the point.
1094                 theName Object name; when specified, this parameter is used
1095                         for result publication in the study. Otherwise, if automatic
1096                         publication is switched on, default value is used for result name.
1097
1098             Returns:
1099                 New GEOM.GEOM_Object, containing the created point.
1100             """
1101             # Example: see GEOM_TestAll.py
1102             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1103             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1104             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1105             anObj.SetParameters(Parameters)
1106             self._autoPublish(anObj, theName, "vertex")
1107             return anObj
1108
1109         ## Create a point, distant from the referenced point
1110         #  on the given distances along the coordinate axes.
1111         #  @param theReference The referenced point.
1112         #  @param theX Displacement from the referenced point along OX axis.
1113         #  @param theY Displacement from the referenced point along OY axis.
1114         #  @param theZ Displacement from the referenced point along OZ axis.
1115         #  @param theName Object name; when specified, this parameter is used
1116         #         for result publication in the study. Otherwise, if automatic
1117         #         publication is switched on, default value is used for result name.
1118         #
1119         #  @return New GEOM.GEOM_Object, containing the created point.
1120         #
1121         #  @ref tui_creation_point "Example"
1122         @ManageTransactions("BasicOp")
1123         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1124             """
1125             Create a point, distant from the referenced point
1126             on the given distances along the coordinate axes.
1127
1128             Parameters:
1129                 theReference The referenced point.
1130                 theX Displacement from the referenced point along OX axis.
1131                 theY Displacement from the referenced point along OY axis.
1132                 theZ Displacement from the referenced point along OZ axis.
1133                 theName Object name; when specified, this parameter is used
1134                         for result publication in the study. Otherwise, if automatic
1135                         publication is switched on, default value is used for result name.
1136
1137             Returns:
1138                 New GEOM.GEOM_Object, containing the created point.
1139             """
1140             # Example: see GEOM_TestAll.py
1141             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1142             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1143             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1144             anObj.SetParameters(Parameters)
1145             self._autoPublish(anObj, theName, "vertex")
1146             return anObj
1147
1148         ## Create a point, corresponding to the given parameter on the given curve.
1149         #  @param theRefCurve The referenced curve.
1150         #  @param theParameter Value of parameter on the referenced curve.
1151         #  @param theName Object name; when specified, this parameter is used
1152         #         for result publication in the study. Otherwise, if automatic
1153         #         publication is switched on, default value is used for result name.
1154         #
1155         #  @return New GEOM.GEOM_Object, containing the created point.
1156         #
1157         #  @ref tui_creation_point "Example"
1158         @ManageTransactions("BasicOp")
1159         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1160             """
1161             Create a point, corresponding to the given parameter on the given curve.
1162
1163             Parameters:
1164                 theRefCurve The referenced curve.
1165                 theParameter Value of parameter on the referenced curve.
1166                 theName Object name; when specified, this parameter is used
1167                         for result publication in the study. Otherwise, if automatic
1168                         publication is switched on, default value is used for result name.
1169
1170             Returns:
1171                 New GEOM.GEOM_Object, containing the created point.
1172
1173             Example of usage:
1174                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1175             """
1176             # Example: see GEOM_TestAll.py
1177             theParameter, Parameters = ParseParameters(theParameter)
1178             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1179             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1180             anObj.SetParameters(Parameters)
1181             self._autoPublish(anObj, theName, "vertex")
1182             return anObj
1183
1184         ## Create a point by projection give coordinates on the given curve
1185         #  @param theRefCurve The referenced curve.
1186         #  @param theX X-coordinate in 3D space
1187         #  @param theY Y-coordinate in 3D space
1188         #  @param theZ Z-coordinate in 3D space
1189         #  @param theName Object name; when specified, this parameter is used
1190         #         for result publication in the study. Otherwise, if automatic
1191         #         publication is switched on, default value is used for result name.
1192         #
1193         #  @return New GEOM.GEOM_Object, containing the created point.
1194         #
1195         #  @ref tui_creation_point "Example"
1196         @ManageTransactions("BasicOp")
1197         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1198             """
1199             Create a point by projection give coordinates on the given curve
1200
1201             Parameters:
1202                 theRefCurve The referenced curve.
1203                 theX X-coordinate in 3D space
1204                 theY Y-coordinate in 3D space
1205                 theZ Z-coordinate in 3D space
1206                 theName Object name; when specified, this parameter is used
1207                         for result publication in the study. Otherwise, if automatic
1208                         publication is switched on, default value is used for result name.
1209
1210             Returns:
1211                 New GEOM.GEOM_Object, containing the created point.
1212
1213             Example of usage:
1214                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1215             """
1216             # Example: see GEOM_TestAll.py
1217             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1218             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1219             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1220             anObj.SetParameters(Parameters)
1221             self._autoPublish(anObj, theName, "vertex")
1222             return anObj
1223
1224         ## Create a point, corresponding to the given length on the given curve.
1225         #  @param theRefCurve The referenced curve.
1226         #  @param theLength Length on the referenced curve. It can be negative.
1227         #  @param theStartPoint Point allowing to choose the direction for the calculation
1228         #                       of the length. If None, start from the first point of theRefCurve.
1229         #  @param theName Object name; when specified, this parameter is used
1230         #         for result publication in the study. Otherwise, if automatic
1231         #         publication is switched on, default value is used for result name.
1232         #
1233         #  @return New GEOM.GEOM_Object, containing the created point.
1234         #
1235         #  @ref tui_creation_point "Example"
1236         @ManageTransactions("BasicOp")
1237         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1238             """
1239             Create a point, corresponding to the given length on the given curve.
1240
1241             Parameters:
1242                 theRefCurve The referenced curve.
1243                 theLength Length on the referenced curve. It can be negative.
1244                 theStartPoint Point allowing to choose the direction for the calculation
1245                               of the length. If None, start from the first point of theRefCurve.
1246                 theName Object name; when specified, this parameter is used
1247                         for result publication in the study. Otherwise, if automatic
1248                         publication is switched on, default value is used for result name.
1249
1250             Returns:
1251                 New GEOM.GEOM_Object, containing the created point.
1252             """
1253             # Example: see GEOM_TestAll.py
1254             theLength, Parameters = ParseParameters(theLength)
1255             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1256             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1257             anObj.SetParameters(Parameters)
1258             self._autoPublish(anObj, theName, "vertex")
1259             return anObj
1260
1261         ## Create a point, corresponding to the given parameters on the
1262         #    given surface.
1263         #  @param theRefSurf The referenced surface.
1264         #  @param theUParameter Value of U-parameter on the referenced surface.
1265         #  @param theVParameter Value of V-parameter on the referenced surface.
1266         #  @param theName Object name; when specified, this parameter is used
1267         #         for result publication in the study. Otherwise, if automatic
1268         #         publication is switched on, default value is used for result name.
1269         #
1270         #  @return New GEOM.GEOM_Object, containing the created point.
1271         #
1272         #  @ref swig_MakeVertexOnSurface "Example"
1273         @ManageTransactions("BasicOp")
1274         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1275             """
1276             Create a point, corresponding to the given parameters on the
1277             given surface.
1278
1279             Parameters:
1280                 theRefSurf The referenced surface.
1281                 theUParameter Value of U-parameter on the referenced surface.
1282                 theVParameter Value of V-parameter on the referenced surface.
1283                 theName Object name; when specified, this parameter is used
1284                         for result publication in the study. Otherwise, if automatic
1285                         publication is switched on, default value is used for result name.
1286
1287             Returns:
1288                 New GEOM.GEOM_Object, containing the created point.
1289
1290             Example of usage:
1291                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1292             """
1293             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1294             # Example: see GEOM_TestAll.py
1295             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1296             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1297             anObj.SetParameters(Parameters);
1298             self._autoPublish(anObj, theName, "vertex")
1299             return anObj
1300
1301         ## Create a point by projection give coordinates on the given surface
1302         #  @param theRefSurf The referenced surface.
1303         #  @param theX X-coordinate in 3D space
1304         #  @param theY Y-coordinate in 3D space
1305         #  @param theZ Z-coordinate in 3D space
1306         #  @param theName Object name; when specified, this parameter is used
1307         #         for result publication in the study. Otherwise, if automatic
1308         #         publication is switched on, default value is used for result name.
1309         #
1310         #  @return New GEOM.GEOM_Object, containing the created point.
1311         #
1312         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1313         @ManageTransactions("BasicOp")
1314         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1315             """
1316             Create a point by projection give coordinates on the given surface
1317
1318             Parameters:
1319                 theRefSurf The referenced surface.
1320                 theX X-coordinate in 3D space
1321                 theY Y-coordinate in 3D space
1322                 theZ Z-coordinate in 3D space
1323                 theName Object name; when specified, this parameter is used
1324                         for result publication in the study. Otherwise, if automatic
1325                         publication is switched on, default value is used for result name.
1326
1327             Returns:
1328                 New GEOM.GEOM_Object, containing the created point.
1329
1330             Example of usage:
1331                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1332             """
1333             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1334             # Example: see GEOM_TestAll.py
1335             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1336             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1337             anObj.SetParameters(Parameters);
1338             self._autoPublish(anObj, theName, "vertex")
1339             return anObj
1340
1341         ## Create a point, which lays on the given face.
1342         #  The point will lay in arbitrary place of the face.
1343         #  The only condition on it is a non-zero distance to the face boundary.
1344         #  Such point can be used to uniquely identify the face inside any
1345         #  shape in case, when the shape does not contain overlapped faces.
1346         #  @param theFace The referenced face.
1347         #  @param theName Object name; when specified, this parameter is used
1348         #         for result publication in the study. Otherwise, if automatic
1349         #         publication is switched on, default value is used for result name.
1350         #
1351         #  @return New GEOM.GEOM_Object, containing the created point.
1352         #
1353         #  @ref swig_MakeVertexInsideFace "Example"
1354         @ManageTransactions("BasicOp")
1355         def MakeVertexInsideFace (self, theFace, theName=None):
1356             """
1357             Create a point, which lays on the given face.
1358             The point will lay in arbitrary place of the face.
1359             The only condition on it is a non-zero distance to the face boundary.
1360             Such point can be used to uniquely identify the face inside any
1361             shape in case, when the shape does not contain overlapped faces.
1362
1363             Parameters:
1364                 theFace The referenced face.
1365                 theName Object name; when specified, this parameter is used
1366                         for result publication in the study. Otherwise, if automatic
1367                         publication is switched on, default value is used for result name.
1368
1369             Returns:
1370                 New GEOM.GEOM_Object, containing the created point.
1371
1372             Example of usage:
1373                 p_on_face = geompy.MakeVertexInsideFace(Face)
1374             """
1375             # Example: see GEOM_TestAll.py
1376             anObj = self.BasicOp.MakePointOnFace(theFace)
1377             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1378             self._autoPublish(anObj, theName, "vertex")
1379             return anObj
1380
1381         ## Create a point on intersection of two lines.
1382         #  @param theRefLine1, theRefLine2 The referenced lines.
1383         #  @param theName Object name; when specified, this parameter is used
1384         #         for result publication in the study. Otherwise, if automatic
1385         #         publication is switched on, default value is used for result name.
1386         #
1387         #  @return New GEOM.GEOM_Object, containing the created point.
1388         #
1389         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1390         @ManageTransactions("BasicOp")
1391         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1392             """
1393             Create a point on intersection of two lines.
1394
1395             Parameters:
1396                 theRefLine1, theRefLine2 The referenced lines.
1397                 theName Object name; when specified, this parameter is used
1398                         for result publication in the study. Otherwise, if automatic
1399                         publication is switched on, default value is used for result name.
1400
1401             Returns:
1402                 New GEOM.GEOM_Object, containing the created point.
1403             """
1404             # Example: see GEOM_TestAll.py
1405             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1406             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1407             self._autoPublish(anObj, theName, "vertex")
1408             return anObj
1409
1410         ## Create a tangent, corresponding to the given parameter on the given curve.
1411         #  @param theRefCurve The referenced curve.
1412         #  @param theParameter Value of parameter on the referenced curve.
1413         #  @param theName Object name; when specified, this parameter is used
1414         #         for result publication in the study. Otherwise, if automatic
1415         #         publication is switched on, default value is used for result name.
1416         #
1417         #  @return New GEOM.GEOM_Object, containing the created tangent.
1418         #
1419         #  @ref swig_MakeTangentOnCurve "Example"
1420         @ManageTransactions("BasicOp")
1421         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1422             """
1423             Create a tangent, corresponding to the given parameter on the given curve.
1424
1425             Parameters:
1426                 theRefCurve The referenced curve.
1427                 theParameter Value of parameter on the referenced curve.
1428                 theName Object name; when specified, this parameter is used
1429                         for result publication in the study. Otherwise, if automatic
1430                         publication is switched on, default value is used for result name.
1431
1432             Returns:
1433                 New GEOM.GEOM_Object, containing the created tangent.
1434
1435             Example of usage:
1436                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1437             """
1438             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1439             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1440             self._autoPublish(anObj, theName, "tangent")
1441             return anObj
1442
1443         ## Create a tangent plane, corresponding to the given parameter on the given face.
1444         #  @param theFace The face for which tangent plane should be built.
1445         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1446         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1447         #  @param theTrimSize the size of plane.
1448         #  @param theName Object name; when specified, this parameter is used
1449         #         for result publication in the study. Otherwise, if automatic
1450         #         publication is switched on, default value is used for result name.
1451         #
1452         #  @return New GEOM.GEOM_Object, containing the created tangent.
1453         #
1454         #  @ref swig_MakeTangentPlaneOnFace "Example"
1455         @ManageTransactions("BasicOp")
1456         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1457             """
1458             Create a tangent plane, corresponding to the given parameter on the given face.
1459
1460             Parameters:
1461                 theFace The face for which tangent plane should be built.
1462                 theParameterV vertical value of the center point (0.0 - 1.0).
1463                 theParameterU horisontal value of the center point (0.0 - 1.0).
1464                 theTrimSize the size of plane.
1465                 theName Object name; when specified, this parameter is used
1466                         for result publication in the study. Otherwise, if automatic
1467                         publication is switched on, default value is used for result name.
1468
1469            Returns:
1470                 New GEOM.GEOM_Object, containing the created tangent.
1471
1472            Example of usage:
1473                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1474             """
1475             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1476             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1477             self._autoPublish(anObj, theName, "tangent")
1478             return anObj
1479
1480         ## Create a vector with the given components.
1481         #  @param theDX X component of the vector.
1482         #  @param theDY Y component of the vector.
1483         #  @param theDZ Z component of the vector.
1484         #  @param theName Object name; when specified, this parameter is used
1485         #         for result publication in the study. Otherwise, if automatic
1486         #         publication is switched on, default value is used for result name.
1487         #
1488         #  @return New GEOM.GEOM_Object, containing the created vector.
1489         #
1490         #  @ref tui_creation_vector "Example"
1491         @ManageTransactions("BasicOp")
1492         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1493             """
1494             Create a vector with the given components.
1495
1496             Parameters:
1497                 theDX X component of the vector.
1498                 theDY Y component of the vector.
1499                 theDZ Z component of the vector.
1500                 theName Object name; when specified, this parameter is used
1501                         for result publication in the study. Otherwise, if automatic
1502                         publication is switched on, default value is used for result name.
1503
1504             Returns:
1505                 New GEOM.GEOM_Object, containing the created vector.
1506             """
1507             # Example: see GEOM_TestAll.py
1508             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1509             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1510             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1511             anObj.SetParameters(Parameters)
1512             self._autoPublish(anObj, theName, "vector")
1513             return anObj
1514
1515         ## Create a vector between two points.
1516         #  @param thePnt1 Start point for the vector.
1517         #  @param thePnt2 End point for the vector.
1518         #  @param theName Object name; when specified, this parameter is used
1519         #         for result publication in the study. Otherwise, if automatic
1520         #         publication is switched on, default value is used for result name.
1521         #
1522         #  @return New GEOM.GEOM_Object, containing the created vector.
1523         #
1524         #  @ref tui_creation_vector "Example"
1525         @ManageTransactions("BasicOp")
1526         def MakeVector(self, thePnt1, thePnt2, theName=None):
1527             """
1528             Create a vector between two points.
1529
1530             Parameters:
1531                 thePnt1 Start point for the vector.
1532                 thePnt2 End point for the vector.
1533                 theName Object name; when specified, this parameter is used
1534                         for result publication in the study. Otherwise, if automatic
1535                         publication is switched on, default value is used for result name.
1536
1537             Returns:
1538                 New GEOM.GEOM_Object, containing the created vector.
1539             """
1540             # Example: see GEOM_TestAll.py
1541             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1542             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1543             self._autoPublish(anObj, theName, "vector")
1544             return anObj
1545
1546         ## Create a line, passing through the given point
1547         #  and parrallel to the given direction
1548         #  @param thePnt Point. The resulting line will pass through it.
1549         #  @param theDir Direction. The resulting line will be parallel to it.
1550         #  @param theName Object name; when specified, this parameter is used
1551         #         for result publication in the study. Otherwise, if automatic
1552         #         publication is switched on, default value is used for result name.
1553         #
1554         #  @return New GEOM.GEOM_Object, containing the created line.
1555         #
1556         #  @ref tui_creation_line "Example"
1557         @ManageTransactions("BasicOp")
1558         def MakeLine(self, thePnt, theDir, theName=None):
1559             """
1560             Create a line, passing through the given point
1561             and parrallel to the given direction
1562
1563             Parameters:
1564                 thePnt Point. The resulting line will pass through it.
1565                 theDir Direction. The resulting line will be parallel to it.
1566                 theName Object name; when specified, this parameter is used
1567                         for result publication in the study. Otherwise, if automatic
1568                         publication is switched on, default value is used for result name.
1569
1570             Returns:
1571                 New GEOM.GEOM_Object, containing the created line.
1572             """
1573             # Example: see GEOM_TestAll.py
1574             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1575             RaiseIfFailed("MakeLine", self.BasicOp)
1576             self._autoPublish(anObj, theName, "line")
1577             return anObj
1578
1579         ## Create a line, passing through the given points
1580         #  @param thePnt1 First of two points, defining the line.
1581         #  @param thePnt2 Second of two points, defining the line.
1582         #  @param theName Object name; when specified, this parameter is used
1583         #         for result publication in the study. Otherwise, if automatic
1584         #         publication is switched on, default value is used for result name.
1585         #
1586         #  @return New GEOM.GEOM_Object, containing the created line.
1587         #
1588         #  @ref tui_creation_line "Example"
1589         @ManageTransactions("BasicOp")
1590         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1591             """
1592             Create a line, passing through the given points
1593
1594             Parameters:
1595                 thePnt1 First of two points, defining the line.
1596                 thePnt2 Second of two points, defining the line.
1597                 theName Object name; when specified, this parameter is used
1598                         for result publication in the study. Otherwise, if automatic
1599                         publication is switched on, default value is used for result name.
1600
1601             Returns:
1602                 New GEOM.GEOM_Object, containing the created line.
1603             """
1604             # Example: see GEOM_TestAll.py
1605             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1606             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1607             self._autoPublish(anObj, theName, "line")
1608             return anObj
1609
1610         ## Create a line on two faces intersection.
1611         #  @param theFace1 First of two faces, defining the line.
1612         #  @param theFace2 Second of two faces, defining the line.
1613         #  @param theName Object name; when specified, this parameter is used
1614         #         for result publication in the study. Otherwise, if automatic
1615         #         publication is switched on, default value is used for result name.
1616         #
1617         #  @return New GEOM.GEOM_Object, containing the created line.
1618         #
1619         #  @ref swig_MakeLineTwoFaces "Example"
1620         @ManageTransactions("BasicOp")
1621         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1622             """
1623             Create a line on two faces intersection.
1624
1625             Parameters:
1626                 theFace1 First of two faces, defining the line.
1627                 theFace2 Second of two faces, defining the line.
1628                 theName Object name; when specified, this parameter is used
1629                         for result publication in the study. Otherwise, if automatic
1630                         publication is switched on, default value is used for result name.
1631
1632             Returns:
1633                 New GEOM.GEOM_Object, containing the created line.
1634             """
1635             # Example: see GEOM_TestAll.py
1636             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1637             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1638             self._autoPublish(anObj, theName, "line")
1639             return anObj
1640
1641         ## Create a plane, passing through the given point
1642         #  and normal to the given vector.
1643         #  @param thePnt Point, the plane has to pass through.
1644         #  @param theVec Vector, defining the plane normal direction.
1645         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1646         #  @param theName Object name; when specified, this parameter is used
1647         #         for result publication in the study. Otherwise, if automatic
1648         #         publication is switched on, default value is used for result name.
1649         #
1650         #  @return New GEOM.GEOM_Object, containing the created plane.
1651         #
1652         #  @ref tui_creation_plane "Example"
1653         @ManageTransactions("BasicOp")
1654         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1655             """
1656             Create a plane, passing through the given point
1657             and normal to the given vector.
1658
1659             Parameters:
1660                 thePnt Point, the plane has to pass through.
1661                 theVec Vector, defining the plane normal direction.
1662                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1663                 theName Object name; when specified, this parameter is used
1664                         for result publication in the study. Otherwise, if automatic
1665                         publication is switched on, default value is used for result name.
1666
1667             Returns:
1668                 New GEOM.GEOM_Object, containing the created plane.
1669             """
1670             # Example: see GEOM_TestAll.py
1671             theTrimSize, Parameters = ParseParameters(theTrimSize);
1672             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1673             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1674             anObj.SetParameters(Parameters)
1675             self._autoPublish(anObj, theName, "plane")
1676             return anObj
1677
1678         ## Create a plane, passing through the three given points
1679         #  @param thePnt1 First of three points, defining the plane.
1680         #  @param thePnt2 Second of three points, defining the plane.
1681         #  @param thePnt3 Fird of three points, defining the plane.
1682         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1683         #  @param theName Object name; when specified, this parameter is used
1684         #         for result publication in the study. Otherwise, if automatic
1685         #         publication is switched on, default value is used for result name.
1686         #
1687         #  @return New GEOM.GEOM_Object, containing the created plane.
1688         #
1689         #  @ref tui_creation_plane "Example"
1690         @ManageTransactions("BasicOp")
1691         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1692             """
1693             Create a plane, passing through the three given points
1694
1695             Parameters:
1696                 thePnt1 First of three points, defining the plane.
1697                 thePnt2 Second of three points, defining the plane.
1698                 thePnt3 Fird of three points, defining the plane.
1699                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1700                 theName Object name; when specified, this parameter is used
1701                         for result publication in the study. Otherwise, if automatic
1702                         publication is switched on, default value is used for result name.
1703
1704             Returns:
1705                 New GEOM.GEOM_Object, containing the created plane.
1706             """
1707             # Example: see GEOM_TestAll.py
1708             theTrimSize, Parameters = ParseParameters(theTrimSize);
1709             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1710             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1711             anObj.SetParameters(Parameters)
1712             self._autoPublish(anObj, theName, "plane")
1713             return anObj
1714
1715         ## Create a plane, similar to the existing one, but with another size of representing face.
1716         #  @param theFace Referenced plane or LCS(Marker).
1717         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1718         #  @param theName Object name; when specified, this parameter is used
1719         #         for result publication in the study. Otherwise, if automatic
1720         #         publication is switched on, default value is used for result name.
1721         #
1722         #  @return New GEOM.GEOM_Object, containing the created plane.
1723         #
1724         #  @ref tui_creation_plane "Example"
1725         @ManageTransactions("BasicOp")
1726         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1727             """
1728             Create a plane, similar to the existing one, but with another size of representing face.
1729
1730             Parameters:
1731                 theFace Referenced plane or LCS(Marker).
1732                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1733                 theName Object name; when specified, this parameter is used
1734                         for result publication in the study. Otherwise, if automatic
1735                         publication is switched on, default value is used for result name.
1736
1737             Returns:
1738                 New GEOM.GEOM_Object, containing the created plane.
1739             """
1740             # Example: see GEOM_TestAll.py
1741             theTrimSize, Parameters = ParseParameters(theTrimSize);
1742             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1743             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1744             anObj.SetParameters(Parameters)
1745             self._autoPublish(anObj, theName, "plane")
1746             return anObj
1747
1748         ## Create a plane, passing through the 2 vectors
1749         #  with center in a start point of the first vector.
1750         #  @param theVec1 Vector, defining center point and plane direction.
1751         #  @param theVec2 Vector, defining the plane normal direction.
1752         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1753         #  @param theName Object name; when specified, this parameter is used
1754         #         for result publication in the study. Otherwise, if automatic
1755         #         publication is switched on, default value is used for result name.
1756         #
1757         #  @return New GEOM.GEOM_Object, containing the created plane.
1758         #
1759         #  @ref tui_creation_plane "Example"
1760         @ManageTransactions("BasicOp")
1761         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1762             """
1763             Create a plane, passing through the 2 vectors
1764             with center in a start point of the first vector.
1765
1766             Parameters:
1767                 theVec1 Vector, defining center point and plane direction.
1768                 theVec2 Vector, defining the plane normal direction.
1769                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1770                 theName Object name; when specified, this parameter is used
1771                         for result publication in the study. Otherwise, if automatic
1772                         publication is switched on, default value is used for result name.
1773
1774             Returns:
1775                 New GEOM.GEOM_Object, containing the created plane.
1776             """
1777             # Example: see GEOM_TestAll.py
1778             theTrimSize, Parameters = ParseParameters(theTrimSize);
1779             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1780             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1781             anObj.SetParameters(Parameters)
1782             self._autoPublish(anObj, theName, "plane")
1783             return anObj
1784
1785         ## Create a plane, based on a Local coordinate system.
1786         #  @param theLCS  coordinate system, defining plane.
1787         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1788         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1789         #  @param theName Object name; when specified, this parameter is used
1790         #         for result publication in the study. Otherwise, if automatic
1791         #         publication is switched on, default value is used for result name.
1792         #
1793         #  @return New GEOM.GEOM_Object, containing the created plane.
1794         #
1795         #  @ref tui_creation_plane "Example"
1796         @ManageTransactions("BasicOp")
1797         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1798             """
1799             Create a plane, based on a Local coordinate system.
1800
1801            Parameters:
1802                 theLCS  coordinate system, defining plane.
1803                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1804                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1805                 theName Object name; when specified, this parameter is used
1806                         for result publication in the study. Otherwise, if automatic
1807                         publication is switched on, default value is used for result name.
1808
1809             Returns:
1810                 New GEOM.GEOM_Object, containing the created plane.
1811             """
1812             # Example: see GEOM_TestAll.py
1813             theTrimSize, Parameters = ParseParameters(theTrimSize);
1814             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1815             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1816             anObj.SetParameters(Parameters)
1817             self._autoPublish(anObj, theName, "plane")
1818             return anObj
1819
1820         ## Create a local coordinate system.
1821         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1822         #  @param XDX,XDY,XDZ Three components of OX direction
1823         #  @param YDX,YDY,YDZ Three components of OY direction
1824         #  @param theName Object name; when specified, this parameter is used
1825         #         for result publication in the study. Otherwise, if automatic
1826         #         publication is switched on, default value is used for result name.
1827         #
1828         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1829         #
1830         #  @ref swig_MakeMarker "Example"
1831         @ManageTransactions("BasicOp")
1832         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1833             """
1834             Create a local coordinate system.
1835
1836             Parameters:
1837                 OX,OY,OZ Three coordinates of coordinate system origin.
1838                 XDX,XDY,XDZ Three components of OX direction
1839                 YDX,YDY,YDZ Three components of OY direction
1840                 theName Object name; when specified, this parameter is used
1841                         for result publication in the study. Otherwise, if automatic
1842                         publication is switched on, default value is used for result name.
1843
1844             Returns:
1845                 New GEOM.GEOM_Object, containing the created coordinate system.
1846             """
1847             # Example: see GEOM_TestAll.py
1848             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1849             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1850             RaiseIfFailed("MakeMarker", self.BasicOp)
1851             anObj.SetParameters(Parameters)
1852             self._autoPublish(anObj, theName, "lcs")
1853             return anObj
1854
1855         ## Create a local coordinate system from shape.
1856         #  @param theShape The initial shape to detect the coordinate system.
1857         #  @param theName Object name; when specified, this parameter is used
1858         #         for result publication in the study. Otherwise, if automatic
1859         #         publication is switched on, default value is used for result name.
1860         #
1861         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1862         #
1863         #  @ref tui_creation_lcs "Example"
1864         @ManageTransactions("BasicOp")
1865         def MakeMarkerFromShape(self, theShape, theName=None):
1866             """
1867             Create a local coordinate system from shape.
1868
1869             Parameters:
1870                 theShape The initial shape to detect the coordinate system.
1871                 theName Object name; when specified, this parameter is used
1872                         for result publication in the study. Otherwise, if automatic
1873                         publication is switched on, default value is used for result name.
1874
1875             Returns:
1876                 New GEOM.GEOM_Object, containing the created coordinate system.
1877             """
1878             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1879             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1880             self._autoPublish(anObj, theName, "lcs")
1881             return anObj
1882
1883         ## Create a local coordinate system from point and two vectors.
1884         #  @param theOrigin Point of coordinate system origin.
1885         #  @param theXVec Vector of X direction
1886         #  @param theYVec Vector of Y direction
1887         #  @param theName Object name; when specified, this parameter is used
1888         #         for result publication in the study. Otherwise, if automatic
1889         #         publication is switched on, default value is used for result name.
1890         #
1891         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1892         #
1893         #  @ref tui_creation_lcs "Example"
1894         @ManageTransactions("BasicOp")
1895         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1896             """
1897             Create a local coordinate system from point and two vectors.
1898
1899             Parameters:
1900                 theOrigin Point of coordinate system origin.
1901                 theXVec Vector of X direction
1902                 theYVec Vector of Y direction
1903                 theName Object name; when specified, this parameter is used
1904                         for result publication in the study. Otherwise, if automatic
1905                         publication is switched on, default value is used for result name.
1906
1907             Returns:
1908                 New GEOM.GEOM_Object, containing the created coordinate system.
1909
1910             """
1911             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1912             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1913             self._autoPublish(anObj, theName, "lcs")
1914             return anObj
1915
1916         # end of l3_basic_go
1917         ## @}
1918
1919         ## @addtogroup l4_curves
1920         ## @{
1921
1922         ##  Create an arc of circle, passing through three given points.
1923         #  @param thePnt1 Start point of the arc.
1924         #  @param thePnt2 Middle point of the arc.
1925         #  @param thePnt3 End point of the arc.
1926         #  @param theName Object name; when specified, this parameter is used
1927         #         for result publication in the study. Otherwise, if automatic
1928         #         publication is switched on, default value is used for result name.
1929         #
1930         #  @return New GEOM.GEOM_Object, containing the created arc.
1931         #
1932         #  @ref swig_MakeArc "Example"
1933         @ManageTransactions("CurvesOp")
1934         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1935             """
1936             Create an arc of circle, passing through three given points.
1937
1938             Parameters:
1939                 thePnt1 Start point of the arc.
1940                 thePnt2 Middle point of the arc.
1941                 thePnt3 End point of the arc.
1942                 theName Object name; when specified, this parameter is used
1943                         for result publication in the study. Otherwise, if automatic
1944                         publication is switched on, default value is used for result name.
1945
1946             Returns:
1947                 New GEOM.GEOM_Object, containing the created arc.
1948             """
1949             # Example: see GEOM_TestAll.py
1950             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1951             RaiseIfFailed("MakeArc", self.CurvesOp)
1952             self._autoPublish(anObj, theName, "arc")
1953             return anObj
1954
1955         ##  Create an arc of circle from a center and 2 points.
1956         #  @param thePnt1 Center of the arc
1957         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1958         #  @param thePnt3 End point of the arc (Gives also a direction)
1959         #  @param theSense Orientation of the arc
1960         #  @param theName Object name; when specified, this parameter is used
1961         #         for result publication in the study. Otherwise, if automatic
1962         #         publication is switched on, default value is used for result name.
1963         #
1964         #  @return New GEOM.GEOM_Object, containing the created arc.
1965         #
1966         #  @ref swig_MakeArc "Example"
1967         @ManageTransactions("CurvesOp")
1968         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1969             """
1970             Create an arc of circle from a center and 2 points.
1971
1972             Parameters:
1973                 thePnt1 Center of the arc
1974                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1975                 thePnt3 End point of the arc (Gives also a direction)
1976                 theSense Orientation of the arc
1977                 theName Object name; when specified, this parameter is used
1978                         for result publication in the study. Otherwise, if automatic
1979                         publication is switched on, default value is used for result name.
1980
1981             Returns:
1982                 New GEOM.GEOM_Object, containing the created arc.
1983             """
1984             # Example: see GEOM_TestAll.py
1985             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1986             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1987             self._autoPublish(anObj, theName, "arc")
1988             return anObj
1989
1990         ##  Create an arc of ellipse, of center and two points.
1991         #  @param theCenter Center of the arc.
1992         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1993         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1994         #  @param theName Object name; when specified, this parameter is used
1995         #         for result publication in the study. Otherwise, if automatic
1996         #         publication is switched on, default value is used for result name.
1997         #
1998         #  @return New GEOM.GEOM_Object, containing the created arc.
1999         #
2000         #  @ref swig_MakeArc "Example"
2001         @ManageTransactions("CurvesOp")
2002         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2003             """
2004             Create an arc of ellipse, of center and two points.
2005
2006             Parameters:
2007                 theCenter Center of the arc.
2008                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2009                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2010                 theName Object name; when specified, this parameter is used
2011                         for result publication in the study. Otherwise, if automatic
2012                         publication is switched on, default value is used for result name.
2013
2014             Returns:
2015                 New GEOM.GEOM_Object, containing the created arc.
2016             """
2017             # Example: see GEOM_TestAll.py
2018             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2019             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2020             self._autoPublish(anObj, theName, "arc")
2021             return anObj
2022
2023         ## Create a circle with given center, normal vector and radius.
2024         #  @param thePnt Circle center.
2025         #  @param theVec Vector, normal to the plane of the circle.
2026         #  @param theR Circle radius.
2027         #  @param theName Object name; when specified, this parameter is used
2028         #         for result publication in the study. Otherwise, if automatic
2029         #         publication is switched on, default value is used for result name.
2030         #
2031         #  @return New GEOM.GEOM_Object, containing the created circle.
2032         #
2033         #  @ref tui_creation_circle "Example"
2034         @ManageTransactions("CurvesOp")
2035         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2036             """
2037             Create a circle with given center, normal vector and radius.
2038
2039             Parameters:
2040                 thePnt Circle center.
2041                 theVec Vector, normal to the plane of the circle.
2042                 theR Circle radius.
2043                 theName Object name; when specified, this parameter is used
2044                         for result publication in the study. Otherwise, if automatic
2045                         publication is switched on, default value is used for result name.
2046
2047             Returns:
2048                 New GEOM.GEOM_Object, containing the created circle.
2049             """
2050             # Example: see GEOM_TestAll.py
2051             theR, Parameters = ParseParameters(theR)
2052             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2053             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2054             anObj.SetParameters(Parameters)
2055             self._autoPublish(anObj, theName, "circle")
2056             return anObj
2057
2058         ## Create a circle with given radius.
2059         #  Center of the circle will be in the origin of global
2060         #  coordinate system and normal vector will be codirected with Z axis
2061         #  @param theR Circle radius.
2062         #  @param theName Object name; when specified, this parameter is used
2063         #         for result publication in the study. Otherwise, if automatic
2064         #         publication is switched on, default value is used for result name.
2065         #
2066         #  @return New GEOM.GEOM_Object, containing the created circle.
2067         @ManageTransactions("CurvesOp")
2068         def MakeCircleR(self, theR, theName=None):
2069             """
2070             Create a circle with given radius.
2071             Center of the circle will be in the origin of global
2072             coordinate system and normal vector will be codirected with Z axis
2073
2074             Parameters:
2075                 theR Circle radius.
2076                 theName Object name; when specified, this parameter is used
2077                         for result publication in the study. Otherwise, if automatic
2078                         publication is switched on, default value is used for result name.
2079
2080             Returns:
2081                 New GEOM.GEOM_Object, containing the created circle.
2082             """
2083             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2084             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2085             self._autoPublish(anObj, theName, "circle")
2086             return anObj
2087
2088         ## Create a circle, passing through three given points
2089         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2090         #  @param theName Object name; when specified, this parameter is used
2091         #         for result publication in the study. Otherwise, if automatic
2092         #         publication is switched on, default value is used for result name.
2093         #
2094         #  @return New GEOM.GEOM_Object, containing the created circle.
2095         #
2096         #  @ref tui_creation_circle "Example"
2097         @ManageTransactions("CurvesOp")
2098         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2099             """
2100             Create a circle, passing through three given points
2101
2102             Parameters:
2103                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2104                 theName Object name; when specified, this parameter is used
2105                         for result publication in the study. Otherwise, if automatic
2106                         publication is switched on, default value is used for result name.
2107
2108             Returns:
2109                 New GEOM.GEOM_Object, containing the created circle.
2110             """
2111             # Example: see GEOM_TestAll.py
2112             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2113             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2114             self._autoPublish(anObj, theName, "circle")
2115             return anObj
2116
2117         ## Create a circle, with given point1 as center,
2118         #  passing through the point2 as radius and laying in the plane,
2119         #  defined by all three given points.
2120         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2121         #  @param theName Object name; when specified, this parameter is used
2122         #         for result publication in the study. Otherwise, if automatic
2123         #         publication is switched on, default value is used for result name.
2124         #
2125         #  @return New GEOM.GEOM_Object, containing the created circle.
2126         #
2127         #  @ref swig_MakeCircle "Example"
2128         @ManageTransactions("CurvesOp")
2129         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2130             """
2131             Create a circle, with given point1 as center,
2132             passing through the point2 as radius and laying in the plane,
2133             defined by all three given points.
2134
2135             Parameters:
2136                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2137                 theName Object name; when specified, this parameter is used
2138                         for result publication in the study. Otherwise, if automatic
2139                         publication is switched on, default value is used for result name.
2140
2141             Returns:
2142                 New GEOM.GEOM_Object, containing the created circle.
2143             """
2144             # Example: see GEOM_example6.py
2145             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2146             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2147             self._autoPublish(anObj, theName, "circle")
2148             return anObj
2149
2150         ## Create an ellipse with given center, normal vector and radiuses.
2151         #  @param thePnt Ellipse center.
2152         #  @param theVec Vector, normal to the plane of the ellipse.
2153         #  @param theRMajor Major ellipse radius.
2154         #  @param theRMinor Minor ellipse radius.
2155         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2156         #  @param theName Object name; when specified, this parameter is used
2157         #         for result publication in the study. Otherwise, if automatic
2158         #         publication is switched on, default value is used for result name.
2159         #
2160         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2161         #
2162         #  @ref tui_creation_ellipse "Example"
2163         @ManageTransactions("CurvesOp")
2164         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2165             """
2166             Create an ellipse with given center, normal vector and radiuses.
2167
2168             Parameters:
2169                 thePnt Ellipse center.
2170                 theVec Vector, normal to the plane of the ellipse.
2171                 theRMajor Major ellipse radius.
2172                 theRMinor Minor ellipse radius.
2173                 theVecMaj Vector, direction of the ellipse's main axis.
2174                 theName Object name; when specified, this parameter is used
2175                         for result publication in the study. Otherwise, if automatic
2176                         publication is switched on, default value is used for result name.
2177
2178             Returns:
2179                 New GEOM.GEOM_Object, containing the created ellipse.
2180             """
2181             # Example: see GEOM_TestAll.py
2182             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2183             if theVecMaj is not None:
2184                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2185             else:
2186                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2187                 pass
2188             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2189             anObj.SetParameters(Parameters)
2190             self._autoPublish(anObj, theName, "ellipse")
2191             return anObj
2192
2193         ## Create an ellipse with given radiuses.
2194         #  Center of the ellipse will be in the origin of global
2195         #  coordinate system and normal vector will be codirected with Z axis
2196         #  @param theRMajor Major ellipse radius.
2197         #  @param theRMinor Minor ellipse radius.
2198         #  @param theName Object name; when specified, this parameter is used
2199         #         for result publication in the study. Otherwise, if automatic
2200         #         publication is switched on, default value is used for result name.
2201         #
2202         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2203         @ManageTransactions("CurvesOp")
2204         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2205             """
2206             Create an ellipse with given radiuses.
2207             Center of the ellipse will be in the origin of global
2208             coordinate system and normal vector will be codirected with Z axis
2209
2210             Parameters:
2211                 theRMajor Major ellipse radius.
2212                 theRMinor Minor ellipse radius.
2213                 theName Object name; when specified, this parameter is used
2214                         for result publication in the study. Otherwise, if automatic
2215                         publication is switched on, default value is used for result name.
2216
2217             Returns:
2218             New GEOM.GEOM_Object, containing the created ellipse.
2219             """
2220             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2221             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2222             self._autoPublish(anObj, theName, "ellipse")
2223             return anObj
2224
2225         ## Create a polyline on the set of points.
2226         #  @param thePoints Sequence of points for the polyline.
2227         #  @param theIsClosed If True, build a closed wire.
2228         #  @param theName Object name; when specified, this parameter is used
2229         #         for result publication in the study. Otherwise, if automatic
2230         #         publication is switched on, default value is used for result name.
2231         #
2232         #  @return New GEOM.GEOM_Object, containing the created polyline.
2233         #
2234         #  @ref tui_creation_curve "Example"
2235         @ManageTransactions("CurvesOp")
2236         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2237             """
2238             Create a polyline on the set of points.
2239
2240             Parameters:
2241                 thePoints Sequence of points for the polyline.
2242                 theIsClosed If True, build a closed wire.
2243                 theName Object name; when specified, this parameter is used
2244                         for result publication in the study. Otherwise, if automatic
2245                         publication is switched on, default value is used for result name.
2246
2247             Returns:
2248                 New GEOM.GEOM_Object, containing the created polyline.
2249             """
2250             # Example: see GEOM_TestAll.py
2251             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2252             RaiseIfFailed("MakePolyline", self.CurvesOp)
2253             self._autoPublish(anObj, theName, "polyline")
2254             return anObj
2255
2256         ## Create bezier curve on the set of points.
2257         #  @param thePoints Sequence of points for the bezier curve.
2258         #  @param theIsClosed If True, build a closed curve.
2259         #  @param theName Object name; when specified, this parameter is used
2260         #         for result publication in the study. Otherwise, if automatic
2261         #         publication is switched on, default value is used for result name.
2262         #
2263         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2264         #
2265         #  @ref tui_creation_curve "Example"
2266         @ManageTransactions("CurvesOp")
2267         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2268             """
2269             Create bezier curve on the set of points.
2270
2271             Parameters:
2272                 thePoints Sequence of points for the bezier curve.
2273                 theIsClosed If True, build a closed curve.
2274                 theName Object name; when specified, this parameter is used
2275                         for result publication in the study. Otherwise, if automatic
2276                         publication is switched on, default value is used for result name.
2277
2278             Returns:
2279                 New GEOM.GEOM_Object, containing the created bezier curve.
2280             """
2281             # Example: see GEOM_TestAll.py
2282             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2283             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2284             self._autoPublish(anObj, theName, "bezier")
2285             return anObj
2286
2287         ## Create B-Spline curve on the set of points.
2288         #  @param thePoints Sequence of points for the B-Spline curve.
2289         #  @param theIsClosed If True, build a closed curve.
2290         #  @param theDoReordering If TRUE, the algo does not follow the order of
2291         #                         \a thePoints but searches for the closest vertex.
2292         #  @param theName Object name; when specified, this parameter is used
2293         #         for result publication in the study. Otherwise, if automatic
2294         #         publication is switched on, default value is used for result name.
2295         #
2296         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2297         #
2298         #  @ref tui_creation_curve "Example"
2299         @ManageTransactions("CurvesOp")
2300         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2301             """
2302             Create B-Spline curve on the set of points.
2303
2304             Parameters:
2305                 thePoints Sequence of points for the B-Spline curve.
2306                 theIsClosed If True, build a closed curve.
2307                 theDoReordering If True, the algo does not follow the order of
2308                                 thePoints but searches for the closest vertex.
2309                 theName Object name; when specified, this parameter is used
2310                         for result publication in the study. Otherwise, if automatic
2311                         publication is switched on, default value is used for result name.
2312
2313             Returns:
2314                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2315             """
2316             # Example: see GEOM_TestAll.py
2317             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2318             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2319             self._autoPublish(anObj, theName, "bspline")
2320             return anObj
2321
2322         ## Create B-Spline curve on the set of points.
2323         #  @param thePoints Sequence of points for the B-Spline curve.
2324         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2325         #  @param theLastVec Vector object, defining the curve direction at its last point.
2326         #  @param theName Object name; when specified, this parameter is used
2327         #         for result publication in the study. Otherwise, if automatic
2328         #         publication is switched on, default value is used for result name.
2329         #
2330         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2331         #
2332         #  @ref tui_creation_curve "Example"
2333         @ManageTransactions("CurvesOp")
2334         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2335             """
2336             Create B-Spline curve on the set of points.
2337
2338             Parameters:
2339                 thePoints Sequence of points for the B-Spline curve.
2340                 theFirstVec Vector object, defining the curve direction at its first point.
2341                 theLastVec Vector object, defining the curve direction at its last point.
2342                 theName Object name; when specified, this parameter is used
2343                         for result publication in the study. Otherwise, if automatic
2344                         publication is switched on, default value is used for result name.
2345
2346             Returns:
2347                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2348             """
2349             # Example: see GEOM_TestAll.py
2350             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2351             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2352             self._autoPublish(anObj, theName, "bspline")
2353             return anObj
2354
2355         ## Creates a curve using the parametric definition of the basic points.
2356         #  @param thexExpr parametric equation of the coordinates X.
2357         #  @param theyExpr parametric equation of the coordinates Y.
2358         #  @param thezExpr parametric equation of the coordinates Z.
2359         #  @param theParamMin the minimal value of the parameter.
2360         #  @param theParamMax the maximum value of the parameter.
2361         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2362         #  @param theCurveType the type of the curve,
2363         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2364         #  @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.
2365         #  @param theName Object name; when specified, this parameter is used
2366         #         for result publication in the study. Otherwise, if automatic
2367         #         publication is switched on, default value is used for result name.
2368         #
2369         #  @return New GEOM.GEOM_Object, containing the created curve.
2370         #
2371         #  @ref tui_creation_curve "Example"
2372         @ManageTransactions("CurvesOp")
2373         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2374                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2375             """
2376             Creates a curve using the parametric definition of the basic points.
2377
2378             Parameters:
2379                 thexExpr parametric equation of the coordinates X.
2380                 theyExpr parametric equation of the coordinates Y.
2381                 thezExpr parametric equation of the coordinates Z.
2382                 theParamMin the minimal value of the parameter.
2383                 theParamMax the maximum value of the parameter.
2384                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2385                 theCurveType the type of the curve,
2386                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2387                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2388                              method is used which can lead to a bug.
2389                 theName Object name; when specified, this parameter is used
2390                         for result publication in the study. Otherwise, if automatic
2391                         publication is switched on, default value is used for result name.
2392
2393             Returns:
2394                 New GEOM.GEOM_Object, containing the created curve.
2395             """
2396             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2397             if theNewMethod:
2398               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2399             else:
2400               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2401             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2402             anObj.SetParameters(Parameters)
2403             self._autoPublish(anObj, theName, "curve")
2404             return anObj
2405
2406         ## Create an isoline curve on a face.
2407         #  @param theFace the face for which an isoline is created.
2408         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2409         #         creation.
2410         #  @param theParameter the U parameter for U-isoline or V parameter
2411         #         for V-isoline.
2412         #  @param theName Object name; when specified, this parameter is used
2413         #         for result publication in the study. Otherwise, if automatic
2414         #         publication is switched on, default value is used for result name.
2415         #
2416         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2417         #          a compound of edges.
2418         #
2419         #  @ref tui_creation_curve "Example"
2420         @ManageTransactions("CurvesOp")
2421         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2422             """
2423             Create an isoline curve on a face.
2424
2425             Parameters:
2426                 theFace the face for which an isoline is created.
2427                 IsUIsoline True for U-isoline creation; False for V-isoline
2428                            creation.
2429                 theParameter the U parameter for U-isoline or V parameter
2430                              for V-isoline.
2431                 theName Object name; when specified, this parameter is used
2432                         for result publication in the study. Otherwise, if automatic
2433                         publication is switched on, default value is used for result name.
2434
2435             Returns:
2436                 New GEOM.GEOM_Object, containing the created isoline edge or a
2437                 compound of edges.
2438             """
2439             # Example: see GEOM_TestAll.py
2440             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2441             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2442             if IsUIsoline:
2443                 self._autoPublish(anObj, theName, "U-Isoline")
2444             else:
2445                 self._autoPublish(anObj, theName, "V-Isoline")
2446             return anObj
2447
2448         # end of l4_curves
2449         ## @}
2450
2451         ## @addtogroup l3_sketcher
2452         ## @{
2453
2454         ## Create a sketcher (wire or face), following the textual description,
2455         #  passed through <VAR>theCommand</VAR> argument. \n
2456         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2457         #  Format of the description string have to be the following:
2458         #
2459         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2460         #
2461         #  Where:
2462         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2463         #  - CMD is one of
2464         #     - "R angle" : Set the direction by angle
2465         #     - "D dx dy" : Set the direction by DX & DY
2466         #     .
2467         #       \n
2468         #     - "TT x y" : Create segment by point at X & Y
2469         #     - "T dx dy" : Create segment by point with DX & DY
2470         #     - "L length" : Create segment by direction & Length
2471         #     - "IX x" : Create segment by direction & Intersect. X
2472         #     - "IY y" : Create segment by direction & Intersect. Y
2473         #     .
2474         #       \n
2475         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2476         #     - "AA x y": Create arc by point at X & Y
2477         #     - "A dx dy" : Create arc by point with DX & DY
2478         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2479         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2480         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2481         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2482         #     .
2483         #       \n
2484         #     - "WW" : Close Wire (to finish)
2485         #     - "WF" : Close Wire and build face (to finish)
2486         #     .
2487         #        \n
2488         #  - Flag1 (= reverse) is 0 or 2 ...
2489         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2490         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2491         #     .
2492         #        \n
2493         #  - Flag2 (= control tolerance) is 0 or 1 ...
2494         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2495         #     - if 1 the wire is built only if the end point is on the arc
2496         #       with a tolerance of 10^-7 on the distance else the creation fails
2497         #
2498         #  @param theCommand String, defining the sketcher in local
2499         #                    coordinates of the working plane.
2500         #  @param theWorkingPlane Nine double values, defining origin,
2501         #                         OZ and OX directions of the working plane.
2502         #  @param theName Object name; when specified, this parameter is used
2503         #         for result publication in the study. Otherwise, if automatic
2504         #         publication is switched on, default value is used for result name.
2505         #
2506         #  @return New GEOM.GEOM_Object, containing the created wire.
2507         #
2508         #  @ref tui_sketcher_page "Example"
2509         @ManageTransactions("CurvesOp")
2510         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2511             """
2512             Create a sketcher (wire or face), following the textual description, passed
2513             through theCommand argument.
2514             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2515             Format of the description string have to be the following:
2516                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2517             Where:
2518             - x1, y1 are coordinates of the first sketcher point (zero by default),
2519             - CMD is one of
2520                - "R angle" : Set the direction by angle
2521                - "D dx dy" : Set the direction by DX & DY
2522
2523                - "TT x y" : Create segment by point at X & Y
2524                - "T dx dy" : Create segment by point with DX & DY
2525                - "L length" : Create segment by direction & Length
2526                - "IX x" : Create segment by direction & Intersect. X
2527                - "IY y" : Create segment by direction & Intersect. Y
2528
2529                - "C radius length" : Create arc by direction, radius and length(in degree)
2530                - "AA x y": Create arc by point at X & Y
2531                - "A dx dy" : Create arc by point with DX & DY
2532                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2533                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2534                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2535                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2536
2537                - "WW" : Close Wire (to finish)
2538                - "WF" : Close Wire and build face (to finish)
2539
2540             - Flag1 (= reverse) is 0 or 2 ...
2541                - if 0 the drawn arc is the one of lower angle (< Pi)
2542                - if 2 the drawn arc ius the one of greater angle (> Pi)
2543
2544             - Flag2 (= control tolerance) is 0 or 1 ...
2545                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2546                - if 1 the wire is built only if the end point is on the arc
2547                  with a tolerance of 10^-7 on the distance else the creation fails
2548
2549             Parameters:
2550                 theCommand String, defining the sketcher in local
2551                            coordinates of the working plane.
2552                 theWorkingPlane Nine double values, defining origin,
2553                                 OZ and OX directions of the working plane.
2554                 theName Object name; when specified, this parameter is used
2555                         for result publication in the study. Otherwise, if automatic
2556                         publication is switched on, default value is used for result name.
2557
2558             Returns:
2559                 New GEOM.GEOM_Object, containing the created wire.
2560             """
2561             # Example: see GEOM_TestAll.py
2562             theCommand,Parameters = ParseSketcherCommand(theCommand)
2563             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2564             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2565             anObj.SetParameters(Parameters)
2566             self._autoPublish(anObj, theName, "wire")
2567             return anObj
2568
2569         ## Create a sketcher (wire or face), following the textual description,
2570         #  passed through <VAR>theCommand</VAR> argument. \n
2571         #  For format of the description string see MakeSketcher() method.\n
2572         #  @param theCommand String, defining the sketcher in local
2573         #                    coordinates of the working plane.
2574         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2575         #  @param theName Object name; when specified, this parameter is used
2576         #         for result publication in the study. Otherwise, if automatic
2577         #         publication is switched on, default value is used for result name.
2578         #
2579         #  @return New GEOM.GEOM_Object, containing the created wire.
2580         #
2581         #  @ref tui_sketcher_page "Example"
2582         @ManageTransactions("CurvesOp")
2583         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2584             """
2585             Create a sketcher (wire or face), following the textual description,
2586             passed through theCommand argument.
2587             For format of the description string see geompy.MakeSketcher() method.
2588
2589             Parameters:
2590                 theCommand String, defining the sketcher in local
2591                            coordinates of the working plane.
2592                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2593                 theName Object name; when specified, this parameter is used
2594                         for result publication in the study. Otherwise, if automatic
2595                         publication is switched on, default value is used for result name.
2596
2597             Returns:
2598                 New GEOM.GEOM_Object, containing the created wire.
2599             """
2600             theCommand,Parameters = ParseSketcherCommand(theCommand)
2601             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2602             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2603             anObj.SetParameters(Parameters)
2604             self._autoPublish(anObj, theName, "wire")
2605             return anObj
2606
2607         ## Obtain a 2D sketcher interface
2608         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2609         def Sketcher2D (self):
2610             """
2611             Obtain a 2D sketcher interface.
2612
2613             Example of usage:
2614                sk = geompy.Sketcher2D()
2615                sk.addPoint(20, 20)
2616                sk.addSegmentRelative(15, 70)
2617                sk.addSegmentPerpY(50)
2618                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2619                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2620                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2621                sk.close()
2622                Sketch_1 = sk.wire(geomObj_1)
2623             """
2624             sk = Sketcher2D (self)
2625             return sk
2626
2627         ## Create a sketcher wire, following the numerical description,
2628         #  passed through <VAR>theCoordinates</VAR> argument. \n
2629         #  @param theCoordinates double values, defining points to create a wire,
2630         #                                                      passing from it.
2631         #  @param theName Object name; when specified, this parameter is used
2632         #         for result publication in the study. Otherwise, if automatic
2633         #         publication is switched on, default value is used for result name.
2634         #
2635         #  @return New GEOM.GEOM_Object, containing the created wire.
2636         #
2637         #  @ref tui_3dsketcher_page "Example"
2638         @ManageTransactions("CurvesOp")
2639         def Make3DSketcher(self, theCoordinates, theName=None):
2640             """
2641             Create a sketcher wire, following the numerical description,
2642             passed through theCoordinates argument.
2643
2644             Parameters:
2645                 theCoordinates double values, defining points to create a wire,
2646                                passing from it.
2647                 theName Object name; when specified, this parameter is used
2648                         for result publication in the study. Otherwise, if automatic
2649                         publication is switched on, default value is used for result name.
2650
2651             Returns:
2652                 New GEOM_Object, containing the created wire.
2653             """
2654             theCoordinates,Parameters = ParseParameters(theCoordinates)
2655             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2656             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2657             anObj.SetParameters(Parameters)
2658             self._autoPublish(anObj, theName, "wire")
2659             return anObj
2660
2661         ## Obtain a 3D sketcher interface
2662         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2663         #
2664         #  @ref tui_3dsketcher_page "Example"
2665         def Sketcher3D (self):
2666             """
2667             Obtain a 3D sketcher interface.
2668
2669             Example of usage:
2670                 sk = geompy.Sketcher3D()
2671                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2672                 sk.addPointsRelative(0, 0, 130)
2673                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2674                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2675                 sk.close()
2676                 a3D_Sketcher_1 = sk.wire()
2677             """
2678             sk = Sketcher3D (self)
2679             return sk
2680
2681         ## Obtain a 2D polyline creation interface
2682         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2683         #
2684         #  @ref tui_3dsketcher_page "Example"
2685         def Polyline2D (self):
2686             """
2687             Obtain a 2D polyline creation interface.
2688
2689             Example of usage:
2690                 pl = geompy.Polyline2D()
2691                 pl.addSection("section 1", GEOM.Polyline, True)
2692                 pl.addPoints(0, 0, 10, 0, 10, 10)
2693                 pl.addSection("section 2", GEOM.Interpolation, False)
2694                 pl.addPoints(20, 0, 30, 0, 30, 10)
2695                 resultObj = pl.result(WorkingPlane)
2696             """
2697             pl = Polyline2D (self)
2698             return pl
2699
2700         # end of l3_sketcher
2701         ## @}
2702
2703         ## @addtogroup l3_3d_primitives
2704         ## @{
2705
2706         ## Create a box by coordinates of two opposite vertices.
2707         #
2708         #  @param x1,y1,z1 double values, defining first point it.
2709         #  @param x2,y2,z2 double values, defining first point it.
2710         #  @param theName Object name; when specified, this parameter is used
2711         #         for result publication in the study. Otherwise, if automatic
2712         #         publication is switched on, default value is used for result name.
2713         #
2714         #  @return New GEOM.GEOM_Object, containing the created box.
2715         #
2716         #  @ref tui_creation_box "Example"
2717         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2718             """
2719             Create a box by coordinates of two opposite vertices.
2720
2721             Parameters:
2722                 x1,y1,z1 double values, defining first point.
2723                 x2,y2,z2 double values, defining second point.
2724                 theName Object name; when specified, this parameter is used
2725                         for result publication in the study. Otherwise, if automatic
2726                         publication is switched on, default value is used for result name.
2727
2728             Returns:
2729                 New GEOM.GEOM_Object, containing the created box.
2730             """
2731             # Example: see GEOM_TestAll.py
2732             pnt1 = self.MakeVertex(x1,y1,z1)
2733             pnt2 = self.MakeVertex(x2,y2,z2)
2734             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2735             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2736
2737         ## Create a box with specified dimensions along the coordinate axes
2738         #  and with edges, parallel to the coordinate axes.
2739         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2740         #  @param theDX Length of Box edges, parallel to OX axis.
2741         #  @param theDY Length of Box edges, parallel to OY axis.
2742         #  @param theDZ Length of Box edges, parallel to OZ axis.
2743         #  @param theName Object name; when specified, this parameter is used
2744         #         for result publication in the study. Otherwise, if automatic
2745         #         publication is switched on, default value is used for result name.
2746         #
2747         #  @return New GEOM.GEOM_Object, containing the created box.
2748         #
2749         #  @ref tui_creation_box "Example"
2750         @ManageTransactions("PrimOp")
2751         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2752             """
2753             Create a box with specified dimensions along the coordinate axes
2754             and with edges, parallel to the coordinate axes.
2755             Center of the box will be at point (DX/2, DY/2, DZ/2).
2756
2757             Parameters:
2758                 theDX Length of Box edges, parallel to OX axis.
2759                 theDY Length of Box edges, parallel to OY axis.
2760                 theDZ Length of Box edges, parallel to OZ axis.
2761                 theName Object name; when specified, this parameter is used
2762                         for result publication in the study. Otherwise, if automatic
2763                         publication is switched on, default value is used for result name.
2764
2765             Returns:
2766                 New GEOM.GEOM_Object, containing the created box.
2767             """
2768             # Example: see GEOM_TestAll.py
2769             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2770             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2771             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2772             anObj.SetParameters(Parameters)
2773             self._autoPublish(anObj, theName, "box")
2774             return anObj
2775
2776         ## Create a box with two specified opposite vertices,
2777         #  and with edges, parallel to the coordinate axes
2778         #  @param thePnt1 First of two opposite vertices.
2779         #  @param thePnt2 Second of two opposite vertices.
2780         #  @param theName Object name; when specified, this parameter is used
2781         #         for result publication in the study. Otherwise, if automatic
2782         #         publication is switched on, default value is used for result name.
2783         #
2784         #  @return New GEOM.GEOM_Object, containing the created box.
2785         #
2786         #  @ref tui_creation_box "Example"
2787         @ManageTransactions("PrimOp")
2788         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2789             """
2790             Create a box with two specified opposite vertices,
2791             and with edges, parallel to the coordinate axes
2792
2793             Parameters:
2794                 thePnt1 First of two opposite vertices.
2795                 thePnt2 Second of two opposite vertices.
2796                 theName Object name; when specified, this parameter is used
2797                         for result publication in the study. Otherwise, if automatic
2798                         publication is switched on, default value is used for result name.
2799
2800             Returns:
2801                 New GEOM.GEOM_Object, containing the created box.
2802             """
2803             # Example: see GEOM_TestAll.py
2804             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2805             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2806             self._autoPublish(anObj, theName, "box")
2807             return anObj
2808
2809         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2810         #  @param theH height of Face.
2811         #  @param theW width of Face.
2812         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2813         #  @param theName Object name; when specified, this parameter is used
2814         #         for result publication in the study. Otherwise, if automatic
2815         #         publication is switched on, default value is used for result name.
2816         #
2817         #  @return New GEOM.GEOM_Object, containing the created face.
2818         #
2819         #  @ref tui_creation_face "Example"
2820         @ManageTransactions("PrimOp")
2821         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2822             """
2823             Create a face with specified dimensions with edges parallel to coordinate axes.
2824
2825             Parameters:
2826                 theH height of Face.
2827                 theW width of Face.
2828                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2829                 theName Object name; when specified, this parameter is used
2830                         for result publication in the study. Otherwise, if automatic
2831                         publication is switched on, default value is used for result name.
2832
2833             Returns:
2834                 New GEOM.GEOM_Object, containing the created face.
2835             """
2836             # Example: see GEOM_TestAll.py
2837             theH,theW,Parameters = ParseParameters(theH, theW)
2838             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2839             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2840             anObj.SetParameters(Parameters)
2841             self._autoPublish(anObj, theName, "rectangle")
2842             return anObj
2843
2844         ## Create a face from another plane and two sizes,
2845         #  vertical size and horisontal size.
2846         #  @param theObj   Normale vector to the creating face or
2847         #  the face object.
2848         #  @param theH     Height (vertical size).
2849         #  @param theW     Width (horisontal size).
2850         #  @param theName Object name; when specified, this parameter is used
2851         #         for result publication in the study. Otherwise, if automatic
2852         #         publication is switched on, default value is used for result name.
2853         #
2854         #  @return New GEOM.GEOM_Object, containing the created face.
2855         #
2856         #  @ref tui_creation_face "Example"
2857         @ManageTransactions("PrimOp")
2858         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2859             """
2860             Create a face from another plane and two sizes,
2861             vertical size and horisontal size.
2862
2863             Parameters:
2864                 theObj   Normale vector to the creating face or
2865                          the face object.
2866                 theH     Height (vertical size).
2867                 theW     Width (horisontal size).
2868                 theName Object name; when specified, this parameter is used
2869                         for result publication in the study. Otherwise, if automatic
2870                         publication is switched on, default value is used for result name.
2871
2872             Returns:
2873                 New GEOM_Object, containing the created face.
2874             """
2875             # Example: see GEOM_TestAll.py
2876             theH,theW,Parameters = ParseParameters(theH, theW)
2877             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2878             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2879             anObj.SetParameters(Parameters)
2880             self._autoPublish(anObj, theName, "rectangle")
2881             return anObj
2882
2883         ## Create a disk with given center, normal vector and radius.
2884         #  @param thePnt Disk center.
2885         #  @param theVec Vector, normal to the plane of the disk.
2886         #  @param theR Disk radius.
2887         #  @param theName Object name; when specified, this parameter is used
2888         #         for result publication in the study. Otherwise, if automatic
2889         #         publication is switched on, default value is used for result name.
2890         #
2891         #  @return New GEOM.GEOM_Object, containing the created disk.
2892         #
2893         #  @ref tui_creation_disk "Example"
2894         @ManageTransactions("PrimOp")
2895         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2896             """
2897             Create a disk with given center, normal vector and radius.
2898
2899             Parameters:
2900                 thePnt Disk center.
2901                 theVec Vector, normal to the plane of the disk.
2902                 theR Disk radius.
2903                 theName Object name; when specified, this parameter is used
2904                         for result publication in the study. Otherwise, if automatic
2905                         publication is switched on, default value is used for result name.
2906
2907             Returns:
2908                 New GEOM.GEOM_Object, containing the created disk.
2909             """
2910             # Example: see GEOM_TestAll.py
2911             theR,Parameters = ParseParameters(theR)
2912             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2913             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2914             anObj.SetParameters(Parameters)
2915             self._autoPublish(anObj, theName, "disk")
2916             return anObj
2917
2918         ## Create a disk, passing through three given points
2919         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2920         #  @param theName Object name; when specified, this parameter is used
2921         #         for result publication in the study. Otherwise, if automatic
2922         #         publication is switched on, default value is used for result name.
2923         #
2924         #  @return New GEOM.GEOM_Object, containing the created disk.
2925         #
2926         #  @ref tui_creation_disk "Example"
2927         @ManageTransactions("PrimOp")
2928         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2929             """
2930             Create a disk, passing through three given points
2931
2932             Parameters:
2933                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2934                 theName Object name; when specified, this parameter is used
2935                         for result publication in the study. Otherwise, if automatic
2936                         publication is switched on, default value is used for result name.
2937
2938             Returns:
2939                 New GEOM.GEOM_Object, containing the created disk.
2940             """
2941             # Example: see GEOM_TestAll.py
2942             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2943             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2944             self._autoPublish(anObj, theName, "disk")
2945             return anObj
2946
2947         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2948         #  @param theR Radius of Face.
2949         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2950         #  @param theName Object name; when specified, this parameter is used
2951         #         for result publication in the study. Otherwise, if automatic
2952         #         publication is switched on, default value is used for result name.
2953         #
2954         #  @return New GEOM.GEOM_Object, containing the created disk.
2955         #
2956         #  @ref tui_creation_face "Example"
2957         @ManageTransactions("PrimOp")
2958         def MakeDiskR(self, theR, theOrientation, theName=None):
2959             """
2960             Create a disk with specified dimensions along OX-OY coordinate axes.
2961
2962             Parameters:
2963                 theR Radius of Face.
2964                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2965                 theName Object name; when specified, this parameter is used
2966                         for result publication in the study. Otherwise, if automatic
2967                         publication is switched on, default value is used for result name.
2968
2969             Returns:
2970                 New GEOM.GEOM_Object, containing the created disk.
2971
2972             Example of usage:
2973                 Disk3 = geompy.MakeDiskR(100., 1)
2974             """
2975             # Example: see GEOM_TestAll.py
2976             theR,Parameters = ParseParameters(theR)
2977             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2978             RaiseIfFailed("MakeDiskR", self.PrimOp)
2979             anObj.SetParameters(Parameters)
2980             self._autoPublish(anObj, theName, "disk")
2981             return anObj
2982
2983         ## Create a cylinder with given base point, axis, radius and height.
2984         #  @param thePnt Central point of cylinder base.
2985         #  @param theAxis Cylinder axis.
2986         #  @param theR Cylinder radius.
2987         #  @param theH Cylinder height.
2988         #  @param theName Object name; when specified, this parameter is used
2989         #         for result publication in the study. Otherwise, if automatic
2990         #         publication is switched on, default value is used for result name.
2991         #
2992         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2993         #
2994         #  @ref tui_creation_cylinder "Example"
2995         @ManageTransactions("PrimOp")
2996         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2997             """
2998             Create a cylinder with given base point, axis, radius and height.
2999
3000             Parameters:
3001                 thePnt Central point of cylinder base.
3002                 theAxis Cylinder axis.
3003                 theR Cylinder radius.
3004                 theH Cylinder height.
3005                 theName Object name; when specified, this parameter is used
3006                         for result publication in the study. Otherwise, if automatic
3007                         publication is switched on, default value is used for result name.
3008
3009             Returns:
3010                 New GEOM.GEOM_Object, containing the created cylinder.
3011             """
3012             # Example: see GEOM_TestAll.py
3013             theR,theH,Parameters = ParseParameters(theR, theH)
3014             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3015             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3016             anObj.SetParameters(Parameters)
3017             self._autoPublish(anObj, theName, "cylinder")
3018             return anObj
3019             
3020         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3021         #  @param thePnt Central point of cylinder base.
3022         #  @param theAxis Cylinder axis.
3023         #  @param theR Cylinder radius.
3024         #  @param theH Cylinder height.
3025         #  @param theA Cylinder angle in radians.
3026         #  @param theName Object name; when specified, this parameter is used
3027         #         for result publication in the study. Otherwise, if automatic
3028         #         publication is switched on, default value is used for result name.
3029         #
3030         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3031         #
3032         #  @ref tui_creation_cylinder "Example"
3033         @ManageTransactions("PrimOp")
3034         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3035             """
3036             Create a portion of cylinder with given base point, axis, radius, height and angle.
3037
3038             Parameters:
3039                 thePnt Central point of cylinder base.
3040                 theAxis Cylinder axis.
3041                 theR Cylinder radius.
3042                 theH Cylinder height.
3043                 theA Cylinder angle in radians.
3044                 theName Object name; when specified, this parameter is used
3045                         for result publication in the study. Otherwise, if automatic
3046                         publication is switched on, default value is used for result name.
3047
3048             Returns:
3049                 New GEOM.GEOM_Object, containing the created cylinder.
3050             """
3051             # Example: see GEOM_TestAll.py
3052             flag = False
3053             if isinstance(theA,str):
3054                 flag = True
3055             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3056             if flag:
3057                 theA = theA*math.pi/180.
3058             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3059             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3060             anObj.SetParameters(Parameters)
3061             self._autoPublish(anObj, theName, "cylinder")
3062             return anObj
3063
3064         ## Create a cylinder with given radius and height at
3065         #  the origin of coordinate system. Axis of the cylinder
3066         #  will be collinear to the OZ axis of the coordinate system.
3067         #  @param theR Cylinder radius.
3068         #  @param theH Cylinder height.
3069         #  @param theName Object name; when specified, this parameter is used
3070         #         for result publication in the study. Otherwise, if automatic
3071         #         publication is switched on, default value is used for result name.
3072         #
3073         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3074         #
3075         #  @ref tui_creation_cylinder "Example"
3076         @ManageTransactions("PrimOp")
3077         def MakeCylinderRH(self, theR, theH, theName=None):
3078             """
3079             Create a cylinder with given radius and height at
3080             the origin of coordinate system. Axis of the cylinder
3081             will be collinear to the OZ axis of the coordinate system.
3082
3083             Parameters:
3084                 theR Cylinder radius.
3085                 theH Cylinder height.
3086                 theName Object name; when specified, this parameter is used
3087                         for result publication in the study. Otherwise, if automatic
3088                         publication is switched on, default value is used for result name.
3089
3090             Returns:
3091                 New GEOM.GEOM_Object, containing the created cylinder.
3092             """
3093             # Example: see GEOM_TestAll.py
3094             theR,theH,Parameters = ParseParameters(theR, theH)
3095             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3096             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3097             anObj.SetParameters(Parameters)
3098             self._autoPublish(anObj, theName, "cylinder")
3099             return anObj
3100             
3101         ## Create a portion of cylinder with given radius, height and angle at
3102         #  the origin of coordinate system. Axis of the cylinder
3103         #  will be collinear to the OZ axis of the coordinate system.
3104         #  @param theR Cylinder radius.
3105         #  @param theH Cylinder height.
3106         #  @param theA Cylinder angle in radians.
3107         #  @param theName Object name; when specified, this parameter is used
3108         #         for result publication in the study. Otherwise, if automatic
3109         #         publication is switched on, default value is used for result name.
3110         #
3111         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3112         #
3113         #  @ref tui_creation_cylinder "Example"
3114         @ManageTransactions("PrimOp")
3115         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3116             """
3117             Create a portion of cylinder with given radius, height and angle at
3118             the origin of coordinate system. Axis of the cylinder
3119             will be collinear to the OZ axis of the coordinate system.
3120
3121             Parameters:
3122                 theR Cylinder radius.
3123                 theH Cylinder height.
3124                 theA Cylinder angle in radians.
3125                 theName Object name; when specified, this parameter is used
3126                         for result publication in the study. Otherwise, if automatic
3127                         publication is switched on, default value is used for result name.
3128
3129             Returns:
3130                 New GEOM.GEOM_Object, containing the created cylinder.
3131             """
3132             # Example: see GEOM_TestAll.py
3133             flag = False
3134             if isinstance(theA,str):
3135                 flag = True
3136             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3137             if flag:
3138                 theA = theA*math.pi/180.
3139             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3140             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3141             anObj.SetParameters(Parameters)
3142             self._autoPublish(anObj, theName, "cylinder")
3143             return anObj
3144
3145         ## Create a sphere with given center and radius.
3146         #  @param thePnt Sphere center.
3147         #  @param theR Sphere radius.
3148         #  @param theName Object name; when specified, this parameter is used
3149         #         for result publication in the study. Otherwise, if automatic
3150         #         publication is switched on, default value is used for result name.
3151         #
3152         #  @return New GEOM.GEOM_Object, containing the created sphere.
3153         #
3154         #  @ref tui_creation_sphere "Example"
3155         @ManageTransactions("PrimOp")
3156         def MakeSpherePntR(self, thePnt, theR, theName=None):
3157             """
3158             Create a sphere with given center and radius.
3159
3160             Parameters:
3161                 thePnt Sphere center.
3162                 theR Sphere radius.
3163                 theName Object name; when specified, this parameter is used
3164                         for result publication in the study. Otherwise, if automatic
3165                         publication is switched on, default value is used for result name.
3166
3167             Returns:
3168                 New GEOM.GEOM_Object, containing the created sphere.
3169             """
3170             # Example: see GEOM_TestAll.py
3171             theR,Parameters = ParseParameters(theR)
3172             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3173             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3174             anObj.SetParameters(Parameters)
3175             self._autoPublish(anObj, theName, "sphere")
3176             return anObj
3177
3178         ## Create a sphere with given center and radius.
3179         #  @param x,y,z Coordinates of sphere center.
3180         #  @param theR Sphere radius.
3181         #  @param theName Object name; when specified, this parameter is used
3182         #         for result publication in the study. Otherwise, if automatic
3183         #         publication is switched on, default value is used for result name.
3184         #
3185         #  @return New GEOM.GEOM_Object, containing the created sphere.
3186         #
3187         #  @ref tui_creation_sphere "Example"
3188         def MakeSphere(self, x, y, z, theR, theName=None):
3189             """
3190             Create a sphere with given center and radius.
3191
3192             Parameters:
3193                 x,y,z Coordinates of sphere center.
3194                 theR Sphere radius.
3195                 theName Object name; when specified, this parameter is used
3196                         for result publication in the study. Otherwise, if automatic
3197                         publication is switched on, default value is used for result name.
3198
3199             Returns:
3200                 New GEOM.GEOM_Object, containing the created sphere.
3201             """
3202             # Example: see GEOM_TestAll.py
3203             point = self.MakeVertex(x, y, z)
3204             # note: auto-publishing is done in self.MakeSpherePntR()
3205             anObj = self.MakeSpherePntR(point, theR, theName)
3206             return anObj
3207
3208         ## Create a sphere with given radius at the origin of coordinate system.
3209         #  @param theR Sphere radius.
3210         #  @param theName Object name; when specified, this parameter is used
3211         #         for result publication in the study. Otherwise, if automatic
3212         #         publication is switched on, default value is used for result name.
3213         #
3214         #  @return New GEOM.GEOM_Object, containing the created sphere.
3215         #
3216         #  @ref tui_creation_sphere "Example"
3217         @ManageTransactions("PrimOp")
3218         def MakeSphereR(self, theR, theName=None):
3219             """
3220             Create a sphere with given radius at the origin of coordinate system.
3221
3222             Parameters:
3223                 theR Sphere radius.
3224                 theName Object name; when specified, this parameter is used
3225                         for result publication in the study. Otherwise, if automatic
3226                         publication is switched on, default value is used for result name.
3227
3228             Returns:
3229                 New GEOM.GEOM_Object, containing the created sphere.
3230             """
3231             # Example: see GEOM_TestAll.py
3232             theR,Parameters = ParseParameters(theR)
3233             anObj = self.PrimOp.MakeSphereR(theR)
3234             RaiseIfFailed("MakeSphereR", self.PrimOp)
3235             anObj.SetParameters(Parameters)
3236             self._autoPublish(anObj, theName, "sphere")
3237             return anObj
3238
3239         ## Create a cone with given base point, axis, height and radiuses.
3240         #  @param thePnt Central point of the first cone base.
3241         #  @param theAxis Cone axis.
3242         #  @param theR1 Radius of the first cone base.
3243         #  @param theR2 Radius of the second cone base.
3244         #    \note If both radiuses are non-zero, the cone will be truncated.
3245         #    \note If the radiuses are equal, a cylinder will be created instead.
3246         #  @param theH Cone height.
3247         #  @param theName Object name; when specified, this parameter is used
3248         #         for result publication in the study. Otherwise, if automatic
3249         #         publication is switched on, default value is used for result name.
3250         #
3251         #  @return New GEOM.GEOM_Object, containing the created cone.
3252         #
3253         #  @ref tui_creation_cone "Example"
3254         @ManageTransactions("PrimOp")
3255         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3256             """
3257             Create a cone with given base point, axis, height and radiuses.
3258
3259             Parameters:
3260                 thePnt Central point of the first cone base.
3261                 theAxis Cone axis.
3262                 theR1 Radius of the first cone base.
3263                 theR2 Radius of the second cone base.
3264                 theH Cone height.
3265                 theName Object name; when specified, this parameter is used
3266                         for result publication in the study. Otherwise, if automatic
3267                         publication is switched on, default value is used for result name.
3268
3269             Note:
3270                 If both radiuses are non-zero, the cone will be truncated.
3271                 If the radiuses are equal, a cylinder will be created instead.
3272
3273             Returns:
3274                 New GEOM.GEOM_Object, containing the created cone.
3275             """
3276             # Example: see GEOM_TestAll.py
3277             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3278             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3279             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3280             anObj.SetParameters(Parameters)
3281             self._autoPublish(anObj, theName, "cone")
3282             return anObj
3283
3284         ## Create a cone with given height and radiuses at
3285         #  the origin of coordinate system. Axis of the cone will
3286         #  be collinear to the OZ axis of the coordinate system.
3287         #  @param theR1 Radius of the first cone base.
3288         #  @param theR2 Radius of the second cone base.
3289         #    \note If both radiuses are non-zero, the cone will be truncated.
3290         #    \note If the radiuses are equal, a cylinder will be created instead.
3291         #  @param theH Cone height.
3292         #  @param theName Object name; when specified, this parameter is used
3293         #         for result publication in the study. Otherwise, if automatic
3294         #         publication is switched on, default value is used for result name.
3295         #
3296         #  @return New GEOM.GEOM_Object, containing the created cone.
3297         #
3298         #  @ref tui_creation_cone "Example"
3299         @ManageTransactions("PrimOp")
3300         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3301             """
3302             Create a cone with given height and radiuses at
3303             the origin of coordinate system. Axis of the cone will
3304             be collinear to the OZ axis of the coordinate system.
3305
3306             Parameters:
3307                 theR1 Radius of the first cone base.
3308                 theR2 Radius of the second cone base.
3309                 theH Cone height.
3310                 theName Object name; when specified, this parameter is used
3311                         for result publication in the study. Otherwise, if automatic
3312                         publication is switched on, default value is used for result name.
3313
3314             Note:
3315                 If both radiuses are non-zero, the cone will be truncated.
3316                 If the radiuses are equal, a cylinder will be created instead.
3317
3318             Returns:
3319                 New GEOM.GEOM_Object, containing the created cone.
3320             """
3321             # Example: see GEOM_TestAll.py
3322             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3323             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3324             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3325             anObj.SetParameters(Parameters)
3326             self._autoPublish(anObj, theName, "cone")
3327             return anObj
3328
3329         ## Create a torus with given center, normal vector and radiuses.
3330         #  @param thePnt Torus central point.
3331         #  @param theVec Torus axis of symmetry.
3332         #  @param theRMajor Torus major radius.
3333         #  @param theRMinor Torus minor radius.
3334         #  @param theName Object name; when specified, this parameter is used
3335         #         for result publication in the study. Otherwise, if automatic
3336         #         publication is switched on, default value is used for result name.
3337         #
3338         #  @return New GEOM.GEOM_Object, containing the created torus.
3339         #
3340         #  @ref tui_creation_torus "Example"
3341         @ManageTransactions("PrimOp")
3342         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3343             """
3344             Create a torus with given center, normal vector and radiuses.
3345
3346             Parameters:
3347                 thePnt Torus central point.
3348                 theVec Torus axis of symmetry.
3349                 theRMajor Torus major radius.
3350                 theRMinor Torus minor radius.
3351                 theName Object name; when specified, this parameter is used
3352                         for result publication in the study. Otherwise, if automatic
3353                         publication is switched on, default value is used for result name.
3354
3355            Returns:
3356                 New GEOM.GEOM_Object, containing the created torus.
3357             """
3358             # Example: see GEOM_TestAll.py
3359             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3360             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3361             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3362             anObj.SetParameters(Parameters)
3363             self._autoPublish(anObj, theName, "torus")
3364             return anObj
3365
3366         ## Create a torus with given radiuses at the origin of coordinate system.
3367         #  @param theRMajor Torus major radius.
3368         #  @param theRMinor Torus minor radius.
3369         #  @param theName Object name; when specified, this parameter is used
3370         #         for result publication in the study. Otherwise, if automatic
3371         #         publication is switched on, default value is used for result name.
3372         #
3373         #  @return New GEOM.GEOM_Object, containing the created torus.
3374         #
3375         #  @ref tui_creation_torus "Example"
3376         @ManageTransactions("PrimOp")
3377         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3378             """
3379            Create a torus with given radiuses at the origin of coordinate system.
3380
3381            Parameters:
3382                 theRMajor Torus major radius.
3383                 theRMinor Torus minor radius.
3384                 theName Object name; when specified, this parameter is used
3385                         for result publication in the study. Otherwise, if automatic
3386                         publication is switched on, default value is used for result name.
3387
3388            Returns:
3389                 New GEOM.GEOM_Object, containing the created torus.
3390             """
3391             # Example: see GEOM_TestAll.py
3392             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3393             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3394             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3395             anObj.SetParameters(Parameters)
3396             self._autoPublish(anObj, theName, "torus")
3397             return anObj
3398
3399         # end of l3_3d_primitives
3400         ## @}
3401
3402         ## @addtogroup l3_complex
3403         ## @{
3404
3405         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3406         #  @param theBase Base shape to be extruded.
3407         #  @param thePoint1 First end of extrusion vector.
3408         #  @param thePoint2 Second end of extrusion vector.
3409         #  @param theScaleFactor Use it to make prism with scaled second base.
3410         #                        Nagative value means not scaled second base.
3411         #  @param theName Object name; when specified, this parameter is used
3412         #         for result publication in the study. Otherwise, if automatic
3413         #         publication is switched on, default value is used for result name.
3414         #
3415         #  @return New GEOM.GEOM_Object, containing the created prism.
3416         #
3417         #  @ref tui_creation_prism "Example"
3418         @ManageTransactions("PrimOp")
3419         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3420             """
3421             Create a shape by extrusion of the base shape along a vector, defined by two points.
3422
3423             Parameters:
3424                 theBase Base shape to be extruded.
3425                 thePoint1 First end of extrusion vector.
3426                 thePoint2 Second end of extrusion vector.
3427                 theScaleFactor Use it to make prism with scaled second base.
3428                                Nagative value means not scaled second base.
3429                 theName Object name; when specified, this parameter is used
3430                         for result publication in the study. Otherwise, if automatic
3431                         publication is switched on, default value is used for result name.
3432
3433             Returns:
3434                 New GEOM.GEOM_Object, containing the created prism.
3435             """
3436             # Example: see GEOM_TestAll.py
3437             anObj = None
3438             Parameters = ""
3439             if theScaleFactor > 0:
3440                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3441                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3442             else:
3443                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3444             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3445             anObj.SetParameters(Parameters)
3446             self._autoPublish(anObj, theName, "prism")
3447             return anObj
3448
3449         ## Create a shape by extrusion of the base shape along a
3450         #  vector, defined by two points, in 2 Ways (forward/backward).
3451         #  @param theBase Base shape to be extruded.
3452         #  @param thePoint1 First end of extrusion vector.
3453         #  @param thePoint2 Second end of extrusion vector.
3454         #  @param theName Object name; when specified, this parameter is used
3455         #         for result publication in the study. Otherwise, if automatic
3456         #         publication is switched on, default value is used for result name.
3457         #
3458         #  @return New GEOM.GEOM_Object, containing the created prism.
3459         #
3460         #  @ref tui_creation_prism "Example"
3461         @ManageTransactions("PrimOp")
3462         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3463             """
3464             Create a shape by extrusion of the base shape along a
3465             vector, defined by two points, in 2 Ways (forward/backward).
3466
3467             Parameters:
3468                 theBase Base shape to be extruded.
3469                 thePoint1 First end of extrusion vector.
3470                 thePoint2 Second end of extrusion vector.
3471                 theName Object name; when specified, this parameter is used
3472                         for result publication in the study. Otherwise, if automatic
3473                         publication is switched on, default value is used for result name.
3474
3475             Returns:
3476                 New GEOM.GEOM_Object, containing the created prism.
3477             """
3478             # Example: see GEOM_TestAll.py
3479             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3480             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3481             self._autoPublish(anObj, theName, "prism")
3482             return anObj
3483
3484         ## Create a shape by extrusion of the base shape along the vector,
3485         #  i.e. all the space, transfixed by the base shape during its translation
3486         #  along the vector on the given distance.
3487         #  @param theBase Base shape to be extruded.
3488         #  @param theVec Direction of extrusion.
3489         #  @param theH Prism dimension along theVec.
3490         #  @param theScaleFactor Use it to make prism with scaled second base.
3491         #                        Negative value means not scaled second base.
3492         #  @param theName Object name; when specified, this parameter is used
3493         #         for result publication in the study. Otherwise, if automatic
3494         #         publication is switched on, default value is used for result name.
3495         #
3496         #  @return New GEOM.GEOM_Object, containing the created prism.
3497         #
3498         #  @ref tui_creation_prism "Example"
3499         @ManageTransactions("PrimOp")
3500         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3501             """
3502             Create a shape by extrusion of the base shape along the vector,
3503             i.e. all the space, transfixed by the base shape during its translation
3504             along the vector on the given distance.
3505
3506             Parameters:
3507                 theBase Base shape to be extruded.
3508                 theVec Direction of extrusion.
3509                 theH Prism dimension along theVec.
3510                 theScaleFactor Use it to make prism with scaled second base.
3511                                Negative value means not scaled second base.
3512                 theName Object name; when specified, this parameter is used
3513                         for result publication in the study. Otherwise, if automatic
3514                         publication is switched on, default value is used for result name.
3515
3516             Returns:
3517                 New GEOM.GEOM_Object, containing the created prism.
3518             """
3519             # Example: see GEOM_TestAll.py
3520             anObj = None
3521             Parameters = ""
3522             if theScaleFactor > 0:
3523                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3524                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3525             else:
3526                 theH,Parameters = ParseParameters(theH)
3527                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3528             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3529             anObj.SetParameters(Parameters)
3530             self._autoPublish(anObj, theName, "prism")
3531             return anObj
3532
3533         ## Create a shape by extrusion of the base shape along the vector,
3534         #  i.e. all the space, transfixed by the base shape during its translation
3535         #  along the vector on the given distance in 2 Ways (forward/backward).
3536         #  @param theBase Base shape to be extruded.
3537         #  @param theVec Direction of extrusion.
3538         #  @param theH Prism dimension along theVec in forward direction.
3539         #  @param theName Object name; when specified, this parameter is used
3540         #         for result publication in the study. Otherwise, if automatic
3541         #         publication is switched on, default value is used for result name.
3542         #
3543         #  @return New GEOM.GEOM_Object, containing the created prism.
3544         #
3545         #  @ref tui_creation_prism "Example"
3546         @ManageTransactions("PrimOp")
3547         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3548             """
3549             Create a shape by extrusion of the base shape along the vector,
3550             i.e. all the space, transfixed by the base shape during its translation
3551             along the vector on the given distance in 2 Ways (forward/backward).
3552
3553             Parameters:
3554                 theBase Base shape to be extruded.
3555                 theVec Direction of extrusion.
3556                 theH Prism dimension along theVec in forward direction.
3557                 theName Object name; when specified, this parameter is used
3558                         for result publication in the study. Otherwise, if automatic
3559                         publication is switched on, default value is used for result name.
3560
3561             Returns:
3562                 New GEOM.GEOM_Object, containing the created prism.
3563             """
3564             # Example: see GEOM_TestAll.py
3565             theH,Parameters = ParseParameters(theH)
3566             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3567             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3568             anObj.SetParameters(Parameters)
3569             self._autoPublish(anObj, theName, "prism")
3570             return anObj
3571
3572         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3573         #  @param theBase Base shape to be extruded.
3574         #  @param theDX, theDY, theDZ Directions of extrusion.
3575         #  @param theScaleFactor Use it to make prism with scaled second base.
3576         #                        Nagative value means not scaled second base.
3577         #  @param theName Object name; when specified, this parameter is used
3578         #         for result publication in the study. Otherwise, if automatic
3579         #         publication is switched on, default value is used for result name.
3580         #
3581         #  @return New GEOM.GEOM_Object, containing the created prism.
3582         #
3583         #  @ref tui_creation_prism "Example"
3584         @ManageTransactions("PrimOp")
3585         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3586             """
3587             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3588
3589             Parameters:
3590                 theBase Base shape to be extruded.
3591                 theDX, theDY, theDZ Directions of extrusion.
3592                 theScaleFactor Use it to make prism with scaled second base.
3593                                Nagative value means not scaled second base.
3594                 theName Object name; when specified, this parameter is used
3595                         for result publication in the study. Otherwise, if automatic
3596                         publication is switched on, default value is used for result name.
3597
3598             Returns:
3599                 New GEOM.GEOM_Object, containing the created prism.
3600             """
3601             # Example: see GEOM_TestAll.py
3602             anObj = None
3603             Parameters = ""
3604             if theScaleFactor > 0:
3605                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3606                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3607             else:
3608                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3609                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3610             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3611             anObj.SetParameters(Parameters)
3612             self._autoPublish(anObj, theName, "prism")
3613             return anObj
3614
3615         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3616         #  i.e. all the space, transfixed by the base shape during its translation
3617         #  along the vector on the given distance in 2 Ways (forward/backward).
3618         #  @param theBase Base shape to be extruded.
3619         #  @param theDX, theDY, theDZ Directions of extrusion.
3620         #  @param theName Object name; when specified, this parameter is used
3621         #         for result publication in the study. Otherwise, if automatic
3622         #         publication is switched on, default value is used for result name.
3623         #
3624         #  @return New GEOM.GEOM_Object, containing the created prism.
3625         #
3626         #  @ref tui_creation_prism "Example"
3627         @ManageTransactions("PrimOp")
3628         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3629             """
3630             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3631             i.e. all the space, transfixed by the base shape during its translation
3632             along the vector on the given distance in 2 Ways (forward/backward).
3633
3634             Parameters:
3635                 theBase Base shape to be extruded.
3636                 theDX, theDY, theDZ Directions of extrusion.
3637                 theName Object name; when specified, this parameter is used
3638                         for result publication in the study. Otherwise, if automatic
3639                         publication is switched on, default value is used for result name.
3640
3641             Returns:
3642                 New GEOM.GEOM_Object, containing the created prism.
3643             """
3644             # Example: see GEOM_TestAll.py
3645             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3646             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3647             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3648             anObj.SetParameters(Parameters)
3649             self._autoPublish(anObj, theName, "prism")
3650             return anObj
3651
3652         ## Create a shape by revolution of the base shape around the axis
3653         #  on the given angle, i.e. all the space, transfixed by the base
3654         #  shape during its rotation around the axis on the given angle.
3655         #  @param theBase Base shape to be rotated.
3656         #  @param theAxis Rotation axis.
3657         #  @param theAngle Rotation angle in radians.
3658         #  @param theName Object name; when specified, this parameter is used
3659         #         for result publication in the study. Otherwise, if automatic
3660         #         publication is switched on, default value is used for result name.
3661         #
3662         #  @return New GEOM.GEOM_Object, containing the created revolution.
3663         #
3664         #  @ref tui_creation_revolution "Example"
3665         @ManageTransactions("PrimOp")
3666         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3667             """
3668             Create a shape by revolution of the base shape around the axis
3669             on the given angle, i.e. all the space, transfixed by the base
3670             shape during its rotation around the axis on the given angle.
3671
3672             Parameters:
3673                 theBase Base shape to be rotated.
3674                 theAxis Rotation axis.
3675                 theAngle Rotation angle in radians.
3676                 theName Object name; when specified, this parameter is used
3677                         for result publication in the study. Otherwise, if automatic
3678                         publication is switched on, default value is used for result name.
3679
3680             Returns:
3681                 New GEOM.GEOM_Object, containing the created revolution.
3682             """
3683             # Example: see GEOM_TestAll.py
3684             theAngle,Parameters = ParseParameters(theAngle)
3685             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3686             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3687             anObj.SetParameters(Parameters)
3688             self._autoPublish(anObj, theName, "revolution")
3689             return anObj
3690
3691         ## Create a shape by revolution of the base shape around the axis
3692         #  on the given angle, i.e. all the space, transfixed by the base
3693         #  shape during its rotation around the axis on the given angle in
3694         #  both directions (forward/backward)
3695         #  @param theBase Base shape to be rotated.
3696         #  @param theAxis Rotation axis.
3697         #  @param theAngle Rotation angle in radians.
3698         #  @param theName Object name; when specified, this parameter is used
3699         #         for result publication in the study. Otherwise, if automatic
3700         #         publication is switched on, default value is used for result name.
3701         #
3702         #  @return New GEOM.GEOM_Object, containing the created revolution.
3703         #
3704         #  @ref tui_creation_revolution "Example"
3705         @ManageTransactions("PrimOp")
3706         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3707             """
3708             Create a shape by revolution of the base shape around the axis
3709             on the given angle, i.e. all the space, transfixed by the base
3710             shape during its rotation around the axis on the given angle in
3711             both directions (forward/backward).
3712
3713             Parameters:
3714                 theBase Base shape to be rotated.
3715                 theAxis Rotation axis.
3716                 theAngle Rotation angle in radians.
3717                 theName Object name; when specified, this parameter is used
3718                         for result publication in the study. Otherwise, if automatic
3719                         publication is switched on, default value is used for result name.
3720
3721             Returns:
3722                 New GEOM.GEOM_Object, containing the created revolution.
3723             """
3724             theAngle,Parameters = ParseParameters(theAngle)
3725             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3726             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3727             anObj.SetParameters(Parameters)
3728             self._autoPublish(anObj, theName, "revolution")
3729             return anObj
3730
3731         ## Create a face from a given set of contours.
3732         #  @param theContours either a list or a compound of edges/wires.
3733         #  @param theMinDeg a minimal degree of BSpline surface to create.
3734         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3735         #  @param theTol2D a 2d tolerance to be reached.
3736         #  @param theTol3D a 3d tolerance to be reached.
3737         #  @param theNbIter a number of iteration of approximation algorithm.
3738         #  @param theMethod Kind of method to perform filling operation
3739         #         (see GEOM.filling_oper_method enum).
3740         #  @param isApprox if True, BSpline curves are generated in the process
3741         #                  of surface construction. By default it is False, that means
3742         #                  the surface is created using given curves. The usage of
3743         #                  Approximation makes the algorithm work slower, but allows
3744         #                  building the surface for rather complex cases.
3745         #  @param theName Object name; when specified, this parameter is used
3746         #         for result publication in the study. Otherwise, if automatic
3747         #         publication is switched on, default value is used for result name.
3748         #
3749         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3750         #
3751         #  @ref tui_creation_filling "Example"
3752         @ManageTransactions("PrimOp")
3753         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3754                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3755             """
3756             Create a face from a given set of contours.
3757
3758             Parameters:
3759                 theContours either a list or a compound of edges/wires.
3760                 theMinDeg a minimal degree of BSpline surface to create.
3761                 theMaxDeg a maximal degree of BSpline surface to create.
3762                 theTol2D a 2d tolerance to be reached.
3763                 theTol3D a 3d tolerance to be reached.
3764                 theNbIter a number of iteration of approximation algorithm.
3765                 theMethod Kind of method to perform filling operation
3766                           (see GEOM.filling_oper_method enum).
3767                 isApprox if True, BSpline curves are generated in the process
3768                          of surface construction. By default it is False, that means
3769                          the surface is created using given curves. The usage of
3770                          Approximation makes the algorithm work slower, but allows
3771                          building the surface for rather complex cases.
3772                 theName Object name; when specified, this parameter is used
3773                         for result publication in the study. Otherwise, if automatic
3774                         publication is switched on, default value is used for result name.
3775
3776             Returns:
3777                 New GEOM.GEOM_Object (face), containing the created filling surface.
3778
3779             Example of usage:
3780                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3781             """
3782             # Example: see GEOM_TestAll.py
3783             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3784             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3785                                             theTol2D, theTol3D, theNbIter,
3786                                             theMethod, isApprox)
3787             RaiseIfFailed("MakeFilling", self.PrimOp)
3788             anObj.SetParameters(Parameters)
3789             self._autoPublish(anObj, theName, "filling")
3790             return anObj
3791
3792
3793         ## Create a face from a given set of contours.
3794         #  This method corresponds to MakeFilling() with isApprox=True.
3795         #  @param theContours either a list or a compound of edges/wires.
3796         #  @param theMinDeg a minimal degree of BSpline surface to create.
3797         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3798         #  @param theTol3D a 3d tolerance to be reached.
3799         #  @param theName Object name; when specified, this parameter is used
3800         #         for result publication in the study. Otherwise, if automatic
3801         #         publication is switched on, default value is used for result name.
3802         #
3803         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3804         #
3805         #  @ref tui_creation_filling "Example"
3806         @ManageTransactions("PrimOp")
3807         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3808             """
3809             Create a filling from the given compound of contours.
3810             This method corresponds to MakeFilling() with isApprox=True.
3811
3812             Parameters:
3813                 theContours either a list or a compound of edges/wires.
3814                 theMinDeg a minimal degree of BSpline surface to create.
3815                 theMaxDeg a maximal degree of BSpline surface to create.
3816                 theTol3D a 3d tolerance to be reached.
3817                 theName Object name; when specified, this parameter is used
3818                         for result publication in the study. Otherwise, if automatic
3819                         publication is switched on, default value is used for result name.
3820
3821             Returns:
3822                 New GEOM.GEOM_Object (face), containing the created filling surface.
3823
3824             Example of usage:
3825                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3826             """
3827             # Example: see GEOM_TestAll.py
3828             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3829             anObj = self.PrimOp.MakeFilling(theContours, theMinDeg, theMaxDeg,
3830                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3831             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3832             anObj.SetParameters(Parameters)
3833             self._autoPublish(anObj, theName, "filling")
3834             return anObj
3835
3836         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3837         #  @param theSeqSections - set of specified sections.
3838         #  @param theModeSolid - mode defining building solid or shell
3839         #  @param thePreci - precision 3D used for smoothing
3840         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3841         #  @param theName Object name; when specified, this parameter is used
3842         #         for result publication in the study. Otherwise, if automatic
3843         #         publication is switched on, default value is used for result name.
3844         #
3845         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3846         #
3847         #  @ref swig_todo "Example"
3848         @ManageTransactions("PrimOp")
3849         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3850             """
3851             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3852
3853             Parameters:
3854                 theSeqSections - set of specified sections.
3855                 theModeSolid - mode defining building solid or shell
3856                 thePreci - precision 3D used for smoothing
3857                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3858                 theName Object name; when specified, this parameter is used
3859                         for result publication in the study. Otherwise, if automatic
3860                         publication is switched on, default value is used for result name.
3861
3862             Returns:
3863                 New GEOM.GEOM_Object, containing the created shell or solid.
3864             """
3865             # Example: see GEOM_TestAll.py
3866             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3867             RaiseIfFailed("MakeThruSections", self.PrimOp)
3868             self._autoPublish(anObj, theName, "filling")
3869             return anObj
3870
3871         ## Create a shape by extrusion of the base shape along
3872         #  the path shape. The path shape can be a wire or an edge.
3873         #  @param theBase Base shape to be extruded.
3874         #  @param thePath Path shape to extrude the base shape along it.
3875         #  @param theName Object name; when specified, this parameter is used
3876         #         for result publication in the study. Otherwise, if automatic
3877         #         publication is switched on, default value is used for result name.
3878         #
3879         #  @return New GEOM.GEOM_Object, containing the created pipe.
3880         #
3881         #  @ref tui_creation_pipe "Example"
3882         @ManageTransactions("PrimOp")
3883         def MakePipe(self, theBase, thePath, theName=None):
3884             """
3885             Create a shape by extrusion of the base shape along
3886             the path shape. The path shape can be a wire or an edge.
3887
3888             Parameters:
3889                 theBase Base shape to be extruded.
3890                 thePath Path shape to extrude the base shape along it.
3891                 theName Object name; when specified, this parameter is used
3892                         for result publication in the study. Otherwise, if automatic
3893                         publication is switched on, default value is used for result name.
3894
3895             Returns:
3896                 New GEOM.GEOM_Object, containing the created pipe.
3897             """
3898             # Example: see GEOM_TestAll.py
3899             anObj = self.PrimOp.MakePipe(theBase, thePath)
3900             RaiseIfFailed("MakePipe", self.PrimOp)
3901             self._autoPublish(anObj, theName, "pipe")
3902             return anObj
3903
3904         ## Create a shape by extrusion of the profile shape along
3905         #  the path shape. The path shape can be a wire or an edge.
3906         #  the several profiles can be specified in the several locations of path.
3907         #  @param theSeqBases - list of  Bases shape to be extruded.
3908         #  @param theLocations - list of locations on the path corresponding
3909         #                        specified list of the Bases shapes. Number of locations
3910         #                        should be equal to number of bases or list of locations can be empty.
3911         #  @param thePath - Path shape to extrude the base shape along it.
3912         #  @param theWithContact - the mode defining that the section is translated to be in
3913         #                          contact with the spine.
3914         #  @param theWithCorrection - defining that the section is rotated to be
3915         #                             orthogonal to the spine tangent in the correspondent point
3916         #  @param theName Object name; when specified, this parameter is used
3917         #         for result publication in the study. Otherwise, if automatic
3918         #         publication is switched on, default value is used for result name.
3919         #
3920         #  @return New GEOM.GEOM_Object, containing the created pipe.
3921         #
3922         #  @ref tui_creation_pipe_with_diff_sec "Example"
3923         @ManageTransactions("PrimOp")
3924         def MakePipeWithDifferentSections(self, theSeqBases,
3925                                           theLocations, thePath,
3926                                           theWithContact, theWithCorrection, theName=None):
3927             """
3928             Create a shape by extrusion of the profile shape along
3929             the path shape. The path shape can be a wire or an edge.
3930             the several profiles can be specified in the several locations of path.
3931
3932             Parameters:
3933                 theSeqBases - list of  Bases shape to be extruded.
3934                 theLocations - list of locations on the path corresponding
3935                                specified list of the Bases shapes. Number of locations
3936                                should be equal to number of bases or list of locations can be empty.
3937                 thePath - Path shape to extrude the base shape along it.
3938                 theWithContact - the mode defining that the section is translated to be in
3939                                  contact with the spine(0/1)
3940                 theWithCorrection - defining that the section is rotated to be
3941                                     orthogonal to the spine tangent in the correspondent point (0/1)
3942                 theName Object name; when specified, this parameter is used
3943                         for result publication in the study. Otherwise, if automatic
3944                         publication is switched on, default value is used for result name.
3945
3946             Returns:
3947                 New GEOM.GEOM_Object, containing the created pipe.
3948             """
3949             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3950                                                               theLocations, thePath,
3951                                                               theWithContact, theWithCorrection)
3952             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3953             self._autoPublish(anObj, theName, "pipe")
3954             return anObj
3955
3956         ## Create a shape by extrusion of the profile shape along
3957         #  the path shape. The path shape can be a wire or a edge.
3958         #  the several profiles can be specified in the several locations of path.
3959         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3960         #                       shell or face. If number of faces in neighbour sections
3961         #                       aren't coincided result solid between such sections will
3962         #                       be created using external boundaries of this shells.
3963         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3964         #                          This list is used for searching correspondences between
3965         #                          faces in the sections. Size of this list must be equal
3966         #                          to size of list of base shapes.
3967         #  @param theLocations - list of locations on the path corresponding
3968         #                        specified list of the Bases shapes. Number of locations
3969         #                        should be equal to number of bases. First and last
3970         #                        locations must be coincided with first and last vertexes
3971         #                        of path correspondingly.
3972         #  @param thePath - Path shape to extrude the base shape along it.
3973         #  @param theWithContact - the mode defining that the section is translated to be in
3974         #                          contact with the spine.
3975         #  @param theWithCorrection - defining that the section is rotated to be
3976         #                             orthogonal to the spine tangent in the correspondent point
3977         #  @param theName Object name; when specified, this parameter is used
3978         #         for result publication in the study. Otherwise, if automatic
3979         #         publication is switched on, default value is used for result name.
3980         #
3981         #  @return New GEOM.GEOM_Object, containing the created solids.
3982         #
3983         #  @ref tui_creation_pipe_with_shell_sec "Example"
3984         @ManageTransactions("PrimOp")
3985         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3986                                       theLocations, thePath,
3987                                       theWithContact, theWithCorrection, theName=None):
3988             """
3989             Create a shape by extrusion of the profile shape along
3990             the path shape. The path shape can be a wire or a edge.
3991             the several profiles can be specified in the several locations of path.
3992
3993             Parameters:
3994                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3995                               shell or face. If number of faces in neighbour sections
3996                               aren't coincided result solid between such sections will
3997                               be created using external boundaries of this shells.
3998                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3999                                  This list is used for searching correspondences between
4000                                  faces in the sections. Size of this list must be equal
4001                                  to size of list of base shapes.
4002                 theLocations - list of locations on the path corresponding
4003                                specified list of the Bases shapes. Number of locations
4004                                should be equal to number of bases. First and last
4005                                locations must be coincided with first and last vertexes
4006                                of path correspondingly.
4007                 thePath - Path shape to extrude the base shape along it.
4008                 theWithContact - the mode defining that the section is translated to be in
4009                                  contact with the spine (0/1)
4010                 theWithCorrection - defining that the section is rotated to be
4011                                     orthogonal to the spine tangent in the correspondent point (0/1)
4012                 theName Object name; when specified, this parameter is used
4013                         for result publication in the study. Otherwise, if automatic
4014                         publication is switched on, default value is used for result name.
4015
4016             Returns:
4017                 New GEOM.GEOM_Object, containing the created solids.
4018             """
4019             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4020                                                           theLocations, thePath,
4021                                                           theWithContact, theWithCorrection)
4022             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4023             self._autoPublish(anObj, theName, "pipe")
4024             return anObj
4025
4026         ## Create a shape by extrusion of the profile shape along
4027         #  the path shape. This function is used only for debug pipe
4028         #  functionality - it is a version of function MakePipeWithShellSections()
4029         #  which give a possibility to recieve information about
4030         #  creating pipe between each pair of sections step by step.
4031         @ManageTransactions("PrimOp")
4032         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4033                                              theLocations, thePath,
4034                                              theWithContact, theWithCorrection, theName=None):
4035             """
4036             Create a shape by extrusion of the profile shape along
4037             the path shape. This function is used only for debug pipe
4038             functionality - it is a version of previous function
4039             geompy.MakePipeWithShellSections() which give a possibility to
4040             recieve information about creating pipe between each pair of
4041             sections step by step.
4042             """
4043             res = []
4044             nbsect = len(theSeqBases)
4045             nbsubsect = len(theSeqSubBases)
4046             #print "nbsect = ",nbsect
4047             for i in range(1,nbsect):
4048                 #print "  i = ",i
4049                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4050                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4051                 tmpSeqSubBases = []
4052                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4053                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4054                                                               tmpLocations, thePath,
4055                                                               theWithContact, theWithCorrection)
4056                 if self.PrimOp.IsDone() == 0:
4057                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4058                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4059                     break
4060                 else:
4061                     print "Pipe between ",i," and ",i+1," sections is OK"
4062                     res.append(anObj)
4063                     pass
4064                 pass
4065
4066             resc = self.MakeCompound(res)
4067             #resc = self.MakeSewing(res, 0.001)
4068             #print "resc: ",resc
4069             self._autoPublish(resc, theName, "pipe")
4070             return resc
4071
4072         ## Create solids between given sections
4073         #  @param theSeqBases - list of sections (shell or face).
4074         #  @param theLocations - list of corresponding vertexes
4075         #  @param theName Object name; when specified, this parameter is used
4076         #         for result publication in the study. Otherwise, if automatic
4077         #         publication is switched on, default value is used for result name.
4078         #
4079         #  @return New GEOM.GEOM_Object, containing the created solids.
4080         #
4081         #  @ref tui_creation_pipe_without_path "Example"
4082         @ManageTransactions("PrimOp")
4083         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
4084             """
4085             Create solids between given sections
4086
4087             Parameters:
4088                 theSeqBases - list of sections (shell or face).
4089                 theLocations - list of corresponding vertexes
4090                 theName Object name; when specified, this parameter is used
4091                         for result publication in the study. Otherwise, if automatic
4092                         publication is switched on, default value is used for result name.
4093
4094             Returns:
4095                 New GEOM.GEOM_Object, containing the created solids.
4096             """
4097             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
4098             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4099             self._autoPublish(anObj, theName, "pipe")
4100             return anObj
4101
4102         ## Create a shape by extrusion of the base shape along
4103         #  the path shape with constant bi-normal direction along the given vector.
4104         #  The path shape can be a wire or an edge.
4105         #  @param theBase Base shape to be extruded.
4106         #  @param thePath Path shape to extrude the base shape along it.
4107         #  @param theVec Vector defines a constant binormal direction to keep the
4108         #                same angle beetween the direction and the sections
4109         #                along the sweep surface.
4110         #  @param theName Object name; when specified, this parameter is used
4111         #         for result publication in the study. Otherwise, if automatic
4112         #         publication is switched on, default value is used for result name.
4113         #
4114         #  @return New GEOM.GEOM_Object, containing the created pipe.
4115         #
4116         #  @ref tui_creation_pipe "Example"
4117         @ManageTransactions("PrimOp")
4118         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4119             """
4120             Create a shape by extrusion of the base shape along
4121             the path shape with constant bi-normal direction along the given vector.
4122             The path shape can be a wire or an edge.
4123
4124             Parameters:
4125                 theBase Base shape to be extruded.
4126                 thePath Path shape to extrude the base shape along it.
4127                 theVec Vector defines a constant binormal direction to keep the
4128                        same angle beetween the direction and the sections
4129                        along the sweep surface.
4130                 theName Object name; when specified, this parameter is used
4131                         for result publication in the study. Otherwise, if automatic
4132                         publication is switched on, default value is used for result name.
4133
4134             Returns:
4135                 New GEOM.GEOM_Object, containing the created pipe.
4136             """
4137             # Example: see GEOM_TestAll.py
4138             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4139             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4140             self._autoPublish(anObj, theName, "pipe")
4141             return anObj
4142
4143         ## Makes a thick solid from a face or a shell
4144         #  @param theShape Face or Shell to be thicken
4145         #  @param theThickness Thickness of the resulting solid
4146         #  @param theName Object name; when specified, this parameter is used
4147         #         for result publication in the study. Otherwise, if automatic
4148         #         publication is switched on, default value is used for result name.
4149         #
4150         #  @return New GEOM.GEOM_Object, containing the created solid
4151         #
4152         @ManageTransactions("PrimOp")
4153         def MakeThickSolid(self, theShape, theThickness, theName=None):
4154             """
4155             Make a thick solid from a face or a shell
4156
4157             Parameters:
4158                  theShape Face or Shell to be thicken
4159                  theThickness Thickness of the resulting solid
4160                  theName Object name; when specified, this parameter is used
4161                  for result publication in the study. Otherwise, if automatic
4162                  publication is switched on, default value is used for result name.
4163
4164             Returns:
4165                 New GEOM.GEOM_Object, containing the created solid
4166             """
4167             # Example: see GEOM_TestAll.py
4168             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4169             RaiseIfFailed("MakeThickening", self.PrimOp)
4170             self._autoPublish(anObj, theName, "pipe")
4171             return anObj
4172
4173
4174         ## Modifies a face or a shell to make it a thick solid
4175         #  @param theShape Face or Shell to be thicken
4176         #  @param theThickness Thickness of the resulting solid
4177         #
4178         #  @return The modified shape
4179         #
4180         @ManageTransactions("PrimOp")
4181         def Thicken(self, theShape, theThickness):
4182             """
4183             Modifies a face or a shell to make it a thick solid
4184
4185             Parameters:
4186                 theBase Base shape to be extruded.
4187                 thePath Path shape to extrude the base shape along it.
4188                 theName Object name; when specified, this parameter is used
4189                         for result publication in the study. Otherwise, if automatic
4190                         publication is switched on, default value is used for result name.
4191
4192             Returns:
4193                 The modified shape
4194             """
4195             # Example: see GEOM_TestAll.py
4196             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4197             RaiseIfFailed("MakeThickening", self.PrimOp)
4198             return anObj
4199
4200         ## Build a middle path of a pipe-like shape.
4201         #  The path shape can be a wire or an edge.
4202         #  @param theShape It can be closed or unclosed pipe-like shell
4203         #                  or a pipe-like solid.
4204         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4205         #                            should be wires or faces of theShape.
4206         #  @param theName Object name; when specified, this parameter is used
4207         #         for result publication in the study. Otherwise, if automatic
4208         #         publication is switched on, default value is used for result name.
4209         #
4210         #  @note It is not assumed that exact or approximate copy of theShape
4211         #        can be obtained by applying existing Pipe operation on the
4212         #        resulting "Path" wire taking theBase1 as the base - it is not
4213         #        always possible; though in some particular cases it might work
4214         #        it is not guaranteed. Thus, RestorePath function should not be
4215         #        considered as an exact reverse operation of the Pipe.
4216         #
4217         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4218         #                                source pipe's "path".
4219         #
4220         #  @ref tui_creation_pipe_path "Example"
4221         @ManageTransactions("PrimOp")
4222         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4223             """
4224             Build a middle path of a pipe-like shape.
4225             The path shape can be a wire or an edge.
4226
4227             Parameters:
4228                 theShape It can be closed or unclosed pipe-like shell
4229                          or a pipe-like solid.
4230                 theBase1, theBase2 Two bases of the supposed pipe. This
4231                                    should be wires or faces of theShape.
4232                 theName Object name; when specified, this parameter is used
4233                         for result publication in the study. Otherwise, if automatic
4234                         publication is switched on, default value is used for result name.
4235
4236             Returns:
4237                 New GEOM_Object, containing an edge or wire that represent
4238                                  source pipe's path.
4239             """
4240             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4241             RaiseIfFailed("RestorePath", self.PrimOp)
4242             self._autoPublish(anObj, theName, "path")
4243             return anObj
4244
4245         ## Build a middle path of a pipe-like shape.
4246         #  The path shape can be a wire or an edge.
4247         #  @param theShape It can be closed or unclosed pipe-like shell
4248         #                  or a pipe-like solid.
4249         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4250         #                                should be lists of edges of theShape.
4251         #  @param theName Object name; when specified, this parameter is used
4252         #         for result publication in the study. Otherwise, if automatic
4253         #         publication is switched on, default value is used for result name.
4254         #
4255         #  @note It is not assumed that exact or approximate copy of theShape
4256         #        can be obtained by applying existing Pipe operation on the
4257         #        resulting "Path" wire taking theBase1 as the base - it is not
4258         #        always possible; though in some particular cases it might work
4259         #        it is not guaranteed. Thus, RestorePath function should not be
4260         #        considered as an exact reverse operation of the Pipe.
4261         #
4262         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4263         #                                source pipe's "path".
4264         #
4265         #  @ref tui_creation_pipe_path "Example"
4266         @ManageTransactions("PrimOp")
4267         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4268             """
4269             Build a middle path of a pipe-like shape.
4270             The path shape can be a wire or an edge.
4271
4272             Parameters:
4273                 theShape It can be closed or unclosed pipe-like shell
4274                          or a pipe-like solid.
4275                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4276                                        should be lists of edges of theShape.
4277                 theName Object name; when specified, this parameter is used
4278                         for result publication in the study. Otherwise, if automatic
4279                         publication is switched on, default value is used for result name.
4280
4281             Returns:
4282                 New GEOM_Object, containing an edge or wire that represent
4283                                  source pipe's path.
4284             """
4285             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4286             RaiseIfFailed("RestorePath", self.PrimOp)
4287             self._autoPublish(anObj, theName, "path")
4288             return anObj
4289
4290         # end of l3_complex
4291         ## @}
4292
4293         ## @addtogroup l3_advanced
4294         ## @{
4295
4296         ## Create a linear edge with specified ends.
4297         #  @param thePnt1 Point for the first end of edge.
4298         #  @param thePnt2 Point for the second end of edge.
4299         #  @param theName Object name; when specified, this parameter is used
4300         #         for result publication in the study. Otherwise, if automatic
4301         #         publication is switched on, default value is used for result name.
4302         #
4303         #  @return New GEOM.GEOM_Object, containing the created edge.
4304         #
4305         #  @ref tui_creation_edge "Example"
4306         @ManageTransactions("ShapesOp")
4307         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4308             """
4309             Create a linear edge with specified ends.
4310
4311             Parameters:
4312                 thePnt1 Point for the first end of edge.
4313                 thePnt2 Point for the second end of edge.
4314                 theName Object name; when specified, this parameter is used
4315                         for result publication in the study. Otherwise, if automatic
4316                         publication is switched on, default value is used for result name.
4317
4318             Returns:
4319                 New GEOM.GEOM_Object, containing the created edge.
4320             """
4321             # Example: see GEOM_TestAll.py
4322             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4323             RaiseIfFailed("MakeEdge", self.ShapesOp)
4324             self._autoPublish(anObj, theName, "edge")
4325             return anObj
4326
4327         ## Create a new edge, corresponding to the given length on the given curve.
4328         #  @param theRefCurve The referenced curve (edge).
4329         #  @param theLength Length on the referenced curve. It can be negative.
4330         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4331         #                       at the end of \a theRefCurve, close to the selected point.
4332         #                       If None, start from the first point of \a theRefCurve.
4333         #  @param theName Object name; when specified, this parameter is used
4334         #         for result publication in the study. Otherwise, if automatic
4335         #         publication is switched on, default value is used for result name.
4336         #
4337         #  @return New GEOM.GEOM_Object, containing the created edge.
4338         #
4339         #  @ref tui_creation_edge "Example"
4340         @ManageTransactions("ShapesOp")
4341         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4342             """
4343             Create a new edge, corresponding to the given length on the given curve.
4344
4345             Parameters:
4346                 theRefCurve The referenced curve (edge).
4347                 theLength Length on the referenced curve. It can be negative.
4348                 theStartPoint Any point can be selected for it, the new edge will begin
4349                               at the end of theRefCurve, close to the selected point.
4350                               If None, start from the first point of theRefCurve.
4351                 theName Object name; when specified, this parameter is used
4352                         for result publication in the study. Otherwise, if automatic
4353                         publication is switched on, default value is used for result name.
4354
4355             Returns:
4356                 New GEOM.GEOM_Object, containing the created edge.
4357             """
4358             # Example: see GEOM_TestAll.py
4359             theLength, Parameters = ParseParameters(theLength)
4360             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4361             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4362             anObj.SetParameters(Parameters)
4363             self._autoPublish(anObj, theName, "edge")
4364             return anObj
4365
4366         ## Create an edge from specified wire.
4367         #  @param theWire source Wire
4368         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4369         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4370         #  @param theName Object name; when specified, this parameter is used
4371         #         for result publication in the study. Otherwise, if automatic
4372         #         publication is switched on, default value is used for result name.
4373         #
4374         #  @return New GEOM.GEOM_Object, containing the created edge.
4375         #
4376         #  @ref tui_creation_edge "Example"
4377         @ManageTransactions("ShapesOp")
4378         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4379             """
4380             Create an edge from specified wire.
4381
4382             Parameters:
4383                 theWire source Wire
4384                 theLinearTolerance linear tolerance value (default = 1e-07)
4385                 theAngularTolerance angular tolerance value (default = 1e-12)
4386                 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             Returns:
4391                 New GEOM.GEOM_Object, containing the created edge.
4392             """
4393             # Example: see GEOM_TestAll.py
4394             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4395             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4396             self._autoPublish(anObj, theName, "edge")
4397             return anObj
4398
4399         ## Create a wire from the set of edges and wires.
4400         #  @param theEdgesAndWires List of edges and/or wires.
4401         #  @param theTolerance Maximum distance between vertices, that will be merged.
4402         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4403         #  @param theName Object name; when specified, this parameter is used
4404         #         for result publication in the study. Otherwise, if automatic
4405         #         publication is switched on, default value is used for result name.
4406         #
4407         #  @return New GEOM.GEOM_Object, containing the created wire.
4408         #
4409         #  @ref tui_creation_wire "Example"
4410         @ManageTransactions("ShapesOp")
4411         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4412             """
4413             Create a wire from the set of edges and wires.
4414
4415             Parameters:
4416                 theEdgesAndWires List of edges and/or wires.
4417                 theTolerance Maximum distance between vertices, that will be merged.
4418                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4419                 theName Object name; when specified, this parameter is used
4420                         for result publication in the study. Otherwise, if automatic
4421                         publication is switched on, default value is used for result name.
4422
4423             Returns:
4424                 New GEOM.GEOM_Object, containing the created wire.
4425             """
4426             # Example: see GEOM_TestAll.py
4427             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4428             RaiseIfFailed("MakeWire", self.ShapesOp)
4429             self._autoPublish(anObj, theName, "wire")
4430             return anObj
4431
4432         ## Create a face on the given wire.
4433         #  @param theWire closed Wire or Edge to build the face on.
4434         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4435         #                        If the tolerance of the obtained planar face is less
4436         #                        than 1e-06, this face will be returned, otherwise the
4437         #                        algorithm tries to build any suitable face on the given
4438         #                        wire and prints a warning message.
4439         #  @param theName Object name; when specified, this parameter is used
4440         #         for result publication in the study. Otherwise, if automatic
4441         #         publication is switched on, default value is used for result name.
4442         #
4443         #  @return New GEOM.GEOM_Object, containing the created face.
4444         #
4445         #  @ref tui_creation_face "Example"
4446         @ManageTransactions("ShapesOp")
4447         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4448             """
4449             Create a face on the given wire.
4450
4451             Parameters:
4452                 theWire closed Wire or Edge to build the face on.
4453                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4454                                If the tolerance of the obtained planar face is less
4455                                than 1e-06, this face will be returned, otherwise the
4456                                algorithm tries to build any suitable face on the given
4457                                wire and prints a warning message.
4458                 theName Object name; when specified, this parameter is used
4459                         for result publication in the study. Otherwise, if automatic
4460                         publication is switched on, default value is used for result name.
4461
4462             Returns:
4463                 New GEOM.GEOM_Object, containing the created face.
4464             """
4465             # Example: see GEOM_TestAll.py
4466             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4467             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4468                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4469             else:
4470                 RaiseIfFailed("MakeFace", self.ShapesOp)
4471             self._autoPublish(anObj, theName, "face")
4472             return anObj
4473
4474         ## Create a face on the given wires set.
4475         #  @param theWires List of closed wires or edges to build the face on.
4476         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4477         #                        If the tolerance of the obtained planar face is less
4478         #                        than 1e-06, this face will be returned, otherwise the
4479         #                        algorithm tries to build any suitable face on the given
4480         #                        wire and prints a warning message.
4481         #  @param theName Object name; when specified, this parameter is used
4482         #         for result publication in the study. Otherwise, if automatic
4483         #         publication is switched on, default value is used for result name.
4484         #
4485         #  @return New GEOM.GEOM_Object, containing the created face.
4486         #
4487         #  @ref tui_creation_face "Example"
4488         @ManageTransactions("ShapesOp")
4489         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4490             """
4491             Create a face on the given wires set.
4492
4493             Parameters:
4494                 theWires List of closed wires or edges to build the face on.
4495                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4496                                If the tolerance of the obtained planar face is less
4497                                than 1e-06, this face will be returned, otherwise the
4498                                algorithm tries to build any suitable face on the given
4499                                wire and prints a warning message.
4500                 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             Returns:
4505                 New GEOM.GEOM_Object, containing the created face.
4506             """
4507             # Example: see GEOM_TestAll.py
4508             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4509             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4510                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4511             else:
4512                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4513             self._autoPublish(anObj, theName, "face")
4514             return anObj
4515
4516         ## See MakeFaceWires() method for details.
4517         #
4518         #  @ref tui_creation_face "Example 1"
4519         #  \n @ref swig_MakeFaces  "Example 2"
4520         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4521             """
4522             See geompy.MakeFaceWires() method for details.
4523             """
4524             # Example: see GEOM_TestOthers.py
4525             # note: auto-publishing is done in self.MakeFaceWires()
4526             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4527             return anObj
4528
4529         ## Create a face based on a surface from given face bounded
4530         #  by given wire.
4531         #  @param theFace the face whose surface is used to create a new face.
4532         #  @param theWire the wire that will bound a new face.
4533         #  @param theName Object name; when specified, this parameter is used
4534         #         for result publication in the study. Otherwise, if automatic
4535         #         publication is switched on, default value is used for result name.
4536         #
4537         #  @return New GEOM.GEOM_Object, containing the created face.
4538         #
4539         #  @ref tui_creation_face "Example"
4540         @ManageTransactions("ShapesOp")
4541         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4542             """
4543             Create a face based on a surface from given face bounded
4544             by given wire.
4545
4546             Parameters:
4547                 theFace the face whose surface is used to create a new face.
4548                 theWire the wire that will bound a new face.
4549                 theName Object name; when specified, this parameter is used
4550                         for result publication in the study. Otherwise, if automatic
4551                         publication is switched on, default value is used for result name.
4552
4553             Returns:
4554                 New GEOM.GEOM_Object, containing the created face.
4555             """
4556             # Example: see GEOM_TestAll.py
4557             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4558             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4559             self._autoPublish(anObj, theName, "face")
4560             return anObj
4561           
4562         ## Create a face from a set of edges with the given constraints.
4563         #  @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4564         #         - edges should form a closed wire;
4565         #         - for each edge, constraint face is optional: if a constraint face is missing
4566         #           for some edge, this means that there no constraint associated with this edge.
4567         #  @param theName Object name; when specified, this parameter is used
4568         #         for result publication in the study. Otherwise, if automatic
4569         #         publication is switched on, default value is used for result name.
4570         # 
4571         # @return New GEOM.GEOM_Object, containing the created face.
4572         # 
4573         # @ref tui_creation_face "Example"
4574         @ManageTransactions("ShapesOp")
4575         def MakeFaceWithConstraints(self, theConstraints, theName=None):
4576             """
4577             Create a face from a set of edges with the given constraints.
4578
4579             Parameters:
4580                 theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
4581                         - edges should form a closed wire;
4582                         - for each edge, constraint face is optional: if a constraint face is missing
4583                           for some edge, this means that there no constraint associated with this edge.
4584                 theName Object name; when specified, this parameter is used
4585                         for result publication in the study. Otherwise, if automatic
4586                         publication is switched on, default value is used for result name.
4587
4588             Returns:
4589                 New GEOM.GEOM_Object, containing the created face.
4590             """
4591             # Example: see GEOM_TestAll.py
4592             anObj = self.ShapesOp.MakeFaceWithConstraints(theConstraints)
4593             if anObj is None:
4594                 RaiseIfFailed("MakeFaceWithConstraints", self.ShapesOp)
4595             self._autoPublish(anObj, theName, "face")
4596             return anObj
4597
4598         ## Create a shell from the set of faces and shells.
4599         #  @param theFacesAndShells List of faces and/or shells.
4600         #  @param theName Object name; when specified, this parameter is used
4601         #         for result publication in the study. Otherwise, if automatic
4602         #         publication is switched on, default value is used for result name.
4603         #
4604         #  @return New GEOM.GEOM_Object, containing the created shell.
4605         #
4606         #  @ref tui_creation_shell "Example"
4607         @ManageTransactions("ShapesOp")
4608         def MakeShell(self, theFacesAndShells, theName=None):
4609             """
4610             Create a shell from the set of faces and shells.
4611
4612             Parameters:
4613                 theFacesAndShells List of faces and/or shells.
4614                 theName Object name; when specified, this parameter is used
4615                         for result publication in the study. Otherwise, if automatic
4616                         publication is switched on, default value is used for result name.
4617
4618             Returns:
4619                 New GEOM.GEOM_Object, containing the created shell.
4620             """
4621             # Example: see GEOM_TestAll.py
4622             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4623             RaiseIfFailed("MakeShell", self.ShapesOp)
4624             self._autoPublish(anObj, theName, "shell")
4625             return anObj
4626
4627         ## Create a solid, bounded by the given shells.
4628         #  @param theShells Sequence of bounding shells.
4629         #  @param theName Object name; when specified, this parameter is used
4630         #         for result publication in the study. Otherwise, if automatic
4631         #         publication is switched on, default value is used for result name.
4632         #
4633         #  @return New GEOM.GEOM_Object, containing the created solid.
4634         #
4635         #  @ref tui_creation_solid "Example"
4636         @ManageTransactions("ShapesOp")
4637         def MakeSolid(self, theShells, theName=None):
4638             """
4639             Create a solid, bounded by the given shells.
4640
4641             Parameters:
4642                 theShells Sequence of bounding shells.
4643                 theName Object name; when specified, this parameter is used
4644                         for result publication in the study. Otherwise, if automatic
4645                         publication is switched on, default value is used for result name.
4646
4647             Returns:
4648                 New GEOM.GEOM_Object, containing the created solid.
4649             """
4650             # Example: see GEOM_TestAll.py
4651             theShells = ToList(theShells)
4652             if len(theShells) == 1:
4653                 descr = self._IsGoodForSolid(theShells[0])
4654                 #if len(descr) > 0:
4655                 #    raise RuntimeError, "MakeSolidShells : " + descr
4656                 if descr == "WRN_SHAPE_UNCLOSED":
4657                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4658             anObj = self.ShapesOp.MakeSolidShells(theShells)
4659             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4660             self._autoPublish(anObj, theName, "solid")
4661             return anObj
4662
4663         ## Create a compound of the given shapes.
4664         #  @param theShapes List of shapes to put in compound.
4665         #  @param theName Object name; when specified, this parameter is used
4666         #         for result publication in the study. Otherwise, if automatic
4667         #         publication is switched on, default value is used for result name.
4668         #
4669         #  @return New GEOM.GEOM_Object, containing the created compound.
4670         #
4671         #  @ref tui_creation_compound "Example"
4672         @ManageTransactions("ShapesOp")
4673         def MakeCompound(self, theShapes, theName=None):
4674             """
4675             Create a compound of the given shapes.
4676
4677             Parameters:
4678                 theShapes List of shapes to put in compound.
4679                 theName Object name; when specified, this parameter is used
4680                         for result publication in the study. Otherwise, if automatic
4681                         publication is switched on, default value is used for result name.
4682
4683             Returns:
4684                 New GEOM.GEOM_Object, containing the created compound.
4685             """
4686             # Example: see GEOM_TestAll.py
4687             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4688             RaiseIfFailed("MakeCompound", self.ShapesOp)
4689             self._autoPublish(anObj, theName, "compound")
4690             return anObj
4691         
4692         ## Create a solid (or solids) from the set of faces and/or shells.
4693         #  @param theFacesOrShells List of faces and/or shells.
4694         #  @param isIntersect If TRUE, forces performing intersections
4695         #         between arguments; otherwise (default) intersection is not performed.
4696         #  @param theName Object name; when specified, this parameter is used
4697         #         for result publication in the study. Otherwise, if automatic
4698         #         publication is switched on, default value is used for result name.
4699         #
4700         #  @return New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4701         #
4702         #  @ref tui_creation_solid_from_faces "Example"
4703         @ManageTransactions("ShapesOp")
4704         def MakeSolidFromConnectedFaces(self, theFacesOrShells, isIntersect = False, theName=None):
4705             """
4706             Create a solid (or solids) from the set of connected faces and/or shells.
4707
4708             Parameters:
4709                 theFacesOrShells List of faces and/or shells.
4710                 isIntersect If TRUE, forces performing intersections
4711                         between arguments; otherwise (default) intersection is not performed
4712                 theName Object name; when specified, this parameter is used.
4713                         for result publication in the study. Otherwise, if automatic
4714                         publication is switched on, default value is used for result name.
4715
4716             Returns:
4717                 New GEOM.GEOM_Object, containing the created solid (or compound of solids).
4718             """
4719             # Example: see GEOM_TestAll.py
4720             anObj = self.ShapesOp.MakeSolidFromConnectedFaces(theFacesOrShells, isIntersect)
4721             RaiseIfFailed("MakeSolidFromConnectedFaces", self.ShapesOp)
4722             self._autoPublish(anObj, theName, "solid")
4723             return anObj
4724
4725         # end of l3_advanced
4726         ## @}
4727
4728         ## @addtogroup l2_measure
4729         ## @{
4730
4731         ## Gives quantity of faces in the given shape.
4732         #  @param theShape Shape to count faces of.
4733         #  @return Quantity of faces.
4734         #
4735         #  @ref swig_NumberOf "Example"
4736         @ManageTransactions("ShapesOp")
4737         def NumberOfFaces(self, theShape):
4738             """
4739             Gives quantity of faces in the given shape.
4740
4741             Parameters:
4742                 theShape Shape to count faces of.
4743
4744             Returns:
4745                 Quantity of faces.
4746             """
4747             # Example: see GEOM_TestOthers.py
4748             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4749             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4750             return nb_faces
4751
4752         ## Gives quantity of edges in the given shape.
4753         #  @param theShape Shape to count edges of.
4754         #  @return Quantity of edges.
4755         #
4756         #  @ref swig_NumberOf "Example"
4757         @ManageTransactions("ShapesOp")
4758         def NumberOfEdges(self, theShape):
4759             """
4760             Gives quantity of edges in the given shape.
4761
4762             Parameters:
4763                 theShape Shape to count edges of.
4764
4765             Returns:
4766                 Quantity of edges.
4767             """
4768             # Example: see GEOM_TestOthers.py
4769             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4770             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4771             return nb_edges
4772
4773         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4774         #  @param theShape Shape to count sub-shapes of.
4775         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4776         #  @return Quantity of sub-shapes of given type.
4777         #
4778         #  @ref swig_NumberOf "Example"
4779         @ManageTransactions("ShapesOp")
4780         def NumberOfSubShapes(self, theShape, theShapeType):
4781             """
4782             Gives quantity of sub-shapes of type theShapeType in the given shape.
4783
4784             Parameters:
4785                 theShape Shape to count sub-shapes of.
4786                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4787
4788             Returns:
4789                 Quantity of sub-shapes of given type.
4790             """
4791             # Example: see GEOM_TestOthers.py
4792             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4793             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4794             return nb_ss
4795
4796         ## Gives quantity of solids in the given shape.
4797         #  @param theShape Shape to count solids in.
4798         #  @return Quantity of solids.
4799         #
4800         #  @ref swig_NumberOf "Example"
4801         @ManageTransactions("ShapesOp")
4802         def NumberOfSolids(self, theShape):
4803             """
4804             Gives quantity of solids in the given shape.
4805
4806             Parameters:
4807                 theShape Shape to count solids in.
4808
4809             Returns:
4810                 Quantity of solids.
4811             """
4812             # Example: see GEOM_TestOthers.py
4813             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4814             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4815             return nb_solids
4816
4817         # end of l2_measure
4818         ## @}
4819
4820         ## @addtogroup l3_healing
4821         ## @{
4822
4823         ## Reverses an orientation the given shape.
4824         #  @param theShape Shape to be reversed.
4825         #  @param theName Object name; when specified, this parameter is used
4826         #         for result publication in the study. Otherwise, if automatic
4827         #         publication is switched on, default value is used for result name.
4828         #
4829         #  @return The reversed copy of theShape.
4830         #
4831         #  @ref swig_ChangeOrientation "Example"
4832         @ManageTransactions("ShapesOp")
4833         def ChangeOrientation(self, theShape, theName=None):
4834             """
4835             Reverses an orientation the given shape.
4836
4837             Parameters:
4838                 theShape Shape to be reversed.
4839                 theName Object name; when specified, this parameter is used
4840                         for result publication in the study. Otherwise, if automatic
4841                         publication is switched on, default value is used for result name.
4842
4843             Returns:
4844                 The reversed copy of theShape.
4845             """
4846             # Example: see GEOM_TestAll.py
4847             anObj = self.ShapesOp.ChangeOrientation(theShape)
4848             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4849             self._autoPublish(anObj, theName, "reversed")
4850             return anObj
4851
4852         ## See ChangeOrientation() method for details.
4853         #
4854         #  @ref swig_OrientationChange "Example"
4855         def OrientationChange(self, theShape, theName=None):
4856             """
4857             See geompy.ChangeOrientation method for details.
4858             """
4859             # Example: see GEOM_TestOthers.py
4860             # note: auto-publishing is done in self.ChangeOrientation()
4861             anObj = self.ChangeOrientation(theShape, theName)
4862             return anObj
4863
4864         # end of l3_healing
4865         ## @}
4866
4867         ## @addtogroup l4_obtain
4868         ## @{
4869
4870         ## Retrieve all free faces from the given shape.
4871         #  Free face is a face, which is not shared between two shells of the shape.
4872         #  @param theShape Shape to find free faces in.
4873         #  @return List of IDs of all free faces, contained in theShape.
4874         #
4875         #  @ref tui_free_faces_page "Example"
4876         @ManageTransactions("ShapesOp")
4877         def GetFreeFacesIDs(self,theShape):
4878             """
4879             Retrieve all free faces from the given shape.
4880             Free face is a face, which is not shared between two shells of the shape.
4881
4882             Parameters:
4883                 theShape Shape to find free faces in.
4884
4885             Returns:
4886                 List of IDs of all free faces, contained in theShape.
4887             """
4888             # Example: see GEOM_TestOthers.py
4889             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4890             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4891             return anIDs
4892
4893         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4894         #  @param theShape1 Shape to find sub-shapes in.
4895         #  @param theShape2 Shape to find shared sub-shapes with.
4896         #  @param theShapeType Type of sub-shapes to be retrieved.
4897         #  @param theName Object name; when specified, this parameter is used
4898         #         for result publication in the study. Otherwise, if automatic
4899         #         publication is switched on, default value is used for result name.
4900         #
4901         #  @return List of sub-shapes of theShape1, shared with theShape2.
4902         #
4903         #  @ref swig_GetSharedShapes "Example"
4904         @ManageTransactions("ShapesOp")
4905         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4906             """
4907             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4908
4909             Parameters:
4910                 theShape1 Shape to find sub-shapes in.
4911                 theShape2 Shape to find shared sub-shapes with.
4912                 theShapeType Type of sub-shapes to be retrieved.
4913                 theName Object name; when specified, this parameter is used
4914                         for result publication in the study. Otherwise, if automatic
4915                         publication is switched on, default value is used for result name.
4916
4917             Returns:
4918                 List of sub-shapes of theShape1, shared with theShape2.
4919             """
4920             # Example: see GEOM_TestOthers.py
4921             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4922             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4923             self._autoPublish(aList, theName, "shared")
4924             return aList
4925
4926         ## Get sub-shapes, shared by input shapes.
4927         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
4928         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()).
4929         #  @param theMultiShare Specifies what type of shares should be checked:
4930         #         - @c True (default): search sub-shapes from 1st input shape shared with all other input shapes;
4931         #         - @c False: causes to search sub-shapes shared between couples of input shapes.
4932         #  @param theName Object name; when specified, this parameter is used
4933         #         for result publication in the study. Otherwise, if automatic
4934         #         publication is switched on, default value is used for result name.
4935         #
4936         #  @note If @a theShapes contains single compound, the shares between all possible couples of 
4937         #        its top-level shapes are returned; otherwise, only shares between 1st input shape
4938         #        and all rest input shapes are returned.
4939         #
4940         #  @return List of all found sub-shapes.
4941         #
4942         #  Examples:
4943         #  - @ref tui_shared_shapes "Example 1"
4944         #  - @ref swig_GetSharedShapes "Example 2"
4945         @ManageTransactions("ShapesOp")
4946         def GetSharedShapesMulti(self, theShapes, theShapeType, theMultiShare=True, theName=None):
4947             """
4948             Get sub-shapes, shared by input shapes.
4949
4950             Parameters:
4951                 theShapes Either a list or compound of shapes to find common sub-shapes of.
4952                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType).
4953                 theMultiShare Specifies what type of shares should be checked:
4954                   - True (default): search sub-shapes from 1st input shape shared with all other input shapes;
4955                   - False: causes to search sub-shapes shared between couples of input shapes.
4956                 theName Object name; when specified, this parameter is used
4957                         for result publication in the study. Otherwise, if automatic
4958                         publication is switched on, default value is used for result name.
4959
4960             Note: if theShapes contains single compound, the shares between all possible couples of 
4961                   its top-level shapes are returned; otherwise, only shares between 1st input shape
4962                   and all rest input shapes are returned.
4963
4964             Returns:
4965                 List of all found sub-shapes.
4966             """
4967             # Example: see GEOM_TestOthers.py
4968             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType, theMultiShare)
4969             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4970             self._autoPublish(aList, theName, "shared")
4971             return aList
4972
4973         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4974         #  situated relatively the specified plane by the certain way,
4975         #  defined through <VAR>theState</VAR> parameter.
4976         #  @param theShape Shape to find sub-shapes of.
4977         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4978         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4979         #                direction and location of the plane to find shapes on.
4980         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4981         #  @param theName Object name; when specified, this parameter is used
4982         #         for result publication in the study. Otherwise, if automatic
4983         #         publication is switched on, default value is used for result name.
4984         #
4985         #  @return List of all found sub-shapes.
4986         #
4987         #  @ref swig_GetShapesOnPlane "Example"
4988         @ManageTransactions("ShapesOp")
4989         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4990             """
4991             Find in theShape all sub-shapes of type theShapeType,
4992             situated relatively the specified plane by the certain way,
4993             defined through theState parameter.
4994
4995             Parameters:
4996                 theShape Shape to find sub-shapes of.
4997                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4998                 theAx1 Vector (or line, or linear edge), specifying normal
4999                        direction and location of the plane to find shapes on.
5000                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5001                 theName Object name; when specified, this parameter is used
5002                         for result publication in the study. Otherwise, if automatic
5003                         publication is switched on, default value is used for result name.
5004
5005             Returns:
5006                 List of all found sub-shapes.
5007             """
5008             # Example: see GEOM_TestOthers.py
5009             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
5010             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
5011             self._autoPublish(aList, theName, "shapeOnPlane")
5012             return aList
5013
5014         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5015         #  situated relatively the specified plane by the certain way,
5016         #  defined through <VAR>theState</VAR> parameter.
5017         #  @param theShape Shape to find sub-shapes of.
5018         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5019         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5020         #                direction and location of the plane to find shapes on.
5021         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5022         #
5023         #  @return List of all found sub-shapes indices.
5024         #
5025         #  @ref swig_GetShapesOnPlaneIDs "Example"
5026         @ManageTransactions("ShapesOp")
5027         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
5028             """
5029             Find in theShape all sub-shapes of type theShapeType,
5030             situated relatively the specified plane by the certain way,
5031             defined through theState parameter.
5032
5033             Parameters:
5034                 theShape Shape to find sub-shapes of.
5035                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5036                 theAx1 Vector (or line, or linear edge), specifying normal
5037                        direction and location of the plane to find shapes on.
5038                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5039
5040             Returns:
5041                 List of all found sub-shapes indices.
5042             """
5043             # Example: see GEOM_TestOthers.py
5044             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
5045             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
5046             return aList
5047
5048         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5049         #  situated relatively the specified plane by the certain way,
5050         #  defined through <VAR>theState</VAR> parameter.
5051         #  @param theShape Shape to find sub-shapes of.
5052         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5053         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5054         #                direction of the plane to find shapes on.
5055         #  @param thePnt Point specifying location of the plane to find shapes on.
5056         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5057         #  @param theName Object name; when specified, this parameter is used
5058         #         for result publication in the study. Otherwise, if automatic
5059         #         publication is switched on, default value is used for result name.
5060         #
5061         #  @return List of all found sub-shapes.
5062         #
5063         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
5064         @ManageTransactions("ShapesOp")
5065         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
5066             """
5067             Find in theShape all sub-shapes of type theShapeType,
5068             situated relatively the specified plane by the certain way,
5069             defined through theState parameter.
5070
5071             Parameters:
5072                 theShape Shape to find sub-shapes of.
5073                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5074                 theAx1 Vector (or line, or linear edge), specifying normal
5075                        direction and location of the plane to find shapes on.
5076                 thePnt Point specifying location of the plane to find shapes on.
5077                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5078                 theName Object name; when specified, this parameter is used
5079                         for result publication in the study. Otherwise, if automatic
5080                         publication is switched on, default value is used for result name.
5081
5082             Returns:
5083                 List of all found sub-shapes.
5084             """
5085             # Example: see GEOM_TestOthers.py
5086             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
5087                                                                theAx1, thePnt, theState)
5088             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5089             self._autoPublish(aList, theName, "shapeOnPlane")
5090             return aList
5091
5092         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5093         #  situated relatively the specified plane by the certain way,
5094         #  defined through <VAR>theState</VAR> parameter.
5095         #  @param theShape Shape to find sub-shapes of.
5096         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5097         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5098         #                direction of the plane to find shapes on.
5099         #  @param thePnt Point specifying location of the plane to find shapes on.
5100         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5101         #
5102         #  @return List of all found sub-shapes indices.
5103         #
5104         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5105         @ManageTransactions("ShapesOp")
5106         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5107             """
5108             Find in theShape all sub-shapes of type theShapeType,
5109             situated relatively the specified plane by the certain way,
5110             defined through theState parameter.
5111
5112             Parameters:
5113                 theShape Shape to find sub-shapes of.
5114                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5115                 theAx1 Vector (or line, or linear edge), specifying normal
5116                        direction and location of the plane to find shapes on.
5117                 thePnt Point specifying location of the plane to find shapes on.
5118                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5119
5120             Returns:
5121                 List of all found sub-shapes indices.
5122             """
5123             # Example: see GEOM_TestOthers.py
5124             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5125                                                                   theAx1, thePnt, theState)
5126             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5127             return aList
5128
5129         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5130         #  the specified cylinder by the certain way, defined through \a theState parameter.
5131         #  @param theShape Shape to find sub-shapes of.
5132         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5133         #  @param theAxis Vector (or line, or linear edge), specifying
5134         #                 axis of the cylinder to find shapes on.
5135         #  @param theRadius Radius of the cylinder to find shapes on.
5136         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5137         #  @param theName Object name; when specified, this parameter is used
5138         #         for result publication in the study. Otherwise, if automatic
5139         #         publication is switched on, default value is used for result name.
5140         #
5141         #  @return List of all found sub-shapes.
5142         #
5143         #  @ref swig_GetShapesOnCylinder "Example"
5144         @ManageTransactions("ShapesOp")
5145         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5146             """
5147             Find in theShape all sub-shapes of type theShapeType, situated relatively
5148             the specified cylinder by the certain way, defined through theState parameter.
5149
5150             Parameters:
5151                 theShape Shape to find sub-shapes of.
5152                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5153                 theAxis Vector (or line, or linear edge), specifying
5154                         axis of the cylinder to find shapes on.
5155                 theRadius Radius of the cylinder to find shapes on.
5156                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5157                 theName Object name; when specified, this parameter is used
5158                         for result publication in the study. Otherwise, if automatic
5159                         publication is switched on, default value is used for result name.
5160
5161             Returns:
5162                 List of all found sub-shapes.
5163             """
5164             # Example: see GEOM_TestOthers.py
5165             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5166             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5167             self._autoPublish(aList, theName, "shapeOnCylinder")
5168             return aList
5169
5170         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5171         #  the specified cylinder by the certain way, defined through \a theState parameter.
5172         #  @param theShape Shape to find sub-shapes of.
5173         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5174         #  @param theAxis Vector (or line, or linear edge), specifying
5175         #                 axis of the cylinder to find shapes on.
5176         #  @param theRadius Radius of the cylinder to find shapes on.
5177         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5178         #
5179         #  @return List of all found sub-shapes indices.
5180         #
5181         #  @ref swig_GetShapesOnCylinderIDs "Example"
5182         @ManageTransactions("ShapesOp")
5183         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5184             """
5185             Find in theShape all sub-shapes of type theShapeType, situated relatively
5186             the specified cylinder by the certain way, defined through theState parameter.
5187
5188             Parameters:
5189                 theShape Shape to find sub-shapes of.
5190                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5191                 theAxis Vector (or line, or linear edge), specifying
5192                         axis of the cylinder to find shapes on.
5193                 theRadius Radius of the cylinder to find shapes on.
5194                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5195
5196             Returns:
5197                 List of all found sub-shapes indices.
5198             """
5199             # Example: see GEOM_TestOthers.py
5200             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5201             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5202             return aList
5203
5204         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5205         #  the specified cylinder by the certain way, defined through \a theState parameter.
5206         #  @param theShape Shape to find sub-shapes of.
5207         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5208         #  @param theAxis Vector (or line, or linear edge), specifying
5209         #                 axis of the cylinder to find shapes on.
5210         #  @param thePnt Point specifying location of the bottom of the cylinder.
5211         #  @param theRadius Radius of the cylinder to find shapes on.
5212         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5213         #  @param theName Object name; when specified, this parameter is used
5214         #         for result publication in the study. Otherwise, if automatic
5215         #         publication is switched on, default value is used for result name.
5216         #
5217         #  @return List of all found sub-shapes.
5218         #
5219         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5220         @ManageTransactions("ShapesOp")
5221         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5222             """
5223             Find in theShape all sub-shapes of type theShapeType, situated relatively
5224             the specified cylinder by the certain way, defined through theState parameter.
5225
5226             Parameters:
5227                 theShape Shape to find sub-shapes of.
5228                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5229                 theAxis Vector (or line, or linear edge), specifying
5230                         axis of the cylinder to find shapes on.
5231                 theRadius Radius of the cylinder to find shapes on.
5232                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5233                 theName Object name; when specified, this parameter is used
5234                         for result publication in the study. Otherwise, if automatic
5235                         publication is switched on, default value is used for result name.
5236
5237             Returns:
5238                 List of all found sub-shapes.
5239             """
5240             # Example: see GEOM_TestOthers.py
5241             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5242             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5243             self._autoPublish(aList, theName, "shapeOnCylinder")
5244             return aList
5245
5246         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5247         #  the specified cylinder by the certain way, defined through \a theState parameter.
5248         #  @param theShape Shape to find sub-shapes of.
5249         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5250         #  @param theAxis Vector (or line, or linear edge), specifying
5251         #                 axis of the cylinder to find shapes on.
5252         #  @param thePnt Point specifying location of the bottom of the cylinder.
5253         #  @param theRadius Radius of the cylinder to find shapes on.
5254         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5255         #
5256         #  @return List of all found sub-shapes indices
5257         #
5258         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5259         @ManageTransactions("ShapesOp")
5260         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5261             """
5262             Find in theShape all sub-shapes of type theShapeType, situated relatively
5263             the specified cylinder by the certain way, defined through theState parameter.
5264
5265             Parameters:
5266                 theShape Shape to find sub-shapes of.
5267                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5268                 theAxis Vector (or line, or linear edge), specifying
5269                         axis of the cylinder to find shapes on.
5270                 theRadius Radius of the cylinder to find shapes on.
5271                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5272
5273             Returns:
5274                 List of all found sub-shapes indices.
5275             """
5276             # Example: see GEOM_TestOthers.py
5277             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5278             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5279             return aList
5280
5281         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5282         #  the specified sphere by the certain way, defined through \a theState parameter.
5283         #  @param theShape Shape to find sub-shapes of.
5284         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5285         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5286         #  @param theRadius Radius of the sphere to find shapes on.
5287         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5288         #  @param theName Object name; when specified, this parameter is used
5289         #         for result publication in the study. Otherwise, if automatic
5290         #         publication is switched on, default value is used for result name.
5291         #
5292         #  @return List of all found sub-shapes.
5293         #
5294         #  @ref swig_GetShapesOnSphere "Example"
5295         @ManageTransactions("ShapesOp")
5296         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5297             """
5298             Find in theShape all sub-shapes of type theShapeType, situated relatively
5299             the specified sphere by the certain way, defined through theState parameter.
5300
5301             Parameters:
5302                 theShape Shape to find sub-shapes of.
5303                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5304                 theCenter Point, specifying center of the sphere to find shapes on.
5305                 theRadius Radius of the sphere to find shapes on.
5306                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5307                 theName Object name; when specified, this parameter is used
5308                         for result publication in the study. Otherwise, if automatic
5309                         publication is switched on, default value is used for result name.
5310
5311             Returns:
5312                 List of all found sub-shapes.
5313             """
5314             # Example: see GEOM_TestOthers.py
5315             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5316             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5317             self._autoPublish(aList, theName, "shapeOnSphere")
5318             return aList
5319
5320         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5321         #  the specified sphere by the certain way, defined through \a theState parameter.
5322         #  @param theShape Shape to find sub-shapes of.
5323         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5324         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5325         #  @param theRadius Radius of the sphere to find shapes on.
5326         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5327         #
5328         #  @return List of all found sub-shapes indices.
5329         #
5330         #  @ref swig_GetShapesOnSphereIDs "Example"
5331         @ManageTransactions("ShapesOp")
5332         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5333             """
5334             Find in theShape all sub-shapes of type theShapeType, situated relatively
5335             the specified sphere by the certain way, defined through theState parameter.
5336
5337             Parameters:
5338                 theShape Shape to find sub-shapes of.
5339                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5340                 theCenter Point, specifying center of the sphere to find shapes on.
5341                 theRadius Radius of the sphere to find shapes on.
5342                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5343
5344             Returns:
5345                 List of all found sub-shapes indices.
5346             """
5347             # Example: see GEOM_TestOthers.py
5348             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5349             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5350             return aList
5351
5352         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5353         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5354         #  @param theShape Shape to find sub-shapes of.
5355         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5356         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5357         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5358         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5359         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5360         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5361         #  @param theName Object name; when specified, this parameter is used
5362         #         for result publication in the study. Otherwise, if automatic
5363         #         publication is switched on, default value is used for result name.
5364         #
5365         #  @return List of all found sub-shapes.
5366         #
5367         #  @ref swig_GetShapesOnQuadrangle "Example"
5368         @ManageTransactions("ShapesOp")
5369         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5370                                   theTopLeftPoint, theTopRigthPoint,
5371                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5372             """
5373             Find in theShape all sub-shapes of type theShapeType, situated relatively
5374             the specified quadrangle by the certain way, defined through theState parameter.
5375
5376             Parameters:
5377                 theShape Shape to find sub-shapes of.
5378                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5379                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5380                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5381                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5382                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5383                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5384                 theName Object name; when specified, this parameter is used
5385                         for result publication in the study. Otherwise, if automatic
5386                         publication is switched on, default value is used for result name.
5387
5388             Returns:
5389                 List of all found sub-shapes.
5390             """
5391             # Example: see GEOM_TestOthers.py
5392             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5393                                                         theTopLeftPoint, theTopRigthPoint,
5394                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5395             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5396             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5397             return aList
5398
5399         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5400         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5401         #  @param theShape Shape to find sub-shapes of.
5402         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5403         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5404         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5405         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5406         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5407         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5408         #
5409         #  @return List of all found sub-shapes indices.
5410         #
5411         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5412         @ManageTransactions("ShapesOp")
5413         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5414                                      theTopLeftPoint, theTopRigthPoint,
5415                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5416             """
5417             Find in theShape all sub-shapes of type theShapeType, situated relatively
5418             the specified quadrangle by the certain way, defined through theState parameter.
5419
5420             Parameters:
5421                 theShape Shape to find sub-shapes of.
5422                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5423                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5424                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5425                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5426                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5427                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5428
5429             Returns:
5430                 List of all found sub-shapes indices.
5431             """
5432
5433             # Example: see GEOM_TestOthers.py
5434             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5435                                                            theTopLeftPoint, theTopRigthPoint,
5436                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5437             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5438             return aList
5439
5440         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5441         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5442         #  @param theBox Shape for relative comparing.
5443         #  @param theShape Shape to find sub-shapes of.
5444         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5445         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5446         #  @param theName Object name; when specified, this parameter is used
5447         #         for result publication in the study. Otherwise, if automatic
5448         #         publication is switched on, default value is used for result name.
5449         #
5450         #  @return List of all found sub-shapes.
5451         #
5452         #  @ref swig_GetShapesOnBox "Example"
5453         @ManageTransactions("ShapesOp")
5454         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5455             """
5456             Find in theShape all sub-shapes of type theShapeType, situated relatively
5457             the specified theBox by the certain way, defined through theState parameter.
5458
5459             Parameters:
5460                 theBox Shape for relative comparing.
5461                 theShape Shape to find sub-shapes of.
5462                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5463                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5464                 theName Object name; when specified, this parameter is used
5465                         for result publication in the study. Otherwise, if automatic
5466                         publication is switched on, default value is used for result name.
5467
5468             Returns:
5469                 List of all found sub-shapes.
5470             """
5471             # Example: see GEOM_TestOthers.py
5472             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5473             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5474             self._autoPublish(aList, theName, "shapeOnBox")
5475             return aList
5476
5477         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5478         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5479         #  @param theBox Shape for relative comparing.
5480         #  @param theShape Shape to find sub-shapes of.
5481         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5482         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5483         #
5484         #  @return List of all found sub-shapes indices.
5485         #
5486         #  @ref swig_GetShapesOnBoxIDs "Example"
5487         @ManageTransactions("ShapesOp")
5488         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5489             """
5490             Find in theShape all sub-shapes of type theShapeType, situated relatively
5491             the specified theBox by the certain way, defined through theState parameter.
5492
5493             Parameters:
5494                 theBox Shape for relative comparing.
5495                 theShape Shape to find sub-shapes of.
5496                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5497                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5498
5499             Returns:
5500                 List of all found sub-shapes indices.
5501             """
5502             # Example: see GEOM_TestOthers.py
5503             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5504             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5505             return aList
5506
5507         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5508         #  situated relatively the specified \a theCheckShape by the
5509         #  certain way, defined through \a theState parameter.
5510         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5511         #  @param theShape Shape to find sub-shapes of.
5512         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5513         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5514         #  @param theName Object name; when specified, this parameter is used
5515         #         for result publication in the study. Otherwise, if automatic
5516         #         publication is switched on, default value is used for result name.
5517         #
5518         #  @return List of all found sub-shapes.
5519         #
5520         #  @ref swig_GetShapesOnShape "Example"
5521         @ManageTransactions("ShapesOp")
5522         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5523             """
5524             Find in theShape all sub-shapes of type theShapeType,
5525             situated relatively the specified theCheckShape by the
5526             certain way, defined through theState parameter.
5527
5528             Parameters:
5529                 theCheckShape Shape for relative comparing. It must be a solid.
5530                 theShape Shape to find sub-shapes of.
5531                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5532                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5533                 theName Object name; when specified, this parameter is used
5534                         for result publication in the study. Otherwise, if automatic
5535                         publication is switched on, default value is used for result name.
5536
5537             Returns:
5538                 List of all found sub-shapes.
5539             """
5540             # Example: see GEOM_TestOthers.py
5541             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5542                                                    theShapeType, theState)
5543             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5544             self._autoPublish(aList, theName, "shapeOnShape")
5545             return aList
5546
5547         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5548         #  situated relatively the specified \a theCheckShape by the
5549         #  certain way, defined through \a theState parameter.
5550         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5551         #  @param theShape Shape to find sub-shapes of.
5552         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5553         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5554         #  @param theName Object name; when specified, this parameter is used
5555         #         for result publication in the study. Otherwise, if automatic
5556         #         publication is switched on, default value is used for result name.
5557         #
5558         #  @return All found sub-shapes as compound.
5559         #
5560         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5561         @ManageTransactions("ShapesOp")
5562         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5563             """
5564             Find in theShape all sub-shapes of type theShapeType,
5565             situated relatively the specified theCheckShape by the
5566             certain way, defined through theState parameter.
5567
5568             Parameters:
5569                 theCheckShape Shape for relative comparing. It must be a solid.
5570                 theShape Shape to find sub-shapes of.
5571                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5572                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5573                 theName Object name; when specified, this parameter is used
5574                         for result publication in the study. Otherwise, if automatic
5575                         publication is switched on, default value is used for result name.
5576
5577             Returns:
5578                 All found sub-shapes as compound.
5579             """
5580             # Example: see GEOM_TestOthers.py
5581             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5582                                                              theShapeType, theState)
5583             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5584             self._autoPublish(anObj, theName, "shapeOnShape")
5585             return anObj
5586
5587         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5588         #  situated relatively the specified \a theCheckShape by the
5589         #  certain way, defined through \a theState parameter.
5590         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5591         #  @param theShape Shape to find sub-shapes of.
5592         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5593         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5594         #
5595         #  @return List of all found sub-shapes indices.
5596         #
5597         #  @ref swig_GetShapesOnShapeIDs "Example"
5598         @ManageTransactions("ShapesOp")
5599         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5600             """
5601             Find in theShape all sub-shapes of type theShapeType,
5602             situated relatively the specified theCheckShape by the
5603             certain way, defined through theState parameter.
5604
5605             Parameters:
5606                 theCheckShape Shape for relative comparing. It must be a solid.
5607                 theShape Shape to find sub-shapes of.
5608                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5609                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5610
5611             Returns:
5612                 List of all found sub-shapes indices.
5613             """
5614             # Example: see GEOM_TestOthers.py
5615             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5616                                                       theShapeType, theState)
5617             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5618             return aList
5619
5620         ## Get sub-shape(s) of theShapeWhere, which are
5621         #  coincident with \a theShapeWhat or could be a part of it.
5622         #  @param theShapeWhere Shape to find sub-shapes of.
5623         #  @param theShapeWhat Shape, specifying what to find.
5624         #  @param isNewImplementation implementation of GetInPlace functionality
5625         #             (default = False, old alghorithm based on shape properties)
5626         #  @param theName Object name; when specified, this parameter is used
5627         #         for result publication in the study. Otherwise, if automatic
5628         #         publication is switched on, default value is used for result name.
5629         #
5630         #  @return Group of all found sub-shapes or a single found sub-shape.
5631         #
5632         #  @note This function has a restriction on argument shapes.
5633         #        If \a theShapeWhere has curved parts with significantly
5634         #        outstanding centres (i.e. the mass centre of a part is closer to
5635         #        \a theShapeWhat than to the part), such parts will not be found.
5636         #        @image html get_in_place_lost_part.png
5637         #
5638         #  @ref swig_GetInPlace "Example"
5639         @ManageTransactions("ShapesOp")
5640         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5641             """
5642             Get sub-shape(s) of theShapeWhere, which are
5643             coincident with  theShapeWhat or could be a part of it.
5644
5645             Parameters:
5646                 theShapeWhere Shape to find sub-shapes of.
5647                 theShapeWhat Shape, specifying what to find.
5648                 isNewImplementation Implementation of GetInPlace functionality
5649                                     (default = False, old alghorithm based on shape properties)
5650                 theName Object name; when specified, this parameter is used
5651                         for result publication in the study. Otherwise, if automatic
5652                         publication is switched on, default value is used for result name.
5653
5654             Returns:
5655                 Group of all found sub-shapes or a single found sub-shape.
5656
5657
5658             Note:
5659                 This function has a restriction on argument shapes.
5660                 If theShapeWhere has curved parts with significantly
5661                 outstanding centres (i.e. the mass centre of a part is closer to
5662                 theShapeWhat than to the part), such parts will not be found.
5663             """
5664             # Example: see GEOM_TestOthers.py
5665             anObj = None
5666             if isNewImplementation:
5667                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5668             else:
5669                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5670                 pass
5671             RaiseIfFailed("GetInPlace", self.ShapesOp)
5672             self._autoPublish(anObj, theName, "inplace")
5673             return anObj
5674
5675         ## Get sub-shape(s) of \a theShapeWhere, which are
5676         #  coincident with \a theShapeWhat or could be a part of it.
5677         #
5678         #  Implementation of this method is based on a saved history of an operation,
5679         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5680         #  arguments (an argument shape or a sub-shape of an argument shape).
5681         #  The operation could be the Partition or one of boolean operations,
5682         #  performed on simple shapes (not on compounds).
5683         #
5684         #  @param theShapeWhere Shape to find sub-shapes of.
5685         #  @param theShapeWhat Shape, specifying what to find (must be in the
5686         #                      building history of the ShapeWhere).
5687         #  @param theName Object name; when specified, this parameter is used
5688         #         for result publication in the study. Otherwise, if automatic
5689         #         publication is switched on, default value is used for result name.
5690         #
5691         #  @return Group of all found sub-shapes or a single found sub-shape.
5692         #
5693         #  @ref swig_GetInPlace "Example"
5694         @ManageTransactions("ShapesOp")
5695         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5696             """
5697             Implementation of this method is based on a saved history of an operation,
5698             produced theShapeWhere. The theShapeWhat must be among this operation's
5699             arguments (an argument shape or a sub-shape of an argument shape).
5700             The operation could be the Partition or one of boolean operations,
5701             performed on simple shapes (not on compounds).
5702
5703             Parameters:
5704                 theShapeWhere Shape to find sub-shapes of.
5705                 theShapeWhat Shape, specifying what to find (must be in the
5706                                 building history of the ShapeWhere).
5707                 theName Object name; when specified, this parameter is used
5708                         for result publication in the study. Otherwise, if automatic
5709                         publication is switched on, default value is used for result name.
5710
5711             Returns:
5712                 Group of all found sub-shapes or a single found sub-shape.
5713             """
5714             # Example: see GEOM_TestOthers.py
5715             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5716             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5717             self._autoPublish(anObj, theName, "inplace")
5718             return anObj
5719
5720         ## Get sub-shape of theShapeWhere, which is
5721         #  equal to \a theShapeWhat.
5722         #  @param theShapeWhere Shape to find sub-shape of.
5723         #  @param theShapeWhat Shape, specifying what to find.
5724         #  @param theName Object name; when specified, this parameter is used
5725         #         for result publication in the study. Otherwise, if automatic
5726         #         publication is switched on, default value is used for result name.
5727         #
5728         #  @return New GEOM.GEOM_Object for found sub-shape.
5729         #
5730         #  @ref swig_GetSame "Example"
5731         @ManageTransactions("ShapesOp")
5732         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5733             """
5734             Get sub-shape of theShapeWhere, which is
5735             equal to theShapeWhat.
5736
5737             Parameters:
5738                 theShapeWhere Shape to find sub-shape of.
5739                 theShapeWhat Shape, specifying what to find.
5740                 theName Object name; when specified, this parameter is used
5741                         for result publication in the study. Otherwise, if automatic
5742                         publication is switched on, default value is used for result name.
5743
5744             Returns:
5745                 New GEOM.GEOM_Object for found sub-shape.
5746             """
5747             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5748             RaiseIfFailed("GetSame", self.ShapesOp)
5749             self._autoPublish(anObj, theName, "sameShape")
5750             return anObj
5751
5752
5753         ## Get sub-shape indices of theShapeWhere, which is
5754         #  equal to \a theShapeWhat.
5755         #  @param theShapeWhere Shape to find sub-shape of.
5756         #  @param theShapeWhat Shape, specifying what to find.
5757         #  @return List of all found sub-shapes indices.
5758         #
5759         #  @ref swig_GetSame "Example"
5760         @ManageTransactions("ShapesOp")
5761         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5762             """
5763             Get sub-shape indices of theShapeWhere, which is
5764             equal to theShapeWhat.
5765
5766             Parameters:
5767                 theShapeWhere Shape to find sub-shape of.
5768                 theShapeWhat Shape, specifying what to find.
5769
5770             Returns:
5771                 List of all found sub-shapes indices.
5772             """
5773             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5774             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5775             return anObj
5776
5777         ## Resize the input edge with the new Min and Max parameters.
5778         #  The input edge parameters range is [0, 1]. If theMin parameter is
5779         #  negative, the input edge is extended, otherwise it is shrinked by
5780         #  theMin parameter. If theMax is greater than 1, the edge is extended,
5781         #  otherwise it is shrinked by theMax parameter.
5782         #  @param theEdge the input edge to be resized.
5783         #  @param theMin the minimal parameter value.
5784         #  @param theMax the maximal parameter value.
5785         #  @param theName Object name; when specified, this parameter is used
5786         #         for result publication in the study. Otherwise, if automatic
5787         #         publication is switched on, default value is used for result name.
5788         #  @return New GEOM.GEOM_Object, containing the created edge.
5789         #
5790         #  @ref tui_extend "Example"
5791         @ManageTransactions("ShapesOp")
5792         def ExtendEdge(self, theEdge, theMin, theMax, theName=None):
5793             """
5794             Resize the input edge with the new Min and Max parameters.
5795             The input edge parameters range is [0, 1]. If theMin parameter is
5796             negative, the input edge is extended, otherwise it is shrinked by
5797             theMin parameter. If theMax is greater than 1, the edge is extended,
5798             otherwise it is shrinked by theMax parameter.
5799
5800             Parameters:
5801                 theEdge the input edge to be resized.
5802                 theMin the minimal parameter value.
5803                 theMax the maximal parameter value.
5804                 theName Object name; when specified, this parameter is used
5805                         for result publication in the study. Otherwise, if automatic
5806                         publication is switched on, default value is used for result name.
5807
5808             Returns:
5809                 New GEOM.GEOM_Object, containing the created edge.
5810             """
5811             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
5812             RaiseIfFailed("ExtendEdge", self.ShapesOp)
5813             self._autoPublish(anObj, theName, "edge")
5814             return anObj
5815
5816         ## Resize the input face with the new UMin, UMax, VMin and VMax
5817         #  parameters. The input face U and V parameters range is [0, 1]. If
5818         #  theUMin parameter is negative, the input face is extended, otherwise
5819         #  it is shrinked along U direction by theUMin parameter. If theUMax is
5820         #  greater than 1, the face is extended, otherwise it is shrinked along
5821         #  U direction by theUMax parameter. So as for theVMin, theVMax and
5822         #  V direction of the input face.
5823         #  @param theFace the input face to be resized.
5824         #  @param theUMin the minimal U parameter value.
5825         #  @param theUMax the maximal U parameter value.
5826         #  @param theVMin the minimal V parameter value.
5827         #  @param theVMax the maximal V parameter value.
5828         #  @param theName Object name; when specified, this parameter is used
5829         #         for result publication in the study. Otherwise, if automatic
5830         #         publication is switched on, default value is used for result name.
5831         #  @return New GEOM.GEOM_Object, containing the created face.
5832         #
5833         #  @ref tui_extend "Example"
5834         @ManageTransactions("ShapesOp")
5835         def ExtendFace(self, theFace, theUMin, theUMax,
5836                        theVMin, theVMax, theName=None):
5837             """
5838             Resize the input face with the new UMin, UMax, VMin and VMax
5839             parameters. The input face U and V parameters range is [0, 1]. If
5840             theUMin parameter is negative, the input face is extended, otherwise
5841             it is shrinked along U direction by theUMin parameter. If theUMax is
5842             greater than 1, the face is extended, otherwise it is shrinked along
5843             U direction by theUMax parameter. So as for theVMin, theVMax and
5844             V direction of the input face.
5845
5846             Parameters:
5847                 theFace the input face to be resized.
5848                 theUMin the minimal U parameter value.
5849                 theUMax the maximal U parameter value.
5850                 theVMin the minimal V parameter value.
5851                 theVMax the maximal V parameter value.
5852                 theName Object name; when specified, this parameter is used
5853                         for result publication in the study. Otherwise, if automatic
5854                         publication is switched on, default value is used for result name.
5855
5856             Returns:
5857                 New GEOM.GEOM_Object, containing the created face.
5858             """
5859             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
5860                                              theVMin, theVMax)
5861             RaiseIfFailed("ExtendFace", self.ShapesOp)
5862             self._autoPublish(anObj, theName, "face")
5863             return anObj
5864
5865         ## This function takes some face as input parameter and creates new
5866         #  GEOM_Object, i.e. topological shape by extracting underlying surface
5867         #  of the source face and limiting it by the Umin, Umax, Vmin, Vmax
5868         #  parameters of the source face (in the parametrical space).
5869         #  @param theFace the input face.
5870         #  @param theName Object name; when specified, this parameter is used
5871         #         for result publication in the study. Otherwise, if automatic
5872         #         publication is switched on, default value is used for result name.
5873         #  @return New GEOM.GEOM_Object, containing the created face.
5874         #
5875         #  @ref tui_creation_surface "Example"
5876         @ManageTransactions("ShapesOp")
5877         def MakeSurfaceFromFace(self, theFace, theName=None):
5878             """
5879             This function takes some face as input parameter and creates new
5880             GEOM_Object, i.e. topological shape by extracting underlying surface
5881             of the source face and limiting it by the Umin, Umax, Vmin, Vmax
5882             parameters of the source face (in the parametrical space).
5883
5884             Parameters:
5885                 theFace the input face.
5886                 theName Object name; when specified, this parameter is used
5887                         for result publication in the study. Otherwise, if automatic
5888                         publication is switched on, default value is used for result name.
5889
5890             Returns:
5891                 New GEOM.GEOM_Object, containing the created face.
5892             """
5893             anObj = self.ShapesOp.MakeSurfaceFromFace(theFace)
5894             RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp)
5895             self._autoPublish(anObj, theName, "surface")
5896             return anObj
5897
5898         # end of l4_obtain
5899         ## @}
5900
5901         ## @addtogroup l4_access
5902         ## @{
5903
5904         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5905         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5906         #  @param aShape Shape to get sub-shape of.
5907         #  @param ListOfID List of sub-shapes indices.
5908         #  @param theName Object name; when specified, this parameter is used
5909         #         for result publication in the study. Otherwise, if automatic
5910         #         publication is switched on, default value is used for result name.
5911         #
5912         #  @return Found sub-shape.
5913         #
5914         #  @ref swig_all_decompose "Example"
5915         def GetSubShape(self, aShape, ListOfID, theName=None):
5916             """
5917             Obtain a composite sub-shape of aShape, composed from sub-shapes
5918             of aShape, selected by their unique IDs inside aShape
5919
5920             Parameters:
5921                 aShape Shape to get sub-shape of.
5922                 ListOfID List of sub-shapes indices.
5923                 theName Object name; when specified, this parameter is used
5924                         for result publication in the study. Otherwise, if automatic
5925                         publication is switched on, default value is used for result name.
5926
5927             Returns:
5928                 Found sub-shape.
5929             """
5930             # Example: see GEOM_TestAll.py
5931             anObj = self.AddSubShape(aShape,ListOfID)
5932             self._autoPublish(anObj, theName, "subshape")
5933             return anObj
5934
5935         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5936         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5937         #  @param aShape Shape to get sub-shape of.
5938         #  @param aSubShape Sub-shapes of aShape.
5939         #  @return ID of found sub-shape.
5940         #
5941         #  @ref swig_all_decompose "Example"
5942         @ManageTransactions("LocalOp")
5943         def GetSubShapeID(self, aShape, aSubShape):
5944             """
5945             Obtain unique ID of sub-shape aSubShape inside aShape
5946             of aShape, selected by their unique IDs inside aShape
5947
5948             Parameters:
5949                aShape Shape to get sub-shape of.
5950                aSubShape Sub-shapes of aShape.
5951
5952             Returns:
5953                ID of found sub-shape.
5954             """
5955             # Example: see GEOM_TestAll.py
5956             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5957             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5958             return anID
5959
5960         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5961         #  This function is provided for performance purpose. The complexity is O(n) with n
5962         #  the number of subobjects of aShape
5963         #  @param aShape Shape to get sub-shape of.
5964         #  @param aSubShapes Sub-shapes of aShape.
5965         #  @return list of IDs of found sub-shapes.
5966         #
5967         #  @ref swig_all_decompose "Example"
5968         @ManageTransactions("ShapesOp")
5969         def GetSubShapesIDs(self, aShape, aSubShapes):
5970             """
5971             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5972             This function is provided for performance purpose. The complexity is O(n) with n
5973             the number of subobjects of aShape
5974
5975             Parameters:
5976                aShape Shape to get sub-shape of.
5977                aSubShapes Sub-shapes of aShape.
5978
5979             Returns:
5980                List of IDs of found sub-shape.
5981             """
5982             # Example: see GEOM_TestAll.py
5983             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5984             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5985             return anIDs
5986
5987         # end of l4_access
5988         ## @}
5989
5990         ## @addtogroup l4_decompose
5991         ## @{
5992
5993         ## Get all sub-shapes and groups of \a theShape,
5994         #  that were created already by any other methods.
5995         #  @param theShape Any shape.
5996         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5997         #                       returned, else all found sub-shapes and groups.
5998         #  @return List of existing sub-objects of \a theShape.
5999         #
6000         #  @ref swig_all_decompose "Example"
6001         @ManageTransactions("ShapesOp")
6002         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
6003             """
6004             Get all sub-shapes and groups of theShape,
6005             that were created already by any other methods.
6006
6007             Parameters:
6008                 theShape Any shape.
6009                 theGroupsOnly If this parameter is TRUE, only groups will be
6010                                  returned, else all found sub-shapes and groups.
6011
6012             Returns:
6013                 List of existing sub-objects of theShape.
6014             """
6015             # Example: see GEOM_TestAll.py
6016             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
6017             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6018             return ListObj
6019
6020         ## Get all groups of \a theShape,
6021         #  that were created already by any other methods.
6022         #  @param theShape Any shape.
6023         #  @return List of existing groups of \a theShape.
6024         #
6025         #  @ref swig_all_decompose "Example"
6026         @ManageTransactions("ShapesOp")
6027         def GetGroups(self, theShape):
6028             """
6029             Get all groups of theShape,
6030             that were created already by any other methods.
6031
6032             Parameters:
6033                 theShape Any shape.
6034
6035             Returns:
6036                 List of existing groups of theShape.
6037             """
6038             # Example: see GEOM_TestAll.py
6039             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
6040             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
6041             return ListObj
6042
6043         ## Explode a shape on sub-shapes of a given type.
6044         #  If the shape itself matches the type, it is also returned.
6045         #  @param aShape Shape to be exploded.
6046         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6047         #  @param theName Object name; when specified, this parameter is used
6048         #         for result publication in the study. Otherwise, if automatic
6049         #         publication is switched on, default value is used for result name.
6050         #
6051         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6052         #
6053         #  @ref swig_all_decompose "Example"
6054         @ManageTransactions("ShapesOp")
6055         def SubShapeAll(self, aShape, aType, theName=None):
6056             """
6057             Explode a shape on sub-shapes of a given type.
6058             If the shape itself matches the type, it is also returned.
6059
6060             Parameters:
6061                 aShape Shape to be exploded.
6062                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6063                 theName Object name; when specified, this parameter is used
6064                         for result publication in the study. Otherwise, if automatic
6065                         publication is switched on, default value is used for result name.
6066
6067             Returns:
6068                 List of sub-shapes of type theShapeType, contained in theShape.
6069             """
6070             # Example: see GEOM_TestAll.py
6071             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
6072             RaiseIfFailed("SubShapeAll", self.ShapesOp)
6073             self._autoPublish(ListObj, theName, "subshape")
6074             return ListObj
6075
6076         ## Explode a shape on sub-shapes of a given type.
6077         #  @param aShape Shape to be exploded.
6078         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6079         #  @return List of IDs of sub-shapes.
6080         #
6081         #  @ref swig_all_decompose "Example"
6082         @ManageTransactions("ShapesOp")
6083         def SubShapeAllIDs(self, aShape, aType):
6084             """
6085             Explode a shape on sub-shapes of a given type.
6086
6087             Parameters:
6088                 aShape Shape to be exploded (see geompy.ShapeType)
6089                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6090
6091             Returns:
6092                 List of IDs of sub-shapes.
6093             """
6094             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
6095             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6096             return ListObj
6097
6098         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6099         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
6100         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6101         #  @param aShape Shape to get sub-shape of.
6102         #  @param ListOfInd List of sub-shapes indices.
6103         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6104         #  @param theName Object name; when specified, this parameter is used
6105         #         for result publication in the study. Otherwise, if automatic
6106         #         publication is switched on, default value is used for result name.
6107         #
6108         #  @return A compound of sub-shapes of aShape.
6109         #
6110         #  @ref swig_all_decompose "Example"
6111         def SubShape(self, aShape, aType, ListOfInd, theName=None):
6112             """
6113             Obtain a compound of sub-shapes of aShape,
6114             selected by their indices in list of all sub-shapes of type aType.
6115             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6116
6117             Parameters:
6118                 aShape Shape to get sub-shape of.
6119                 ListOfID List of sub-shapes indices.
6120                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6121                 theName Object name; when specified, this parameter is used
6122                         for result publication in the study. Otherwise, if automatic
6123                         publication is switched on, default value is used for result name.
6124
6125             Returns:
6126                 A compound of sub-shapes of aShape.
6127             """
6128             # Example: see GEOM_TestAll.py
6129             ListOfIDs = []
6130             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
6131             for ind in ListOfInd:
6132                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6133             # note: auto-publishing is done in self.GetSubShape()
6134             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6135             return anObj
6136
6137         ## Explode a shape on sub-shapes of a given type.
6138         #  Sub-shapes will be sorted taking into account their gravity centers,
6139         #  to provide stable order of sub-shapes.
6140         #  If the shape itself matches the type, it is also returned.
6141         #  @param aShape Shape to be exploded.
6142         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6143         #  @param theName Object name; when specified, this parameter is used
6144         #         for result publication in the study. Otherwise, if automatic
6145         #         publication is switched on, default value is used for result name.
6146         #
6147         #  @return List of sub-shapes of type theShapeType, contained in theShape.
6148         #
6149         #  @ref swig_SubShapeAllSorted "Example"
6150         @ManageTransactions("ShapesOp")
6151         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
6152             """
6153             Explode a shape on sub-shapes of a given type.
6154             Sub-shapes will be sorted taking into account their gravity centers,
6155             to provide stable order of sub-shapes.
6156             If the shape itself matches the type, it is also returned.
6157
6158             Parameters:
6159                 aShape Shape to be exploded.
6160                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6161                 theName Object name; when specified, this parameter is used
6162                         for result publication in the study. Otherwise, if automatic
6163                         publication is switched on, default value is used for result name.
6164
6165             Returns:
6166                 List of sub-shapes of type theShapeType, contained in theShape.
6167             """
6168             # Example: see GEOM_TestAll.py
6169             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
6170             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
6171             self._autoPublish(ListObj, theName, "subshape")
6172             return ListObj
6173
6174         ## Explode a shape on sub-shapes of a given type.
6175         #  Sub-shapes will be sorted taking into account their gravity centers,
6176         #  to provide stable order of sub-shapes.
6177         #  @param aShape Shape to be exploded.
6178         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6179         #  @return List of IDs of sub-shapes.
6180         #
6181         #  @ref swig_all_decompose "Example"
6182         @ManageTransactions("ShapesOp")
6183         def SubShapeAllSortedCentresIDs(self, aShape, aType):
6184             """
6185             Explode a shape on sub-shapes of a given type.
6186             Sub-shapes will be sorted taking into account their gravity centers,
6187             to provide stable order of sub-shapes.
6188
6189             Parameters:
6190                 aShape Shape to be exploded.
6191                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6192
6193             Returns:
6194                 List of IDs of sub-shapes.
6195             """
6196             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
6197             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6198             return ListIDs
6199
6200         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
6201         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
6202         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6203         #  @param aShape Shape to get sub-shape of.
6204         #  @param ListOfInd List of sub-shapes indices.
6205         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
6206         #  @param theName Object name; when specified, this parameter is used
6207         #         for result publication in the study. Otherwise, if automatic
6208         #         publication is switched on, default value is used for result name.
6209         #
6210         #  @return A compound of sub-shapes of aShape.
6211         #
6212         #  @ref swig_all_decompose "Example"
6213         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6214             """
6215             Obtain a compound of sub-shapes of aShape,
6216             selected by they indices in sorted list of all sub-shapes of type aType.
6217             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6218
6219             Parameters:
6220                 aShape Shape to get sub-shape of.
6221                 ListOfID List of sub-shapes indices.
6222                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6223                 theName Object name; when specified, this parameter is used
6224                         for result publication in the study. Otherwise, if automatic
6225                         publication is switched on, default value is used for result name.
6226
6227             Returns:
6228                 A compound of sub-shapes of aShape.
6229             """
6230             # Example: see GEOM_TestAll.py
6231             ListOfIDs = []
6232             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6233             for ind in ListOfInd:
6234                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6235             # note: auto-publishing is done in self.GetSubShape()
6236             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6237             return anObj
6238
6239         ## Extract shapes (excluding the main shape) of given type.
6240         #  @param aShape The shape.
6241         #  @param aType  The shape type (see ShapeType())
6242         #  @param isSorted Boolean flag to switch sorting on/off.
6243         #  @param theName Object name; when specified, this parameter is used
6244         #         for result publication in the study. Otherwise, if automatic
6245         #         publication is switched on, default value is used for result name.
6246         #
6247         #  @return List of sub-shapes of type aType, contained in aShape.
6248         #
6249         #  @ref swig_FilletChamfer "Example"
6250         @ManageTransactions("ShapesOp")
6251         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6252             """
6253             Extract shapes (excluding the main shape) of given type.
6254
6255             Parameters:
6256                 aShape The shape.
6257                 aType  The shape type (see geompy.ShapeType)
6258                 isSorted Boolean flag to switch sorting on/off.
6259                 theName Object name; when specified, this parameter is used
6260                         for result publication in the study. Otherwise, if automatic
6261                         publication is switched on, default value is used for result name.
6262
6263             Returns:
6264                 List of sub-shapes of type aType, contained in aShape.
6265             """
6266             # Example: see GEOM_TestAll.py
6267             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6268             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6269             self._autoPublish(ListObj, theName, "subshape")
6270             return ListObj
6271
6272         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6273         #  @param aShape Main shape.
6274         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6275         #  @param theName Object name; when specified, this parameter is used
6276         #         for result publication in the study. Otherwise, if automatic
6277         #         publication is switched on, default value is used for result name.
6278         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6279         #
6280         #  @ref swig_all_decompose "Example"
6281         @ManageTransactions("ShapesOp")
6282         def SubShapes(self, aShape, anIDs, theName=None):
6283             """
6284             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6285
6286             Parameters:
6287                 aShape Main shape.
6288                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6289                 theName Object name; when specified, this parameter is used
6290                         for result publication in the study. Otherwise, if automatic
6291                         publication is switched on, default value is used for result name.
6292
6293             Returns:
6294                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6295             """
6296             # Example: see GEOM_TestAll.py
6297             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6298             RaiseIfFailed("SubShapes", self.ShapesOp)
6299             self._autoPublish(ListObj, theName, "subshape")
6300             return ListObj
6301
6302         ## Explode a shape into edges sorted in a row from a starting point.
6303         #  @param theShape the shape to be exploded on edges.
6304         #  @param theStartPoint the starting point.
6305         #  @param theName Object name; when specified, this parameter is used
6306         #         for result publication in the study. Otherwise, if automatic
6307         #         publication is switched on, default value is used for result name.
6308         #  @return List of GEOM.GEOM_Object that is actually an ordered list
6309         #          of edges sorted in a row from a starting point.
6310         #
6311         #  @ref swig_GetSubShapeEdgeSorted "Example"
6312         @ManageTransactions("ShapesOp")
6313         def GetSubShapeEdgeSorted(self, theShape, theStartPoint, theName=None):
6314             """
6315             Explode a shape into edges sorted in a row from a starting point.
6316
6317             Parameters:
6318                 theShape the shape to be exploded on edges.
6319                 theStartPoint the starting point.
6320                 theName Object name; when specified, this parameter is used
6321                         for result publication in the study. Otherwise, if automatic
6322                         publication is switched on, default value is used for result name.
6323
6324             Returns:
6325                 List of GEOM.GEOM_Object that is actually an ordered list
6326                 of edges sorted in a row from a starting point.
6327             """
6328             # Example: see GEOM_TestAll.py
6329             ListObj = self.ShapesOp.GetSubShapeEdgeSorted(theShape, theStartPoint)
6330             RaiseIfFailed("GetSubShapeEdgeSorted", self.ShapesOp)
6331             self._autoPublish(ListObj, theName, "SortedEdges")
6332             return ListObj
6333
6334         ## Check if the object is a sub-object of another GEOM object.
6335         #  @param aSubObject Checked sub-object (or its parent object, in case if
6336         #         \a theSubObjectIndex is non-zero).
6337         #  @param anObject An object that is checked for ownership (or its parent object,
6338         #         in case if \a theObjectIndex is non-zero).
6339         #  @param aSubObjectIndex When non-zero, specifies a sub-shape index that
6340         #         identifies a sub-object within its parent specified via \a theSubObject.
6341         #  @param anObjectIndex When non-zero, specifies a sub-shape index that
6342         #         identifies an object within its parent specified via \a theObject.
6343         #  @return TRUE, if the given object contains sub-object.
6344         @ManageTransactions("ShapesOp")
6345         def IsSubShapeBelongsTo(self, aSubObject, anObject, aSubObjectIndex = 0, anObjectIndex = 0):
6346             """
6347             Check if the object is a sub-object of another GEOM object.
6348             
6349             Parameters:
6350                 aSubObject Checked sub-object (or its parent object, in case if
6351                     \a theSubObjectIndex is non-zero).
6352                 anObject An object that is checked for ownership (or its parent object,
6353                     in case if \a theObjectIndex is non-zero).
6354                 aSubObjectIndex When non-zero, specifies a sub-shape index that
6355                     identifies a sub-object within its parent specified via \a theSubObject.
6356                 anObjectIndex When non-zero, specifies a sub-shape index that
6357                     identifies an object within its parent specified via \a theObject.
6358
6359             Returns
6360                 TRUE, if the given object contains sub-object.
6361             """
6362             IsOk = self.ShapesOp.IsSubShapeBelongsTo(aSubObject, aSubObjectIndex, anObject, anObjectIndex)
6363             RaiseIfFailed("IsSubShapeBelongsTo", self.ShapesOp)
6364             return IsOk
6365
6366         # end of l4_decompose
6367         ## @}
6368
6369         ## @addtogroup l4_decompose_d
6370         ## @{
6371
6372         ## Deprecated method
6373         #  It works like SubShapeAllSortedCentres(), but wrongly
6374         #  defines centres of faces, shells and solids.
6375         @ManageTransactions("ShapesOp")
6376         def SubShapeAllSorted(self, aShape, aType, theName=None):
6377             """
6378             Deprecated method
6379             It works like geompy.SubShapeAllSortedCentres, but wrongly
6380             defines centres of faces, shells and solids.
6381             """
6382             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6383             RaiseIfFailed("MakeExplode", self.ShapesOp)
6384             self._autoPublish(ListObj, theName, "subshape")
6385             return ListObj
6386
6387         ## Deprecated method
6388         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6389         #  defines centres of faces, shells and solids.
6390         @ManageTransactions("ShapesOp")
6391         def SubShapeAllSortedIDs(self, aShape, aType):
6392             """
6393             Deprecated method
6394             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6395             defines centres of faces, shells and solids.
6396             """
6397             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6398             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6399             return ListIDs
6400
6401         ## Deprecated method
6402         #  It works like SubShapeSortedCentres(), but has a bug
6403         #  (wrongly defines centres of faces, shells and solids).
6404         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6405             """
6406             Deprecated method
6407             It works like geompy.SubShapeSortedCentres, but has a bug
6408             (wrongly defines centres of faces, shells and solids).
6409             """
6410             ListOfIDs = []
6411             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6412             for ind in ListOfInd:
6413                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6414             # note: auto-publishing is done in self.GetSubShape()
6415             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6416             return anObj
6417
6418         # end of l4_decompose_d
6419         ## @}
6420
6421         ## @addtogroup l3_healing
6422         ## @{
6423
6424         ## Apply a sequence of Shape Healing operators to the given object.
6425         #  @param theShape Shape to be processed.
6426         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6427         #  @param theParameters List of names of parameters
6428         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6429         #  @param theValues List of values of parameters, in the same order
6430         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6431         #  @param theName Object name; when specified, this parameter is used
6432         #         for result publication in the study. Otherwise, if automatic
6433         #         publication is switched on, default value is used for result name.
6434         #
6435         #  <b> Operators and Parameters: </b> \n
6436         #
6437         #  * \b FixShape - corrects invalid shapes. \n
6438         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6439         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6440         #
6441         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6442         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6443         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6444         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6445         #  - \b DropSmallSolids - either removes small solids or merges them with neighboring ones. \n
6446         #  - \b DropSmallSolids.WidthFactorThreshold - defines maximum value of <em>2V/S</em> of a solid which is considered small, where \a V is volume and \a S is surface area of the solid. \n
6447         #  - \b DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria. \n
6448         #  - \b DropSmallSolids.MergeSolids - if "1", small solids are removed; if "0" small solids are merged to adjacent non-small solids or left untouched if cannot be merged. \n
6449         #
6450         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6451         #    surfaces in segments using a certain angle. \n
6452         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6453         #    if Angle=180, four if Angle=90, etc). \n
6454         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6455         #
6456         #  * \b SplitClosedFaces - splits closed faces in segments.
6457         #    The number of segments depends on the number of splitting points.\n
6458         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6459         #
6460         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6461         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6462         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6463         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6464         #   This and the previous parameters can take the following values:\n
6465         #   \b Parametric \b Continuity \n
6466         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6467         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6468         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6469         #    ruling out sharp edges).\n
6470         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6471         #       are of the same magnitude).\n
6472         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6473         #    or surfaces (d/du C(u)) are the same at junction. \n
6474         #   \b Geometric \b Continuity \n
6475         #   \b G1: first derivatives are proportional at junction.\n
6476         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6477         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6478         #   \b G2: first and second derivatives are proportional at junction.
6479         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6480         #    continuity requires that the underlying parameterization was continuous as well.
6481         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6482         #
6483         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6484         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6485         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6486         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6487         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6488         #       with the specified parameters.\n
6489         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6490         #       with the specified parameters.\n
6491         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6492         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6493         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6494         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6495         #
6496         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6497         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6498         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6499         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6500         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6501         #
6502         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6503         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6504         #
6505         #
6506         #  @return New GEOM.GEOM_Object, containing processed shape.
6507         #
6508         #  \n @ref tui_shape_processing "Example"
6509         @ManageTransactions("HealOp")
6510         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6511             """
6512             Apply a sequence of Shape Healing operators to the given object.
6513
6514             Parameters:
6515                 theShape Shape to be processed.
6516                 theValues List of values of parameters, in the same order
6517                           as parameters are listed in theParameters list.
6518                 theOperators List of names of operators ('FixShape', 'SplitClosedFaces', etc.).
6519                 theParameters List of names of parameters
6520                               ('FixShape.Tolerance3d', 'SplitClosedFaces.NbSplitPoints', etc.).
6521                 theName Object name; when specified, this parameter is used
6522                         for result publication in the study. Otherwise, if automatic
6523                         publication is switched on, default value is used for result name.
6524
6525                 Operators and Parameters:
6526
6527                  * FixShape - corrects invalid shapes.
6528                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6529                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6530                  * FixFaceSize - removes small faces, such as spots and strips.
6531                      * FixFaceSize.Tolerance - defines minimum possible face size.
6532                  * DropSmallEdges - removes edges, which merge with neighbouring edges.
6533                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6534                  * DropSmallSolids - either removes small solids or merges them with neighboring ones.
6535                      * DropSmallSolids.WidthFactorThreshold - defines maximum value of 2V/S of a solid which is considered small, where V is volume and S is surface area of the solid.
6536                      * DropSmallSolids.VolumeThreshold - defines maximum volume of a solid which is considered small. If the both tolerances are privided a solid is considered small if it meets the both criteria.
6537                      * DropSmallSolids.MergeSolids - if '1', small solids are removed; if '0' small solids are merged to adjacent non-small solids or left untouched if cannot be merged.
6538
6539                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6540                                 in segments using a certain angle.
6541                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6542                                           if Angle=180, four if Angle=90, etc).
6543                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6544                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6545                                       splitting points.
6546                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6547                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6548                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6549                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6550                      * SplitContinuity.CurveContinuity - required continuity for curves.
6551                        This and the previous parameters can take the following values:
6552
6553                        Parametric Continuity:
6554                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6555                                                    coincidental. The curves or surfaces may still meet at an angle,
6556                                                    giving rise to a sharp corner or edge).
6557                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6558                                                    are parallel, ruling out sharp edges).
6559                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6560                                                   or surfaces are of the same magnitude).
6561                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6562                           curves or surfaces (d/du C(u)) are the same at junction.
6563
6564                        Geometric Continuity:
6565                        G1: first derivatives are proportional at junction.
6566                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6567                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6568                        G2: first and second derivatives are proportional at junction. As the names imply,
6569                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6570                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6571                            geometric continuity of order n, but not vice-versa.
6572                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6573                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6574                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6575                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6576                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6577                                                         the specified parameters.
6578                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6579                                                         the specified parameters.
6580                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6581                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6582                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6583                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6584                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6585                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6586                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6587                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6588                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6589                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6590                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6591
6592             Returns:
6593                 New GEOM.GEOM_Object, containing processed shape.
6594
6595             Note: For more information look through SALOME Geometry User's Guide->
6596                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6597             """
6598             # Example: see GEOM_TestHealing.py
6599             theValues,Parameters = ParseList(theValues)
6600             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6601             # To avoid script failure in case of good argument shape
6602             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6603                 return theShape
6604             RaiseIfFailed("ProcessShape", self.HealOp)
6605             for string in (theOperators + theParameters):
6606                 Parameters = ":" + Parameters
6607                 pass
6608             anObj.SetParameters(Parameters)
6609             self._autoPublish(anObj, theName, "healed")
6610             return anObj
6611
6612         ## Remove faces from the given object (shape).
6613         #  @param theObject Shape to be processed.
6614         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6615         #                  removes ALL faces of the given object.
6616         #  @param theName Object name; when specified, this parameter is used
6617         #         for result publication in the study. Otherwise, if automatic
6618         #         publication is switched on, default value is used for result name.
6619         #
6620         #  @return New GEOM.GEOM_Object, containing processed shape.
6621         #
6622         #  @ref tui_suppress_faces "Example"
6623         @ManageTransactions("HealOp")
6624         def SuppressFaces(self, theObject, theFaces, theName=None):
6625             """
6626             Remove faces from the given object (shape).
6627
6628             Parameters:
6629                 theObject Shape to be processed.
6630                 theFaces Indices of faces to be removed, if EMPTY then the method
6631                          removes ALL faces of the given object.
6632                 theName Object name; when specified, this parameter is used
6633                         for result publication in the study. Otherwise, if automatic
6634                         publication is switched on, default value is used for result name.
6635
6636             Returns:
6637                 New GEOM.GEOM_Object, containing processed shape.
6638             """
6639             # Example: see GEOM_TestHealing.py
6640             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6641             RaiseIfFailed("SuppressFaces", self.HealOp)
6642             self._autoPublish(anObj, theName, "suppressFaces")
6643             return anObj
6644
6645         ## Sewing of faces into a single shell.
6646         #  @param ListShape Shapes to be processed.
6647         #  @param theTolerance Required tolerance value.
6648         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6649         #  @param theName Object name; when specified, this parameter is used
6650         #         for result publication in the study. Otherwise, if automatic
6651         #         publication is switched on, default value is used for result name.
6652         #
6653         #  @return New GEOM.GEOM_Object, containing a result shell.
6654         #
6655         #  @ref tui_sewing "Example"
6656         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6657             """
6658             Sewing of faces into a single shell.
6659
6660             Parameters:
6661                 ListShape Shapes to be processed.
6662                 theTolerance Required tolerance value.
6663                 AllowNonManifold Flag that allows non-manifold sewing.
6664                 theName Object name; when specified, this parameter is used
6665                         for result publication in the study. Otherwise, if automatic
6666                         publication is switched on, default value is used for result name.
6667
6668             Returns:
6669                 New GEOM.GEOM_Object, containing containing a result shell.
6670             """
6671             # Example: see GEOM_TestHealing.py
6672             # note: auto-publishing is done in self.Sew()
6673             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6674             return anObj
6675
6676         ## Sewing of faces into a single shell.
6677         #  @param ListShape Shapes to be processed.
6678         #  @param theTolerance Required tolerance value.
6679         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6680         #  @param theName Object name; when specified, this parameter is used
6681         #         for result publication in the study. Otherwise, if automatic
6682         #         publication is switched on, default value is used for result name.
6683         #
6684         #  @return New GEOM.GEOM_Object, containing a result shell.
6685         @ManageTransactions("HealOp")
6686         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6687             """
6688             Sewing of faces into a single shell.
6689
6690             Parameters:
6691                 ListShape Shapes to be processed.
6692                 theTolerance Required tolerance value.
6693                 AllowNonManifold Flag that allows non-manifold sewing.
6694                 theName Object name; when specified, this parameter is used
6695                         for result publication in the study. Otherwise, if automatic
6696                         publication is switched on, default value is used for result name.
6697
6698             Returns:
6699                 New GEOM.GEOM_Object, containing a result shell.
6700             """
6701             # Example: see MakeSewing() above
6702             theTolerance,Parameters = ParseParameters(theTolerance)
6703             if AllowNonManifold:
6704                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6705             else:
6706                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6707             # To avoid script failure in case of good argument shape
6708             # (Fix of test cases geom/bugs11/L7,L8)
6709             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6710                 return anObj
6711             RaiseIfFailed("Sew", self.HealOp)
6712             anObj.SetParameters(Parameters)
6713             self._autoPublish(anObj, theName, "sewed")
6714             return anObj
6715
6716         ## Rebuild the topology of theSolids by removing
6717         #  the faces that are shared by several solids.
6718         #  @param theSolids A compound or a list of solids to be processed.
6719         #  @param theName Object name; when specified, this parameter is used
6720         #         for result publication in the study. Otherwise, if automatic
6721         #         publication is switched on, default value is used for result name.
6722         #
6723         #  @return New GEOM.GEOM_Object, containing processed shape.
6724         #
6725         #  @ref tui_remove_webs "Example"
6726         @ManageTransactions("HealOp")
6727         def RemoveInternalFaces (self, theSolids, theName=None):
6728             """
6729             Rebuild the topology of theSolids by removing
6730             the faces that are shared by several solids.
6731
6732             Parameters:
6733                 theSolids A compound or a list of solids to be processed.
6734                 theName Object name; when specified, this parameter is used
6735                         for result publication in the study. Otherwise, if automatic
6736                         publication is switched on, default value is used for result name.
6737
6738             Returns:
6739                 New GEOM.GEOM_Object, containing processed shape.
6740             """
6741             # Example: see GEOM_TestHealing.py
6742             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
6743             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6744             self._autoPublish(anObj, theName, "removeWebs")
6745             return anObj
6746
6747         ## Remove internal wires and edges from the given object (face).
6748         #  @param theObject Shape to be processed.
6749         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6750         #                  removes ALL internal wires of the given object.
6751         #  @param theName Object name; when specified, this parameter is used
6752         #         for result publication in the study. Otherwise, if automatic
6753         #         publication is switched on, default value is used for result name.
6754         #
6755         #  @return New GEOM.GEOM_Object, containing processed shape.
6756         #
6757         #  @ref tui_suppress_internal_wires "Example"
6758         @ManageTransactions("HealOp")
6759         def SuppressInternalWires(self, theObject, theWires, theName=None):
6760             """
6761             Remove internal wires and edges from the given object (face).
6762
6763             Parameters:
6764                 theObject Shape to be processed.
6765                 theWires Indices of wires to be removed, if EMPTY then the method
6766                          removes ALL internal wires of the given object.
6767                 theName Object name; when specified, this parameter is used
6768                         for result publication in the study. Otherwise, if automatic
6769                         publication is switched on, default value is used for result name.
6770
6771             Returns:
6772                 New GEOM.GEOM_Object, containing processed shape.
6773             """
6774             # Example: see GEOM_TestHealing.py
6775             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6776             RaiseIfFailed("RemoveIntWires", self.HealOp)
6777             self._autoPublish(anObj, theName, "suppressWires")
6778             return anObj
6779
6780         ## Remove internal closed contours (holes) from the given object.
6781         #  @param theObject Shape to be processed.
6782         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6783         #                  removes ALL internal holes of the given object
6784         #  @param theName Object name; when specified, this parameter is used
6785         #         for result publication in the study. Otherwise, if automatic
6786         #         publication is switched on, default value is used for result name.
6787         #
6788         #  @return New GEOM.GEOM_Object, containing processed shape.
6789         #
6790         #  @ref tui_suppress_holes "Example"
6791         @ManageTransactions("HealOp")
6792         def SuppressHoles(self, theObject, theWires, theName=None):
6793             """
6794             Remove internal closed contours (holes) from the given object.
6795
6796             Parameters:
6797                 theObject Shape to be processed.
6798                 theWires Indices of wires to be removed, if EMPTY then the method
6799                          removes ALL internal holes of the given object
6800                 theName Object name; when specified, this parameter is used
6801                         for result publication in the study. Otherwise, if automatic
6802                         publication is switched on, default value is used for result name.
6803
6804             Returns:
6805                 New GEOM.GEOM_Object, containing processed shape.
6806             """
6807             # Example: see GEOM_TestHealing.py
6808             anObj = self.HealOp.FillHoles(theObject, theWires)
6809             RaiseIfFailed("FillHoles", self.HealOp)
6810             self._autoPublish(anObj, theName, "suppressHoles")
6811             return anObj
6812
6813         ## Close an open wire.
6814         #  @param theObject Shape to be processed.
6815         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6816         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6817         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6818         #                        If False : closure by creation of an edge between ends.
6819         #  @param theName Object name; when specified, this parameter is used
6820         #         for result publication in the study. Otherwise, if automatic
6821         #         publication is switched on, default value is used for result name.
6822         #
6823         #  @return New GEOM.GEOM_Object, containing processed shape.
6824         #
6825         #  @ref tui_close_contour "Example"
6826         @ManageTransactions("HealOp")
6827         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6828             """
6829             Close an open wire.
6830
6831             Parameters:
6832                 theObject Shape to be processed.
6833                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6834                          if [ ], then theObject itself is a wire.
6835                 isCommonVertex If True  : closure by creation of a common vertex,
6836                                If False : closure by creation of an edge between ends.
6837                 theName Object name; when specified, this parameter is used
6838                         for result publication in the study. Otherwise, if automatic
6839                         publication is switched on, default value is used for result name.
6840
6841             Returns:
6842                 New GEOM.GEOM_Object, containing processed shape.
6843             """
6844             # Example: see GEOM_TestHealing.py
6845             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6846             RaiseIfFailed("CloseContour", self.HealOp)
6847             self._autoPublish(anObj, theName, "closeContour")
6848             return anObj
6849
6850         ## Addition of a point to a given edge object.
6851         #  @param theObject Shape to be processed.
6852         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6853         #                      if -1, then theObject itself is the edge.
6854         #  @param theValue Value of parameter on edge or length parameter,
6855         #                  depending on \a isByParameter.
6856         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6857         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6858         #  @param theName Object name; when specified, this parameter is used
6859         #         for result publication in the study. Otherwise, if automatic
6860         #         publication is switched on, default value is used for result name.
6861         #
6862         #  @return New GEOM.GEOM_Object, containing processed shape.
6863         #
6864         #  @ref tui_add_point_on_edge "Example"
6865         @ManageTransactions("HealOp")
6866         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6867             """
6868             Addition of a point to a given edge object.
6869
6870             Parameters:
6871                 theObject Shape to be processed.
6872                 theEdgeIndex Index of edge to be divided within theObject's shape,
6873                              if -1, then theObject itself is the edge.
6874                 theValue Value of parameter on edge or length parameter,
6875                          depending on isByParameter.
6876                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6877                               if FALSE : theValue is treated as a length parameter [0..1]
6878                 theName Object name; when specified, this parameter is used
6879                         for result publication in the study. Otherwise, if automatic
6880                         publication is switched on, default value is used for result name.
6881
6882             Returns:
6883                 New GEOM.GEOM_Object, containing processed shape.
6884             """
6885             # Example: see GEOM_TestHealing.py
6886             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6887             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6888             RaiseIfFailed("DivideEdge", self.HealOp)
6889             anObj.SetParameters(Parameters)
6890             self._autoPublish(anObj, theName, "divideEdge")
6891             return anObj
6892
6893         ## Addition of points to a given edge of \a theObject by projecting
6894         #  other points to the given edge.
6895         #  @param theObject Shape to be processed.
6896         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6897         #                      if -1, then theObject itself is the edge.
6898         #  @param thePoints List of points to project to theEdgeIndex-th edge.
6899         #  @param theName Object name; when specified, this parameter is used
6900         #         for result publication in the study. Otherwise, if automatic
6901         #         publication is switched on, default value is used for result name.
6902         #
6903         #  @return New GEOM.GEOM_Object, containing processed shape.
6904         #
6905         #  @ref tui_add_point_on_edge "Example"
6906         @ManageTransactions("HealOp")
6907         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoints, theName=None):
6908             """
6909             Addition of points to a given edge of \a theObject by projecting
6910             other points to the given edge.
6911
6912             Parameters:
6913                 theObject Shape to be processed.
6914                 theEdgeIndex The edge or its index to be divided within theObject's shape,
6915                              if -1, then theObject itself is the edge.
6916                 thePoints List of points to project to theEdgeIndex-th edge.
6917                 theName Object name; when specified, this parameter is used
6918                         for result publication in the study. Otherwise, if automatic
6919                         publication is switched on, default value is used for result name.
6920
6921             Returns:
6922                 New GEOM.GEOM_Object, containing processed shape.
6923             """
6924             # Example: see GEOM_TestHealing.py
6925             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
6926                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
6927             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, ToList( thePoints ))
6928             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
6929             self._autoPublish(anObj, theName, "divideEdge")
6930             return anObj
6931
6932         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6933         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6934         #  @param theVertices A list of vertices to suppress. If the list
6935         #                     is empty, all vertices in a wire will be assumed.
6936         #  @param theName Object name; when specified, this parameter is used
6937         #         for result publication in the study. Otherwise, if automatic
6938         #         publication is switched on, default value is used for result name.
6939         #
6940         #  @return New GEOM.GEOM_Object with modified wire.
6941         #
6942         #  @ref tui_fuse_collinear_edges "Example"
6943         @ManageTransactions("HealOp")
6944         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6945             """
6946             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6947
6948             Parameters:
6949                 theWire Wire to minimize the number of C1 continuous edges in.
6950                 theVertices A list of vertices to suppress. If the list
6951                             is empty, all vertices in a wire will be assumed.
6952                 theName Object name; when specified, this parameter is used
6953                         for result publication in the study. Otherwise, if automatic
6954                         publication is switched on, default value is used for result name.
6955
6956             Returns:
6957                 New GEOM.GEOM_Object with modified wire.
6958             """
6959             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6960             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6961             self._autoPublish(anObj, theName, "fuseEdges")
6962             return anObj
6963
6964         ## Change orientation of the given object. Updates given shape.
6965         #  @param theObject Shape to be processed.
6966         #  @return Updated <var>theObject</var>
6967         #
6968         #  @ref swig_todo "Example"
6969         @ManageTransactions("HealOp")
6970         def ChangeOrientationShell(self,theObject):
6971             """
6972             Change orientation of the given object. Updates given shape.
6973
6974             Parameters:
6975                 theObject Shape to be processed.
6976
6977             Returns:
6978                 Updated theObject
6979             """
6980             theObject = self.HealOp.ChangeOrientation(theObject)
6981             RaiseIfFailed("ChangeOrientation", self.HealOp)
6982             pass
6983
6984         ## Change orientation of the given object.
6985         #  @param theObject Shape to be processed.
6986         #  @param theName Object name; when specified, this parameter is used
6987         #         for result publication in the study. Otherwise, if automatic
6988         #         publication is switched on, default value is used for result name.
6989         #
6990         #  @return New GEOM.GEOM_Object, containing processed shape.
6991         #
6992         #  @ref swig_todo "Example"
6993         @ManageTransactions("HealOp")
6994         def ChangeOrientationShellCopy(self, theObject, theName=None):
6995             """
6996             Change orientation of the given object.
6997
6998             Parameters:
6999                 theObject Shape to be processed.
7000                 theName Object name; when specified, this parameter is used
7001                         for result publication in the study. Otherwise, if automatic
7002                         publication is switched on, default value is used for result name.
7003
7004             Returns:
7005                 New GEOM.GEOM_Object, containing processed shape.
7006             """
7007             anObj = self.HealOp.ChangeOrientationCopy(theObject)
7008             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
7009             self._autoPublish(anObj, theName, "reversed")
7010             return anObj
7011
7012         ## Try to limit tolerance of the given object by value \a theTolerance.
7013         #  @param theObject Shape to be processed.
7014         #  @param theTolerance Required tolerance value.
7015         #  @param theName Object name; when specified, this parameter is used
7016         #         for result publication in the study. Otherwise, if automatic
7017         #         publication is switched on, default value is used for result name.
7018         #
7019         #  @return New GEOM.GEOM_Object, containing processed shape.
7020         #
7021         #  @ref tui_limit_tolerance "Example"
7022         @ManageTransactions("HealOp")
7023         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
7024             """
7025             Try to limit tolerance of the given object by value theTolerance.
7026
7027             Parameters:
7028                 theObject Shape to be processed.
7029                 theTolerance Required tolerance value.
7030                 theName Object name; when specified, this parameter is used
7031                         for result publication in the study. Otherwise, if automatic
7032                         publication is switched on, default value is used for result name.
7033
7034             Returns:
7035                 New GEOM.GEOM_Object, containing processed shape.
7036             """
7037             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
7038             RaiseIfFailed("LimitTolerance", self.HealOp)
7039             self._autoPublish(anObj, theName, "limitTolerance")
7040             return anObj
7041
7042         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7043         #  that constitute a free boundary of the given shape.
7044         #  @param theObject Shape to get free boundary of.
7045         #  @param theName Object name; when specified, this parameter is used
7046         #         for result publication in the study. Otherwise, if automatic
7047         #         publication is switched on, default value is used for result name.
7048         #
7049         #  @return [\a status, \a theClosedWires, \a theOpenWires]
7050         #  \n \a status: FALSE, if an error(s) occured during the method execution.
7051         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
7052         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
7053         #
7054         #  @ref tui_free_boundaries_page "Example"
7055         @ManageTransactions("HealOp")
7056         def GetFreeBoundary(self, theObject, theName=None):
7057             """
7058             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
7059             that constitute a free boundary of the given shape.
7060
7061             Parameters:
7062                 theObject Shape to get free boundary of.
7063                 theName Object name; when specified, this parameter is used
7064                         for result publication in the study. Otherwise, if automatic
7065                         publication is switched on, default value is used for result name.
7066
7067             Returns:
7068                 [status, theClosedWires, theOpenWires]
7069                  status: FALSE, if an error(s) occured during the method execution.
7070                  theClosedWires: Closed wires on the free boundary of the given shape.
7071                  theOpenWires: Open wires on the free boundary of the given shape.
7072             """
7073             # Example: see GEOM_TestHealing.py
7074             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
7075             RaiseIfFailed("GetFreeBoundary", self.HealOp)
7076             self._autoPublish(anObj[1], theName, "closedWire")
7077             self._autoPublish(anObj[2], theName, "openWire")
7078             return anObj
7079
7080         ## Replace coincident faces in \a theShapes by one face.
7081         #  @param theShapes Initial shapes, either a list or compound of shapes.
7082         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
7083         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7084         #                         otherwise all initial shapes.
7085         #  @param theName Object name; when specified, this parameter is used
7086         #         for result publication in the study. Otherwise, if automatic
7087         #         publication is switched on, default value is used for result name.
7088         #
7089         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7090         #
7091         #  @ref tui_glue_faces "Example"
7092         @ManageTransactions("ShapesOp")
7093         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
7094             """
7095             Replace coincident faces in theShapes by one face.
7096
7097             Parameters:
7098                 theShapes Initial shapes, either a list or compound of shapes.
7099                 theTolerance Maximum distance between faces, which can be considered as coincident.
7100                 doKeepNonSolids If FALSE, only solids will present in the result,
7101                                 otherwise all initial shapes.
7102                 theName Object name; when specified, this parameter is used
7103                         for result publication in the study. Otherwise, if automatic
7104                         publication is switched on, default value is used for result name.
7105
7106             Returns:
7107                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7108             """
7109             # Example: see GEOM_Spanner.py
7110             theTolerance,Parameters = ParseParameters(theTolerance)
7111             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
7112             if anObj is None:
7113                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
7114             anObj.SetParameters(Parameters)
7115             self._autoPublish(anObj, theName, "glueFaces")
7116             return anObj
7117
7118         ## Find coincident faces in \a theShapes for possible gluing.
7119         #  @param theShapes Initial shapes, either a list or compound of shapes.
7120         #  @param theTolerance Maximum distance between faces,
7121         #                      which can be considered as coincident.
7122         #  @param 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         #  @return GEOM.ListOfGO
7127         #
7128         #  @ref tui_glue_faces "Example"
7129         @ManageTransactions("ShapesOp")
7130         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
7131             """
7132             Find coincident faces in theShapes for possible gluing.
7133
7134             Parameters:
7135                 theShapes Initial shapes, either a list or compound of shapes.
7136                 theTolerance Maximum distance between faces,
7137                              which can be considered as coincident.
7138                 theName Object name; when specified, this parameter is used
7139                         for result publication in the study. Otherwise, if automatic
7140                         publication is switched on, default value is used for result name.
7141
7142             Returns:
7143                 GEOM.ListOfGO
7144             """
7145             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
7146             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
7147             self._autoPublish(anObj, theName, "facesToGlue")
7148             return anObj
7149
7150         ## Replace coincident faces in \a theShapes by one face
7151         #  in compliance with given list of faces
7152         #  @param theShapes Initial shapes, either a list or compound of shapes.
7153         #  @param theTolerance Maximum distance between faces,
7154         #                      which can be considered as coincident.
7155         #  @param theFaces List of faces for gluing.
7156         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
7157         #                         otherwise all initial shapes.
7158         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
7159         #                        will be glued, otherwise only the edges,
7160         #                        belonging to <VAR>theFaces</VAR>.
7161         #  @param theName Object name; when specified, this parameter is used
7162         #         for result publication in the study. Otherwise, if automatic
7163         #         publication is switched on, default value is used for result name.
7164         #
7165         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7166         #
7167         #  @ref tui_glue_faces "Example"
7168         @ManageTransactions("ShapesOp")
7169         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
7170                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
7171             """
7172             Replace coincident faces in theShapes by one face
7173             in compliance with given list of faces
7174
7175             Parameters:
7176                 theShapes theShapes Initial shapes, either a list or compound of shapes.
7177                 theTolerance Maximum distance between faces,
7178                              which can be considered as coincident.
7179                 theFaces List of faces for gluing.
7180                 doKeepNonSolids If FALSE, only solids will present in the result,
7181                                 otherwise all initial shapes.
7182                 doGlueAllEdges If TRUE, all coincident edges of theShape
7183                                will be glued, otherwise only the edges,
7184                                belonging to theFaces.
7185                 theName Object name; when specified, this parameter is used
7186                         for result publication in the study. Otherwise, if automatic
7187                         publication is switched on, default value is used for result name.
7188
7189             Returns:
7190                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
7191             """
7192             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, theFaces,
7193                                                       doKeepNonSolids, doGlueAllEdges)
7194             if anObj is None:
7195                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
7196             self._autoPublish(anObj, theName, "glueFaces")
7197             return anObj
7198
7199         ## Replace coincident edges in \a theShapes by one edge.
7200         #  @param theShapes Initial shapes, either a list or compound of shapes.
7201         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
7202         #  @param theName Object name; when specified, this parameter is used
7203         #         for result publication in the study. Otherwise, if automatic
7204         #         publication is switched on, default value is used for result name.
7205         #
7206         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7207         #
7208         #  @ref tui_glue_edges "Example"
7209         @ManageTransactions("ShapesOp")
7210         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
7211             """
7212             Replace coincident edges in theShapes by one edge.
7213
7214             Parameters:
7215                 theShapes Initial shapes, either a list or compound of shapes.
7216                 theTolerance Maximum distance between edges, which can be considered as coincident.
7217                 theName Object name; when specified, this parameter is used
7218                         for result publication in the study. Otherwise, if automatic
7219                         publication is switched on, default value is used for result name.
7220
7221             Returns:
7222                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7223             """
7224             theTolerance,Parameters = ParseParameters(theTolerance)
7225             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
7226             if anObj is None:
7227                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
7228             anObj.SetParameters(Parameters)
7229             self._autoPublish(anObj, theName, "glueEdges")
7230             return anObj
7231
7232         ## Find coincident edges in \a theShapes for possible gluing.
7233         #  @param theShapes Initial shapes, either a list or compound of shapes.
7234         #  @param theTolerance Maximum distance between edges,
7235         #                      which can be considered as coincident.
7236         #  @param theName Object name; when specified, this parameter is used
7237         #         for result publication in the study. Otherwise, if automatic
7238         #         publication is switched on, default value is used for result name.
7239         #
7240         #  @return GEOM.ListOfGO
7241         #
7242         #  @ref tui_glue_edges "Example"
7243         @ManageTransactions("ShapesOp")
7244         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
7245             """
7246             Find coincident edges in theShapes for possible gluing.
7247
7248             Parameters:
7249                 theShapes Initial shapes, either a list or compound of shapes.
7250                 theTolerance Maximum distance between edges,
7251                              which can be considered as coincident.
7252                 theName Object name; when specified, this parameter is used
7253                         for result publication in the study. Otherwise, if automatic
7254                         publication is switched on, default value is used for result name.
7255
7256             Returns:
7257                 GEOM.ListOfGO
7258             """
7259             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
7260             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
7261             self._autoPublish(anObj, theName, "edgesToGlue")
7262             return anObj
7263
7264         ## Replace coincident edges in theShapes by one edge
7265         #  in compliance with given list of edges.
7266         #  @param theShapes Initial shapes, either a list or compound of shapes.
7267         #  @param theTolerance Maximum distance between edges,
7268         #                      which can be considered as coincident.
7269         #  @param theEdges List of edges for gluing.
7270         #  @param theName Object name; when specified, this parameter is used
7271         #         for result publication in the study. Otherwise, if automatic
7272         #         publication is switched on, default value is used for result name.
7273         #
7274         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7275         #
7276         #  @ref tui_glue_edges "Example"
7277         @ManageTransactions("ShapesOp")
7278         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
7279             """
7280             Replace coincident edges in theShapes by one edge
7281             in compliance with given list of edges.
7282
7283             Parameters:
7284                 theShapes Initial shapes, either a list or compound of shapes.
7285                 theTolerance Maximum distance between edges,
7286                              which can be considered as coincident.
7287                 theEdges List of edges for gluing.
7288                 theName Object name; when specified, this parameter is used
7289                         for result publication in the study. Otherwise, if automatic
7290                         publication is switched on, default value is used for result name.
7291
7292             Returns:
7293                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7294             """
7295             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7296             if anObj is None:
7297                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7298             self._autoPublish(anObj, theName, "glueEdges")
7299             return anObj
7300
7301         # end of l3_healing
7302         ## @}
7303
7304         ## @addtogroup l3_boolean Boolean Operations
7305         ## @{
7306
7307         # -----------------------------------------------------------------------------
7308         # Boolean (Common, Cut, Fuse, Section)
7309         # -----------------------------------------------------------------------------
7310
7311         ## Perform one of boolean operations on two given shapes.
7312         #  @param theShape1 First argument for boolean operation.
7313         #  @param theShape2 Second argument for boolean operation.
7314         #  @param theOperation Indicates the operation to be done:\n
7315         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7316         #  @param checkSelfInte The flag that tells if the arguments should
7317         #         be checked for self-intersection prior to the operation.
7318         #  @param theName Object name; when specified, this parameter is used
7319         #         for result publication in the study. Otherwise, if automatic
7320         #         publication is switched on, default value is used for result name.
7321         #
7322         #  @note This algorithm doesn't find all types of self-intersections.
7323         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7324         #        vertex/face and edge/face intersections. Face/face
7325         #        intersections detection is switched off as it is a
7326         #        time-consuming operation that gives an impact on performance.
7327         #        To find all self-intersections please use
7328         #        CheckSelfIntersections() method.
7329         #
7330         #  @return New GEOM.GEOM_Object, containing the result shape.
7331         #
7332         #  @ref tui_fuse "Example"
7333         @ManageTransactions("BoolOp")
7334         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7335             """
7336             Perform one of boolean operations on two given shapes.
7337
7338             Parameters:
7339                 theShape1 First argument for boolean operation.
7340                 theShape2 Second argument for boolean operation.
7341                 theOperation Indicates the operation to be done:
7342                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7343                 checkSelfInte The flag that tells if the arguments should
7344                               be checked for self-intersection prior to
7345                               the operation.
7346                 theName Object name; when specified, this parameter is used
7347                         for result publication in the study. Otherwise, if automatic
7348                         publication is switched on, default value is used for result name.
7349
7350             Note:
7351                     This algorithm doesn't find all types of self-intersections.
7352                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7353                     vertex/face and edge/face intersections. Face/face
7354                     intersections detection is switched off as it is a
7355                     time-consuming operation that gives an impact on performance.
7356                     To find all self-intersections please use
7357                     CheckSelfIntersections() method.
7358
7359             Returns:
7360                 New GEOM.GEOM_Object, containing the result shape.
7361             """
7362             # Example: see GEOM_TestAll.py
7363             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7364             RaiseIfFailed("MakeBoolean", self.BoolOp)
7365             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7366             self._autoPublish(anObj, theName, def_names[theOperation])
7367             return anObj
7368
7369         ## Perform Common boolean operation on two given shapes.
7370         #  @param theShape1 First argument for boolean operation.
7371         #  @param theShape2 Second argument for boolean operation.
7372         #  @param checkSelfInte The flag that tells if the arguments should
7373         #         be checked for self-intersection prior to the operation.
7374         #  @param theName Object name; when specified, this parameter is used
7375         #         for result publication in the study. Otherwise, if automatic
7376         #         publication is switched on, default value is used for result name.
7377         #
7378         #  @note This algorithm doesn't find all types of self-intersections.
7379         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7380         #        vertex/face and edge/face intersections. Face/face
7381         #        intersections detection is switched off as it is a
7382         #        time-consuming operation that gives an impact on performance.
7383         #        To find all self-intersections please use
7384         #        CheckSelfIntersections() method.
7385         #
7386         #  @return New GEOM.GEOM_Object, containing the result shape.
7387         #
7388         #  @ref tui_common "Example 1"
7389         #  \n @ref swig_MakeCommon "Example 2"
7390         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7391             """
7392             Perform Common boolean operation on two given shapes.
7393
7394             Parameters:
7395                 theShape1 First argument for boolean operation.
7396                 theShape2 Second argument for boolean operation.
7397                 checkSelfInte The flag that tells if the arguments should
7398                               be checked for self-intersection prior to
7399                               the operation.
7400                 theName Object name; when specified, this parameter is used
7401                         for result publication in the study. Otherwise, if automatic
7402                         publication is switched on, default value is used for result name.
7403
7404             Note:
7405                     This algorithm doesn't find all types of self-intersections.
7406                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7407                     vertex/face and edge/face intersections. Face/face
7408                     intersections detection is switched off as it is a
7409                     time-consuming operation that gives an impact on performance.
7410                     To find all self-intersections please use
7411                     CheckSelfIntersections() method.
7412
7413             Returns:
7414                 New GEOM.GEOM_Object, containing the result shape.
7415             """
7416             # Example: see GEOM_TestOthers.py
7417             # note: auto-publishing is done in self.MakeBoolean()
7418             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7419
7420         ## Perform Cut boolean operation on two given shapes.
7421         #  @param theShape1 First argument for boolean operation.
7422         #  @param theShape2 Second argument for boolean operation.
7423         #  @param checkSelfInte The flag that tells if the arguments should
7424         #         be checked for self-intersection prior to the operation.
7425         #  @param theName Object name; when specified, this parameter is used
7426         #         for result publication in the study. Otherwise, if automatic
7427         #         publication is switched on, default value is used for result name.
7428         #
7429         #  @note This algorithm doesn't find all types of self-intersections.
7430         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7431         #        vertex/face and edge/face intersections. Face/face
7432         #        intersections detection is switched off as it is a
7433         #        time-consuming operation that gives an impact on performance.
7434         #        To find all self-intersections please use
7435         #        CheckSelfIntersections() method.
7436         #
7437         #  @return New GEOM.GEOM_Object, containing the result shape.
7438         #
7439         #  @ref tui_cut "Example 1"
7440         #  \n @ref swig_MakeCommon "Example 2"
7441         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7442             """
7443             Perform Cut boolean operation on two given shapes.
7444
7445             Parameters:
7446                 theShape1 First argument for boolean operation.
7447                 theShape2 Second argument for boolean operation.
7448                 checkSelfInte The flag that tells if the arguments should
7449                               be checked for self-intersection prior to
7450                               the operation.
7451                 theName Object name; when specified, this parameter is used
7452                         for result publication in the study. Otherwise, if automatic
7453                         publication is switched on, default value is used for result name.
7454
7455             Note:
7456                     This algorithm doesn't find all types of self-intersections.
7457                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7458                     vertex/face and edge/face intersections. Face/face
7459                     intersections detection is switched off as it is a
7460                     time-consuming operation that gives an impact on performance.
7461                     To find all self-intersections please use
7462                     CheckSelfIntersections() method.
7463
7464             Returns:
7465                 New GEOM.GEOM_Object, containing the result shape.
7466
7467             """
7468             # Example: see GEOM_TestOthers.py
7469             # note: auto-publishing is done in self.MakeBoolean()
7470             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7471
7472         ## Perform Fuse boolean operation on two given shapes.
7473         #  @param theShape1 First argument for boolean operation.
7474         #  @param theShape2 Second argument for boolean operation.
7475         #  @param checkSelfInte The flag that tells if the arguments should
7476         #         be checked for self-intersection prior to the operation.
7477         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7478         #         operation should be performed during the operation.
7479         #  @param theName Object name; when specified, this parameter is used
7480         #         for result publication in the study. Otherwise, if automatic
7481         #         publication is switched on, default value is used for result name.
7482         #
7483         #  @note This algorithm doesn't find all types of self-intersections.
7484         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7485         #        vertex/face and edge/face intersections. Face/face
7486         #        intersections detection is switched off as it is a
7487         #        time-consuming operation that gives an impact on performance.
7488         #        To find all self-intersections please use
7489         #        CheckSelfIntersections() method.
7490         #
7491         #  @return New GEOM.GEOM_Object, containing the result shape.
7492         #
7493         #  @ref tui_fuse "Example 1"
7494         #  \n @ref swig_MakeCommon "Example 2"
7495         @ManageTransactions("BoolOp")
7496         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7497                      rmExtraEdges=False, theName=None):
7498             """
7499             Perform Fuse boolean operation on two given shapes.
7500
7501             Parameters:
7502                 theShape1 First argument for boolean operation.
7503                 theShape2 Second argument for boolean operation.
7504                 checkSelfInte The flag that tells if the arguments should
7505                               be checked for self-intersection prior to
7506                               the operation.
7507                 rmExtraEdges The flag that tells if Remove Extra Edges
7508                              operation should be performed during the operation.
7509                 theName Object name; when specified, this parameter is used
7510                         for result publication in the study. Otherwise, if automatic
7511                         publication is switched on, default value is used for result name.
7512
7513             Note:
7514                     This algorithm doesn't find all types of self-intersections.
7515                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7516                     vertex/face and edge/face intersections. Face/face
7517                     intersections detection is switched off as it is a
7518                     time-consuming operation that gives an impact on performance.
7519                     To find all self-intersections please use
7520                     CheckSelfIntersections() method.
7521
7522             Returns:
7523                 New GEOM.GEOM_Object, containing the result shape.
7524
7525             """
7526             # Example: see GEOM_TestOthers.py
7527             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7528                                          checkSelfInte, rmExtraEdges)
7529             RaiseIfFailed("MakeFuse", self.BoolOp)
7530             self._autoPublish(anObj, theName, "fuse")
7531             return anObj
7532
7533         ## Perform Section boolean operation on two given shapes.
7534         #  @param theShape1 First argument for boolean operation.
7535         #  @param theShape2 Second argument for boolean operation.
7536         #  @param checkSelfInte The flag that tells if the arguments should
7537         #         be checked for self-intersection prior to the operation.
7538         #         If a self-intersection detected the operation fails.
7539         #  @param theName Object name; when specified, this parameter is used
7540         #         for result publication in the study. Otherwise, if automatic
7541         #         publication is switched on, default value is used for result name.
7542         #  @return New GEOM.GEOM_Object, containing the result shape.
7543         #
7544         #  @ref tui_section "Example 1"
7545         #  \n @ref swig_MakeCommon "Example 2"
7546         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7547             """
7548             Perform Section boolean operation on two given shapes.
7549
7550             Parameters:
7551                 theShape1 First argument for boolean operation.
7552                 theShape2 Second argument for boolean operation.
7553                 checkSelfInte The flag that tells if the arguments should
7554                               be checked for self-intersection prior to the operation.
7555                               If a self-intersection detected the operation fails.
7556                 theName Object name; when specified, this parameter is used
7557                         for result publication in the study. Otherwise, if automatic
7558                         publication is switched on, default value is used for result name.
7559             Returns:
7560                 New GEOM.GEOM_Object, containing the result shape.
7561
7562             """
7563             # Example: see GEOM_TestOthers.py
7564             # note: auto-publishing is done in self.MakeBoolean()
7565             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7566
7567         ## Perform Fuse boolean operation on the list of shapes.
7568         #  @param theShapesList Shapes to be fused.
7569         #  @param checkSelfInte The flag that tells if the arguments should
7570         #         be checked for self-intersection prior to the operation.
7571         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7572         #         operation should be performed during the operation.
7573         #  @param theName Object name; when specified, this parameter is used
7574         #         for result publication in the study. Otherwise, if automatic
7575         #         publication is switched on, default value is used for result name.
7576         #
7577         #  @note This algorithm doesn't find all types of self-intersections.
7578         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7579         #        vertex/face and edge/face intersections. Face/face
7580         #        intersections detection is switched off as it is a
7581         #        time-consuming operation that gives an impact on performance.
7582         #        To find all self-intersections please use
7583         #        CheckSelfIntersections() method.
7584         #
7585         #  @return New GEOM.GEOM_Object, containing the result shape.
7586         #
7587         #  @ref tui_fuse "Example 1"
7588         #  \n @ref swig_MakeCommon "Example 2"
7589         @ManageTransactions("BoolOp")
7590         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7591                          rmExtraEdges=False, theName=None):
7592             """
7593             Perform Fuse boolean operation on the list of shapes.
7594
7595             Parameters:
7596                 theShapesList Shapes to be fused.
7597                 checkSelfInte The flag that tells if the arguments should
7598                               be checked for self-intersection prior to
7599                               the operation.
7600                 rmExtraEdges The flag that tells if Remove Extra Edges
7601                              operation should be performed during the operation.
7602                 theName Object name; when specified, this parameter is used
7603                         for result publication in the study. Otherwise, if automatic
7604                         publication is switched on, default value is used for result name.
7605
7606             Note:
7607                     This algorithm doesn't find all types of self-intersections.
7608                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7609                     vertex/face and edge/face intersections. Face/face
7610                     intersections detection is switched off as it is a
7611                     time-consuming operation that gives an impact on performance.
7612                     To find all self-intersections please use
7613                     CheckSelfIntersections() method.
7614
7615             Returns:
7616                 New GEOM.GEOM_Object, containing the result shape.
7617
7618             """
7619             # Example: see GEOM_TestOthers.py
7620             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7621                                              rmExtraEdges)
7622             RaiseIfFailed("MakeFuseList", self.BoolOp)
7623             self._autoPublish(anObj, theName, "fuse")
7624             return anObj
7625
7626         ## Perform Common boolean operation on the list of shapes.
7627         #  @param theShapesList Shapes for Common operation.
7628         #  @param checkSelfInte The flag that tells if the arguments should
7629         #         be checked for self-intersection prior to the operation.
7630         #  @param theName Object name; when specified, this parameter is used
7631         #         for result publication in the study. Otherwise, if automatic
7632         #         publication is switched on, default value is used for result name.
7633         #
7634         #  @note This algorithm doesn't find all types of self-intersections.
7635         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7636         #        vertex/face and edge/face intersections. Face/face
7637         #        intersections detection is switched off as it is a
7638         #        time-consuming operation that gives an impact on performance.
7639         #        To find all self-intersections please use
7640         #        CheckSelfIntersections() method.
7641         #
7642         #  @return New GEOM.GEOM_Object, containing the result shape.
7643         #
7644         #  @ref tui_common "Example 1"
7645         #  \n @ref swig_MakeCommon "Example 2"
7646         @ManageTransactions("BoolOp")
7647         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7648             """
7649             Perform Common boolean operation on the list of shapes.
7650
7651             Parameters:
7652                 theShapesList Shapes for Common operation.
7653                 checkSelfInte The flag that tells if the arguments should
7654                               be checked for self-intersection prior to
7655                               the operation.
7656                 theName Object name; when specified, this parameter is used
7657                         for result publication in the study. Otherwise, if automatic
7658                         publication is switched on, default value is used for result name.
7659
7660             Note:
7661                     This algorithm doesn't find all types of self-intersections.
7662                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7663                     vertex/face and edge/face intersections. Face/face
7664                     intersections detection is switched off as it is a
7665                     time-consuming operation that gives an impact on performance.
7666                     To find all self-intersections please use
7667                     CheckSelfIntersections() method.
7668
7669             Returns:
7670                 New GEOM.GEOM_Object, containing the result shape.
7671
7672             """
7673             # Example: see GEOM_TestOthers.py
7674             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7675             RaiseIfFailed("MakeCommonList", self.BoolOp)
7676             self._autoPublish(anObj, theName, "common")
7677             return anObj
7678
7679         ## Perform Cut boolean operation on one object and the list of tools.
7680         #  @param theMainShape The object of the operation.
7681         #  @param theShapesList The list of tools of the operation.
7682         #  @param checkSelfInte The flag that tells if the arguments should
7683         #         be checked for self-intersection prior to the operation.
7684         #  @param theName Object name; when specified, this parameter is used
7685         #         for result publication in the study. Otherwise, if automatic
7686         #         publication is switched on, default value is used for result name.
7687         #
7688         #  @note This algorithm doesn't find all types of self-intersections.
7689         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7690         #        vertex/face and edge/face intersections. Face/face
7691         #        intersections detection is switched off as it is a
7692         #        time-consuming operation that gives an impact on performance.
7693         #        To find all self-intersections please use
7694         #        CheckSelfIntersections() method.
7695         #
7696         #  @return New GEOM.GEOM_Object, containing the result shape.
7697         #
7698         #  @ref tui_cut "Example 1"
7699         #  \n @ref swig_MakeCommon "Example 2"
7700         @ManageTransactions("BoolOp")
7701         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7702             """
7703             Perform Cut boolean operation on one object and the list of tools.
7704
7705             Parameters:
7706                 theMainShape The object of the operation.
7707                 theShapesList The list of tools of the operation.
7708                 checkSelfInte The flag that tells if the arguments should
7709                               be checked for self-intersection prior to
7710                               the operation.
7711                 theName Object name; when specified, this parameter is used
7712                         for result publication in the study. Otherwise, if automatic
7713                         publication is switched on, default value is used for result name.
7714
7715             Note:
7716                     This algorithm doesn't find all types of self-intersections.
7717                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7718                     vertex/face and edge/face intersections. Face/face
7719                     intersections detection is switched off as it is a
7720                     time-consuming operation that gives an impact on performance.
7721                     To find all self-intersections please use
7722                     CheckSelfIntersections() method.
7723
7724             Returns:
7725                 New GEOM.GEOM_Object, containing the result shape.
7726
7727             """
7728             # Example: see GEOM_TestOthers.py
7729             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7730             RaiseIfFailed("MakeCutList", self.BoolOp)
7731             self._autoPublish(anObj, theName, "cut")
7732             return anObj
7733
7734         # end of l3_boolean
7735         ## @}
7736
7737         ## @addtogroup l3_basic_op
7738         ## @{
7739
7740         ## Perform partition operation.
7741         #  @param ListShapes Shapes to be intersected.
7742         #  @param ListTools Shapes to intersect theShapes.
7743         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7744         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7745         #         type will be detected automatically.
7746         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7747         #                             target type (equal to Limit) are kept in the result,
7748         #                             else standalone shapes of lower dimension
7749         #                             are kept also (if they exist).
7750         #
7751         #  @param theName Object name; when specified, this parameter is used
7752         #         for result publication in the study. Otherwise, if automatic
7753         #         publication is switched on, default value is used for result name.
7754         #
7755         #  @note Each compound from ListShapes and ListTools will be exploded
7756         #        in order to avoid possible intersection between shapes from this compound.
7757         #
7758         #  After implementation new version of PartitionAlgo (October 2006)
7759         #  other parameters are ignored by current functionality. They are kept
7760         #  in this function only for support old versions.
7761         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7762         #         Each shape from theKeepInside must belong to theShapes also.
7763         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7764         #         Each shape from theRemoveInside must belong to theShapes also.
7765         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7766         #      @param ListMaterials Material indices for each shape. Make sence,
7767         #         only if theRemoveWebs is TRUE.
7768         #
7769         #  @return New GEOM.GEOM_Object, containing the result shapes.
7770         #
7771         #  @ref tui_partition "Example"
7772         @ManageTransactions("BoolOp")
7773         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7774                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7775                           KeepNonlimitShapes=0, theName=None):
7776             """
7777             Perform partition operation.
7778
7779             Parameters:
7780                 ListShapes Shapes to be intersected.
7781                 ListTools Shapes to intersect theShapes.
7782                 Limit Type of resulting shapes (see geompy.ShapeType)
7783                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7784                       type will be detected automatically.
7785                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7786                                     target type (equal to Limit) are kept in the result,
7787                                     else standalone shapes of lower dimension
7788                                     are kept also (if they exist).
7789
7790                 theName Object name; when specified, this parameter is used
7791                         for result publication in the study. Otherwise, if automatic
7792                         publication is switched on, default value is used for result name.
7793             Note:
7794                     Each compound from ListShapes and ListTools will be exploded
7795                     in order to avoid possible intersection between shapes from
7796                     this compound.
7797
7798             After implementation new version of PartitionAlgo (October 2006) other
7799             parameters are ignored by current functionality. They are kept in this
7800             function only for support old versions.
7801
7802             Ignored parameters:
7803                 ListKeepInside Shapes, outside which the results will be deleted.
7804                                Each shape from theKeepInside must belong to theShapes also.
7805                 ListRemoveInside Shapes, inside which the results will be deleted.
7806                                  Each shape from theRemoveInside must belong to theShapes also.
7807                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7808                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7809
7810             Returns:
7811                 New GEOM.GEOM_Object, containing the result shapes.
7812             """
7813             # Example: see GEOM_TestAll.py
7814             if Limit == self.ShapeType["AUTO"]:
7815                 # automatic detection of the most appropriate shape limit type
7816                 lim = GEOM.SHAPE
7817                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7818                 Limit = EnumToLong(lim)
7819                 pass
7820             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7821                                               ListKeepInside, ListRemoveInside,
7822                                               Limit, RemoveWebs, ListMaterials,
7823                                               KeepNonlimitShapes);
7824             RaiseIfFailed("MakePartition", self.BoolOp)
7825             self._autoPublish(anObj, theName, "partition")
7826             return anObj
7827
7828         ## Perform partition operation.
7829         #  This method may be useful if it is needed to make a partition for
7830         #  compound contains nonintersected shapes. Performance will be better
7831         #  since intersection between shapes from compound is not performed.
7832         #
7833         #  Description of all parameters as in previous method MakePartition().
7834         #  One additional parameter is provided:
7835         #  @param checkSelfInte The flag that tells if the arguments should
7836         #         be checked for self-intersection prior to the operation.
7837         #
7838         #  @note This algorithm doesn't find all types of self-intersections.
7839         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7840         #        vertex/face and edge/face intersections. Face/face
7841         #        intersections detection is switched off as it is a
7842         #        time-consuming operation that gives an impact on performance.
7843         #        To find all self-intersections please use
7844         #        CheckSelfIntersections() method.
7845         #
7846         #  @note Passed compounds (via ListShapes or via ListTools)
7847         #           have to consist of nonintersecting shapes.
7848         #
7849         #  @return New GEOM.GEOM_Object, containing the result shapes.
7850         #
7851         #  @ref swig_todo "Example"
7852         @ManageTransactions("BoolOp")
7853         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7854                                                  ListKeepInside=[], ListRemoveInside=[],
7855                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7856                                                  ListMaterials=[], KeepNonlimitShapes=0,
7857                                                  checkSelfInte=False, theName=None):
7858             """
7859             Perform partition operation.
7860             This method may be useful if it is needed to make a partition for
7861             compound contains nonintersected shapes. Performance will be better
7862             since intersection between shapes from compound is not performed.
7863
7864             Parameters:
7865                 Description of all parameters as in method geompy.MakePartition.
7866                 One additional parameter is provided:
7867                 checkSelfInte The flag that tells if the arguments should
7868                               be checked for self-intersection prior to
7869                               the operation.
7870
7871             Note:
7872                     This algorithm doesn't find all types of self-intersections.
7873                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7874                     vertex/face and edge/face intersections. Face/face
7875                     intersections detection is switched off as it is a
7876                     time-consuming operation that gives an impact on performance.
7877                     To find all self-intersections please use
7878                     CheckSelfIntersections() method.
7879
7880             NOTE:
7881                 Passed compounds (via ListShapes or via ListTools)
7882                 have to consist of nonintersecting shapes.
7883
7884             Returns:
7885                 New GEOM.GEOM_Object, containing the result shapes.
7886             """
7887             if Limit == self.ShapeType["AUTO"]:
7888                 # automatic detection of the most appropriate shape limit type
7889                 lim = GEOM.SHAPE
7890                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7891                 Limit = EnumToLong(lim)
7892                 pass
7893             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7894                                                                      ListKeepInside, ListRemoveInside,
7895                                                                      Limit, RemoveWebs, ListMaterials,
7896                                                                      KeepNonlimitShapes, checkSelfInte);
7897             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7898             self._autoPublish(anObj, theName, "partition")
7899             return anObj
7900
7901         ## See method MakePartition() for more information.
7902         #
7903         #  @ref tui_partition "Example 1"
7904         #  \n @ref swig_Partition "Example 2"
7905         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7906                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7907                       KeepNonlimitShapes=0, theName=None):
7908             """
7909             See method geompy.MakePartition for more information.
7910             """
7911             # Example: see GEOM_TestOthers.py
7912             # note: auto-publishing is done in self.MakePartition()
7913             anObj = self.MakePartition(ListShapes, ListTools,
7914                                        ListKeepInside, ListRemoveInside,
7915                                        Limit, RemoveWebs, ListMaterials,
7916                                        KeepNonlimitShapes, theName);
7917             return anObj
7918
7919         ## Perform partition of the Shape with the Plane
7920         #  @param theShape Shape to be intersected.
7921         #  @param thePlane Tool shape, to intersect theShape.
7922         #  @param theName Object name; when specified, this parameter is used
7923         #         for result publication in the study. Otherwise, if automatic
7924         #         publication is switched on, default value is used for result name.
7925         #
7926         #  @return New GEOM.GEOM_Object, containing the result shape.
7927         #
7928         #  @ref tui_partition "Example"
7929         @ManageTransactions("BoolOp")
7930         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7931             """
7932             Perform partition of the Shape with the Plane
7933
7934             Parameters:
7935                 theShape Shape to be intersected.
7936                 thePlane Tool shape, to intersect theShape.
7937                 theName Object name; when specified, this parameter is used
7938                         for result publication in the study. Otherwise, if automatic
7939                         publication is switched on, default value is used for result name.
7940
7941             Returns:
7942                 New GEOM.GEOM_Object, containing the result shape.
7943             """
7944             # Example: see GEOM_TestAll.py
7945             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7946             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7947             self._autoPublish(anObj, theName, "partition")
7948             return anObj
7949
7950         # end of l3_basic_op
7951         ## @}
7952
7953         ## @addtogroup l3_transform
7954         ## @{
7955
7956         ## Translate the given object along the vector, specified
7957         #  by its end points.
7958         #  @param theObject The object to be translated.
7959         #  @param thePoint1 Start point of translation vector.
7960         #  @param thePoint2 End point of translation vector.
7961         #  @param theCopy Flag used to translate object itself or create a copy.
7962         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7963         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7964         @ManageTransactions("TrsfOp")
7965         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7966             """
7967             Translate the given object along the vector, specified by its end points.
7968
7969             Parameters:
7970                 theObject The object to be translated.
7971                 thePoint1 Start point of translation vector.
7972                 thePoint2 End point of translation vector.
7973                 theCopy Flag used to translate object itself or create a copy.
7974
7975             Returns:
7976                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7977                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7978             """
7979             if theCopy:
7980                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7981             else:
7982                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7983             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7984             return anObj
7985
7986         ## Translate the given object along the vector, specified
7987         #  by its end points, creating its copy before the translation.
7988         #  @param theObject The object to be translated.
7989         #  @param thePoint1 Start point of translation vector.
7990         #  @param thePoint2 End point of translation vector.
7991         #  @param theName Object name; when specified, this parameter is used
7992         #         for result publication in the study. Otherwise, if automatic
7993         #         publication is switched on, default value is used for result name.
7994         #
7995         #  @return New GEOM.GEOM_Object, containing the translated object.
7996         #
7997         #  @ref tui_translation "Example 1"
7998         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7999         @ManageTransactions("TrsfOp")
8000         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8001             """
8002             Translate the given object along the vector, specified
8003             by its end points, creating its copy before the translation.
8004
8005             Parameters:
8006                 theObject The object to be translated.
8007                 thePoint1 Start point of translation vector.
8008                 thePoint2 End point of translation vector.
8009                 theName Object name; when specified, this parameter is used
8010                         for result publication in the study. Otherwise, if automatic
8011                         publication is switched on, default value is used for result name.
8012
8013             Returns:
8014                 New GEOM.GEOM_Object, containing the translated object.
8015             """
8016             # Example: see GEOM_TestAll.py
8017             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8018             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8019             self._autoPublish(anObj, theName, "translated")
8020             return anObj
8021
8022         ## Translate the given object along the vector, specified by its components.
8023         #  @param theObject The object to be translated.
8024         #  @param theDX,theDY,theDZ Components of translation vector.
8025         #  @param theCopy Flag used to translate object itself or create a copy.
8026         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8027         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8028         #
8029         #  @ref tui_translation "Example"
8030         @ManageTransactions("TrsfOp")
8031         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8032             """
8033             Translate the given object along the vector, specified by its components.
8034
8035             Parameters:
8036                 theObject The object to be translated.
8037                 theDX,theDY,theDZ Components of translation vector.
8038                 theCopy Flag used to translate object itself or create a copy.
8039
8040             Returns:
8041                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8042                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8043             """
8044             # Example: see GEOM_TestAll.py
8045             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8046             if theCopy:
8047                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8048             else:
8049                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8050             anObj.SetParameters(Parameters)
8051             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8052             return anObj
8053
8054         ## Translate the given object along the vector, specified
8055         #  by its components, creating its copy before the translation.
8056         #  @param theObject The object to be translated.
8057         #  @param theDX,theDY,theDZ Components of translation vector.
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 translated object.
8063         #
8064         #  @ref tui_translation "Example"
8065         @ManageTransactions("TrsfOp")
8066         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8067             """
8068             Translate the given object along the vector, specified
8069             by its components, creating its copy before the translation.
8070
8071             Parameters:
8072                 theObject The object to be translated.
8073                 theDX,theDY,theDZ Components of translation vector.
8074                 theName Object name; when specified, this parameter is used
8075                         for result publication in the study. Otherwise, if automatic
8076                         publication is switched on, default value is used for result name.
8077
8078             Returns:
8079                 New GEOM.GEOM_Object, containing the translated object.
8080             """
8081             # Example: see GEOM_TestAll.py
8082             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8083             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8084             anObj.SetParameters(Parameters)
8085             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8086             self._autoPublish(anObj, theName, "translated")
8087             return anObj
8088
8089         ## Translate the given object along the given vector.
8090         #  @param theObject The object to be translated.
8091         #  @param theVector The translation vector.
8092         #  @param theCopy Flag used to translate object itself or create a copy.
8093         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8094         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8095         @ManageTransactions("TrsfOp")
8096         def TranslateVector(self, theObject, theVector, theCopy=False):
8097             """
8098             Translate the given object along the given vector.
8099
8100             Parameters:
8101                 theObject The object to be translated.
8102                 theVector The translation vector.
8103                 theCopy Flag used to translate object itself or create a copy.
8104
8105             Returns:
8106                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8107                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8108             """
8109             if theCopy:
8110                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8111             else:
8112                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8113             RaiseIfFailed("TranslateVector", self.TrsfOp)
8114             return anObj
8115
8116         ## Translate the given object along the given vector,
8117         #  creating its copy before the translation.
8118         #  @param theObject The object to be translated.
8119         #  @param theVector The translation vector.
8120         #  @param theName Object name; when specified, this parameter is used
8121         #         for result publication in the study. Otherwise, if automatic
8122         #         publication is switched on, default value is used for result name.
8123         #
8124         #  @return New GEOM.GEOM_Object, containing the translated object.
8125         #
8126         #  @ref tui_translation "Example"
8127         @ManageTransactions("TrsfOp")
8128         def MakeTranslationVector(self, theObject, theVector, theName=None):
8129             """
8130             Translate the given object along the given vector,
8131             creating its copy before the translation.
8132
8133             Parameters:
8134                 theObject The object to be translated.
8135                 theVector The translation vector.
8136                 theName Object name; when specified, this parameter is used
8137                         for result publication in the study. Otherwise, if automatic
8138                         publication is switched on, default value is used for result name.
8139
8140             Returns:
8141                 New GEOM.GEOM_Object, containing the translated object.
8142             """
8143             # Example: see GEOM_TestAll.py
8144             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8145             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8146             self._autoPublish(anObj, theName, "translated")
8147             return anObj
8148
8149         ## Translate the given object along the given vector on given distance.
8150         #  @param theObject The object to be translated.
8151         #  @param theVector The translation vector.
8152         #  @param theDistance The translation distance.
8153         #  @param theCopy Flag used to translate object itself or create a copy.
8154         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8155         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8156         #
8157         #  @ref tui_translation "Example"
8158         @ManageTransactions("TrsfOp")
8159         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8160             """
8161             Translate the given object along the given vector on given distance.
8162
8163             Parameters:
8164                 theObject The object to be translated.
8165                 theVector The translation vector.
8166                 theDistance The translation distance.
8167                 theCopy Flag used to translate object itself or create a copy.
8168
8169             Returns:
8170                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8171                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8172             """
8173             # Example: see GEOM_TestAll.py
8174             theDistance,Parameters = ParseParameters(theDistance)
8175             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8176             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8177             anObj.SetParameters(Parameters)
8178             return anObj
8179
8180         ## Translate the given object along the given vector on given distance,
8181         #  creating its copy before the translation.
8182         #  @param theObject The object to be translated.
8183         #  @param theVector The translation vector.
8184         #  @param theDistance The translation distance.
8185         #  @param theName Object name; when specified, this parameter is used
8186         #         for result publication in the study. Otherwise, if automatic
8187         #         publication is switched on, default value is used for result name.
8188         #
8189         #  @return New GEOM.GEOM_Object, containing the translated object.
8190         #
8191         #  @ref tui_translation "Example"
8192         @ManageTransactions("TrsfOp")
8193         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8194             """
8195             Translate the given object along the given vector on given distance,
8196             creating its copy before the translation.
8197
8198             Parameters:
8199                 theObject The object to be translated.
8200                 theVector The translation vector.
8201                 theDistance The translation distance.
8202                 theName Object name; when specified, this parameter is used
8203                         for result publication in the study. Otherwise, if automatic
8204                         publication is switched on, default value is used for result name.
8205
8206             Returns:
8207                 New GEOM.GEOM_Object, containing the translated object.
8208             """
8209             # Example: see GEOM_TestAll.py
8210             theDistance,Parameters = ParseParameters(theDistance)
8211             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8212             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8213             anObj.SetParameters(Parameters)
8214             self._autoPublish(anObj, theName, "translated")
8215             return anObj
8216
8217         ## Rotate the given object around the given axis on the given angle.
8218         #  @param theObject The object to be rotated.
8219         #  @param theAxis Rotation axis.
8220         #  @param theAngle Rotation angle in radians.
8221         #  @param theCopy Flag used to rotate object itself or create a copy.
8222         #
8223         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8224         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8225         #
8226         #  @ref tui_rotation "Example"
8227         @ManageTransactions("TrsfOp")
8228         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8229             """
8230             Rotate the given object around the given axis on the given angle.
8231
8232             Parameters:
8233                 theObject The object to be rotated.
8234                 theAxis Rotation axis.
8235                 theAngle Rotation angle in radians.
8236                 theCopy Flag used to rotate object itself or create a copy.
8237
8238             Returns:
8239                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8240                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8241             """
8242             # Example: see GEOM_TestAll.py
8243             flag = False
8244             if isinstance(theAngle,str):
8245                 flag = True
8246             theAngle, Parameters = ParseParameters(theAngle)
8247             if flag:
8248                 theAngle = theAngle*math.pi/180.0
8249             if theCopy:
8250                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8251             else:
8252                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8253             RaiseIfFailed("Rotate", self.TrsfOp)
8254             anObj.SetParameters(Parameters)
8255             return anObj
8256
8257         ## Rotate the given object around the given axis
8258         #  on the given angle, creating its copy before the rotation.
8259         #  @param theObject The object to be rotated.
8260         #  @param theAxis Rotation axis.
8261         #  @param theAngle Rotation angle in radians.
8262         #  @param theName Object name; when specified, this parameter is used
8263         #         for result publication in the study. Otherwise, if automatic
8264         #         publication is switched on, default value is used for result name.
8265         #
8266         #  @return New GEOM.GEOM_Object, containing the rotated object.
8267         #
8268         #  @ref tui_rotation "Example"
8269         @ManageTransactions("TrsfOp")
8270         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8271             """
8272             Rotate the given object around the given axis
8273             on the given angle, creating its copy before the rotatation.
8274
8275             Parameters:
8276                 theObject The object to be rotated.
8277                 theAxis Rotation axis.
8278                 theAngle Rotation angle in radians.
8279                 theName Object name; when specified, this parameter is used
8280                         for result publication in the study. Otherwise, if automatic
8281                         publication is switched on, default value is used for result name.
8282
8283             Returns:
8284                 New GEOM.GEOM_Object, containing the rotated object.
8285             """
8286             # Example: see GEOM_TestAll.py
8287             flag = False
8288             if isinstance(theAngle,str):
8289                 flag = True
8290             theAngle, Parameters = ParseParameters(theAngle)
8291             if flag:
8292                 theAngle = theAngle*math.pi/180.0
8293             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8294             RaiseIfFailed("RotateCopy", self.TrsfOp)
8295             anObj.SetParameters(Parameters)
8296             self._autoPublish(anObj, theName, "rotated")
8297             return anObj
8298
8299         ## Rotate given object around vector perpendicular to plane
8300         #  containing three points.
8301         #  @param theObject The object to be rotated.
8302         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8303         #  containing the three points.
8304         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8305         #  @param theCopy Flag used to rotate object itself or create a copy.
8306         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8307         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8308         @ManageTransactions("TrsfOp")
8309         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8310             """
8311             Rotate given object around vector perpendicular to plane
8312             containing three points.
8313
8314             Parameters:
8315                 theObject The object to be rotated.
8316                 theCentPoint central point  the axis is the vector perpendicular to the plane
8317                              containing the three points.
8318                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8319                 theCopy Flag used to rotate object itself or create a copy.
8320
8321             Returns:
8322                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8323                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8324             """
8325             if theCopy:
8326                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8327             else:
8328                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8329             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8330             return anObj
8331
8332         ## Rotate given object around vector perpendicular to plane
8333         #  containing three points, creating its copy before the rotatation.
8334         #  @param theObject The object to be rotated.
8335         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8336         #  containing the three points.
8337         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8338         #  @param 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         #  @return New GEOM.GEOM_Object, containing the rotated object.
8343         #
8344         #  @ref tui_rotation "Example"
8345         @ManageTransactions("TrsfOp")
8346         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8347             """
8348             Rotate given object around vector perpendicular to plane
8349             containing three points, creating its copy before the rotatation.
8350
8351             Parameters:
8352                 theObject The object to be rotated.
8353                 theCentPoint central point  the axis is the vector perpendicular to the plane
8354                              containing the three points.
8355                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8356                 theName Object name; when specified, this parameter is used
8357                         for result publication in the study. Otherwise, if automatic
8358                         publication is switched on, default value is used for result name.
8359
8360             Returns:
8361                 New GEOM.GEOM_Object, containing the rotated object.
8362             """
8363             # Example: see GEOM_TestAll.py
8364             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8365             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8366             self._autoPublish(anObj, theName, "rotated")
8367             return anObj
8368
8369         ## Scale the given object by the specified factor.
8370         #  @param theObject The object to be scaled.
8371         #  @param thePoint Center point for scaling.
8372         #                  Passing None for it means scaling relatively the origin of global CS.
8373         #  @param theFactor Scaling factor value.
8374         #  @param theCopy Flag used to scale object itself or create a copy.
8375         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8376         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8377         @ManageTransactions("TrsfOp")
8378         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8379             """
8380             Scale the given object by the specified factor.
8381
8382             Parameters:
8383                 theObject The object to be scaled.
8384                 thePoint Center point for scaling.
8385                          Passing None for it means scaling relatively the origin of global CS.
8386                 theFactor Scaling factor value.
8387                 theCopy Flag used to scale object itself or create a copy.
8388
8389             Returns:
8390                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8391                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8392             """
8393             # Example: see GEOM_TestAll.py
8394             theFactor, Parameters = ParseParameters(theFactor)
8395             if theCopy:
8396                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8397             else:
8398                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8399             RaiseIfFailed("Scale", self.TrsfOp)
8400             anObj.SetParameters(Parameters)
8401             return anObj
8402
8403         ## Scale the given object by the factor, creating its copy before the scaling.
8404         #  @param theObject The object to be scaled.
8405         #  @param thePoint Center point for scaling.
8406         #                  Passing None for it means scaling relatively the origin of global CS.
8407         #  @param theFactor Scaling factor value.
8408         #  @param theName Object name; when specified, this parameter is used
8409         #         for result publication in the study. Otherwise, if automatic
8410         #         publication is switched on, default value is used for result name.
8411         #
8412         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8413         #
8414         #  @ref tui_scale "Example"
8415         @ManageTransactions("TrsfOp")
8416         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8417             """
8418             Scale the given object by the factor, creating its copy before the scaling.
8419
8420             Parameters:
8421                 theObject The object to be scaled.
8422                 thePoint Center point for scaling.
8423                          Passing None for it means scaling relatively the origin of global CS.
8424                 theFactor Scaling factor value.
8425                 theName Object name; when specified, this parameter is used
8426                         for result publication in the study. Otherwise, if automatic
8427                         publication is switched on, default value is used for result name.
8428
8429             Returns:
8430                 New GEOM.GEOM_Object, containing the scaled shape.
8431             """
8432             # Example: see GEOM_TestAll.py
8433             theFactor, Parameters = ParseParameters(theFactor)
8434             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8435             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8436             anObj.SetParameters(Parameters)
8437             self._autoPublish(anObj, theName, "scaled")
8438             return anObj
8439
8440         ## Scale the given object by different factors along coordinate axes.
8441         #  @param theObject The object to be scaled.
8442         #  @param thePoint Center point for scaling.
8443         #                  Passing None for it means scaling relatively the origin of global CS.
8444         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8445         #  @param theCopy Flag used to scale object itself or create a copy.
8446         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8447         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8448         @ManageTransactions("TrsfOp")
8449         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8450             """
8451             Scale the given object by different factors along coordinate axes.
8452
8453             Parameters:
8454                 theObject The object to be scaled.
8455                 thePoint Center point for scaling.
8456                             Passing None for it means scaling relatively the origin of global CS.
8457                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8458                 theCopy Flag used to scale object itself or create a copy.
8459
8460             Returns:
8461                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8462                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8463             """
8464             # Example: see GEOM_TestAll.py
8465             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8466             if theCopy:
8467                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8468                                                             theFactorX, theFactorY, theFactorZ)
8469             else:
8470                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8471                                                         theFactorX, theFactorY, theFactorZ)
8472             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8473             anObj.SetParameters(Parameters)
8474             return anObj
8475
8476         ## Scale the given object by different factors along coordinate axes,
8477         #  creating its copy before the scaling.
8478         #  @param theObject The object to be scaled.
8479         #  @param thePoint Center point for scaling.
8480         #                  Passing None for it means scaling relatively the origin of global CS.
8481         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8482         #  @param theName Object name; when specified, this parameter is used
8483         #         for result publication in the study. Otherwise, if automatic
8484         #         publication is switched on, default value is used for result name.
8485         #
8486         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8487         #
8488         #  @ref swig_scale "Example"
8489         @ManageTransactions("TrsfOp")
8490         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8491             """
8492             Scale the given object by different factors along coordinate axes,
8493             creating its copy before the scaling.
8494
8495             Parameters:
8496                 theObject The object to be scaled.
8497                 thePoint Center point for scaling.
8498                             Passing None for it means scaling relatively the origin of global CS.
8499                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8500                 theName Object name; when specified, this parameter is used
8501                         for result publication in the study. Otherwise, if automatic
8502                         publication is switched on, default value is used for result name.
8503
8504             Returns:
8505                 New GEOM.GEOM_Object, containing the scaled shape.
8506             """
8507             # Example: see GEOM_TestAll.py
8508             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8509             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8510                                                         theFactorX, theFactorY, theFactorZ)
8511             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8512             anObj.SetParameters(Parameters)
8513             self._autoPublish(anObj, theName, "scaled")
8514             return anObj
8515
8516         ## Mirror an object relatively the given plane.
8517         #  @param theObject The object to be mirrored.
8518         #  @param thePlane Plane of symmetry.
8519         #  @param theCopy Flag used to mirror object itself or create a copy.
8520         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8521         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8522         @ManageTransactions("TrsfOp")
8523         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8524             """
8525             Mirror an object relatively the given plane.
8526
8527             Parameters:
8528                 theObject The object to be mirrored.
8529                 thePlane Plane of symmetry.
8530                 theCopy Flag used to mirror object itself or create a copy.
8531
8532             Returns:
8533                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8534                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8535             """
8536             if theCopy:
8537                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8538             else:
8539                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8540             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8541             return anObj
8542
8543         ## Create an object, symmetrical
8544         #  to the given one relatively the given plane.
8545         #  @param theObject The object to be mirrored.
8546         #  @param thePlane Plane of symmetry.
8547         #  @param theName Object name; when specified, this parameter is used
8548         #         for result publication in the study. Otherwise, if automatic
8549         #         publication is switched on, default value is used for result name.
8550         #
8551         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8552         #
8553         #  @ref tui_mirror "Example"
8554         @ManageTransactions("TrsfOp")
8555         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8556             """
8557             Create an object, symmetrical to the given one relatively the given plane.
8558
8559             Parameters:
8560                 theObject The object to be mirrored.
8561                 thePlane Plane of symmetry.
8562                 theName Object name; when specified, this parameter is used
8563                         for result publication in the study. Otherwise, if automatic
8564                         publication is switched on, default value is used for result name.
8565
8566             Returns:
8567                 New GEOM.GEOM_Object, containing the mirrored shape.
8568             """
8569             # Example: see GEOM_TestAll.py
8570             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8571             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8572             self._autoPublish(anObj, theName, "mirrored")
8573             return anObj
8574
8575         ## Mirror an object relatively the given axis.
8576         #  @param theObject The object to be mirrored.
8577         #  @param theAxis Axis of symmetry.
8578         #  @param theCopy Flag used to mirror object itself or create a copy.
8579         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8580         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8581         @ManageTransactions("TrsfOp")
8582         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8583             """
8584             Mirror an object relatively the given axis.
8585
8586             Parameters:
8587                 theObject The object to be mirrored.
8588                 theAxis Axis of symmetry.
8589                 theCopy Flag used to mirror object itself or create a copy.
8590
8591             Returns:
8592                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8593                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8594             """
8595             if theCopy:
8596                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8597             else:
8598                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8599             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8600             return anObj
8601
8602         ## Create an object, symmetrical
8603         #  to the given one relatively the given axis.
8604         #  @param theObject The object to be mirrored.
8605         #  @param theAxis Axis of symmetry.
8606         #  @param theName Object name; when specified, this parameter is used
8607         #         for result publication in the study. Otherwise, if automatic
8608         #         publication is switched on, default value is used for result name.
8609         #
8610         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8611         #
8612         #  @ref tui_mirror "Example"
8613         @ManageTransactions("TrsfOp")
8614         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8615             """
8616             Create an object, symmetrical to the given one relatively the given axis.
8617
8618             Parameters:
8619                 theObject The object to be mirrored.
8620                 theAxis Axis of symmetry.
8621                 theName Object name; when specified, this parameter is used
8622                         for result publication in the study. Otherwise, if automatic
8623                         publication is switched on, default value is used for result name.
8624
8625             Returns:
8626                 New GEOM.GEOM_Object, containing the mirrored shape.
8627             """
8628             # Example: see GEOM_TestAll.py
8629             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8630             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8631             self._autoPublish(anObj, theName, "mirrored")
8632             return anObj
8633
8634         ## Mirror an object relatively the given point.
8635         #  @param theObject The object to be mirrored.
8636         #  @param thePoint Point of symmetry.
8637         #  @param theCopy Flag used to mirror object itself or create a copy.
8638         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8639         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8640         @ManageTransactions("TrsfOp")
8641         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8642             """
8643             Mirror an object relatively the given point.
8644
8645             Parameters:
8646                 theObject The object to be mirrored.
8647                 thePoint Point of symmetry.
8648                 theCopy Flag used to mirror object itself or create a copy.
8649
8650             Returns:
8651                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8652                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8653             """
8654             # Example: see GEOM_TestAll.py
8655             if theCopy:
8656                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8657             else:
8658                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8659             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8660             return anObj
8661
8662         ## Create an object, symmetrical
8663         #  to the given one relatively the given point.
8664         #  @param theObject The object to be mirrored.
8665         #  @param thePoint Point of symmetry.
8666         #  @param theName Object name; when specified, this parameter is used
8667         #         for result publication in the study. Otherwise, if automatic
8668         #         publication is switched on, default value is used for result name.
8669         #
8670         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8671         #
8672         #  @ref tui_mirror "Example"
8673         @ManageTransactions("TrsfOp")
8674         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8675             """
8676             Create an object, symmetrical
8677             to the given one relatively the given point.
8678
8679             Parameters:
8680                 theObject The object to be mirrored.
8681                 thePoint Point of symmetry.
8682                 theName Object name; when specified, this parameter is used
8683                         for result publication in the study. Otherwise, if automatic
8684                         publication is switched on, default value is used for result name.
8685
8686             Returns:
8687                 New GEOM.GEOM_Object, containing the mirrored shape.
8688             """
8689             # Example: see GEOM_TestAll.py
8690             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8691             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8692             self._autoPublish(anObj, theName, "mirrored")
8693             return anObj
8694
8695         ## Modify the location of the given object.
8696         #  @param theObject The object to be displaced.
8697         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8698         #                     If \a theStartLCS is NULL, displacement
8699         #                     will be performed from global CS.\n
8700         #                     If \a theObject itself is used as \a theStartLCS,
8701         #                     its location will be changed to \a theEndLCS.
8702         #  @param theEndLCS Coordinate system to perform displacement to it.
8703         #  @param theCopy Flag used to displace object itself or create a copy.
8704         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8705         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8706         @ManageTransactions("TrsfOp")
8707         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8708             """
8709             Modify the Location of the given object by LCS, creating its copy before the setting.
8710
8711             Parameters:
8712                 theObject The object to be displaced.
8713                 theStartLCS Coordinate system to perform displacement from it.
8714                             If theStartLCS is NULL, displacement
8715                             will be performed from global CS.
8716                             If theObject itself is used as theStartLCS,
8717                             its location will be changed to theEndLCS.
8718                 theEndLCS Coordinate system to perform displacement to it.
8719                 theCopy Flag used to displace object itself or create a copy.
8720
8721             Returns:
8722                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8723                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8724             """
8725             # Example: see GEOM_TestAll.py
8726             if theCopy:
8727                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8728             else:
8729                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8730             RaiseIfFailed("Displace", self.TrsfOp)
8731             return anObj
8732
8733         ## Modify the Location of the given object by LCS,
8734         #  creating its copy before the setting.
8735         #  @param theObject The object to be displaced.
8736         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8737         #                     If \a theStartLCS is NULL, displacement
8738         #                     will be performed from global CS.\n
8739         #                     If \a theObject itself is used as \a theStartLCS,
8740         #                     its location will be changed to \a theEndLCS.
8741         #  @param theEndLCS Coordinate system to perform displacement to it.
8742         #  @param theName Object name; when specified, this parameter is used
8743         #         for result publication in the study. Otherwise, if automatic
8744         #         publication is switched on, default value is used for result name.
8745         #
8746         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8747         #
8748         #  @ref tui_modify_location "Example"
8749         @ManageTransactions("TrsfOp")
8750         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8751             """
8752             Modify the Location of the given object by LCS, creating its copy before the setting.
8753
8754             Parameters:
8755                 theObject The object to be displaced.
8756                 theStartLCS Coordinate system to perform displacement from it.
8757                             If theStartLCS is NULL, displacement
8758                             will be performed from global CS.
8759                             If theObject itself is used as theStartLCS,
8760                             its location will be changed to theEndLCS.
8761                 theEndLCS Coordinate system to perform displacement to it.
8762                 theName Object name; when specified, this parameter is used
8763                         for result publication in the study. Otherwise, if automatic
8764                         publication is switched on, default value is used for result name.
8765
8766             Returns:
8767                 New GEOM.GEOM_Object, containing the displaced shape.
8768
8769             Example of usage:
8770                 # create local coordinate systems
8771                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8772                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8773                 # modify the location of the given object
8774                 position = geompy.MakePosition(cylinder, cs1, cs2)
8775             """
8776             # Example: see GEOM_TestAll.py
8777             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8778             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8779             self._autoPublish(anObj, theName, "displaced")
8780             return anObj
8781
8782         ## Modify the Location of the given object by Path.
8783         #  @param  theObject The object to be displaced.
8784         #  @param  thePath Wire or Edge along that the object will be translated.
8785         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8786         #  @param  theCopy is to create a copy objects if true.
8787         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8788         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8789         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8790         #
8791         #  @ref tui_modify_location "Example"
8792         @ManageTransactions("TrsfOp")
8793         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8794             """
8795             Modify the Location of the given object by Path.
8796
8797             Parameters:
8798                  theObject The object to be displaced.
8799                  thePath Wire or Edge along that the object will be translated.
8800                  theDistance progress of Path (0 = start location, 1 = end of path location).
8801                  theCopy is to create a copy objects if true.
8802                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8803
8804             Returns:
8805                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8806                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8807
8808             Example of usage:
8809                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8810             """
8811             # Example: see GEOM_TestAll.py
8812             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8813             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8814             return anObj
8815
8816         ## Modify the Location of the given object by Path, creating its copy before the operation.
8817         #  @param theObject The object to be displaced.
8818         #  @param thePath Wire or Edge along that the object will be translated.
8819         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8820         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8821         #  @param theName Object name; when specified, this parameter is used
8822         #         for result publication in the study. Otherwise, if automatic
8823         #         publication is switched on, default value is used for result name.
8824         #
8825         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8826         @ManageTransactions("TrsfOp")
8827         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8828             """
8829             Modify the Location of the given object by Path, creating its copy before the operation.
8830
8831             Parameters:
8832                  theObject The object to be displaced.
8833                  thePath Wire or Edge along that the object will be translated.
8834                  theDistance progress of Path (0 = start location, 1 = end of path location).
8835                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8836                  theName Object name; when specified, this parameter is used
8837                          for result publication in the study. Otherwise, if automatic
8838                          publication is switched on, default value is used for result name.
8839
8840             Returns:
8841                 New GEOM.GEOM_Object, containing the displaced shape.
8842             """
8843             # Example: see GEOM_TestAll.py
8844             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8845             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8846             self._autoPublish(anObj, theName, "displaced")
8847             return anObj
8848
8849         ## Offset given shape.
8850         #  @param theObject The base object for the offset.
8851         #  @param theOffset Offset value.
8852         #  @param theCopy Flag used to offset object itself or create a copy.
8853         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8854         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8855         @ManageTransactions("TrsfOp")
8856         def Offset(self, theObject, theOffset, theCopy=False):
8857             """
8858             Offset given shape.
8859
8860             Parameters:
8861                 theObject The base object for the offset.
8862                 theOffset Offset value.
8863                 theCopy Flag used to offset object itself or create a copy.
8864
8865             Returns:
8866                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8867                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8868             """
8869             theOffset, Parameters = ParseParameters(theOffset)
8870             if theCopy:
8871                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8872             else:
8873                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8874             RaiseIfFailed("Offset", self.TrsfOp)
8875             anObj.SetParameters(Parameters)
8876             return anObj
8877
8878         ## Create new object as offset of the given one.
8879         #  @param theObject The base object for the offset.
8880         #  @param theOffset Offset value.
8881         #  @param theName Object name; when specified, this parameter is used
8882         #         for result publication in the study. Otherwise, if automatic
8883         #         publication is switched on, default value is used for result name.
8884         #
8885         #  @return New GEOM.GEOM_Object, containing the offset object.
8886         #
8887         #  @ref tui_offset "Example"
8888         @ManageTransactions("TrsfOp")
8889         def MakeOffset(self, theObject, theOffset, theName=None):
8890             """
8891             Create new object as offset of the given one.
8892
8893             Parameters:
8894                 theObject The base object for the offset.
8895                 theOffset Offset value.
8896                 theName Object name; when specified, this parameter is used
8897                         for result publication in the study. Otherwise, if automatic
8898                         publication is switched on, default value is used for result name.
8899
8900             Returns:
8901                 New GEOM.GEOM_Object, containing the offset object.
8902
8903             Example of usage:
8904                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8905                  # create a new object as offset of the given object
8906                  offset = geompy.MakeOffset(box, 70.)
8907             """
8908             # Example: see GEOM_TestAll.py
8909             theOffset, Parameters = ParseParameters(theOffset)
8910             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8911             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8912             anObj.SetParameters(Parameters)
8913             self._autoPublish(anObj, theName, "offset")
8914             return anObj
8915
8916         ## Create new object as projection of the given one on another.
8917         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8918         #         Edge and wire are acceptable if @a theTarget is a face.
8919         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
8920         #  @param theName Object name; when specified, this parameter is used
8921         #         for result publication in the study. Otherwise, if automatic
8922         #         publication is switched on, default value is used for result name.
8923         #
8924         #  @return New GEOM.GEOM_Object, containing the projection.
8925         #
8926         #  @ref tui_projection "Example"
8927         @ManageTransactions("TrsfOp")
8928         def MakeProjection(self, theSource, theTarget, theName=None):
8929             """
8930             Create new object as projection of the given one on another.
8931
8932             Parameters:
8933                 theSource The source object for the projection. It can be a point, edge or wire.
8934                           Edge and wire are acceptable if theTarget is a face.
8935                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
8936                 theName Object name; when specified, this parameter is used
8937                         for result publication in the study. Otherwise, if automatic
8938                         publication is switched on, default value is used for result name.
8939
8940             Returns:
8941                 New GEOM.GEOM_Object, containing the projection.
8942             """
8943             # Example: see GEOM_TestAll.py
8944             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8945             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8946             self._autoPublish(anObj, theName, "projection")
8947             return anObj
8948
8949         ## Create a projection projection of the given point on a wire or an edge.
8950         #  If there are no solutions or there are 2 or more solutions It throws an
8951         #  exception.
8952         #  @param thePoint the point to be projected.
8953         #  @param theWire the wire. The edge is accepted as well.
8954         #  @param theName Object name; when specified, this parameter is used
8955         #         for result publication in the study. Otherwise, if automatic
8956         #         publication is switched on, default value is used for result name.
8957         #
8958         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8959         #  \n \a u: The parameter of projection point on edge.
8960         #  \n \a PointOnEdge: The projection point.
8961         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8962         #
8963         #  @ref tui_projection "Example"
8964         @ManageTransactions("TrsfOp")
8965         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8966             """
8967             Create a projection projection of the given point on a wire or an edge.
8968             If there are no solutions or there are 2 or more solutions It throws an
8969             exception.
8970
8971             Parameters:
8972                 thePoint the point to be projected.
8973                 theWire the wire. The edge is accepted as well.
8974                 theName Object name; when specified, this parameter is used
8975                         for result publication in the study. Otherwise, if automatic
8976                         publication is switched on, default value is used for result name.
8977
8978             Returns:
8979                 [u, PointOnEdge, EdgeInWireIndex]
8980                  u: The parameter of projection point on edge.
8981                  PointOnEdge: The projection point.
8982                  EdgeInWireIndex: The index of an edge in a wire.
8983             """
8984             # Example: see GEOM_TestAll.py
8985             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8986             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8987             self._autoPublish(anObj[1], theName, "projection")
8988             return anObj
8989
8990         # -----------------------------------------------------------------------------
8991         # Patterns
8992         # -----------------------------------------------------------------------------
8993
8994         ## Translate the given object along the given vector a given number times
8995         #  @param theObject The object to be translated.
8996         #  @param theVector Direction of the translation. DX if None.
8997         #  @param theStep Distance to translate on.
8998         #  @param theNbTimes Quantity of translations to be done.
8999         #  @param theName Object name; when specified, this parameter is used
9000         #         for result publication in the study. Otherwise, if automatic
9001         #         publication is switched on, default value is used for result name.
9002         #
9003         #  @return New GEOM.GEOM_Object, containing compound of all
9004         #          the shapes, obtained after each translation.
9005         #
9006         #  @ref tui_multi_translation "Example"
9007         @ManageTransactions("TrsfOp")
9008         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9009             """
9010             Translate the given object along the given vector a given number times
9011
9012             Parameters:
9013                 theObject The object to be translated.
9014                 theVector Direction of the translation. DX if None.
9015                 theStep Distance to translate on.
9016                 theNbTimes Quantity of translations to be done.
9017                 theName Object name; when specified, this parameter is used
9018                         for result publication in the study. Otherwise, if automatic
9019                         publication is switched on, default value is used for result name.
9020
9021             Returns:
9022                 New GEOM.GEOM_Object, containing compound of all
9023                 the shapes, obtained after each translation.
9024
9025             Example of usage:
9026                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9027             """
9028             # Example: see GEOM_TestAll.py
9029             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9030             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9031             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9032             anObj.SetParameters(Parameters)
9033             self._autoPublish(anObj, theName, "multitranslation")
9034             return anObj
9035
9036         ## Conseqently apply two specified translations to theObject specified number of times.
9037         #  @param theObject The object to be translated.
9038         #  @param theVector1 Direction of the first translation. DX if None.
9039         #  @param theStep1 Step of the first translation.
9040         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9041         #  @param theVector2 Direction of the second translation. DY if None.
9042         #  @param theStep2 Step of the second translation.
9043         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9044         #  @param theName Object name; when specified, this parameter is used
9045         #         for result publication in the study. Otherwise, if automatic
9046         #         publication is switched on, default value is used for result name.
9047         #
9048         #  @return New GEOM.GEOM_Object, containing compound of all
9049         #          the shapes, obtained after each translation.
9050         #
9051         #  @ref tui_multi_translation "Example"
9052         @ManageTransactions("TrsfOp")
9053         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9054                                    theVector2, theStep2, theNbTimes2, theName=None):
9055             """
9056             Conseqently apply two specified translations to theObject specified number of times.
9057
9058             Parameters:
9059                 theObject The object to be translated.
9060                 theVector1 Direction of the first translation. DX if None.
9061                 theStep1 Step of the first translation.
9062                 theNbTimes1 Quantity of translations to be done along theVector1.
9063                 theVector2 Direction of the second translation. DY if None.
9064                 theStep2 Step of the second translation.
9065                 theNbTimes2 Quantity of translations to be done along theVector2.
9066                 theName Object name; when specified, this parameter is used
9067                         for result publication in the study. Otherwise, if automatic
9068                         publication is switched on, default value is used for result name.
9069
9070             Returns:
9071                 New GEOM.GEOM_Object, containing compound of all
9072                 the shapes, obtained after each translation.
9073
9074             Example of usage:
9075                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9076             """
9077             # Example: see GEOM_TestAll.py
9078             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9079             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9080                                                  theVector2, theStep2, theNbTimes2)
9081             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9082             anObj.SetParameters(Parameters)
9083             self._autoPublish(anObj, theName, "multitranslation")
9084             return anObj
9085
9086         ## Rotate the given object around the given axis a given number times.
9087         #  Rotation angle will be 2*PI/theNbTimes.
9088         #  @param theObject The object to be rotated.
9089         #  @param theAxis The rotation axis. DZ if None.
9090         #  @param theNbTimes Quantity of rotations to be done.
9091         #  @param theName Object name; when specified, this parameter is used
9092         #         for result publication in the study. Otherwise, if automatic
9093         #         publication is switched on, default value is used for result name.
9094         #
9095         #  @return New GEOM.GEOM_Object, containing compound of all the
9096         #          shapes, obtained after each rotation.
9097         #
9098         #  @ref tui_multi_rotation "Example"
9099         @ManageTransactions("TrsfOp")
9100         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9101             """
9102             Rotate the given object around the given axis a given number times.
9103             Rotation angle will be 2*PI/theNbTimes.
9104
9105             Parameters:
9106                 theObject The object to be rotated.
9107                 theAxis The rotation axis. DZ if None.
9108                 theNbTimes Quantity of rotations to be done.
9109                 theName Object name; when specified, this parameter is used
9110                         for result publication in the study. Otherwise, if automatic
9111                         publication is switched on, default value is used for result name.
9112
9113             Returns:
9114                 New GEOM.GEOM_Object, containing compound of all the
9115                 shapes, obtained after each rotation.
9116
9117             Example of usage:
9118                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9119             """
9120             # Example: see GEOM_TestAll.py
9121             theNbTimes, Parameters = ParseParameters(theNbTimes)
9122             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9123             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9124             anObj.SetParameters(Parameters)
9125             self._autoPublish(anObj, theName, "multirotation")
9126             return anObj
9127
9128         ## Rotate the given object around the given axis
9129         #  a given number times on the given angle.
9130         #  @param theObject The object to be rotated.
9131         #  @param theAxis The rotation axis. DZ if None.
9132         #  @param theAngleStep Rotation angle in radians.
9133         #  @param theNbTimes Quantity of rotations to be done.
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 compound of all the
9139         #          shapes, obtained after each rotation.
9140         #
9141         #  @ref tui_multi_rotation "Example"
9142         @ManageTransactions("TrsfOp")
9143         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9144             """
9145             Rotate the given object around the given axis
9146             a given number times on the given angle.
9147
9148             Parameters:
9149                 theObject The object to be rotated.
9150                 theAxis The rotation axis. DZ if None.
9151                 theAngleStep Rotation angle in radians.
9152                 theNbTimes Quantity of rotations to be done.
9153                 theName Object name; when specified, this parameter is used
9154                         for result publication in the study. Otherwise, if automatic
9155                         publication is switched on, default value is used for result name.
9156
9157             Returns:
9158                 New GEOM.GEOM_Object, containing compound of all the
9159                 shapes, obtained after each rotation.
9160
9161             Example of usage:
9162                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9163             """
9164             # Example: see GEOM_TestAll.py
9165             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9166             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9167             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9168             anObj.SetParameters(Parameters)
9169             self._autoPublish(anObj, theName, "multirotation")
9170             return anObj
9171
9172         ## Rotate the given object around the given axis a given
9173         #  number times and multi-translate each rotation result.
9174         #  Rotation angle will be 2*PI/theNbTimes1.
9175         #  Translation direction passes through center of gravity
9176         #  of rotated shape and its projection on the rotation axis.
9177         #  @param theObject The object to be rotated.
9178         #  @param theAxis Rotation axis. DZ if None.
9179         #  @param theNbTimes1 Quantity of rotations to be done.
9180         #  @param theRadialStep Translation distance.
9181         #  @param theNbTimes2 Quantity of translations to be done.
9182         #  @param theName Object name; when specified, this parameter is used
9183         #         for result publication in the study. Otherwise, if automatic
9184         #         publication is switched on, default value is used for result name.
9185         #
9186         #  @return New GEOM.GEOM_Object, containing compound of all the
9187         #          shapes, obtained after each transformation.
9188         #
9189         #  @ref tui_multi_rotation "Example"
9190         @ManageTransactions("TrsfOp")
9191         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9192             """
9193             Rotate the given object around the
9194             given axis on the given angle a given number
9195             times and multi-translate each rotation result.
9196             Translation direction passes through center of gravity
9197             of rotated shape and its projection on the rotation axis.
9198
9199             Parameters:
9200                 theObject The object to be rotated.
9201                 theAxis Rotation axis. DZ if None.
9202                 theNbTimes1 Quantity of rotations to be done.
9203                 theRadialStep Translation distance.
9204                 theNbTimes2 Quantity of translations to be done.
9205                 theName Object name; when specified, this parameter is used
9206                         for result publication in the study. Otherwise, if automatic
9207                         publication is switched on, default value is used for result name.
9208
9209             Returns:
9210                 New GEOM.GEOM_Object, containing compound of all the
9211                 shapes, obtained after each transformation.
9212
9213             Example of usage:
9214                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9215             """
9216             # Example: see GEOM_TestAll.py
9217             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9218             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9219             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9220             anObj.SetParameters(Parameters)
9221             self._autoPublish(anObj, theName, "multirotation")
9222             return anObj
9223
9224         ## Rotate the given object around the
9225         #  given axis on the given angle a given number
9226         #  times and multi-translate each rotation result.
9227         #  Translation direction passes through center of gravity
9228         #  of rotated shape and its projection on the rotation axis.
9229         #  @param theObject The object to be rotated.
9230         #  @param theAxis Rotation axis. DZ if None.
9231         #  @param theAngleStep Rotation angle in radians.
9232         #  @param theNbTimes1 Quantity of rotations to be done.
9233         #  @param theRadialStep Translation distance.
9234         #  @param theNbTimes2 Quantity of translations to be done.
9235         #  @param theName Object name; when specified, this parameter is used
9236         #         for result publication in the study. Otherwise, if automatic
9237         #         publication is switched on, default value is used for result name.
9238         #
9239         #  @return New GEOM.GEOM_Object, containing compound of all the
9240         #          shapes, obtained after each transformation.
9241         #
9242         #  @ref tui_multi_rotation "Example"
9243         @ManageTransactions("TrsfOp")
9244         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9245             """
9246             Rotate the given object around the
9247             given axis on the given angle a given number
9248             times and multi-translate each rotation result.
9249             Translation direction passes through center of gravity
9250             of rotated shape and its projection on the rotation axis.
9251
9252             Parameters:
9253                 theObject The object to be rotated.
9254                 theAxis Rotation axis. DZ if None.
9255                 theAngleStep Rotation angle in radians.
9256                 theNbTimes1 Quantity of rotations to be done.
9257                 theRadialStep Translation distance.
9258                 theNbTimes2 Quantity of translations to be done.
9259                 theName Object name; when specified, this parameter is used
9260                         for result publication in the study. Otherwise, if automatic
9261                         publication is switched on, default value is used for result name.
9262
9263             Returns:
9264                 New GEOM.GEOM_Object, containing compound of all the
9265                 shapes, obtained after each transformation.
9266
9267             Example of usage:
9268                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9269             """
9270             # Example: see GEOM_TestAll.py
9271             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9272             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9273             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9274             anObj.SetParameters(Parameters)
9275             self._autoPublish(anObj, theName, "multirotation")
9276             return anObj
9277
9278         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9279         #
9280         #  @ref swig_MakeMultiRotation "Example"
9281         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9282             """
9283             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9284
9285             Example of usage:
9286                 pz = geompy.MakeVertex(0, 0, 100)
9287                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9288                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9289             """
9290             # Example: see GEOM_TestOthers.py
9291             aVec = self.MakeLine(aPoint,aDir)
9292             # note: auto-publishing is done in self.MultiRotate1D()
9293             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9294             return anObj
9295
9296         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9297         #
9298         #  @ref swig_MakeMultiRotation "Example"
9299         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9300             """
9301             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9302
9303             Example of usage:
9304                 pz = geompy.MakeVertex(0, 0, 100)
9305                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9306                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9307             """
9308             # Example: see GEOM_TestOthers.py
9309             aVec = self.MakeLine(aPoint,aDir)
9310             # note: auto-publishing is done in self.MultiRotate1D()
9311             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9312             return anObj
9313
9314         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9315         #
9316         #  @ref swig_MakeMultiRotation "Example"
9317         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9318             """
9319             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9320
9321             Example of usage:
9322                 pz = geompy.MakeVertex(0, 0, 100)
9323                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9324                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9325             """
9326             # Example: see GEOM_TestOthers.py
9327             aVec = self.MakeLine(aPoint,aDir)
9328             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9329             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9330             return anObj
9331
9332         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9333         #
9334         #  @ref swig_MakeMultiRotation "Example"
9335         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9336             """
9337             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9338
9339             Example of usage:
9340                 pz = geompy.MakeVertex(0, 0, 100)
9341                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9342                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9343             """
9344             # Example: see GEOM_TestOthers.py
9345             aVec = self.MakeLine(aPoint,aDir)
9346             # note: auto-publishing is done in self.MultiRotate2D()
9347             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9348             return anObj
9349
9350         # end of l3_transform
9351         ## @}
9352
9353         ## @addtogroup l3_transform_d
9354         ## @{
9355
9356         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9357         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9358             """
9359             Deprecated method. Use MultiRotate1DNbTimes instead.
9360             """
9361             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9362             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9363
9364         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9365         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9366         @ManageTransactions("TrsfOp")
9367         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9368             """
9369             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9370             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9371
9372             Example of usage:
9373                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9374             """
9375             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9376             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9377             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9378             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9379             anObj.SetParameters(Parameters)
9380             self._autoPublish(anObj, theName, "multirotation")
9381             return anObj
9382
9383         ## The same, as MultiRotate1D(), but axis is given by direction and point
9384         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9385         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9386             """
9387             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9388             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9389
9390             Example of usage:
9391                 pz = geompy.MakeVertex(0, 0, 100)
9392                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9393                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9394             """
9395             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9396             aVec = self.MakeLine(aPoint,aDir)
9397             # note: auto-publishing is done in self.MultiRotate1D()
9398             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9399             return anObj
9400
9401         ## The same, as MultiRotate2D(), but axis is given by direction and point
9402         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9403         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9404             """
9405             The same, as MultiRotate2D(), but axis is given by direction and point
9406             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9407
9408             Example of usage:
9409                 pz = geompy.MakeVertex(0, 0, 100)
9410                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9411                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9412             """
9413             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9414             aVec = self.MakeLine(aPoint,aDir)
9415             # note: auto-publishing is done in self.MultiRotate2D()
9416             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9417             return anObj
9418
9419         # end of l3_transform_d
9420         ## @}
9421
9422         ## @addtogroup l3_local
9423         ## @{
9424
9425         ## Perform a fillet on all edges of the given shape.
9426         #  @param theShape Shape, to perform fillet on.
9427         #  @param theR Fillet radius.
9428         #  @param theName Object name; when specified, this parameter is used
9429         #         for result publication in the study. Otherwise, if automatic
9430         #         publication is switched on, default value is used for result name.
9431         #
9432         #  @return New GEOM.GEOM_Object, containing the result shape.
9433         #
9434         #  @ref tui_fillet "Example 1"
9435         #  \n @ref swig_MakeFilletAll "Example 2"
9436         @ManageTransactions("LocalOp")
9437         def MakeFilletAll(self, theShape, theR, theName=None):
9438             """
9439             Perform a fillet on all edges of the given shape.
9440
9441             Parameters:
9442                 theShape Shape, to perform fillet on.
9443                 theR Fillet radius.
9444                 theName Object name; when specified, this parameter is used
9445                         for result publication in the study. Otherwise, if automatic
9446                         publication is switched on, default value is used for result name.
9447
9448             Returns:
9449                 New GEOM.GEOM_Object, containing the result shape.
9450
9451             Example of usage:
9452                filletall = geompy.MakeFilletAll(prism, 10.)
9453             """
9454             # Example: see GEOM_TestOthers.py
9455             theR,Parameters = ParseParameters(theR)
9456             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9457             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9458             anObj.SetParameters(Parameters)
9459             self._autoPublish(anObj, theName, "fillet")
9460             return anObj
9461
9462         ## Perform a fillet on the specified edges/faces of the given shape
9463         #  @param theShape Shape, to perform fillet on.
9464         #  @param theR Fillet radius.
9465         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9466         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9467         #  @param theName Object name; when specified, this parameter is used
9468         #         for result publication in the study. Otherwise, if automatic
9469         #         publication is switched on, default value is used for result name.
9470         #
9471         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9472         #
9473         #  @return New GEOM.GEOM_Object, containing the result shape.
9474         #
9475         #  @ref tui_fillet "Example"
9476         @ManageTransactions("LocalOp")
9477         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9478             """
9479             Perform a fillet on the specified edges/faces of the given shape
9480
9481             Parameters:
9482                 theShape Shape, to perform fillet on.
9483                 theR Fillet radius.
9484                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9485                 theListShapes Global indices of edges/faces to perform fillet on.
9486                 theName Object name; when specified, this parameter is used
9487                         for result publication in the study. Otherwise, if automatic
9488                         publication is switched on, default value is used for result name.
9489
9490             Note:
9491                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9492
9493             Returns:
9494                 New GEOM.GEOM_Object, containing the result shape.
9495
9496             Example of usage:
9497                 # get the list of IDs (IDList) for the fillet
9498                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9499                 IDlist_e = []
9500                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9501                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9502                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9503                 # make a fillet on the specified edges of the given shape
9504                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9505             """
9506             # Example: see GEOM_TestAll.py
9507             theR,Parameters = ParseParameters(theR)
9508             anObj = None
9509             if theShapeType == self.ShapeType["EDGE"]:
9510                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9511                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9512             else:
9513                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9514                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9515             anObj.SetParameters(Parameters)
9516             self._autoPublish(anObj, theName, "fillet")
9517             return anObj
9518
9519         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9520         @ManageTransactions("LocalOp")
9521         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9522             """
9523             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9524
9525             Example of usage:
9526                 # get the list of IDs (IDList) for the fillet
9527                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9528                 IDlist_e = []
9529                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9530                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9531                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9532                 # make a fillet on the specified edges of the given shape
9533                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9534             """
9535             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9536             anObj = None
9537             if theShapeType == self.ShapeType["EDGE"]:
9538                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9539                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9540             else:
9541                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9542                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9543             anObj.SetParameters(Parameters)
9544             self._autoPublish(anObj, theName, "fillet")
9545             return anObj
9546
9547         ## Perform a fillet on the specified edges of the given shape
9548         #  @param theShape  Wire Shape to perform fillet on.
9549         #  @param theR  Fillet radius.
9550         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9551         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9552         #    \note The list of vertices could be empty,
9553         #          in this case fillet will done done at all vertices in wire
9554         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9555         #         by the length of the edges, nearest to the fillet vertex.
9556         #         But sometimes the next edge is C1 continuous with the one, nearest to
9557         #         the fillet point, and such two (or more) edges can be united to allow
9558         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9559         #         thus ignoring the secant vertex (vertices).
9560         #  @param theName Object name; when specified, this parameter is used
9561         #         for result publication in the study. Otherwise, if automatic
9562         #         publication is switched on, default value is used for result name.
9563         #
9564         #  @return New GEOM.GEOM_Object, containing the result shape.
9565         #
9566         #  @ref tui_fillet2d "Example"
9567         @ManageTransactions("LocalOp")
9568         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9569             """
9570             Perform a fillet on the specified edges of the given shape
9571
9572             Parameters:
9573                 theShape  Wire Shape to perform fillet on.
9574                 theR  Fillet radius.
9575                 theListOfVertexes Global indices of vertexes to perform fillet on.
9576                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9577                     by the length of the edges, nearest to the fillet vertex.
9578                     But sometimes the next edge is C1 continuous with the one, nearest to
9579                     the fillet point, and such two (or more) edges can be united to allow
9580                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9581                     thus ignoring the secant vertex (vertices).
9582                 theName Object name; when specified, this parameter is used
9583                         for result publication in the study. Otherwise, if automatic
9584                         publication is switched on, default value is used for result name.
9585             Note:
9586                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9587
9588                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9589
9590             Returns:
9591                 New GEOM.GEOM_Object, containing the result shape.
9592
9593             Example of usage:
9594                 # create wire
9595                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9596                 # make fillet at given wire vertices with giver radius
9597                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9598             """
9599             # Example: see GEOM_TestAll.py
9600             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9601             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9602             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9603             anObj.SetParameters(Parameters)
9604             self._autoPublish(anObj, theName, "fillet")
9605             return anObj
9606
9607         ## Perform a fillet at the specified vertices of the given face/shell.
9608         #  @param theShape Face or Shell shape to perform fillet on.
9609         #  @param theR Fillet radius.
9610         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9611         #  @param theName Object name; when specified, this parameter is used
9612         #         for result publication in the study. Otherwise, if automatic
9613         #         publication is switched on, default value is used for result name.
9614         #
9615         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9616         #
9617         #  @return New GEOM.GEOM_Object, containing the result shape.
9618         #
9619         #  @ref tui_fillet2d "Example"
9620         @ManageTransactions("LocalOp")
9621         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9622             """
9623             Perform a fillet at the specified vertices of the given face/shell.
9624
9625             Parameters:
9626                 theShape  Face or Shell shape to perform fillet on.
9627                 theR  Fillet radius.
9628                 theListOfVertexes Global indices of vertexes to perform fillet on.
9629                 theName Object name; when specified, this parameter is used
9630                         for result publication in the study. Otherwise, if automatic
9631                         publication is switched on, default value is used for result name.
9632             Note:
9633                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9634
9635             Returns:
9636                 New GEOM.GEOM_Object, containing the result shape.
9637
9638             Example of usage:
9639                 face = geompy.MakeFaceHW(100, 100, 1)
9640                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9641             """
9642             # Example: see GEOM_TestAll.py
9643             theR,Parameters = ParseParameters(theR)
9644             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9645             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9646             anObj.SetParameters(Parameters)
9647             self._autoPublish(anObj, theName, "fillet")
9648             return anObj
9649
9650         ## Perform a symmetric chamfer on all edges of the given shape.
9651         #  @param theShape Shape, to perform chamfer on.
9652         #  @param theD Chamfer size along each face.
9653         #  @param theName Object name; when specified, this parameter is used
9654         #         for result publication in the study. Otherwise, if automatic
9655         #         publication is switched on, default value is used for result name.
9656         #
9657         #  @return New GEOM.GEOM_Object, containing the result shape.
9658         #
9659         #  @ref tui_chamfer "Example 1"
9660         #  \n @ref swig_MakeChamferAll "Example 2"
9661         @ManageTransactions("LocalOp")
9662         def MakeChamferAll(self, theShape, theD, theName=None):
9663             """
9664             Perform a symmetric chamfer on all edges of the given shape.
9665
9666             Parameters:
9667                 theShape Shape, to perform chamfer on.
9668                 theD Chamfer size along each face.
9669                 theName Object name; when specified, this parameter is used
9670                         for result publication in the study. Otherwise, if automatic
9671                         publication is switched on, default value is used for result name.
9672
9673             Returns:
9674                 New GEOM.GEOM_Object, containing the result shape.
9675
9676             Example of usage:
9677                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9678             """
9679             # Example: see GEOM_TestOthers.py
9680             theD,Parameters = ParseParameters(theD)
9681             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9682             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9683             anObj.SetParameters(Parameters)
9684             self._autoPublish(anObj, theName, "chamfer")
9685             return anObj
9686
9687         ## Perform a chamfer on edges, common to the specified faces,
9688         #  with distance D1 on the Face1
9689         #  @param theShape Shape, to perform chamfer on.
9690         #  @param theD1 Chamfer size along \a theFace1.
9691         #  @param theD2 Chamfer size along \a theFace2.
9692         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9693         #  @param theName Object name; when specified, this parameter is used
9694         #         for result publication in the study. Otherwise, if automatic
9695         #         publication is switched on, default value is used for result name.
9696         #
9697         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9698         #
9699         #  @return New GEOM.GEOM_Object, containing the result shape.
9700         #
9701         #  @ref tui_chamfer "Example"
9702         @ManageTransactions("LocalOp")
9703         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9704             """
9705             Perform a chamfer on edges, common to the specified faces,
9706             with distance D1 on the Face1
9707
9708             Parameters:
9709                 theShape Shape, to perform chamfer on.
9710                 theD1 Chamfer size along theFace1.
9711                 theD2 Chamfer size along theFace2.
9712                 theFace1,theFace2 Global indices of two faces of theShape.
9713                 theName Object name; when specified, this parameter is used
9714                         for result publication in the study. Otherwise, if automatic
9715                         publication is switched on, default value is used for result name.
9716
9717             Note:
9718                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9719
9720             Returns:
9721                 New GEOM.GEOM_Object, containing the result shape.
9722
9723             Example of usage:
9724                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9725                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9726                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9727                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9728             """
9729             # Example: see GEOM_TestAll.py
9730             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9731             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9732             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9733             anObj.SetParameters(Parameters)
9734             self._autoPublish(anObj, theName, "chamfer")
9735             return anObj
9736
9737         ## Perform a chamfer on edges
9738         #  @param theShape Shape, to perform chamfer on.
9739         #  @param theD Chamfer length
9740         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9741         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9742         #  @param theName Object name; when specified, this parameter is used
9743         #         for result publication in the study. Otherwise, if automatic
9744         #         publication is switched on, default value is used for result name.
9745         #
9746         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9747         #
9748         #  @return New GEOM.GEOM_Object, containing the result shape.
9749         @ManageTransactions("LocalOp")
9750         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9751             """
9752             Perform a chamfer on edges
9753
9754             Parameters:
9755                 theShape Shape, to perform chamfer on.
9756                 theD1 Chamfer size along theFace1.
9757                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9758                 theFace1,theFace2 Global indices of two faces of theShape.
9759                 theName Object name; when specified, this parameter is used
9760                         for result publication in the study. Otherwise, if automatic
9761                         publication is switched on, default value is used for result name.
9762
9763             Note:
9764                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9765
9766             Returns:
9767                 New GEOM.GEOM_Object, containing the result shape.
9768
9769             Example of usage:
9770                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9771                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9772                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9773                 ang = 30
9774                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9775             """
9776             flag = False
9777             if isinstance(theAngle,str):
9778                 flag = True
9779             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9780             if flag:
9781                 theAngle = theAngle*math.pi/180.0
9782             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9783             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9784             anObj.SetParameters(Parameters)
9785             self._autoPublish(anObj, theName, "chamfer")
9786             return anObj
9787
9788         ## Perform a chamfer on all edges of the specified faces,
9789         #  with distance D1 on the first specified face (if several for one edge)
9790         #  @param theShape Shape, to perform chamfer on.
9791         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9792         #               connected to the edge, are in \a theFaces, \a theD1
9793         #               will be get along face, which is nearer to \a theFaces beginning.
9794         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9795         #  @param theFaces Sequence of global indices of faces of \a theShape.
9796         #  @param theName Object name; when specified, this parameter is used
9797         #         for result publication in the study. Otherwise, if automatic
9798         #         publication is switched on, default value is used for result name.
9799         #
9800         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9801         #
9802         #  @return New GEOM.GEOM_Object, containing the result shape.
9803         #
9804         #  @ref tui_chamfer "Example"
9805         @ManageTransactions("LocalOp")
9806         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9807             """
9808             Perform a chamfer on all edges of the specified faces,
9809             with distance D1 on the first specified face (if several for one edge)
9810
9811             Parameters:
9812                 theShape Shape, to perform chamfer on.
9813                 theD1 Chamfer size along face from  theFaces. If both faces,
9814                       connected to the edge, are in theFaces, theD1
9815                       will be get along face, which is nearer to theFaces beginning.
9816                 theD2 Chamfer size along another of two faces, connected to the edge.
9817                 theFaces Sequence of global indices of faces of theShape.
9818                 theName Object name; when specified, this parameter is used
9819                         for result publication in the study. Otherwise, if automatic
9820                         publication is switched on, default value is used for result name.
9821
9822             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9823
9824             Returns:
9825                 New GEOM.GEOM_Object, containing the result shape.
9826             """
9827             # Example: see GEOM_TestAll.py
9828             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9829             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9830             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9831             anObj.SetParameters(Parameters)
9832             self._autoPublish(anObj, theName, "chamfer")
9833             return anObj
9834
9835         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9836         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9837         #
9838         #  @ref swig_FilletChamfer "Example"
9839         @ManageTransactions("LocalOp")
9840         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9841             """
9842             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9843             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9844             """
9845             flag = False
9846             if isinstance(theAngle,str):
9847                 flag = True
9848             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9849             if flag:
9850                 theAngle = theAngle*math.pi/180.0
9851             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9852             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9853             anObj.SetParameters(Parameters)
9854             self._autoPublish(anObj, theName, "chamfer")
9855             return anObj
9856
9857         ## Perform a chamfer on edges,
9858         #  with distance D1 on the first specified face (if several for one edge)
9859         #  @param theShape Shape, to perform chamfer on.
9860         #  @param theD1,theD2 Chamfer size
9861         #  @param theEdges Sequence of edges of \a theShape.
9862         #  @param theName Object name; when specified, this parameter is used
9863         #         for result publication in the study. Otherwise, if automatic
9864         #         publication is switched on, default value is used for result name.
9865         #
9866         #  @return New GEOM.GEOM_Object, containing the result shape.
9867         #
9868         #  @ref swig_FilletChamfer "Example"
9869         @ManageTransactions("LocalOp")
9870         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9871             """
9872             Perform a chamfer on edges,
9873             with distance D1 on the first specified face (if several for one edge)
9874
9875             Parameters:
9876                 theShape Shape, to perform chamfer on.
9877                 theD1,theD2 Chamfer size
9878                 theEdges Sequence of edges of theShape.
9879                 theName Object name; when specified, this parameter is used
9880                         for result publication in the study. Otherwise, if automatic
9881                         publication is switched on, default value is used for result name.
9882
9883             Returns:
9884                 New GEOM.GEOM_Object, containing the result shape.
9885             """
9886             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9887             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9888             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9889             anObj.SetParameters(Parameters)
9890             self._autoPublish(anObj, theName, "chamfer")
9891             return anObj
9892
9893         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9894         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9895         @ManageTransactions("LocalOp")
9896         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9897             """
9898             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9899             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9900             """
9901             flag = False
9902             if isinstance(theAngle,str):
9903                 flag = True
9904             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9905             if flag:
9906                 theAngle = theAngle*math.pi/180.0
9907             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9908             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9909             anObj.SetParameters(Parameters)
9910             self._autoPublish(anObj, theName, "chamfer")
9911             return anObj
9912
9913         ## @sa MakeChamferEdge(), MakeChamferFaces()
9914         #
9915         #  @ref swig_MakeChamfer "Example"
9916         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9917             """
9918             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9919             """
9920             # Example: see GEOM_TestOthers.py
9921             anObj = None
9922             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9923             if aShapeType == self.ShapeType["EDGE"]:
9924                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9925             else:
9926                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9927             return anObj
9928
9929         ## Remove material from a solid by extrusion of the base shape on the given distance.
9930         #  @param theInit Shape to remove material from. It must be a solid or
9931         #  a compound made of a single solid.
9932         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9933         #  @param theH Prism dimension along the normal to theBase
9934         #  @param theAngle Draft angle in degrees.
9935         #  @param theName Object name; when specified, this parameter is used
9936         #         for result publication in the study. Otherwise, if automatic
9937         #         publication is switched on, default value is used for result name.
9938         #
9939         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9940         #
9941         #  @ref tui_creation_prism "Example"
9942         @ManageTransactions("PrimOp")
9943         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9944             """
9945             Add material to a solid by extrusion of the base shape on the given distance.
9946
9947             Parameters:
9948                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9949                 theBase Closed edge or wire defining the base shape to be extruded.
9950                 theH Prism dimension along the normal  to theBase
9951                 theAngle Draft angle in degrees.
9952                 theName Object name; when specified, this parameter is used
9953                         for result publication in the study. Otherwise, if automatic
9954                         publication is switched on, default value is used for result name.
9955
9956             Returns:
9957                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9958             """
9959             # Example: see GEOM_TestAll.py
9960             #theH,Parameters = ParseParameters(theH)
9961             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9962             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9963             #anObj.SetParameters(Parameters)
9964             self._autoPublish(anObj, theName, "extrudedCut")
9965             return anObj
9966
9967         ## Add material to a solid by extrusion of the base shape on the given distance.
9968         #  @param theInit Shape to add material to. It must be a solid or
9969         #  a compound made of a single solid.
9970         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9971         #  @param theH Prism dimension along the normal to theBase
9972         #  @param theAngle Draft angle in degrees.
9973         #  @param theName Object name; when specified, this parameter is used
9974         #         for result publication in the study. Otherwise, if automatic
9975         #         publication is switched on, default value is used for result name.
9976         #
9977         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9978         #
9979         #  @ref tui_creation_prism "Example"
9980         @ManageTransactions("PrimOp")
9981         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9982             """
9983             Add material to a solid by extrusion of the base shape on the given distance.
9984
9985             Parameters:
9986                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9987                 theBase Closed edge or wire defining the base shape to be extruded.
9988                 theH Prism dimension along the normal  to theBase
9989                 theAngle Draft angle in degrees.
9990                 theName Object name; when specified, this parameter is used
9991                         for result publication in the study. Otherwise, if automatic
9992                         publication is switched on, default value is used for result name.
9993
9994             Returns:
9995                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9996             """
9997             # Example: see GEOM_TestAll.py
9998             #theH,Parameters = ParseParameters(theH)
9999             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
10000             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10001             #anObj.SetParameters(Parameters)
10002             self._autoPublish(anObj, theName, "extrudedBoss")
10003             return anObj
10004
10005         # end of l3_local
10006         ## @}
10007
10008         ## @addtogroup l3_basic_op
10009         ## @{
10010
10011         ## Perform an Archimde operation on the given shape with given parameters.
10012         #  The object presenting the resulting face is returned.
10013         #  @param theShape Shape to be put in water.
10014         #  @param theWeight Weight of the shape.
10015         #  @param theWaterDensity Density of the water.
10016         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10017         #  @param theName Object name; when specified, this parameter is used
10018         #         for result publication in the study. Otherwise, if automatic
10019         #         publication is switched on, default value is used for result name.
10020         #
10021         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10022         #          by a plane, corresponding to water level.
10023         #
10024         #  @ref tui_archimede "Example"
10025         @ManageTransactions("LocalOp")
10026         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10027             """
10028             Perform an Archimde operation on the given shape with given parameters.
10029             The object presenting the resulting face is returned.
10030
10031             Parameters:
10032                 theShape Shape to be put in water.
10033                 theWeight Weight of the shape.
10034                 theWaterDensity Density of the water.
10035                 theMeshDeflection Deflection of the mesh, using to compute the section.
10036                 theName Object name; when specified, this parameter is used
10037                         for result publication in the study. Otherwise, if automatic
10038                         publication is switched on, default value is used for result name.
10039
10040             Returns:
10041                 New GEOM.GEOM_Object, containing a section of theShape
10042                 by a plane, corresponding to water level.
10043             """
10044             # Example: see GEOM_TestAll.py
10045             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10046               theWeight,theWaterDensity,theMeshDeflection)
10047             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10048             RaiseIfFailed("MakeArchimede", self.LocalOp)
10049             anObj.SetParameters(Parameters)
10050             self._autoPublish(anObj, theName, "archimede")
10051             return anObj
10052
10053         # end of l3_basic_op
10054         ## @}
10055
10056         ## @addtogroup l2_measure
10057         ## @{
10058
10059         ## Get point coordinates
10060         #  @return [x, y, z]
10061         #
10062         #  @ref tui_point_coordinates_page "Example"
10063         @ManageTransactions("MeasuOp")
10064         def PointCoordinates(self,Point):
10065             """
10066             Get point coordinates
10067
10068             Returns:
10069                 [x, y, z]
10070             """
10071             # Example: see GEOM_TestMeasures.py
10072             aTuple = self.MeasuOp.PointCoordinates(Point)
10073             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10074             return aTuple
10075
10076         ## Get vector coordinates
10077         #  @return [x, y, z]
10078         #
10079         #  @ref tui_measurement_tools_page "Example"
10080         def VectorCoordinates(self,Vector):
10081             """
10082             Get vector coordinates
10083
10084             Returns:
10085                 [x, y, z]
10086             """
10087
10088             p1=self.GetFirstVertex(Vector)
10089             p2=self.GetLastVertex(Vector)
10090
10091             X1=self.PointCoordinates(p1)
10092             X2=self.PointCoordinates(p2)
10093
10094             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10095
10096
10097         ## Compute cross product
10098         #  @return vector w=u^v
10099         #
10100         #  @ref tui_measurement_tools_page "Example"
10101         def CrossProduct(self, Vector1, Vector2):
10102             """
10103             Compute cross product
10104
10105             Returns: vector w=u^v
10106             """
10107             u=self.VectorCoordinates(Vector1)
10108             v=self.VectorCoordinates(Vector2)
10109             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])
10110
10111             return w
10112
10113         ## Compute cross product
10114         #  @return dot product  p=u.v
10115         #
10116         #  @ref tui_measurement_tools_page "Example"
10117         def DotProduct(self, Vector1, Vector2):
10118             """
10119             Compute cross product
10120
10121             Returns: dot product  p=u.v
10122             """
10123             u=self.VectorCoordinates(Vector1)
10124             v=self.VectorCoordinates(Vector2)
10125             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10126
10127             return p
10128
10129
10130         ## Get summarized length of all wires,
10131         #  area of surface and volume of the given shape.
10132         #  @param theShape Shape to define properties of.
10133         #  @return [theLength, theSurfArea, theVolume]\n
10134         #  theLength:   Summarized length of all wires of the given shape.\n
10135         #  theSurfArea: Area of surface of the given shape.\n
10136         #  theVolume:   Volume of the given shape.
10137         #
10138         #  @ref tui_basic_properties_page "Example"
10139         @ManageTransactions("MeasuOp")
10140         def BasicProperties(self,theShape):
10141             """
10142             Get summarized length of all wires,
10143             area of surface and volume of the given shape.
10144
10145             Parameters:
10146                 theShape Shape to define properties of.
10147
10148             Returns:
10149                 [theLength, theSurfArea, theVolume]
10150                  theLength:   Summarized length of all wires of the given shape.
10151                  theSurfArea: Area of surface of the given shape.
10152                  theVolume:   Volume of the given shape.
10153             """
10154             # Example: see GEOM_TestMeasures.py
10155             aTuple = self.MeasuOp.GetBasicProperties(theShape)
10156             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10157             return aTuple
10158
10159         ## Get parameters of bounding box of the given shape
10160         #  @param theShape Shape to obtain bounding box of.
10161         #  @param precise TRUE for precise computation; FALSE for fast one.
10162         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10163         #  Xmin,Xmax: Limits of shape along OX axis.
10164         #  Ymin,Ymax: Limits of shape along OY axis.
10165         #  Zmin,Zmax: Limits of shape along OZ axis.
10166         #
10167         #  @ref tui_bounding_box_page "Example"
10168         @ManageTransactions("MeasuOp")
10169         def BoundingBox (self, theShape, precise=False):
10170             """
10171             Get parameters of bounding box of the given shape
10172
10173             Parameters:
10174                 theShape Shape to obtain bounding box of.
10175                 precise TRUE for precise computation; FALSE for fast one.
10176
10177             Returns:
10178                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10179                  Xmin,Xmax: Limits of shape along OX axis.
10180                  Ymin,Ymax: Limits of shape along OY axis.
10181                  Zmin,Zmax: Limits of shape along OZ axis.
10182             """
10183             # Example: see GEOM_TestMeasures.py
10184             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10185             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10186             return aTuple
10187
10188         ## Get bounding box of the given shape
10189         #  @param theShape Shape to obtain bounding box of.
10190         #  @param precise TRUE for precise computation; FALSE for fast one.
10191         #  @param theName Object name; when specified, this parameter is used
10192         #         for result publication in the study. Otherwise, if automatic
10193         #         publication is switched on, default value is used for result name.
10194         #
10195         #  @return New GEOM.GEOM_Object, containing the created box.
10196         #
10197         #  @ref tui_bounding_box_page "Example"
10198         @ManageTransactions("MeasuOp")
10199         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10200             """
10201             Get bounding box of the given shape
10202
10203             Parameters:
10204                 theShape Shape to obtain bounding box of.
10205                 precise TRUE for precise computation; FALSE for fast one.
10206                 theName Object name; when specified, this parameter is used
10207                         for result publication in the study. Otherwise, if automatic
10208                         publication is switched on, default value is used for result name.
10209
10210             Returns:
10211                 New GEOM.GEOM_Object, containing the created box.
10212             """
10213             # Example: see GEOM_TestMeasures.py
10214             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10215             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10216             self._autoPublish(anObj, theName, "bndbox")
10217             return anObj
10218
10219         ## Get inertia matrix and moments of inertia of theShape.
10220         #  @param theShape Shape to calculate inertia of.
10221         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10222         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10223         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10224         #
10225         #  @ref tui_inertia_page "Example"
10226         @ManageTransactions("MeasuOp")
10227         def Inertia(self,theShape):
10228             """
10229             Get inertia matrix and moments of inertia of theShape.
10230
10231             Parameters:
10232                 theShape Shape to calculate inertia of.
10233
10234             Returns:
10235                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10236                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10237                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10238             """
10239             # Example: see GEOM_TestMeasures.py
10240             aTuple = self.MeasuOp.GetInertia(theShape)
10241             RaiseIfFailed("GetInertia", self.MeasuOp)
10242             return aTuple
10243
10244         ## Get if coords are included in the shape (ST_IN or ST_ON)
10245         #  @param theShape Shape
10246         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10247         #  @param tolerance to be used (default is 1.0e-7)
10248         #  @return list_of_boolean = [res1, res2, ...]
10249         @ManageTransactions("MeasuOp")
10250         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10251             """
10252             Get if coords are included in the shape (ST_IN or ST_ON)
10253
10254             Parameters:
10255                 theShape Shape
10256                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10257                 tolerance to be used (default is 1.0e-7)
10258
10259             Returns:
10260                 list_of_boolean = [res1, res2, ...]
10261             """
10262             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10263
10264         ## Get minimal distance between the given shapes.
10265         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10266         #  @return Value of the minimal distance between the given shapes.
10267         #
10268         #  @ref tui_min_distance_page "Example"
10269         @ManageTransactions("MeasuOp")
10270         def MinDistance(self, theShape1, theShape2):
10271             """
10272             Get minimal distance between the given shapes.
10273
10274             Parameters:
10275                 theShape1,theShape2 Shapes to find minimal distance between.
10276
10277             Returns:
10278                 Value of the minimal distance between the given shapes.
10279             """
10280             # Example: see GEOM_TestMeasures.py
10281             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10282             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10283             return aTuple[0]
10284
10285         ## Get minimal distance between the given shapes.
10286         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10287         #  @return Value of the minimal distance between the given shapes, in form of list
10288         #          [Distance, DX, DY, DZ].
10289         #
10290         #  @ref tui_min_distance_page "Example"
10291         @ManageTransactions("MeasuOp")
10292         def MinDistanceComponents(self, theShape1, theShape2):
10293             """
10294             Get minimal distance between the given shapes.
10295
10296             Parameters:
10297                 theShape1,theShape2 Shapes to find minimal distance between.
10298
10299             Returns:
10300                 Value of the minimal distance between the given shapes, in form of list
10301                 [Distance, DX, DY, DZ]
10302             """
10303             # Example: see GEOM_TestMeasures.py
10304             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10305             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10306             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10307             return aRes
10308
10309         ## Get closest points of the given shapes.
10310         #  @param theShape1,theShape2 Shapes to find closest points of.
10311         #  @return The number of found solutions (-1 in case of infinite number of
10312         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10313         #
10314         #  @ref tui_min_distance_page "Example"
10315         @ManageTransactions("MeasuOp")
10316         def ClosestPoints (self, theShape1, theShape2):
10317             """
10318             Get closest points of the given shapes.
10319
10320             Parameters:
10321                 theShape1,theShape2 Shapes to find closest points of.
10322
10323             Returns:
10324                 The number of found solutions (-1 in case of infinite number of
10325                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10326             """
10327             # Example: see GEOM_TestMeasures.py
10328             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10329             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10330             return aTuple
10331
10332         ## Get angle between the given shapes in degrees.
10333         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10334         #  @note If both arguments are vectors, the angle is computed in accordance
10335         #        with their orientations, otherwise the minimum angle is computed.
10336         #  @return Value of the angle between the given shapes in degrees.
10337         #
10338         #  @ref tui_angle_page "Example"
10339         @ManageTransactions("MeasuOp")
10340         def GetAngle(self, theShape1, theShape2):
10341             """
10342             Get angle between the given shapes in degrees.
10343
10344             Parameters:
10345                 theShape1,theShape2 Lines or linear edges to find angle between.
10346
10347             Note:
10348                 If both arguments are vectors, the angle is computed in accordance
10349                 with their orientations, otherwise the minimum angle is computed.
10350
10351             Returns:
10352                 Value of the angle between the given shapes in degrees.
10353             """
10354             # Example: see GEOM_TestMeasures.py
10355             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10356             RaiseIfFailed("GetAngle", self.MeasuOp)
10357             return anAngle
10358
10359         ## Get angle between the given shapes in radians.
10360         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10361         #  @note If both arguments are vectors, the angle is computed in accordance
10362         #        with their orientations, otherwise the minimum angle is computed.
10363         #  @return Value of the angle between the given shapes in radians.
10364         #
10365         #  @ref tui_angle_page "Example"
10366         @ManageTransactions("MeasuOp")
10367         def GetAngleRadians(self, theShape1, theShape2):
10368             """
10369             Get angle between the given shapes in radians.
10370
10371             Parameters:
10372                 theShape1,theShape2 Lines or linear edges to find angle between.
10373
10374
10375             Note:
10376                 If both arguments are vectors, the angle is computed in accordance
10377                 with their orientations, otherwise the minimum angle is computed.
10378
10379             Returns:
10380                 Value of the angle between the given shapes in radians.
10381             """
10382             # Example: see GEOM_TestMeasures.py
10383             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10384             RaiseIfFailed("GetAngle", self.MeasuOp)
10385             return anAngle
10386
10387         ## Get angle between the given vectors in degrees.
10388         #  @param theShape1,theShape2 Vectors to find angle between.
10389         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10390         #                 if False, the opposite vector to the normal vector is used.
10391         #  @return Value of the angle between the given vectors in degrees.
10392         #
10393         #  @ref tui_angle_page "Example"
10394         @ManageTransactions("MeasuOp")
10395         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10396             """
10397             Get angle between the given vectors in degrees.
10398
10399             Parameters:
10400                 theShape1,theShape2 Vectors to find angle between.
10401                 theFlag If True, the normal vector is defined by the two vectors cross,
10402                         if False, the opposite vector to the normal vector is used.
10403
10404             Returns:
10405                 Value of the angle between the given vectors in degrees.
10406             """
10407             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10408             if not theFlag:
10409                 anAngle = 360. - anAngle
10410             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10411             return anAngle
10412
10413         ## The same as GetAngleVectors, but the result is in radians.
10414         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10415             """
10416             Get angle between the given vectors in radians.
10417
10418             Parameters:
10419                 theShape1,theShape2 Vectors to find angle between.
10420                 theFlag If True, the normal vector is defined by the two vectors cross,
10421                         if False, the opposite vector to the normal vector is used.
10422
10423             Returns:
10424                 Value of the angle between the given vectors in radians.
10425             """
10426             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10427             return anAngle
10428
10429         ## @name Curve Curvature Measurement
10430         #  Methods for receiving radius of curvature of curves
10431         #  in the given point
10432         ## @{
10433
10434         ## Measure curvature of a curve at a point, set by parameter.
10435         #  @param theCurve a curve.
10436         #  @param theParam parameter.
10437         #  @return radius of curvature of \a theCurve.
10438         #
10439         #  @ref swig_todo "Example"
10440         @ManageTransactions("MeasuOp")
10441         def CurveCurvatureByParam(self, theCurve, theParam):
10442             """
10443             Measure curvature of a curve at a point, set by parameter.
10444
10445             Parameters:
10446                 theCurve a curve.
10447                 theParam parameter.
10448
10449             Returns:
10450                 radius of curvature of theCurve.
10451             """
10452             # Example: see GEOM_TestMeasures.py
10453             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10454             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10455             return aCurv
10456
10457         ## Measure curvature of a curve at a point.
10458         #  @param theCurve a curve.
10459         #  @param thePoint given point.
10460         #  @return radius of curvature of \a theCurve.
10461         #
10462         #  @ref swig_todo "Example"
10463         @ManageTransactions("MeasuOp")
10464         def CurveCurvatureByPoint(self, theCurve, thePoint):
10465             """
10466             Measure curvature of a curve at a point.
10467
10468             Parameters:
10469                 theCurve a curve.
10470                 thePoint given point.
10471
10472             Returns:
10473                 radius of curvature of theCurve.
10474             """
10475             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10476             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10477             return aCurv
10478         ## @}
10479
10480         ## @name Surface Curvature Measurement
10481         #  Methods for receiving max and min radius of curvature of surfaces
10482         #  in the given point
10483         ## @{
10484
10485         ## Measure max radius of curvature of surface.
10486         #  @param theSurf the given surface.
10487         #  @param theUParam Value of U-parameter on the referenced surface.
10488         #  @param theVParam Value of V-parameter on the referenced surface.
10489         #  @return max radius of curvature of theSurf.
10490         #
10491         ## @ref swig_todo "Example"
10492         @ManageTransactions("MeasuOp")
10493         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10494             """
10495             Measure max radius of curvature of surface.
10496
10497             Parameters:
10498                 theSurf the given surface.
10499                 theUParam Value of U-parameter on the referenced surface.
10500                 theVParam Value of V-parameter on the referenced surface.
10501
10502             Returns:
10503                 max radius of curvature of theSurf.
10504             """
10505             # Example: see GEOM_TestMeasures.py
10506             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10507             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10508             return aSurf
10509
10510         ## Measure max radius of curvature of surface in the given point
10511         #  @param theSurf the given surface.
10512         #  @param thePoint given point.
10513         #  @return max radius of curvature of theSurf.
10514         #
10515         ## @ref swig_todo "Example"
10516         @ManageTransactions("MeasuOp")
10517         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10518             """
10519             Measure max radius of curvature of surface in the given point.
10520
10521             Parameters:
10522                 theSurf the given surface.
10523                 thePoint given point.
10524
10525             Returns:
10526                 max radius of curvature of theSurf.
10527             """
10528             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10529             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10530             return aSurf
10531
10532         ## Measure min radius of curvature of surface.
10533         #  @param theSurf the given surface.
10534         #  @param theUParam Value of U-parameter on the referenced surface.
10535         #  @param theVParam Value of V-parameter on the referenced surface.
10536         #  @return min radius of curvature of theSurf.
10537         #
10538         ## @ref swig_todo "Example"
10539         @ManageTransactions("MeasuOp")
10540         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10541             """
10542             Measure min radius of curvature of surface.
10543
10544             Parameters:
10545                 theSurf the given surface.
10546                 theUParam Value of U-parameter on the referenced surface.
10547                 theVParam Value of V-parameter on the referenced surface.
10548
10549             Returns:
10550                 Min radius of curvature of theSurf.
10551             """
10552             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10553             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10554             return aSurf
10555
10556         ## Measure min radius of curvature of surface in the given point
10557         #  @param theSurf the given surface.
10558         #  @param thePoint given point.
10559         #  @return min radius of curvature of theSurf.
10560         #
10561         ## @ref swig_todo "Example"
10562         @ManageTransactions("MeasuOp")
10563         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10564             """
10565             Measure min radius of curvature of surface in the given point.
10566
10567             Parameters:
10568                 theSurf the given surface.
10569                 thePoint given point.
10570
10571             Returns:
10572                 Min radius of curvature of theSurf.
10573             """
10574             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10575             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10576             return aSurf
10577         ## @}
10578
10579         ## Get min and max tolerances of sub-shapes of theShape
10580         #  @param theShape Shape, to get tolerances of.
10581         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10582         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10583         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10584         #  VertMin,VertMax: Min and max tolerances of the vertices.
10585         #
10586         #  @ref tui_tolerance_page "Example"
10587         @ManageTransactions("MeasuOp")
10588         def Tolerance(self,theShape):
10589             """
10590             Get min and max tolerances of sub-shapes of theShape
10591
10592             Parameters:
10593                 theShape Shape, to get tolerances of.
10594
10595             Returns:
10596                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10597                  FaceMin,FaceMax: Min and max tolerances of the faces.
10598                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10599                  VertMin,VertMax: Min and max tolerances of the vertices.
10600             """
10601             # Example: see GEOM_TestMeasures.py
10602             aTuple = self.MeasuOp.GetTolerance(theShape)
10603             RaiseIfFailed("GetTolerance", self.MeasuOp)
10604             return aTuple
10605
10606         ## Obtain description of the given shape (number of sub-shapes of each type)
10607         #  @param theShape Shape to be described.
10608         #  @return Description of the given shape.
10609         #
10610         #  @ref tui_whatis_page "Example"
10611         @ManageTransactions("MeasuOp")
10612         def WhatIs(self,theShape):
10613             """
10614             Obtain description of the given shape (number of sub-shapes of each type)
10615
10616             Parameters:
10617                 theShape Shape to be described.
10618
10619             Returns:
10620                 Description of the given shape.
10621             """
10622             # Example: see GEOM_TestMeasures.py
10623             aDescr = self.MeasuOp.WhatIs(theShape)
10624             RaiseIfFailed("WhatIs", self.MeasuOp)
10625             return aDescr
10626
10627         ## Obtain quantity of shapes of the given type in \a theShape.
10628         #  If \a theShape is of type \a theType, it is also counted.
10629         #  @param theShape Shape to be described.
10630         #  @param theType the given ShapeType().
10631         #  @return Quantity of shapes of type \a theType in \a theShape.
10632         #
10633         #  @ref tui_measurement_tools_page "Example"
10634         def NbShapes (self, theShape, theType):
10635             """
10636             Obtain quantity of shapes of the given type in theShape.
10637             If theShape is of type theType, it is also counted.
10638
10639             Parameters:
10640                 theShape Shape to be described.
10641                 theType the given geompy.ShapeType
10642
10643             Returns:
10644                 Quantity of shapes of type theType in theShape.
10645             """
10646             # Example: see GEOM_TestMeasures.py
10647             listSh = self.SubShapeAllIDs(theShape, theType)
10648             Nb = len(listSh)
10649             return Nb
10650
10651         ## Obtain quantity of shapes of each type in \a theShape.
10652         #  The \a theShape is also counted.
10653         #  @param theShape Shape to be described.
10654         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10655         #
10656         #  @ref tui_measurement_tools_page "Example"
10657         def ShapeInfo (self, theShape):
10658             """
10659             Obtain quantity of shapes of each type in theShape.
10660             The theShape is also counted.
10661
10662             Parameters:
10663                 theShape Shape to be described.
10664
10665             Returns:
10666                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10667             """
10668             # Example: see GEOM_TestMeasures.py
10669             aDict = {}
10670             for typeSh in self.ShapeType:
10671                 if typeSh in ( "AUTO", "SHAPE" ): continue
10672                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10673                 Nb = len(listSh)
10674                 aDict[typeSh] = Nb
10675                 pass
10676             return aDict
10677
10678         def GetCreationInformation(self, theShape):
10679             info = theShape.GetCreationInformation()
10680             # operationName
10681             opName = info.operationName
10682             if not opName: opName = "no info available"
10683             res = "Operation: " + opName
10684             # parameters
10685             for parVal in info.params:
10686                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10687             return res
10688
10689         ## Get a point, situated at the centre of mass of theShape.
10690         #  @param theShape Shape to define centre of mass of.
10691         #  @param theName Object name; when specified, this parameter is used
10692         #         for result publication in the study. Otherwise, if automatic
10693         #         publication is switched on, default value is used for result name.
10694         #
10695         #  @return New GEOM.GEOM_Object, containing the created point.
10696         #
10697         #  @ref tui_center_of_mass_page "Example"
10698         @ManageTransactions("MeasuOp")
10699         def MakeCDG(self, theShape, theName=None):
10700             """
10701             Get a point, situated at the centre of mass of theShape.
10702
10703             Parameters:
10704                 theShape Shape to define centre of mass of.
10705                 theName Object name; when specified, this parameter is used
10706                         for result publication in the study. Otherwise, if automatic
10707                         publication is switched on, default value is used for result name.
10708
10709             Returns:
10710                 New GEOM.GEOM_Object, containing the created point.
10711             """
10712             # Example: see GEOM_TestMeasures.py
10713             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10714             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10715             self._autoPublish(anObj, theName, "centerOfMass")
10716             return anObj
10717
10718         ## Get a vertex sub-shape by index depended with orientation.
10719         #  @param theShape Shape to find sub-shape.
10720         #  @param theIndex Index to find vertex by this index (starting from zero)
10721         #  @param theName Object name; when specified, this parameter is used
10722         #         for result publication in the study. Otherwise, if automatic
10723         #         publication is switched on, default value is used for result name.
10724         #
10725         #  @return New GEOM.GEOM_Object, containing the created vertex.
10726         #
10727         #  @ref tui_measurement_tools_page "Example"
10728         @ManageTransactions("MeasuOp")
10729         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10730             """
10731             Get a vertex sub-shape by index depended with orientation.
10732
10733             Parameters:
10734                 theShape Shape to find sub-shape.
10735                 theIndex Index to find vertex by this index (starting from zero)
10736                 theName Object name; when specified, this parameter is used
10737                         for result publication in the study. Otherwise, if automatic
10738                         publication is switched on, default value is used for result name.
10739
10740             Returns:
10741                 New GEOM.GEOM_Object, containing the created vertex.
10742             """
10743             # Example: see GEOM_TestMeasures.py
10744             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10745             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10746             self._autoPublish(anObj, theName, "vertex")
10747             return anObj
10748
10749         ## Get the first vertex of wire/edge depended orientation.
10750         #  @param theShape Shape to find first vertex.
10751         #  @param theName Object name; when specified, this parameter is used
10752         #         for result publication in the study. Otherwise, if automatic
10753         #         publication is switched on, default value is used for result name.
10754         #
10755         #  @return New GEOM.GEOM_Object, containing the created vertex.
10756         #
10757         #  @ref tui_measurement_tools_page "Example"
10758         def GetFirstVertex(self, theShape, theName=None):
10759             """
10760             Get the first vertex of wire/edge depended orientation.
10761
10762             Parameters:
10763                 theShape Shape to find first vertex.
10764                 theName Object name; when specified, this parameter is used
10765                         for result publication in the study. Otherwise, if automatic
10766                         publication is switched on, default value is used for result name.
10767
10768             Returns:
10769                 New GEOM.GEOM_Object, containing the created vertex.
10770             """
10771             # Example: see GEOM_TestMeasures.py
10772             # note: auto-publishing is done in self.GetVertexByIndex()
10773             return self.GetVertexByIndex(theShape, 0, theName)
10774
10775         ## Get the last vertex of wire/edge depended orientation.
10776         #  @param theShape Shape to find last vertex.
10777         #  @param theName Object name; when specified, this parameter is used
10778         #         for result publication in the study. Otherwise, if automatic
10779         #         publication is switched on, default value is used for result name.
10780         #
10781         #  @return New GEOM.GEOM_Object, containing the created vertex.
10782         #
10783         #  @ref tui_measurement_tools_page "Example"
10784         def GetLastVertex(self, theShape, theName=None):
10785             """
10786             Get the last vertex of wire/edge depended orientation.
10787
10788             Parameters:
10789                 theShape Shape to find last vertex.
10790                 theName Object name; when specified, this parameter is used
10791                         for result publication in the study. Otherwise, if automatic
10792                         publication is switched on, default value is used for result name.
10793
10794             Returns:
10795                 New GEOM.GEOM_Object, containing the created vertex.
10796             """
10797             # Example: see GEOM_TestMeasures.py
10798             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10799             # note: auto-publishing is done in self.GetVertexByIndex()
10800             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10801
10802         ## Get a normale to the given face. If the point is not given,
10803         #  the normale is calculated at the center of mass.
10804         #  @param theFace Face to define normale of.
10805         #  @param theOptionalPoint Point to compute the normale at.
10806         #  @param theName Object name; when specified, this parameter is used
10807         #         for result publication in the study. Otherwise, if automatic
10808         #         publication is switched on, default value is used for result name.
10809         #
10810         #  @return New GEOM.GEOM_Object, containing the created vector.
10811         #
10812         #  @ref swig_todo "Example"
10813         @ManageTransactions("MeasuOp")
10814         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10815             """
10816             Get a normale to the given face. If the point is not given,
10817             the normale is calculated at the center of mass.
10818
10819             Parameters:
10820                 theFace Face to define normale of.
10821                 theOptionalPoint Point to compute the normale at.
10822                 theName Object name; when specified, this parameter is used
10823                         for result publication in the study. Otherwise, if automatic
10824                         publication is switched on, default value is used for result name.
10825
10826             Returns:
10827                 New GEOM.GEOM_Object, containing the created vector.
10828             """
10829             # Example: see GEOM_TestMeasures.py
10830             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10831             RaiseIfFailed("GetNormal", self.MeasuOp)
10832             self._autoPublish(anObj, theName, "normal")
10833             return anObj
10834
10835         ## Print shape errors obtained from CheckShape.
10836         #  @param theShape Shape that was checked.
10837         #  @param theShapeErrors the shape errors obtained by CheckShape.
10838         #  @param theReturnStatus If 0 the description of problem is printed.
10839         #                         If 1 the description of problem is returned.
10840         #  @return If theReturnStatus is equal to 1 the description is returned.
10841         #          Otherwise doesn't return anything.
10842         #
10843         #  @ref tui_check_shape_page "Example"
10844         @ManageTransactions("MeasuOp")
10845         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10846             """
10847             Print shape errors obtained from CheckShape.
10848
10849             Parameters:
10850                 theShape Shape that was checked.
10851                 theShapeErrors the shape errors obtained by CheckShape.
10852                 theReturnStatus If 0 the description of problem is printed.
10853                                 If 1 the description of problem is returned.
10854
10855             Returns:
10856                 If theReturnStatus is equal to 1 the description is returned.
10857                   Otherwise doesn't return anything.
10858             """
10859             # Example: see GEOM_TestMeasures.py
10860             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10861             if theReturnStatus == 1:
10862                 return Descr
10863             print Descr
10864             pass
10865
10866         ## Check a topology of the given shape.
10867         #  @param theShape Shape to check validity of.
10868         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10869         #                        if TRUE, the shape's geometry will be checked also.
10870         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10871         #                         of problem is printed.
10872         #                         If 1 isValid flag and the description of
10873         #                         problem is returned.
10874         #                         If 2 isValid flag and the list of error data
10875         #                         is returned.
10876         #  @return TRUE, if the shape "seems to be valid".
10877         #          If theShape is invalid, prints a description of problem.
10878         #          If theReturnStatus is equal to 1 the description is returned
10879         #          along with IsValid flag.
10880         #          If theReturnStatus is equal to 2 the list of error data is
10881         #          returned along with IsValid flag.
10882         #
10883         #  @ref tui_check_shape_page "Example"
10884         @ManageTransactions("MeasuOp")
10885         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10886             """
10887             Check a topology of the given shape.
10888
10889             Parameters:
10890                 theShape Shape to check validity of.
10891                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10892                                if TRUE, the shape's geometry will be checked also.
10893                 theReturnStatus If 0 and if theShape is invalid, a description
10894                                 of problem is printed.
10895                                 If 1 IsValid flag and the description of
10896                                 problem is returned.
10897                                 If 2 IsValid flag and the list of error data
10898                                 is returned.
10899
10900             Returns:
10901                 TRUE, if the shape "seems to be valid".
10902                 If theShape is invalid, prints a description of problem.
10903                 If theReturnStatus is equal to 1 the description is returned
10904                 along with IsValid flag.
10905                 If theReturnStatus is equal to 2 the list of error data is
10906                 returned along with IsValid flag.
10907             """
10908             # Example: see GEOM_TestMeasures.py
10909             if theIsCheckGeom:
10910                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10911                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10912             else:
10913                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10914                 RaiseIfFailed("CheckShape", self.MeasuOp)
10915             if IsValid == 0:
10916                 if theReturnStatus == 0:
10917                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10918                     print Descr
10919             if theReturnStatus == 1:
10920               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10921               return (IsValid, Descr)
10922             elif theReturnStatus == 2:
10923               return (IsValid, ShapeErrors)
10924             return IsValid
10925
10926         ## Detect self-intersections in the given shape.
10927         #  @param theShape Shape to check.
10928         #  @param theCheckLevel is the level of self-intersection check.
10929         #         Possible input values are:
10930         #         - GEOM.SI_V_V(0) - only V/V interferences
10931         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
10932         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10933         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10934         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10935         #         - GEOM.SI_ALL(5) - all interferences.
10936         #  @return TRUE, if the shape contains no self-intersections.
10937         #
10938         #  @ref tui_check_self_intersections_page "Example"
10939         @ManageTransactions("MeasuOp")
10940         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
10941             """
10942             Detect self-intersections in the given shape.
10943
10944             Parameters:
10945                 theShape Shape to check.
10946                 theCheckLevel is the level of self-intersection check.
10947                   Possible input values are:
10948                    - GEOM.SI_V_V(0) - only V/V interferences
10949                    - GEOM.SI_V_E(1) - V/V and V/E interferences
10950                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10951                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10952                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10953                    - GEOM.SI_ALL(5) - all interferences.
10954  
10955             Returns:
10956                 TRUE, if the shape contains no self-intersections.
10957             """
10958             # Example: see GEOM_TestMeasures.py
10959             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
10960             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10961             return IsValid
10962
10963         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
10964         #  @param theShape1 First source object
10965         #  @param theShape2 Second source object
10966         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
10967         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
10968         #         - if \a theTolerance > 0, algorithm detects gaps
10969         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
10970         #         - if \a theDeflection <= 0, default deflection 0.001 is used
10971         #  @return TRUE, if there are intersections (gaps) between source shapes
10972         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
10973         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
10974         #
10975         #  @ref tui_fast_intersection_page "Example"
10976         @ManageTransactions("MeasuOp")
10977         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
10978             """
10979             Detect intersections of the given shapes with algorithm based on mesh intersections.
10980
10981             Parameters:
10982                 theShape1 First source object
10983                 theShape2 Second source object
10984                 theTolerance Specifies a distance between shapes used for detecting gaps:
10985                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
10986                     - if theTolerance > 0, algorithm detects gaps
10987                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
10988                     - if theDeflection <= 0, default deflection 0.001 is used
10989  
10990             Returns:
10991                 TRUE, if there are intersections (gaps) between source shapes
10992                 List of sub-shapes IDs from 1st shape that localize intersection.
10993                 List of sub-shapes IDs from 2nd shape that localize intersection.
10994             """
10995             # Example: see GEOM_TestMeasures.py
10996             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
10997             RaiseIfFailed("FastIntersect", self.MeasuOp)
10998             return IsOk, Res1, Res2
10999
11000         ## Get position (LCS) of theShape.
11001         #
11002         #  Origin of the LCS is situated at the shape's center of mass.
11003         #  Axes of the LCS are obtained from shape's location or,
11004         #  if the shape is a planar face, from position of its plane.
11005         #
11006         #  @param theShape Shape to calculate position of.
11007         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11008         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11009         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11010         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11011         #
11012         #  @ref swig_todo "Example"
11013         @ManageTransactions("MeasuOp")
11014         def GetPosition(self,theShape):
11015             """
11016             Get position (LCS) of theShape.
11017             Origin of the LCS is situated at the shape's center of mass.
11018             Axes of the LCS are obtained from shape's location or,
11019             if the shape is a planar face, from position of its plane.
11020
11021             Parameters:
11022                 theShape Shape to calculate position of.
11023
11024             Returns:
11025                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11026                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11027                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11028                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11029             """
11030             # Example: see GEOM_TestMeasures.py
11031             aTuple = self.MeasuOp.GetPosition(theShape)
11032             RaiseIfFailed("GetPosition", self.MeasuOp)
11033             return aTuple
11034
11035         ## Get kind of theShape.
11036         #
11037         #  @param theShape Shape to get a kind of.
11038         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11039         #          and a list of parameters, describing the shape.
11040         #  @note  Concrete meaning of each value, returned via \a theIntegers
11041         #         or \a theDoubles list depends on the kind() of the shape.
11042         #
11043         #  @ref swig_todo "Example"
11044         @ManageTransactions("MeasuOp")
11045         def KindOfShape(self,theShape):
11046             """
11047             Get kind of theShape.
11048
11049             Parameters:
11050                 theShape Shape to get a kind of.
11051
11052             Returns:
11053                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11054                     and a list of parameters, describing the shape.
11055             Note:
11056                 Concrete meaning of each value, returned via theIntegers
11057                 or theDoubles list depends on the geompy.kind of the shape
11058             """
11059             # Example: see GEOM_TestMeasures.py
11060             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11061             RaiseIfFailed("KindOfShape", self.MeasuOp)
11062
11063             aKind  = aRoughTuple[0]
11064             anInts = aRoughTuple[1]
11065             aDbls  = aRoughTuple[2]
11066
11067             # Now there is no exception from this rule:
11068             aKindTuple = [aKind] + aDbls + anInts
11069
11070             # If they are we will regroup parameters for such kind of shape.
11071             # For example:
11072             #if aKind == kind.SOME_KIND:
11073             #    #  SOME_KIND     int int double int double double
11074             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11075
11076             return aKindTuple
11077
11078         ## Returns the string that describes if the shell is good for solid.
11079         #  This is a support method for MakeSolid.
11080         #
11081         #  @param theShell the shell to be checked.
11082         #  @return Returns a string that describes the shell validity for
11083         #          solid construction.
11084         @ManageTransactions("MeasuOp")
11085         def _IsGoodForSolid(self, theShell):
11086             """
11087             Returns the string that describes if the shell is good for solid.
11088             This is a support method for MakeSolid.
11089
11090             Parameter:
11091                 theShell the shell to be checked.
11092
11093             Returns:
11094                 Returns a string that describes the shell validity for
11095                 solid construction.
11096             """
11097             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11098             return aDescr
11099
11100         # end of l2_measure
11101         ## @}
11102
11103         ## @addtogroup l2_import_export
11104         ## @{
11105
11106         ## Import a shape from the BREP, IGES, STEP or other file
11107         #  (depends on given format) with given name.
11108         #
11109         #  Note: this function is deprecated, it is kept for backward compatibility only
11110         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11111         #
11112         #  @param theFileName The file, containing the shape.
11113         #  @param theFormatName Specify format for the file reading.
11114         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11115         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11116         #            format 'STEP_SCALE' is used instead of 'STEP',
11117         #            length unit will be set to 'meter' and result model will be scaled.
11118         #  @param theName Object name; when specified, this parameter is used
11119         #         for result publication in the study. Otherwise, if automatic
11120         #         publication is switched on, default value is used for result name.
11121         #
11122         #  @return New GEOM.GEOM_Object, containing the imported shape.
11123         #          If material names are imported it returns the list of
11124         #          objects. The first one is the imported object followed by
11125         #          material groups.
11126         #  @note Auto publishing is allowed for the shape itself. Imported
11127         #        material groups are not automatically published.
11128         #
11129         #  @ref swig_Import_Export "Example"
11130         @ManageTransactions("InsertOp")
11131         def ImportFile(self, theFileName, theFormatName, theName=None):
11132             """
11133             Import a shape from the BREP, IGES, STEP or other file
11134             (depends on given format) with given name.
11135
11136             Note: this function is deprecated, it is kept for backward compatibility only
11137             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11138
11139             Parameters: 
11140                 theFileName The file, containing the shape.
11141                 theFormatName Specify format for the file reading.
11142                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11143                     If format 'IGES_SCALE' is used instead of 'IGES' or
11144                        format 'STEP_SCALE' is used instead of 'STEP',
11145                        length unit will be set to 'meter' and result model will be scaled.
11146                 theName Object name; when specified, this parameter is used
11147                         for result publication in the study. Otherwise, if automatic
11148                         publication is switched on, default value is used for result name.
11149
11150             Returns:
11151                 New GEOM.GEOM_Object, containing the imported shape.
11152                 If material names are imported it returns the list of
11153                 objects. The first one is the imported object followed by
11154                 material groups.
11155             Note:
11156                 Auto publishing is allowed for the shape itself. Imported
11157                 material groups are not automatically published.
11158             """
11159             # Example: see GEOM_TestOthers.py
11160             print """
11161             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11162             where <FormatName> is a name of desirable format for importing.
11163             """
11164             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11165             RaiseIfFailed("ImportFile", self.InsertOp)
11166             aNbObj = len(aListObj)
11167             if aNbObj > 0:
11168                 self._autoPublish(aListObj[0], theName, "imported")
11169             if aNbObj == 1:
11170                 return aListObj[0]
11171             return aListObj
11172
11173         ## Deprecated analog of ImportFile()
11174         def Import(self, theFileName, theFormatName, theName=None):
11175             """
11176             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11177             """
11178             # note: auto-publishing is done in self.ImportFile()
11179             return self.ImportFile(theFileName, theFormatName, theName)
11180
11181         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11182         #  @note This method will not be dumped to the python script by DumpStudy functionality.
11183         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
11184         #  @param theStream The BRep binary stream.
11185         #  @param theName Object name; when specified, this parameter is used
11186         #         for result publication in the study. Otherwise, if automatic
11187         #         publication is switched on, default value is used for result name.
11188         #
11189         #  @return New GEOM_Object, containing the shape, read from theStream.
11190         #
11191         #  @ref swig_Import_Export "Example"
11192         @ManageTransactions("InsertOp")
11193         def RestoreShape (self, theStream, theName=None):
11194             """
11195             Read a shape from the binary stream, containing its bounding representation (BRep).
11196
11197             Note:
11198                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11199
11200             Parameters:
11201                 theStream The BRep binary stream.
11202                 theName Object name; when specified, this parameter is used
11203                         for result publication in the study. Otherwise, if automatic
11204                         publication is switched on, default value is used for result name.
11205
11206             Returns:
11207                 New GEOM_Object, containing the shape, read from theStream.
11208             """
11209             # Example: see GEOM_TestOthers.py
11210             anObj = self.InsertOp.RestoreShape(theStream)
11211             RaiseIfFailed("RestoreShape", self.InsertOp)
11212             self._autoPublish(anObj, theName, "restored")
11213             return anObj
11214
11215         ## Export the given shape into a file with given name.
11216         #
11217         #  Note: this function is deprecated, it is kept for backward compatibility only
11218         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11219         #
11220         #  @param theObject Shape to be stored in the file.
11221         #  @param theFileName Name of the file to store the given shape in.
11222         #  @param theFormatName Specify format for the shape storage.
11223         #         Available formats can be obtained with
11224         #         geompy.InsertOp.ExportTranslators()[0] method.
11225         #
11226         #  @ref swig_Import_Export "Example"
11227         @ManageTransactions("InsertOp")
11228         def Export(self, theObject, theFileName, theFormatName):
11229             """
11230             Export the given shape into a file with given name.
11231
11232             Note: this function is deprecated, it is kept for backward compatibility only
11233             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11234             
11235             Parameters: 
11236                 theObject Shape to be stored in the file.
11237                 theFileName Name of the file to store the given shape in.
11238                 theFormatName Specify format for the shape storage.
11239                               Available formats can be obtained with
11240                               geompy.InsertOp.ExportTranslators()[0] method.
11241             """
11242             # Example: see GEOM_TestOthers.py
11243             print """
11244             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11245             where <FormatName> is a name of desirable format for exporting.
11246             """
11247             self.InsertOp.Export(theObject, theFileName, theFormatName)
11248             if self.InsertOp.IsDone() == 0:
11249                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11250                 pass
11251             pass
11252
11253         # end of l2_import_export
11254         ## @}
11255
11256         ## @addtogroup l3_blocks
11257         ## @{
11258
11259         ## Create a quadrangle face from four edges. Order of Edges is not
11260         #  important. It is  not necessary that edges share the same vertex.
11261         #  @param E1,E2,E3,E4 Edges for the face bound.
11262         #  @param theName Object name; when specified, this parameter is used
11263         #         for result publication in the study. Otherwise, if automatic
11264         #         publication is switched on, default value is used for result name.
11265         #
11266         #  @return New GEOM.GEOM_Object, containing the created face.
11267         #
11268         #  @ref tui_building_by_blocks_page "Example"
11269         @ManageTransactions("BlocksOp")
11270         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11271             """
11272             Create a quadrangle face from four edges. Order of Edges is not
11273             important. It is  not necessary that edges share the same vertex.
11274
11275             Parameters:
11276                 E1,E2,E3,E4 Edges for the face bound.
11277                 theName Object name; when specified, this parameter is used
11278                         for result publication in the study. Otherwise, if automatic
11279                         publication is switched on, default value is used for result name.
11280
11281             Returns:
11282                 New GEOM.GEOM_Object, containing the created face.
11283
11284             Example of usage:
11285                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11286             """
11287             # Example: see GEOM_Spanner.py
11288             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11289             RaiseIfFailed("MakeQuad", self.BlocksOp)
11290             self._autoPublish(anObj, theName, "quad")
11291             return anObj
11292
11293         ## Create a quadrangle face on two edges.
11294         #  The missing edges will be built by creating the shortest ones.
11295         #  @param E1,E2 Two opposite edges for the face.
11296         #  @param theName Object name; when specified, this parameter is used
11297         #         for result publication in the study. Otherwise, if automatic
11298         #         publication is switched on, default value is used for result name.
11299         #
11300         #  @return New GEOM.GEOM_Object, containing the created face.
11301         #
11302         #  @ref tui_building_by_blocks_page "Example"
11303         @ManageTransactions("BlocksOp")
11304         def MakeQuad2Edges(self, E1, E2, theName=None):
11305             """
11306             Create a quadrangle face on two edges.
11307             The missing edges will be built by creating the shortest ones.
11308
11309             Parameters:
11310                 E1,E2 Two opposite edges for the face.
11311                 theName Object name; when specified, this parameter is used
11312                         for result publication in the study. Otherwise, if automatic
11313                         publication is switched on, default value is used for result name.
11314
11315             Returns:
11316                 New GEOM.GEOM_Object, containing the created face.
11317
11318             Example of usage:
11319                 # create vertices
11320                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11321                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11322                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11323                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11324                 # create edges
11325                 edge1 = geompy.MakeEdge(p1, p2)
11326                 edge2 = geompy.MakeEdge(p3, p4)
11327                 # create a quadrangle face from two edges
11328                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11329             """
11330             # Example: see GEOM_Spanner.py
11331             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11332             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11333             self._autoPublish(anObj, theName, "quad")
11334             return anObj
11335
11336         ## Create a quadrangle face with specified corners.
11337         #  The missing edges will be built by creating the shortest ones.
11338         #  @param V1,V2,V3,V4 Corner vertices for the face.
11339         #  @param theName Object name; when specified, this parameter is used
11340         #         for result publication in the study. Otherwise, if automatic
11341         #         publication is switched on, default value is used for result name.
11342         #
11343         #  @return New GEOM.GEOM_Object, containing the created face.
11344         #
11345         #  @ref tui_building_by_blocks_page "Example 1"
11346         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11347         @ManageTransactions("BlocksOp")
11348         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11349             """
11350             Create a quadrangle face with specified corners.
11351             The missing edges will be built by creating the shortest ones.
11352
11353             Parameters:
11354                 V1,V2,V3,V4 Corner vertices for the face.
11355                 theName Object name; when specified, this parameter is used
11356                         for result publication in the study. Otherwise, if automatic
11357                         publication is switched on, default value is used for result name.
11358
11359             Returns:
11360                 New GEOM.GEOM_Object, containing the created face.
11361
11362             Example of usage:
11363                 # create vertices
11364                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11365                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11366                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11367                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11368                 # create a quadrangle from four points in its corners
11369                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11370             """
11371             # Example: see GEOM_Spanner.py
11372             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11373             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11374             self._autoPublish(anObj, theName, "quad")
11375             return anObj
11376
11377         ## Create a hexahedral solid, bounded by the six given faces. Order of
11378         #  faces is not important. It is  not necessary that Faces share the same edge.
11379         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11380         #  @param theName Object name; when specified, this parameter is used
11381         #         for result publication in the study. Otherwise, if automatic
11382         #         publication is switched on, default value is used for result name.
11383         #
11384         #  @return New GEOM.GEOM_Object, containing the created solid.
11385         #
11386         #  @ref tui_building_by_blocks_page "Example 1"
11387         #  \n @ref swig_MakeHexa "Example 2"
11388         @ManageTransactions("BlocksOp")
11389         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11390             """
11391             Create a hexahedral solid, bounded by the six given faces. Order of
11392             faces is not important. It is  not necessary that Faces share the same edge.
11393
11394             Parameters:
11395                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11396                 theName Object name; when specified, this parameter is used
11397                         for result publication in the study. Otherwise, if automatic
11398                         publication is switched on, default value is used for result name.
11399
11400             Returns:
11401                 New GEOM.GEOM_Object, containing the created solid.
11402
11403             Example of usage:
11404                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11405             """
11406             # Example: see GEOM_Spanner.py
11407             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11408             RaiseIfFailed("MakeHexa", self.BlocksOp)
11409             self._autoPublish(anObj, theName, "hexa")
11410             return anObj
11411
11412         ## Create a hexahedral solid between two given faces.
11413         #  The missing faces will be built by creating the smallest ones.
11414         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11415         #  @param theName Object name; when specified, this parameter is used
11416         #         for result publication in the study. Otherwise, if automatic
11417         #         publication is switched on, default value is used for result name.
11418         #
11419         #  @return New GEOM.GEOM_Object, containing the created solid.
11420         #
11421         #  @ref tui_building_by_blocks_page "Example 1"
11422         #  \n @ref swig_MakeHexa2Faces "Example 2"
11423         @ManageTransactions("BlocksOp")
11424         def MakeHexa2Faces(self, F1, F2, theName=None):
11425             """
11426             Create a hexahedral solid between two given faces.
11427             The missing faces will be built by creating the smallest ones.
11428
11429             Parameters:
11430                 F1,F2 Two opposite faces for the hexahedral solid.
11431                 theName Object name; when specified, this parameter is used
11432                         for result publication in the study. Otherwise, if automatic
11433                         publication is switched on, default value is used for result name.
11434
11435             Returns:
11436                 New GEOM.GEOM_Object, containing the created solid.
11437
11438             Example of usage:
11439                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11440             """
11441             # Example: see GEOM_Spanner.py
11442             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11443             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11444             self._autoPublish(anObj, theName, "hexa")
11445             return anObj
11446
11447         # end of l3_blocks
11448         ## @}
11449
11450         ## @addtogroup l3_blocks_op
11451         ## @{
11452
11453         ## Get a vertex, found in the given shape by its coordinates.
11454         #  @param theShape Block or a compound of blocks.
11455         #  @param theX,theY,theZ Coordinates of the sought vertex.
11456         #  @param theEpsilon Maximum allowed distance between the resulting
11457         #                    vertex and point with the given coordinates.
11458         #  @param theName Object name; when specified, this parameter is used
11459         #         for result publication in the study. Otherwise, if automatic
11460         #         publication is switched on, default value is used for result name.
11461         #
11462         #  @return New GEOM.GEOM_Object, containing the found vertex.
11463         #
11464         #  @ref swig_GetPoint "Example"
11465         @ManageTransactions("BlocksOp")
11466         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11467             """
11468             Get a vertex, found in the given shape by its coordinates.
11469
11470             Parameters:
11471                 theShape Block or a compound of blocks.
11472                 theX,theY,theZ Coordinates of the sought vertex.
11473                 theEpsilon Maximum allowed distance between the resulting
11474                            vertex and point with the given coordinates.
11475                 theName Object name; when specified, this parameter is used
11476                         for result publication in the study. Otherwise, if automatic
11477                         publication is switched on, default value is used for result name.
11478
11479             Returns:
11480                 New GEOM.GEOM_Object, containing the found vertex.
11481
11482             Example of usage:
11483                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11484             """
11485             # Example: see GEOM_TestOthers.py
11486             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11487             RaiseIfFailed("GetPoint", self.BlocksOp)
11488             self._autoPublish(anObj, theName, "vertex")
11489             return anObj
11490
11491         ## Find a vertex of the given shape, which has minimal distance to the given point.
11492         #  @param theShape Any shape.
11493         #  @param thePoint Point, close to the desired vertex.
11494         #  @param theName Object name; when specified, this parameter is used
11495         #         for result publication in the study. Otherwise, if automatic
11496         #         publication is switched on, default value is used for result name.
11497         #
11498         #  @return New GEOM.GEOM_Object, containing the found vertex.
11499         #
11500         #  @ref swig_GetVertexNearPoint "Example"
11501         @ManageTransactions("BlocksOp")
11502         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11503             """
11504             Find a vertex of the given shape, which has minimal distance to the given point.
11505
11506             Parameters:
11507                 theShape Any shape.
11508                 thePoint Point, close to the desired vertex.
11509                 theName Object name; when specified, this parameter is used
11510                         for result publication in the study. Otherwise, if automatic
11511                         publication is switched on, default value is used for result name.
11512
11513             Returns:
11514                 New GEOM.GEOM_Object, containing the found vertex.
11515
11516             Example of usage:
11517                 pmidle = geompy.MakeVertex(50, 0, 50)
11518                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11519             """
11520             # Example: see GEOM_TestOthers.py
11521             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11522             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11523             self._autoPublish(anObj, theName, "vertex")
11524             return anObj
11525
11526         ## Get an edge, found in the given shape by two given vertices.
11527         #  @param theShape Block or a compound of blocks.
11528         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11529         #  @param theName Object name; when specified, this parameter is used
11530         #         for result publication in the study. Otherwise, if automatic
11531         #         publication is switched on, default value is used for result name.
11532         #
11533         #  @return New GEOM.GEOM_Object, containing the found edge.
11534         #
11535         #  @ref swig_GetEdge "Example"
11536         @ManageTransactions("BlocksOp")
11537         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11538             """
11539             Get an edge, found in the given shape by two given vertices.
11540
11541             Parameters:
11542                 theShape Block or a compound of blocks.
11543                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11544                 theName Object name; when specified, this parameter is used
11545                         for result publication in the study. Otherwise, if automatic
11546                         publication is switched on, default value is used for result name.
11547
11548             Returns:
11549                 New GEOM.GEOM_Object, containing the found edge.
11550             """
11551             # Example: see GEOM_Spanner.py
11552             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11553             RaiseIfFailed("GetEdge", self.BlocksOp)
11554             self._autoPublish(anObj, theName, "edge")
11555             return anObj
11556
11557         ## Find an edge of the given shape, which has minimal distance to the given point.
11558         #  @param theShape Block or a compound of blocks.
11559         #  @param thePoint Point, close to the desired edge.
11560         #  @param theName Object name; when specified, this parameter is used
11561         #         for result publication in the study. Otherwise, if automatic
11562         #         publication is switched on, default value is used for result name.
11563         #
11564         #  @return New GEOM.GEOM_Object, containing the found edge.
11565         #
11566         #  @ref swig_GetEdgeNearPoint "Example"
11567         @ManageTransactions("BlocksOp")
11568         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11569             """
11570             Find an edge of the given shape, which has minimal distance to the given point.
11571
11572             Parameters:
11573                 theShape Block or a compound of blocks.
11574                 thePoint Point, close to the desired edge.
11575                 theName Object name; when specified, this parameter is used
11576                         for result publication in the study. Otherwise, if automatic
11577                         publication is switched on, default value is used for result name.
11578
11579             Returns:
11580                 New GEOM.GEOM_Object, containing the found edge.
11581             """
11582             # Example: see GEOM_TestOthers.py
11583             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11584             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11585             self._autoPublish(anObj, theName, "edge")
11586             return anObj
11587
11588         ## Returns a face, found in the given shape by four given corner vertices.
11589         #  @param theShape Block or a compound of blocks.
11590         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
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 New GEOM.GEOM_Object, containing the found face.
11596         #
11597         #  @ref swig_todo "Example"
11598         @ManageTransactions("BlocksOp")
11599         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11600             """
11601             Returns a face, found in the given shape by four given corner vertices.
11602
11603             Parameters:
11604                 theShape Block or a compound of blocks.
11605                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11606                 theName Object name; when specified, this parameter is used
11607                         for result publication in the study. Otherwise, if automatic
11608                         publication is switched on, default value is used for result name.
11609
11610             Returns:
11611                 New GEOM.GEOM_Object, containing the found face.
11612             """
11613             # Example: see GEOM_Spanner.py
11614             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11615             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11616             self._autoPublish(anObj, theName, "face")
11617             return anObj
11618
11619         ## Get a face of block, found in the given shape by two given edges.
11620         #  @param theShape Block or a compound of blocks.
11621         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11622         #  @param theName Object name; when specified, this parameter is used
11623         #         for result publication in the study. Otherwise, if automatic
11624         #         publication is switched on, default value is used for result name.
11625         #
11626         #  @return New GEOM.GEOM_Object, containing the found face.
11627         #
11628         #  @ref swig_todo "Example"
11629         @ManageTransactions("BlocksOp")
11630         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11631             """
11632             Get a face of block, found in the given shape by two given edges.
11633
11634             Parameters:
11635                 theShape Block or a compound of blocks.
11636                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11637                 theName Object name; when specified, this parameter is used
11638                         for result publication in the study. Otherwise, if automatic
11639                         publication is switched on, default value is used for result name.
11640
11641             Returns:
11642                 New GEOM.GEOM_Object, containing the found face.
11643             """
11644             # Example: see GEOM_Spanner.py
11645             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11646             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11647             self._autoPublish(anObj, theName, "face")
11648             return anObj
11649
11650         ## Find a face, opposite to the given one in the given block.
11651         #  @param theBlock Must be a hexahedral solid.
11652         #  @param theFace Face of \a theBlock, opposite to the desired face.
11653         #  @param theName Object name; when specified, this parameter is used
11654         #         for result publication in the study. Otherwise, if automatic
11655         #         publication is switched on, default value is used for result name.
11656         #
11657         #  @return New GEOM.GEOM_Object, containing the found face.
11658         #
11659         #  @ref swig_GetOppositeFace "Example"
11660         @ManageTransactions("BlocksOp")
11661         def GetOppositeFace(self, theBlock, theFace, theName=None):
11662             """
11663             Find a face, opposite to the given one in the given block.
11664
11665             Parameters:
11666                 theBlock Must be a hexahedral solid.
11667                 theFace Face of theBlock, opposite to the desired face.
11668                 theName Object name; when specified, this parameter is used
11669                         for result publication in the study. Otherwise, if automatic
11670                         publication is switched on, default value is used for result name.
11671
11672             Returns:
11673                 New GEOM.GEOM_Object, containing the found face.
11674             """
11675             # Example: see GEOM_Spanner.py
11676             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11677             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11678             self._autoPublish(anObj, theName, "face")
11679             return anObj
11680
11681         ## Find a face of the given shape, which has minimal distance to the given point.
11682         #  @param theShape Block or a compound of blocks.
11683         #  @param thePoint Point, close to the desired face.
11684         #  @param theName Object name; when specified, this parameter is used
11685         #         for result publication in the study. Otherwise, if automatic
11686         #         publication is switched on, default value is used for result name.
11687         #
11688         #  @return New GEOM.GEOM_Object, containing the found face.
11689         #
11690         #  @ref swig_GetFaceNearPoint "Example"
11691         @ManageTransactions("BlocksOp")
11692         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11693             """
11694             Find a face of the given shape, which has minimal distance to the given point.
11695
11696             Parameters:
11697                 theShape Block or a compound of blocks.
11698                 thePoint Point, close to the desired face.
11699                 theName Object name; when specified, this parameter is used
11700                         for result publication in the study. Otherwise, if automatic
11701                         publication is switched on, default value is used for result name.
11702
11703             Returns:
11704                 New GEOM.GEOM_Object, containing the found face.
11705             """
11706             # Example: see GEOM_Spanner.py
11707             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11708             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11709             self._autoPublish(anObj, theName, "face")
11710             return anObj
11711
11712         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11713         #  @param theBlock Block or a compound of blocks.
11714         #  @param theVector Vector, close to the normale of the desired face.
11715         #  @param theName Object name; when specified, this parameter is used
11716         #         for result publication in the study. Otherwise, if automatic
11717         #         publication is switched on, default value is used for result name.
11718         #
11719         #  @return New GEOM.GEOM_Object, containing the found face.
11720         #
11721         #  @ref swig_todo "Example"
11722         @ManageTransactions("BlocksOp")
11723         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11724             """
11725             Find a face of block, whose outside normale has minimal angle with the given vector.
11726
11727             Parameters:
11728                 theBlock Block or a compound of blocks.
11729                 theVector Vector, close to the normale of the desired face.
11730                 theName Object name; when specified, this parameter is used
11731                         for result publication in the study. Otherwise, if automatic
11732                         publication is switched on, default value is used for result name.
11733
11734             Returns:
11735                 New GEOM.GEOM_Object, containing the found face.
11736             """
11737             # Example: see GEOM_Spanner.py
11738             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11739             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11740             self._autoPublish(anObj, theName, "face")
11741             return anObj
11742
11743         ## Find all sub-shapes of type \a theShapeType of the given shape,
11744         #  which have minimal distance to the given point.
11745         #  @param theShape Any shape.
11746         #  @param thePoint Point, close to the desired shape.
11747         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11748         #  @param theTolerance The tolerance for distances comparison. All shapes
11749         #                      with distances to the given point in interval
11750         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11751         #  @param theName Object name; when specified, this parameter is used
11752         #         for result publication in the study. Otherwise, if automatic
11753         #         publication is switched on, default value is used for result name.
11754         #
11755         #  @return New GEOM_Object, containing a group of all found shapes.
11756         #
11757         #  @ref swig_GetShapesNearPoint "Example"
11758         @ManageTransactions("BlocksOp")
11759         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11760             """
11761             Find all sub-shapes of type theShapeType of the given shape,
11762             which have minimal distance to the given point.
11763
11764             Parameters:
11765                 theShape Any shape.
11766                 thePoint Point, close to the desired shape.
11767                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11768                 theTolerance The tolerance for distances comparison. All shapes
11769                                 with distances to the given point in interval
11770                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11771                 theName Object name; when specified, this parameter is used
11772                         for result publication in the study. Otherwise, if automatic
11773                         publication is switched on, default value is used for result name.
11774
11775             Returns:
11776                 New GEOM_Object, containing a group of all found shapes.
11777             """
11778             # Example: see GEOM_TestOthers.py
11779             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11780             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11781             self._autoPublish(anObj, theName, "group")
11782             return anObj
11783
11784         # end of l3_blocks_op
11785         ## @}
11786
11787         ## @addtogroup l4_blocks_measure
11788         ## @{
11789
11790         ## Check, if the compound of blocks is given.
11791         #  To be considered as a compound of blocks, the
11792         #  given shape must satisfy the following conditions:
11793         #  - Each element of the compound should be a Block (6 faces).
11794         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
11795         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
11796         #       there are more than 4 edges in the only wire of a face,
11797         #       this face is considered to be quadrangle if it has 4 bounds
11798         #       (1 or more edge) of C1 continuity.
11799         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11800         #  - The compound should be connexe.
11801         #  - The glue between two quadrangle faces should be applied.
11802         #  @param theCompound The compound to check.
11803         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
11804         #         taking into account C1 continuity.
11805         #  @param theAngTolerance the angular tolerance to check if two neighbor
11806         #         edges are codirectional in the common vertex with this
11807         #         tolerance. This parameter is used only if
11808         #         <VAR>theIsUseC1</VAR> is set to True.
11809         #  @return TRUE, if the given shape is a compound of blocks.
11810         #  If theCompound is not valid, prints all discovered errors.
11811         #
11812         #  @ref tui_check_compound_of_blocks_page "Example 1"
11813         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11814         @ManageTransactions("BlocksOp")
11815         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
11816                                   theAngTolerance = 1.e-12):
11817             """
11818             Check, if the compound of blocks is given.
11819             To be considered as a compound of blocks, the
11820             given shape must satisfy the following conditions:
11821             - Each element of the compound should be a Block (6 faces).
11822             - Each face should be a quadrangle, i.e. it should have only 1 wire
11823                  with 4 edges. If theIsUseC1 is set to True and
11824                  there are more than 4 edges in the only wire of a face,
11825                  this face is considered to be quadrangle if it has 4 bounds
11826                  (1 or more edge) of C1 continuity.
11827             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11828             - The compound should be connexe.
11829             - The glue between two quadrangle faces should be applied.
11830
11831             Parameters:
11832                 theCompound The compound to check.
11833                 theIsUseC1 Flag to check if there are 4 bounds on a face
11834                            taking into account C1 continuity.
11835                 theAngTolerance the angular tolerance to check if two neighbor
11836                            edges are codirectional in the common vertex with this
11837                            tolerance. This parameter is used only if
11838                            theIsUseC1 is set to True.
11839
11840             Returns:
11841                 TRUE, if the given shape is a compound of blocks.
11842                 If theCompound is not valid, prints all discovered errors.
11843             """
11844             # Example: see GEOM_Spanner.py
11845             aTolerance = -1.0
11846             if theIsUseC1:
11847                 aTolerance = theAngTolerance
11848             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
11849             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11850             if IsValid == 0:
11851                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11852                 print Descr
11853             return IsValid
11854
11855         ## Retrieve all non blocks solids and faces from \a theShape.
11856         #  @param theShape The shape to explore.
11857         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
11858         #         taking into account C1 continuity.
11859         #  @param theAngTolerance the angular tolerance to check if two neighbor
11860         #         edges are codirectional in the common vertex with this
11861         #         tolerance. This parameter is used only if
11862         #         <VAR>theIsUseC1</VAR> is set to True.
11863         #  @param theName Object name; when specified, this parameter is used
11864         #         for result publication in the study. Otherwise, if automatic
11865         #         publication is switched on, default value is used for result name.
11866         #
11867         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11868         #          non block solids (= not 6 faces, or with 6 faces, but with the
11869         #          presence of non-quadrangular faces). The second object is a
11870         #          group of all non quadrangular faces (= faces with more then
11871         #          1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
11872         #          with 1 wire with not 4 edges that do not form 4 bounds of
11873         #          C1 continuity).
11874         #
11875         #  @ref tui_get_non_blocks_page "Example 1"
11876         #  \n @ref swig_GetNonBlocks "Example 2"
11877         @ManageTransactions("BlocksOp")
11878         def GetNonBlocks (self, theShape, theIsUseC1 = False,
11879                           theAngTolerance = 1.e-12, theName=None):
11880             """
11881             Retrieve all non blocks solids and faces from theShape.
11882
11883             Parameters:
11884                 theShape The shape to explore.
11885                 theIsUseC1 Flag to check if there are 4 bounds on a face
11886                            taking into account C1 continuity.
11887                 theAngTolerance the angular tolerance to check if two neighbor
11888                            edges are codirectional in the common vertex with this
11889                            tolerance. This parameter is used only if
11890                            theIsUseC1 is set to True.
11891                 theName Object name; when specified, this parameter is used
11892                         for result publication in the study. Otherwise, if automatic
11893                         publication is switched on, default value is used for result name.
11894
11895             Returns:
11896                 A tuple of two GEOM_Objects. The first object is a group of all
11897                 non block solids (= not 6 faces, or with 6 faces, but with the
11898                 presence of non-quadrangular faces). The second object is a
11899                 group of all non quadrangular faces (= faces with more then
11900                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
11901                 with 1 wire with not 4 edges that do not form 4 bounds of
11902                 C1 continuity).
11903
11904             Usage:
11905                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11906             """
11907             # Example: see GEOM_Spanner.py
11908             aTolerance = -1.0
11909             if theIsUseC1:
11910                 aTolerance = theAngTolerance
11911             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
11912             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11913             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11914             return aTuple
11915
11916         ## Remove all seam and degenerated edges from \a theShape.
11917         #  Unite faces and edges, sharing one surface. It means that
11918         #  this faces must have references to one C++ surface object (handle).
11919         #  @param theShape The compound or single solid to remove irregular edges from.
11920         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11921         #         do not unite faces.
11922         #  @param theName Object name; when specified, this parameter is used
11923         #         for result publication in the study. Otherwise, if automatic
11924         #         publication is switched on, default value is used for result name.
11925         #
11926         #  @return Improved shape.
11927         #
11928         #  @ref swig_RemoveExtraEdges "Example"
11929         @ManageTransactions("BlocksOp")
11930         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11931             """
11932             Remove all seam and degenerated edges from theShape.
11933             Unite faces and edges, sharing one surface. It means that
11934             this faces must have references to one C++ surface object (handle).
11935
11936             Parameters:
11937                 theShape The compound or single solid to remove irregular edges from.
11938                 doUnionFaces If True, then unite faces. If False (the default value),
11939                              do not unite faces.
11940                 theName Object name; when specified, this parameter is used
11941                         for result publication in the study. Otherwise, if automatic
11942                         publication is switched on, default value is used for result name.
11943
11944             Returns:
11945                 Improved shape.
11946             """
11947             # Example: see GEOM_TestOthers.py
11948             nbFacesOptimum = -1 # -1 means do not unite faces
11949             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11950             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11951             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11952             self._autoPublish(anObj, theName, "removeExtraEdges")
11953             return anObj
11954
11955         ## Performs union faces of \a theShape
11956         #  Unite faces sharing one surface. It means that
11957         #  these faces must have references to one C++ surface object (handle).
11958         #  @param theShape The compound or single solid that contains faces
11959         #         to perform union.
11960         #  @param theName Object name; when specified, this parameter is used
11961         #         for result publication in the study. Otherwise, if automatic
11962         #         publication is switched on, default value is used for result name.
11963         #
11964         #  @return Improved shape.
11965         #
11966         #  @ref swig_UnionFaces "Example"
11967         @ManageTransactions("BlocksOp")
11968         def UnionFaces(self, theShape, theName=None):
11969             """
11970             Performs union faces of theShape.
11971             Unite faces sharing one surface. It means that
11972             these faces must have references to one C++ surface object (handle).
11973
11974             Parameters:
11975                 theShape The compound or single solid that contains faces
11976                          to perform union.
11977                 theName Object name; when specified, this parameter is used
11978                         for result publication in the study. Otherwise, if automatic
11979                         publication is switched on, default value is used for result name.
11980
11981             Returns:
11982                 Improved shape.
11983             """
11984             # Example: see GEOM_TestOthers.py
11985             anObj = self.BlocksOp.UnionFaces(theShape)
11986             RaiseIfFailed("UnionFaces", self.BlocksOp)
11987             self._autoPublish(anObj, theName, "unionFaces")
11988             return anObj
11989
11990         ## Check, if the given shape is a blocks compound.
11991         #  Fix all detected errors.
11992         #    \note Single block can be also fixed by this method.
11993         #  @param theShape The compound to check and improve.
11994         #  @param theName Object name; when specified, this parameter is used
11995         #         for result publication in the study. Otherwise, if automatic
11996         #         publication is switched on, default value is used for result name.
11997         #
11998         #  @return Improved compound.
11999         #
12000         #  @ref swig_CheckAndImprove "Example"
12001         @ManageTransactions("BlocksOp")
12002         def CheckAndImprove(self, theShape, theName=None):
12003             """
12004             Check, if the given shape is a blocks compound.
12005             Fix all detected errors.
12006
12007             Note:
12008                 Single block can be also fixed by this method.
12009
12010             Parameters:
12011                 theShape The compound to check and improve.
12012                 theName Object name; when specified, this parameter is used
12013                         for result publication in the study. Otherwise, if automatic
12014                         publication is switched on, default value is used for result name.
12015
12016             Returns:
12017                 Improved compound.
12018             """
12019             # Example: see GEOM_TestOthers.py
12020             anObj = self.BlocksOp.CheckAndImprove(theShape)
12021             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12022             self._autoPublish(anObj, theName, "improved")
12023             return anObj
12024
12025         # end of l4_blocks_measure
12026         ## @}
12027
12028         ## @addtogroup l3_blocks_op
12029         ## @{
12030
12031         ## Get all the blocks, contained in the given compound.
12032         #  @param theCompound The compound to explode.
12033         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12034         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12035         #  @param theName Object name; when specified, this parameter is used
12036         #         for result publication in the study. Otherwise, if automatic
12037         #         publication is switched on, default value is used for result name.
12038         #
12039         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12040         #
12041         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12042         #
12043         #  @ref tui_explode_on_blocks "Example 1"
12044         #  \n @ref swig_MakeBlockExplode "Example 2"
12045         @ManageTransactions("BlocksOp")
12046         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12047             """
12048             Get all the blocks, contained in the given compound.
12049
12050             Parameters:
12051                 theCompound The compound to explode.
12052                 theMinNbFaces If solid has lower number of faces, it is not a block.
12053                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12054                 theName Object name; when specified, this parameter is used
12055                         for result publication in the study. Otherwise, if automatic
12056                         publication is switched on, default value is used for result name.
12057
12058             Note:
12059                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12060
12061             Returns:
12062                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12063             """
12064             # Example: see GEOM_TestOthers.py
12065             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12066             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12067             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12068             for anObj in aList:
12069                 anObj.SetParameters(Parameters)
12070                 pass
12071             self._autoPublish(aList, theName, "block")
12072             return aList
12073
12074         ## Find block, containing the given point inside its volume or on boundary.
12075         #  @param theCompound Compound, to find block in.
12076         #  @param thePoint Point, close to the desired block. If the point lays on
12077         #         boundary between some blocks, we return block with nearest center.
12078         #  @param theName Object name; when specified, this parameter is used
12079         #         for result publication in the study. Otherwise, if automatic
12080         #         publication is switched on, default value is used for result name.
12081         #
12082         #  @return New GEOM.GEOM_Object, containing the found block.
12083         #
12084         #  @ref swig_todo "Example"
12085         @ManageTransactions("BlocksOp")
12086         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12087             """
12088             Find block, containing the given point inside its volume or on boundary.
12089
12090             Parameters:
12091                 theCompound Compound, to find block in.
12092                 thePoint Point, close to the desired block. If the point lays on
12093                          boundary between some blocks, we return block with nearest center.
12094                 theName Object name; when specified, this parameter is used
12095                         for result publication in the study. Otherwise, if automatic
12096                         publication is switched on, default value is used for result name.
12097
12098             Returns:
12099                 New GEOM.GEOM_Object, containing the found block.
12100             """
12101             # Example: see GEOM_Spanner.py
12102             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12103             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12104             self._autoPublish(anObj, theName, "block")
12105             return anObj
12106
12107         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12108         #  @param theCompound Compound, to find block in.
12109         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12110         #  @param theName Object name; when specified, this parameter is used
12111         #         for result publication in the study. Otherwise, if automatic
12112         #         publication is switched on, default value is used for result name.
12113         #
12114         #  @return New GEOM.GEOM_Object, containing the found block.
12115         #
12116         #  @ref swig_GetBlockByParts "Example"
12117         @ManageTransactions("BlocksOp")
12118         def GetBlockByParts(self, theCompound, theParts, theName=None):
12119             """
12120              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12121
12122              Parameters:
12123                 theCompound Compound, to find block in.
12124                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12125                 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             Returns:
12130                 New GEOM_Object, containing the found block.
12131             """
12132             # Example: see GEOM_TestOthers.py
12133             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12134             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12135             self._autoPublish(anObj, theName, "block")
12136             return anObj
12137
12138         ## Return all blocks, containing all the elements, passed as the parts.
12139         #  @param theCompound Compound, to find blocks in.
12140         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12141         #  @param 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         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12146         #
12147         #  @ref swig_todo "Example"
12148         @ManageTransactions("BlocksOp")
12149         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12150             """
12151             Return all blocks, containing all the elements, passed as the parts.
12152
12153             Parameters:
12154                 theCompound Compound, to find blocks in.
12155                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12156                 theName Object name; when specified, this parameter is used
12157                         for result publication in the study. Otherwise, if automatic
12158                         publication is switched on, default value is used for result name.
12159
12160             Returns:
12161                 List of GEOM.GEOM_Object, containing the found blocks.
12162             """
12163             # Example: see GEOM_Spanner.py
12164             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12165             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12166             self._autoPublish(aList, theName, "block")
12167             return aList
12168
12169         ## Multi-transformate block and glue the result.
12170         #  Transformation is defined so, as to superpose direction faces.
12171         #  @param Block Hexahedral solid to be multi-transformed.
12172         #  @param DirFace1 ID of First direction face.
12173         #  @param DirFace2 ID of Second direction face.
12174         #  @param NbTimes Quantity of transformations to be done.
12175         #  @param theName Object name; when specified, this parameter is used
12176         #         for result publication in the study. Otherwise, if automatic
12177         #         publication is switched on, default value is used for result name.
12178         #
12179         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12180         #
12181         #  @return New GEOM.GEOM_Object, containing the result shape.
12182         #
12183         #  @ref tui_multi_transformation "Example"
12184         @ManageTransactions("BlocksOp")
12185         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12186             """
12187             Multi-transformate block and glue the result.
12188             Transformation is defined so, as to superpose direction faces.
12189
12190             Parameters:
12191                 Block Hexahedral solid to be multi-transformed.
12192                 DirFace1 ID of First direction face.
12193                 DirFace2 ID of Second direction face.
12194                 NbTimes Quantity of transformations to be done.
12195                 theName Object name; when specified, this parameter is used
12196                         for result publication in the study. Otherwise, if automatic
12197                         publication is switched on, default value is used for result name.
12198
12199             Note:
12200                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12201
12202             Returns:
12203                 New GEOM.GEOM_Object, containing the result shape.
12204             """
12205             # Example: see GEOM_Spanner.py
12206             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12207             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12208             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12209             anObj.SetParameters(Parameters)
12210             self._autoPublish(anObj, theName, "transformed")
12211             return anObj
12212
12213         ## Multi-transformate block and glue the result.
12214         #  @param Block Hexahedral solid to be multi-transformed.
12215         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12216         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12217         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12218         #  @param theName Object name; when specified, this parameter is used
12219         #         for result publication in the study. Otherwise, if automatic
12220         #         publication is switched on, default value is used for result name.
12221         #
12222         #  @return New GEOM.GEOM_Object, containing the result shape.
12223         #
12224         #  @ref tui_multi_transformation "Example"
12225         @ManageTransactions("BlocksOp")
12226         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12227                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12228             """
12229             Multi-transformate block and glue the result.
12230
12231             Parameters:
12232                 Block Hexahedral solid to be multi-transformed.
12233                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12234                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12235                 NbTimesU,NbTimesV Quantity of transformations to be done.
12236                 theName Object name; when specified, this parameter is used
12237                         for result publication in the study. Otherwise, if automatic
12238                         publication is switched on, default value is used for result name.
12239
12240             Returns:
12241                 New GEOM.GEOM_Object, containing the result shape.
12242             """
12243             # Example: see GEOM_Spanner.py
12244             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12245               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12246             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12247                                                             DirFace1V, DirFace2V, NbTimesV)
12248             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12249             anObj.SetParameters(Parameters)
12250             self._autoPublish(anObj, theName, "transformed")
12251             return anObj
12252
12253         ## Build all possible propagation groups.
12254         #  Propagation group is a set of all edges, opposite to one (main)
12255         #  edge of this group directly or through other opposite edges.
12256         #  Notion of Opposite Edge make sence only on quadrangle face.
12257         #  @param theShape Shape to build propagation groups on.
12258         #  @param theName Object name; when specified, this parameter is used
12259         #         for result publication in the study. Otherwise, if automatic
12260         #         publication is switched on, default value is used for result name.
12261         #
12262         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12263         #
12264         #  @ref swig_Propagate "Example"
12265         @ManageTransactions("BlocksOp")
12266         def Propagate(self, theShape, theName=None):
12267             """
12268             Build all possible propagation groups.
12269             Propagation group is a set of all edges, opposite to one (main)
12270             edge of this group directly or through other opposite edges.
12271             Notion of Opposite Edge make sence only on quadrangle face.
12272
12273             Parameters:
12274                 theShape Shape to build propagation groups on.
12275                 theName Object name; when specified, this parameter is used
12276                         for result publication in the study. Otherwise, if automatic
12277                         publication is switched on, default value is used for result name.
12278
12279             Returns:
12280                 List of GEOM.GEOM_Object, each of them is a propagation group.
12281             """
12282             # Example: see GEOM_TestOthers.py
12283             listChains = self.BlocksOp.Propagate(theShape)
12284             RaiseIfFailed("Propagate", self.BlocksOp)
12285             self._autoPublish(listChains, theName, "propagate")
12286             return listChains
12287
12288         # end of l3_blocks_op
12289         ## @}
12290
12291         ## @addtogroup l3_groups
12292         ## @{
12293
12294         ## Creates a new group which will store sub-shapes of theMainShape
12295         #  @param theMainShape is a GEOM object on which the group is selected
12296         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12297         #  @param theName Object name; when specified, this parameter is used
12298         #         for result publication in the study. Otherwise, if automatic
12299         #         publication is switched on, default value is used for result name.
12300         #
12301         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12302         #
12303         #  @ref tui_working_with_groups_page "Example 1"
12304         #  \n @ref swig_CreateGroup "Example 2"
12305         @ManageTransactions("GroupOp")
12306         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12307             """
12308             Creates a new group which will store sub-shapes of theMainShape
12309
12310             Parameters:
12311                theMainShape is a GEOM object on which the group is selected
12312                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12313                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12314                 theName Object name; when specified, this parameter is used
12315                         for result publication in the study. Otherwise, if automatic
12316                         publication is switched on, default value is used for result name.
12317
12318             Returns:
12319                a newly created GEOM group
12320
12321             Example of usage:
12322                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12323
12324             """
12325             # Example: see GEOM_TestOthers.py
12326             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12327             RaiseIfFailed("CreateGroup", self.GroupOp)
12328             self._autoPublish(anObj, theName, "group")
12329             return anObj
12330
12331         ## Adds a sub-object with ID theSubShapeId to the group
12332         #  @param theGroup is a GEOM group to which the new sub-shape is added
12333         #  @param theSubShapeID is a sub-shape ID in the main object.
12334         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12335         #
12336         #  @ref tui_working_with_groups_page "Example"
12337         @ManageTransactions("GroupOp")
12338         def AddObject(self,theGroup, theSubShapeID):
12339             """
12340             Adds a sub-object with ID theSubShapeId to the group
12341
12342             Parameters:
12343                 theGroup       is a GEOM group to which the new sub-shape is added
12344                 theSubShapeID  is a sub-shape ID in the main object.
12345
12346             Note:
12347                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12348             """
12349             # Example: see GEOM_TestOthers.py
12350             self.GroupOp.AddObject(theGroup, theSubShapeID)
12351             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12352                 RaiseIfFailed("AddObject", self.GroupOp)
12353                 pass
12354             pass
12355
12356         ## Removes a sub-object with ID \a theSubShapeId from the group
12357         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12358         #  @param theSubShapeID is a sub-shape ID in the main object.
12359         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12360         #
12361         #  @ref tui_working_with_groups_page "Example"
12362         @ManageTransactions("GroupOp")
12363         def RemoveObject(self,theGroup, theSubShapeID):
12364             """
12365             Removes a sub-object with ID theSubShapeId from the group
12366
12367             Parameters:
12368                 theGroup is a GEOM group from which the new sub-shape is removed
12369                 theSubShapeID is a sub-shape ID in the main object.
12370
12371             Note:
12372                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12373             """
12374             # Example: see GEOM_TestOthers.py
12375             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12376             RaiseIfFailed("RemoveObject", self.GroupOp)
12377             pass
12378
12379         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12380         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12381         #  @param theSubShapes is a list of sub-shapes to be added.
12382         #
12383         #  @ref tui_working_with_groups_page "Example"
12384         @ManageTransactions("GroupOp")
12385         def UnionList (self,theGroup, theSubShapes):
12386             """
12387             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12388
12389             Parameters:
12390                 theGroup is a GEOM group to which the new sub-shapes are added.
12391                 theSubShapes is a list of sub-shapes to be added.
12392             """
12393             # Example: see GEOM_TestOthers.py
12394             self.GroupOp.UnionList(theGroup, theSubShapes)
12395             RaiseIfFailed("UnionList", self.GroupOp)
12396             pass
12397
12398         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12399         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12400         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12401         #
12402         #  @ref swig_UnionIDs "Example"
12403         @ManageTransactions("GroupOp")
12404         def UnionIDs(self,theGroup, theSubShapes):
12405             """
12406             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12407
12408             Parameters:
12409                 theGroup is a GEOM group to which the new sub-shapes are added.
12410                 theSubShapes is a list of indices of sub-shapes to be added.
12411             """
12412             # Example: see GEOM_TestOthers.py
12413             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12414             RaiseIfFailed("UnionIDs", self.GroupOp)
12415             pass
12416
12417         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12418         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12419         #  @param theSubShapes is a list of sub-shapes to be removed.
12420         #
12421         #  @ref tui_working_with_groups_page "Example"
12422         @ManageTransactions("GroupOp")
12423         def DifferenceList (self,theGroup, theSubShapes):
12424             """
12425             Removes from the group all the given shapes. No errors, if some shapes are not included.
12426
12427             Parameters:
12428                 theGroup is a GEOM group from which the sub-shapes are removed.
12429                 theSubShapes is a list of sub-shapes to be removed.
12430             """
12431             # Example: see GEOM_TestOthers.py
12432             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12433             RaiseIfFailed("DifferenceList", self.GroupOp)
12434             pass
12435
12436         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12437         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12438         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12439         #
12440         #  @ref swig_DifferenceIDs "Example"
12441         @ManageTransactions("GroupOp")
12442         def DifferenceIDs(self,theGroup, theSubShapes):
12443             """
12444             Removes from the group all the given shapes. No errors, if some shapes are not included.
12445
12446             Parameters:
12447                 theGroup is a GEOM group from which the sub-shapes are removed.
12448                 theSubShapes is a list of indices of sub-shapes to be removed.
12449             """
12450             # Example: see GEOM_TestOthers.py
12451             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12452             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12453             pass
12454
12455         ## Union of two groups.
12456         #  New group is created. It will contain all entities
12457         #  which are present in groups theGroup1 and theGroup2.
12458         #  @param theGroup1, theGroup2 are the initial GEOM groups
12459         #                              to create the united group from.
12460         #  @param theName Object name; when specified, this parameter is used
12461         #         for result publication in the study. Otherwise, if automatic
12462         #         publication is switched on, default value is used for result name.
12463         #
12464         #  @return a newly created GEOM group.
12465         #
12466         #  @ref tui_union_groups_anchor "Example"
12467         @ManageTransactions("GroupOp")
12468         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12469             """
12470             Union of two groups.
12471             New group is created. It will contain all entities
12472             which are present in groups theGroup1 and theGroup2.
12473
12474             Parameters:
12475                 theGroup1, theGroup2 are the initial GEOM groups
12476                                      to create the united group from.
12477                 theName Object name; when specified, this parameter is used
12478                         for result publication in the study. Otherwise, if automatic
12479                         publication is switched on, default value is used for result name.
12480
12481             Returns:
12482                 a newly created GEOM group.
12483             """
12484             # Example: see GEOM_TestOthers.py
12485             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12486             RaiseIfFailed("UnionGroups", self.GroupOp)
12487             self._autoPublish(aGroup, theName, "group")
12488             return aGroup
12489
12490         ## Intersection of two groups.
12491         #  New group is created. It will contain only those entities
12492         #  which are present in both groups theGroup1 and theGroup2.
12493         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12494         #  @param theName Object name; when specified, this parameter is used
12495         #         for result publication in the study. Otherwise, if automatic
12496         #         publication is switched on, default value is used for result name.
12497         #
12498         #  @return a newly created GEOM group.
12499         #
12500         #  @ref tui_intersect_groups_anchor "Example"
12501         @ManageTransactions("GroupOp")
12502         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12503             """
12504             Intersection of two groups.
12505             New group is created. It will contain only those entities
12506             which are present in both groups theGroup1 and theGroup2.
12507
12508             Parameters:
12509                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12510                 theName Object name; when specified, this parameter is used
12511                         for result publication in the study. Otherwise, if automatic
12512                         publication is switched on, default value is used for result name.
12513
12514             Returns:
12515                 a newly created GEOM group.
12516             """
12517             # Example: see GEOM_TestOthers.py
12518             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12519             RaiseIfFailed("IntersectGroups", self.GroupOp)
12520             self._autoPublish(aGroup, theName, "group")
12521             return aGroup
12522
12523         ## Cut of two groups.
12524         #  New group is created. It will contain entities which are
12525         #  present in group theGroup1 but are not present in group theGroup2.
12526         #  @param theGroup1 is a GEOM group to include elements of.
12527         #  @param theGroup2 is a GEOM group to exclude elements of.
12528         #  @param theName Object name; when specified, this parameter is used
12529         #         for result publication in the study. Otherwise, if automatic
12530         #         publication is switched on, default value is used for result name.
12531         #
12532         #  @return a newly created GEOM group.
12533         #
12534         #  @ref tui_cut_groups_anchor "Example"
12535         @ManageTransactions("GroupOp")
12536         def CutGroups (self, theGroup1, theGroup2, theName=None):
12537             """
12538             Cut of two groups.
12539             New group is created. It will contain entities which are
12540             present in group theGroup1 but are not present in group theGroup2.
12541
12542             Parameters:
12543                 theGroup1 is a GEOM group to include elements of.
12544                 theGroup2 is a GEOM group to exclude elements of.
12545                 theName Object name; when specified, this parameter is used
12546                         for result publication in the study. Otherwise, if automatic
12547                         publication is switched on, default value is used for result name.
12548
12549             Returns:
12550                 a newly created GEOM group.
12551             """
12552             # Example: see GEOM_TestOthers.py
12553             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12554             RaiseIfFailed("CutGroups", self.GroupOp)
12555             self._autoPublish(aGroup, theName, "group")
12556             return aGroup
12557
12558         ## Union of list of groups.
12559         #  New group is created. It will contain all entities that are
12560         #  present in groups listed in theGList.
12561         #  @param theGList is a list of GEOM groups to create the united group from.
12562         #  @param theName Object name; when specified, this parameter is used
12563         #         for result publication in the study. Otherwise, if automatic
12564         #         publication is switched on, default value is used for result name.
12565         #
12566         #  @return a newly created GEOM group.
12567         #
12568         #  @ref tui_union_groups_anchor "Example"
12569         @ManageTransactions("GroupOp")
12570         def UnionListOfGroups (self, theGList, theName=None):
12571             """
12572             Union of list of groups.
12573             New group is created. It will contain all entities that are
12574             present in groups listed in theGList.
12575
12576             Parameters:
12577                 theGList is a list of GEOM groups to create the united group from.
12578                 theName Object name; when specified, this parameter is used
12579                         for result publication in the study. Otherwise, if automatic
12580                         publication is switched on, default value is used for result name.
12581
12582             Returns:
12583                 a newly created GEOM group.
12584             """
12585             # Example: see GEOM_TestOthers.py
12586             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12587             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12588             self._autoPublish(aGroup, theName, "group")
12589             return aGroup
12590
12591         ## Cut of lists of groups.
12592         #  New group is created. It will contain only entities
12593         #  which are present in groups listed in theGList.
12594         #  @param theGList is a list of GEOM groups to include elements of.
12595         #  @param theName Object name; when specified, this parameter is used
12596         #         for result publication in the study. Otherwise, if automatic
12597         #         publication is switched on, default value is used for result name.
12598         #
12599         #  @return a newly created GEOM group.
12600         #
12601         #  @ref tui_intersect_groups_anchor "Example"
12602         @ManageTransactions("GroupOp")
12603         def IntersectListOfGroups (self, theGList, theName=None):
12604             """
12605             Cut of lists of groups.
12606             New group is created. It will contain only entities
12607             which are present in groups listed in theGList.
12608
12609             Parameters:
12610                 theGList is a list of GEOM groups to include elements of.
12611                 theName Object name; when specified, this parameter is used
12612                         for result publication in the study. Otherwise, if automatic
12613                         publication is switched on, default value is used for result name.
12614
12615             Returns:
12616                 a newly created GEOM group.
12617             """
12618             # Example: see GEOM_TestOthers.py
12619             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12620             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12621             self._autoPublish(aGroup, theName, "group")
12622             return aGroup
12623
12624         ## Cut of lists of groups.
12625         #  New group is created. It will contain only entities
12626         #  which are present in groups listed in theGList1 but
12627         #  are not present in groups from theGList2.
12628         #  @param theGList1 is a list of GEOM groups to include elements of.
12629         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12630         #  @param theName Object name; when specified, this parameter is used
12631         #         for result publication in the study. Otherwise, if automatic
12632         #         publication is switched on, default value is used for result name.
12633         #
12634         #  @return a newly created GEOM group.
12635         #
12636         #  @ref tui_cut_groups_anchor "Example"
12637         @ManageTransactions("GroupOp")
12638         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12639             """
12640             Cut of lists of groups.
12641             New group is created. It will contain only entities
12642             which are present in groups listed in theGList1 but
12643             are not present in groups from theGList2.
12644
12645             Parameters:
12646                 theGList1 is a list of GEOM groups to include elements of.
12647                 theGList2 is a list of GEOM groups to exclude elements of.
12648                 theName Object name; when specified, this parameter is used
12649                         for result publication in the study. Otherwise, if automatic
12650                         publication is switched on, default value is used for result name.
12651
12652             Returns:
12653                 a newly created GEOM group.
12654             """
12655             # Example: see GEOM_TestOthers.py
12656             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12657             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12658             self._autoPublish(aGroup, theName, "group")
12659             return aGroup
12660
12661         ## Returns a list of sub-objects ID stored in the group
12662         #  @param theGroup is a GEOM group for which a list of IDs is requested
12663         #
12664         #  @ref swig_GetObjectIDs "Example"
12665         @ManageTransactions("GroupOp")
12666         def GetObjectIDs(self,theGroup):
12667             """
12668             Returns a list of sub-objects ID stored in the group
12669
12670             Parameters:
12671                 theGroup is a GEOM group for which a list of IDs is requested
12672             """
12673             # Example: see GEOM_TestOthers.py
12674             ListIDs = self.GroupOp.GetObjects(theGroup)
12675             RaiseIfFailed("GetObjects", self.GroupOp)
12676             return ListIDs
12677
12678         ## Returns a type of sub-objects stored in the group
12679         #  @param theGroup is a GEOM group which type is returned.
12680         #
12681         #  @ref swig_GetType "Example"
12682         @ManageTransactions("GroupOp")
12683         def GetType(self,theGroup):
12684             """
12685             Returns a type of sub-objects stored in the group
12686
12687             Parameters:
12688                 theGroup is a GEOM group which type is returned.
12689             """
12690             # Example: see GEOM_TestOthers.py
12691             aType = self.GroupOp.GetType(theGroup)
12692             RaiseIfFailed("GetType", self.GroupOp)
12693             return aType
12694
12695         ## Convert a type of geom object from id to string value
12696         #  @param theId is a GEOM obect type id.
12697         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12698         #  @ref swig_GetType "Example"
12699         def ShapeIdToType(self, theId):
12700             """
12701             Convert a type of geom object from id to string value
12702
12703             Parameters:
12704                 theId is a GEOM obect type id.
12705
12706             Returns:
12707                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12708             """
12709             if theId == 0:
12710                 return "COPY"
12711             if theId == 1:
12712                 return "IMPORT"
12713             if theId == 2:
12714                 return "POINT"
12715             if theId == 3:
12716                 return "VECTOR"
12717             if theId == 4:
12718                 return "PLANE"
12719             if theId == 5:
12720                 return "LINE"
12721             if theId == 6:
12722                 return "TORUS"
12723             if theId == 7:
12724                 return "BOX"
12725             if theId == 8:
12726                 return "CYLINDER"
12727             if theId == 9:
12728                 return "CONE"
12729             if theId == 10:
12730                 return "SPHERE"
12731             if theId == 11:
12732                 return "PRISM"
12733             if theId == 12:
12734                 return "REVOLUTION"
12735             if theId == 13:
12736                 return "BOOLEAN"
12737             if theId == 14:
12738                 return "PARTITION"
12739             if theId == 15:
12740                 return "POLYLINE"
12741             if theId == 16:
12742                 return "CIRCLE"
12743             if theId == 17:
12744                 return "SPLINE"
12745             if theId == 18:
12746                 return "ELLIPSE"
12747             if theId == 19:
12748                 return "CIRC_ARC"
12749             if theId == 20:
12750                 return "FILLET"
12751             if theId == 21:
12752                 return "CHAMFER"
12753             if theId == 22:
12754                 return "EDGE"
12755             if theId == 23:
12756                 return "WIRE"
12757             if theId == 24:
12758                 return "FACE"
12759             if theId == 25:
12760                 return "SHELL"
12761             if theId == 26:
12762                 return "SOLID"
12763             if theId == 27:
12764                 return "COMPOUND"
12765             if theId == 28:
12766                 return "SUBSHAPE"
12767             if theId == 29:
12768                 return "PIPE"
12769             if theId == 30:
12770                 return "ARCHIMEDE"
12771             if theId == 31:
12772                 return "FILLING"
12773             if theId == 32:
12774                 return "EXPLODE"
12775             if theId == 33:
12776                 return "GLUED"
12777             if theId == 34:
12778                 return "SKETCHER"
12779             if theId == 35:
12780                 return "CDG"
12781             if theId == 36:
12782                 return "FREE_BOUNDS"
12783             if theId == 37:
12784                 return "GROUP"
12785             if theId == 38:
12786                 return "BLOCK"
12787             if theId == 39:
12788                 return "MARKER"
12789             if theId == 40:
12790                 return "THRUSECTIONS"
12791             if theId == 41:
12792                 return "COMPOUNDFILTER"
12793             if theId == 42:
12794                 return "SHAPES_ON_SHAPE"
12795             if theId == 43:
12796                 return "ELLIPSE_ARC"
12797             if theId == 44:
12798                 return "3DSKETCHER"
12799             if theId == 45:
12800                 return "FILLET_2D"
12801             if theId == 46:
12802                 return "FILLET_1D"
12803             if theId == 201:
12804                 return "PIPETSHAPE"
12805             return "Shape Id not exist."
12806
12807         ## Returns a main shape associated with the group
12808         #  @param theGroup is a GEOM group for which a main shape object is requested
12809         #  @return a GEOM object which is a main shape for theGroup
12810         #
12811         #  @ref swig_GetMainShape "Example"
12812         @ManageTransactions("GroupOp")
12813         def GetMainShape(self,theGroup):
12814             """
12815             Returns a main shape associated with the group
12816
12817             Parameters:
12818                 theGroup is a GEOM group for which a main shape object is requested
12819
12820             Returns:
12821                 a GEOM object which is a main shape for theGroup
12822
12823             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12824             """
12825             # Example: see GEOM_TestOthers.py
12826             anObj = self.GroupOp.GetMainShape(theGroup)
12827             RaiseIfFailed("GetMainShape", self.GroupOp)
12828             return anObj
12829
12830         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12831         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12832         #  @param theShape given shape (see GEOM.GEOM_Object)
12833         #  @param min_length minimum length of edges of theShape
12834         #  @param max_length maximum length of edges of theShape
12835         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12836         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12837         #  @param theName Object name; when specified, this parameter is used
12838         #         for result publication in the study. Otherwise, if automatic
12839         #         publication is switched on, default value is used for result name.
12840         #
12841         #  @return a newly created GEOM group of edges
12842         #
12843         #  @@ref swig_todo "Example"
12844         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12845             """
12846             Create group of edges of theShape, whose length is in range [min_length, max_length].
12847             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12848
12849             Parameters:
12850                 theShape given shape
12851                 min_length minimum length of edges of theShape
12852                 max_length maximum length of edges of theShape
12853                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12854                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12855                 theName Object name; when specified, this parameter is used
12856                         for result publication in the study. Otherwise, if automatic
12857                         publication is switched on, default value is used for result name.
12858
12859              Returns:
12860                 a newly created GEOM group of edges.
12861             """
12862             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12863             edges_in_range = []
12864             for edge in edges:
12865                 Props = self.BasicProperties(edge)
12866                 if min_length <= Props[0] and Props[0] <= max_length:
12867                     if (not include_min) and (min_length == Props[0]):
12868                         skip = 1
12869                     else:
12870                         if (not include_max) and (Props[0] == max_length):
12871                             skip = 1
12872                         else:
12873                             edges_in_range.append(edge)
12874
12875             if len(edges_in_range) <= 0:
12876                 print "No edges found by given criteria"
12877                 return None
12878
12879             # note: auto-publishing is done in self.CreateGroup()
12880             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12881             self.UnionList(group_edges, edges_in_range)
12882
12883             return group_edges
12884
12885         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12886         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12887         #  @param min_length minimum length of edges of selected shape
12888         #  @param max_length maximum length of edges of selected shape
12889         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12890         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12891         #  @return a newly created GEOM group of edges
12892         #  @ref swig_todo "Example"
12893         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12894             """
12895             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12896             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12897
12898             Parameters:
12899                 min_length minimum length of edges of selected shape
12900                 max_length maximum length of edges of selected shape
12901                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12902                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12903
12904              Returns:
12905                 a newly created GEOM group of edges.
12906             """
12907             nb_selected = sg.SelectedCount()
12908             if nb_selected < 1:
12909                 print "Select a shape before calling this function, please."
12910                 return 0
12911             if nb_selected > 1:
12912                 print "Only one shape must be selected"
12913                 return 0
12914
12915             id_shape = sg.getSelected(0)
12916             shape = IDToObject( id_shape )
12917
12918             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12919
12920             left_str  = " < "
12921             right_str = " < "
12922             if include_min: left_str  = " <= "
12923             if include_max: right_str  = " <= "
12924
12925             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12926                                     + left_str + "length" + right_str + `max_length`)
12927
12928             sg.updateObjBrowser(1)
12929
12930             return group_edges
12931
12932         # end of l3_groups
12933         ## @}
12934
12935         #@@ insert new functions before this line @@ do not remove this line @@#
12936
12937         ## Create a copy of the given object
12938         #
12939         #  @param theOriginal geometry object for copy
12940         #  @param theName Object name; when specified, this parameter is used
12941         #         for result publication in the study. Otherwise, if automatic
12942         #         publication is switched on, default value is used for result name.
12943         #
12944         #  @return New GEOM_Object, containing the copied shape.
12945         #
12946         #  @ingroup l1_geomBuilder_auxiliary
12947         #  @ref swig_MakeCopy "Example"
12948         @ManageTransactions("InsertOp")
12949         def MakeCopy(self, theOriginal, theName=None):
12950             """
12951             Create a copy of the given object
12952
12953             Parameters:
12954                 theOriginal geometry object for copy
12955                 theName Object name; when specified, this parameter is used
12956                         for result publication in the study. Otherwise, if automatic
12957                         publication is switched on, default value is used for result name.
12958
12959             Returns:
12960                 New GEOM_Object, containing the copied shape.
12961
12962             Example of usage: Copy = geompy.MakeCopy(Box)
12963             """
12964             # Example: see GEOM_TestAll.py
12965             anObj = self.InsertOp.MakeCopy(theOriginal)
12966             RaiseIfFailed("MakeCopy", self.InsertOp)
12967             self._autoPublish(anObj, theName, "copy")
12968             return anObj
12969
12970         ## Add Path to load python scripts from
12971         #  @param Path a path to load python scripts from
12972         #  @ingroup l1_geomBuilder_auxiliary
12973         def addPath(self,Path):
12974             """
12975             Add Path to load python scripts from
12976
12977             Parameters:
12978                 Path a path to load python scripts from
12979             """
12980             if (sys.path.count(Path) < 1):
12981                 sys.path.append(Path)
12982                 pass
12983             pass
12984
12985         ## Load marker texture from the file
12986         #  @param Path a path to the texture file
12987         #  @return unique texture identifier
12988         #  @ingroup l1_geomBuilder_auxiliary
12989         @ManageTransactions("InsertOp")
12990         def LoadTexture(self, Path):
12991             """
12992             Load marker texture from the file
12993
12994             Parameters:
12995                 Path a path to the texture file
12996
12997             Returns:
12998                 unique texture identifier
12999             """
13000             # Example: see GEOM_TestAll.py
13001             ID = self.InsertOp.LoadTexture(Path)
13002             RaiseIfFailed("LoadTexture", self.InsertOp)
13003             return ID
13004
13005         ## Get internal name of the object based on its study entry
13006         #  @note This method does not provide an unique identifier of the geometry object.
13007         #  @note This is internal function of GEOM component, though it can be used outside it for
13008         #  appropriate reason (e.g. for identification of geometry object).
13009         #  @param obj geometry object
13010         #  @return unique object identifier
13011         #  @ingroup l1_geomBuilder_auxiliary
13012         def getObjectID(self, obj):
13013             """
13014             Get internal name of the object based on its study entry.
13015             Note: this method does not provide an unique identifier of the geometry object.
13016             It is an internal function of GEOM component, though it can be used outside GEOM for
13017             appropriate reason (e.g. for identification of geometry object).
13018
13019             Parameters:
13020                 obj geometry object
13021
13022             Returns:
13023                 unique object identifier
13024             """
13025             ID = ""
13026             entry = salome.ObjectToID(obj)
13027             if entry is not None:
13028                 lst = entry.split(":")
13029                 if len(lst) > 0:
13030                     ID = lst[-1] # -1 means last item in the list
13031                     return "GEOM_" + ID
13032             return ID
13033
13034
13035
13036         ## Add marker texture. @a Width and @a Height parameters
13037         #  specify width and height of the texture in pixels.
13038         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13039         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13040         #  parameter should be unpacked string, in which '1' symbols represent opaque
13041         #  pixels and '0' represent transparent pixels of the texture bitmap.
13042         #
13043         #  @param Width texture width in pixels
13044         #  @param Height texture height in pixels
13045         #  @param Texture texture data
13046         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13047         #  @return unique texture identifier
13048         #  @ingroup l1_geomBuilder_auxiliary
13049         @ManageTransactions("InsertOp")
13050         def AddTexture(self, Width, Height, Texture, RowData=False):
13051             """
13052             Add marker texture. Width and Height parameters
13053             specify width and height of the texture in pixels.
13054             If RowData is True, Texture parameter should represent texture data
13055             packed into the byte array. If RowData is False (default), Texture
13056             parameter should be unpacked string, in which '1' symbols represent opaque
13057             pixels and '0' represent transparent pixels of the texture bitmap.
13058
13059             Parameters:
13060                 Width texture width in pixels
13061                 Height texture height in pixels
13062                 Texture texture data
13063                 RowData if True, Texture data are packed in the byte stream
13064
13065             Returns:
13066                 return unique texture identifier
13067             """
13068             if not RowData: Texture = PackData(Texture)
13069             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13070             RaiseIfFailed("AddTexture", self.InsertOp)
13071             return ID
13072
13073         ## Transfer not topological data from one GEOM object to another.
13074         #
13075         #  @param theObjectFrom the source object of non-topological data
13076         #  @param theObjectTo the destination object of non-topological data
13077         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13078         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13079         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13080         #         Other values of GEOM.find_shape_method are not supported.
13081         #
13082         #  @return True in case of success; False otherwise.
13083         #
13084         #  @ingroup l1_geomBuilder_auxiliary
13085         #
13086         #  @ref swig_TransferData "Example"
13087         @ManageTransactions("InsertOp")
13088         def TransferData(self, theObjectFrom, theObjectTo,
13089                          theFindMethod=GEOM.FSM_GetInPlace):
13090             """
13091             Transfer not topological data from one GEOM object to another.
13092
13093             Parameters:
13094                 theObjectFrom the source object of non-topological data
13095                 theObjectTo the destination object of non-topological data
13096                 theFindMethod method to search sub-shapes of theObjectFrom
13097                               in shape theObjectTo. Possible values are:
13098                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13099                               and GEOM.FSM_GetInPlace_Old. Other values of
13100                               GEOM.find_shape_method are not supported.
13101
13102             Returns:
13103                 True in case of success; False otherwise.
13104
13105             # Example: see GEOM_TestOthers.py
13106             """
13107             # Example: see GEOM_TestAll.py
13108             isOk = self.InsertOp.TransferData(theObjectFrom,
13109                                                theObjectTo, theFindMethod)
13110             RaiseIfFailed("TransferData", self.InsertOp)
13111             return isOk
13112
13113         ## Creates a new folder object. It is a container for any GEOM objects.
13114         #  @param Name name of the container
13115         #  @param Father parent object. If None,
13116         #         folder under 'Geometry' root object will be created.
13117         #  @return a new created folder
13118         #  @ingroup l1_publish_data
13119         def NewFolder(self, Name, Father=None):
13120             """
13121             Create a new folder object. It is an auxiliary container for any GEOM objects.
13122
13123             Parameters:
13124                 Name name of the container
13125                 Father parent object. If None,
13126                 folder under 'Geometry' root object will be created.
13127
13128             Returns:
13129                 a new created folder
13130             """
13131             if not Father: Father = self.father
13132             return self.CreateFolder(Name, Father)
13133
13134         ## Move object to the specified folder
13135         #  @param Object object to move
13136         #  @param Folder target folder
13137         #  @ingroup l1_publish_data
13138         def PutToFolder(self, Object, Folder):
13139             """
13140             Move object to the specified folder
13141
13142             Parameters:
13143                 Object object to move
13144                 Folder target folder
13145             """
13146             self.MoveToFolder(Object, Folder)
13147             pass
13148
13149         ## Move list of objects to the specified folder
13150         #  @param ListOfSO list of objects to move
13151         #  @param Folder target folder
13152         #  @ingroup l1_publish_data
13153         def PutListToFolder(self, ListOfSO, Folder):
13154             """
13155             Move list of objects to the specified folder
13156
13157             Parameters:
13158                 ListOfSO list of objects to move
13159                 Folder target folder
13160             """
13161             self.MoveListToFolder(ListOfSO, Folder)
13162             pass
13163
13164         ## @addtogroup l2_field
13165         ## @{
13166
13167         ## Creates a field
13168         #  @param shape the shape the field lies on
13169         #  @param name the field name
13170         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13171         #  @param dimension dimension of the shape the field lies on
13172         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13173         #  @param componentNames names of components
13174         #  @return a created field
13175         @ManageTransactions("FieldOp")
13176         def CreateField(self, shape, name, type, dimension, componentNames):
13177             """
13178             Creates a field
13179
13180             Parameters:
13181                 shape the shape the field lies on
13182                 name  the field name
13183                 type  type of field data
13184                 dimension dimension of the shape the field lies on
13185                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13186                 componentNames names of components
13187
13188             Returns:
13189                 a created field
13190             """
13191             if isinstance( type, int ):
13192                 if type < 0 or type > 3:
13193                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13194                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13195
13196             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13197             RaiseIfFailed("CreateField", self.FieldOp)
13198             global geom
13199             geom._autoPublish( f, "", name)
13200             return f
13201
13202         ## Removes a field from the GEOM component
13203         #  @param field the field to remove
13204         def RemoveField(self, field):
13205             "Removes a field from the GEOM component"
13206             global geom
13207             if isinstance( field, GEOM._objref_GEOM_Field ):
13208                 geom.RemoveObject( field )
13209             elif isinstance( field, geomField ):
13210                 geom.RemoveObject( field.field )
13211             else:
13212                 raise RuntimeError, "RemoveField() : the object is not a field"
13213             return
13214
13215         ## Returns number of fields on a shape
13216         @ManageTransactions("FieldOp")
13217         def CountFields(self, shape):
13218             "Returns number of fields on a shape"
13219             nb = self.FieldOp.CountFields( shape )
13220             RaiseIfFailed("CountFields", self.FieldOp)
13221             return nb
13222
13223         ## Returns all fields on a shape
13224         @ManageTransactions("FieldOp")
13225         def GetFields(self, shape):
13226             "Returns all fields on a shape"
13227             ff = self.FieldOp.GetFields( shape )
13228             RaiseIfFailed("GetFields", self.FieldOp)
13229             return ff
13230
13231         ## Returns a field on a shape by its name
13232         @ManageTransactions("FieldOp")
13233         def GetField(self, shape, name):
13234             "Returns a field on a shape by its name"
13235             f = self.FieldOp.GetField( shape, name )
13236             RaiseIfFailed("GetField", self.FieldOp)
13237             return f
13238
13239         # end of l2_field
13240         ## @}
13241
13242
13243 import omniORB
13244 # Register the new proxy for GEOM_Gen
13245 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13246
13247
13248 ## Field on Geometry
13249 #  @ingroup l2_field
13250 class geomField( GEOM._objref_GEOM_Field ):
13251
13252     def __init__(self):
13253         GEOM._objref_GEOM_Field.__init__(self)
13254         self.field = GEOM._objref_GEOM_Field
13255         return
13256
13257     ## Returns the shape the field lies on
13258     def getShape(self):
13259         "Returns the shape the field lies on"
13260         return self.field.GetShape(self)
13261
13262     ## Returns the field name
13263     def getName(self):
13264         "Returns the field name"
13265         return self.field.GetName(self)
13266
13267     ## Returns type of field data as integer [0-3]
13268     def getType(self):
13269         "Returns type of field data"
13270         return self.field.GetDataType(self)._v
13271
13272     ## Returns type of field data:
13273     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13274     def getTypeEnum(self):
13275         "Returns type of field data"
13276         return self.field.GetDataType(self)
13277
13278     ## Returns dimension of the shape the field lies on:
13279     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13280     def getDimension(self):
13281         """Returns dimension of the shape the field lies on:
13282         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13283         return self.field.GetDimension(self)
13284
13285     ## Returns names of components
13286     def getComponents(self):
13287         "Returns names of components"
13288         return self.field.GetComponents(self)
13289
13290     ## Adds a time step to the field
13291     #  @param step the time step number further used as the step identifier
13292     #  @param stamp the time step time
13293     #  @param values the values of the time step
13294     def addStep(self, step, stamp, values):
13295         "Adds a time step to the field"
13296         stp = self.field.AddStep( self, step, stamp )
13297         if not stp:
13298             raise RuntimeError, \
13299                   "Field.addStep() : Error: step %s already exists in this field"%step
13300         global geom
13301         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13302         self.setValues( step, values )
13303         return stp
13304
13305     ## Remove a time step from the field
13306     def removeStep(self,step):
13307         "Remove a time step from the field"
13308         stepSO = None
13309         try:
13310             stepObj = self.field.GetStep( self, step )
13311             if stepObj:
13312                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13313         except:
13314             #import traceback
13315             #traceback.print_exc()
13316             pass
13317         self.field.RemoveStep( self, step )
13318         if stepSO:
13319             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13320         return
13321
13322     ## Returns number of time steps in the field
13323     def countSteps(self):
13324         "Returns number of time steps in the field"
13325         return self.field.CountSteps(self)
13326
13327     ## Returns a list of time step IDs in the field
13328     def getSteps(self):
13329         "Returns a list of time step IDs in the field"
13330         return self.field.GetSteps(self)
13331
13332     ## Returns a time step by its ID
13333     def getStep(self,step):
13334         "Returns a time step by its ID"
13335         stp = self.field.GetStep(self, step)
13336         if not stp:
13337             raise RuntimeError, "Step %s is missing from this field"%step
13338         return stp
13339
13340     ## Returns the time of the field step
13341     def getStamp(self,step):
13342         "Returns the time of the field step"
13343         return self.getStep(step).GetStamp()
13344
13345     ## Changes the time of the field step
13346     def setStamp(self, step, stamp):
13347         "Changes the time of the field step"
13348         return self.getStep(step).SetStamp(stamp)
13349
13350     ## Returns values of the field step
13351     def getValues(self, step):
13352         "Returns values of the field step"
13353         return self.getStep(step).GetValues()
13354
13355     ## Changes values of the field step
13356     def setValues(self, step, values):
13357         "Changes values of the field step"
13358         stp = self.getStep(step)
13359         errBeg = "Field.setValues(values) : Error: "
13360         try:
13361             ok = stp.SetValues( values )
13362         except Exception, e:
13363             excStr = str(e)
13364             if excStr.find("WrongPythonType") > 0:
13365                 raise RuntimeError, errBeg +\
13366                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13367             raise RuntimeError, errBeg + str(e)
13368         if not ok:
13369             nbOK = self.field.GetArraySize(self)
13370             nbKO = len(values)
13371             if nbOK != nbKO:
13372                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13373             else:
13374                 raise RuntimeError, errBeg + "failed"
13375         return
13376
13377     pass # end of class geomField
13378
13379 # Register the new proxy for GEOM_Field
13380 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13381
13382
13383 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13384 #  interface to GEOM operations.
13385 #
13386 #  Typical use is:
13387 #  \code
13388 #    import salome
13389 #    salome.salome_init()
13390 #    from salome.geom import geomBuilder
13391 #    geompy = geomBuilder.New(salome.myStudy)
13392 #  \endcode
13393 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13394 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13395 #  @return geomBuilder instance
13396 def New( study, instance=None):
13397     """
13398     Create a new geomBuilder instance.The geomBuilder class provides the Python
13399     interface to GEOM operations.
13400
13401     Typical use is:
13402         import salome
13403         salome.salome_init()
13404         from salome.geom import geomBuilder
13405         geompy = geomBuilder.New(salome.myStudy)
13406
13407     Parameters:
13408         study     SALOME study, generally obtained by salome.myStudy.
13409         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13410     Returns:
13411         geomBuilder instance
13412     """
13413     #print "New geomBuilder ", study, instance
13414     global engine
13415     global geom
13416     global doLcc
13417     engine = instance
13418     if engine is None:
13419       doLcc = True
13420     geom = geomBuilder()
13421     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13422     geom.init_geom(study)
13423     return geom
13424
13425
13426 # Register methods from the plug-ins in the geomBuilder class 
13427 plugins_var = os.environ.get( "GEOM_PluginsList" )
13428
13429 plugins = None
13430 if plugins_var is not None:
13431     plugins = plugins_var.split( ":" )
13432     plugins=filter(lambda x: len(x)>0, plugins)
13433 if plugins is not None:
13434     for pluginName in plugins:
13435         pluginBuilderName = pluginName + "Builder"
13436         try:
13437             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13438         except Exception, e:
13439             from salome_utils import verbose
13440             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13441             continue
13442         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13443         plugin = eval( pluginBuilderName )
13444         
13445         # add methods from plugin module to the geomBuilder class
13446         for k in dir( plugin ):
13447             if k[0] == '_': continue
13448             method = getattr( plugin, k )
13449             if type( method ).__name__ == 'function':
13450                 if not hasattr( geomBuilder, k ):
13451                     setattr( geomBuilder, k, method )
13452                 pass
13453             pass
13454         del pluginName
13455         pass
13456     pass