Salome HOME
0022857: EDF GEOM 7167: MakeHalfPartition documentation
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2015  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(ToList(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         #  @note This operation is a shortcut to the more general @ref MakePartition
7929         #  operation, where @a theShape specifies single "object" (shape being partitioned)
7930         #  and @a thePlane specifies single "tool" (intersector shape). Other parameters of
7931         #  @ref MakePartition operation have default values:
7932         #  - @a Limit: GEOM::SHAPE (shape limit corresponds to the type of @a theShape)
7933         #  - @a KeepNonlimitShapes: 0
7934         #  - @a KeepInside, @a RemoveInside, @a RemoveWebs,
7935         #    @a Materials (obsolete parameters): empty
7936         #
7937         #  @note I.e. the following two operations are equivalent:
7938         #  @code
7939         #  Result = geompy.MakeHalfPartition(Object, Plane)
7940         #  Result = geompy.MakePartition([Object], [Plane])
7941         #  @endcode
7942         #
7943         #  @sa MakePartition, MakePartitionNonSelfIntersectedShape
7944         #
7945         #  @ref tui_partition "Example"
7946         @ManageTransactions("BoolOp")
7947         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7948             """
7949             Perform partition of the Shape with the Plane
7950
7951             Parameters:
7952                 theShape Shape to be intersected.
7953                 thePlane Tool shape, to intersect theShape.
7954                 theName Object name; when specified, this parameter is used
7955                         for result publication in the study. Otherwise, if automatic
7956                         publication is switched on, default value is used for result name.
7957
7958             Returns:
7959                 New GEOM.GEOM_Object, containing the result shape.
7960          
7961             Note: This operation is a shortcut to the more general MakePartition
7962             operation, where theShape specifies single "object" (shape being partitioned)
7963             and thePlane specifies single "tool" (intersector shape). Other parameters of
7964             MakePartition operation have default values:
7965             - Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
7966             - KeepNonlimitShapes: 0
7967             - KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
7968          
7969             I.e. the following two operations are equivalent:
7970               Result = geompy.MakeHalfPartition(Object, Plane)
7971               Result = geompy.MakePartition([Object], [Plane])
7972             """
7973             # Example: see GEOM_TestAll.py
7974             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7975             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7976             self._autoPublish(anObj, theName, "partition")
7977             return anObj
7978
7979         # end of l3_basic_op
7980         ## @}
7981
7982         ## @addtogroup l3_transform
7983         ## @{
7984
7985         ## Translate the given object along the vector, specified
7986         #  by its end points.
7987         #  @param theObject The object to be translated.
7988         #  @param thePoint1 Start point of translation vector.
7989         #  @param thePoint2 End point of translation vector.
7990         #  @param theCopy Flag used to translate object itself or create a copy.
7991         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7992         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7993         @ManageTransactions("TrsfOp")
7994         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7995             """
7996             Translate the given object along the vector, specified by its end points.
7997
7998             Parameters:
7999                 theObject The object to be translated.
8000                 thePoint1 Start point of translation vector.
8001                 thePoint2 End point of translation vector.
8002                 theCopy Flag used to translate object itself or create a copy.
8003
8004             Returns:
8005                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8006                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8007             """
8008             if theCopy:
8009                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8010             else:
8011                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
8012             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
8013             return anObj
8014
8015         ## Translate the given object along the vector, specified
8016         #  by its end points, creating its copy before the translation.
8017         #  @param theObject The object to be translated.
8018         #  @param thePoint1 Start point of translation vector.
8019         #  @param thePoint2 End point of translation vector.
8020         #  @param theName Object name; when specified, this parameter is used
8021         #         for result publication in the study. Otherwise, if automatic
8022         #         publication is switched on, default value is used for result name.
8023         #
8024         #  @return New GEOM.GEOM_Object, containing the translated object.
8025         #
8026         #  @ref tui_translation "Example 1"
8027         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
8028         @ManageTransactions("TrsfOp")
8029         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
8030             """
8031             Translate the given object along the vector, specified
8032             by its end points, creating its copy before the translation.
8033
8034             Parameters:
8035                 theObject The object to be translated.
8036                 thePoint1 Start point of translation vector.
8037                 thePoint2 End point of translation vector.
8038                 theName Object name; when specified, this parameter is used
8039                         for result publication in the study. Otherwise, if automatic
8040                         publication is switched on, default value is used for result name.
8041
8042             Returns:
8043                 New GEOM.GEOM_Object, containing the translated object.
8044             """
8045             # Example: see GEOM_TestAll.py
8046             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
8047             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
8048             self._autoPublish(anObj, theName, "translated")
8049             return anObj
8050
8051         ## Translate the given object along the vector, specified by its components.
8052         #  @param theObject The object to be translated.
8053         #  @param theDX,theDY,theDZ Components of translation vector.
8054         #  @param theCopy Flag used to translate object itself or create a copy.
8055         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8056         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8057         #
8058         #  @ref tui_translation "Example"
8059         @ManageTransactions("TrsfOp")
8060         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
8061             """
8062             Translate the given object along the vector, specified by its components.
8063
8064             Parameters:
8065                 theObject The object to be translated.
8066                 theDX,theDY,theDZ Components of translation vector.
8067                 theCopy Flag used to translate object itself or create a copy.
8068
8069             Returns:
8070                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8071                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8072             """
8073             # Example: see GEOM_TestAll.py
8074             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8075             if theCopy:
8076                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8077             else:
8078                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
8079             anObj.SetParameters(Parameters)
8080             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8081             return anObj
8082
8083         ## Translate the given object along the vector, specified
8084         #  by its components, creating its copy before the translation.
8085         #  @param theObject The object to be translated.
8086         #  @param theDX,theDY,theDZ Components of translation vector.
8087         #  @param theName Object name; when specified, this parameter is used
8088         #         for result publication in the study. Otherwise, if automatic
8089         #         publication is switched on, default value is used for result name.
8090         #
8091         #  @return New GEOM.GEOM_Object, containing the translated object.
8092         #
8093         #  @ref tui_translation "Example"
8094         @ManageTransactions("TrsfOp")
8095         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
8096             """
8097             Translate the given object along the vector, specified
8098             by its components, creating its copy before the translation.
8099
8100             Parameters:
8101                 theObject The object to be translated.
8102                 theDX,theDY,theDZ Components of translation vector.
8103                 theName Object name; when specified, this parameter is used
8104                         for result publication in the study. Otherwise, if automatic
8105                         publication is switched on, default value is used for result name.
8106
8107             Returns:
8108                 New GEOM.GEOM_Object, containing the translated object.
8109             """
8110             # Example: see GEOM_TestAll.py
8111             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
8112             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
8113             anObj.SetParameters(Parameters)
8114             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
8115             self._autoPublish(anObj, theName, "translated")
8116             return anObj
8117
8118         ## Translate the given object along the given vector.
8119         #  @param theObject The object to be translated.
8120         #  @param theVector The translation vector.
8121         #  @param theCopy Flag used to translate object itself or create a copy.
8122         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8123         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8124         @ManageTransactions("TrsfOp")
8125         def TranslateVector(self, theObject, theVector, theCopy=False):
8126             """
8127             Translate the given object along the given vector.
8128
8129             Parameters:
8130                 theObject The object to be translated.
8131                 theVector The translation vector.
8132                 theCopy Flag used to translate object itself or create a copy.
8133
8134             Returns:
8135                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8136                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8137             """
8138             if theCopy:
8139                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8140             else:
8141                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
8142             RaiseIfFailed("TranslateVector", self.TrsfOp)
8143             return anObj
8144
8145         ## Translate the given object along the given vector,
8146         #  creating its copy before the translation.
8147         #  @param theObject The object to be translated.
8148         #  @param theVector The translation vector.
8149         #  @param theName Object name; when specified, this parameter is used
8150         #         for result publication in the study. Otherwise, if automatic
8151         #         publication is switched on, default value is used for result name.
8152         #
8153         #  @return New GEOM.GEOM_Object, containing the translated object.
8154         #
8155         #  @ref tui_translation "Example"
8156         @ManageTransactions("TrsfOp")
8157         def MakeTranslationVector(self, theObject, theVector, theName=None):
8158             """
8159             Translate the given object along the given vector,
8160             creating its copy before the translation.
8161
8162             Parameters:
8163                 theObject The object to be translated.
8164                 theVector The translation vector.
8165                 theName Object name; when specified, this parameter is used
8166                         for result publication in the study. Otherwise, if automatic
8167                         publication is switched on, default value is used for result name.
8168
8169             Returns:
8170                 New GEOM.GEOM_Object, containing the translated object.
8171             """
8172             # Example: see GEOM_TestAll.py
8173             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
8174             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
8175             self._autoPublish(anObj, theName, "translated")
8176             return anObj
8177
8178         ## Translate the given object along the given vector on given distance.
8179         #  @param theObject The object to be translated.
8180         #  @param theVector The translation vector.
8181         #  @param theDistance The translation distance.
8182         #  @param theCopy Flag used to translate object itself or create a copy.
8183         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8184         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
8185         #
8186         #  @ref tui_translation "Example"
8187         @ManageTransactions("TrsfOp")
8188         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
8189             """
8190             Translate the given object along the given vector on given distance.
8191
8192             Parameters:
8193                 theObject The object to be translated.
8194                 theVector The translation vector.
8195                 theDistance The translation distance.
8196                 theCopy Flag used to translate object itself or create a copy.
8197
8198             Returns:
8199                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8200                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
8201             """
8202             # Example: see GEOM_TestAll.py
8203             theDistance,Parameters = ParseParameters(theDistance)
8204             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
8205             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8206             anObj.SetParameters(Parameters)
8207             return anObj
8208
8209         ## Translate the given object along the given vector on given distance,
8210         #  creating its copy before the translation.
8211         #  @param theObject The object to be translated.
8212         #  @param theVector The translation vector.
8213         #  @param theDistance The translation distance.
8214         #  @param theName Object name; when specified, this parameter is used
8215         #         for result publication in the study. Otherwise, if automatic
8216         #         publication is switched on, default value is used for result name.
8217         #
8218         #  @return New GEOM.GEOM_Object, containing the translated object.
8219         #
8220         #  @ref tui_translation "Example"
8221         @ManageTransactions("TrsfOp")
8222         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
8223             """
8224             Translate the given object along the given vector on given distance,
8225             creating its copy before the translation.
8226
8227             Parameters:
8228                 theObject The object to be translated.
8229                 theVector The translation vector.
8230                 theDistance The translation distance.
8231                 theName Object name; when specified, this parameter is used
8232                         for result publication in the study. Otherwise, if automatic
8233                         publication is switched on, default value is used for result name.
8234
8235             Returns:
8236                 New GEOM.GEOM_Object, containing the translated object.
8237             """
8238             # Example: see GEOM_TestAll.py
8239             theDistance,Parameters = ParseParameters(theDistance)
8240             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
8241             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
8242             anObj.SetParameters(Parameters)
8243             self._autoPublish(anObj, theName, "translated")
8244             return anObj
8245
8246         ## Rotate the given object around the given axis on the given angle.
8247         #  @param theObject The object to be rotated.
8248         #  @param theAxis Rotation axis.
8249         #  @param theAngle Rotation angle in radians.
8250         #  @param theCopy Flag used to rotate object itself or create a copy.
8251         #
8252         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8253         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8254         #
8255         #  @ref tui_rotation "Example"
8256         @ManageTransactions("TrsfOp")
8257         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
8258             """
8259             Rotate the given object around the given axis on the given angle.
8260
8261             Parameters:
8262                 theObject The object to be rotated.
8263                 theAxis Rotation axis.
8264                 theAngle Rotation angle in radians.
8265                 theCopy Flag used to rotate object itself or create a copy.
8266
8267             Returns:
8268                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8269                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8270             """
8271             # Example: see GEOM_TestAll.py
8272             flag = False
8273             if isinstance(theAngle,str):
8274                 flag = True
8275             theAngle, Parameters = ParseParameters(theAngle)
8276             if flag:
8277                 theAngle = theAngle*math.pi/180.0
8278             if theCopy:
8279                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8280             else:
8281                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
8282             RaiseIfFailed("Rotate", self.TrsfOp)
8283             anObj.SetParameters(Parameters)
8284             return anObj
8285
8286         ## Rotate the given object around the given axis
8287         #  on the given angle, creating its copy before the rotation.
8288         #  @param theObject The object to be rotated.
8289         #  @param theAxis Rotation axis.
8290         #  @param theAngle Rotation angle in radians.
8291         #  @param theName Object name; when specified, this parameter is used
8292         #         for result publication in the study. Otherwise, if automatic
8293         #         publication is switched on, default value is used for result name.
8294         #
8295         #  @return New GEOM.GEOM_Object, containing the rotated object.
8296         #
8297         #  @ref tui_rotation "Example"
8298         @ManageTransactions("TrsfOp")
8299         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8300             """
8301             Rotate the given object around the given axis
8302             on the given angle, creating its copy before the rotatation.
8303
8304             Parameters:
8305                 theObject The object to be rotated.
8306                 theAxis Rotation axis.
8307                 theAngle Rotation angle in radians.
8308                 theName Object name; when specified, this parameter is used
8309                         for result publication in the study. Otherwise, if automatic
8310                         publication is switched on, default value is used for result name.
8311
8312             Returns:
8313                 New GEOM.GEOM_Object, containing the rotated object.
8314             """
8315             # Example: see GEOM_TestAll.py
8316             flag = False
8317             if isinstance(theAngle,str):
8318                 flag = True
8319             theAngle, Parameters = ParseParameters(theAngle)
8320             if flag:
8321                 theAngle = theAngle*math.pi/180.0
8322             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8323             RaiseIfFailed("RotateCopy", self.TrsfOp)
8324             anObj.SetParameters(Parameters)
8325             self._autoPublish(anObj, theName, "rotated")
8326             return anObj
8327
8328         ## Rotate given object around vector perpendicular to plane
8329         #  containing three points.
8330         #  @param theObject The object to be rotated.
8331         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8332         #  containing the three points.
8333         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8334         #  @param theCopy Flag used to rotate object itself or create a copy.
8335         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8336         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8337         @ManageTransactions("TrsfOp")
8338         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8339             """
8340             Rotate given object around vector perpendicular to plane
8341             containing three points.
8342
8343             Parameters:
8344                 theObject The object to be rotated.
8345                 theCentPoint central point  the axis is the vector perpendicular to the plane
8346                              containing the three points.
8347                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8348                 theCopy Flag used to rotate object itself or create a copy.
8349
8350             Returns:
8351                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8352                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8353             """
8354             if theCopy:
8355                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8356             else:
8357                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8358             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8359             return anObj
8360
8361         ## Rotate given object around vector perpendicular to plane
8362         #  containing three points, creating its copy before the rotatation.
8363         #  @param theObject The object to be rotated.
8364         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8365         #  containing the three points.
8366         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8367         #  @param theName Object name; when specified, this parameter is used
8368         #         for result publication in the study. Otherwise, if automatic
8369         #         publication is switched on, default value is used for result name.
8370         #
8371         #  @return New GEOM.GEOM_Object, containing the rotated object.
8372         #
8373         #  @ref tui_rotation "Example"
8374         @ManageTransactions("TrsfOp")
8375         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8376             """
8377             Rotate given object around vector perpendicular to plane
8378             containing three points, creating its copy before the rotatation.
8379
8380             Parameters:
8381                 theObject The object to be rotated.
8382                 theCentPoint central point  the axis is the vector perpendicular to the plane
8383                              containing the three points.
8384                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8385                 theName Object name; when specified, this parameter is used
8386                         for result publication in the study. Otherwise, if automatic
8387                         publication is switched on, default value is used for result name.
8388
8389             Returns:
8390                 New GEOM.GEOM_Object, containing the rotated object.
8391             """
8392             # Example: see GEOM_TestAll.py
8393             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8394             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8395             self._autoPublish(anObj, theName, "rotated")
8396             return anObj
8397
8398         ## Scale the given object by the specified factor.
8399         #  @param theObject The object to be scaled.
8400         #  @param thePoint Center point for scaling.
8401         #                  Passing None for it means scaling relatively the origin of global CS.
8402         #  @param theFactor Scaling factor value.
8403         #  @param theCopy Flag used to scale object itself or create a copy.
8404         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8405         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8406         @ManageTransactions("TrsfOp")
8407         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8408             """
8409             Scale the given object by the specified factor.
8410
8411             Parameters:
8412                 theObject The object to be scaled.
8413                 thePoint Center point for scaling.
8414                          Passing None for it means scaling relatively the origin of global CS.
8415                 theFactor Scaling factor value.
8416                 theCopy Flag used to scale object itself or create a copy.
8417
8418             Returns:
8419                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8420                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8421             """
8422             # Example: see GEOM_TestAll.py
8423             theFactor, Parameters = ParseParameters(theFactor)
8424             if theCopy:
8425                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8426             else:
8427                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8428             RaiseIfFailed("Scale", self.TrsfOp)
8429             anObj.SetParameters(Parameters)
8430             return anObj
8431
8432         ## Scale the given object by the factor, creating its copy before the scaling.
8433         #  @param theObject The object to be scaled.
8434         #  @param thePoint Center point for scaling.
8435         #                  Passing None for it means scaling relatively the origin of global CS.
8436         #  @param theFactor Scaling factor value.
8437         #  @param theName Object name; when specified, this parameter is used
8438         #         for result publication in the study. Otherwise, if automatic
8439         #         publication is switched on, default value is used for result name.
8440         #
8441         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8442         #
8443         #  @ref tui_scale "Example"
8444         @ManageTransactions("TrsfOp")
8445         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8446             """
8447             Scale the given object by the factor, creating its copy before the scaling.
8448
8449             Parameters:
8450                 theObject The object to be scaled.
8451                 thePoint Center point for scaling.
8452                          Passing None for it means scaling relatively the origin of global CS.
8453                 theFactor Scaling factor value.
8454                 theName Object name; when specified, this parameter is used
8455                         for result publication in the study. Otherwise, if automatic
8456                         publication is switched on, default value is used for result name.
8457
8458             Returns:
8459                 New GEOM.GEOM_Object, containing the scaled shape.
8460             """
8461             # Example: see GEOM_TestAll.py
8462             theFactor, Parameters = ParseParameters(theFactor)
8463             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8464             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8465             anObj.SetParameters(Parameters)
8466             self._autoPublish(anObj, theName, "scaled")
8467             return anObj
8468
8469         ## Scale the given object by different factors along coordinate axes.
8470         #  @param theObject The object to be scaled.
8471         #  @param thePoint Center point for scaling.
8472         #                  Passing None for it means scaling relatively the origin of global CS.
8473         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8474         #  @param theCopy Flag used to scale object itself or create a copy.
8475         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8476         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8477         @ManageTransactions("TrsfOp")
8478         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8479             """
8480             Scale the given object by different factors along coordinate axes.
8481
8482             Parameters:
8483                 theObject The object to be scaled.
8484                 thePoint Center point for scaling.
8485                             Passing None for it means scaling relatively the origin of global CS.
8486                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8487                 theCopy Flag used to scale object itself or create a copy.
8488
8489             Returns:
8490                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8491                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8492             """
8493             # Example: see GEOM_TestAll.py
8494             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8495             if theCopy:
8496                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8497                                                             theFactorX, theFactorY, theFactorZ)
8498             else:
8499                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8500                                                         theFactorX, theFactorY, theFactorZ)
8501             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8502             anObj.SetParameters(Parameters)
8503             return anObj
8504
8505         ## Scale the given object by different factors along coordinate axes,
8506         #  creating its copy before the scaling.
8507         #  @param theObject The object to be scaled.
8508         #  @param thePoint Center point for scaling.
8509         #                  Passing None for it means scaling relatively the origin of global CS.
8510         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8511         #  @param theName Object name; when specified, this parameter is used
8512         #         for result publication in the study. Otherwise, if automatic
8513         #         publication is switched on, default value is used for result name.
8514         #
8515         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8516         #
8517         #  @ref swig_scale "Example"
8518         @ManageTransactions("TrsfOp")
8519         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8520             """
8521             Scale the given object by different factors along coordinate axes,
8522             creating its copy before the scaling.
8523
8524             Parameters:
8525                 theObject The object to be scaled.
8526                 thePoint Center point for scaling.
8527                             Passing None for it means scaling relatively the origin of global CS.
8528                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8529                 theName Object name; when specified, this parameter is used
8530                         for result publication in the study. Otherwise, if automatic
8531                         publication is switched on, default value is used for result name.
8532
8533             Returns:
8534                 New GEOM.GEOM_Object, containing the scaled shape.
8535             """
8536             # Example: see GEOM_TestAll.py
8537             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8538             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8539                                                         theFactorX, theFactorY, theFactorZ)
8540             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8541             anObj.SetParameters(Parameters)
8542             self._autoPublish(anObj, theName, "scaled")
8543             return anObj
8544
8545         ## Mirror an object relatively the given plane.
8546         #  @param theObject The object to be mirrored.
8547         #  @param thePlane Plane of symmetry.
8548         #  @param theCopy Flag used to mirror object itself or create a copy.
8549         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8550         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8551         @ManageTransactions("TrsfOp")
8552         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8553             """
8554             Mirror an object relatively the given plane.
8555
8556             Parameters:
8557                 theObject The object to be mirrored.
8558                 thePlane Plane of symmetry.
8559                 theCopy Flag used to mirror object itself or create a copy.
8560
8561             Returns:
8562                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8563                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8564             """
8565             if theCopy:
8566                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8567             else:
8568                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8569             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8570             return anObj
8571
8572         ## Create an object, symmetrical
8573         #  to the given one relatively the given plane.
8574         #  @param theObject The object to be mirrored.
8575         #  @param thePlane Plane of symmetry.
8576         #  @param theName Object name; when specified, this parameter is used
8577         #         for result publication in the study. Otherwise, if automatic
8578         #         publication is switched on, default value is used for result name.
8579         #
8580         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8581         #
8582         #  @ref tui_mirror "Example"
8583         @ManageTransactions("TrsfOp")
8584         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8585             """
8586             Create an object, symmetrical to the given one relatively the given plane.
8587
8588             Parameters:
8589                 theObject The object to be mirrored.
8590                 thePlane Plane of symmetry.
8591                 theName Object name; when specified, this parameter is used
8592                         for result publication in the study. Otherwise, if automatic
8593                         publication is switched on, default value is used for result name.
8594
8595             Returns:
8596                 New GEOM.GEOM_Object, containing the mirrored shape.
8597             """
8598             # Example: see GEOM_TestAll.py
8599             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8600             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8601             self._autoPublish(anObj, theName, "mirrored")
8602             return anObj
8603
8604         ## Mirror an object relatively the given axis.
8605         #  @param theObject The object to be mirrored.
8606         #  @param theAxis Axis of symmetry.
8607         #  @param theCopy Flag used to mirror object itself or create a copy.
8608         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8609         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8610         @ManageTransactions("TrsfOp")
8611         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8612             """
8613             Mirror an object relatively the given axis.
8614
8615             Parameters:
8616                 theObject The object to be mirrored.
8617                 theAxis Axis of symmetry.
8618                 theCopy Flag used to mirror object itself or create a copy.
8619
8620             Returns:
8621                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8622                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8623             """
8624             if theCopy:
8625                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8626             else:
8627                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8628             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8629             return anObj
8630
8631         ## Create an object, symmetrical
8632         #  to the given one relatively the given axis.
8633         #  @param theObject The object to be mirrored.
8634         #  @param theAxis Axis of symmetry.
8635         #  @param theName Object name; when specified, this parameter is used
8636         #         for result publication in the study. Otherwise, if automatic
8637         #         publication is switched on, default value is used for result name.
8638         #
8639         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8640         #
8641         #  @ref tui_mirror "Example"
8642         @ManageTransactions("TrsfOp")
8643         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8644             """
8645             Create an object, symmetrical to the given one relatively the given axis.
8646
8647             Parameters:
8648                 theObject The object to be mirrored.
8649                 theAxis Axis of symmetry.
8650                 theName Object name; when specified, this parameter is used
8651                         for result publication in the study. Otherwise, if automatic
8652                         publication is switched on, default value is used for result name.
8653
8654             Returns:
8655                 New GEOM.GEOM_Object, containing the mirrored shape.
8656             """
8657             # Example: see GEOM_TestAll.py
8658             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8659             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8660             self._autoPublish(anObj, theName, "mirrored")
8661             return anObj
8662
8663         ## Mirror an object relatively the given point.
8664         #  @param theObject The object to be mirrored.
8665         #  @param thePoint Point of symmetry.
8666         #  @param theCopy Flag used to mirror object itself or create a copy.
8667         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8668         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8669         @ManageTransactions("TrsfOp")
8670         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8671             """
8672             Mirror an object relatively the given point.
8673
8674             Parameters:
8675                 theObject The object to be mirrored.
8676                 thePoint Point of symmetry.
8677                 theCopy Flag used to mirror object itself or create a copy.
8678
8679             Returns:
8680                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8681                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8682             """
8683             # Example: see GEOM_TestAll.py
8684             if theCopy:
8685                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8686             else:
8687                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8688             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8689             return anObj
8690
8691         ## Create an object, symmetrical
8692         #  to the given one relatively the given point.
8693         #  @param theObject The object to be mirrored.
8694         #  @param thePoint Point of symmetry.
8695         #  @param theName Object name; when specified, this parameter is used
8696         #         for result publication in the study. Otherwise, if automatic
8697         #         publication is switched on, default value is used for result name.
8698         #
8699         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8700         #
8701         #  @ref tui_mirror "Example"
8702         @ManageTransactions("TrsfOp")
8703         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8704             """
8705             Create an object, symmetrical
8706             to the given one relatively the given point.
8707
8708             Parameters:
8709                 theObject The object to be mirrored.
8710                 thePoint Point of symmetry.
8711                 theName Object name; when specified, this parameter is used
8712                         for result publication in the study. Otherwise, if automatic
8713                         publication is switched on, default value is used for result name.
8714
8715             Returns:
8716                 New GEOM.GEOM_Object, containing the mirrored shape.
8717             """
8718             # Example: see GEOM_TestAll.py
8719             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8720             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8721             self._autoPublish(anObj, theName, "mirrored")
8722             return anObj
8723
8724         ## Modify the location of the given object.
8725         #  @param theObject The object to be displaced.
8726         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8727         #                     If \a theStartLCS is NULL, displacement
8728         #                     will be performed from global CS.\n
8729         #                     If \a theObject itself is used as \a theStartLCS,
8730         #                     its location will be changed to \a theEndLCS.
8731         #  @param theEndLCS Coordinate system to perform displacement to it.
8732         #  @param theCopy Flag used to displace object itself or create a copy.
8733         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8734         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8735         @ManageTransactions("TrsfOp")
8736         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8737             """
8738             Modify the Location of the given object by LCS, creating its copy before the setting.
8739
8740             Parameters:
8741                 theObject The object to be displaced.
8742                 theStartLCS Coordinate system to perform displacement from it.
8743                             If theStartLCS is NULL, displacement
8744                             will be performed from global CS.
8745                             If theObject itself is used as theStartLCS,
8746                             its location will be changed to theEndLCS.
8747                 theEndLCS Coordinate system to perform displacement to it.
8748                 theCopy Flag used to displace object itself or create a copy.
8749
8750             Returns:
8751                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8752                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8753             """
8754             # Example: see GEOM_TestAll.py
8755             if theCopy:
8756                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8757             else:
8758                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8759             RaiseIfFailed("Displace", self.TrsfOp)
8760             return anObj
8761
8762         ## Modify the Location of the given object by LCS,
8763         #  creating its copy before the setting.
8764         #  @param theObject The object to be displaced.
8765         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8766         #                     If \a theStartLCS is NULL, displacement
8767         #                     will be performed from global CS.\n
8768         #                     If \a theObject itself is used as \a theStartLCS,
8769         #                     its location will be changed to \a theEndLCS.
8770         #  @param theEndLCS Coordinate system to perform displacement to it.
8771         #  @param theName Object name; when specified, this parameter is used
8772         #         for result publication in the study. Otherwise, if automatic
8773         #         publication is switched on, default value is used for result name.
8774         #
8775         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8776         #
8777         #  @ref tui_modify_location "Example"
8778         @ManageTransactions("TrsfOp")
8779         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8780             """
8781             Modify the Location of the given object by LCS, creating its copy before the setting.
8782
8783             Parameters:
8784                 theObject The object to be displaced.
8785                 theStartLCS Coordinate system to perform displacement from it.
8786                             If theStartLCS is NULL, displacement
8787                             will be performed from global CS.
8788                             If theObject itself is used as theStartLCS,
8789                             its location will be changed to theEndLCS.
8790                 theEndLCS Coordinate system to perform displacement to it.
8791                 theName Object name; when specified, this parameter is used
8792                         for result publication in the study. Otherwise, if automatic
8793                         publication is switched on, default value is used for result name.
8794
8795             Returns:
8796                 New GEOM.GEOM_Object, containing the displaced shape.
8797
8798             Example of usage:
8799                 # create local coordinate systems
8800                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8801                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8802                 # modify the location of the given object
8803                 position = geompy.MakePosition(cylinder, cs1, cs2)
8804             """
8805             # Example: see GEOM_TestAll.py
8806             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8807             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8808             self._autoPublish(anObj, theName, "displaced")
8809             return anObj
8810
8811         ## Modify the Location of the given object by Path.
8812         #  @param  theObject The object to be displaced.
8813         #  @param  thePath Wire or Edge along that the object will be translated.
8814         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8815         #  @param  theCopy is to create a copy objects if true.
8816         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8817         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8818         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8819         #
8820         #  @ref tui_modify_location "Example"
8821         @ManageTransactions("TrsfOp")
8822         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8823             """
8824             Modify the Location of the given object by Path.
8825
8826             Parameters:
8827                  theObject The object to be displaced.
8828                  thePath Wire or Edge along that the object will be translated.
8829                  theDistance progress of Path (0 = start location, 1 = end of path location).
8830                  theCopy is to create a copy objects if true.
8831                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8832
8833             Returns:
8834                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8835                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8836
8837             Example of usage:
8838                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8839             """
8840             # Example: see GEOM_TestAll.py
8841             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8842             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8843             return anObj
8844
8845         ## Modify the Location of the given object by Path, creating its copy before the operation.
8846         #  @param theObject The object to be displaced.
8847         #  @param thePath Wire or Edge along that the object will be translated.
8848         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8849         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8850         #  @param theName Object name; when specified, this parameter is used
8851         #         for result publication in the study. Otherwise, if automatic
8852         #         publication is switched on, default value is used for result name.
8853         #
8854         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8855         @ManageTransactions("TrsfOp")
8856         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8857             """
8858             Modify the Location of the given object by Path, creating its copy before the operation.
8859
8860             Parameters:
8861                  theObject The object to be displaced.
8862                  thePath Wire or Edge along that the object will be translated.
8863                  theDistance progress of Path (0 = start location, 1 = end of path location).
8864                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8865                  theName Object name; when specified, this parameter is used
8866                          for result publication in the study. Otherwise, if automatic
8867                          publication is switched on, default value is used for result name.
8868
8869             Returns:
8870                 New GEOM.GEOM_Object, containing the displaced shape.
8871             """
8872             # Example: see GEOM_TestAll.py
8873             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8874             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8875             self._autoPublish(anObj, theName, "displaced")
8876             return anObj
8877
8878         ## Offset given shape.
8879         #  @param theObject The base object for the offset.
8880         #  @param theOffset Offset value.
8881         #  @param theCopy Flag used to offset object itself or create a copy.
8882         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8883         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8884         @ManageTransactions("TrsfOp")
8885         def Offset(self, theObject, theOffset, theCopy=False):
8886             """
8887             Offset given shape.
8888
8889             Parameters:
8890                 theObject The base object for the offset.
8891                 theOffset Offset value.
8892                 theCopy Flag used to offset object itself or create a copy.
8893
8894             Returns:
8895                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8896                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8897             """
8898             theOffset, Parameters = ParseParameters(theOffset)
8899             if theCopy:
8900                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8901             else:
8902                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8903             RaiseIfFailed("Offset", self.TrsfOp)
8904             anObj.SetParameters(Parameters)
8905             return anObj
8906
8907         ## Create new object as offset of the given one.
8908         #  @param theObject The base object for the offset.
8909         #  @param theOffset Offset value.
8910         #  @param theName Object name; when specified, this parameter is used
8911         #         for result publication in the study. Otherwise, if automatic
8912         #         publication is switched on, default value is used for result name.
8913         #
8914         #  @return New GEOM.GEOM_Object, containing the offset object.
8915         #
8916         #  @ref tui_offset "Example"
8917         @ManageTransactions("TrsfOp")
8918         def MakeOffset(self, theObject, theOffset, theName=None):
8919             """
8920             Create new object as offset of the given one.
8921
8922             Parameters:
8923                 theObject The base object for the offset.
8924                 theOffset Offset value.
8925                 theName Object name; when specified, this parameter is used
8926                         for result publication in the study. Otherwise, if automatic
8927                         publication is switched on, default value is used for result name.
8928
8929             Returns:
8930                 New GEOM.GEOM_Object, containing the offset object.
8931
8932             Example of usage:
8933                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8934                  # create a new object as offset of the given object
8935                  offset = geompy.MakeOffset(box, 70.)
8936             """
8937             # Example: see GEOM_TestAll.py
8938             theOffset, Parameters = ParseParameters(theOffset)
8939             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8940             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8941             anObj.SetParameters(Parameters)
8942             self._autoPublish(anObj, theName, "offset")
8943             return anObj
8944
8945         ## Create new object as projection of the given one on another.
8946         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8947         #         Edge and wire are acceptable if @a theTarget is a face.
8948         #  @param theTarget The target object. It can be planar or cylindrical face, edge or wire.
8949         #  @param theName Object name; when specified, this parameter is used
8950         #         for result publication in the study. Otherwise, if automatic
8951         #         publication is switched on, default value is used for result name.
8952         #
8953         #  @return New GEOM.GEOM_Object, containing the projection.
8954         #
8955         #  @ref tui_projection "Example"
8956         @ManageTransactions("TrsfOp")
8957         def MakeProjection(self, theSource, theTarget, theName=None):
8958             """
8959             Create new object as projection of the given one on another.
8960
8961             Parameters:
8962                 theSource The source object for the projection. It can be a point, edge or wire.
8963                           Edge and wire are acceptable if theTarget is a face.
8964                 theTarget The target object. It can be planar or cylindrical face, edge or wire.
8965                 theName Object name; when specified, this parameter is used
8966                         for result publication in the study. Otherwise, if automatic
8967                         publication is switched on, default value is used for result name.
8968
8969             Returns:
8970                 New GEOM.GEOM_Object, containing the projection.
8971             """
8972             # Example: see GEOM_TestAll.py
8973             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8974             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8975             self._autoPublish(anObj, theName, "projection")
8976             return anObj
8977
8978         ## Create a projection projection of the given point on a wire or an edge.
8979         #  If there are no solutions or there are 2 or more solutions It throws an
8980         #  exception.
8981         #  @param thePoint the point to be projected.
8982         #  @param theWire the wire. The edge is accepted as well.
8983         #  @param theName Object name; when specified, this parameter is used
8984         #         for result publication in the study. Otherwise, if automatic
8985         #         publication is switched on, default value is used for result name.
8986         #
8987         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8988         #  \n \a u: The parameter of projection point on edge.
8989         #  \n \a PointOnEdge: The projection point.
8990         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8991         #
8992         #  @ref tui_projection "Example"
8993         @ManageTransactions("TrsfOp")
8994         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8995             """
8996             Create a projection projection of the given point on a wire or an edge.
8997             If there are no solutions or there are 2 or more solutions It throws an
8998             exception.
8999
9000             Parameters:
9001                 thePoint the point to be projected.
9002                 theWire the wire. The edge is accepted as well.
9003                 theName Object name; when specified, this parameter is used
9004                         for result publication in the study. Otherwise, if automatic
9005                         publication is switched on, default value is used for result name.
9006
9007             Returns:
9008                 [u, PointOnEdge, EdgeInWireIndex]
9009                  u: The parameter of projection point on edge.
9010                  PointOnEdge: The projection point.
9011                  EdgeInWireIndex: The index of an edge in a wire.
9012             """
9013             # Example: see GEOM_TestAll.py
9014             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
9015             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
9016             self._autoPublish(anObj[1], theName, "projection")
9017             return anObj
9018
9019         # -----------------------------------------------------------------------------
9020         # Patterns
9021         # -----------------------------------------------------------------------------
9022
9023         ## Translate the given object along the given vector a given number times
9024         #  @param theObject The object to be translated.
9025         #  @param theVector Direction of the translation. DX if None.
9026         #  @param theStep Distance to translate on.
9027         #  @param theNbTimes Quantity of translations to be done.
9028         #  @param theName Object name; when specified, this parameter is used
9029         #         for result publication in the study. Otherwise, if automatic
9030         #         publication is switched on, default value is used for result name.
9031         #
9032         #  @return New GEOM.GEOM_Object, containing compound of all
9033         #          the shapes, obtained after each translation.
9034         #
9035         #  @ref tui_multi_translation "Example"
9036         @ManageTransactions("TrsfOp")
9037         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
9038             """
9039             Translate the given object along the given vector a given number times
9040
9041             Parameters:
9042                 theObject The object to be translated.
9043                 theVector Direction of the translation. DX if None.
9044                 theStep Distance to translate on.
9045                 theNbTimes Quantity of translations to be done.
9046                 theName Object name; when specified, this parameter is used
9047                         for result publication in the study. Otherwise, if automatic
9048                         publication is switched on, default value is used for result name.
9049
9050             Returns:
9051                 New GEOM.GEOM_Object, containing compound of all
9052                 the shapes, obtained after each translation.
9053
9054             Example of usage:
9055                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
9056             """
9057             # Example: see GEOM_TestAll.py
9058             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
9059             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
9060             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
9061             anObj.SetParameters(Parameters)
9062             self._autoPublish(anObj, theName, "multitranslation")
9063             return anObj
9064
9065         ## Conseqently apply two specified translations to theObject specified number of times.
9066         #  @param theObject The object to be translated.
9067         #  @param theVector1 Direction of the first translation. DX if None.
9068         #  @param theStep1 Step of the first translation.
9069         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
9070         #  @param theVector2 Direction of the second translation. DY if None.
9071         #  @param theStep2 Step of the second translation.
9072         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
9073         #  @param theName Object name; when specified, this parameter is used
9074         #         for result publication in the study. Otherwise, if automatic
9075         #         publication is switched on, default value is used for result name.
9076         #
9077         #  @return New GEOM.GEOM_Object, containing compound of all
9078         #          the shapes, obtained after each translation.
9079         #
9080         #  @ref tui_multi_translation "Example"
9081         @ManageTransactions("TrsfOp")
9082         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
9083                                    theVector2, theStep2, theNbTimes2, theName=None):
9084             """
9085             Conseqently apply two specified translations to theObject specified number of times.
9086
9087             Parameters:
9088                 theObject The object to be translated.
9089                 theVector1 Direction of the first translation. DX if None.
9090                 theStep1 Step of the first translation.
9091                 theNbTimes1 Quantity of translations to be done along theVector1.
9092                 theVector2 Direction of the second translation. DY if None.
9093                 theStep2 Step of the second translation.
9094                 theNbTimes2 Quantity of translations to be done along theVector2.
9095                 theName Object name; when specified, this parameter is used
9096                         for result publication in the study. Otherwise, if automatic
9097                         publication is switched on, default value is used for result name.
9098
9099             Returns:
9100                 New GEOM.GEOM_Object, containing compound of all
9101                 the shapes, obtained after each translation.
9102
9103             Example of usage:
9104                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
9105             """
9106             # Example: see GEOM_TestAll.py
9107             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
9108             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
9109                                                  theVector2, theStep2, theNbTimes2)
9110             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
9111             anObj.SetParameters(Parameters)
9112             self._autoPublish(anObj, theName, "multitranslation")
9113             return anObj
9114
9115         ## Rotate the given object around the given axis a given number times.
9116         #  Rotation angle will be 2*PI/theNbTimes.
9117         #  @param theObject The object to be rotated.
9118         #  @param theAxis The rotation axis. DZ if None.
9119         #  @param theNbTimes Quantity of rotations to be done.
9120         #  @param theName Object name; when specified, this parameter is used
9121         #         for result publication in the study. Otherwise, if automatic
9122         #         publication is switched on, default value is used for result name.
9123         #
9124         #  @return New GEOM.GEOM_Object, containing compound of all the
9125         #          shapes, obtained after each rotation.
9126         #
9127         #  @ref tui_multi_rotation "Example"
9128         @ManageTransactions("TrsfOp")
9129         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
9130             """
9131             Rotate the given object around the given axis a given number times.
9132             Rotation angle will be 2*PI/theNbTimes.
9133
9134             Parameters:
9135                 theObject The object to be rotated.
9136                 theAxis The rotation axis. DZ if None.
9137                 theNbTimes Quantity of rotations to be done.
9138                 theName Object name; when specified, this parameter is used
9139                         for result publication in the study. Otherwise, if automatic
9140                         publication is switched on, default value is used for result name.
9141
9142             Returns:
9143                 New GEOM.GEOM_Object, containing compound of all the
9144                 shapes, obtained after each rotation.
9145
9146             Example of usage:
9147                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
9148             """
9149             # Example: see GEOM_TestAll.py
9150             theNbTimes, Parameters = ParseParameters(theNbTimes)
9151             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
9152             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
9153             anObj.SetParameters(Parameters)
9154             self._autoPublish(anObj, theName, "multirotation")
9155             return anObj
9156
9157         ## Rotate the given object around the given axis
9158         #  a given number times on the given angle.
9159         #  @param theObject The object to be rotated.
9160         #  @param theAxis The rotation axis. DZ if None.
9161         #  @param theAngleStep Rotation angle in radians.
9162         #  @param theNbTimes Quantity of rotations to be done.
9163         #  @param theName Object name; when specified, this parameter is used
9164         #         for result publication in the study. Otherwise, if automatic
9165         #         publication is switched on, default value is used for result name.
9166         #
9167         #  @return New GEOM.GEOM_Object, containing compound of all the
9168         #          shapes, obtained after each rotation.
9169         #
9170         #  @ref tui_multi_rotation "Example"
9171         @ManageTransactions("TrsfOp")
9172         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
9173             """
9174             Rotate the given object around the given axis
9175             a given number times on the given angle.
9176
9177             Parameters:
9178                 theObject The object to be rotated.
9179                 theAxis The rotation axis. DZ if None.
9180                 theAngleStep Rotation angle in radians.
9181                 theNbTimes Quantity of rotations to be done.
9182                 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             Returns:
9187                 New GEOM.GEOM_Object, containing compound of all the
9188                 shapes, obtained after each rotation.
9189
9190             Example of usage:
9191                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
9192             """
9193             # Example: see GEOM_TestAll.py
9194             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
9195             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
9196             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
9197             anObj.SetParameters(Parameters)
9198             self._autoPublish(anObj, theName, "multirotation")
9199             return anObj
9200
9201         ## Rotate the given object around the given axis a given
9202         #  number times and multi-translate each rotation result.
9203         #  Rotation angle will be 2*PI/theNbTimes1.
9204         #  Translation direction passes through center of gravity
9205         #  of rotated shape and its projection on the rotation axis.
9206         #  @param theObject The object to be rotated.
9207         #  @param theAxis Rotation axis. DZ if None.
9208         #  @param theNbTimes1 Quantity of rotations to be done.
9209         #  @param theRadialStep Translation distance.
9210         #  @param theNbTimes2 Quantity of translations to be done.
9211         #  @param theName Object name; when specified, this parameter is used
9212         #         for result publication in the study. Otherwise, if automatic
9213         #         publication is switched on, default value is used for result name.
9214         #
9215         #  @return New GEOM.GEOM_Object, containing compound of all the
9216         #          shapes, obtained after each transformation.
9217         #
9218         #  @ref tui_multi_rotation "Example"
9219         @ManageTransactions("TrsfOp")
9220         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9221             """
9222             Rotate the given object around the
9223             given axis on the given angle a given number
9224             times and multi-translate each rotation result.
9225             Translation direction passes through center of gravity
9226             of rotated shape and its projection on the rotation axis.
9227
9228             Parameters:
9229                 theObject The object to be rotated.
9230                 theAxis Rotation axis. DZ if None.
9231                 theNbTimes1 Quantity of rotations to be done.
9232                 theRadialStep Translation distance.
9233                 theNbTimes2 Quantity of translations to be done.
9234                 theName Object name; when specified, this parameter is used
9235                         for result publication in the study. Otherwise, if automatic
9236                         publication is switched on, default value is used for result name.
9237
9238             Returns:
9239                 New GEOM.GEOM_Object, containing compound of all the
9240                 shapes, obtained after each transformation.
9241
9242             Example of usage:
9243                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9244             """
9245             # Example: see GEOM_TestAll.py
9246             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
9247             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
9248             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
9249             anObj.SetParameters(Parameters)
9250             self._autoPublish(anObj, theName, "multirotation")
9251             return anObj
9252
9253         ## Rotate the given object around the
9254         #  given axis on the given angle a given number
9255         #  times and multi-translate each rotation result.
9256         #  Translation direction passes through center of gravity
9257         #  of rotated shape and its projection on the rotation axis.
9258         #  @param theObject The object to be rotated.
9259         #  @param theAxis Rotation axis. DZ if None.
9260         #  @param theAngleStep Rotation angle in radians.
9261         #  @param theNbTimes1 Quantity of rotations to be done.
9262         #  @param theRadialStep Translation distance.
9263         #  @param theNbTimes2 Quantity of translations to be done.
9264         #  @param theName Object name; when specified, this parameter is used
9265         #         for result publication in the study. Otherwise, if automatic
9266         #         publication is switched on, default value is used for result name.
9267         #
9268         #  @return New GEOM.GEOM_Object, containing compound of all the
9269         #          shapes, obtained after each transformation.
9270         #
9271         #  @ref tui_multi_rotation "Example"
9272         @ManageTransactions("TrsfOp")
9273         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
9274             """
9275             Rotate the given object around the
9276             given axis on the given angle a given number
9277             times and multi-translate each rotation result.
9278             Translation direction passes through center of gravity
9279             of rotated shape and its projection on the rotation axis.
9280
9281             Parameters:
9282                 theObject The object to be rotated.
9283                 theAxis Rotation axis. DZ if None.
9284                 theAngleStep Rotation angle in radians.
9285                 theNbTimes1 Quantity of rotations to be done.
9286                 theRadialStep Translation distance.
9287                 theNbTimes2 Quantity of translations to be done.
9288                 theName Object name; when specified, this parameter is used
9289                         for result publication in the study. Otherwise, if automatic
9290                         publication is switched on, default value is used for result name.
9291
9292             Returns:
9293                 New GEOM.GEOM_Object, containing compound of all the
9294                 shapes, obtained after each transformation.
9295
9296             Example of usage:
9297                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9298             """
9299             # Example: see GEOM_TestAll.py
9300             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9301             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9302             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9303             anObj.SetParameters(Parameters)
9304             self._autoPublish(anObj, theName, "multirotation")
9305             return anObj
9306
9307         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9308         #
9309         #  @ref swig_MakeMultiRotation "Example"
9310         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9311             """
9312             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9313
9314             Example of usage:
9315                 pz = geompy.MakeVertex(0, 0, 100)
9316                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9317                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9318             """
9319             # Example: see GEOM_TestOthers.py
9320             aVec = self.MakeLine(aPoint,aDir)
9321             # note: auto-publishing is done in self.MultiRotate1D()
9322             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9323             return anObj
9324
9325         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9326         #
9327         #  @ref swig_MakeMultiRotation "Example"
9328         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9329             """
9330             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9331
9332             Example of usage:
9333                 pz = geompy.MakeVertex(0, 0, 100)
9334                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9335                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9336             """
9337             # Example: see GEOM_TestOthers.py
9338             aVec = self.MakeLine(aPoint,aDir)
9339             # note: auto-publishing is done in self.MultiRotate1D()
9340             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9341             return anObj
9342
9343         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9344         #
9345         #  @ref swig_MakeMultiRotation "Example"
9346         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9347             """
9348             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9349
9350             Example of usage:
9351                 pz = geompy.MakeVertex(0, 0, 100)
9352                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9353                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9354             """
9355             # Example: see GEOM_TestOthers.py
9356             aVec = self.MakeLine(aPoint,aDir)
9357             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9358             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9359             return anObj
9360
9361         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9362         #
9363         #  @ref swig_MakeMultiRotation "Example"
9364         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9365             """
9366             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9367
9368             Example of usage:
9369                 pz = geompy.MakeVertex(0, 0, 100)
9370                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9371                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9372             """
9373             # Example: see GEOM_TestOthers.py
9374             aVec = self.MakeLine(aPoint,aDir)
9375             # note: auto-publishing is done in self.MultiRotate2D()
9376             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9377             return anObj
9378
9379         # end of l3_transform
9380         ## @}
9381
9382         ## @addtogroup l3_transform_d
9383         ## @{
9384
9385         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9386         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9387             """
9388             Deprecated method. Use MultiRotate1DNbTimes instead.
9389             """
9390             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9391             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9392
9393         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9394         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9395         @ManageTransactions("TrsfOp")
9396         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9397             """
9398             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9399             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9400
9401             Example of usage:
9402                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9403             """
9404             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9405             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9406             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9407             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9408             anObj.SetParameters(Parameters)
9409             self._autoPublish(anObj, theName, "multirotation")
9410             return anObj
9411
9412         ## The same, as MultiRotate1D(), but axis is given by direction and point
9413         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9414         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9415             """
9416             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9417             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9418
9419             Example of usage:
9420                 pz = geompy.MakeVertex(0, 0, 100)
9421                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9422                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9423             """
9424             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9425             aVec = self.MakeLine(aPoint,aDir)
9426             # note: auto-publishing is done in self.MultiRotate1D()
9427             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9428             return anObj
9429
9430         ## The same, as MultiRotate2D(), but axis is given by direction and point
9431         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9432         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9433             """
9434             The same, as MultiRotate2D(), but axis is given by direction and point
9435             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9436
9437             Example of usage:
9438                 pz = geompy.MakeVertex(0, 0, 100)
9439                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9440                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9441             """
9442             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9443             aVec = self.MakeLine(aPoint,aDir)
9444             # note: auto-publishing is done in self.MultiRotate2D()
9445             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9446             return anObj
9447
9448         # end of l3_transform_d
9449         ## @}
9450
9451         ## @addtogroup l3_local
9452         ## @{
9453
9454         ## Perform a fillet on all edges of the given shape.
9455         #  @param theShape Shape, to perform fillet on.
9456         #  @param theR Fillet radius.
9457         #  @param theName Object name; when specified, this parameter is used
9458         #         for result publication in the study. Otherwise, if automatic
9459         #         publication is switched on, default value is used for result name.
9460         #
9461         #  @return New GEOM.GEOM_Object, containing the result shape.
9462         #
9463         #  @ref tui_fillet "Example 1"
9464         #  \n @ref swig_MakeFilletAll "Example 2"
9465         @ManageTransactions("LocalOp")
9466         def MakeFilletAll(self, theShape, theR, theName=None):
9467             """
9468             Perform a fillet on all edges of the given shape.
9469
9470             Parameters:
9471                 theShape Shape, to perform fillet on.
9472                 theR Fillet radius.
9473                 theName Object name; when specified, this parameter is used
9474                         for result publication in the study. Otherwise, if automatic
9475                         publication is switched on, default value is used for result name.
9476
9477             Returns:
9478                 New GEOM.GEOM_Object, containing the result shape.
9479
9480             Example of usage:
9481                filletall = geompy.MakeFilletAll(prism, 10.)
9482             """
9483             # Example: see GEOM_TestOthers.py
9484             theR,Parameters = ParseParameters(theR)
9485             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9486             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9487             anObj.SetParameters(Parameters)
9488             self._autoPublish(anObj, theName, "fillet")
9489             return anObj
9490
9491         ## Perform a fillet on the specified edges/faces of the given shape
9492         #  @param theShape Shape, to perform fillet on.
9493         #  @param theR Fillet radius.
9494         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9495         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9496         #  @param theName Object name; when specified, this parameter is used
9497         #         for result publication in the study. Otherwise, if automatic
9498         #         publication is switched on, default value is used for result name.
9499         #
9500         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9501         #
9502         #  @return New GEOM.GEOM_Object, containing the result shape.
9503         #
9504         #  @ref tui_fillet "Example"
9505         @ManageTransactions("LocalOp")
9506         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9507             """
9508             Perform a fillet on the specified edges/faces of the given shape
9509
9510             Parameters:
9511                 theShape Shape, to perform fillet on.
9512                 theR Fillet radius.
9513                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9514                 theListShapes Global indices of edges/faces to perform fillet on.
9515                 theName Object name; when specified, this parameter is used
9516                         for result publication in the study. Otherwise, if automatic
9517                         publication is switched on, default value is used for result name.
9518
9519             Note:
9520                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9521
9522             Returns:
9523                 New GEOM.GEOM_Object, containing the result shape.
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., geompy.ShapeType["EDGE"], IDlist_e)
9534             """
9535             # Example: see GEOM_TestAll.py
9536             theR,Parameters = ParseParameters(theR)
9537             anObj = None
9538             if theShapeType == self.ShapeType["EDGE"]:
9539                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9540                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9541             else:
9542                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9543                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9544             anObj.SetParameters(Parameters)
9545             self._autoPublish(anObj, theName, "fillet")
9546             return anObj
9547
9548         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9549         @ManageTransactions("LocalOp")
9550         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9551             """
9552             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9553
9554             Example of usage:
9555                 # get the list of IDs (IDList) for the fillet
9556                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9557                 IDlist_e = []
9558                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9559                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9560                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9561                 # make a fillet on the specified edges of the given shape
9562                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9563             """
9564             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9565             anObj = None
9566             if theShapeType == self.ShapeType["EDGE"]:
9567                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9568                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9569             else:
9570                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9571                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9572             anObj.SetParameters(Parameters)
9573             self._autoPublish(anObj, theName, "fillet")
9574             return anObj
9575
9576         ## Perform a fillet on the specified edges of the given shape
9577         #  @param theShape  Wire Shape to perform fillet on.
9578         #  @param theR  Fillet radius.
9579         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9580         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9581         #    \note The list of vertices could be empty,
9582         #          in this case fillet will done done at all vertices in wire
9583         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9584         #         by the length of the edges, nearest to the fillet vertex.
9585         #         But sometimes the next edge is C1 continuous with the one, nearest to
9586         #         the fillet point, and such two (or more) edges can be united to allow
9587         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9588         #         thus ignoring the secant vertex (vertices).
9589         #  @param theName Object name; when specified, this parameter is used
9590         #         for result publication in the study. Otherwise, if automatic
9591         #         publication is switched on, default value is used for result name.
9592         #
9593         #  @return New GEOM.GEOM_Object, containing the result shape.
9594         #
9595         #  @ref tui_fillet2d "Example"
9596         @ManageTransactions("LocalOp")
9597         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9598             """
9599             Perform a fillet on the specified edges of the given shape
9600
9601             Parameters:
9602                 theShape  Wire Shape to perform fillet on.
9603                 theR  Fillet radius.
9604                 theListOfVertexes Global indices of vertexes to perform fillet on.
9605                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9606                     by the length of the edges, nearest to the fillet vertex.
9607                     But sometimes the next edge is C1 continuous with the one, nearest to
9608                     the fillet point, and such two (or more) edges can be united to allow
9609                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9610                     thus ignoring the secant vertex (vertices).
9611                 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             Note:
9615                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9616
9617                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9618
9619             Returns:
9620                 New GEOM.GEOM_Object, containing the result shape.
9621
9622             Example of usage:
9623                 # create wire
9624                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9625                 # make fillet at given wire vertices with giver radius
9626                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9627             """
9628             # Example: see GEOM_TestAll.py
9629             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9630             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9631             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9632             anObj.SetParameters(Parameters)
9633             self._autoPublish(anObj, theName, "fillet")
9634             return anObj
9635
9636         ## Perform a fillet at the specified vertices of the given face/shell.
9637         #  @param theShape Face or Shell shape to perform fillet on.
9638         #  @param theR Fillet radius.
9639         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9640         #  @param theName Object name; when specified, this parameter is used
9641         #         for result publication in the study. Otherwise, if automatic
9642         #         publication is switched on, default value is used for result name.
9643         #
9644         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9645         #
9646         #  @return New GEOM.GEOM_Object, containing the result shape.
9647         #
9648         #  @ref tui_fillet2d "Example"
9649         @ManageTransactions("LocalOp")
9650         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9651             """
9652             Perform a fillet at the specified vertices of the given face/shell.
9653
9654             Parameters:
9655                 theShape  Face or Shell shape to perform fillet on.
9656                 theR  Fillet radius.
9657                 theListOfVertexes Global indices of vertexes to perform fillet on.
9658                 theName Object name; when specified, this parameter is used
9659                         for result publication in the study. Otherwise, if automatic
9660                         publication is switched on, default value is used for result name.
9661             Note:
9662                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9663
9664             Returns:
9665                 New GEOM.GEOM_Object, containing the result shape.
9666
9667             Example of usage:
9668                 face = geompy.MakeFaceHW(100, 100, 1)
9669                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9670             """
9671             # Example: see GEOM_TestAll.py
9672             theR,Parameters = ParseParameters(theR)
9673             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9674             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9675             anObj.SetParameters(Parameters)
9676             self._autoPublish(anObj, theName, "fillet")
9677             return anObj
9678
9679         ## Perform a symmetric chamfer on all edges of the given shape.
9680         #  @param theShape Shape, to perform chamfer on.
9681         #  @param theD Chamfer size along each face.
9682         #  @param theName Object name; when specified, this parameter is used
9683         #         for result publication in the study. Otherwise, if automatic
9684         #         publication is switched on, default value is used for result name.
9685         #
9686         #  @return New GEOM.GEOM_Object, containing the result shape.
9687         #
9688         #  @ref tui_chamfer "Example 1"
9689         #  \n @ref swig_MakeChamferAll "Example 2"
9690         @ManageTransactions("LocalOp")
9691         def MakeChamferAll(self, theShape, theD, theName=None):
9692             """
9693             Perform a symmetric chamfer on all edges of the given shape.
9694
9695             Parameters:
9696                 theShape Shape, to perform chamfer on.
9697                 theD Chamfer size along each face.
9698                 theName Object name; when specified, this parameter is used
9699                         for result publication in the study. Otherwise, if automatic
9700                         publication is switched on, default value is used for result name.
9701
9702             Returns:
9703                 New GEOM.GEOM_Object, containing the result shape.
9704
9705             Example of usage:
9706                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9707             """
9708             # Example: see GEOM_TestOthers.py
9709             theD,Parameters = ParseParameters(theD)
9710             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9711             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9712             anObj.SetParameters(Parameters)
9713             self._autoPublish(anObj, theName, "chamfer")
9714             return anObj
9715
9716         ## Perform a chamfer on edges, common to the specified faces,
9717         #  with distance D1 on the Face1
9718         #  @param theShape Shape, to perform chamfer on.
9719         #  @param theD1 Chamfer size along \a theFace1.
9720         #  @param theD2 Chamfer size along \a theFace2.
9721         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9722         #  @param theName Object name; when specified, this parameter is used
9723         #         for result publication in the study. Otherwise, if automatic
9724         #         publication is switched on, default value is used for result name.
9725         #
9726         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9727         #
9728         #  @return New GEOM.GEOM_Object, containing the result shape.
9729         #
9730         #  @ref tui_chamfer "Example"
9731         @ManageTransactions("LocalOp")
9732         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9733             """
9734             Perform a chamfer on edges, common to the specified faces,
9735             with distance D1 on the Face1
9736
9737             Parameters:
9738                 theShape Shape, to perform chamfer on.
9739                 theD1 Chamfer size along theFace1.
9740                 theD2 Chamfer size along theFace2.
9741                 theFace1,theFace2 Global indices of two faces of theShape.
9742                 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:
9747                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9748
9749             Returns:
9750                 New GEOM.GEOM_Object, containing the result shape.
9751
9752             Example of usage:
9753                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9754                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9755                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9756                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9757             """
9758             # Example: see GEOM_TestAll.py
9759             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9760             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9761             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9762             anObj.SetParameters(Parameters)
9763             self._autoPublish(anObj, theName, "chamfer")
9764             return anObj
9765
9766         ## Perform a chamfer on edges
9767         #  @param theShape Shape, to perform chamfer on.
9768         #  @param theD Chamfer length
9769         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9770         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9771         #  @param theName Object name; when specified, this parameter is used
9772         #         for result publication in the study. Otherwise, if automatic
9773         #         publication is switched on, default value is used for result name.
9774         #
9775         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9776         #
9777         #  @return New GEOM.GEOM_Object, containing the result shape.
9778         @ManageTransactions("LocalOp")
9779         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9780             """
9781             Perform a chamfer on edges
9782
9783             Parameters:
9784                 theShape Shape, to perform chamfer on.
9785                 theD1 Chamfer size along theFace1.
9786                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9787                 theFace1,theFace2 Global indices of two faces of theShape.
9788                 theName Object name; when specified, this parameter is used
9789                         for result publication in the study. Otherwise, if automatic
9790                         publication is switched on, default value is used for result name.
9791
9792             Note:
9793                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9794
9795             Returns:
9796                 New GEOM.GEOM_Object, containing the result shape.
9797
9798             Example of usage:
9799                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9800                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9801                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9802                 ang = 30
9803                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9804             """
9805             flag = False
9806             if isinstance(theAngle,str):
9807                 flag = True
9808             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9809             if flag:
9810                 theAngle = theAngle*math.pi/180.0
9811             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9812             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9813             anObj.SetParameters(Parameters)
9814             self._autoPublish(anObj, theName, "chamfer")
9815             return anObj
9816
9817         ## Perform a chamfer on all edges of the specified faces,
9818         #  with distance D1 on the first specified face (if several for one edge)
9819         #  @param theShape Shape, to perform chamfer on.
9820         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9821         #               connected to the edge, are in \a theFaces, \a theD1
9822         #               will be get along face, which is nearer to \a theFaces beginning.
9823         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9824         #  @param theFaces Sequence of global indices of faces of \a theShape.
9825         #  @param theName Object name; when specified, this parameter is used
9826         #         for result publication in the study. Otherwise, if automatic
9827         #         publication is switched on, default value is used for result name.
9828         #
9829         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9830         #
9831         #  @return New GEOM.GEOM_Object, containing the result shape.
9832         #
9833         #  @ref tui_chamfer "Example"
9834         @ManageTransactions("LocalOp")
9835         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9836             """
9837             Perform a chamfer on all edges of the specified faces,
9838             with distance D1 on the first specified face (if several for one edge)
9839
9840             Parameters:
9841                 theShape Shape, to perform chamfer on.
9842                 theD1 Chamfer size along face from  theFaces. If both faces,
9843                       connected to the edge, are in theFaces, theD1
9844                       will be get along face, which is nearer to theFaces beginning.
9845                 theD2 Chamfer size along another of two faces, connected to the edge.
9846                 theFaces Sequence of global indices of faces of theShape.
9847                 theName Object name; when specified, this parameter is used
9848                         for result publication in the study. Otherwise, if automatic
9849                         publication is switched on, default value is used for result name.
9850
9851             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9852
9853             Returns:
9854                 New GEOM.GEOM_Object, containing the result shape.
9855             """
9856             # Example: see GEOM_TestAll.py
9857             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9858             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9859             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9860             anObj.SetParameters(Parameters)
9861             self._autoPublish(anObj, theName, "chamfer")
9862             return anObj
9863
9864         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9865         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9866         #
9867         #  @ref swig_FilletChamfer "Example"
9868         @ManageTransactions("LocalOp")
9869         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9870             """
9871             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9872             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9873             """
9874             flag = False
9875             if isinstance(theAngle,str):
9876                 flag = True
9877             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9878             if flag:
9879                 theAngle = theAngle*math.pi/180.0
9880             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9881             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9882             anObj.SetParameters(Parameters)
9883             self._autoPublish(anObj, theName, "chamfer")
9884             return anObj
9885
9886         ## Perform a chamfer on edges,
9887         #  with distance D1 on the first specified face (if several for one edge)
9888         #  @param theShape Shape, to perform chamfer on.
9889         #  @param theD1,theD2 Chamfer size
9890         #  @param theEdges Sequence of edges of \a theShape.
9891         #  @param theName Object name; when specified, this parameter is used
9892         #         for result publication in the study. Otherwise, if automatic
9893         #         publication is switched on, default value is used for result name.
9894         #
9895         #  @return New GEOM.GEOM_Object, containing the result shape.
9896         #
9897         #  @ref swig_FilletChamfer "Example"
9898         @ManageTransactions("LocalOp")
9899         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9900             """
9901             Perform a chamfer on edges,
9902             with distance D1 on the first specified face (if several for one edge)
9903
9904             Parameters:
9905                 theShape Shape, to perform chamfer on.
9906                 theD1,theD2 Chamfer size
9907                 theEdges Sequence of edges of theShape.
9908                 theName Object name; when specified, this parameter is used
9909                         for result publication in the study. Otherwise, if automatic
9910                         publication is switched on, default value is used for result name.
9911
9912             Returns:
9913                 New GEOM.GEOM_Object, containing the result shape.
9914             """
9915             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9916             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9917             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9918             anObj.SetParameters(Parameters)
9919             self._autoPublish(anObj, theName, "chamfer")
9920             return anObj
9921
9922         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9923         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9924         @ManageTransactions("LocalOp")
9925         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9926             """
9927             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9928             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9929             """
9930             flag = False
9931             if isinstance(theAngle,str):
9932                 flag = True
9933             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9934             if flag:
9935                 theAngle = theAngle*math.pi/180.0
9936             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9937             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9938             anObj.SetParameters(Parameters)
9939             self._autoPublish(anObj, theName, "chamfer")
9940             return anObj
9941
9942         ## @sa MakeChamferEdge(), MakeChamferFaces()
9943         #
9944         #  @ref swig_MakeChamfer "Example"
9945         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9946             """
9947             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9948             """
9949             # Example: see GEOM_TestOthers.py
9950             anObj = None
9951             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9952             if aShapeType == self.ShapeType["EDGE"]:
9953                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9954             else:
9955                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9956             return anObj
9957
9958         ## Remove material from a solid by extrusion of the base shape on the given distance.
9959         #  @param theInit Shape to remove material from. It must be a solid or
9960         #  a compound made of a single solid.
9961         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9962         #  @param theH Prism dimension along the normal to theBase
9963         #  @param theAngle Draft angle in degrees.
9964         #  @param theName Object name; when specified, this parameter is used
9965         #         for result publication in the study. Otherwise, if automatic
9966         #         publication is switched on, default value is used for result name.
9967         #
9968         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9969         #
9970         #  @ref tui_creation_prism "Example"
9971         @ManageTransactions("PrimOp")
9972         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9973             """
9974             Add material to a solid by extrusion of the base shape on the given distance.
9975
9976             Parameters:
9977                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9978                 theBase Closed edge or wire defining the base shape to be extruded.
9979                 theH Prism dimension along the normal  to theBase
9980                 theAngle Draft angle in degrees.
9981                 theName Object name; when specified, this parameter is used
9982                         for result publication in the study. Otherwise, if automatic
9983                         publication is switched on, default value is used for result name.
9984
9985             Returns:
9986                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9987             """
9988             # Example: see GEOM_TestAll.py
9989             #theH,Parameters = ParseParameters(theH)
9990             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9991             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9992             #anObj.SetParameters(Parameters)
9993             self._autoPublish(anObj, theName, "extrudedCut")
9994             return anObj
9995
9996         ## Add material to a solid by extrusion of the base shape on the given distance.
9997         #  @param theInit Shape to add material to. It must be a solid or
9998         #  a compound made of a single solid.
9999         #  @param theBase Closed edge or wire defining the base shape to be extruded.
10000         #  @param theH Prism dimension along the normal to theBase
10001         #  @param theAngle Draft angle in degrees.
10002         #  @param theName Object name; when specified, this parameter is used
10003         #         for result publication in the study. Otherwise, if automatic
10004         #         publication is switched on, default value is used for result name.
10005         #
10006         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
10007         #
10008         #  @ref tui_creation_prism "Example"
10009         @ManageTransactions("PrimOp")
10010         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
10011             """
10012             Add material to a solid by extrusion of the base shape on the given distance.
10013
10014             Parameters:
10015                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
10016                 theBase Closed edge or wire defining the base shape to be extruded.
10017                 theH Prism dimension along the normal  to theBase
10018                 theAngle Draft angle in degrees.
10019                 theName Object name; when specified, this parameter is used
10020                         for result publication in the study. Otherwise, if automatic
10021                         publication is switched on, default value is used for result name.
10022
10023             Returns:
10024                 New GEOM.GEOM_Object,  containing the initial shape with added material.
10025             """
10026             # Example: see GEOM_TestAll.py
10027             #theH,Parameters = ParseParameters(theH)
10028             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
10029             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
10030             #anObj.SetParameters(Parameters)
10031             self._autoPublish(anObj, theName, "extrudedBoss")
10032             return anObj
10033
10034         # end of l3_local
10035         ## @}
10036
10037         ## @addtogroup l3_basic_op
10038         ## @{
10039
10040         ## Perform an Archimde operation on the given shape with given parameters.
10041         #  The object presenting the resulting face is returned.
10042         #  @param theShape Shape to be put in water.
10043         #  @param theWeight Weight of the shape.
10044         #  @param theWaterDensity Density of the water.
10045         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
10046         #  @param theName Object name; when specified, this parameter is used
10047         #         for result publication in the study. Otherwise, if automatic
10048         #         publication is switched on, default value is used for result name.
10049         #
10050         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
10051         #          by a plane, corresponding to water level.
10052         #
10053         #  @ref tui_archimede "Example"
10054         @ManageTransactions("LocalOp")
10055         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
10056             """
10057             Perform an Archimde operation on the given shape with given parameters.
10058             The object presenting the resulting face is returned.
10059
10060             Parameters:
10061                 theShape Shape to be put in water.
10062                 theWeight Weight of the shape.
10063                 theWaterDensity Density of the water.
10064                 theMeshDeflection Deflection of the mesh, using to compute the section.
10065                 theName Object name; when specified, this parameter is used
10066                         for result publication in the study. Otherwise, if automatic
10067                         publication is switched on, default value is used for result name.
10068
10069             Returns:
10070                 New GEOM.GEOM_Object, containing a section of theShape
10071                 by a plane, corresponding to water level.
10072             """
10073             # Example: see GEOM_TestAll.py
10074             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
10075               theWeight,theWaterDensity,theMeshDeflection)
10076             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
10077             RaiseIfFailed("MakeArchimede", self.LocalOp)
10078             anObj.SetParameters(Parameters)
10079             self._autoPublish(anObj, theName, "archimede")
10080             return anObj
10081
10082         # end of l3_basic_op
10083         ## @}
10084
10085         ## @addtogroup l2_measure
10086         ## @{
10087
10088         ## Get point coordinates
10089         #  @return [x, y, z]
10090         #
10091         #  @ref tui_point_coordinates_page "Example"
10092         @ManageTransactions("MeasuOp")
10093         def PointCoordinates(self,Point):
10094             """
10095             Get point coordinates
10096
10097             Returns:
10098                 [x, y, z]
10099             """
10100             # Example: see GEOM_TestMeasures.py
10101             aTuple = self.MeasuOp.PointCoordinates(Point)
10102             RaiseIfFailed("PointCoordinates", self.MeasuOp)
10103             return aTuple
10104
10105         ## Get vector coordinates
10106         #  @return [x, y, z]
10107         #
10108         #  @ref tui_measurement_tools_page "Example"
10109         def VectorCoordinates(self,Vector):
10110             """
10111             Get vector coordinates
10112
10113             Returns:
10114                 [x, y, z]
10115             """
10116
10117             p1=self.GetFirstVertex(Vector)
10118             p2=self.GetLastVertex(Vector)
10119
10120             X1=self.PointCoordinates(p1)
10121             X2=self.PointCoordinates(p2)
10122
10123             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
10124
10125
10126         ## Compute cross product
10127         #  @return vector w=u^v
10128         #
10129         #  @ref tui_measurement_tools_page "Example"
10130         def CrossProduct(self, Vector1, Vector2):
10131             """
10132             Compute cross product
10133
10134             Returns: vector w=u^v
10135             """
10136             u=self.VectorCoordinates(Vector1)
10137             v=self.VectorCoordinates(Vector2)
10138             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])
10139
10140             return w
10141
10142         ## Compute cross product
10143         #  @return dot product  p=u.v
10144         #
10145         #  @ref tui_measurement_tools_page "Example"
10146         def DotProduct(self, Vector1, Vector2):
10147             """
10148             Compute cross product
10149
10150             Returns: dot product  p=u.v
10151             """
10152             u=self.VectorCoordinates(Vector1)
10153             v=self.VectorCoordinates(Vector2)
10154             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
10155
10156             return p
10157
10158
10159         ## Get summarized length of all wires,
10160         #  area of surface and volume of the given shape.
10161         #  @param theShape Shape to define properties of.
10162         #  @return [theLength, theSurfArea, theVolume]\n
10163         #  theLength:   Summarized length of all wires of the given shape.\n
10164         #  theSurfArea: Area of surface of the given shape.\n
10165         #  theVolume:   Volume of the given shape.
10166         #
10167         #  @ref tui_basic_properties_page "Example"
10168         @ManageTransactions("MeasuOp")
10169         def BasicProperties(self,theShape):
10170             """
10171             Get summarized length of all wires,
10172             area of surface and volume of the given shape.
10173
10174             Parameters:
10175                 theShape Shape to define properties of.
10176
10177             Returns:
10178                 [theLength, theSurfArea, theVolume]
10179                  theLength:   Summarized length of all wires of the given shape.
10180                  theSurfArea: Area of surface of the given shape.
10181                  theVolume:   Volume of the given shape.
10182             """
10183             # Example: see GEOM_TestMeasures.py
10184             aTuple = self.MeasuOp.GetBasicProperties(theShape)
10185             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
10186             return aTuple
10187
10188         ## Get parameters of 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         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10192         #  Xmin,Xmax: Limits of shape along OX axis.
10193         #  Ymin,Ymax: Limits of shape along OY axis.
10194         #  Zmin,Zmax: Limits of shape along OZ axis.
10195         #
10196         #  @ref tui_bounding_box_page "Example"
10197         @ManageTransactions("MeasuOp")
10198         def BoundingBox (self, theShape, precise=False):
10199             """
10200             Get parameters of bounding box of the given shape
10201
10202             Parameters:
10203                 theShape Shape to obtain bounding box of.
10204                 precise TRUE for precise computation; FALSE for fast one.
10205
10206             Returns:
10207                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
10208                  Xmin,Xmax: Limits of shape along OX axis.
10209                  Ymin,Ymax: Limits of shape along OY axis.
10210                  Zmin,Zmax: Limits of shape along OZ axis.
10211             """
10212             # Example: see GEOM_TestMeasures.py
10213             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
10214             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
10215             return aTuple
10216
10217         ## Get bounding box of the given shape
10218         #  @param theShape Shape to obtain bounding box of.
10219         #  @param precise TRUE for precise computation; FALSE for fast one.
10220         #  @param theName Object name; when specified, this parameter is used
10221         #         for result publication in the study. Otherwise, if automatic
10222         #         publication is switched on, default value is used for result name.
10223         #
10224         #  @return New GEOM.GEOM_Object, containing the created box.
10225         #
10226         #  @ref tui_bounding_box_page "Example"
10227         @ManageTransactions("MeasuOp")
10228         def MakeBoundingBox (self, theShape, precise=False, theName=None):
10229             """
10230             Get bounding box of the given shape
10231
10232             Parameters:
10233                 theShape Shape to obtain bounding box of.
10234                 precise TRUE for precise computation; FALSE for fast one.
10235                 theName Object name; when specified, this parameter is used
10236                         for result publication in the study. Otherwise, if automatic
10237                         publication is switched on, default value is used for result name.
10238
10239             Returns:
10240                 New GEOM.GEOM_Object, containing the created box.
10241             """
10242             # Example: see GEOM_TestMeasures.py
10243             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
10244             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
10245             self._autoPublish(anObj, theName, "bndbox")
10246             return anObj
10247
10248         ## Get inertia matrix and moments of inertia of theShape.
10249         #  @param theShape Shape to calculate inertia of.
10250         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10251         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10252         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
10253         #
10254         #  @ref tui_inertia_page "Example"
10255         @ManageTransactions("MeasuOp")
10256         def Inertia(self,theShape):
10257             """
10258             Get inertia matrix and moments of inertia of theShape.
10259
10260             Parameters:
10261                 theShape Shape to calculate inertia of.
10262
10263             Returns:
10264                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
10265                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
10266                  Ix,Iy,Iz:    Moments of inertia of the given shape.
10267             """
10268             # Example: see GEOM_TestMeasures.py
10269             aTuple = self.MeasuOp.GetInertia(theShape)
10270             RaiseIfFailed("GetInertia", self.MeasuOp)
10271             return aTuple
10272
10273         ## Get if coords are included in the shape (ST_IN or ST_ON)
10274         #  @param theShape Shape
10275         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10276         #  @param tolerance to be used (default is 1.0e-7)
10277         #  @return list_of_boolean = [res1, res2, ...]
10278         @ManageTransactions("MeasuOp")
10279         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
10280             """
10281             Get if coords are included in the shape (ST_IN or ST_ON)
10282
10283             Parameters:
10284                 theShape Shape
10285                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
10286                 tolerance to be used (default is 1.0e-7)
10287
10288             Returns:
10289                 list_of_boolean = [res1, res2, ...]
10290             """
10291             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
10292
10293         ## Get minimal distance between the given shapes.
10294         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10295         #  @return Value of the minimal distance between the given shapes.
10296         #
10297         #  @ref tui_min_distance_page "Example"
10298         @ManageTransactions("MeasuOp")
10299         def MinDistance(self, theShape1, theShape2):
10300             """
10301             Get minimal distance between the given shapes.
10302
10303             Parameters:
10304                 theShape1,theShape2 Shapes to find minimal distance between.
10305
10306             Returns:
10307                 Value of the minimal distance between the given shapes.
10308             """
10309             # Example: see GEOM_TestMeasures.py
10310             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10311             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10312             return aTuple[0]
10313
10314         ## Get minimal distance between the given shapes.
10315         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10316         #  @return Value of the minimal distance between the given shapes, in form of list
10317         #          [Distance, DX, DY, DZ].
10318         #
10319         #  @ref tui_min_distance_page "Example"
10320         @ManageTransactions("MeasuOp")
10321         def MinDistanceComponents(self, theShape1, theShape2):
10322             """
10323             Get minimal distance between the given shapes.
10324
10325             Parameters:
10326                 theShape1,theShape2 Shapes to find minimal distance between.
10327
10328             Returns:
10329                 Value of the minimal distance between the given shapes, in form of list
10330                 [Distance, DX, DY, DZ]
10331             """
10332             # Example: see GEOM_TestMeasures.py
10333             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10334             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10335             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10336             return aRes
10337
10338         ## Get closest points of the given shapes.
10339         #  @param theShape1,theShape2 Shapes to find closest points of.
10340         #  @return The number of found solutions (-1 in case of infinite number of
10341         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10342         #
10343         #  @ref tui_min_distance_page "Example"
10344         @ManageTransactions("MeasuOp")
10345         def ClosestPoints (self, theShape1, theShape2):
10346             """
10347             Get closest points of the given shapes.
10348
10349             Parameters:
10350                 theShape1,theShape2 Shapes to find closest points of.
10351
10352             Returns:
10353                 The number of found solutions (-1 in case of infinite number of
10354                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10355             """
10356             # Example: see GEOM_TestMeasures.py
10357             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10358             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10359             return aTuple
10360
10361         ## Get angle between the given shapes in degrees.
10362         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10363         #  @note If both arguments are vectors, the angle is computed in accordance
10364         #        with their orientations, otherwise the minimum angle is computed.
10365         #  @return Value of the angle between the given shapes in degrees.
10366         #
10367         #  @ref tui_angle_page "Example"
10368         @ManageTransactions("MeasuOp")
10369         def GetAngle(self, theShape1, theShape2):
10370             """
10371             Get angle between the given shapes in degrees.
10372
10373             Parameters:
10374                 theShape1,theShape2 Lines or linear edges to find angle between.
10375
10376             Note:
10377                 If both arguments are vectors, the angle is computed in accordance
10378                 with their orientations, otherwise the minimum angle is computed.
10379
10380             Returns:
10381                 Value of the angle between the given shapes in degrees.
10382             """
10383             # Example: see GEOM_TestMeasures.py
10384             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10385             RaiseIfFailed("GetAngle", self.MeasuOp)
10386             return anAngle
10387
10388         ## Get angle between the given shapes in radians.
10389         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10390         #  @note If both arguments are vectors, the angle is computed in accordance
10391         #        with their orientations, otherwise the minimum angle is computed.
10392         #  @return Value of the angle between the given shapes in radians.
10393         #
10394         #  @ref tui_angle_page "Example"
10395         @ManageTransactions("MeasuOp")
10396         def GetAngleRadians(self, theShape1, theShape2):
10397             """
10398             Get angle between the given shapes in radians.
10399
10400             Parameters:
10401                 theShape1,theShape2 Lines or linear edges to find angle between.
10402
10403
10404             Note:
10405                 If both arguments are vectors, the angle is computed in accordance
10406                 with their orientations, otherwise the minimum angle is computed.
10407
10408             Returns:
10409                 Value of the angle between the given shapes in radians.
10410             """
10411             # Example: see GEOM_TestMeasures.py
10412             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10413             RaiseIfFailed("GetAngle", self.MeasuOp)
10414             return anAngle
10415
10416         ## Get angle between the given vectors in degrees.
10417         #  @param theShape1,theShape2 Vectors to find angle between.
10418         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10419         #                 if False, the opposite vector to the normal vector is used.
10420         #  @return Value of the angle between the given vectors in degrees.
10421         #
10422         #  @ref tui_angle_page "Example"
10423         @ManageTransactions("MeasuOp")
10424         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10425             """
10426             Get angle between the given vectors in degrees.
10427
10428             Parameters:
10429                 theShape1,theShape2 Vectors to find angle between.
10430                 theFlag If True, the normal vector is defined by the two vectors cross,
10431                         if False, the opposite vector to the normal vector is used.
10432
10433             Returns:
10434                 Value of the angle between the given vectors in degrees.
10435             """
10436             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10437             if not theFlag:
10438                 anAngle = 360. - anAngle
10439             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10440             return anAngle
10441
10442         ## The same as GetAngleVectors, but the result is in radians.
10443         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10444             """
10445             Get angle between the given vectors in radians.
10446
10447             Parameters:
10448                 theShape1,theShape2 Vectors to find angle between.
10449                 theFlag If True, the normal vector is defined by the two vectors cross,
10450                         if False, the opposite vector to the normal vector is used.
10451
10452             Returns:
10453                 Value of the angle between the given vectors in radians.
10454             """
10455             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10456             return anAngle
10457
10458         ## @name Curve Curvature Measurement
10459         #  Methods for receiving radius of curvature of curves
10460         #  in the given point
10461         ## @{
10462
10463         ## Measure curvature of a curve at a point, set by parameter.
10464         #  @param theCurve a curve.
10465         #  @param theParam parameter.
10466         #  @return radius of curvature of \a theCurve.
10467         #
10468         #  @ref swig_todo "Example"
10469         @ManageTransactions("MeasuOp")
10470         def CurveCurvatureByParam(self, theCurve, theParam):
10471             """
10472             Measure curvature of a curve at a point, set by parameter.
10473
10474             Parameters:
10475                 theCurve a curve.
10476                 theParam parameter.
10477
10478             Returns:
10479                 radius of curvature of theCurve.
10480             """
10481             # Example: see GEOM_TestMeasures.py
10482             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10483             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10484             return aCurv
10485
10486         ## Measure curvature of a curve at a point.
10487         #  @param theCurve a curve.
10488         #  @param thePoint given point.
10489         #  @return radius of curvature of \a theCurve.
10490         #
10491         #  @ref swig_todo "Example"
10492         @ManageTransactions("MeasuOp")
10493         def CurveCurvatureByPoint(self, theCurve, thePoint):
10494             """
10495             Measure curvature of a curve at a point.
10496
10497             Parameters:
10498                 theCurve a curve.
10499                 thePoint given point.
10500
10501             Returns:
10502                 radius of curvature of theCurve.
10503             """
10504             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10505             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10506             return aCurv
10507         ## @}
10508
10509         ## @name Surface Curvature Measurement
10510         #  Methods for receiving max and min radius of curvature of surfaces
10511         #  in the given point
10512         ## @{
10513
10514         ## Measure max radius of curvature of surface.
10515         #  @param theSurf the given surface.
10516         #  @param theUParam Value of U-parameter on the referenced surface.
10517         #  @param theVParam Value of V-parameter on the referenced surface.
10518         #  @return max radius of curvature of theSurf.
10519         #
10520         ## @ref swig_todo "Example"
10521         @ManageTransactions("MeasuOp")
10522         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10523             """
10524             Measure max radius of curvature of surface.
10525
10526             Parameters:
10527                 theSurf the given surface.
10528                 theUParam Value of U-parameter on the referenced surface.
10529                 theVParam Value of V-parameter on the referenced surface.
10530
10531             Returns:
10532                 max radius of curvature of theSurf.
10533             """
10534             # Example: see GEOM_TestMeasures.py
10535             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10536             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10537             return aSurf
10538
10539         ## Measure max radius of curvature of surface in the given point
10540         #  @param theSurf the given surface.
10541         #  @param thePoint given point.
10542         #  @return max radius of curvature of theSurf.
10543         #
10544         ## @ref swig_todo "Example"
10545         @ManageTransactions("MeasuOp")
10546         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10547             """
10548             Measure max radius of curvature of surface in the given point.
10549
10550             Parameters:
10551                 theSurf the given surface.
10552                 thePoint given point.
10553
10554             Returns:
10555                 max radius of curvature of theSurf.
10556             """
10557             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10558             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10559             return aSurf
10560
10561         ## Measure min radius of curvature of surface.
10562         #  @param theSurf the given surface.
10563         #  @param theUParam Value of U-parameter on the referenced surface.
10564         #  @param theVParam Value of V-parameter on the referenced surface.
10565         #  @return min radius of curvature of theSurf.
10566         #
10567         ## @ref swig_todo "Example"
10568         @ManageTransactions("MeasuOp")
10569         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10570             """
10571             Measure min radius of curvature of surface.
10572
10573             Parameters:
10574                 theSurf the given surface.
10575                 theUParam Value of U-parameter on the referenced surface.
10576                 theVParam Value of V-parameter on the referenced surface.
10577
10578             Returns:
10579                 Min radius of curvature of theSurf.
10580             """
10581             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10582             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10583             return aSurf
10584
10585         ## Measure min radius of curvature of surface in the given point
10586         #  @param theSurf the given surface.
10587         #  @param thePoint given point.
10588         #  @return min radius of curvature of theSurf.
10589         #
10590         ## @ref swig_todo "Example"
10591         @ManageTransactions("MeasuOp")
10592         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10593             """
10594             Measure min radius of curvature of surface in the given point.
10595
10596             Parameters:
10597                 theSurf the given surface.
10598                 thePoint given point.
10599
10600             Returns:
10601                 Min radius of curvature of theSurf.
10602             """
10603             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10604             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10605             return aSurf
10606         ## @}
10607
10608         ## Get min and max tolerances of sub-shapes of theShape
10609         #  @param theShape Shape, to get tolerances of.
10610         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10611         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10612         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10613         #  VertMin,VertMax: Min and max tolerances of the vertices.
10614         #
10615         #  @ref tui_tolerance_page "Example"
10616         @ManageTransactions("MeasuOp")
10617         def Tolerance(self,theShape):
10618             """
10619             Get min and max tolerances of sub-shapes of theShape
10620
10621             Parameters:
10622                 theShape Shape, to get tolerances of.
10623
10624             Returns:
10625                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10626                  FaceMin,FaceMax: Min and max tolerances of the faces.
10627                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10628                  VertMin,VertMax: Min and max tolerances of the vertices.
10629             """
10630             # Example: see GEOM_TestMeasures.py
10631             aTuple = self.MeasuOp.GetTolerance(theShape)
10632             RaiseIfFailed("GetTolerance", self.MeasuOp)
10633             return aTuple
10634
10635         ## Obtain description of the given shape (number of sub-shapes of each type)
10636         #  @param theShape Shape to be described.
10637         #  @return Description of the given shape.
10638         #
10639         #  @ref tui_whatis_page "Example"
10640         @ManageTransactions("MeasuOp")
10641         def WhatIs(self,theShape):
10642             """
10643             Obtain description of the given shape (number of sub-shapes of each type)
10644
10645             Parameters:
10646                 theShape Shape to be described.
10647
10648             Returns:
10649                 Description of the given shape.
10650             """
10651             # Example: see GEOM_TestMeasures.py
10652             aDescr = self.MeasuOp.WhatIs(theShape)
10653             RaiseIfFailed("WhatIs", self.MeasuOp)
10654             return aDescr
10655
10656         ## Obtain quantity of shapes of the given type in \a theShape.
10657         #  If \a theShape is of type \a theType, it is also counted.
10658         #  @param theShape Shape to be described.
10659         #  @param theType the given ShapeType().
10660         #  @return Quantity of shapes of type \a theType in \a theShape.
10661         #
10662         #  @ref tui_measurement_tools_page "Example"
10663         def NbShapes (self, theShape, theType):
10664             """
10665             Obtain quantity of shapes of the given type in theShape.
10666             If theShape is of type theType, it is also counted.
10667
10668             Parameters:
10669                 theShape Shape to be described.
10670                 theType the given geompy.ShapeType
10671
10672             Returns:
10673                 Quantity of shapes of type theType in theShape.
10674             """
10675             # Example: see GEOM_TestMeasures.py
10676             listSh = self.SubShapeAllIDs(theShape, theType)
10677             Nb = len(listSh)
10678             return Nb
10679
10680         ## Obtain quantity of shapes of each type in \a theShape.
10681         #  The \a theShape is also counted.
10682         #  @param theShape Shape to be described.
10683         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10684         #
10685         #  @ref tui_measurement_tools_page "Example"
10686         def ShapeInfo (self, theShape):
10687             """
10688             Obtain quantity of shapes of each type in theShape.
10689             The theShape is also counted.
10690
10691             Parameters:
10692                 theShape Shape to be described.
10693
10694             Returns:
10695                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10696             """
10697             # Example: see GEOM_TestMeasures.py
10698             aDict = {}
10699             for typeSh in self.ShapeType:
10700                 if typeSh in ( "AUTO", "SHAPE" ): continue
10701                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10702                 Nb = len(listSh)
10703                 aDict[typeSh] = Nb
10704                 pass
10705             return aDict
10706
10707         def GetCreationInformation(self, theShape):
10708             info = theShape.GetCreationInformation()
10709             # operationName
10710             opName = info.operationName
10711             if not opName: opName = "no info available"
10712             res = "Operation: " + opName
10713             # parameters
10714             for parVal in info.params:
10715                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10716             return res
10717
10718         ## Get a point, situated at the centre of mass of theShape.
10719         #  @param theShape Shape to define centre of mass of.
10720         #  @param theName Object name; when specified, this parameter is used
10721         #         for result publication in the study. Otherwise, if automatic
10722         #         publication is switched on, default value is used for result name.
10723         #
10724         #  @return New GEOM.GEOM_Object, containing the created point.
10725         #
10726         #  @ref tui_center_of_mass_page "Example"
10727         @ManageTransactions("MeasuOp")
10728         def MakeCDG(self, theShape, theName=None):
10729             """
10730             Get a point, situated at the centre of mass of theShape.
10731
10732             Parameters:
10733                 theShape Shape to define centre of mass of.
10734                 theName Object name; when specified, this parameter is used
10735                         for result publication in the study. Otherwise, if automatic
10736                         publication is switched on, default value is used for result name.
10737
10738             Returns:
10739                 New GEOM.GEOM_Object, containing the created point.
10740             """
10741             # Example: see GEOM_TestMeasures.py
10742             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10743             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10744             self._autoPublish(anObj, theName, "centerOfMass")
10745             return anObj
10746
10747         ## Get a vertex sub-shape by index depended with orientation.
10748         #  @param theShape Shape to find sub-shape.
10749         #  @param theIndex Index to find vertex by this index (starting from zero)
10750         #  @param theName Object name; when specified, this parameter is used
10751         #         for result publication in the study. Otherwise, if automatic
10752         #         publication is switched on, default value is used for result name.
10753         #
10754         #  @return New GEOM.GEOM_Object, containing the created vertex.
10755         #
10756         #  @ref tui_measurement_tools_page "Example"
10757         @ManageTransactions("MeasuOp")
10758         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10759             """
10760             Get a vertex sub-shape by index depended with orientation.
10761
10762             Parameters:
10763                 theShape Shape to find sub-shape.
10764                 theIndex Index to find vertex by this index (starting from zero)
10765                 theName Object name; when specified, this parameter is used
10766                         for result publication in the study. Otherwise, if automatic
10767                         publication is switched on, default value is used for result name.
10768
10769             Returns:
10770                 New GEOM.GEOM_Object, containing the created vertex.
10771             """
10772             # Example: see GEOM_TestMeasures.py
10773             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10774             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10775             self._autoPublish(anObj, theName, "vertex")
10776             return anObj
10777
10778         ## Get the first vertex of wire/edge depended orientation.
10779         #  @param theShape Shape to find first vertex.
10780         #  @param theName Object name; when specified, this parameter is used
10781         #         for result publication in the study. Otherwise, if automatic
10782         #         publication is switched on, default value is used for result name.
10783         #
10784         #  @return New GEOM.GEOM_Object, containing the created vertex.
10785         #
10786         #  @ref tui_measurement_tools_page "Example"
10787         def GetFirstVertex(self, theShape, theName=None):
10788             """
10789             Get the first vertex of wire/edge depended orientation.
10790
10791             Parameters:
10792                 theShape Shape to find first vertex.
10793                 theName Object name; when specified, this parameter is used
10794                         for result publication in the study. Otherwise, if automatic
10795                         publication is switched on, default value is used for result name.
10796
10797             Returns:
10798                 New GEOM.GEOM_Object, containing the created vertex.
10799             """
10800             # Example: see GEOM_TestMeasures.py
10801             # note: auto-publishing is done in self.GetVertexByIndex()
10802             return self.GetVertexByIndex(theShape, 0, theName)
10803
10804         ## Get the last vertex of wire/edge depended orientation.
10805         #  @param theShape Shape to find last vertex.
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 vertex.
10811         #
10812         #  @ref tui_measurement_tools_page "Example"
10813         def GetLastVertex(self, theShape, theName=None):
10814             """
10815             Get the last vertex of wire/edge depended orientation.
10816
10817             Parameters:
10818                 theShape Shape to find last vertex.
10819                 theName Object name; when specified, this parameter is used
10820                         for result publication in the study. Otherwise, if automatic
10821                         publication is switched on, default value is used for result name.
10822
10823             Returns:
10824                 New GEOM.GEOM_Object, containing the created vertex.
10825             """
10826             # Example: see GEOM_TestMeasures.py
10827             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10828             # note: auto-publishing is done in self.GetVertexByIndex()
10829             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10830
10831         ## Get a normale to the given face. If the point is not given,
10832         #  the normale is calculated at the center of mass.
10833         #  @param theFace Face to define normale of.
10834         #  @param theOptionalPoint Point to compute the normale at.
10835         #  @param theName Object name; when specified, this parameter is used
10836         #         for result publication in the study. Otherwise, if automatic
10837         #         publication is switched on, default value is used for result name.
10838         #
10839         #  @return New GEOM.GEOM_Object, containing the created vector.
10840         #
10841         #  @ref swig_todo "Example"
10842         @ManageTransactions("MeasuOp")
10843         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10844             """
10845             Get a normale to the given face. If the point is not given,
10846             the normale is calculated at the center of mass.
10847
10848             Parameters:
10849                 theFace Face to define normale of.
10850                 theOptionalPoint Point to compute the normale at.
10851                 theName Object name; when specified, this parameter is used
10852                         for result publication in the study. Otherwise, if automatic
10853                         publication is switched on, default value is used for result name.
10854
10855             Returns:
10856                 New GEOM.GEOM_Object, containing the created vector.
10857             """
10858             # Example: see GEOM_TestMeasures.py
10859             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10860             RaiseIfFailed("GetNormal", self.MeasuOp)
10861             self._autoPublish(anObj, theName, "normal")
10862             return anObj
10863
10864         ## Print shape errors obtained from CheckShape.
10865         #  @param theShape Shape that was checked.
10866         #  @param theShapeErrors the shape errors obtained by CheckShape.
10867         #  @param theReturnStatus If 0 the description of problem is printed.
10868         #                         If 1 the description of problem is returned.
10869         #  @return If theReturnStatus is equal to 1 the description is returned.
10870         #          Otherwise doesn't return anything.
10871         #
10872         #  @ref tui_check_shape_page "Example"
10873         @ManageTransactions("MeasuOp")
10874         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10875             """
10876             Print shape errors obtained from CheckShape.
10877
10878             Parameters:
10879                 theShape Shape that was checked.
10880                 theShapeErrors the shape errors obtained by CheckShape.
10881                 theReturnStatus If 0 the description of problem is printed.
10882                                 If 1 the description of problem is returned.
10883
10884             Returns:
10885                 If theReturnStatus is equal to 1 the description is returned.
10886                   Otherwise doesn't return anything.
10887             """
10888             # Example: see GEOM_TestMeasures.py
10889             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10890             if theReturnStatus == 1:
10891                 return Descr
10892             print Descr
10893             pass
10894
10895         ## Check a topology of the given shape.
10896         #  @param theShape Shape to check validity of.
10897         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10898         #                        if TRUE, the shape's geometry will be checked also.
10899         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10900         #                         of problem is printed.
10901         #                         If 1 isValid flag and the description of
10902         #                         problem is returned.
10903         #                         If 2 isValid flag and the list of error data
10904         #                         is returned.
10905         #  @return TRUE, if the shape "seems to be valid".
10906         #          If theShape is invalid, prints a description of problem.
10907         #          If theReturnStatus is equal to 1 the description is returned
10908         #          along with IsValid flag.
10909         #          If theReturnStatus is equal to 2 the list of error data is
10910         #          returned along with IsValid flag.
10911         #
10912         #  @ref tui_check_shape_page "Example"
10913         @ManageTransactions("MeasuOp")
10914         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10915             """
10916             Check a topology of the given shape.
10917
10918             Parameters:
10919                 theShape Shape to check validity of.
10920                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10921                                if TRUE, the shape's geometry will be checked also.
10922                 theReturnStatus If 0 and if theShape is invalid, a description
10923                                 of problem is printed.
10924                                 If 1 IsValid flag and the description of
10925                                 problem is returned.
10926                                 If 2 IsValid flag and the list of error data
10927                                 is returned.
10928
10929             Returns:
10930                 TRUE, if the shape "seems to be valid".
10931                 If theShape is invalid, prints a description of problem.
10932                 If theReturnStatus is equal to 1 the description is returned
10933                 along with IsValid flag.
10934                 If theReturnStatus is equal to 2 the list of error data is
10935                 returned along with IsValid flag.
10936             """
10937             # Example: see GEOM_TestMeasures.py
10938             if theIsCheckGeom:
10939                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10940                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10941             else:
10942                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10943                 RaiseIfFailed("CheckShape", self.MeasuOp)
10944             if IsValid == 0:
10945                 if theReturnStatus == 0:
10946                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10947                     print Descr
10948             if theReturnStatus == 1:
10949               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10950               return (IsValid, Descr)
10951             elif theReturnStatus == 2:
10952               return (IsValid, ShapeErrors)
10953             return IsValid
10954
10955         ## Detect self-intersections in the given shape.
10956         #  @param theShape Shape to check.
10957         #  @param theCheckLevel is the level of self-intersection check.
10958         #         Possible input values are:
10959         #         - GEOM.SI_V_V(0) - only V/V interferences
10960         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
10961         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10962         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10963         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10964         #         - GEOM.SI_ALL(5) - all interferences.
10965         #  @return TRUE, if the shape contains no self-intersections.
10966         #
10967         #  @ref tui_check_self_intersections_page "Example"
10968         @ManageTransactions("MeasuOp")
10969         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
10970             """
10971             Detect self-intersections in the given shape.
10972
10973             Parameters:
10974                 theShape Shape to check.
10975                 theCheckLevel is the level of self-intersection check.
10976                   Possible input values are:
10977                    - GEOM.SI_V_V(0) - only V/V interferences
10978                    - GEOM.SI_V_E(1) - V/V and V/E interferences
10979                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10980                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10981                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10982                    - GEOM.SI_ALL(5) - all interferences.
10983  
10984             Returns:
10985                 TRUE, if the shape contains no self-intersections.
10986             """
10987             # Example: see GEOM_TestMeasures.py
10988             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
10989             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10990             return IsValid
10991
10992         ## Detect intersections of the given shapes with algorithm based on mesh intersections.
10993         #  @param theShape1 First source object
10994         #  @param theShape2 Second source object
10995         #  @param theTolerance Specifies a distance between shapes used for detecting gaps:
10996         #         - if \a theTolerance <= 0, algorithm detects intersections (default behavior)
10997         #         - if \a theTolerance > 0, algorithm detects gaps
10998         #  @param theDeflection Linear deflection coefficient that specifies quality of tesselation:
10999         #         - if \a theDeflection <= 0, default deflection 0.001 is used
11000         #  @return TRUE, if there are intersections (gaps) between source shapes
11001         #  @return List of sub-shapes IDs from 1st shape that localize intersection.
11002         #  @return List of sub-shapes IDs from 2nd shape that localize intersection.
11003         #
11004         #  @ref tui_fast_intersection_page "Example"
11005         @ManageTransactions("MeasuOp")
11006         def FastIntersect(self, theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001):
11007             """
11008             Detect intersections of the given shapes with algorithm based on mesh intersections.
11009
11010             Parameters:
11011                 theShape1 First source object
11012                 theShape2 Second source object
11013                 theTolerance Specifies a distance between shapes used for detecting gaps:
11014                     - if theTolerance <= 0, algorithm detects intersections (default behavior)
11015                     - if theTolerance > 0, algorithm detects gaps
11016                 theDeflection Linear deflection coefficient that specifies quality of tesselation:
11017                     - if theDeflection <= 0, default deflection 0.001 is used
11018  
11019             Returns:
11020                 TRUE, if there are intersections (gaps) between source shapes
11021                 List of sub-shapes IDs from 1st shape that localize intersection.
11022                 List of sub-shapes IDs from 2nd shape that localize intersection.
11023             """
11024             # Example: see GEOM_TestMeasures.py
11025             IsOk, Res1, Res2 = self.MeasuOp.FastIntersect(theShape1, theShape2, theTolerance, theDeflection)
11026             RaiseIfFailed("FastIntersect", self.MeasuOp)
11027             return IsOk, Res1, Res2
11028
11029         ## Get position (LCS) of theShape.
11030         #
11031         #  Origin of the LCS is situated at the shape's center of mass.
11032         #  Axes of the LCS are obtained from shape's location or,
11033         #  if the shape is a planar face, from position of its plane.
11034         #
11035         #  @param theShape Shape to calculate position of.
11036         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11037         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
11038         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11039         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11040         #
11041         #  @ref swig_todo "Example"
11042         @ManageTransactions("MeasuOp")
11043         def GetPosition(self,theShape):
11044             """
11045             Get position (LCS) of theShape.
11046             Origin of the LCS is situated at the shape's center of mass.
11047             Axes of the LCS are obtained from shape's location or,
11048             if the shape is a planar face, from position of its plane.
11049
11050             Parameters:
11051                 theShape Shape to calculate position of.
11052
11053             Returns:
11054                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
11055                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
11056                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
11057                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
11058             """
11059             # Example: see GEOM_TestMeasures.py
11060             aTuple = self.MeasuOp.GetPosition(theShape)
11061             RaiseIfFailed("GetPosition", self.MeasuOp)
11062             return aTuple
11063
11064         ## Get kind of theShape.
11065         #
11066         #  @param theShape Shape to get a kind of.
11067         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
11068         #          and a list of parameters, describing the shape.
11069         #  @note  Concrete meaning of each value, returned via \a theIntegers
11070         #         or \a theDoubles list depends on the kind() of the shape.
11071         #
11072         #  @ref swig_todo "Example"
11073         @ManageTransactions("MeasuOp")
11074         def KindOfShape(self,theShape):
11075             """
11076             Get kind of theShape.
11077
11078             Parameters:
11079                 theShape Shape to get a kind of.
11080
11081             Returns:
11082                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
11083                     and a list of parameters, describing the shape.
11084             Note:
11085                 Concrete meaning of each value, returned via theIntegers
11086                 or theDoubles list depends on the geompy.kind of the shape
11087             """
11088             # Example: see GEOM_TestMeasures.py
11089             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
11090             RaiseIfFailed("KindOfShape", self.MeasuOp)
11091
11092             aKind  = aRoughTuple[0]
11093             anInts = aRoughTuple[1]
11094             aDbls  = aRoughTuple[2]
11095
11096             # Now there is no exception from this rule:
11097             aKindTuple = [aKind] + aDbls + anInts
11098
11099             # If they are we will regroup parameters for such kind of shape.
11100             # For example:
11101             #if aKind == kind.SOME_KIND:
11102             #    #  SOME_KIND     int int double int double double
11103             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
11104
11105             return aKindTuple
11106
11107         ## Returns the string that describes if the shell is good for solid.
11108         #  This is a support method for MakeSolid.
11109         #
11110         #  @param theShell the shell to be checked.
11111         #  @return Returns a string that describes the shell validity for
11112         #          solid construction.
11113         @ManageTransactions("MeasuOp")
11114         def _IsGoodForSolid(self, theShell):
11115             """
11116             Returns the string that describes if the shell is good for solid.
11117             This is a support method for MakeSolid.
11118
11119             Parameter:
11120                 theShell the shell to be checked.
11121
11122             Returns:
11123                 Returns a string that describes the shell validity for
11124                 solid construction.
11125             """
11126             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
11127             return aDescr
11128
11129         # end of l2_measure
11130         ## @}
11131
11132         ## @addtogroup l2_import_export
11133         ## @{
11134
11135         ## Import a shape from the BREP, IGES, STEP or other file
11136         #  (depends on given format) with given name.
11137         #
11138         #  Note: this function is deprecated, it is kept for backward compatibility only
11139         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11140         #
11141         #  @param theFileName The file, containing the shape.
11142         #  @param theFormatName Specify format for the file reading.
11143         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
11144         #         If format 'IGES_SCALE' is used instead of 'IGES' or
11145         #            format 'STEP_SCALE' is used instead of 'STEP',
11146         #            length unit will be set to 'meter' and result model will be scaled.
11147         #  @param theName Object name; when specified, this parameter is used
11148         #         for result publication in the study. Otherwise, if automatic
11149         #         publication is switched on, default value is used for result name.
11150         #
11151         #  @return 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 Auto publishing is allowed for the shape itself. Imported
11156         #        material groups are not automatically published.
11157         #
11158         #  @ref swig_Import_Export "Example"
11159         @ManageTransactions("InsertOp")
11160         def ImportFile(self, theFileName, theFormatName, theName=None):
11161             """
11162             Import a shape from the BREP, IGES, STEP or other file
11163             (depends on given format) with given name.
11164
11165             Note: this function is deprecated, it is kept for backward compatibility only
11166             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
11167
11168             Parameters: 
11169                 theFileName The file, containing the shape.
11170                 theFormatName Specify format for the file reading.
11171                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
11172                     If format 'IGES_SCALE' is used instead of 'IGES' or
11173                        format 'STEP_SCALE' is used instead of 'STEP',
11174                        length unit will be set to 'meter' and result model will be scaled.
11175                 theName Object name; when specified, this parameter is used
11176                         for result publication in the study. Otherwise, if automatic
11177                         publication is switched on, default value is used for result name.
11178
11179             Returns:
11180                 New GEOM.GEOM_Object, containing the imported shape.
11181                 If material names are imported it returns the list of
11182                 objects. The first one is the imported object followed by
11183                 material groups.
11184             Note:
11185                 Auto publishing is allowed for the shape itself. Imported
11186                 material groups are not automatically published.
11187             """
11188             # Example: see GEOM_TestOthers.py
11189             print """
11190             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
11191             where <FormatName> is a name of desirable format for importing.
11192             """
11193             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
11194             RaiseIfFailed("ImportFile", self.InsertOp)
11195             aNbObj = len(aListObj)
11196             if aNbObj > 0:
11197                 self._autoPublish(aListObj[0], theName, "imported")
11198             if aNbObj == 1:
11199                 return aListObj[0]
11200             return aListObj
11201
11202         ## Deprecated analog of ImportFile()
11203         def Import(self, theFileName, theFormatName, theName=None):
11204             """
11205             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
11206             """
11207             # note: auto-publishing is done in self.ImportFile()
11208             return self.ImportFile(theFileName, theFormatName, theName)
11209
11210         ## Read a shape from the binary stream, containing its bounding representation (BRep).
11211         #  @note This method will not be dumped to the python script by DumpStudy functionality.
11212         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
11213         #  @param theStream The BRep binary stream.
11214         #  @param theName Object name; when specified, this parameter is used
11215         #         for result publication in the study. Otherwise, if automatic
11216         #         publication is switched on, default value is used for result name.
11217         #
11218         #  @return New GEOM_Object, containing the shape, read from theStream.
11219         #
11220         #  @ref swig_Import_Export "Example"
11221         @ManageTransactions("InsertOp")
11222         def RestoreShape (self, theStream, theName=None):
11223             """
11224             Read a shape from the binary stream, containing its bounding representation (BRep).
11225
11226             Note:
11227                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
11228
11229             Parameters:
11230                 theStream The BRep binary stream.
11231                 theName Object name; when specified, this parameter is used
11232                         for result publication in the study. Otherwise, if automatic
11233                         publication is switched on, default value is used for result name.
11234
11235             Returns:
11236                 New GEOM_Object, containing the shape, read from theStream.
11237             """
11238             # Example: see GEOM_TestOthers.py
11239             anObj = self.InsertOp.RestoreShape(theStream)
11240             RaiseIfFailed("RestoreShape", self.InsertOp)
11241             self._autoPublish(anObj, theName, "restored")
11242             return anObj
11243
11244         ## Export the given shape into a file with given name.
11245         #
11246         #  Note: this function is deprecated, it is kept for backward compatibility only
11247         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11248         #
11249         #  @param theObject Shape to be stored in the file.
11250         #  @param theFileName Name of the file to store the given shape in.
11251         #  @param theFormatName Specify format for the shape storage.
11252         #         Available formats can be obtained with
11253         #         geompy.InsertOp.ExportTranslators()[0] method.
11254         #
11255         #  @ref swig_Import_Export "Example"
11256         @ManageTransactions("InsertOp")
11257         def Export(self, theObject, theFileName, theFormatName):
11258             """
11259             Export the given shape into a file with given name.
11260
11261             Note: this function is deprecated, it is kept for backward compatibility only
11262             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
11263             
11264             Parameters: 
11265                 theObject Shape to be stored in the file.
11266                 theFileName Name of the file to store the given shape in.
11267                 theFormatName Specify format for the shape storage.
11268                               Available formats can be obtained with
11269                               geompy.InsertOp.ExportTranslators()[0] method.
11270             """
11271             # Example: see GEOM_TestOthers.py
11272             print """
11273             WARNING: Function Export is deprecated, use Export<FormatName> instead,
11274             where <FormatName> is a name of desirable format for exporting.
11275             """
11276             self.InsertOp.Export(theObject, theFileName, theFormatName)
11277             if self.InsertOp.IsDone() == 0:
11278                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
11279                 pass
11280             pass
11281
11282         # end of l2_import_export
11283         ## @}
11284
11285         ## @addtogroup l3_blocks
11286         ## @{
11287
11288         ## Create a quadrangle face from four edges. Order of Edges is not
11289         #  important. It is  not necessary that edges share the same vertex.
11290         #  @param E1,E2,E3,E4 Edges for the face bound.
11291         #  @param theName Object name; when specified, this parameter is used
11292         #         for result publication in the study. Otherwise, if automatic
11293         #         publication is switched on, default value is used for result name.
11294         #
11295         #  @return New GEOM.GEOM_Object, containing the created face.
11296         #
11297         #  @ref tui_building_by_blocks_page "Example"
11298         @ManageTransactions("BlocksOp")
11299         def MakeQuad(self, E1, E2, E3, E4, theName=None):
11300             """
11301             Create a quadrangle face from four edges. Order of Edges is not
11302             important. It is  not necessary that edges share the same vertex.
11303
11304             Parameters:
11305                 E1,E2,E3,E4 Edges for the face bound.
11306                 theName Object name; when specified, this parameter is used
11307                         for result publication in the study. Otherwise, if automatic
11308                         publication is switched on, default value is used for result name.
11309
11310             Returns:
11311                 New GEOM.GEOM_Object, containing the created face.
11312
11313             Example of usage:
11314                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
11315             """
11316             # Example: see GEOM_Spanner.py
11317             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
11318             RaiseIfFailed("MakeQuad", self.BlocksOp)
11319             self._autoPublish(anObj, theName, "quad")
11320             return anObj
11321
11322         ## Create a quadrangle face on two edges.
11323         #  The missing edges will be built by creating the shortest ones.
11324         #  @param E1,E2 Two opposite edges for the face.
11325         #  @param theName Object name; when specified, this parameter is used
11326         #         for result publication in the study. Otherwise, if automatic
11327         #         publication is switched on, default value is used for result name.
11328         #
11329         #  @return New GEOM.GEOM_Object, containing the created face.
11330         #
11331         #  @ref tui_building_by_blocks_page "Example"
11332         @ManageTransactions("BlocksOp")
11333         def MakeQuad2Edges(self, E1, E2, theName=None):
11334             """
11335             Create a quadrangle face on two edges.
11336             The missing edges will be built by creating the shortest ones.
11337
11338             Parameters:
11339                 E1,E2 Two opposite edges for the face.
11340                 theName Object name; when specified, this parameter is used
11341                         for result publication in the study. Otherwise, if automatic
11342                         publication is switched on, default value is used for result name.
11343
11344             Returns:
11345                 New GEOM.GEOM_Object, containing the created face.
11346
11347             Example of usage:
11348                 # create vertices
11349                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11350                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11351                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11352                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11353                 # create edges
11354                 edge1 = geompy.MakeEdge(p1, p2)
11355                 edge2 = geompy.MakeEdge(p3, p4)
11356                 # create a quadrangle face from two edges
11357                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11358             """
11359             # Example: see GEOM_Spanner.py
11360             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11361             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11362             self._autoPublish(anObj, theName, "quad")
11363             return anObj
11364
11365         ## Create a quadrangle face with specified corners.
11366         #  The missing edges will be built by creating the shortest ones.
11367         #  @param V1,V2,V3,V4 Corner vertices for the face.
11368         #  @param theName Object name; when specified, this parameter is used
11369         #         for result publication in the study. Otherwise, if automatic
11370         #         publication is switched on, default value is used for result name.
11371         #
11372         #  @return New GEOM.GEOM_Object, containing the created face.
11373         #
11374         #  @ref tui_building_by_blocks_page "Example 1"
11375         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11376         @ManageTransactions("BlocksOp")
11377         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11378             """
11379             Create a quadrangle face with specified corners.
11380             The missing edges will be built by creating the shortest ones.
11381
11382             Parameters:
11383                 V1,V2,V3,V4 Corner vertices for the face.
11384                 theName Object name; when specified, this parameter is used
11385                         for result publication in the study. Otherwise, if automatic
11386                         publication is switched on, default value is used for result name.
11387
11388             Returns:
11389                 New GEOM.GEOM_Object, containing the created face.
11390
11391             Example of usage:
11392                 # create vertices
11393                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11394                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11395                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11396                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11397                 # create a quadrangle from four points in its corners
11398                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11399             """
11400             # Example: see GEOM_Spanner.py
11401             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11402             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11403             self._autoPublish(anObj, theName, "quad")
11404             return anObj
11405
11406         ## Create a hexahedral solid, bounded by the six given faces. Order of
11407         #  faces is not important. It is  not necessary that Faces share the same edge.
11408         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11409         #  @param theName Object name; when specified, this parameter is used
11410         #         for result publication in the study. Otherwise, if automatic
11411         #         publication is switched on, default value is used for result name.
11412         #
11413         #  @return New GEOM.GEOM_Object, containing the created solid.
11414         #
11415         #  @ref tui_building_by_blocks_page "Example 1"
11416         #  \n @ref swig_MakeHexa "Example 2"
11417         @ManageTransactions("BlocksOp")
11418         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11419             """
11420             Create a hexahedral solid, bounded by the six given faces. Order of
11421             faces is not important. It is  not necessary that Faces share the same edge.
11422
11423             Parameters:
11424                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11425                 theName Object name; when specified, this parameter is used
11426                         for result publication in the study. Otherwise, if automatic
11427                         publication is switched on, default value is used for result name.
11428
11429             Returns:
11430                 New GEOM.GEOM_Object, containing the created solid.
11431
11432             Example of usage:
11433                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11434             """
11435             # Example: see GEOM_Spanner.py
11436             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11437             RaiseIfFailed("MakeHexa", self.BlocksOp)
11438             self._autoPublish(anObj, theName, "hexa")
11439             return anObj
11440
11441         ## Create a hexahedral solid between two given faces.
11442         #  The missing faces will be built by creating the smallest ones.
11443         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11444         #  @param theName Object name; when specified, this parameter is used
11445         #         for result publication in the study. Otherwise, if automatic
11446         #         publication is switched on, default value is used for result name.
11447         #
11448         #  @return New GEOM.GEOM_Object, containing the created solid.
11449         #
11450         #  @ref tui_building_by_blocks_page "Example 1"
11451         #  \n @ref swig_MakeHexa2Faces "Example 2"
11452         @ManageTransactions("BlocksOp")
11453         def MakeHexa2Faces(self, F1, F2, theName=None):
11454             """
11455             Create a hexahedral solid between two given faces.
11456             The missing faces will be built by creating the smallest ones.
11457
11458             Parameters:
11459                 F1,F2 Two opposite faces for the hexahedral solid.
11460                 theName Object name; when specified, this parameter is used
11461                         for result publication in the study. Otherwise, if automatic
11462                         publication is switched on, default value is used for result name.
11463
11464             Returns:
11465                 New GEOM.GEOM_Object, containing the created solid.
11466
11467             Example of usage:
11468                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11469             """
11470             # Example: see GEOM_Spanner.py
11471             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11472             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11473             self._autoPublish(anObj, theName, "hexa")
11474             return anObj
11475
11476         # end of l3_blocks
11477         ## @}
11478
11479         ## @addtogroup l3_blocks_op
11480         ## @{
11481
11482         ## Get a vertex, found in the given shape by its coordinates.
11483         #  @param theShape Block or a compound of blocks.
11484         #  @param theX,theY,theZ Coordinates of the sought vertex.
11485         #  @param theEpsilon Maximum allowed distance between the resulting
11486         #                    vertex and point with the given coordinates.
11487         #  @param theName Object name; when specified, this parameter is used
11488         #         for result publication in the study. Otherwise, if automatic
11489         #         publication is switched on, default value is used for result name.
11490         #
11491         #  @return New GEOM.GEOM_Object, containing the found vertex.
11492         #
11493         #  @ref swig_GetPoint "Example"
11494         @ManageTransactions("BlocksOp")
11495         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11496             """
11497             Get a vertex, found in the given shape by its coordinates.
11498
11499             Parameters:
11500                 theShape Block or a compound of blocks.
11501                 theX,theY,theZ Coordinates of the sought vertex.
11502                 theEpsilon Maximum allowed distance between the resulting
11503                            vertex and point with the given coordinates.
11504                 theName Object name; when specified, this parameter is used
11505                         for result publication in the study. Otherwise, if automatic
11506                         publication is switched on, default value is used for result name.
11507
11508             Returns:
11509                 New GEOM.GEOM_Object, containing the found vertex.
11510
11511             Example of usage:
11512                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11513             """
11514             # Example: see GEOM_TestOthers.py
11515             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11516             RaiseIfFailed("GetPoint", self.BlocksOp)
11517             self._autoPublish(anObj, theName, "vertex")
11518             return anObj
11519
11520         ## Find a vertex of the given shape, which has minimal distance to the given point.
11521         #  @param theShape Any shape.
11522         #  @param thePoint Point, close to the desired vertex.
11523         #  @param theName Object name; when specified, this parameter is used
11524         #         for result publication in the study. Otherwise, if automatic
11525         #         publication is switched on, default value is used for result name.
11526         #
11527         #  @return New GEOM.GEOM_Object, containing the found vertex.
11528         #
11529         #  @ref swig_GetVertexNearPoint "Example"
11530         @ManageTransactions("BlocksOp")
11531         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11532             """
11533             Find a vertex of the given shape, which has minimal distance to the given point.
11534
11535             Parameters:
11536                 theShape Any shape.
11537                 thePoint Point, close to the desired vertex.
11538                 theName Object name; when specified, this parameter is used
11539                         for result publication in the study. Otherwise, if automatic
11540                         publication is switched on, default value is used for result name.
11541
11542             Returns:
11543                 New GEOM.GEOM_Object, containing the found vertex.
11544
11545             Example of usage:
11546                 pmidle = geompy.MakeVertex(50, 0, 50)
11547                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11548             """
11549             # Example: see GEOM_TestOthers.py
11550             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11551             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11552             self._autoPublish(anObj, theName, "vertex")
11553             return anObj
11554
11555         ## Get an edge, found in the given shape by two given vertices.
11556         #  @param theShape Block or a compound of blocks.
11557         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11558         #  @param theName Object name; when specified, this parameter is used
11559         #         for result publication in the study. Otherwise, if automatic
11560         #         publication is switched on, default value is used for result name.
11561         #
11562         #  @return New GEOM.GEOM_Object, containing the found edge.
11563         #
11564         #  @ref swig_GetEdge "Example"
11565         @ManageTransactions("BlocksOp")
11566         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11567             """
11568             Get an edge, found in the given shape by two given vertices.
11569
11570             Parameters:
11571                 theShape Block or a compound of blocks.
11572                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11573                 theName Object name; when specified, this parameter is used
11574                         for result publication in the study. Otherwise, if automatic
11575                         publication is switched on, default value is used for result name.
11576
11577             Returns:
11578                 New GEOM.GEOM_Object, containing the found edge.
11579             """
11580             # Example: see GEOM_Spanner.py
11581             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11582             RaiseIfFailed("GetEdge", self.BlocksOp)
11583             self._autoPublish(anObj, theName, "edge")
11584             return anObj
11585
11586         ## Find an edge of the given shape, which has minimal distance to the given point.
11587         #  @param theShape Block or a compound of blocks.
11588         #  @param thePoint Point, close to the desired edge.
11589         #  @param theName Object name; when specified, this parameter is used
11590         #         for result publication in the study. Otherwise, if automatic
11591         #         publication is switched on, default value is used for result name.
11592         #
11593         #  @return New GEOM.GEOM_Object, containing the found edge.
11594         #
11595         #  @ref swig_GetEdgeNearPoint "Example"
11596         @ManageTransactions("BlocksOp")
11597         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11598             """
11599             Find an edge of the given shape, which has minimal distance to the given point.
11600
11601             Parameters:
11602                 theShape Block or a compound of blocks.
11603                 thePoint Point, close to the desired edge.
11604                 theName Object name; when specified, this parameter is used
11605                         for result publication in the study. Otherwise, if automatic
11606                         publication is switched on, default value is used for result name.
11607
11608             Returns:
11609                 New GEOM.GEOM_Object, containing the found edge.
11610             """
11611             # Example: see GEOM_TestOthers.py
11612             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11613             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11614             self._autoPublish(anObj, theName, "edge")
11615             return anObj
11616
11617         ## Returns a face, found in the given shape by four given corner vertices.
11618         #  @param theShape Block or a compound of blocks.
11619         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11620         #  @param theName Object name; when specified, this parameter is used
11621         #         for result publication in the study. Otherwise, if automatic
11622         #         publication is switched on, default value is used for result name.
11623         #
11624         #  @return New GEOM.GEOM_Object, containing the found face.
11625         #
11626         #  @ref swig_todo "Example"
11627         @ManageTransactions("BlocksOp")
11628         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11629             """
11630             Returns a face, found in the given shape by four given corner vertices.
11631
11632             Parameters:
11633                 theShape Block or a compound of blocks.
11634                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11635                 theName Object name; when specified, this parameter is used
11636                         for result publication in the study. Otherwise, if automatic
11637                         publication is switched on, default value is used for result name.
11638
11639             Returns:
11640                 New GEOM.GEOM_Object, containing the found face.
11641             """
11642             # Example: see GEOM_Spanner.py
11643             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11644             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11645             self._autoPublish(anObj, theName, "face")
11646             return anObj
11647
11648         ## Get a face of block, found in the given shape by two given edges.
11649         #  @param theShape Block or a compound of blocks.
11650         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11651         #  @param theName Object name; when specified, this parameter is used
11652         #         for result publication in the study. Otherwise, if automatic
11653         #         publication is switched on, default value is used for result name.
11654         #
11655         #  @return New GEOM.GEOM_Object, containing the found face.
11656         #
11657         #  @ref swig_todo "Example"
11658         @ManageTransactions("BlocksOp")
11659         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11660             """
11661             Get a face of block, found in the given shape by two given edges.
11662
11663             Parameters:
11664                 theShape Block or a compound of blocks.
11665                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11666                 theName Object name; when specified, this parameter is used
11667                         for result publication in the study. Otherwise, if automatic
11668                         publication is switched on, default value is used for result name.
11669
11670             Returns:
11671                 New GEOM.GEOM_Object, containing the found face.
11672             """
11673             # Example: see GEOM_Spanner.py
11674             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11675             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11676             self._autoPublish(anObj, theName, "face")
11677             return anObj
11678
11679         ## Find a face, opposite to the given one in the given block.
11680         #  @param theBlock Must be a hexahedral solid.
11681         #  @param theFace Face of \a theBlock, opposite to the desired face.
11682         #  @param theName Object name; when specified, this parameter is used
11683         #         for result publication in the study. Otherwise, if automatic
11684         #         publication is switched on, default value is used for result name.
11685         #
11686         #  @return New GEOM.GEOM_Object, containing the found face.
11687         #
11688         #  @ref swig_GetOppositeFace "Example"
11689         @ManageTransactions("BlocksOp")
11690         def GetOppositeFace(self, theBlock, theFace, theName=None):
11691             """
11692             Find a face, opposite to the given one in the given block.
11693
11694             Parameters:
11695                 theBlock Must be a hexahedral solid.
11696                 theFace Face of theBlock, opposite to the desired face.
11697                 theName Object name; when specified, this parameter is used
11698                         for result publication in the study. Otherwise, if automatic
11699                         publication is switched on, default value is used for result name.
11700
11701             Returns:
11702                 New GEOM.GEOM_Object, containing the found face.
11703             """
11704             # Example: see GEOM_Spanner.py
11705             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11706             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11707             self._autoPublish(anObj, theName, "face")
11708             return anObj
11709
11710         ## Find a face of the given shape, which has minimal distance to the given point.
11711         #  @param theShape Block or a compound of blocks.
11712         #  @param thePoint Point, close to the desired face.
11713         #  @param theName Object name; when specified, this parameter is used
11714         #         for result publication in the study. Otherwise, if automatic
11715         #         publication is switched on, default value is used for result name.
11716         #
11717         #  @return New GEOM.GEOM_Object, containing the found face.
11718         #
11719         #  @ref swig_GetFaceNearPoint "Example"
11720         @ManageTransactions("BlocksOp")
11721         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11722             """
11723             Find a face of the given shape, which has minimal distance to the given point.
11724
11725             Parameters:
11726                 theShape Block or a compound of blocks.
11727                 thePoint Point, close to the desired face.
11728                 theName Object name; when specified, this parameter is used
11729                         for result publication in the study. Otherwise, if automatic
11730                         publication is switched on, default value is used for result name.
11731
11732             Returns:
11733                 New GEOM.GEOM_Object, containing the found face.
11734             """
11735             # Example: see GEOM_Spanner.py
11736             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11737             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11738             self._autoPublish(anObj, theName, "face")
11739             return anObj
11740
11741         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11742         #  @param theBlock Block or a compound of blocks.
11743         #  @param theVector Vector, close to the normale of the desired face.
11744         #  @param theName Object name; when specified, this parameter is used
11745         #         for result publication in the study. Otherwise, if automatic
11746         #         publication is switched on, default value is used for result name.
11747         #
11748         #  @return New GEOM.GEOM_Object, containing the found face.
11749         #
11750         #  @ref swig_todo "Example"
11751         @ManageTransactions("BlocksOp")
11752         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11753             """
11754             Find a face of block, whose outside normale has minimal angle with the given vector.
11755
11756             Parameters:
11757                 theBlock Block or a compound of blocks.
11758                 theVector Vector, close to the normale of the desired face.
11759                 theName Object name; when specified, this parameter is used
11760                         for result publication in the study. Otherwise, if automatic
11761                         publication is switched on, default value is used for result name.
11762
11763             Returns:
11764                 New GEOM.GEOM_Object, containing the found face.
11765             """
11766             # Example: see GEOM_Spanner.py
11767             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11768             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11769             self._autoPublish(anObj, theName, "face")
11770             return anObj
11771
11772         ## Find all sub-shapes of type \a theShapeType of the given shape,
11773         #  which have minimal distance to the given point.
11774         #  @param theShape Any shape.
11775         #  @param thePoint Point, close to the desired shape.
11776         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11777         #  @param theTolerance The tolerance for distances comparison. All shapes
11778         #                      with distances to the given point in interval
11779         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11780         #  @param theName Object name; when specified, this parameter is used
11781         #         for result publication in the study. Otherwise, if automatic
11782         #         publication is switched on, default value is used for result name.
11783         #
11784         #  @return New GEOM_Object, containing a group of all found shapes.
11785         #
11786         #  @ref swig_GetShapesNearPoint "Example"
11787         @ManageTransactions("BlocksOp")
11788         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11789             """
11790             Find all sub-shapes of type theShapeType of the given shape,
11791             which have minimal distance to the given point.
11792
11793             Parameters:
11794                 theShape Any shape.
11795                 thePoint Point, close to the desired shape.
11796                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11797                 theTolerance The tolerance for distances comparison. All shapes
11798                                 with distances to the given point in interval
11799                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11800                 theName Object name; when specified, this parameter is used
11801                         for result publication in the study. Otherwise, if automatic
11802                         publication is switched on, default value is used for result name.
11803
11804             Returns:
11805                 New GEOM_Object, containing a group of all found shapes.
11806             """
11807             # Example: see GEOM_TestOthers.py
11808             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11809             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11810             self._autoPublish(anObj, theName, "group")
11811             return anObj
11812
11813         # end of l3_blocks_op
11814         ## @}
11815
11816         ## @addtogroup l4_blocks_measure
11817         ## @{
11818
11819         ## Check, if the compound of blocks is given.
11820         #  To be considered as a compound of blocks, the
11821         #  given shape must satisfy the following conditions:
11822         #  - Each element of the compound should be a Block (6 faces).
11823         #  - Each face should be a quadrangle, i.e. it should have only 1 wire
11824         #       with 4 edges. If <VAR>theIsUseC1</VAR> is set to True and
11825         #       there are more than 4 edges in the only wire of a face,
11826         #       this face is considered to be quadrangle if it has 4 bounds
11827         #       (1 or more edge) of C1 continuity.
11828         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11829         #  - The compound should be connexe.
11830         #  - The glue between two quadrangle faces should be applied.
11831         #  @param theCompound The compound to check.
11832         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
11833         #         taking into account C1 continuity.
11834         #  @param theAngTolerance the angular tolerance to check if two neighbor
11835         #         edges are codirectional in the common vertex with this
11836         #         tolerance. This parameter is used only if
11837         #         <VAR>theIsUseC1</VAR> is set to True.
11838         #  @return TRUE, if the given shape is a compound of blocks.
11839         #  If theCompound is not valid, prints all discovered errors.
11840         #
11841         #  @ref tui_check_compound_of_blocks_page "Example 1"
11842         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11843         @ManageTransactions("BlocksOp")
11844         def CheckCompoundOfBlocks(self,theCompound, theIsUseC1 = False,
11845                                   theAngTolerance = 1.e-12):
11846             """
11847             Check, if the compound of blocks is given.
11848             To be considered as a compound of blocks, the
11849             given shape must satisfy the following conditions:
11850             - Each element of the compound should be a Block (6 faces).
11851             - Each face should be a quadrangle, i.e. it should have only 1 wire
11852                  with 4 edges. If theIsUseC1 is set to True and
11853                  there are more than 4 edges in the only wire of a face,
11854                  this face is considered to be quadrangle if it has 4 bounds
11855                  (1 or more edge) of C1 continuity.
11856             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11857             - The compound should be connexe.
11858             - The glue between two quadrangle faces should be applied.
11859
11860             Parameters:
11861                 theCompound The compound to check.
11862                 theIsUseC1 Flag to check if there are 4 bounds on a face
11863                            taking into account C1 continuity.
11864                 theAngTolerance the angular tolerance to check if two neighbor
11865                            edges are codirectional in the common vertex with this
11866                            tolerance. This parameter is used only if
11867                            theIsUseC1 is set to True.
11868
11869             Returns:
11870                 TRUE, if the given shape is a compound of blocks.
11871                 If theCompound is not valid, prints all discovered errors.
11872             """
11873             # Example: see GEOM_Spanner.py
11874             aTolerance = -1.0
11875             if theIsUseC1:
11876                 aTolerance = theAngTolerance
11877             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound, aTolerance)
11878             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11879             if IsValid == 0:
11880                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11881                 print Descr
11882             return IsValid
11883
11884         ## Retrieve all non blocks solids and faces from \a theShape.
11885         #  @param theShape The shape to explore.
11886         #  @param theIsUseC1 Flag to check if there are 4 bounds on a face
11887         #         taking into account C1 continuity.
11888         #  @param theAngTolerance the angular tolerance to check if two neighbor
11889         #         edges are codirectional in the common vertex with this
11890         #         tolerance. This parameter is used only if
11891         #         <VAR>theIsUseC1</VAR> is set to True.
11892         #  @param theName Object name; when specified, this parameter is used
11893         #         for result publication in the study. Otherwise, if automatic
11894         #         publication is switched on, default value is used for result name.
11895         #
11896         #  @return 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         #  @ref tui_get_non_blocks_page "Example 1"
11905         #  \n @ref swig_GetNonBlocks "Example 2"
11906         @ManageTransactions("BlocksOp")
11907         def GetNonBlocks (self, theShape, theIsUseC1 = False,
11908                           theAngTolerance = 1.e-12, theName=None):
11909             """
11910             Retrieve all non blocks solids and faces from theShape.
11911
11912             Parameters:
11913                 theShape The shape to explore.
11914                 theIsUseC1 Flag to check if there are 4 bounds on a face
11915                            taking into account C1 continuity.
11916                 theAngTolerance the angular tolerance to check if two neighbor
11917                            edges are codirectional in the common vertex with this
11918                            tolerance. This parameter is used only if
11919                            theIsUseC1 is set to True.
11920                 theName Object name; when specified, this parameter is used
11921                         for result publication in the study. Otherwise, if automatic
11922                         publication is switched on, default value is used for result name.
11923
11924             Returns:
11925                 A tuple of two GEOM_Objects. The first object is a group of all
11926                 non block solids (= not 6 faces, or with 6 faces, but with the
11927                 presence of non-quadrangular faces). The second object is a
11928                 group of all non quadrangular faces (= faces with more then
11929                 1 wire or, if <VAR>theIsUseC1</VAR> is set to True, faces
11930                 with 1 wire with not 4 edges that do not form 4 bounds of
11931                 C1 continuity).
11932
11933             Usage:
11934                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11935             """
11936             # Example: see GEOM_Spanner.py
11937             aTolerance = -1.0
11938             if theIsUseC1:
11939                 aTolerance = theAngTolerance
11940             aTuple = self.BlocksOp.GetNonBlocks(theShape, aTolerance)
11941             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11942             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11943             return aTuple
11944
11945         ## Remove all seam and degenerated edges from \a theShape.
11946         #  Unite faces and edges, sharing one surface. It means that
11947         #  this faces must have references to one C++ surface object (handle).
11948         #  @param theShape The compound or single solid to remove irregular edges from.
11949         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11950         #         do not unite faces.
11951         #  @param theName Object name; when specified, this parameter is used
11952         #         for result publication in the study. Otherwise, if automatic
11953         #         publication is switched on, default value is used for result name.
11954         #
11955         #  @return Improved shape.
11956         #
11957         #  @ref swig_RemoveExtraEdges "Example"
11958         @ManageTransactions("BlocksOp")
11959         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11960             """
11961             Remove all seam and degenerated edges from theShape.
11962             Unite faces and edges, sharing one surface. It means that
11963             this faces must have references to one C++ surface object (handle).
11964
11965             Parameters:
11966                 theShape The compound or single solid to remove irregular edges from.
11967                 doUnionFaces If True, then unite faces. If False (the default value),
11968                              do not unite faces.
11969                 theName Object name; when specified, this parameter is used
11970                         for result publication in the study. Otherwise, if automatic
11971                         publication is switched on, default value is used for result name.
11972
11973             Returns:
11974                 Improved shape.
11975             """
11976             # Example: see GEOM_TestOthers.py
11977             nbFacesOptimum = -1 # -1 means do not unite faces
11978             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11979             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11980             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11981             self._autoPublish(anObj, theName, "removeExtraEdges")
11982             return anObj
11983
11984         ## Performs union faces of \a theShape
11985         #  Unite faces sharing one surface. It means that
11986         #  these faces must have references to one C++ surface object (handle).
11987         #  @param theShape The compound or single solid that contains faces
11988         #         to perform union.
11989         #  @param theName Object name; when specified, this parameter is used
11990         #         for result publication in the study. Otherwise, if automatic
11991         #         publication is switched on, default value is used for result name.
11992         #
11993         #  @return Improved shape.
11994         #
11995         #  @ref swig_UnionFaces "Example"
11996         @ManageTransactions("BlocksOp")
11997         def UnionFaces(self, theShape, theName=None):
11998             """
11999             Performs union faces of theShape.
12000             Unite faces sharing one surface. It means that
12001             these faces must have references to one C++ surface object (handle).
12002
12003             Parameters:
12004                 theShape The compound or single solid that contains faces
12005                          to perform union.
12006                 theName Object name; when specified, this parameter is used
12007                         for result publication in the study. Otherwise, if automatic
12008                         publication is switched on, default value is used for result name.
12009
12010             Returns:
12011                 Improved shape.
12012             """
12013             # Example: see GEOM_TestOthers.py
12014             anObj = self.BlocksOp.UnionFaces(theShape)
12015             RaiseIfFailed("UnionFaces", self.BlocksOp)
12016             self._autoPublish(anObj, theName, "unionFaces")
12017             return anObj
12018
12019         ## Check, if the given shape is a blocks compound.
12020         #  Fix all detected errors.
12021         #    \note Single block can be also fixed by this method.
12022         #  @param theShape The compound to check and improve.
12023         #  @param theName Object name; when specified, this parameter is used
12024         #         for result publication in the study. Otherwise, if automatic
12025         #         publication is switched on, default value is used for result name.
12026         #
12027         #  @return Improved compound.
12028         #
12029         #  @ref swig_CheckAndImprove "Example"
12030         @ManageTransactions("BlocksOp")
12031         def CheckAndImprove(self, theShape, theName=None):
12032             """
12033             Check, if the given shape is a blocks compound.
12034             Fix all detected errors.
12035
12036             Note:
12037                 Single block can be also fixed by this method.
12038
12039             Parameters:
12040                 theShape The compound to check and improve.
12041                 theName Object name; when specified, this parameter is used
12042                         for result publication in the study. Otherwise, if automatic
12043                         publication is switched on, default value is used for result name.
12044
12045             Returns:
12046                 Improved compound.
12047             """
12048             # Example: see GEOM_TestOthers.py
12049             anObj = self.BlocksOp.CheckAndImprove(theShape)
12050             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
12051             self._autoPublish(anObj, theName, "improved")
12052             return anObj
12053
12054         # end of l4_blocks_measure
12055         ## @}
12056
12057         ## @addtogroup l3_blocks_op
12058         ## @{
12059
12060         ## Get all the blocks, contained in the given compound.
12061         #  @param theCompound The compound to explode.
12062         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
12063         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
12064         #  @param theName Object name; when specified, this parameter is used
12065         #         for result publication in the study. Otherwise, if automatic
12066         #         publication is switched on, default value is used for result name.
12067         #
12068         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12069         #
12070         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
12071         #
12072         #  @ref tui_explode_on_blocks "Example 1"
12073         #  \n @ref swig_MakeBlockExplode "Example 2"
12074         @ManageTransactions("BlocksOp")
12075         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
12076             """
12077             Get all the blocks, contained in the given compound.
12078
12079             Parameters:
12080                 theCompound The compound to explode.
12081                 theMinNbFaces If solid has lower number of faces, it is not a block.
12082                 theMaxNbFaces If solid has higher number of faces, it is not a block.
12083                 theName Object name; when specified, this parameter is used
12084                         for result publication in the study. Otherwise, if automatic
12085                         publication is switched on, default value is used for result name.
12086
12087             Note:
12088                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
12089
12090             Returns:
12091                 List of GEOM.GEOM_Object, containing the retrieved blocks.
12092             """
12093             # Example: see GEOM_TestOthers.py
12094             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
12095             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
12096             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
12097             for anObj in aList:
12098                 anObj.SetParameters(Parameters)
12099                 pass
12100             self._autoPublish(aList, theName, "block")
12101             return aList
12102
12103         ## Find block, containing the given point inside its volume or on boundary.
12104         #  @param theCompound Compound, to find block in.
12105         #  @param thePoint Point, close to the desired block. If the point lays on
12106         #         boundary between some blocks, we return block with nearest center.
12107         #  @param theName Object name; when specified, this parameter is used
12108         #         for result publication in the study. Otherwise, if automatic
12109         #         publication is switched on, default value is used for result name.
12110         #
12111         #  @return New GEOM.GEOM_Object, containing the found block.
12112         #
12113         #  @ref swig_todo "Example"
12114         @ManageTransactions("BlocksOp")
12115         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
12116             """
12117             Find block, containing the given point inside its volume or on boundary.
12118
12119             Parameters:
12120                 theCompound Compound, to find block in.
12121                 thePoint Point, close to the desired block. If the point lays on
12122                          boundary between some blocks, we return block with nearest center.
12123                 theName Object name; when specified, this parameter is used
12124                         for result publication in the study. Otherwise, if automatic
12125                         publication is switched on, default value is used for result name.
12126
12127             Returns:
12128                 New GEOM.GEOM_Object, containing the found block.
12129             """
12130             # Example: see GEOM_Spanner.py
12131             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
12132             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
12133             self._autoPublish(anObj, theName, "block")
12134             return anObj
12135
12136         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12137         #  @param theCompound Compound, to find block in.
12138         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
12139         #  @param theName Object name; when specified, this parameter is used
12140         #         for result publication in the study. Otherwise, if automatic
12141         #         publication is switched on, default value is used for result name.
12142         #
12143         #  @return New GEOM.GEOM_Object, containing the found block.
12144         #
12145         #  @ref swig_GetBlockByParts "Example"
12146         @ManageTransactions("BlocksOp")
12147         def GetBlockByParts(self, theCompound, theParts, theName=None):
12148             """
12149              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
12150
12151              Parameters:
12152                 theCompound Compound, to find block in.
12153                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
12154                 theName Object name; when specified, this parameter is used
12155                         for result publication in the study. Otherwise, if automatic
12156                         publication is switched on, default value is used for result name.
12157
12158             Returns:
12159                 New GEOM_Object, containing the found block.
12160             """
12161             # Example: see GEOM_TestOthers.py
12162             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
12163             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
12164             self._autoPublish(anObj, theName, "block")
12165             return anObj
12166
12167         ## Return all blocks, containing all the elements, passed as the parts.
12168         #  @param theCompound Compound, to find blocks in.
12169         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12170         #  @param theName Object name; when specified, this parameter is used
12171         #         for result publication in the study. Otherwise, if automatic
12172         #         publication is switched on, default value is used for result name.
12173         #
12174         #  @return List of GEOM.GEOM_Object, containing the found blocks.
12175         #
12176         #  @ref swig_todo "Example"
12177         @ManageTransactions("BlocksOp")
12178         def GetBlocksByParts(self, theCompound, theParts, theName=None):
12179             """
12180             Return all blocks, containing all the elements, passed as the parts.
12181
12182             Parameters:
12183                 theCompound Compound, to find blocks in.
12184                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
12185                 theName Object name; when specified, this parameter is used
12186                         for result publication in the study. Otherwise, if automatic
12187                         publication is switched on, default value is used for result name.
12188
12189             Returns:
12190                 List of GEOM.GEOM_Object, containing the found blocks.
12191             """
12192             # Example: see GEOM_Spanner.py
12193             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
12194             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
12195             self._autoPublish(aList, theName, "block")
12196             return aList
12197
12198         ## Multi-transformate block and glue the result.
12199         #  Transformation is defined so, as to superpose direction faces.
12200         #  @param Block Hexahedral solid to be multi-transformed.
12201         #  @param DirFace1 ID of First direction face.
12202         #  @param DirFace2 ID of Second direction face.
12203         #  @param NbTimes Quantity of transformations to be done.
12204         #  @param theName Object name; when specified, this parameter is used
12205         #         for result publication in the study. Otherwise, if automatic
12206         #         publication is switched on, default value is used for result name.
12207         #
12208         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12209         #
12210         #  @return New GEOM.GEOM_Object, containing the result shape.
12211         #
12212         #  @ref tui_multi_transformation "Example"
12213         @ManageTransactions("BlocksOp")
12214         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
12215             """
12216             Multi-transformate block and glue the result.
12217             Transformation is defined so, as to superpose direction faces.
12218
12219             Parameters:
12220                 Block Hexahedral solid to be multi-transformed.
12221                 DirFace1 ID of First direction face.
12222                 DirFace2 ID of Second direction face.
12223                 NbTimes Quantity of transformations to be done.
12224                 theName Object name; when specified, this parameter is used
12225                         for result publication in the study. Otherwise, if automatic
12226                         publication is switched on, default value is used for result name.
12227
12228             Note:
12229                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
12230
12231             Returns:
12232                 New GEOM.GEOM_Object, containing the result shape.
12233             """
12234             # Example: see GEOM_Spanner.py
12235             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
12236             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
12237             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
12238             anObj.SetParameters(Parameters)
12239             self._autoPublish(anObj, theName, "transformed")
12240             return anObj
12241
12242         ## Multi-transformate block and glue the result.
12243         #  @param Block Hexahedral solid to be multi-transformed.
12244         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12245         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12246         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
12247         #  @param theName Object name; when specified, this parameter is used
12248         #         for result publication in the study. Otherwise, if automatic
12249         #         publication is switched on, default value is used for result name.
12250         #
12251         #  @return New GEOM.GEOM_Object, containing the result shape.
12252         #
12253         #  @ref tui_multi_transformation "Example"
12254         @ManageTransactions("BlocksOp")
12255         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
12256                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
12257             """
12258             Multi-transformate block and glue the result.
12259
12260             Parameters:
12261                 Block Hexahedral solid to be multi-transformed.
12262                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
12263                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
12264                 NbTimesU,NbTimesV Quantity of transformations to be done.
12265                 theName Object name; when specified, this parameter is used
12266                         for result publication in the study. Otherwise, if automatic
12267                         publication is switched on, default value is used for result name.
12268
12269             Returns:
12270                 New GEOM.GEOM_Object, containing the result shape.
12271             """
12272             # Example: see GEOM_Spanner.py
12273             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
12274               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
12275             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
12276                                                             DirFace1V, DirFace2V, NbTimesV)
12277             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
12278             anObj.SetParameters(Parameters)
12279             self._autoPublish(anObj, theName, "transformed")
12280             return anObj
12281
12282         ## Build all possible propagation groups.
12283         #  Propagation group is a set of all edges, opposite to one (main)
12284         #  edge of this group directly or through other opposite edges.
12285         #  Notion of Opposite Edge make sence only on quadrangle face.
12286         #  @param theShape Shape to build propagation groups on.
12287         #  @param theName Object name; when specified, this parameter is used
12288         #         for result publication in the study. Otherwise, if automatic
12289         #         publication is switched on, default value is used for result name.
12290         #
12291         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
12292         #
12293         #  @ref swig_Propagate "Example"
12294         @ManageTransactions("BlocksOp")
12295         def Propagate(self, theShape, theName=None):
12296             """
12297             Build all possible propagation groups.
12298             Propagation group is a set of all edges, opposite to one (main)
12299             edge of this group directly or through other opposite edges.
12300             Notion of Opposite Edge make sence only on quadrangle face.
12301
12302             Parameters:
12303                 theShape Shape to build propagation groups on.
12304                 theName Object name; when specified, this parameter is used
12305                         for result publication in the study. Otherwise, if automatic
12306                         publication is switched on, default value is used for result name.
12307
12308             Returns:
12309                 List of GEOM.GEOM_Object, each of them is a propagation group.
12310             """
12311             # Example: see GEOM_TestOthers.py
12312             listChains = self.BlocksOp.Propagate(theShape)
12313             RaiseIfFailed("Propagate", self.BlocksOp)
12314             self._autoPublish(listChains, theName, "propagate")
12315             return listChains
12316
12317         # end of l3_blocks_op
12318         ## @}
12319
12320         ## @addtogroup l3_groups
12321         ## @{
12322
12323         ## Creates a new group which will store sub-shapes of theMainShape
12324         #  @param theMainShape is a GEOM object on which the group is selected
12325         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
12326         #  @param theName Object name; when specified, this parameter is used
12327         #         for result publication in the study. Otherwise, if automatic
12328         #         publication is switched on, default value is used for result name.
12329         #
12330         #  @return a newly created GEOM group (GEOM.GEOM_Object)
12331         #
12332         #  @ref tui_working_with_groups_page "Example 1"
12333         #  \n @ref swig_CreateGroup "Example 2"
12334         @ManageTransactions("GroupOp")
12335         def CreateGroup(self, theMainShape, theShapeType, theName=None):
12336             """
12337             Creates a new group which will store sub-shapes of theMainShape
12338
12339             Parameters:
12340                theMainShape is a GEOM object on which the group is selected
12341                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
12342                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
12343                 theName Object name; when specified, this parameter is used
12344                         for result publication in the study. Otherwise, if automatic
12345                         publication is switched on, default value is used for result name.
12346
12347             Returns:
12348                a newly created GEOM group
12349
12350             Example of usage:
12351                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
12352
12353             """
12354             # Example: see GEOM_TestOthers.py
12355             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
12356             RaiseIfFailed("CreateGroup", self.GroupOp)
12357             self._autoPublish(anObj, theName, "group")
12358             return anObj
12359
12360         ## Adds a sub-object with ID theSubShapeId to the group
12361         #  @param theGroup is a GEOM group to which the new sub-shape is added
12362         #  @param theSubShapeID is a sub-shape ID in the main object.
12363         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12364         #
12365         #  @ref tui_working_with_groups_page "Example"
12366         @ManageTransactions("GroupOp")
12367         def AddObject(self,theGroup, theSubShapeID):
12368             """
12369             Adds a sub-object with ID theSubShapeId to the group
12370
12371             Parameters:
12372                 theGroup       is a GEOM group to which the new sub-shape is added
12373                 theSubShapeID  is a sub-shape ID in the main object.
12374
12375             Note:
12376                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12377             """
12378             # Example: see GEOM_TestOthers.py
12379             self.GroupOp.AddObject(theGroup, theSubShapeID)
12380             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12381                 RaiseIfFailed("AddObject", self.GroupOp)
12382                 pass
12383             pass
12384
12385         ## Removes a sub-object with ID \a theSubShapeId from the group
12386         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12387         #  @param theSubShapeID is a sub-shape ID in the main object.
12388         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12389         #
12390         #  @ref tui_working_with_groups_page "Example"
12391         @ManageTransactions("GroupOp")
12392         def RemoveObject(self,theGroup, theSubShapeID):
12393             """
12394             Removes a sub-object with ID theSubShapeId from the group
12395
12396             Parameters:
12397                 theGroup is a GEOM group from which the new sub-shape is removed
12398                 theSubShapeID is a sub-shape ID in the main object.
12399
12400             Note:
12401                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12402             """
12403             # Example: see GEOM_TestOthers.py
12404             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12405             RaiseIfFailed("RemoveObject", self.GroupOp)
12406             pass
12407
12408         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12409         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12410         #  @param theSubShapes is a list of sub-shapes to be added.
12411         #
12412         #  @ref tui_working_with_groups_page "Example"
12413         @ManageTransactions("GroupOp")
12414         def UnionList (self,theGroup, theSubShapes):
12415             """
12416             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12417
12418             Parameters:
12419                 theGroup is a GEOM group to which the new sub-shapes are added.
12420                 theSubShapes is a list of sub-shapes to be added.
12421             """
12422             # Example: see GEOM_TestOthers.py
12423             self.GroupOp.UnionList(theGroup, theSubShapes)
12424             RaiseIfFailed("UnionList", self.GroupOp)
12425             pass
12426
12427         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12428         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12429         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12430         #
12431         #  @ref swig_UnionIDs "Example"
12432         @ManageTransactions("GroupOp")
12433         def UnionIDs(self,theGroup, theSubShapes):
12434             """
12435             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12436
12437             Parameters:
12438                 theGroup is a GEOM group to which the new sub-shapes are added.
12439                 theSubShapes is a list of indices of sub-shapes to be added.
12440             """
12441             # Example: see GEOM_TestOthers.py
12442             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12443             RaiseIfFailed("UnionIDs", self.GroupOp)
12444             pass
12445
12446         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12447         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12448         #  @param theSubShapes is a list of sub-shapes to be removed.
12449         #
12450         #  @ref tui_working_with_groups_page "Example"
12451         @ManageTransactions("GroupOp")
12452         def DifferenceList (self,theGroup, theSubShapes):
12453             """
12454             Removes from the group all the given shapes. No errors, if some shapes are not included.
12455
12456             Parameters:
12457                 theGroup is a GEOM group from which the sub-shapes are removed.
12458                 theSubShapes is a list of sub-shapes to be removed.
12459             """
12460             # Example: see GEOM_TestOthers.py
12461             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12462             RaiseIfFailed("DifferenceList", self.GroupOp)
12463             pass
12464
12465         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12466         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12467         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12468         #
12469         #  @ref swig_DifferenceIDs "Example"
12470         @ManageTransactions("GroupOp")
12471         def DifferenceIDs(self,theGroup, theSubShapes):
12472             """
12473             Removes from the group all the given shapes. No errors, if some shapes are not included.
12474
12475             Parameters:
12476                 theGroup is a GEOM group from which the sub-shapes are removed.
12477                 theSubShapes is a list of indices of sub-shapes to be removed.
12478             """
12479             # Example: see GEOM_TestOthers.py
12480             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12481             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12482             pass
12483
12484         ## Union of two groups.
12485         #  New group is created. It will contain all entities
12486         #  which are present in groups theGroup1 and theGroup2.
12487         #  @param theGroup1, theGroup2 are the initial GEOM groups
12488         #                              to create the united group from.
12489         #  @param theName Object name; when specified, this parameter is used
12490         #         for result publication in the study. Otherwise, if automatic
12491         #         publication is switched on, default value is used for result name.
12492         #
12493         #  @return a newly created GEOM group.
12494         #
12495         #  @ref tui_union_groups_anchor "Example"
12496         @ManageTransactions("GroupOp")
12497         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12498             """
12499             Union of two groups.
12500             New group is created. It will contain all entities
12501             which are present in groups theGroup1 and theGroup2.
12502
12503             Parameters:
12504                 theGroup1, theGroup2 are the initial GEOM groups
12505                                      to create the united group from.
12506                 theName Object name; when specified, this parameter is used
12507                         for result publication in the study. Otherwise, if automatic
12508                         publication is switched on, default value is used for result name.
12509
12510             Returns:
12511                 a newly created GEOM group.
12512             """
12513             # Example: see GEOM_TestOthers.py
12514             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12515             RaiseIfFailed("UnionGroups", self.GroupOp)
12516             self._autoPublish(aGroup, theName, "group")
12517             return aGroup
12518
12519         ## Intersection of two groups.
12520         #  New group is created. It will contain only those entities
12521         #  which are present in both groups theGroup1 and theGroup2.
12522         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12523         #  @param theName Object name; when specified, this parameter is used
12524         #         for result publication in the study. Otherwise, if automatic
12525         #         publication is switched on, default value is used for result name.
12526         #
12527         #  @return a newly created GEOM group.
12528         #
12529         #  @ref tui_intersect_groups_anchor "Example"
12530         @ManageTransactions("GroupOp")
12531         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12532             """
12533             Intersection of two groups.
12534             New group is created. It will contain only those entities
12535             which are present in both groups theGroup1 and theGroup2.
12536
12537             Parameters:
12538                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12539                 theName Object name; when specified, this parameter is used
12540                         for result publication in the study. Otherwise, if automatic
12541                         publication is switched on, default value is used for result name.
12542
12543             Returns:
12544                 a newly created GEOM group.
12545             """
12546             # Example: see GEOM_TestOthers.py
12547             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12548             RaiseIfFailed("IntersectGroups", self.GroupOp)
12549             self._autoPublish(aGroup, theName, "group")
12550             return aGroup
12551
12552         ## Cut of two groups.
12553         #  New group is created. It will contain entities which are
12554         #  present in group theGroup1 but are not present in group theGroup2.
12555         #  @param theGroup1 is a GEOM group to include elements of.
12556         #  @param theGroup2 is a GEOM group to exclude elements of.
12557         #  @param theName Object name; when specified, this parameter is used
12558         #         for result publication in the study. Otherwise, if automatic
12559         #         publication is switched on, default value is used for result name.
12560         #
12561         #  @return a newly created GEOM group.
12562         #
12563         #  @ref tui_cut_groups_anchor "Example"
12564         @ManageTransactions("GroupOp")
12565         def CutGroups (self, theGroup1, theGroup2, theName=None):
12566             """
12567             Cut of two groups.
12568             New group is created. It will contain entities which are
12569             present in group theGroup1 but are not present in group theGroup2.
12570
12571             Parameters:
12572                 theGroup1 is a GEOM group to include elements of.
12573                 theGroup2 is a GEOM group to exclude elements of.
12574                 theName Object name; when specified, this parameter is used
12575                         for result publication in the study. Otherwise, if automatic
12576                         publication is switched on, default value is used for result name.
12577
12578             Returns:
12579                 a newly created GEOM group.
12580             """
12581             # Example: see GEOM_TestOthers.py
12582             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12583             RaiseIfFailed("CutGroups", self.GroupOp)
12584             self._autoPublish(aGroup, theName, "group")
12585             return aGroup
12586
12587         ## Union of list of groups.
12588         #  New group is created. It will contain all entities that are
12589         #  present in groups listed in theGList.
12590         #  @param theGList is a list of GEOM groups to create the united group from.
12591         #  @param theName Object name; when specified, this parameter is used
12592         #         for result publication in the study. Otherwise, if automatic
12593         #         publication is switched on, default value is used for result name.
12594         #
12595         #  @return a newly created GEOM group.
12596         #
12597         #  @ref tui_union_groups_anchor "Example"
12598         @ManageTransactions("GroupOp")
12599         def UnionListOfGroups (self, theGList, theName=None):
12600             """
12601             Union of list of groups.
12602             New group is created. It will contain all entities that are
12603             present in groups listed in theGList.
12604
12605             Parameters:
12606                 theGList is a list of GEOM groups to create the united group from.
12607                 theName Object name; when specified, this parameter is used
12608                         for result publication in the study. Otherwise, if automatic
12609                         publication is switched on, default value is used for result name.
12610
12611             Returns:
12612                 a newly created GEOM group.
12613             """
12614             # Example: see GEOM_TestOthers.py
12615             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12616             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12617             self._autoPublish(aGroup, theName, "group")
12618             return aGroup
12619
12620         ## Cut of lists of groups.
12621         #  New group is created. It will contain only entities
12622         #  which are present in groups listed in theGList.
12623         #  @param theGList is a list of GEOM groups to include elements of.
12624         #  @param theName Object name; when specified, this parameter is used
12625         #         for result publication in the study. Otherwise, if automatic
12626         #         publication is switched on, default value is used for result name.
12627         #
12628         #  @return a newly created GEOM group.
12629         #
12630         #  @ref tui_intersect_groups_anchor "Example"
12631         @ManageTransactions("GroupOp")
12632         def IntersectListOfGroups (self, theGList, theName=None):
12633             """
12634             Cut of lists of groups.
12635             New group is created. It will contain only entities
12636             which are present in groups listed in theGList.
12637
12638             Parameters:
12639                 theGList is a list of GEOM groups to include elements of.
12640                 theName Object name; when specified, this parameter is used
12641                         for result publication in the study. Otherwise, if automatic
12642                         publication is switched on, default value is used for result name.
12643
12644             Returns:
12645                 a newly created GEOM group.
12646             """
12647             # Example: see GEOM_TestOthers.py
12648             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12649             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12650             self._autoPublish(aGroup, theName, "group")
12651             return aGroup
12652
12653         ## Cut of lists of groups.
12654         #  New group is created. It will contain only entities
12655         #  which are present in groups listed in theGList1 but
12656         #  are not present in groups from theGList2.
12657         #  @param theGList1 is a list of GEOM groups to include elements of.
12658         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12659         #  @param theName Object name; when specified, this parameter is used
12660         #         for result publication in the study. Otherwise, if automatic
12661         #         publication is switched on, default value is used for result name.
12662         #
12663         #  @return a newly created GEOM group.
12664         #
12665         #  @ref tui_cut_groups_anchor "Example"
12666         @ManageTransactions("GroupOp")
12667         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12668             """
12669             Cut of lists of groups.
12670             New group is created. It will contain only entities
12671             which are present in groups listed in theGList1 but
12672             are not present in groups from theGList2.
12673
12674             Parameters:
12675                 theGList1 is a list of GEOM groups to include elements of.
12676                 theGList2 is a list of GEOM groups to exclude elements of.
12677                 theName Object name; when specified, this parameter is used
12678                         for result publication in the study. Otherwise, if automatic
12679                         publication is switched on, default value is used for result name.
12680
12681             Returns:
12682                 a newly created GEOM group.
12683             """
12684             # Example: see GEOM_TestOthers.py
12685             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12686             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12687             self._autoPublish(aGroup, theName, "group")
12688             return aGroup
12689
12690         ## Returns a list of sub-objects ID stored in the group
12691         #  @param theGroup is a GEOM group for which a list of IDs is requested
12692         #
12693         #  @ref swig_GetObjectIDs "Example"
12694         @ManageTransactions("GroupOp")
12695         def GetObjectIDs(self,theGroup):
12696             """
12697             Returns a list of sub-objects ID stored in the group
12698
12699             Parameters:
12700                 theGroup is a GEOM group for which a list of IDs is requested
12701             """
12702             # Example: see GEOM_TestOthers.py
12703             ListIDs = self.GroupOp.GetObjects(theGroup)
12704             RaiseIfFailed("GetObjects", self.GroupOp)
12705             return ListIDs
12706
12707         ## Returns a type of sub-objects stored in the group
12708         #  @param theGroup is a GEOM group which type is returned.
12709         #
12710         #  @ref swig_GetType "Example"
12711         @ManageTransactions("GroupOp")
12712         def GetType(self,theGroup):
12713             """
12714             Returns a type of sub-objects stored in the group
12715
12716             Parameters:
12717                 theGroup is a GEOM group which type is returned.
12718             """
12719             # Example: see GEOM_TestOthers.py
12720             aType = self.GroupOp.GetType(theGroup)
12721             RaiseIfFailed("GetType", self.GroupOp)
12722             return aType
12723
12724         ## Convert a type of geom object from id to string value
12725         #  @param theId is a GEOM obect type id.
12726         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12727         #  @ref swig_GetType "Example"
12728         def ShapeIdToType(self, theId):
12729             """
12730             Convert a type of geom object from id to string value
12731
12732             Parameters:
12733                 theId is a GEOM obect type id.
12734
12735             Returns:
12736                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12737             """
12738             if theId == 0:
12739                 return "COPY"
12740             if theId == 1:
12741                 return "IMPORT"
12742             if theId == 2:
12743                 return "POINT"
12744             if theId == 3:
12745                 return "VECTOR"
12746             if theId == 4:
12747                 return "PLANE"
12748             if theId == 5:
12749                 return "LINE"
12750             if theId == 6:
12751                 return "TORUS"
12752             if theId == 7:
12753                 return "BOX"
12754             if theId == 8:
12755                 return "CYLINDER"
12756             if theId == 9:
12757                 return "CONE"
12758             if theId == 10:
12759                 return "SPHERE"
12760             if theId == 11:
12761                 return "PRISM"
12762             if theId == 12:
12763                 return "REVOLUTION"
12764             if theId == 13:
12765                 return "BOOLEAN"
12766             if theId == 14:
12767                 return "PARTITION"
12768             if theId == 15:
12769                 return "POLYLINE"
12770             if theId == 16:
12771                 return "CIRCLE"
12772             if theId == 17:
12773                 return "SPLINE"
12774             if theId == 18:
12775                 return "ELLIPSE"
12776             if theId == 19:
12777                 return "CIRC_ARC"
12778             if theId == 20:
12779                 return "FILLET"
12780             if theId == 21:
12781                 return "CHAMFER"
12782             if theId == 22:
12783                 return "EDGE"
12784             if theId == 23:
12785                 return "WIRE"
12786             if theId == 24:
12787                 return "FACE"
12788             if theId == 25:
12789                 return "SHELL"
12790             if theId == 26:
12791                 return "SOLID"
12792             if theId == 27:
12793                 return "COMPOUND"
12794             if theId == 28:
12795                 return "SUBSHAPE"
12796             if theId == 29:
12797                 return "PIPE"
12798             if theId == 30:
12799                 return "ARCHIMEDE"
12800             if theId == 31:
12801                 return "FILLING"
12802             if theId == 32:
12803                 return "EXPLODE"
12804             if theId == 33:
12805                 return "GLUED"
12806             if theId == 34:
12807                 return "SKETCHER"
12808             if theId == 35:
12809                 return "CDG"
12810             if theId == 36:
12811                 return "FREE_BOUNDS"
12812             if theId == 37:
12813                 return "GROUP"
12814             if theId == 38:
12815                 return "BLOCK"
12816             if theId == 39:
12817                 return "MARKER"
12818             if theId == 40:
12819                 return "THRUSECTIONS"
12820             if theId == 41:
12821                 return "COMPOUNDFILTER"
12822             if theId == 42:
12823                 return "SHAPES_ON_SHAPE"
12824             if theId == 43:
12825                 return "ELLIPSE_ARC"
12826             if theId == 44:
12827                 return "3DSKETCHER"
12828             if theId == 45:
12829                 return "FILLET_2D"
12830             if theId == 46:
12831                 return "FILLET_1D"
12832             if theId == 201:
12833                 return "PIPETSHAPE"
12834             return "Shape Id not exist."
12835
12836         ## Returns a main shape associated with the group
12837         #  @param theGroup is a GEOM group for which a main shape object is requested
12838         #  @return a GEOM object which is a main shape for theGroup
12839         #
12840         #  @ref swig_GetMainShape "Example"
12841         @ManageTransactions("GroupOp")
12842         def GetMainShape(self,theGroup):
12843             """
12844             Returns a main shape associated with the group
12845
12846             Parameters:
12847                 theGroup is a GEOM group for which a main shape object is requested
12848
12849             Returns:
12850                 a GEOM object which is a main shape for theGroup
12851
12852             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12853             """
12854             # Example: see GEOM_TestOthers.py
12855             anObj = self.GroupOp.GetMainShape(theGroup)
12856             RaiseIfFailed("GetMainShape", self.GroupOp)
12857             return anObj
12858
12859         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12860         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12861         #  @param theShape given shape (see GEOM.GEOM_Object)
12862         #  @param min_length minimum length of edges of theShape
12863         #  @param max_length maximum length of edges of theShape
12864         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12865         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12866         #  @param theName Object name; when specified, this parameter is used
12867         #         for result publication in the study. Otherwise, if automatic
12868         #         publication is switched on, default value is used for result name.
12869         #
12870         #  @return a newly created GEOM group of edges
12871         #
12872         #  @@ref swig_todo "Example"
12873         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12874             """
12875             Create group of edges of theShape, whose length is in range [min_length, max_length].
12876             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12877
12878             Parameters:
12879                 theShape given shape
12880                 min_length minimum length of edges of theShape
12881                 max_length maximum length of edges of theShape
12882                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12883                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12884                 theName Object name; when specified, this parameter is used
12885                         for result publication in the study. Otherwise, if automatic
12886                         publication is switched on, default value is used for result name.
12887
12888              Returns:
12889                 a newly created GEOM group of edges.
12890             """
12891             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12892             edges_in_range = []
12893             for edge in edges:
12894                 Props = self.BasicProperties(edge)
12895                 if min_length <= Props[0] and Props[0] <= max_length:
12896                     if (not include_min) and (min_length == Props[0]):
12897                         skip = 1
12898                     else:
12899                         if (not include_max) and (Props[0] == max_length):
12900                             skip = 1
12901                         else:
12902                             edges_in_range.append(edge)
12903
12904             if len(edges_in_range) <= 0:
12905                 print "No edges found by given criteria"
12906                 return None
12907
12908             # note: auto-publishing is done in self.CreateGroup()
12909             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12910             self.UnionList(group_edges, edges_in_range)
12911
12912             return group_edges
12913
12914         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12915         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12916         #  @param min_length minimum length of edges of selected shape
12917         #  @param max_length maximum length of edges of selected shape
12918         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12919         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12920         #  @return a newly created GEOM group of edges
12921         #  @ref swig_todo "Example"
12922         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12923             """
12924             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12925             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12926
12927             Parameters:
12928                 min_length minimum length of edges of selected shape
12929                 max_length maximum length of edges of selected shape
12930                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12931                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12932
12933              Returns:
12934                 a newly created GEOM group of edges.
12935             """
12936             nb_selected = sg.SelectedCount()
12937             if nb_selected < 1:
12938                 print "Select a shape before calling this function, please."
12939                 return 0
12940             if nb_selected > 1:
12941                 print "Only one shape must be selected"
12942                 return 0
12943
12944             id_shape = sg.getSelected(0)
12945             shape = IDToObject( id_shape )
12946
12947             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12948
12949             left_str  = " < "
12950             right_str = " < "
12951             if include_min: left_str  = " <= "
12952             if include_max: right_str  = " <= "
12953
12954             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12955                                     + left_str + "length" + right_str + `max_length`)
12956
12957             sg.updateObjBrowser(1)
12958
12959             return group_edges
12960
12961         # end of l3_groups
12962         ## @}
12963
12964         #@@ insert new functions before this line @@ do not remove this line @@#
12965
12966         ## Create a copy of the given object
12967         #
12968         #  @param theOriginal geometry object for copy
12969         #  @param theName Object name; when specified, this parameter is used
12970         #         for result publication in the study. Otherwise, if automatic
12971         #         publication is switched on, default value is used for result name.
12972         #
12973         #  @return New GEOM_Object, containing the copied shape.
12974         #
12975         #  @ingroup l1_geomBuilder_auxiliary
12976         #  @ref swig_MakeCopy "Example"
12977         @ManageTransactions("InsertOp")
12978         def MakeCopy(self, theOriginal, theName=None):
12979             """
12980             Create a copy of the given object
12981
12982             Parameters:
12983                 theOriginal geometry object for copy
12984                 theName Object name; when specified, this parameter is used
12985                         for result publication in the study. Otherwise, if automatic
12986                         publication is switched on, default value is used for result name.
12987
12988             Returns:
12989                 New GEOM_Object, containing the copied shape.
12990
12991             Example of usage: Copy = geompy.MakeCopy(Box)
12992             """
12993             # Example: see GEOM_TestAll.py
12994             anObj = self.InsertOp.MakeCopy(theOriginal)
12995             RaiseIfFailed("MakeCopy", self.InsertOp)
12996             self._autoPublish(anObj, theName, "copy")
12997             return anObj
12998
12999         ## Add Path to load python scripts from
13000         #  @param Path a path to load python scripts from
13001         #  @ingroup l1_geomBuilder_auxiliary
13002         def addPath(self,Path):
13003             """
13004             Add Path to load python scripts from
13005
13006             Parameters:
13007                 Path a path to load python scripts from
13008             """
13009             if (sys.path.count(Path) < 1):
13010                 sys.path.append(Path)
13011                 pass
13012             pass
13013
13014         ## Load marker texture from the file
13015         #  @param Path a path to the texture file
13016         #  @return unique texture identifier
13017         #  @ingroup l1_geomBuilder_auxiliary
13018         @ManageTransactions("InsertOp")
13019         def LoadTexture(self, Path):
13020             """
13021             Load marker texture from the file
13022
13023             Parameters:
13024                 Path a path to the texture file
13025
13026             Returns:
13027                 unique texture identifier
13028             """
13029             # Example: see GEOM_TestAll.py
13030             ID = self.InsertOp.LoadTexture(Path)
13031             RaiseIfFailed("LoadTexture", self.InsertOp)
13032             return ID
13033
13034         ## Get internal name of the object based on its study entry
13035         #  @note This method does not provide an unique identifier of the geometry object.
13036         #  @note This is internal function of GEOM component, though it can be used outside it for
13037         #  appropriate reason (e.g. for identification of geometry object).
13038         #  @param obj geometry object
13039         #  @return unique object identifier
13040         #  @ingroup l1_geomBuilder_auxiliary
13041         def getObjectID(self, obj):
13042             """
13043             Get internal name of the object based on its study entry.
13044             Note: this method does not provide an unique identifier of the geometry object.
13045             It is an internal function of GEOM component, though it can be used outside GEOM for
13046             appropriate reason (e.g. for identification of geometry object).
13047
13048             Parameters:
13049                 obj geometry object
13050
13051             Returns:
13052                 unique object identifier
13053             """
13054             ID = ""
13055             entry = salome.ObjectToID(obj)
13056             if entry is not None:
13057                 lst = entry.split(":")
13058                 if len(lst) > 0:
13059                     ID = lst[-1] # -1 means last item in the list
13060                     return "GEOM_" + ID
13061             return ID
13062
13063
13064
13065         ## Add marker texture. @a Width and @a Height parameters
13066         #  specify width and height of the texture in pixels.
13067         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13068         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13069         #  parameter should be unpacked string, in which '1' symbols represent opaque
13070         #  pixels and '0' represent transparent pixels of the texture bitmap.
13071         #
13072         #  @param Width texture width in pixels
13073         #  @param Height texture height in pixels
13074         #  @param Texture texture data
13075         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13076         #  @return unique texture identifier
13077         #  @ingroup l1_geomBuilder_auxiliary
13078         @ManageTransactions("InsertOp")
13079         def AddTexture(self, Width, Height, Texture, RowData=False):
13080             """
13081             Add marker texture. Width and Height parameters
13082             specify width and height of the texture in pixels.
13083             If RowData is True, Texture parameter should represent texture data
13084             packed into the byte array. If RowData is False (default), Texture
13085             parameter should be unpacked string, in which '1' symbols represent opaque
13086             pixels and '0' represent transparent pixels of the texture bitmap.
13087
13088             Parameters:
13089                 Width texture width in pixels
13090                 Height texture height in pixels
13091                 Texture texture data
13092                 RowData if True, Texture data are packed in the byte stream
13093
13094             Returns:
13095                 return unique texture identifier
13096             """
13097             if not RowData: Texture = PackData(Texture)
13098             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13099             RaiseIfFailed("AddTexture", self.InsertOp)
13100             return ID
13101
13102         ## Transfer not topological data from one GEOM object to another.
13103         #
13104         #  @param theObjectFrom the source object of non-topological data
13105         #  @param theObjectTo the destination object of non-topological data
13106         #  @param theFindMethod method to search sub-shapes of theObjectFrom
13107         #         in shape theObjectTo. Possible values are: GEOM.FSM_GetInPlace,
13108         #         GEOM.FSM_GetInPlaceByHistory and GEOM.FSM_GetInPlace_Old.
13109         #         Other values of GEOM.find_shape_method are not supported.
13110         #
13111         #  @return True in case of success; False otherwise.
13112         #
13113         #  @ingroup l1_geomBuilder_auxiliary
13114         #
13115         #  @ref swig_TransferData "Example"
13116         @ManageTransactions("InsertOp")
13117         def TransferData(self, theObjectFrom, theObjectTo,
13118                          theFindMethod=GEOM.FSM_GetInPlace):
13119             """
13120             Transfer not topological data from one GEOM object to another.
13121
13122             Parameters:
13123                 theObjectFrom the source object of non-topological data
13124                 theObjectTo the destination object of non-topological data
13125                 theFindMethod method to search sub-shapes of theObjectFrom
13126                               in shape theObjectTo. Possible values are:
13127                               GEOM.FSM_GetInPlace, GEOM.FSM_GetInPlaceByHistory
13128                               and GEOM.FSM_GetInPlace_Old. Other values of
13129                               GEOM.find_shape_method are not supported.
13130
13131             Returns:
13132                 True in case of success; False otherwise.
13133
13134             # Example: see GEOM_TestOthers.py
13135             """
13136             # Example: see GEOM_TestAll.py
13137             isOk = self.InsertOp.TransferData(theObjectFrom,
13138                                                theObjectTo, theFindMethod)
13139             RaiseIfFailed("TransferData", self.InsertOp)
13140             return isOk
13141
13142         ## Creates a new folder object. It is a container for any GEOM objects.
13143         #  @param Name name of the container
13144         #  @param Father parent object. If None,
13145         #         folder under 'Geometry' root object will be created.
13146         #  @return a new created folder
13147         #  @ingroup l1_publish_data
13148         def NewFolder(self, Name, Father=None):
13149             """
13150             Create a new folder object. It is an auxiliary container for any GEOM objects.
13151
13152             Parameters:
13153                 Name name of the container
13154                 Father parent object. If None,
13155                 folder under 'Geometry' root object will be created.
13156
13157             Returns:
13158                 a new created folder
13159             """
13160             if not Father: Father = self.father
13161             return self.CreateFolder(Name, Father)
13162
13163         ## Move object to the specified folder
13164         #  @param Object object to move
13165         #  @param Folder target folder
13166         #  @ingroup l1_publish_data
13167         def PutToFolder(self, Object, Folder):
13168             """
13169             Move object to the specified folder
13170
13171             Parameters:
13172                 Object object to move
13173                 Folder target folder
13174             """
13175             self.MoveToFolder(Object, Folder)
13176             pass
13177
13178         ## Move list of objects to the specified folder
13179         #  @param ListOfSO list of objects to move
13180         #  @param Folder target folder
13181         #  @ingroup l1_publish_data
13182         def PutListToFolder(self, ListOfSO, Folder):
13183             """
13184             Move list of objects to the specified folder
13185
13186             Parameters:
13187                 ListOfSO list of objects to move
13188                 Folder target folder
13189             """
13190             self.MoveListToFolder(ListOfSO, Folder)
13191             pass
13192
13193         ## @addtogroup l2_field
13194         ## @{
13195
13196         ## Creates a field
13197         #  @param shape the shape the field lies on
13198         #  @param name the field name
13199         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13200         #  @param dimension dimension of the shape the field lies on
13201         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13202         #  @param componentNames names of components
13203         #  @return a created field
13204         @ManageTransactions("FieldOp")
13205         def CreateField(self, shape, name, type, dimension, componentNames):
13206             """
13207             Creates a field
13208
13209             Parameters:
13210                 shape the shape the field lies on
13211                 name  the field name
13212                 type  type of field data
13213                 dimension dimension of the shape the field lies on
13214                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13215                 componentNames names of components
13216
13217             Returns:
13218                 a created field
13219             """
13220             if isinstance( type, int ):
13221                 if type < 0 or type > 3:
13222                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13223                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13224
13225             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13226             RaiseIfFailed("CreateField", self.FieldOp)
13227             global geom
13228             geom._autoPublish( f, "", name)
13229             return f
13230
13231         ## Removes a field from the GEOM component
13232         #  @param field the field to remove
13233         def RemoveField(self, field):
13234             "Removes a field from the GEOM component"
13235             global geom
13236             if isinstance( field, GEOM._objref_GEOM_Field ):
13237                 geom.RemoveObject( field )
13238             elif isinstance( field, geomField ):
13239                 geom.RemoveObject( field.field )
13240             else:
13241                 raise RuntimeError, "RemoveField() : the object is not a field"
13242             return
13243
13244         ## Returns number of fields on a shape
13245         @ManageTransactions("FieldOp")
13246         def CountFields(self, shape):
13247             "Returns number of fields on a shape"
13248             nb = self.FieldOp.CountFields( shape )
13249             RaiseIfFailed("CountFields", self.FieldOp)
13250             return nb
13251
13252         ## Returns all fields on a shape
13253         @ManageTransactions("FieldOp")
13254         def GetFields(self, shape):
13255             "Returns all fields on a shape"
13256             ff = self.FieldOp.GetFields( shape )
13257             RaiseIfFailed("GetFields", self.FieldOp)
13258             return ff
13259
13260         ## Returns a field on a shape by its name
13261         @ManageTransactions("FieldOp")
13262         def GetField(self, shape, name):
13263             "Returns a field on a shape by its name"
13264             f = self.FieldOp.GetField( shape, name )
13265             RaiseIfFailed("GetField", self.FieldOp)
13266             return f
13267
13268         # end of l2_field
13269         ## @}
13270
13271
13272 import omniORB
13273 # Register the new proxy for GEOM_Gen
13274 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13275
13276
13277 ## Field on Geometry
13278 #  @ingroup l2_field
13279 class geomField( GEOM._objref_GEOM_Field ):
13280
13281     def __init__(self):
13282         GEOM._objref_GEOM_Field.__init__(self)
13283         self.field = GEOM._objref_GEOM_Field
13284         return
13285
13286     ## Returns the shape the field lies on
13287     def getShape(self):
13288         "Returns the shape the field lies on"
13289         return self.field.GetShape(self)
13290
13291     ## Returns the field name
13292     def getName(self):
13293         "Returns the field name"
13294         return self.field.GetName(self)
13295
13296     ## Returns type of field data as integer [0-3]
13297     def getType(self):
13298         "Returns type of field data"
13299         return self.field.GetDataType(self)._v
13300
13301     ## Returns type of field data:
13302     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13303     def getTypeEnum(self):
13304         "Returns type of field data"
13305         return self.field.GetDataType(self)
13306
13307     ## Returns dimension of the shape the field lies on:
13308     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13309     def getDimension(self):
13310         """Returns dimension of the shape the field lies on:
13311         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13312         return self.field.GetDimension(self)
13313
13314     ## Returns names of components
13315     def getComponents(self):
13316         "Returns names of components"
13317         return self.field.GetComponents(self)
13318
13319     ## Adds a time step to the field
13320     #  @param step the time step number further used as the step identifier
13321     #  @param stamp the time step time
13322     #  @param values the values of the time step
13323     def addStep(self, step, stamp, values):
13324         "Adds a time step to the field"
13325         stp = self.field.AddStep( self, step, stamp )
13326         if not stp:
13327             raise RuntimeError, \
13328                   "Field.addStep() : Error: step %s already exists in this field"%step
13329         global geom
13330         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13331         self.setValues( step, values )
13332         return stp
13333
13334     ## Remove a time step from the field
13335     def removeStep(self,step):
13336         "Remove a time step from the field"
13337         stepSO = None
13338         try:
13339             stepObj = self.field.GetStep( self, step )
13340             if stepObj:
13341                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13342         except:
13343             #import traceback
13344             #traceback.print_exc()
13345             pass
13346         self.field.RemoveStep( self, step )
13347         if stepSO:
13348             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13349         return
13350
13351     ## Returns number of time steps in the field
13352     def countSteps(self):
13353         "Returns number of time steps in the field"
13354         return self.field.CountSteps(self)
13355
13356     ## Returns a list of time step IDs in the field
13357     def getSteps(self):
13358         "Returns a list of time step IDs in the field"
13359         return self.field.GetSteps(self)
13360
13361     ## Returns a time step by its ID
13362     def getStep(self,step):
13363         "Returns a time step by its ID"
13364         stp = self.field.GetStep(self, step)
13365         if not stp:
13366             raise RuntimeError, "Step %s is missing from this field"%step
13367         return stp
13368
13369     ## Returns the time of the field step
13370     def getStamp(self,step):
13371         "Returns the time of the field step"
13372         return self.getStep(step).GetStamp()
13373
13374     ## Changes the time of the field step
13375     def setStamp(self, step, stamp):
13376         "Changes the time of the field step"
13377         return self.getStep(step).SetStamp(stamp)
13378
13379     ## Returns values of the field step
13380     def getValues(self, step):
13381         "Returns values of the field step"
13382         return self.getStep(step).GetValues()
13383
13384     ## Changes values of the field step
13385     def setValues(self, step, values):
13386         "Changes values of the field step"
13387         stp = self.getStep(step)
13388         errBeg = "Field.setValues(values) : Error: "
13389         try:
13390             ok = stp.SetValues( values )
13391         except Exception, e:
13392             excStr = str(e)
13393             if excStr.find("WrongPythonType") > 0:
13394                 raise RuntimeError, errBeg +\
13395                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13396             raise RuntimeError, errBeg + str(e)
13397         if not ok:
13398             nbOK = self.field.GetArraySize(self)
13399             nbKO = len(values)
13400             if nbOK != nbKO:
13401                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13402             else:
13403                 raise RuntimeError, errBeg + "failed"
13404         return
13405
13406     pass # end of class geomField
13407
13408 # Register the new proxy for GEOM_Field
13409 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13410
13411
13412 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13413 #  interface to GEOM operations.
13414 #
13415 #  Typical use is:
13416 #  \code
13417 #    import salome
13418 #    salome.salome_init()
13419 #    from salome.geom import geomBuilder
13420 #    geompy = geomBuilder.New(salome.myStudy)
13421 #  \endcode
13422 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13423 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13424 #  @return geomBuilder instance
13425 def New( study, instance=None):
13426     """
13427     Create a new geomBuilder instance.The geomBuilder class provides the Python
13428     interface to GEOM operations.
13429
13430     Typical use is:
13431         import salome
13432         salome.salome_init()
13433         from salome.geom import geomBuilder
13434         geompy = geomBuilder.New(salome.myStudy)
13435
13436     Parameters:
13437         study     SALOME study, generally obtained by salome.myStudy.
13438         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13439     Returns:
13440         geomBuilder instance
13441     """
13442     #print "New geomBuilder ", study, instance
13443     global engine
13444     global geom
13445     global doLcc
13446     engine = instance
13447     if engine is None:
13448       doLcc = True
13449     geom = geomBuilder()
13450     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13451     geom.init_geom(study)
13452     return geom
13453
13454
13455 # Register methods from the plug-ins in the geomBuilder class 
13456 plugins_var = os.environ.get( "GEOM_PluginsList" )
13457
13458 plugins = None
13459 if plugins_var is not None:
13460     plugins = plugins_var.split( ":" )
13461     plugins=filter(lambda x: len(x)>0, plugins)
13462 if plugins is not None:
13463     for pluginName in plugins:
13464         pluginBuilderName = pluginName + "Builder"
13465         try:
13466             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13467         except Exception, e:
13468             from salome_utils import verbose
13469             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13470             continue
13471         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13472         plugin = eval( pluginBuilderName )
13473         
13474         # add methods from plugin module to the geomBuilder class
13475         for k in dir( plugin ):
13476             if k[0] == '_': continue
13477             method = getattr( plugin, k )
13478             if type( method ).__name__ == 'function':
13479                 if not hasattr( geomBuilder, k ):
13480                     setattr( geomBuilder, k, method )
13481                 pass
13482             pass
13483         del pluginName
13484         pass
13485     pass