Salome HOME
0022745: [EDF] Improvement of Sewing operation
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Pack an argument into a list
521 def ToList( arg ):
522     if isinstance( arg, list ):
523         return arg
524     if hasattr( arg, "__getitem__" ):
525         return list( arg )
526     return [ arg ]
527
528 ## Information about closed/unclosed state of shell or wire
529 #  @ingroup l1_geomBuilder_auxiliary
530 class info:
531     """
532     Information about closed/unclosed state of shell or wire
533     """
534     UNKNOWN  = 0
535     CLOSED   = 1
536     UNCLOSED = 2
537
538 ## Private class used to bind calls of plugin operations to geomBuilder
539 class PluginOperation:
540   def __init__(self, operation, function):
541     self.operation = operation
542     self.function = function
543     pass
544
545   @ManageTransactions("operation")
546   def __call__(self, *args):
547     res = self.function(self.operation, *args)
548     RaiseIfFailed(self.function.__name__, self.operation)
549     return res
550
551 # Warning: geom is a singleton
552 geom = None
553 engine = None
554 doLcc = False
555 created = False
556
557 class geomBuilder(object, GEOM._objref_GEOM_Gen):
558
559         ## Enumeration ShapeType as a dictionary. \n
560         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
561         #  @ingroup l1_geomBuilder_auxiliary
562         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
563
564         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
565         #  and a list of parameters, describing the shape.
566         #  List of parameters, describing the shape:
567         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
568         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
569         #
570         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
571         #
572         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
573         #
574         #  - SPHERE:       [xc yc zc            R]
575         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
576         #  - BOX:          [xc yc zc                      ax ay az]
577         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
578         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
579         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
580         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
581         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
582         #
583         #  - SPHERE2D:     [xc yc zc            R]
584         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
585         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
586         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
587         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
588         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
589         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
590         #  - PLANE:        [xo yo zo  dx dy dz]
591         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
592         #  - FACE:                                       [nb_edges  nb_vertices]
593         #
594         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
595         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
596         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
597         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
598         #  - LINE:         [xo yo zo  dx dy dz]
599         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
600         #  - EDGE:                                                 [nb_vertices]
601         #
602         #  - VERTEX:       [x  y  z]
603         #  @ingroup l1_geomBuilder_auxiliary
604         kind = GEOM.GEOM_IKindOfShape
605
606         def __new__(cls):
607             global engine
608             global geom
609             global doLcc
610             global created
611             #print "==== __new__ ", engine, geom, doLcc, created
612             if geom is None:
613                 # geom engine is either retrieved from engine, or created
614                 geom = engine
615                 # Following test avoids a recursive loop
616                 if doLcc:
617                     if geom is not None:
618                         # geom engine not created: existing engine found
619                         doLcc = False
620                     if doLcc and not created:
621                         doLcc = False
622                         # FindOrLoadComponent called:
623                         # 1. CORBA resolution of server
624                         # 2. the __new__ method is called again
625                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
626                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
627                         #print "====1 ",geom
628                 else:
629                     # FindOrLoadComponent not called
630                     if geom is None:
631                         # geomBuilder instance is created from lcc.FindOrLoadComponent
632                         #print "==== super ", engine, geom, doLcc, created
633                         geom = super(geomBuilder,cls).__new__(cls)
634                         #print "====2 ",geom
635                     else:
636                         # geom engine not created: existing engine found
637                         #print "==== existing ", engine, geom, doLcc, created
638                         pass
639                 #print "return geom 1 ", geom
640                 return geom
641
642             #print "return geom 2 ", geom
643             return geom
644
645         def __init__(self):
646             global created
647             #print "-------- geomBuilder __init__ --- ", created, self
648             if not created:
649               created = True
650               GEOM._objref_GEOM_Gen.__init__(self)
651               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
652               self.myBuilder = None
653               self.myStudyId = 0
654               self.father    = None
655
656               self.BasicOp  = None
657               self.CurvesOp = None
658               self.PrimOp   = None
659               self.ShapesOp = None
660               self.HealOp   = None
661               self.InsertOp = None
662               self.BoolOp   = None
663               self.TrsfOp   = None
664               self.LocalOp  = None
665               self.MeasuOp  = None
666               self.BlocksOp = None
667               self.GroupOp  = None
668               self.FieldOp  = None
669             pass
670
671         ## Process object publication in the study, as follows:
672         #  - if @a theName is specified (not None), the object is published in the study
673         #    with this name, not taking into account "auto-publishing" option;
674         #  - if @a theName is NOT specified, the object is published in the study
675         #    (using default name, which can be customized using @a theDefaultName parameter)
676         #    only if auto-publishing is switched on.
677         #
678         #  @param theObj  object, a subject for publishing
679         #  @param theName object name for study
680         #  @param theDefaultName default name for the auto-publishing
681         #
682         #  @sa addToStudyAuto()
683         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
684             # ---
685             def _item_name(_names, _defname, _idx=-1):
686                 if not _names: _names = _defname
687                 if type(_names) in [types.ListType, types.TupleType]:
688                     if _idx >= 0:
689                         if _idx >= len(_names) or not _names[_idx]:
690                             if type(_defname) not in [types.ListType, types.TupleType]:
691                                 _name = "%s_%d"%(_defname, _idx+1)
692                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
693                                 _name = _defname[_idx]
694                             else:
695                                 _name = "%noname_%d"%(dn, _idx+1)
696                             pass
697                         else:
698                             _name = _names[_idx]
699                         pass
700                     else:
701                         # must be wrong  usage
702                         _name = _names[0]
703                     pass
704                 else:
705                     if _idx >= 0:
706                         _name = "%s_%d"%(_names, _idx+1)
707                     else:
708                         _name = _names
709                     pass
710                 return _name
711             # ---
712             def _publish( _name, _obj ):
713                 fatherObj = None
714                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
715                     fatherObj = _obj.GetShape()
716                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
717                     fatherObj = _obj.GetField()
718                 elif not _obj.IsMainShape():
719                     fatherObj = _obj.GetMainShape()
720                     pass
721                 if fatherObj and fatherObj.GetStudyEntry():
722                     self.addToStudyInFather(fatherObj, _obj, _name)
723                 else:
724                     self.addToStudy(_obj, _name)
725                     pass
726                 return
727             # ---
728             if not theObj:
729                 return # null object
730             if not theName and not self.myMaxNbSubShapesAllowed:
731                 return # nothing to do: auto-publishing is disabled
732             if not theName and not theDefaultName:
733                 return # neither theName nor theDefaultName is given
734             import types
735             if type(theObj) in [types.ListType, types.TupleType]:
736                 # list of objects is being published
737                 idx = 0
738                 for obj in theObj:
739                     if not obj: continue # bad object
740                     name = _item_name(theName, theDefaultName, idx)
741                     _publish( name, obj )
742                     idx = idx+1
743                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
744                     pass
745                 pass
746             else:
747                 # single object is published
748                 name = _item_name(theName, theDefaultName)
749                 _publish( name, theObj )
750             pass
751
752         ## @addtogroup l1_geomBuilder_auxiliary
753         ## @{
754         def init_geom(self,theStudy):
755             self.myStudy = theStudy
756             self.myStudyId = self.myStudy._get_StudyId()
757             self.myBuilder = self.myStudy.NewBuilder()
758             self.father = self.myStudy.FindComponent("GEOM")
759             notebook.myStudy = theStudy
760             if self.father is None:
761                 self.father = self.myBuilder.NewComponent("GEOM")
762                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
763                 FName = A1._narrow(SALOMEDS.AttributeName)
764                 FName.SetValue("Geometry")
765                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
766                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
767                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
768                 self.myBuilder.DefineComponentInstance(self.father,self)
769                 pass
770             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
771             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
772             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
773             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
774             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
775             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
776             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
777             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
778             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
779             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
780             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
781             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
782             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
783
784             # set GEOM as root in the use case tree
785             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
786             self.myUseCaseBuilder.SetRootCurrent()
787             self.myUseCaseBuilder.Append(self.father)
788             pass
789
790         def GetPluginOperations(self, studyID, libraryName):
791             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
792             return op
793
794         ## Enable / disable results auto-publishing
795         #
796         #  The automatic publishing is managed in the following way:
797         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
798         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
799         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
800         #  value passed as parameter has the same effect.
801         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
802         #  maximum number of sub-shapes allowed for publishing is set to specified value.
803         #
804         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
805         #  @ingroup l1_publish_data
806         def addToStudyAuto(self, maxNbSubShapes=-1):
807             """
808             Enable / disable results auto-publishing
809
810             The automatic publishing is managed in the following way:
811             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
812             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
813             maximum number of sub-shapes allowed for publishing is unlimited; any negative
814             value passed as parameter has the same effect.
815             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
816             maximum number of sub-shapes allowed for publishing is set to this value.
817
818             Parameters:
819                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
820
821             Example of usage:
822                 geompy.addToStudyAuto()   # enable auto-publishing
823                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
824                 geompy.addToStudyAuto(0)  # disable auto-publishing
825             """
826             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
827             pass
828
829         ## Dump component to the Python script
830         #  This method overrides IDL function to allow default values for the parameters.
831         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
832             """
833             Dump component to the Python script
834             This method overrides IDL function to allow default values for the parameters.
835             """
836             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
837
838         ## Get name for sub-shape aSubObj of shape aMainObj
839         #
840         # @ref swig_SubShapeName "Example"
841         @ManageTransactions("ShapesOp")
842         def SubShapeName(self,aSubObj, aMainObj):
843             """
844             Get name for sub-shape aSubObj of shape aMainObj
845             """
846             # Example: see GEOM_TestAll.py
847
848             #aSubId  = orb.object_to_string(aSubObj)
849             #aMainId = orb.object_to_string(aMainObj)
850             #index = gg.getIndexTopology(aSubId, aMainId)
851             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
852             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
853             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
854             return name
855
856         ## Publish in study aShape with name aName
857         #
858         #  \param aShape the shape to be published
859         #  \param aName  the name for the shape
860         #  \param doRestoreSubShapes if True, finds and publishes also
861         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
862         #         and published sub-shapes of arguments
863         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
864         #                                                  these arguments description
865         #  \return study entry of the published shape in form of string
866         #
867         #  @ingroup l1_publish_data
868         #  @ref swig_all_addtostudy "Example"
869         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
870                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
871             """
872             Publish in study aShape with name aName
873
874             Parameters:
875                 aShape the shape to be published
876                 aName  the name for the shape
877                 doRestoreSubShapes if True, finds and publishes also
878                                    sub-shapes of aShape, corresponding to its arguments
879                                    and published sub-shapes of arguments
880                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
881                                                          these arguments description
882
883             Returns:
884                 study entry of the published shape in form of string
885
886             Example of usage:
887                 id_block1 = geompy.addToStudy(Block1, "Block 1")
888             """
889             # Example: see GEOM_TestAll.py
890             try:
891                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
892                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
893                 if doRestoreSubShapes:
894                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
895                                             theFindMethod, theInheritFirstArg, True )
896             except:
897                 print "addToStudy() failed"
898                 return ""
899             return aShape.GetStudyEntry()
900
901         ## Publish in study aShape with name aName as sub-object of previously published aFather
902         #  \param aFather previously published object
903         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
904         #  \param aName  the name for the shape
905         #
906         #  \return study entry of the published shape in form of string
907         #
908         #  @ingroup l1_publish_data
909         #  @ref swig_all_addtostudyInFather "Example"
910         def addToStudyInFather(self, aFather, aShape, aName):
911             """
912             Publish in study aShape with name aName as sub-object of previously published aFather
913
914             Parameters:
915                 aFather previously published object
916                 aShape the shape to be published as sub-object of aFather
917                 aName  the name for the shape
918
919             Returns:
920                 study entry of the published shape in form of string
921             """
922             # Example: see GEOM_TestAll.py
923             try:
924                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
925                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
926             except:
927                 print "addToStudyInFather() failed"
928                 return ""
929             return aShape.GetStudyEntry()
930
931         ## Unpublish object in study
932         #
933         #  \param obj the object to be unpublished
934         def hideInStudy(self, obj):
935             """
936             Unpublish object in study
937
938             Parameters:
939                 obj the object to be unpublished
940             """
941             ior = salome.orb.object_to_string(obj)
942             aSObject = self.myStudy.FindObjectIOR(ior)
943             if aSObject is not None:
944                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
945                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
946                 drwAttribute.SetDrawable(False)
947                 # hide references if any
948                 vso = self.myStudy.FindDependances(aSObject);
949                 for refObj in vso :
950                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
951                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
952                     drwAttribute.SetDrawable(False)
953                     pass
954                 pass
955
956         # end of l1_geomBuilder_auxiliary
957         ## @}
958
959         ## @addtogroup l3_restore_ss
960         ## @{
961
962         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
963         #  To be used from python scripts out of addToStudy() (non-default usage)
964         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
965         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
966         #                   If this list is empty, all operation arguments will be published
967         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
968         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
969         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
970         #                            Do not publish sub-shapes in place of arguments, but only
971         #                            in place of sub-shapes of the first argument,
972         #                            because the whole shape corresponds to the first argument.
973         #                            Mainly to be used after transformations, but it also can be
974         #                            usefull after partition with one object shape, and some other
975         #                            operations, where only the first argument has to be considered.
976         #                            If theObject has only one argument shape, this flag is automatically
977         #                            considered as True, not regarding really passed value.
978         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
979         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
980         #  \return list of published sub-shapes
981         #
982         #  @ref tui_restore_prs_params "Example"
983         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
984                               theInheritFirstArg=False, theAddPrefix=True):
985             """
986             Publish sub-shapes, standing for arguments and sub-shapes of arguments
987             To be used from python scripts out of geompy.addToStudy (non-default usage)
988
989             Parameters:
990                 theObject published GEOM.GEOM_Object, arguments of which will be published
991                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
992                           If this list is empty, all operation arguments will be published
993                 theFindMethod method to search sub-shapes, corresponding to arguments and
994                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
995                 theInheritFirstArg set properties of the first argument for theObject.
996                                    Do not publish sub-shapes in place of arguments, but only
997                                    in place of sub-shapes of the first argument,
998                                    because the whole shape corresponds to the first argument.
999                                    Mainly to be used after transformations, but it also can be
1000                                    usefull after partition with one object shape, and some other
1001                                    operations, where only the first argument has to be considered.
1002                                    If theObject has only one argument shape, this flag is automatically
1003                                    considered as True, not regarding really passed value.
1004                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1005                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1006             Returns:
1007                 list of published sub-shapes
1008             """
1009             # Example: see GEOM_TestAll.py
1010             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1011                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1012
1013         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1014         #  To be used from python scripts out of addToStudy() (non-default usage)
1015         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1016         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1017         #                   If this list is empty, all operation arguments will be published
1018         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1019         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1020         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1021         #                            Do not publish sub-shapes in place of arguments, but only
1022         #                            in place of sub-shapes of the first argument,
1023         #                            because the whole shape corresponds to the first argument.
1024         #                            Mainly to be used after transformations, but it also can be
1025         #                            usefull after partition with one object shape, and some other
1026         #                            operations, where only the first argument has to be considered.
1027         #                            If theObject has only one argument shape, this flag is automatically
1028         #                            considered as True, not regarding really passed value.
1029         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1030         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1031         #  \return list of published sub-shapes
1032         #
1033         #  @ref tui_restore_prs_params "Example"
1034         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1035                                    theInheritFirstArg=False, theAddPrefix=True):
1036             """
1037             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1038             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1039
1040             Parameters:
1041                 theObject published GEOM.GEOM_Object, arguments of which will be published
1042                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1043                           If this list is empty, all operation arguments will be published
1044                 theFindMethod method to search sub-shapes, corresponding to arguments and
1045                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1046                 theInheritFirstArg set properties of the first argument for theObject.
1047                                    Do not publish sub-shapes in place of arguments, but only
1048                                    in place of sub-shapes of the first argument,
1049                                    because the whole shape corresponds to the first argument.
1050                                    Mainly to be used after transformations, but it also can be
1051                                    usefull after partition with one object shape, and some other
1052                                    operations, where only the first argument has to be considered.
1053                                    If theObject has only one argument shape, this flag is automatically
1054                                    considered as True, not regarding really passed value.
1055                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1056                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1057
1058             Returns:
1059                 list of published sub-shapes
1060             """
1061             # Example: see GEOM_TestAll.py
1062             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1063                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1064
1065         # end of l3_restore_ss
1066         ## @}
1067
1068         ## @addtogroup l3_basic_go
1069         ## @{
1070
1071         ## Create point by three coordinates.
1072         #  @param theX The X coordinate of the point.
1073         #  @param theY The Y coordinate of the point.
1074         #  @param theZ The Z coordinate of the point.
1075         #  @param theName Object name; when specified, this parameter is used
1076         #         for result publication in the study. Otherwise, if automatic
1077         #         publication is switched on, default value is used for result name.
1078         #
1079         #  @return New GEOM.GEOM_Object, containing the created point.
1080         #
1081         #  @ref tui_creation_point "Example"
1082         @ManageTransactions("BasicOp")
1083         def MakeVertex(self, theX, theY, theZ, theName=None):
1084             """
1085             Create point by three coordinates.
1086
1087             Parameters:
1088                 theX The X coordinate of the point.
1089                 theY The Y coordinate of the point.
1090                 theZ The Z coordinate of the point.
1091                 theName Object name; when specified, this parameter is used
1092                         for result publication in the study. Otherwise, if automatic
1093                         publication is switched on, default value is used for result name.
1094
1095             Returns:
1096                 New GEOM.GEOM_Object, containing the created point.
1097             """
1098             # Example: see GEOM_TestAll.py
1099             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1100             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1101             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1102             anObj.SetParameters(Parameters)
1103             self._autoPublish(anObj, theName, "vertex")
1104             return anObj
1105
1106         ## Create a point, distant from the referenced point
1107         #  on the given distances along the coordinate axes.
1108         #  @param theReference The referenced point.
1109         #  @param theX Displacement from the referenced point along OX axis.
1110         #  @param theY Displacement from the referenced point along OY axis.
1111         #  @param theZ Displacement from the referenced point along OZ axis.
1112         #  @param theName Object name; when specified, this parameter is used
1113         #         for result publication in the study. Otherwise, if automatic
1114         #         publication is switched on, default value is used for result name.
1115         #
1116         #  @return New GEOM.GEOM_Object, containing the created point.
1117         #
1118         #  @ref tui_creation_point "Example"
1119         @ManageTransactions("BasicOp")
1120         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1121             """
1122             Create a point, distant from the referenced point
1123             on the given distances along the coordinate axes.
1124
1125             Parameters:
1126                 theReference The referenced point.
1127                 theX Displacement from the referenced point along OX axis.
1128                 theY Displacement from the referenced point along OY axis.
1129                 theZ Displacement from the referenced point along OZ axis.
1130                 theName Object name; when specified, this parameter is used
1131                         for result publication in the study. Otherwise, if automatic
1132                         publication is switched on, default value is used for result name.
1133
1134             Returns:
1135                 New GEOM.GEOM_Object, containing the created point.
1136             """
1137             # Example: see GEOM_TestAll.py
1138             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1139             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1140             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1141             anObj.SetParameters(Parameters)
1142             self._autoPublish(anObj, theName, "vertex")
1143             return anObj
1144
1145         ## Create a point, corresponding to the given parameter on the given curve.
1146         #  @param theRefCurve The referenced curve.
1147         #  @param theParameter Value of parameter on the referenced curve.
1148         #  @param theName Object name; when specified, this parameter is used
1149         #         for result publication in the study. Otherwise, if automatic
1150         #         publication is switched on, default value is used for result name.
1151         #
1152         #  @return New GEOM.GEOM_Object, containing the created point.
1153         #
1154         #  @ref tui_creation_point "Example"
1155         @ManageTransactions("BasicOp")
1156         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1157             """
1158             Create a point, corresponding to the given parameter on the given curve.
1159
1160             Parameters:
1161                 theRefCurve The referenced curve.
1162                 theParameter Value of parameter on the referenced curve.
1163                 theName Object name; when specified, this parameter is used
1164                         for result publication in the study. Otherwise, if automatic
1165                         publication is switched on, default value is used for result name.
1166
1167             Returns:
1168                 New GEOM.GEOM_Object, containing the created point.
1169
1170             Example of usage:
1171                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1172             """
1173             # Example: see GEOM_TestAll.py
1174             theParameter, Parameters = ParseParameters(theParameter)
1175             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1176             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1177             anObj.SetParameters(Parameters)
1178             self._autoPublish(anObj, theName, "vertex")
1179             return anObj
1180
1181         ## Create a point by projection give coordinates on the given curve
1182         #  @param theRefCurve The referenced curve.
1183         #  @param theX X-coordinate in 3D space
1184         #  @param theY Y-coordinate in 3D space
1185         #  @param theZ Z-coordinate in 3D space
1186         #  @param theName Object name; when specified, this parameter is used
1187         #         for result publication in the study. Otherwise, if automatic
1188         #         publication is switched on, default value is used for result name.
1189         #
1190         #  @return New GEOM.GEOM_Object, containing the created point.
1191         #
1192         #  @ref tui_creation_point "Example"
1193         @ManageTransactions("BasicOp")
1194         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1195             """
1196             Create a point by projection give coordinates on the given curve
1197
1198             Parameters:
1199                 theRefCurve The referenced curve.
1200                 theX X-coordinate in 3D space
1201                 theY Y-coordinate in 3D space
1202                 theZ Z-coordinate in 3D space
1203                 theName Object name; when specified, this parameter is used
1204                         for result publication in the study. Otherwise, if automatic
1205                         publication is switched on, default value is used for result name.
1206
1207             Returns:
1208                 New GEOM.GEOM_Object, containing the created point.
1209
1210             Example of usage:
1211                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1212             """
1213             # Example: see GEOM_TestAll.py
1214             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1215             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1216             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1217             anObj.SetParameters(Parameters)
1218             self._autoPublish(anObj, theName, "vertex")
1219             return anObj
1220
1221         ## Create a point, corresponding to the given length on the given curve.
1222         #  @param theRefCurve The referenced curve.
1223         #  @param theLength Length on the referenced curve. It can be negative.
1224         #  @param theStartPoint Point allowing to choose the direction for the calculation
1225         #                       of the length. If None, start from the first point of theRefCurve.
1226         #  @param theName Object name; when specified, this parameter is used
1227         #         for result publication in the study. Otherwise, if automatic
1228         #         publication is switched on, default value is used for result name.
1229         #
1230         #  @return New GEOM.GEOM_Object, containing the created point.
1231         #
1232         #  @ref tui_creation_point "Example"
1233         @ManageTransactions("BasicOp")
1234         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1235             """
1236             Create a point, corresponding to the given length on the given curve.
1237
1238             Parameters:
1239                 theRefCurve The referenced curve.
1240                 theLength Length on the referenced curve. It can be negative.
1241                 theStartPoint Point allowing to choose the direction for the calculation
1242                               of the length. If None, start from the first point of theRefCurve.
1243                 theName Object name; when specified, this parameter is used
1244                         for result publication in the study. Otherwise, if automatic
1245                         publication is switched on, default value is used for result name.
1246
1247             Returns:
1248                 New GEOM.GEOM_Object, containing the created point.
1249             """
1250             # Example: see GEOM_TestAll.py
1251             theLength, Parameters = ParseParameters(theLength)
1252             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1253             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1254             anObj.SetParameters(Parameters)
1255             self._autoPublish(anObj, theName, "vertex")
1256             return anObj
1257
1258         ## Create a point, corresponding to the given parameters on the
1259         #    given surface.
1260         #  @param theRefSurf The referenced surface.
1261         #  @param theUParameter Value of U-parameter on the referenced surface.
1262         #  @param theVParameter Value of V-parameter on the referenced surface.
1263         #  @param theName Object name; when specified, this parameter is used
1264         #         for result publication in the study. Otherwise, if automatic
1265         #         publication is switched on, default value is used for result name.
1266         #
1267         #  @return New GEOM.GEOM_Object, containing the created point.
1268         #
1269         #  @ref swig_MakeVertexOnSurface "Example"
1270         @ManageTransactions("BasicOp")
1271         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1272             """
1273             Create a point, corresponding to the given parameters on the
1274             given surface.
1275
1276             Parameters:
1277                 theRefSurf The referenced surface.
1278                 theUParameter Value of U-parameter on the referenced surface.
1279                 theVParameter Value of V-parameter on the referenced surface.
1280                 theName Object name; when specified, this parameter is used
1281                         for result publication in the study. Otherwise, if automatic
1282                         publication is switched on, default value is used for result name.
1283
1284             Returns:
1285                 New GEOM.GEOM_Object, containing the created point.
1286
1287             Example of usage:
1288                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1289             """
1290             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1291             # Example: see GEOM_TestAll.py
1292             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1293             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1294             anObj.SetParameters(Parameters);
1295             self._autoPublish(anObj, theName, "vertex")
1296             return anObj
1297
1298         ## Create a point by projection give coordinates on the given surface
1299         #  @param theRefSurf The referenced surface.
1300         #  @param theX X-coordinate in 3D space
1301         #  @param theY Y-coordinate in 3D space
1302         #  @param theZ Z-coordinate in 3D space
1303         #  @param theName Object name; when specified, this parameter is used
1304         #         for result publication in the study. Otherwise, if automatic
1305         #         publication is switched on, default value is used for result name.
1306         #
1307         #  @return New GEOM.GEOM_Object, containing the created point.
1308         #
1309         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1310         @ManageTransactions("BasicOp")
1311         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1312             """
1313             Create a point by projection give coordinates on the given surface
1314
1315             Parameters:
1316                 theRefSurf The referenced surface.
1317                 theX X-coordinate in 3D space
1318                 theY Y-coordinate in 3D space
1319                 theZ Z-coordinate in 3D space
1320                 theName Object name; when specified, this parameter is used
1321                         for result publication in the study. Otherwise, if automatic
1322                         publication is switched on, default value is used for result name.
1323
1324             Returns:
1325                 New GEOM.GEOM_Object, containing the created point.
1326
1327             Example of usage:
1328                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1329             """
1330             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1331             # Example: see GEOM_TestAll.py
1332             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1333             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1334             anObj.SetParameters(Parameters);
1335             self._autoPublish(anObj, theName, "vertex")
1336             return anObj
1337
1338         ## Create a point, which lays on the given face.
1339         #  The point will lay in arbitrary place of the face.
1340         #  The only condition on it is a non-zero distance to the face boundary.
1341         #  Such point can be used to uniquely identify the face inside any
1342         #  shape in case, when the shape does not contain overlapped faces.
1343         #  @param theFace The referenced face.
1344         #  @param theName Object name; when specified, this parameter is used
1345         #         for result publication in the study. Otherwise, if automatic
1346         #         publication is switched on, default value is used for result name.
1347         #
1348         #  @return New GEOM.GEOM_Object, containing the created point.
1349         #
1350         #  @ref swig_MakeVertexInsideFace "Example"
1351         @ManageTransactions("BasicOp")
1352         def MakeVertexInsideFace (self, theFace, theName=None):
1353             """
1354             Create a point, which lays on the given face.
1355             The point will lay in arbitrary place of the face.
1356             The only condition on it is a non-zero distance to the face boundary.
1357             Such point can be used to uniquely identify the face inside any
1358             shape in case, when the shape does not contain overlapped faces.
1359
1360             Parameters:
1361                 theFace The referenced face.
1362                 theName Object name; when specified, this parameter is used
1363                         for result publication in the study. Otherwise, if automatic
1364                         publication is switched on, default value is used for result name.
1365
1366             Returns:
1367                 New GEOM.GEOM_Object, containing the created point.
1368
1369             Example of usage:
1370                 p_on_face = geompy.MakeVertexInsideFace(Face)
1371             """
1372             # Example: see GEOM_TestAll.py
1373             anObj = self.BasicOp.MakePointOnFace(theFace)
1374             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1375             self._autoPublish(anObj, theName, "vertex")
1376             return anObj
1377
1378         ## Create a point on intersection of two lines.
1379         #  @param theRefLine1, theRefLine2 The referenced lines.
1380         #  @param theName Object name; when specified, this parameter is used
1381         #         for result publication in the study. Otherwise, if automatic
1382         #         publication is switched on, default value is used for result name.
1383         #
1384         #  @return New GEOM.GEOM_Object, containing the created point.
1385         #
1386         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1387         @ManageTransactions("BasicOp")
1388         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1389             """
1390             Create a point on intersection of two lines.
1391
1392             Parameters:
1393                 theRefLine1, theRefLine2 The referenced lines.
1394                 theName Object name; when specified, this parameter is used
1395                         for result publication in the study. Otherwise, if automatic
1396                         publication is switched on, default value is used for result name.
1397
1398             Returns:
1399                 New GEOM.GEOM_Object, containing the created point.
1400             """
1401             # Example: see GEOM_TestAll.py
1402             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1403             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1404             self._autoPublish(anObj, theName, "vertex")
1405             return anObj
1406
1407         ## Create a tangent, corresponding to the given parameter on the given curve.
1408         #  @param theRefCurve The referenced curve.
1409         #  @param theParameter Value of parameter on the referenced curve.
1410         #  @param theName Object name; when specified, this parameter is used
1411         #         for result publication in the study. Otherwise, if automatic
1412         #         publication is switched on, default value is used for result name.
1413         #
1414         #  @return New GEOM.GEOM_Object, containing the created tangent.
1415         #
1416         #  @ref swig_MakeTangentOnCurve "Example"
1417         @ManageTransactions("BasicOp")
1418         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1419             """
1420             Create a tangent, corresponding to the given parameter on the given curve.
1421
1422             Parameters:
1423                 theRefCurve The referenced curve.
1424                 theParameter Value of parameter on the referenced curve.
1425                 theName Object name; when specified, this parameter is used
1426                         for result publication in the study. Otherwise, if automatic
1427                         publication is switched on, default value is used for result name.
1428
1429             Returns:
1430                 New GEOM.GEOM_Object, containing the created tangent.
1431
1432             Example of usage:
1433                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1434             """
1435             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1436             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1437             self._autoPublish(anObj, theName, "tangent")
1438             return anObj
1439
1440         ## Create a tangent plane, corresponding to the given parameter on the given face.
1441         #  @param theFace The face for which tangent plane should be built.
1442         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1443         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1444         #  @param theTrimSize the size of plane.
1445         #  @param theName Object name; when specified, this parameter is used
1446         #         for result publication in the study. Otherwise, if automatic
1447         #         publication is switched on, default value is used for result name.
1448         #
1449         #  @return New GEOM.GEOM_Object, containing the created tangent.
1450         #
1451         #  @ref swig_MakeTangentPlaneOnFace "Example"
1452         @ManageTransactions("BasicOp")
1453         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1454             """
1455             Create a tangent plane, corresponding to the given parameter on the given face.
1456
1457             Parameters:
1458                 theFace The face for which tangent plane should be built.
1459                 theParameterV vertical value of the center point (0.0 - 1.0).
1460                 theParameterU horisontal value of the center point (0.0 - 1.0).
1461                 theTrimSize the size of plane.
1462                 theName Object name; when specified, this parameter is used
1463                         for result publication in the study. Otherwise, if automatic
1464                         publication is switched on, default value is used for result name.
1465
1466            Returns:
1467                 New GEOM.GEOM_Object, containing the created tangent.
1468
1469            Example of usage:
1470                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1471             """
1472             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1473             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1474             self._autoPublish(anObj, theName, "tangent")
1475             return anObj
1476
1477         ## Create a vector with the given components.
1478         #  @param theDX X component of the vector.
1479         #  @param theDY Y component of the vector.
1480         #  @param theDZ Z component of the vector.
1481         #  @param theName Object name; when specified, this parameter is used
1482         #         for result publication in the study. Otherwise, if automatic
1483         #         publication is switched on, default value is used for result name.
1484         #
1485         #  @return New GEOM.GEOM_Object, containing the created vector.
1486         #
1487         #  @ref tui_creation_vector "Example"
1488         @ManageTransactions("BasicOp")
1489         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1490             """
1491             Create a vector with the given components.
1492
1493             Parameters:
1494                 theDX X component of the vector.
1495                 theDY Y component of the vector.
1496                 theDZ Z component of the vector.
1497                 theName Object name; when specified, this parameter is used
1498                         for result publication in the study. Otherwise, if automatic
1499                         publication is switched on, default value is used for result name.
1500
1501             Returns:
1502                 New GEOM.GEOM_Object, containing the created vector.
1503             """
1504             # Example: see GEOM_TestAll.py
1505             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1506             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1507             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1508             anObj.SetParameters(Parameters)
1509             self._autoPublish(anObj, theName, "vector")
1510             return anObj
1511
1512         ## Create a vector between two points.
1513         #  @param thePnt1 Start point for the vector.
1514         #  @param thePnt2 End point for the vector.
1515         #  @param theName Object name; when specified, this parameter is used
1516         #         for result publication in the study. Otherwise, if automatic
1517         #         publication is switched on, default value is used for result name.
1518         #
1519         #  @return New GEOM.GEOM_Object, containing the created vector.
1520         #
1521         #  @ref tui_creation_vector "Example"
1522         @ManageTransactions("BasicOp")
1523         def MakeVector(self, thePnt1, thePnt2, theName=None):
1524             """
1525             Create a vector between two points.
1526
1527             Parameters:
1528                 thePnt1 Start point for the vector.
1529                 thePnt2 End point for the vector.
1530                 theName Object name; when specified, this parameter is used
1531                         for result publication in the study. Otherwise, if automatic
1532                         publication is switched on, default value is used for result name.
1533
1534             Returns:
1535                 New GEOM.GEOM_Object, containing the created vector.
1536             """
1537             # Example: see GEOM_TestAll.py
1538             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1539             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1540             self._autoPublish(anObj, theName, "vector")
1541             return anObj
1542
1543         ## Create a line, passing through the given point
1544         #  and parrallel to the given direction
1545         #  @param thePnt Point. The resulting line will pass through it.
1546         #  @param theDir Direction. The resulting line will be parallel to it.
1547         #  @param theName Object name; when specified, this parameter is used
1548         #         for result publication in the study. Otherwise, if automatic
1549         #         publication is switched on, default value is used for result name.
1550         #
1551         #  @return New GEOM.GEOM_Object, containing the created line.
1552         #
1553         #  @ref tui_creation_line "Example"
1554         @ManageTransactions("BasicOp")
1555         def MakeLine(self, thePnt, theDir, theName=None):
1556             """
1557             Create a line, passing through the given point
1558             and parrallel to the given direction
1559
1560             Parameters:
1561                 thePnt Point. The resulting line will pass through it.
1562                 theDir Direction. The resulting line will be parallel to it.
1563                 theName Object name; when specified, this parameter is used
1564                         for result publication in the study. Otherwise, if automatic
1565                         publication is switched on, default value is used for result name.
1566
1567             Returns:
1568                 New GEOM.GEOM_Object, containing the created line.
1569             """
1570             # Example: see GEOM_TestAll.py
1571             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1572             RaiseIfFailed("MakeLine", self.BasicOp)
1573             self._autoPublish(anObj, theName, "line")
1574             return anObj
1575
1576         ## Create a line, passing through the given points
1577         #  @param thePnt1 First of two points, defining the line.
1578         #  @param thePnt2 Second of two points, defining the line.
1579         #  @param theName Object name; when specified, this parameter is used
1580         #         for result publication in the study. Otherwise, if automatic
1581         #         publication is switched on, default value is used for result name.
1582         #
1583         #  @return New GEOM.GEOM_Object, containing the created line.
1584         #
1585         #  @ref tui_creation_line "Example"
1586         @ManageTransactions("BasicOp")
1587         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1588             """
1589             Create a line, passing through the given points
1590
1591             Parameters:
1592                 thePnt1 First of two points, defining the line.
1593                 thePnt2 Second of two points, defining the line.
1594                 theName Object name; when specified, this parameter is used
1595                         for result publication in the study. Otherwise, if automatic
1596                         publication is switched on, default value is used for result name.
1597
1598             Returns:
1599                 New GEOM.GEOM_Object, containing the created line.
1600             """
1601             # Example: see GEOM_TestAll.py
1602             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1603             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1604             self._autoPublish(anObj, theName, "line")
1605             return anObj
1606
1607         ## Create a line on two faces intersection.
1608         #  @param theFace1 First of two faces, defining the line.
1609         #  @param theFace2 Second of two faces, defining the line.
1610         #  @param theName Object name; when specified, this parameter is used
1611         #         for result publication in the study. Otherwise, if automatic
1612         #         publication is switched on, default value is used for result name.
1613         #
1614         #  @return New GEOM.GEOM_Object, containing the created line.
1615         #
1616         #  @ref swig_MakeLineTwoFaces "Example"
1617         @ManageTransactions("BasicOp")
1618         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1619             """
1620             Create a line on two faces intersection.
1621
1622             Parameters:
1623                 theFace1 First of two faces, defining the line.
1624                 theFace2 Second of two faces, defining the line.
1625                 theName Object name; when specified, this parameter is used
1626                         for result publication in the study. Otherwise, if automatic
1627                         publication is switched on, default value is used for result name.
1628
1629             Returns:
1630                 New GEOM.GEOM_Object, containing the created line.
1631             """
1632             # Example: see GEOM_TestAll.py
1633             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1634             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1635             self._autoPublish(anObj, theName, "line")
1636             return anObj
1637
1638         ## Create a plane, passing through the given point
1639         #  and normal to the given vector.
1640         #  @param thePnt Point, the plane has to pass through.
1641         #  @param theVec Vector, defining the plane normal direction.
1642         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1643         #  @param theName Object name; when specified, this parameter is used
1644         #         for result publication in the study. Otherwise, if automatic
1645         #         publication is switched on, default value is used for result name.
1646         #
1647         #  @return New GEOM.GEOM_Object, containing the created plane.
1648         #
1649         #  @ref tui_creation_plane "Example"
1650         @ManageTransactions("BasicOp")
1651         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1652             """
1653             Create a plane, passing through the given point
1654             and normal to the given vector.
1655
1656             Parameters:
1657                 thePnt Point, the plane has to pass through.
1658                 theVec Vector, defining the plane normal direction.
1659                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1660                 theName Object name; when specified, this parameter is used
1661                         for result publication in the study. Otherwise, if automatic
1662                         publication is switched on, default value is used for result name.
1663
1664             Returns:
1665                 New GEOM.GEOM_Object, containing the created plane.
1666             """
1667             # Example: see GEOM_TestAll.py
1668             theTrimSize, Parameters = ParseParameters(theTrimSize);
1669             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1670             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1671             anObj.SetParameters(Parameters)
1672             self._autoPublish(anObj, theName, "plane")
1673             return anObj
1674
1675         ## Create a plane, passing through the three given points
1676         #  @param thePnt1 First of three points, defining the plane.
1677         #  @param thePnt2 Second of three points, defining the plane.
1678         #  @param thePnt3 Fird of three points, defining the plane.
1679         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1680         #  @param theName Object name; when specified, this parameter is used
1681         #         for result publication in the study. Otherwise, if automatic
1682         #         publication is switched on, default value is used for result name.
1683         #
1684         #  @return New GEOM.GEOM_Object, containing the created plane.
1685         #
1686         #  @ref tui_creation_plane "Example"
1687         @ManageTransactions("BasicOp")
1688         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1689             """
1690             Create a plane, passing through the three given points
1691
1692             Parameters:
1693                 thePnt1 First of three points, defining the plane.
1694                 thePnt2 Second of three points, defining the plane.
1695                 thePnt3 Fird of three points, defining the plane.
1696                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1697                 theName Object name; when specified, this parameter is used
1698                         for result publication in the study. Otherwise, if automatic
1699                         publication is switched on, default value is used for result name.
1700
1701             Returns:
1702                 New GEOM.GEOM_Object, containing the created plane.
1703             """
1704             # Example: see GEOM_TestAll.py
1705             theTrimSize, Parameters = ParseParameters(theTrimSize);
1706             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1707             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1708             anObj.SetParameters(Parameters)
1709             self._autoPublish(anObj, theName, "plane")
1710             return anObj
1711
1712         ## Create a plane, similar to the existing one, but with another size of representing face.
1713         #  @param theFace Referenced plane or LCS(Marker).
1714         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1715         #  @param theName Object name; when specified, this parameter is used
1716         #         for result publication in the study. Otherwise, if automatic
1717         #         publication is switched on, default value is used for result name.
1718         #
1719         #  @return New GEOM.GEOM_Object, containing the created plane.
1720         #
1721         #  @ref tui_creation_plane "Example"
1722         @ManageTransactions("BasicOp")
1723         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1724             """
1725             Create a plane, similar to the existing one, but with another size of representing face.
1726
1727             Parameters:
1728                 theFace Referenced plane or LCS(Marker).
1729                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1730                 theName Object name; when specified, this parameter is used
1731                         for result publication in the study. Otherwise, if automatic
1732                         publication is switched on, default value is used for result name.
1733
1734             Returns:
1735                 New GEOM.GEOM_Object, containing the created plane.
1736             """
1737             # Example: see GEOM_TestAll.py
1738             theTrimSize, Parameters = ParseParameters(theTrimSize);
1739             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1740             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1741             anObj.SetParameters(Parameters)
1742             self._autoPublish(anObj, theName, "plane")
1743             return anObj
1744
1745         ## Create a plane, passing through the 2 vectors
1746         #  with center in a start point of the first vector.
1747         #  @param theVec1 Vector, defining center point and plane direction.
1748         #  @param theVec2 Vector, defining the plane normal direction.
1749         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1750         #  @param theName Object name; when specified, this parameter is used
1751         #         for result publication in the study. Otherwise, if automatic
1752         #         publication is switched on, default value is used for result name.
1753         #
1754         #  @return New GEOM.GEOM_Object, containing the created plane.
1755         #
1756         #  @ref tui_creation_plane "Example"
1757         @ManageTransactions("BasicOp")
1758         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1759             """
1760             Create a plane, passing through the 2 vectors
1761             with center in a start point of the first vector.
1762
1763             Parameters:
1764                 theVec1 Vector, defining center point and plane direction.
1765                 theVec2 Vector, defining the plane normal direction.
1766                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1767                 theName Object name; when specified, this parameter is used
1768                         for result publication in the study. Otherwise, if automatic
1769                         publication is switched on, default value is used for result name.
1770
1771             Returns:
1772                 New GEOM.GEOM_Object, containing the created plane.
1773             """
1774             # Example: see GEOM_TestAll.py
1775             theTrimSize, Parameters = ParseParameters(theTrimSize);
1776             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1777             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1778             anObj.SetParameters(Parameters)
1779             self._autoPublish(anObj, theName, "plane")
1780             return anObj
1781
1782         ## Create a plane, based on a Local coordinate system.
1783         #  @param theLCS  coordinate system, defining plane.
1784         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1785         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1786         #  @param theName Object name; when specified, this parameter is used
1787         #         for result publication in the study. Otherwise, if automatic
1788         #         publication is switched on, default value is used for result name.
1789         #
1790         #  @return New GEOM.GEOM_Object, containing the created plane.
1791         #
1792         #  @ref tui_creation_plane "Example"
1793         @ManageTransactions("BasicOp")
1794         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1795             """
1796             Create a plane, based on a Local coordinate system.
1797
1798            Parameters:
1799                 theLCS  coordinate system, defining plane.
1800                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1801                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1802                 theName Object name; when specified, this parameter is used
1803                         for result publication in the study. Otherwise, if automatic
1804                         publication is switched on, default value is used for result name.
1805
1806             Returns:
1807                 New GEOM.GEOM_Object, containing the created plane.
1808             """
1809             # Example: see GEOM_TestAll.py
1810             theTrimSize, Parameters = ParseParameters(theTrimSize);
1811             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1812             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1813             anObj.SetParameters(Parameters)
1814             self._autoPublish(anObj, theName, "plane")
1815             return anObj
1816
1817         ## Create a local coordinate system.
1818         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1819         #  @param XDX,XDY,XDZ Three components of OX direction
1820         #  @param YDX,YDY,YDZ Three components of OY direction
1821         #  @param theName Object name; when specified, this parameter is used
1822         #         for result publication in the study. Otherwise, if automatic
1823         #         publication is switched on, default value is used for result name.
1824         #
1825         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1826         #
1827         #  @ref swig_MakeMarker "Example"
1828         @ManageTransactions("BasicOp")
1829         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1830             """
1831             Create a local coordinate system.
1832
1833             Parameters:
1834                 OX,OY,OZ Three coordinates of coordinate system origin.
1835                 XDX,XDY,XDZ Three components of OX direction
1836                 YDX,YDY,YDZ Three components of OY direction
1837                 theName Object name; when specified, this parameter is used
1838                         for result publication in the study. Otherwise, if automatic
1839                         publication is switched on, default value is used for result name.
1840
1841             Returns:
1842                 New GEOM.GEOM_Object, containing the created coordinate system.
1843             """
1844             # Example: see GEOM_TestAll.py
1845             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1846             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1847             RaiseIfFailed("MakeMarker", self.BasicOp)
1848             anObj.SetParameters(Parameters)
1849             self._autoPublish(anObj, theName, "lcs")
1850             return anObj
1851
1852         ## Create a local coordinate system from shape.
1853         #  @param theShape The initial shape to detect the coordinate system.
1854         #  @param theName Object name; when specified, this parameter is used
1855         #         for result publication in the study. Otherwise, if automatic
1856         #         publication is switched on, default value is used for result name.
1857         #
1858         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1859         #
1860         #  @ref tui_creation_lcs "Example"
1861         @ManageTransactions("BasicOp")
1862         def MakeMarkerFromShape(self, theShape, theName=None):
1863             """
1864             Create a local coordinate system from shape.
1865
1866             Parameters:
1867                 theShape The initial shape to detect the coordinate system.
1868                 theName Object name; when specified, this parameter is used
1869                         for result publication in the study. Otherwise, if automatic
1870                         publication is switched on, default value is used for result name.
1871
1872             Returns:
1873                 New GEOM.GEOM_Object, containing the created coordinate system.
1874             """
1875             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1876             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1877             self._autoPublish(anObj, theName, "lcs")
1878             return anObj
1879
1880         ## Create a local coordinate system from point and two vectors.
1881         #  @param theOrigin Point of coordinate system origin.
1882         #  @param theXVec Vector of X direction
1883         #  @param theYVec Vector of Y direction
1884         #  @param theName Object name; when specified, this parameter is used
1885         #         for result publication in the study. Otherwise, if automatic
1886         #         publication is switched on, default value is used for result name.
1887         #
1888         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1889         #
1890         #  @ref tui_creation_lcs "Example"
1891         @ManageTransactions("BasicOp")
1892         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1893             """
1894             Create a local coordinate system from point and two vectors.
1895
1896             Parameters:
1897                 theOrigin Point of coordinate system origin.
1898                 theXVec Vector of X direction
1899                 theYVec Vector of Y direction
1900                 theName Object name; when specified, this parameter is used
1901                         for result publication in the study. Otherwise, if automatic
1902                         publication is switched on, default value is used for result name.
1903
1904             Returns:
1905                 New GEOM.GEOM_Object, containing the created coordinate system.
1906
1907             """
1908             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1909             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1910             self._autoPublish(anObj, theName, "lcs")
1911             return anObj
1912
1913         # end of l3_basic_go
1914         ## @}
1915
1916         ## @addtogroup l4_curves
1917         ## @{
1918
1919         ##  Create an arc of circle, passing through three given points.
1920         #  @param thePnt1 Start point of the arc.
1921         #  @param thePnt2 Middle point of the arc.
1922         #  @param thePnt3 End point of the arc.
1923         #  @param theName Object name; when specified, this parameter is used
1924         #         for result publication in the study. Otherwise, if automatic
1925         #         publication is switched on, default value is used for result name.
1926         #
1927         #  @return New GEOM.GEOM_Object, containing the created arc.
1928         #
1929         #  @ref swig_MakeArc "Example"
1930         @ManageTransactions("CurvesOp")
1931         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1932             """
1933             Create an arc of circle, passing through three given points.
1934
1935             Parameters:
1936                 thePnt1 Start point of the arc.
1937                 thePnt2 Middle point of the arc.
1938                 thePnt3 End point of the arc.
1939                 theName Object name; when specified, this parameter is used
1940                         for result publication in the study. Otherwise, if automatic
1941                         publication is switched on, default value is used for result name.
1942
1943             Returns:
1944                 New GEOM.GEOM_Object, containing the created arc.
1945             """
1946             # Example: see GEOM_TestAll.py
1947             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1948             RaiseIfFailed("MakeArc", self.CurvesOp)
1949             self._autoPublish(anObj, theName, "arc")
1950             return anObj
1951
1952         ##  Create an arc of circle from a center and 2 points.
1953         #  @param thePnt1 Center of the arc
1954         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1955         #  @param thePnt3 End point of the arc (Gives also a direction)
1956         #  @param theSense Orientation of the arc
1957         #  @param theName Object name; when specified, this parameter is used
1958         #         for result publication in the study. Otherwise, if automatic
1959         #         publication is switched on, default value is used for result name.
1960         #
1961         #  @return New GEOM.GEOM_Object, containing the created arc.
1962         #
1963         #  @ref swig_MakeArc "Example"
1964         @ManageTransactions("CurvesOp")
1965         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1966             """
1967             Create an arc of circle from a center and 2 points.
1968
1969             Parameters:
1970                 thePnt1 Center of the arc
1971                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1972                 thePnt3 End point of the arc (Gives also a direction)
1973                 theSense Orientation of the arc
1974                 theName Object name; when specified, this parameter is used
1975                         for result publication in the study. Otherwise, if automatic
1976                         publication is switched on, default value is used for result name.
1977
1978             Returns:
1979                 New GEOM.GEOM_Object, containing the created arc.
1980             """
1981             # Example: see GEOM_TestAll.py
1982             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1983             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1984             self._autoPublish(anObj, theName, "arc")
1985             return anObj
1986
1987         ##  Create an arc of ellipse, of center and two points.
1988         #  @param theCenter Center of the arc.
1989         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1990         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1991         #  @param theName Object name; when specified, this parameter is used
1992         #         for result publication in the study. Otherwise, if automatic
1993         #         publication is switched on, default value is used for result name.
1994         #
1995         #  @return New GEOM.GEOM_Object, containing the created arc.
1996         #
1997         #  @ref swig_MakeArc "Example"
1998         @ManageTransactions("CurvesOp")
1999         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2000             """
2001             Create an arc of ellipse, of center and two points.
2002
2003             Parameters:
2004                 theCenter Center of the arc.
2005                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2006                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2007                 theName Object name; when specified, this parameter is used
2008                         for result publication in the study. Otherwise, if automatic
2009                         publication is switched on, default value is used for result name.
2010
2011             Returns:
2012                 New GEOM.GEOM_Object, containing the created arc.
2013             """
2014             # Example: see GEOM_TestAll.py
2015             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2016             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2017             self._autoPublish(anObj, theName, "arc")
2018             return anObj
2019
2020         ## Create a circle with given center, normal vector and radius.
2021         #  @param thePnt Circle center.
2022         #  @param theVec Vector, normal to the plane of the circle.
2023         #  @param theR Circle radius.
2024         #  @param theName Object name; when specified, this parameter is used
2025         #         for result publication in the study. Otherwise, if automatic
2026         #         publication is switched on, default value is used for result name.
2027         #
2028         #  @return New GEOM.GEOM_Object, containing the created circle.
2029         #
2030         #  @ref tui_creation_circle "Example"
2031         @ManageTransactions("CurvesOp")
2032         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2033             """
2034             Create a circle with given center, normal vector and radius.
2035
2036             Parameters:
2037                 thePnt Circle center.
2038                 theVec Vector, normal to the plane of the circle.
2039                 theR Circle radius.
2040                 theName Object name; when specified, this parameter is used
2041                         for result publication in the study. Otherwise, if automatic
2042                         publication is switched on, default value is used for result name.
2043
2044             Returns:
2045                 New GEOM.GEOM_Object, containing the created circle.
2046             """
2047             # Example: see GEOM_TestAll.py
2048             theR, Parameters = ParseParameters(theR)
2049             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2050             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2051             anObj.SetParameters(Parameters)
2052             self._autoPublish(anObj, theName, "circle")
2053             return anObj
2054
2055         ## Create a circle with given radius.
2056         #  Center of the circle will be in the origin of global
2057         #  coordinate system and normal vector will be codirected with Z axis
2058         #  @param theR Circle radius.
2059         #  @param theName Object name; when specified, this parameter is used
2060         #         for result publication in the study. Otherwise, if automatic
2061         #         publication is switched on, default value is used for result name.
2062         #
2063         #  @return New GEOM.GEOM_Object, containing the created circle.
2064         @ManageTransactions("CurvesOp")
2065         def MakeCircleR(self, theR, theName=None):
2066             """
2067             Create a circle with given radius.
2068             Center of the circle will be in the origin of global
2069             coordinate system and normal vector will be codirected with Z axis
2070
2071             Parameters:
2072                 theR Circle radius.
2073                 theName Object name; when specified, this parameter is used
2074                         for result publication in the study. Otherwise, if automatic
2075                         publication is switched on, default value is used for result name.
2076
2077             Returns:
2078                 New GEOM.GEOM_Object, containing the created circle.
2079             """
2080             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2081             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2082             self._autoPublish(anObj, theName, "circle")
2083             return anObj
2084
2085         ## Create a circle, passing through three given points
2086         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2087         #  @param theName Object name; when specified, this parameter is used
2088         #         for result publication in the study. Otherwise, if automatic
2089         #         publication is switched on, default value is used for result name.
2090         #
2091         #  @return New GEOM.GEOM_Object, containing the created circle.
2092         #
2093         #  @ref tui_creation_circle "Example"
2094         @ManageTransactions("CurvesOp")
2095         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2096             """
2097             Create a circle, passing through three given points
2098
2099             Parameters:
2100                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2101                 theName Object name; when specified, this parameter is used
2102                         for result publication in the study. Otherwise, if automatic
2103                         publication is switched on, default value is used for result name.
2104
2105             Returns:
2106                 New GEOM.GEOM_Object, containing the created circle.
2107             """
2108             # Example: see GEOM_TestAll.py
2109             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2110             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2111             self._autoPublish(anObj, theName, "circle")
2112             return anObj
2113
2114         ## Create a circle, with given point1 as center,
2115         #  passing through the point2 as radius and laying in the plane,
2116         #  defined by all three given points.
2117         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2118         #  @param theName Object name; when specified, this parameter is used
2119         #         for result publication in the study. Otherwise, if automatic
2120         #         publication is switched on, default value is used for result name.
2121         #
2122         #  @return New GEOM.GEOM_Object, containing the created circle.
2123         #
2124         #  @ref swig_MakeCircle "Example"
2125         @ManageTransactions("CurvesOp")
2126         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2127             """
2128             Create a circle, with given point1 as center,
2129             passing through the point2 as radius and laying in the plane,
2130             defined by all three given points.
2131
2132             Parameters:
2133                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2134                 theName Object name; when specified, this parameter is used
2135                         for result publication in the study. Otherwise, if automatic
2136                         publication is switched on, default value is used for result name.
2137
2138             Returns:
2139                 New GEOM.GEOM_Object, containing the created circle.
2140             """
2141             # Example: see GEOM_example6.py
2142             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2143             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2144             self._autoPublish(anObj, theName, "circle")
2145             return anObj
2146
2147         ## Create an ellipse with given center, normal vector and radiuses.
2148         #  @param thePnt Ellipse center.
2149         #  @param theVec Vector, normal to the plane of the ellipse.
2150         #  @param theRMajor Major ellipse radius.
2151         #  @param theRMinor Minor ellipse radius.
2152         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2153         #  @param theName Object name; when specified, this parameter is used
2154         #         for result publication in the study. Otherwise, if automatic
2155         #         publication is switched on, default value is used for result name.
2156         #
2157         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2158         #
2159         #  @ref tui_creation_ellipse "Example"
2160         @ManageTransactions("CurvesOp")
2161         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2162             """
2163             Create an ellipse with given center, normal vector and radiuses.
2164
2165             Parameters:
2166                 thePnt Ellipse center.
2167                 theVec Vector, normal to the plane of the ellipse.
2168                 theRMajor Major ellipse radius.
2169                 theRMinor Minor ellipse radius.
2170                 theVecMaj Vector, direction of the ellipse's main axis.
2171                 theName Object name; when specified, this parameter is used
2172                         for result publication in the study. Otherwise, if automatic
2173                         publication is switched on, default value is used for result name.
2174
2175             Returns:
2176                 New GEOM.GEOM_Object, containing the created ellipse.
2177             """
2178             # Example: see GEOM_TestAll.py
2179             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2180             if theVecMaj is not None:
2181                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2182             else:
2183                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2184                 pass
2185             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2186             anObj.SetParameters(Parameters)
2187             self._autoPublish(anObj, theName, "ellipse")
2188             return anObj
2189
2190         ## Create an ellipse with given radiuses.
2191         #  Center of the ellipse will be in the origin of global
2192         #  coordinate system and normal vector will be codirected with Z axis
2193         #  @param theRMajor Major ellipse radius.
2194         #  @param theRMinor Minor ellipse radius.
2195         #  @param theName Object name; when specified, this parameter is used
2196         #         for result publication in the study. Otherwise, if automatic
2197         #         publication is switched on, default value is used for result name.
2198         #
2199         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2200         @ManageTransactions("CurvesOp")
2201         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2202             """
2203             Create an ellipse with given radiuses.
2204             Center of the ellipse will be in the origin of global
2205             coordinate system and normal vector will be codirected with Z axis
2206
2207             Parameters:
2208                 theRMajor Major ellipse radius.
2209                 theRMinor Minor ellipse radius.
2210                 theName Object name; when specified, this parameter is used
2211                         for result publication in the study. Otherwise, if automatic
2212                         publication is switched on, default value is used for result name.
2213
2214             Returns:
2215             New GEOM.GEOM_Object, containing the created ellipse.
2216             """
2217             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2218             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2219             self._autoPublish(anObj, theName, "ellipse")
2220             return anObj
2221
2222         ## Create a polyline on the set of points.
2223         #  @param thePoints Sequence of points for the polyline.
2224         #  @param theIsClosed If True, build a closed wire.
2225         #  @param theName Object name; when specified, this parameter is used
2226         #         for result publication in the study. Otherwise, if automatic
2227         #         publication is switched on, default value is used for result name.
2228         #
2229         #  @return New GEOM.GEOM_Object, containing the created polyline.
2230         #
2231         #  @ref tui_creation_curve "Example"
2232         @ManageTransactions("CurvesOp")
2233         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2234             """
2235             Create a polyline on the set of points.
2236
2237             Parameters:
2238                 thePoints Sequence of points for the polyline.
2239                 theIsClosed If True, build a closed wire.
2240                 theName Object name; when specified, this parameter is used
2241                         for result publication in the study. Otherwise, if automatic
2242                         publication is switched on, default value is used for result name.
2243
2244             Returns:
2245                 New GEOM.GEOM_Object, containing the created polyline.
2246             """
2247             # Example: see GEOM_TestAll.py
2248             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2249             RaiseIfFailed("MakePolyline", self.CurvesOp)
2250             self._autoPublish(anObj, theName, "polyline")
2251             return anObj
2252
2253         ## Create bezier curve on the set of points.
2254         #  @param thePoints Sequence of points for the bezier curve.
2255         #  @param theIsClosed If True, build a closed curve.
2256         #  @param theName Object name; when specified, this parameter is used
2257         #         for result publication in the study. Otherwise, if automatic
2258         #         publication is switched on, default value is used for result name.
2259         #
2260         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2261         #
2262         #  @ref tui_creation_curve "Example"
2263         @ManageTransactions("CurvesOp")
2264         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2265             """
2266             Create bezier curve on the set of points.
2267
2268             Parameters:
2269                 thePoints Sequence of points for the bezier curve.
2270                 theIsClosed If True, build a closed curve.
2271                 theName Object name; when specified, this parameter is used
2272                         for result publication in the study. Otherwise, if automatic
2273                         publication is switched on, default value is used for result name.
2274
2275             Returns:
2276                 New GEOM.GEOM_Object, containing the created bezier curve.
2277             """
2278             # Example: see GEOM_TestAll.py
2279             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2280             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2281             self._autoPublish(anObj, theName, "bezier")
2282             return anObj
2283
2284         ## Create B-Spline curve on the set of points.
2285         #  @param thePoints Sequence of points for the B-Spline curve.
2286         #  @param theIsClosed If True, build a closed curve.
2287         #  @param theDoReordering If TRUE, the algo does not follow the order of
2288         #                         \a thePoints but searches for the closest vertex.
2289         #  @param theName Object name; when specified, this parameter is used
2290         #         for result publication in the study. Otherwise, if automatic
2291         #         publication is switched on, default value is used for result name.
2292         #
2293         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2294         #
2295         #  @ref tui_creation_curve "Example"
2296         @ManageTransactions("CurvesOp")
2297         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2298             """
2299             Create B-Spline curve on the set of points.
2300
2301             Parameters:
2302                 thePoints Sequence of points for the B-Spline curve.
2303                 theIsClosed If True, build a closed curve.
2304                 theDoReordering If True, the algo does not follow the order of
2305                                 thePoints but searches for the closest vertex.
2306                 theName Object name; when specified, this parameter is used
2307                         for result publication in the study. Otherwise, if automatic
2308                         publication is switched on, default value is used for result name.
2309
2310             Returns:
2311                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2312             """
2313             # Example: see GEOM_TestAll.py
2314             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2315             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2316             self._autoPublish(anObj, theName, "bspline")
2317             return anObj
2318
2319         ## Create B-Spline curve on the set of points.
2320         #  @param thePoints Sequence of points for the B-Spline curve.
2321         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2322         #  @param theLastVec Vector object, defining the curve direction at its last point.
2323         #  @param theName Object name; when specified, this parameter is used
2324         #         for result publication in the study. Otherwise, if automatic
2325         #         publication is switched on, default value is used for result name.
2326         #
2327         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2328         #
2329         #  @ref tui_creation_curve "Example"
2330         @ManageTransactions("CurvesOp")
2331         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2332             """
2333             Create B-Spline curve on the set of points.
2334
2335             Parameters:
2336                 thePoints Sequence of points for the B-Spline curve.
2337                 theFirstVec Vector object, defining the curve direction at its first point.
2338                 theLastVec Vector object, defining the curve direction at its last point.
2339                 theName Object name; when specified, this parameter is used
2340                         for result publication in the study. Otherwise, if automatic
2341                         publication is switched on, default value is used for result name.
2342
2343             Returns:
2344                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2345             """
2346             # Example: see GEOM_TestAll.py
2347             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2348             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2349             self._autoPublish(anObj, theName, "bspline")
2350             return anObj
2351
2352         ## Creates a curve using the parametric definition of the basic points.
2353         #  @param thexExpr parametric equation of the coordinates X.
2354         #  @param theyExpr parametric equation of the coordinates Y.
2355         #  @param thezExpr parametric equation of the coordinates Z.
2356         #  @param theParamMin the minimal value of the parameter.
2357         #  @param theParamMax the maximum value of the parameter.
2358         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2359         #  @param theCurveType the type of the curve,
2360         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2361         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2362         #  @param theName Object name; when specified, this parameter is used
2363         #         for result publication in the study. Otherwise, if automatic
2364         #         publication is switched on, default value is used for result name.
2365         #
2366         #  @return New GEOM.GEOM_Object, containing the created curve.
2367         #
2368         #  @ref tui_creation_curve "Example"
2369         @ManageTransactions("CurvesOp")
2370         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2371                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2372             """
2373             Creates a curve using the parametric definition of the basic points.
2374
2375             Parameters:
2376                 thexExpr parametric equation of the coordinates X.
2377                 theyExpr parametric equation of the coordinates Y.
2378                 thezExpr parametric equation of the coordinates Z.
2379                 theParamMin the minimal value of the parameter.
2380                 theParamMax the maximum value of the parameter.
2381                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2382                 theCurveType the type of the curve,
2383                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2384                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2385                              method is used which can lead to a bug.
2386                 theName Object name; when specified, this parameter is used
2387                         for result publication in the study. Otherwise, if automatic
2388                         publication is switched on, default value is used for result name.
2389
2390             Returns:
2391                 New GEOM.GEOM_Object, containing the created curve.
2392             """
2393             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2394             if theNewMethod:
2395               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2396             else:
2397               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2398             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2399             anObj.SetParameters(Parameters)
2400             self._autoPublish(anObj, theName, "curve")
2401             return anObj
2402
2403         ## Create an isoline curve on a face.
2404         #  @param theFace the face for which an isoline is created.
2405         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2406         #         creation.
2407         #  @param theParameter the U parameter for U-isoline or V parameter
2408         #         for V-isoline.
2409         #  @param theName Object name; when specified, this parameter is used
2410         #         for result publication in the study. Otherwise, if automatic
2411         #         publication is switched on, default value is used for result name.
2412         #
2413         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2414         #          a compound of edges.
2415         #
2416         #  @ref tui_creation_curve "Example"
2417         @ManageTransactions("CurvesOp")
2418         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2419             """
2420             Create an isoline curve on a face.
2421
2422             Parameters:
2423                 theFace the face for which an isoline is created.
2424                 IsUIsoline True for U-isoline creation; False for V-isoline
2425                            creation.
2426                 theParameter the U parameter for U-isoline or V parameter
2427                              for V-isoline.
2428                 theName Object name; when specified, this parameter is used
2429                         for result publication in the study. Otherwise, if automatic
2430                         publication is switched on, default value is used for result name.
2431
2432             Returns:
2433                 New GEOM.GEOM_Object, containing the created isoline edge or a
2434                 compound of edges.
2435             """
2436             # Example: see GEOM_TestAll.py
2437             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2438             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2439             if IsUIsoline:
2440                 self._autoPublish(anObj, theName, "U-Isoline")
2441             else:
2442                 self._autoPublish(anObj, theName, "V-Isoline")
2443             return anObj
2444
2445         # end of l4_curves
2446         ## @}
2447
2448         ## @addtogroup l3_sketcher
2449         ## @{
2450
2451         ## Create a sketcher (wire or face), following the textual description,
2452         #  passed through <VAR>theCommand</VAR> argument. \n
2453         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2454         #  Format of the description string have to be the following:
2455         #
2456         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2457         #
2458         #  Where:
2459         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2460         #  - CMD is one of
2461         #     - "R angle" : Set the direction by angle
2462         #     - "D dx dy" : Set the direction by DX & DY
2463         #     .
2464         #       \n
2465         #     - "TT x y" : Create segment by point at X & Y
2466         #     - "T dx dy" : Create segment by point with DX & DY
2467         #     - "L length" : Create segment by direction & Length
2468         #     - "IX x" : Create segment by direction & Intersect. X
2469         #     - "IY y" : Create segment by direction & Intersect. Y
2470         #     .
2471         #       \n
2472         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2473         #     - "AA x y": Create arc by point at X & Y
2474         #     - "A dx dy" : Create arc by point with DX & DY
2475         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2476         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2477         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2478         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2479         #     .
2480         #       \n
2481         #     - "WW" : Close Wire (to finish)
2482         #     - "WF" : Close Wire and build face (to finish)
2483         #     .
2484         #        \n
2485         #  - Flag1 (= reverse) is 0 or 2 ...
2486         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2487         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2488         #     .
2489         #        \n
2490         #  - Flag2 (= control tolerance) is 0 or 1 ...
2491         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2492         #     - if 1 the wire is built only if the end point is on the arc
2493         #       with a tolerance of 10^-7 on the distance else the creation fails
2494         #
2495         #  @param theCommand String, defining the sketcher in local
2496         #                    coordinates of the working plane.
2497         #  @param theWorkingPlane Nine double values, defining origin,
2498         #                         OZ and OX directions of the working plane.
2499         #  @param theName Object name; when specified, this parameter is used
2500         #         for result publication in the study. Otherwise, if automatic
2501         #         publication is switched on, default value is used for result name.
2502         #
2503         #  @return New GEOM.GEOM_Object, containing the created wire.
2504         #
2505         #  @ref tui_sketcher_page "Example"
2506         @ManageTransactions("CurvesOp")
2507         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2508             """
2509             Create a sketcher (wire or face), following the textual description, passed
2510             through theCommand argument.
2511             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2512             Format of the description string have to be the following:
2513                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2514             Where:
2515             - x1, y1 are coordinates of the first sketcher point (zero by default),
2516             - CMD is one of
2517                - "R angle" : Set the direction by angle
2518                - "D dx dy" : Set the direction by DX & DY
2519
2520                - "TT x y" : Create segment by point at X & Y
2521                - "T dx dy" : Create segment by point with DX & DY
2522                - "L length" : Create segment by direction & Length
2523                - "IX x" : Create segment by direction & Intersect. X
2524                - "IY y" : Create segment by direction & Intersect. Y
2525
2526                - "C radius length" : Create arc by direction, radius and length(in degree)
2527                - "AA x y": Create arc by point at X & Y
2528                - "A dx dy" : Create arc by point with DX & DY
2529                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2530                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2531                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2532                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2533
2534                - "WW" : Close Wire (to finish)
2535                - "WF" : Close Wire and build face (to finish)
2536
2537             - Flag1 (= reverse) is 0 or 2 ...
2538                - if 0 the drawn arc is the one of lower angle (< Pi)
2539                - if 2 the drawn arc ius the one of greater angle (> Pi)
2540
2541             - Flag2 (= control tolerance) is 0 or 1 ...
2542                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2543                - if 1 the wire is built only if the end point is on the arc
2544                  with a tolerance of 10^-7 on the distance else the creation fails
2545
2546             Parameters:
2547                 theCommand String, defining the sketcher in local
2548                            coordinates of the working plane.
2549                 theWorkingPlane Nine double values, defining origin,
2550                                 OZ and OX directions of the working plane.
2551                 theName Object name; when specified, this parameter is used
2552                         for result publication in the study. Otherwise, if automatic
2553                         publication is switched on, default value is used for result name.
2554
2555             Returns:
2556                 New GEOM.GEOM_Object, containing the created wire.
2557             """
2558             # Example: see GEOM_TestAll.py
2559             theCommand,Parameters = ParseSketcherCommand(theCommand)
2560             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2561             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2562             anObj.SetParameters(Parameters)
2563             self._autoPublish(anObj, theName, "wire")
2564             return anObj
2565
2566         ## Create a sketcher (wire or face), following the textual description,
2567         #  passed through <VAR>theCommand</VAR> argument. \n
2568         #  For format of the description string see MakeSketcher() method.\n
2569         #  @param theCommand String, defining the sketcher in local
2570         #                    coordinates of the working plane.
2571         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2572         #  @param theName Object name; when specified, this parameter is used
2573         #         for result publication in the study. Otherwise, if automatic
2574         #         publication is switched on, default value is used for result name.
2575         #
2576         #  @return New GEOM.GEOM_Object, containing the created wire.
2577         #
2578         #  @ref tui_sketcher_page "Example"
2579         @ManageTransactions("CurvesOp")
2580         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2581             """
2582             Create a sketcher (wire or face), following the textual description,
2583             passed through theCommand argument.
2584             For format of the description string see geompy.MakeSketcher() method.
2585
2586             Parameters:
2587                 theCommand String, defining the sketcher in local
2588                            coordinates of the working plane.
2589                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2590                 theName Object name; when specified, this parameter is used
2591                         for result publication in the study. Otherwise, if automatic
2592                         publication is switched on, default value is used for result name.
2593
2594             Returns:
2595                 New GEOM.GEOM_Object, containing the created wire.
2596             """
2597             theCommand,Parameters = ParseSketcherCommand(theCommand)
2598             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2599             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2600             anObj.SetParameters(Parameters)
2601             self._autoPublish(anObj, theName, "wire")
2602             return anObj
2603
2604         ## Obtain a 2D sketcher interface
2605         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2606         def Sketcher2D (self):
2607             """
2608             Obtain a 2D sketcher interface.
2609
2610             Example of usage:
2611                sk = geompy.Sketcher2D()
2612                sk.addPoint(20, 20)
2613                sk.addSegmentRelative(15, 70)
2614                sk.addSegmentPerpY(50)
2615                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2616                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2617                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2618                sk.close()
2619                Sketch_1 = sk.wire(geomObj_1)
2620             """
2621             sk = Sketcher2D (self)
2622             return sk
2623
2624         ## Create a sketcher wire, following the numerical description,
2625         #  passed through <VAR>theCoordinates</VAR> argument. \n
2626         #  @param theCoordinates double values, defining points to create a wire,
2627         #                                                      passing from it.
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created wire.
2633         #
2634         #  @ref tui_3dsketcher_page "Example"
2635         @ManageTransactions("CurvesOp")
2636         def Make3DSketcher(self, theCoordinates, theName=None):
2637             """
2638             Create a sketcher wire, following the numerical description,
2639             passed through theCoordinates argument.
2640
2641             Parameters:
2642                 theCoordinates double values, defining points to create a wire,
2643                                passing from it.
2644                 theName Object name; when specified, this parameter is used
2645                         for result publication in the study. Otherwise, if automatic
2646                         publication is switched on, default value is used for result name.
2647
2648             Returns:
2649                 New GEOM_Object, containing the created wire.
2650             """
2651             theCoordinates,Parameters = ParseParameters(theCoordinates)
2652             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2653             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2654             anObj.SetParameters(Parameters)
2655             self._autoPublish(anObj, theName, "wire")
2656             return anObj
2657
2658         ## Obtain a 3D sketcher interface
2659         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2660         #
2661         #  @ref tui_3dsketcher_page "Example"
2662         def Sketcher3D (self):
2663             """
2664             Obtain a 3D sketcher interface.
2665
2666             Example of usage:
2667                 sk = geompy.Sketcher3D()
2668                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2669                 sk.addPointsRelative(0, 0, 130)
2670                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2671                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2672                 sk.close()
2673                 a3D_Sketcher_1 = sk.wire()
2674             """
2675             sk = Sketcher3D (self)
2676             return sk
2677
2678         ## Obtain a 2D polyline creation interface
2679         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2680         #
2681         #  @ref tui_3dsketcher_page "Example"
2682         def Polyline2D (self):
2683             """
2684             Obtain a 2D polyline creation interface.
2685
2686             Example of usage:
2687                 pl = geompy.Polyline2D()
2688                 pl.addSection("section 1", GEOM.Polyline, True)
2689                 pl.addPoints(0, 0, 10, 0, 10, 10)
2690                 pl.addSection("section 2", GEOM.Interpolation, False)
2691                 pl.addPoints(20, 0, 30, 0, 30, 10)
2692                 resultObj = pl.result(WorkingPlane)
2693             """
2694             pl = Polyline2D (self)
2695             return pl
2696
2697         # end of l3_sketcher
2698         ## @}
2699
2700         ## @addtogroup l3_3d_primitives
2701         ## @{
2702
2703         ## Create a box by coordinates of two opposite vertices.
2704         #
2705         #  @param x1,y1,z1 double values, defining first point it.
2706         #  @param x2,y2,z2 double values, defining first point it.
2707         #  @param theName Object name; when specified, this parameter is used
2708         #         for result publication in the study. Otherwise, if automatic
2709         #         publication is switched on, default value is used for result name.
2710         #
2711         #  @return New GEOM.GEOM_Object, containing the created box.
2712         #
2713         #  @ref tui_creation_box "Example"
2714         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2715             """
2716             Create a box by coordinates of two opposite vertices.
2717
2718             Parameters:
2719                 x1,y1,z1 double values, defining first point.
2720                 x2,y2,z2 double values, defining second point.
2721                 theName Object name; when specified, this parameter is used
2722                         for result publication in the study. Otherwise, if automatic
2723                         publication is switched on, default value is used for result name.
2724
2725             Returns:
2726                 New GEOM.GEOM_Object, containing the created box.
2727             """
2728             # Example: see GEOM_TestAll.py
2729             pnt1 = self.MakeVertex(x1,y1,z1)
2730             pnt2 = self.MakeVertex(x2,y2,z2)
2731             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2732             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2733
2734         ## Create a box with specified dimensions along the coordinate axes
2735         #  and with edges, parallel to the coordinate axes.
2736         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2737         #  @param theDX Length of Box edges, parallel to OX axis.
2738         #  @param theDY Length of Box edges, parallel to OY axis.
2739         #  @param theDZ Length of Box edges, parallel to OZ axis.
2740         #  @param theName Object name; when specified, this parameter is used
2741         #         for result publication in the study. Otherwise, if automatic
2742         #         publication is switched on, default value is used for result name.
2743         #
2744         #  @return New GEOM.GEOM_Object, containing the created box.
2745         #
2746         #  @ref tui_creation_box "Example"
2747         @ManageTransactions("PrimOp")
2748         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2749             """
2750             Create a box with specified dimensions along the coordinate axes
2751             and with edges, parallel to the coordinate axes.
2752             Center of the box will be at point (DX/2, DY/2, DZ/2).
2753
2754             Parameters:
2755                 theDX Length of Box edges, parallel to OX axis.
2756                 theDY Length of Box edges, parallel to OY axis.
2757                 theDZ Length of Box edges, parallel to OZ axis.
2758                 theName Object name; when specified, this parameter is used
2759                         for result publication in the study. Otherwise, if automatic
2760                         publication is switched on, default value is used for result name.
2761
2762             Returns:
2763                 New GEOM.GEOM_Object, containing the created box.
2764             """
2765             # Example: see GEOM_TestAll.py
2766             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2767             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2768             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2769             anObj.SetParameters(Parameters)
2770             self._autoPublish(anObj, theName, "box")
2771             return anObj
2772
2773         ## Create a box with two specified opposite vertices,
2774         #  and with edges, parallel to the coordinate axes
2775         #  @param thePnt1 First of two opposite vertices.
2776         #  @param thePnt2 Second of two opposite vertices.
2777         #  @param theName Object name; when specified, this parameter is used
2778         #         for result publication in the study. Otherwise, if automatic
2779         #         publication is switched on, default value is used for result name.
2780         #
2781         #  @return New GEOM.GEOM_Object, containing the created box.
2782         #
2783         #  @ref tui_creation_box "Example"
2784         @ManageTransactions("PrimOp")
2785         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2786             """
2787             Create a box with two specified opposite vertices,
2788             and with edges, parallel to the coordinate axes
2789
2790             Parameters:
2791                 thePnt1 First of two opposite vertices.
2792                 thePnt2 Second of two opposite vertices.
2793                 theName Object name; when specified, this parameter is used
2794                         for result publication in the study. Otherwise, if automatic
2795                         publication is switched on, default value is used for result name.
2796
2797             Returns:
2798                 New GEOM.GEOM_Object, containing the created box.
2799             """
2800             # Example: see GEOM_TestAll.py
2801             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2802             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2803             self._autoPublish(anObj, theName, "box")
2804             return anObj
2805
2806         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2807         #  @param theH height of Face.
2808         #  @param theW width of Face.
2809         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2810         #  @param theName Object name; when specified, this parameter is used
2811         #         for result publication in the study. Otherwise, if automatic
2812         #         publication is switched on, default value is used for result name.
2813         #
2814         #  @return New GEOM.GEOM_Object, containing the created face.
2815         #
2816         #  @ref tui_creation_face "Example"
2817         @ManageTransactions("PrimOp")
2818         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2819             """
2820             Create a face with specified dimensions with edges parallel to coordinate axes.
2821
2822             Parameters:
2823                 theH height of Face.
2824                 theW width of Face.
2825                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2826                 theName Object name; when specified, this parameter is used
2827                         for result publication in the study. Otherwise, if automatic
2828                         publication is switched on, default value is used for result name.
2829
2830             Returns:
2831                 New GEOM.GEOM_Object, containing the created face.
2832             """
2833             # Example: see GEOM_TestAll.py
2834             theH,theW,Parameters = ParseParameters(theH, theW)
2835             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2836             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2837             anObj.SetParameters(Parameters)
2838             self._autoPublish(anObj, theName, "rectangle")
2839             return anObj
2840
2841         ## Create a face from another plane and two sizes,
2842         #  vertical size and horisontal size.
2843         #  @param theObj   Normale vector to the creating face or
2844         #  the face object.
2845         #  @param theH     Height (vertical size).
2846         #  @param theW     Width (horisontal size).
2847         #  @param theName Object name; when specified, this parameter is used
2848         #         for result publication in the study. Otherwise, if automatic
2849         #         publication is switched on, default value is used for result name.
2850         #
2851         #  @return New GEOM.GEOM_Object, containing the created face.
2852         #
2853         #  @ref tui_creation_face "Example"
2854         @ManageTransactions("PrimOp")
2855         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2856             """
2857             Create a face from another plane and two sizes,
2858             vertical size and horisontal size.
2859
2860             Parameters:
2861                 theObj   Normale vector to the creating face or
2862                          the face object.
2863                 theH     Height (vertical size).
2864                 theW     Width (horisontal size).
2865                 theName Object name; when specified, this parameter is used
2866                         for result publication in the study. Otherwise, if automatic
2867                         publication is switched on, default value is used for result name.
2868
2869             Returns:
2870                 New GEOM_Object, containing the created face.
2871             """
2872             # Example: see GEOM_TestAll.py
2873             theH,theW,Parameters = ParseParameters(theH, theW)
2874             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2875             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2876             anObj.SetParameters(Parameters)
2877             self._autoPublish(anObj, theName, "rectangle")
2878             return anObj
2879
2880         ## Create a disk with given center, normal vector and radius.
2881         #  @param thePnt Disk center.
2882         #  @param theVec Vector, normal to the plane of the disk.
2883         #  @param theR Disk radius.
2884         #  @param theName Object name; when specified, this parameter is used
2885         #         for result publication in the study. Otherwise, if automatic
2886         #         publication is switched on, default value is used for result name.
2887         #
2888         #  @return New GEOM.GEOM_Object, containing the created disk.
2889         #
2890         #  @ref tui_creation_disk "Example"
2891         @ManageTransactions("PrimOp")
2892         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2893             """
2894             Create a disk with given center, normal vector and radius.
2895
2896             Parameters:
2897                 thePnt Disk center.
2898                 theVec Vector, normal to the plane of the disk.
2899                 theR Disk radius.
2900                 theName Object name; when specified, this parameter is used
2901                         for result publication in the study. Otherwise, if automatic
2902                         publication is switched on, default value is used for result name.
2903
2904             Returns:
2905                 New GEOM.GEOM_Object, containing the created disk.
2906             """
2907             # Example: see GEOM_TestAll.py
2908             theR,Parameters = ParseParameters(theR)
2909             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2910             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2911             anObj.SetParameters(Parameters)
2912             self._autoPublish(anObj, theName, "disk")
2913             return anObj
2914
2915         ## Create a disk, passing through three given points
2916         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2917         #  @param theName Object name; when specified, this parameter is used
2918         #         for result publication in the study. Otherwise, if automatic
2919         #         publication is switched on, default value is used for result name.
2920         #
2921         #  @return New GEOM.GEOM_Object, containing the created disk.
2922         #
2923         #  @ref tui_creation_disk "Example"
2924         @ManageTransactions("PrimOp")
2925         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2926             """
2927             Create a disk, passing through three given points
2928
2929             Parameters:
2930                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2931                 theName Object name; when specified, this parameter is used
2932                         for result publication in the study. Otherwise, if automatic
2933                         publication is switched on, default value is used for result name.
2934
2935             Returns:
2936                 New GEOM.GEOM_Object, containing the created disk.
2937             """
2938             # Example: see GEOM_TestAll.py
2939             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2940             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2941             self._autoPublish(anObj, theName, "disk")
2942             return anObj
2943
2944         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2945         #  @param theR Radius of Face.
2946         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2947         #  @param theName Object name; when specified, this parameter is used
2948         #         for result publication in the study. Otherwise, if automatic
2949         #         publication is switched on, default value is used for result name.
2950         #
2951         #  @return New GEOM.GEOM_Object, containing the created disk.
2952         #
2953         #  @ref tui_creation_face "Example"
2954         @ManageTransactions("PrimOp")
2955         def MakeDiskR(self, theR, theOrientation, theName=None):
2956             """
2957             Create a disk with specified dimensions along OX-OY coordinate axes.
2958
2959             Parameters:
2960                 theR Radius of Face.
2961                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2962                 theName Object name; when specified, this parameter is used
2963                         for result publication in the study. Otherwise, if automatic
2964                         publication is switched on, default value is used for result name.
2965
2966             Returns:
2967                 New GEOM.GEOM_Object, containing the created disk.
2968
2969             Example of usage:
2970                 Disk3 = geompy.MakeDiskR(100., 1)
2971             """
2972             # Example: see GEOM_TestAll.py
2973             theR,Parameters = ParseParameters(theR)
2974             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2975             RaiseIfFailed("MakeDiskR", self.PrimOp)
2976             anObj.SetParameters(Parameters)
2977             self._autoPublish(anObj, theName, "disk")
2978             return anObj
2979
2980         ## Create a cylinder with given base point, axis, radius and height.
2981         #  @param thePnt Central point of cylinder base.
2982         #  @param theAxis Cylinder axis.
2983         #  @param theR Cylinder radius.
2984         #  @param theH Cylinder height.
2985         #  @param theName Object name; when specified, this parameter is used
2986         #         for result publication in the study. Otherwise, if automatic
2987         #         publication is switched on, default value is used for result name.
2988         #
2989         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2990         #
2991         #  @ref tui_creation_cylinder "Example"
2992         @ManageTransactions("PrimOp")
2993         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2994             """
2995             Create a cylinder with given base point, axis, radius and height.
2996
2997             Parameters:
2998                 thePnt Central point of cylinder base.
2999                 theAxis Cylinder axis.
3000                 theR Cylinder radius.
3001                 theH Cylinder height.
3002                 theName Object name; when specified, this parameter is used
3003                         for result publication in the study. Otherwise, if automatic
3004                         publication is switched on, default value is used for result name.
3005
3006             Returns:
3007                 New GEOM.GEOM_Object, containing the created cylinder.
3008             """
3009             # Example: see GEOM_TestAll.py
3010             theR,theH,Parameters = ParseParameters(theR, theH)
3011             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3012             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3013             anObj.SetParameters(Parameters)
3014             self._autoPublish(anObj, theName, "cylinder")
3015             return anObj
3016             
3017         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3018         #  @param thePnt Central point of cylinder base.
3019         #  @param theAxis Cylinder axis.
3020         #  @param theR Cylinder radius.
3021         #  @param theH Cylinder height.
3022         #  @param theA Cylinder angle in radians.
3023         #  @param theName Object name; when specified, this parameter is used
3024         #         for result publication in the study. Otherwise, if automatic
3025         #         publication is switched on, default value is used for result name.
3026         #
3027         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3028         #
3029         #  @ref tui_creation_cylinder "Example"
3030         @ManageTransactions("PrimOp")
3031         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3032             """
3033             Create a portion of cylinder with given base point, axis, radius, height and angle.
3034
3035             Parameters:
3036                 thePnt Central point of cylinder base.
3037                 theAxis Cylinder axis.
3038                 theR Cylinder radius.
3039                 theH Cylinder height.
3040                 theA Cylinder angle in radians.
3041                 theName Object name; when specified, this parameter is used
3042                         for result publication in the study. Otherwise, if automatic
3043                         publication is switched on, default value is used for result name.
3044
3045             Returns:
3046                 New GEOM.GEOM_Object, containing the created cylinder.
3047             """
3048             # Example: see GEOM_TestAll.py
3049             flag = False
3050             if isinstance(theA,str):
3051                 flag = True
3052             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3053             if flag:
3054                 theA = theA*math.pi/180.
3055             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3056             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3057             anObj.SetParameters(Parameters)
3058             self._autoPublish(anObj, theName, "cylinder")
3059             return anObj
3060
3061         ## Create a cylinder with given radius and height at
3062         #  the origin of coordinate system. Axis of the cylinder
3063         #  will be collinear to the OZ axis of the coordinate system.
3064         #  @param theR Cylinder radius.
3065         #  @param theH Cylinder height.
3066         #  @param theName Object name; when specified, this parameter is used
3067         #         for result publication in the study. Otherwise, if automatic
3068         #         publication is switched on, default value is used for result name.
3069         #
3070         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3071         #
3072         #  @ref tui_creation_cylinder "Example"
3073         @ManageTransactions("PrimOp")
3074         def MakeCylinderRH(self, theR, theH, theName=None):
3075             """
3076             Create a cylinder with given radius and height at
3077             the origin of coordinate system. Axis of the cylinder
3078             will be collinear to the OZ axis of the coordinate system.
3079
3080             Parameters:
3081                 theR Cylinder radius.
3082                 theH Cylinder height.
3083                 theName Object name; when specified, this parameter is used
3084                         for result publication in the study. Otherwise, if automatic
3085                         publication is switched on, default value is used for result name.
3086
3087             Returns:
3088                 New GEOM.GEOM_Object, containing the created cylinder.
3089             """
3090             # Example: see GEOM_TestAll.py
3091             theR,theH,Parameters = ParseParameters(theR, theH)
3092             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3093             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3094             anObj.SetParameters(Parameters)
3095             self._autoPublish(anObj, theName, "cylinder")
3096             return anObj
3097             
3098         ## Create a portion of cylinder with given radius, height and angle at
3099         #  the origin of coordinate system. Axis of the cylinder
3100         #  will be collinear to the OZ axis of the coordinate system.
3101         #  @param theR Cylinder radius.
3102         #  @param theH Cylinder height.
3103         #  @param theA Cylinder angle in radians.
3104         #  @param theName Object name; when specified, this parameter is used
3105         #         for result publication in the study. Otherwise, if automatic
3106         #         publication is switched on, default value is used for result name.
3107         #
3108         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3109         #
3110         #  @ref tui_creation_cylinder "Example"
3111         @ManageTransactions("PrimOp")
3112         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3113             """
3114             Create a portion of cylinder with given radius, height and angle at
3115             the origin of coordinate system. Axis of the cylinder
3116             will be collinear to the OZ axis of the coordinate system.
3117
3118             Parameters:
3119                 theR Cylinder radius.
3120                 theH Cylinder height.
3121                 theA Cylinder angle in radians.
3122                 theName Object name; when specified, this parameter is used
3123                         for result publication in the study. Otherwise, if automatic
3124                         publication is switched on, default value is used for result name.
3125
3126             Returns:
3127                 New GEOM.GEOM_Object, containing the created cylinder.
3128             """
3129             # Example: see GEOM_TestAll.py
3130             flag = False
3131             if isinstance(theA,str):
3132                 flag = True
3133             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3134             if flag:
3135                 theA = theA*math.pi/180.
3136             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3137             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3138             anObj.SetParameters(Parameters)
3139             self._autoPublish(anObj, theName, "cylinder")
3140             return anObj
3141
3142         ## Create a sphere with given center and radius.
3143         #  @param thePnt Sphere center.
3144         #  @param theR Sphere radius.
3145         #  @param theName Object name; when specified, this parameter is used
3146         #         for result publication in the study. Otherwise, if automatic
3147         #         publication is switched on, default value is used for result name.
3148         #
3149         #  @return New GEOM.GEOM_Object, containing the created sphere.
3150         #
3151         #  @ref tui_creation_sphere "Example"
3152         @ManageTransactions("PrimOp")
3153         def MakeSpherePntR(self, thePnt, theR, theName=None):
3154             """
3155             Create a sphere with given center and radius.
3156
3157             Parameters:
3158                 thePnt Sphere center.
3159                 theR Sphere radius.
3160                 theName Object name; when specified, this parameter is used
3161                         for result publication in the study. Otherwise, if automatic
3162                         publication is switched on, default value is used for result name.
3163
3164             Returns:
3165                 New GEOM.GEOM_Object, containing the created sphere.
3166             """
3167             # Example: see GEOM_TestAll.py
3168             theR,Parameters = ParseParameters(theR)
3169             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3170             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3171             anObj.SetParameters(Parameters)
3172             self._autoPublish(anObj, theName, "sphere")
3173             return anObj
3174
3175         ## Create a sphere with given center and radius.
3176         #  @param x,y,z Coordinates of sphere center.
3177         #  @param theR Sphere radius.
3178         #  @param theName Object name; when specified, this parameter is used
3179         #         for result publication in the study. Otherwise, if automatic
3180         #         publication is switched on, default value is used for result name.
3181         #
3182         #  @return New GEOM.GEOM_Object, containing the created sphere.
3183         #
3184         #  @ref tui_creation_sphere "Example"
3185         def MakeSphere(self, x, y, z, theR, theName=None):
3186             """
3187             Create a sphere with given center and radius.
3188
3189             Parameters:
3190                 x,y,z Coordinates of sphere center.
3191                 theR Sphere radius.
3192                 theName Object name; when specified, this parameter is used
3193                         for result publication in the study. Otherwise, if automatic
3194                         publication is switched on, default value is used for result name.
3195
3196             Returns:
3197                 New GEOM.GEOM_Object, containing the created sphere.
3198             """
3199             # Example: see GEOM_TestAll.py
3200             point = self.MakeVertex(x, y, z)
3201             # note: auto-publishing is done in self.MakeSpherePntR()
3202             anObj = self.MakeSpherePntR(point, theR, theName)
3203             return anObj
3204
3205         ## Create a sphere with given radius at the origin of coordinate system.
3206         #  @param theR Sphere radius.
3207         #  @param theName Object name; when specified, this parameter is used
3208         #         for result publication in the study. Otherwise, if automatic
3209         #         publication is switched on, default value is used for result name.
3210         #
3211         #  @return New GEOM.GEOM_Object, containing the created sphere.
3212         #
3213         #  @ref tui_creation_sphere "Example"
3214         @ManageTransactions("PrimOp")
3215         def MakeSphereR(self, theR, theName=None):
3216             """
3217             Create a sphere with given radius at the origin of coordinate system.
3218
3219             Parameters:
3220                 theR Sphere radius.
3221                 theName Object name; when specified, this parameter is used
3222                         for result publication in the study. Otherwise, if automatic
3223                         publication is switched on, default value is used for result name.
3224
3225             Returns:
3226                 New GEOM.GEOM_Object, containing the created sphere.
3227             """
3228             # Example: see GEOM_TestAll.py
3229             theR,Parameters = ParseParameters(theR)
3230             anObj = self.PrimOp.MakeSphereR(theR)
3231             RaiseIfFailed("MakeSphereR", self.PrimOp)
3232             anObj.SetParameters(Parameters)
3233             self._autoPublish(anObj, theName, "sphere")
3234             return anObj
3235
3236         ## Create a cone with given base point, axis, height and radiuses.
3237         #  @param thePnt Central point of the first cone base.
3238         #  @param theAxis Cone axis.
3239         #  @param theR1 Radius of the first cone base.
3240         #  @param theR2 Radius of the second cone base.
3241         #    \note If both radiuses are non-zero, the cone will be truncated.
3242         #    \note If the radiuses are equal, a cylinder will be created instead.
3243         #  @param theH Cone height.
3244         #  @param theName Object name; when specified, this parameter is used
3245         #         for result publication in the study. Otherwise, if automatic
3246         #         publication is switched on, default value is used for result name.
3247         #
3248         #  @return New GEOM.GEOM_Object, containing the created cone.
3249         #
3250         #  @ref tui_creation_cone "Example"
3251         @ManageTransactions("PrimOp")
3252         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3253             """
3254             Create a cone with given base point, axis, height and radiuses.
3255
3256             Parameters:
3257                 thePnt Central point of the first cone base.
3258                 theAxis Cone axis.
3259                 theR1 Radius of the first cone base.
3260                 theR2 Radius of the second cone base.
3261                 theH Cone height.
3262                 theName Object name; when specified, this parameter is used
3263                         for result publication in the study. Otherwise, if automatic
3264                         publication is switched on, default value is used for result name.
3265
3266             Note:
3267                 If both radiuses are non-zero, the cone will be truncated.
3268                 If the radiuses are equal, a cylinder will be created instead.
3269
3270             Returns:
3271                 New GEOM.GEOM_Object, containing the created cone.
3272             """
3273             # Example: see GEOM_TestAll.py
3274             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3275             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3276             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3277             anObj.SetParameters(Parameters)
3278             self._autoPublish(anObj, theName, "cone")
3279             return anObj
3280
3281         ## Create a cone with given height and radiuses at
3282         #  the origin of coordinate system. Axis of the cone will
3283         #  be collinear to the OZ axis of the coordinate system.
3284         #  @param theR1 Radius of the first cone base.
3285         #  @param theR2 Radius of the second cone base.
3286         #    \note If both radiuses are non-zero, the cone will be truncated.
3287         #    \note If the radiuses are equal, a cylinder will be created instead.
3288         #  @param theH Cone height.
3289         #  @param theName Object name; when specified, this parameter is used
3290         #         for result publication in the study. Otherwise, if automatic
3291         #         publication is switched on, default value is used for result name.
3292         #
3293         #  @return New GEOM.GEOM_Object, containing the created cone.
3294         #
3295         #  @ref tui_creation_cone "Example"
3296         @ManageTransactions("PrimOp")
3297         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3298             """
3299             Create a cone with given height and radiuses at
3300             the origin of coordinate system. Axis of the cone will
3301             be collinear to the OZ axis of the coordinate system.
3302
3303             Parameters:
3304                 theR1 Radius of the first cone base.
3305                 theR2 Radius of the second cone base.
3306                 theH Cone height.
3307                 theName Object name; when specified, this parameter is used
3308                         for result publication in the study. Otherwise, if automatic
3309                         publication is switched on, default value is used for result name.
3310
3311             Note:
3312                 If both radiuses are non-zero, the cone will be truncated.
3313                 If the radiuses are equal, a cylinder will be created instead.
3314
3315             Returns:
3316                 New GEOM.GEOM_Object, containing the created cone.
3317             """
3318             # Example: see GEOM_TestAll.py
3319             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3320             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3321             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3322             anObj.SetParameters(Parameters)
3323             self._autoPublish(anObj, theName, "cone")
3324             return anObj
3325
3326         ## Create a torus with given center, normal vector and radiuses.
3327         #  @param thePnt Torus central point.
3328         #  @param theVec Torus axis of symmetry.
3329         #  @param theRMajor Torus major radius.
3330         #  @param theRMinor Torus minor radius.
3331         #  @param theName Object name; when specified, this parameter is used
3332         #         for result publication in the study. Otherwise, if automatic
3333         #         publication is switched on, default value is used for result name.
3334         #
3335         #  @return New GEOM.GEOM_Object, containing the created torus.
3336         #
3337         #  @ref tui_creation_torus "Example"
3338         @ManageTransactions("PrimOp")
3339         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3340             """
3341             Create a torus with given center, normal vector and radiuses.
3342
3343             Parameters:
3344                 thePnt Torus central point.
3345                 theVec Torus axis of symmetry.
3346                 theRMajor Torus major radius.
3347                 theRMinor Torus minor radius.
3348                 theName Object name; when specified, this parameter is used
3349                         for result publication in the study. Otherwise, if automatic
3350                         publication is switched on, default value is used for result name.
3351
3352            Returns:
3353                 New GEOM.GEOM_Object, containing the created torus.
3354             """
3355             # Example: see GEOM_TestAll.py
3356             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3357             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3358             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3359             anObj.SetParameters(Parameters)
3360             self._autoPublish(anObj, theName, "torus")
3361             return anObj
3362
3363         ## Create a torus with given radiuses at the origin of coordinate system.
3364         #  @param theRMajor Torus major radius.
3365         #  @param theRMinor Torus minor radius.
3366         #  @param theName Object name; when specified, this parameter is used
3367         #         for result publication in the study. Otherwise, if automatic
3368         #         publication is switched on, default value is used for result name.
3369         #
3370         #  @return New GEOM.GEOM_Object, containing the created torus.
3371         #
3372         #  @ref tui_creation_torus "Example"
3373         @ManageTransactions("PrimOp")
3374         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3375             """
3376            Create a torus with given radiuses at the origin of coordinate system.
3377
3378            Parameters:
3379                 theRMajor Torus major radius.
3380                 theRMinor Torus minor radius.
3381                 theName Object name; when specified, this parameter is used
3382                         for result publication in the study. Otherwise, if automatic
3383                         publication is switched on, default value is used for result name.
3384
3385            Returns:
3386                 New GEOM.GEOM_Object, containing the created torus.
3387             """
3388             # Example: see GEOM_TestAll.py
3389             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3390             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3391             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3392             anObj.SetParameters(Parameters)
3393             self._autoPublish(anObj, theName, "torus")
3394             return anObj
3395
3396         # end of l3_3d_primitives
3397         ## @}
3398
3399         ## @addtogroup l3_complex
3400         ## @{
3401
3402         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3403         #  @param theBase Base shape to be extruded.
3404         #  @param thePoint1 First end of extrusion vector.
3405         #  @param thePoint2 Second end of extrusion vector.
3406         #  @param theScaleFactor Use it to make prism with scaled second base.
3407         #                        Nagative value means not scaled second base.
3408         #  @param theName Object name; when specified, this parameter is used
3409         #         for result publication in the study. Otherwise, if automatic
3410         #         publication is switched on, default value is used for result name.
3411         #
3412         #  @return New GEOM.GEOM_Object, containing the created prism.
3413         #
3414         #  @ref tui_creation_prism "Example"
3415         @ManageTransactions("PrimOp")
3416         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3417             """
3418             Create a shape by extrusion of the base shape along a vector, defined by two points.
3419
3420             Parameters:
3421                 theBase Base shape to be extruded.
3422                 thePoint1 First end of extrusion vector.
3423                 thePoint2 Second end of extrusion vector.
3424                 theScaleFactor Use it to make prism with scaled second base.
3425                                Nagative value means not scaled second base.
3426                 theName Object name; when specified, this parameter is used
3427                         for result publication in the study. Otherwise, if automatic
3428                         publication is switched on, default value is used for result name.
3429
3430             Returns:
3431                 New GEOM.GEOM_Object, containing the created prism.
3432             """
3433             # Example: see GEOM_TestAll.py
3434             anObj = None
3435             Parameters = ""
3436             if theScaleFactor > 0:
3437                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3438                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3439             else:
3440                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3441             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3442             anObj.SetParameters(Parameters)
3443             self._autoPublish(anObj, theName, "prism")
3444             return anObj
3445
3446         ## Create a shape by extrusion of the base shape along a
3447         #  vector, defined by two points, in 2 Ways (forward/backward).
3448         #  @param theBase Base shape to be extruded.
3449         #  @param thePoint1 First end of extrusion vector.
3450         #  @param thePoint2 Second end of extrusion vector.
3451         #  @param theName Object name; when specified, this parameter is used
3452         #         for result publication in the study. Otherwise, if automatic
3453         #         publication is switched on, default value is used for result name.
3454         #
3455         #  @return New GEOM.GEOM_Object, containing the created prism.
3456         #
3457         #  @ref tui_creation_prism "Example"
3458         @ManageTransactions("PrimOp")
3459         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3460             """
3461             Create a shape by extrusion of the base shape along a
3462             vector, defined by two points, in 2 Ways (forward/backward).
3463
3464             Parameters:
3465                 theBase Base shape to be extruded.
3466                 thePoint1 First end of extrusion vector.
3467                 thePoint2 Second end of extrusion vector.
3468                 theName Object name; when specified, this parameter is used
3469                         for result publication in the study. Otherwise, if automatic
3470                         publication is switched on, default value is used for result name.
3471
3472             Returns:
3473                 New GEOM.GEOM_Object, containing the created prism.
3474             """
3475             # Example: see GEOM_TestAll.py
3476             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3477             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3478             self._autoPublish(anObj, theName, "prism")
3479             return anObj
3480
3481         ## Create a shape by extrusion of the base shape along the vector,
3482         #  i.e. all the space, transfixed by the base shape during its translation
3483         #  along the vector on the given distance.
3484         #  @param theBase Base shape to be extruded.
3485         #  @param theVec Direction of extrusion.
3486         #  @param theH Prism dimension along theVec.
3487         #  @param theScaleFactor Use it to make prism with scaled second base.
3488         #                        Negative value means not scaled second base.
3489         #  @param theName Object name; when specified, this parameter is used
3490         #         for result publication in the study. Otherwise, if automatic
3491         #         publication is switched on, default value is used for result name.
3492         #
3493         #  @return New GEOM.GEOM_Object, containing the created prism.
3494         #
3495         #  @ref tui_creation_prism "Example"
3496         @ManageTransactions("PrimOp")
3497         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3498             """
3499             Create a shape by extrusion of the base shape along the vector,
3500             i.e. all the space, transfixed by the base shape during its translation
3501             along the vector on the given distance.
3502
3503             Parameters:
3504                 theBase Base shape to be extruded.
3505                 theVec Direction of extrusion.
3506                 theH Prism dimension along theVec.
3507                 theScaleFactor Use it to make prism with scaled second base.
3508                                Negative value means not scaled second base.
3509                 theName Object name; when specified, this parameter is used
3510                         for result publication in the study. Otherwise, if automatic
3511                         publication is switched on, default value is used for result name.
3512
3513             Returns:
3514                 New GEOM.GEOM_Object, containing the created prism.
3515             """
3516             # Example: see GEOM_TestAll.py
3517             anObj = None
3518             Parameters = ""
3519             if theScaleFactor > 0:
3520                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3521                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3522             else:
3523                 theH,Parameters = ParseParameters(theH)
3524                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3525             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3526             anObj.SetParameters(Parameters)
3527             self._autoPublish(anObj, theName, "prism")
3528             return anObj
3529
3530         ## Create a shape by extrusion of the base shape along the vector,
3531         #  i.e. all the space, transfixed by the base shape during its translation
3532         #  along the vector on the given distance in 2 Ways (forward/backward).
3533         #  @param theBase Base shape to be extruded.
3534         #  @param theVec Direction of extrusion.
3535         #  @param theH Prism dimension along theVec in forward direction.
3536         #  @param theName Object name; when specified, this parameter is used
3537         #         for result publication in the study. Otherwise, if automatic
3538         #         publication is switched on, default value is used for result name.
3539         #
3540         #  @return New GEOM.GEOM_Object, containing the created prism.
3541         #
3542         #  @ref tui_creation_prism "Example"
3543         @ManageTransactions("PrimOp")
3544         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3545             """
3546             Create a shape by extrusion of the base shape along the vector,
3547             i.e. all the space, transfixed by the base shape during its translation
3548             along the vector on the given distance in 2 Ways (forward/backward).
3549
3550             Parameters:
3551                 theBase Base shape to be extruded.
3552                 theVec Direction of extrusion.
3553                 theH Prism dimension along theVec in forward direction.
3554                 theName Object name; when specified, this parameter is used
3555                         for result publication in the study. Otherwise, if automatic
3556                         publication is switched on, default value is used for result name.
3557
3558             Returns:
3559                 New GEOM.GEOM_Object, containing the created prism.
3560             """
3561             # Example: see GEOM_TestAll.py
3562             theH,Parameters = ParseParameters(theH)
3563             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3564             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3565             anObj.SetParameters(Parameters)
3566             self._autoPublish(anObj, theName, "prism")
3567             return anObj
3568
3569         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3570         #  @param theBase Base shape to be extruded.
3571         #  @param theDX, theDY, theDZ Directions of extrusion.
3572         #  @param theScaleFactor Use it to make prism with scaled second base.
3573         #                        Nagative value means not scaled second base.
3574         #  @param theName Object name; when specified, this parameter is used
3575         #         for result publication in the study. Otherwise, if automatic
3576         #         publication is switched on, default value is used for result name.
3577         #
3578         #  @return New GEOM.GEOM_Object, containing the created prism.
3579         #
3580         #  @ref tui_creation_prism "Example"
3581         @ManageTransactions("PrimOp")
3582         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3583             """
3584             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3585
3586             Parameters:
3587                 theBase Base shape to be extruded.
3588                 theDX, theDY, theDZ Directions of extrusion.
3589                 theScaleFactor Use it to make prism with scaled second base.
3590                                Nagative value means not scaled second base.
3591                 theName Object name; when specified, this parameter is used
3592                         for result publication in the study. Otherwise, if automatic
3593                         publication is switched on, default value is used for result name.
3594
3595             Returns:
3596                 New GEOM.GEOM_Object, containing the created prism.
3597             """
3598             # Example: see GEOM_TestAll.py
3599             anObj = None
3600             Parameters = ""
3601             if theScaleFactor > 0:
3602                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3603                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3604             else:
3605                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3606                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3607             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3608             anObj.SetParameters(Parameters)
3609             self._autoPublish(anObj, theName, "prism")
3610             return anObj
3611
3612         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3613         #  i.e. all the space, transfixed by the base shape during its translation
3614         #  along the vector on the given distance in 2 Ways (forward/backward).
3615         #  @param theBase Base shape to be extruded.
3616         #  @param theDX, theDY, theDZ Directions of extrusion.
3617         #  @param theName Object name; when specified, this parameter is used
3618         #         for result publication in the study. Otherwise, if automatic
3619         #         publication is switched on, default value is used for result name.
3620         #
3621         #  @return New GEOM.GEOM_Object, containing the created prism.
3622         #
3623         #  @ref tui_creation_prism "Example"
3624         @ManageTransactions("PrimOp")
3625         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3626             """
3627             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3628             i.e. all the space, transfixed by the base shape during its translation
3629             along the vector on the given distance in 2 Ways (forward/backward).
3630
3631             Parameters:
3632                 theBase Base shape to be extruded.
3633                 theDX, theDY, theDZ Directions of extrusion.
3634                 theName Object name; when specified, this parameter is used
3635                         for result publication in the study. Otherwise, if automatic
3636                         publication is switched on, default value is used for result name.
3637
3638             Returns:
3639                 New GEOM.GEOM_Object, containing the created prism.
3640             """
3641             # Example: see GEOM_TestAll.py
3642             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3643             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3644             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3645             anObj.SetParameters(Parameters)
3646             self._autoPublish(anObj, theName, "prism")
3647             return anObj
3648
3649         ## Create a shape by revolution of the base shape around the axis
3650         #  on the given angle, i.e. all the space, transfixed by the base
3651         #  shape during its rotation around the axis on the given angle.
3652         #  @param theBase Base shape to be rotated.
3653         #  @param theAxis Rotation axis.
3654         #  @param theAngle Rotation angle in radians.
3655         #  @param theName Object name; when specified, this parameter is used
3656         #         for result publication in the study. Otherwise, if automatic
3657         #         publication is switched on, default value is used for result name.
3658         #
3659         #  @return New GEOM.GEOM_Object, containing the created revolution.
3660         #
3661         #  @ref tui_creation_revolution "Example"
3662         @ManageTransactions("PrimOp")
3663         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3664             """
3665             Create a shape by revolution of the base shape around the axis
3666             on the given angle, i.e. all the space, transfixed by the base
3667             shape during its rotation around the axis on the given angle.
3668
3669             Parameters:
3670                 theBase Base shape to be rotated.
3671                 theAxis Rotation axis.
3672                 theAngle Rotation angle in radians.
3673                 theName Object name; when specified, this parameter is used
3674                         for result publication in the study. Otherwise, if automatic
3675                         publication is switched on, default value is used for result name.
3676
3677             Returns:
3678                 New GEOM.GEOM_Object, containing the created revolution.
3679             """
3680             # Example: see GEOM_TestAll.py
3681             theAngle,Parameters = ParseParameters(theAngle)
3682             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3683             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3684             anObj.SetParameters(Parameters)
3685             self._autoPublish(anObj, theName, "revolution")
3686             return anObj
3687
3688         ## Create a shape by revolution of the base shape around the axis
3689         #  on the given angle, i.e. all the space, transfixed by the base
3690         #  shape during its rotation around the axis on the given angle in
3691         #  both directions (forward/backward)
3692         #  @param theBase Base shape to be rotated.
3693         #  @param theAxis Rotation axis.
3694         #  @param theAngle Rotation angle in radians.
3695         #  @param theName Object name; when specified, this parameter is used
3696         #         for result publication in the study. Otherwise, if automatic
3697         #         publication is switched on, default value is used for result name.
3698         #
3699         #  @return New GEOM.GEOM_Object, containing the created revolution.
3700         #
3701         #  @ref tui_creation_revolution "Example"
3702         @ManageTransactions("PrimOp")
3703         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3704             """
3705             Create a shape by revolution of the base shape around the axis
3706             on the given angle, i.e. all the space, transfixed by the base
3707             shape during its rotation around the axis on the given angle in
3708             both directions (forward/backward).
3709
3710             Parameters:
3711                 theBase Base shape to be rotated.
3712                 theAxis Rotation axis.
3713                 theAngle Rotation angle in radians.
3714                 theName Object name; when specified, this parameter is used
3715                         for result publication in the study. Otherwise, if automatic
3716                         publication is switched on, default value is used for result name.
3717
3718             Returns:
3719                 New GEOM.GEOM_Object, containing the created revolution.
3720             """
3721             theAngle,Parameters = ParseParameters(theAngle)
3722             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3723             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3724             anObj.SetParameters(Parameters)
3725             self._autoPublish(anObj, theName, "revolution")
3726             return anObj
3727
3728         ## Create a filling from the given compound of contours.
3729         #  @param theShape the compound of contours
3730         #  @param theMinDeg a minimal degree of BSpline surface to create
3731         #  @param theMaxDeg a maximal degree of BSpline surface to create
3732         #  @param theTol2D a 2d tolerance to be reached
3733         #  @param theTol3D a 3d tolerance to be reached
3734         #  @param theNbIter a number of iteration of approximation algorithm
3735         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3736         #  @param isApprox if True, BSpline curves are generated in the process
3737         #                  of surface construction. By default it is False, that means
3738         #                  the surface is created using given curves. The usage of
3739         #                  Approximation makes the algorithm work slower, but allows
3740         #                  building the surface for rather complex cases.
3741         #  @param theName Object name; when specified, this parameter is used
3742         #         for result publication in the study. Otherwise, if automatic
3743         #         publication is switched on, default value is used for result name.
3744         #
3745         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3746         #
3747         #  @ref tui_creation_filling "Example"
3748         @ManageTransactions("PrimOp")
3749         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3750                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3751             """
3752             Create a filling from the given compound of contours.
3753
3754             Parameters:
3755                 theShape the compound of contours
3756                 theMinDeg a minimal degree of BSpline surface to create
3757                 theMaxDeg a maximal degree of BSpline surface to create
3758                 theTol2D a 2d tolerance to be reached
3759                 theTol3D a 3d tolerance to be reached
3760                 theNbIter a number of iteration of approximation algorithm
3761                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3762                 isApprox if True, BSpline curves are generated in the process
3763                          of surface construction. By default it is False, that means
3764                          the surface is created using given curves. The usage of
3765                          Approximation makes the algorithm work slower, but allows
3766                          building the surface for rather complex cases
3767                 theName Object name; when specified, this parameter is used
3768                         for result publication in the study. Otherwise, if automatic
3769                         publication is switched on, default value is used for result name.
3770
3771             Returns:
3772                 New GEOM.GEOM_Object, containing the created filling surface.
3773
3774             Example of usage:
3775                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3776             """
3777             # Example: see GEOM_TestAll.py
3778             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3779             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3780                                             theTol2D, theTol3D, theNbIter,
3781                                             theMethod, isApprox)
3782             RaiseIfFailed("MakeFilling", self.PrimOp)
3783             anObj.SetParameters(Parameters)
3784             self._autoPublish(anObj, theName, "filling")
3785             return anObj
3786
3787
3788         ## Create a filling from the given compound of contours.
3789         #  This method corresponds to MakeFilling with isApprox=True
3790         #  @param theShape the compound of contours
3791         #  @param theMinDeg a minimal degree of BSpline surface to create
3792         #  @param theMaxDeg a maximal degree of BSpline surface to create
3793         #  @param theTol3D a 3d tolerance to be reached
3794         #  @param theName Object name; when specified, this parameter is used
3795         #         for result publication in the study. Otherwise, if automatic
3796         #         publication is switched on, default value is used for result name.
3797         #
3798         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3799         #
3800         #  @ref tui_creation_filling "Example"
3801         @ManageTransactions("PrimOp")
3802         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3803             """
3804             Create a filling from the given compound of contours.
3805             This method corresponds to MakeFilling with isApprox=True
3806
3807             Parameters:
3808                 theShape the compound of contours
3809                 theMinDeg a minimal degree of BSpline surface to create
3810                 theMaxDeg a maximal degree of BSpline surface to create
3811                 theTol3D a 3d tolerance to be reached
3812                 theName Object name; when specified, this parameter is used
3813                         for result publication in the study. Otherwise, if automatic
3814                         publication is switched on, default value is used for result name.
3815
3816             Returns:
3817                 New GEOM.GEOM_Object, containing the created filling surface.
3818
3819             Example of usage:
3820                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3821             """
3822             # Example: see GEOM_TestAll.py
3823             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3824             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3825                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3826             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3827             anObj.SetParameters(Parameters)
3828             self._autoPublish(anObj, theName, "filling")
3829             return anObj
3830
3831         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3832         #  @param theSeqSections - set of specified sections.
3833         #  @param theModeSolid - mode defining building solid or shell
3834         #  @param thePreci - precision 3D used for smoothing
3835         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3836         #  @param theName Object name; when specified, this parameter is used
3837         #         for result publication in the study. Otherwise, if automatic
3838         #         publication is switched on, default value is used for result name.
3839         #
3840         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3841         #
3842         #  @ref swig_todo "Example"
3843         @ManageTransactions("PrimOp")
3844         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3845             """
3846             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3847
3848             Parameters:
3849                 theSeqSections - set of specified sections.
3850                 theModeSolid - mode defining building solid or shell
3851                 thePreci - precision 3D used for smoothing
3852                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3853                 theName Object name; when specified, this parameter is used
3854                         for result publication in the study. Otherwise, if automatic
3855                         publication is switched on, default value is used for result name.
3856
3857             Returns:
3858                 New GEOM.GEOM_Object, containing the created shell or solid.
3859             """
3860             # Example: see GEOM_TestAll.py
3861             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3862             RaiseIfFailed("MakeThruSections", self.PrimOp)
3863             self._autoPublish(anObj, theName, "filling")
3864             return anObj
3865
3866         ## Create a shape by extrusion of the base shape along
3867         #  the path shape. The path shape can be a wire or an edge.
3868         #  @param theBase Base shape to be extruded.
3869         #  @param thePath Path shape to extrude the base shape along it.
3870         #  @param theName Object name; when specified, this parameter is used
3871         #         for result publication in the study. Otherwise, if automatic
3872         #         publication is switched on, default value is used for result name.
3873         #
3874         #  @return New GEOM.GEOM_Object, containing the created pipe.
3875         #
3876         #  @ref tui_creation_pipe "Example"
3877         @ManageTransactions("PrimOp")
3878         def MakePipe(self, theBase, thePath, theName=None):
3879             """
3880             Create a shape by extrusion of the base shape along
3881             the path shape. The path shape can be a wire or an edge.
3882
3883             Parameters:
3884                 theBase Base shape to be extruded.
3885                 thePath Path shape to extrude the base shape along it.
3886                 theName Object name; when specified, this parameter is used
3887                         for result publication in the study. Otherwise, if automatic
3888                         publication is switched on, default value is used for result name.
3889
3890             Returns:
3891                 New GEOM.GEOM_Object, containing the created pipe.
3892             """
3893             # Example: see GEOM_TestAll.py
3894             anObj = self.PrimOp.MakePipe(theBase, thePath)
3895             RaiseIfFailed("MakePipe", self.PrimOp)
3896             self._autoPublish(anObj, theName, "pipe")
3897             return anObj
3898
3899         ## Create a shape by extrusion of the profile shape along
3900         #  the path shape. The path shape can be a wire or an edge.
3901         #  the several profiles can be specified in the several locations of path.
3902         #  @param theSeqBases - list of  Bases shape to be extruded.
3903         #  @param theLocations - list of locations on the path corresponding
3904         #                        specified list of the Bases shapes. Number of locations
3905         #                        should be equal to number of bases or list of locations can be empty.
3906         #  @param thePath - Path shape to extrude the base shape along it.
3907         #  @param theWithContact - the mode defining that the section is translated to be in
3908         #                          contact with the spine.
3909         #  @param theWithCorrection - defining that the section is rotated to be
3910         #                             orthogonal to the spine tangent in the correspondent point
3911         #  @param theName Object name; when specified, this parameter is used
3912         #         for result publication in the study. Otherwise, if automatic
3913         #         publication is switched on, default value is used for result name.
3914         #
3915         #  @return New GEOM.GEOM_Object, containing the created pipe.
3916         #
3917         #  @ref tui_creation_pipe_with_diff_sec "Example"
3918         @ManageTransactions("PrimOp")
3919         def MakePipeWithDifferentSections(self, theSeqBases,
3920                                           theLocations, thePath,
3921                                           theWithContact, theWithCorrection, theName=None):
3922             """
3923             Create a shape by extrusion of the profile shape along
3924             the path shape. The path shape can be a wire or an edge.
3925             the several profiles can be specified in the several locations of path.
3926
3927             Parameters:
3928                 theSeqBases - list of  Bases shape to be extruded.
3929                 theLocations - list of locations on the path corresponding
3930                                specified list of the Bases shapes. Number of locations
3931                                should be equal to number of bases or list of locations can be empty.
3932                 thePath - Path shape to extrude the base shape along it.
3933                 theWithContact - the mode defining that the section is translated to be in
3934                                  contact with the spine(0/1)
3935                 theWithCorrection - defining that the section is rotated to be
3936                                     orthogonal to the spine tangent in the correspondent point (0/1)
3937                 theName Object name; when specified, this parameter is used
3938                         for result publication in the study. Otherwise, if automatic
3939                         publication is switched on, default value is used for result name.
3940
3941             Returns:
3942                 New GEOM.GEOM_Object, containing the created pipe.
3943             """
3944             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3945                                                               theLocations, thePath,
3946                                                               theWithContact, theWithCorrection)
3947             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3948             self._autoPublish(anObj, theName, "pipe")
3949             return anObj
3950
3951         ## Create a shape by extrusion of the profile shape along
3952         #  the path shape. The path shape can be a wire or a edge.
3953         #  the several profiles can be specified in the several locations of path.
3954         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3955         #                       shell or face. If number of faces in neighbour sections
3956         #                       aren't coincided result solid between such sections will
3957         #                       be created using external boundaries of this shells.
3958         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3959         #                          This list is used for searching correspondences between
3960         #                          faces in the sections. Size of this list must be equal
3961         #                          to size of list of base shapes.
3962         #  @param theLocations - list of locations on the path corresponding
3963         #                        specified list of the Bases shapes. Number of locations
3964         #                        should be equal to number of bases. First and last
3965         #                        locations must be coincided with first and last vertexes
3966         #                        of path correspondingly.
3967         #  @param thePath - Path shape to extrude the base shape along it.
3968         #  @param theWithContact - the mode defining that the section is translated to be in
3969         #                          contact with the spine.
3970         #  @param theWithCorrection - defining that the section is rotated to be
3971         #                             orthogonal to the spine tangent in the correspondent point
3972         #  @param theName Object name; when specified, this parameter is used
3973         #         for result publication in the study. Otherwise, if automatic
3974         #         publication is switched on, default value is used for result name.
3975         #
3976         #  @return New GEOM.GEOM_Object, containing the created solids.
3977         #
3978         #  @ref tui_creation_pipe_with_shell_sec "Example"
3979         @ManageTransactions("PrimOp")
3980         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3981                                       theLocations, thePath,
3982                                       theWithContact, theWithCorrection, theName=None):
3983             """
3984             Create a shape by extrusion of the profile shape along
3985             the path shape. The path shape can be a wire or a edge.
3986             the several profiles can be specified in the several locations of path.
3987
3988             Parameters:
3989                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3990                               shell or face. If number of faces in neighbour sections
3991                               aren't coincided result solid between such sections will
3992                               be created using external boundaries of this shells.
3993                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3994                                  This list is used for searching correspondences between
3995                                  faces in the sections. Size of this list must be equal
3996                                  to size of list of base shapes.
3997                 theLocations - list of locations on the path corresponding
3998                                specified list of the Bases shapes. Number of locations
3999                                should be equal to number of bases. First and last
4000                                locations must be coincided with first and last vertexes
4001                                of path correspondingly.
4002                 thePath - Path shape to extrude the base shape along it.
4003                 theWithContact - the mode defining that the section is translated to be in
4004                                  contact with the spine (0/1)
4005                 theWithCorrection - defining that the section is rotated to be
4006                                     orthogonal to the spine tangent in the correspondent point (0/1)
4007                 theName Object name; when specified, this parameter is used
4008                         for result publication in the study. Otherwise, if automatic
4009                         publication is switched on, default value is used for result name.
4010
4011             Returns:
4012                 New GEOM.GEOM_Object, containing the created solids.
4013             """
4014             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4015                                                           theLocations, thePath,
4016                                                           theWithContact, theWithCorrection)
4017             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4018             self._autoPublish(anObj, theName, "pipe")
4019             return anObj
4020
4021         ## Create a shape by extrusion of the profile shape along
4022         #  the path shape. This function is used only for debug pipe
4023         #  functionality - it is a version of function MakePipeWithShellSections()
4024         #  which give a possibility to recieve information about
4025         #  creating pipe between each pair of sections step by step.
4026         @ManageTransactions("PrimOp")
4027         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4028                                              theLocations, thePath,
4029                                              theWithContact, theWithCorrection, theName=None):
4030             """
4031             Create a shape by extrusion of the profile shape along
4032             the path shape. This function is used only for debug pipe
4033             functionality - it is a version of previous function
4034             geompy.MakePipeWithShellSections() which give a possibility to
4035             recieve information about creating pipe between each pair of
4036             sections step by step.
4037             """
4038             res = []
4039             nbsect = len(theSeqBases)
4040             nbsubsect = len(theSeqSubBases)
4041             #print "nbsect = ",nbsect
4042             for i in range(1,nbsect):
4043                 #print "  i = ",i
4044                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4045                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4046                 tmpSeqSubBases = []
4047                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4048                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4049                                                               tmpLocations, thePath,
4050                                                               theWithContact, theWithCorrection)
4051                 if self.PrimOp.IsDone() == 0:
4052                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4053                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4054                     break
4055                 else:
4056                     print "Pipe between ",i," and ",i+1," sections is OK"
4057                     res.append(anObj)
4058                     pass
4059                 pass
4060
4061             resc = self.MakeCompound(res)
4062             #resc = self.MakeSewing(res, 0.001)
4063             #print "resc: ",resc
4064             self._autoPublish(resc, theName, "pipe")
4065             return resc
4066
4067         ## Create solids between given sections
4068         #  @param theSeqBases - list of sections (shell or face).
4069         #  @param theLocations - list of corresponding vertexes
4070         #  @param theName Object name; when specified, this parameter is used
4071         #         for result publication in the study. Otherwise, if automatic
4072         #         publication is switched on, default value is used for result name.
4073         #
4074         #  @return New GEOM.GEOM_Object, containing the created solids.
4075         #
4076         #  @ref tui_creation_pipe_without_path "Example"
4077         @ManageTransactions("PrimOp")
4078         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
4079             """
4080             Create solids between given sections
4081
4082             Parameters:
4083                 theSeqBases - list of sections (shell or face).
4084                 theLocations - list of corresponding vertexes
4085                 theName Object name; when specified, this parameter is used
4086                         for result publication in the study. Otherwise, if automatic
4087                         publication is switched on, default value is used for result name.
4088
4089             Returns:
4090                 New GEOM.GEOM_Object, containing the created solids.
4091             """
4092             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
4093             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4094             self._autoPublish(anObj, theName, "pipe")
4095             return anObj
4096
4097         ## Create a shape by extrusion of the base shape along
4098         #  the path shape with constant bi-normal direction along the given vector.
4099         #  The path shape can be a wire or an edge.
4100         #  @param theBase Base shape to be extruded.
4101         #  @param thePath Path shape to extrude the base shape along it.
4102         #  @param theVec Vector defines a constant binormal direction to keep the
4103         #                same angle beetween the direction and the sections
4104         #                along the sweep surface.
4105         #  @param theName Object name; when specified, this parameter is used
4106         #         for result publication in the study. Otherwise, if automatic
4107         #         publication is switched on, default value is used for result name.
4108         #
4109         #  @return New GEOM.GEOM_Object, containing the created pipe.
4110         #
4111         #  @ref tui_creation_pipe "Example"
4112         @ManageTransactions("PrimOp")
4113         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4114             """
4115             Create a shape by extrusion of the base shape along
4116             the path shape with constant bi-normal direction along the given vector.
4117             The path shape can be a wire or an edge.
4118
4119             Parameters:
4120                 theBase Base shape to be extruded.
4121                 thePath Path shape to extrude the base shape along it.
4122                 theVec Vector defines a constant binormal direction to keep the
4123                        same angle beetween the direction and the sections
4124                        along the sweep surface.
4125                 theName Object name; when specified, this parameter is used
4126                         for result publication in the study. Otherwise, if automatic
4127                         publication is switched on, default value is used for result name.
4128
4129             Returns:
4130                 New GEOM.GEOM_Object, containing the created pipe.
4131             """
4132             # Example: see GEOM_TestAll.py
4133             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4134             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4135             self._autoPublish(anObj, theName, "pipe")
4136             return anObj
4137
4138         ## Makes a thick solid from a face or a shell
4139         #  @param theShape Face or Shell to be thicken
4140         #  @param theThickness Thickness of the resulting solid
4141         #  @param theName Object name; when specified, this parameter is used
4142         #         for result publication in the study. Otherwise, if automatic
4143         #         publication is switched on, default value is used for result name.
4144         #
4145         #  @return New GEOM.GEOM_Object, containing the created solid
4146         #
4147         @ManageTransactions("PrimOp")
4148         def MakeThickSolid(self, theShape, theThickness, theName=None):
4149             """
4150             Make a thick solid from a face or a shell
4151
4152             Parameters:
4153                  theShape Face or Shell to be thicken
4154                  theThickness Thickness of the resulting solid
4155                  theName Object name; when specified, this parameter is used
4156                  for result publication in the study. Otherwise, if automatic
4157                  publication is switched on, default value is used for result name.
4158
4159             Returns:
4160                 New GEOM.GEOM_Object, containing the created solid
4161             """
4162             # Example: see GEOM_TestAll.py
4163             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4164             RaiseIfFailed("MakeThickening", self.PrimOp)
4165             self._autoPublish(anObj, theName, "pipe")
4166             return anObj
4167
4168
4169         ## Modifies a face or a shell to make it a thick solid
4170         #  @param theShape Face or Shell to be thicken
4171         #  @param theThickness Thickness of the resulting solid
4172         #
4173         #  @return The modified shape
4174         #
4175         @ManageTransactions("PrimOp")
4176         def Thicken(self, theShape, theThickness):
4177             """
4178             Modifies a face or a shell to make it a thick solid
4179
4180             Parameters:
4181                 theBase Base shape to be extruded.
4182                 thePath Path shape to extrude the base shape along it.
4183                 theName Object name; when specified, this parameter is used
4184                         for result publication in the study. Otherwise, if automatic
4185                         publication is switched on, default value is used for result name.
4186
4187             Returns:
4188                 The modified shape
4189             """
4190             # Example: see GEOM_TestAll.py
4191             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4192             RaiseIfFailed("MakeThickening", self.PrimOp)
4193             return anObj
4194
4195         ## Build a middle path of a pipe-like shape.
4196         #  The path shape can be a wire or an edge.
4197         #  @param theShape It can be closed or unclosed pipe-like shell
4198         #                  or a pipe-like solid.
4199         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4200         #                            should be wires or faces of theShape.
4201         #  @param theName Object name; when specified, this parameter is used
4202         #         for result publication in the study. Otherwise, if automatic
4203         #         publication is switched on, default value is used for result name.
4204         #
4205         #  @note It is not assumed that exact or approximate copy of theShape
4206         #        can be obtained by applying existing Pipe operation on the
4207         #        resulting "Path" wire taking theBase1 as the base - it is not
4208         #        always possible; though in some particular cases it might work
4209         #        it is not guaranteed. Thus, RestorePath function should not be
4210         #        considered as an exact reverse operation of the Pipe.
4211         #
4212         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4213         #                                source pipe's "path".
4214         #
4215         #  @ref tui_creation_pipe_path "Example"
4216         @ManageTransactions("PrimOp")
4217         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4218             """
4219             Build a middle path of a pipe-like shape.
4220             The path shape can be a wire or an edge.
4221
4222             Parameters:
4223                 theShape It can be closed or unclosed pipe-like shell
4224                          or a pipe-like solid.
4225                 theBase1, theBase2 Two bases of the supposed pipe. This
4226                                    should be wires or faces of theShape.
4227                 theName Object name; when specified, this parameter is used
4228                         for result publication in the study. Otherwise, if automatic
4229                         publication is switched on, default value is used for result name.
4230
4231             Returns:
4232                 New GEOM_Object, containing an edge or wire that represent
4233                                  source pipe's path.
4234             """
4235             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4236             RaiseIfFailed("RestorePath", self.PrimOp)
4237             self._autoPublish(anObj, theName, "path")
4238             return anObj
4239
4240         ## Build a middle path of a pipe-like shape.
4241         #  The path shape can be a wire or an edge.
4242         #  @param theShape It can be closed or unclosed pipe-like shell
4243         #                  or a pipe-like solid.
4244         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4245         #                                should be lists of edges of theShape.
4246         #  @param theName Object name; when specified, this parameter is used
4247         #         for result publication in the study. Otherwise, if automatic
4248         #         publication is switched on, default value is used for result name.
4249         #
4250         #  @note It is not assumed that exact or approximate copy of theShape
4251         #        can be obtained by applying existing Pipe operation on the
4252         #        resulting "Path" wire taking theBase1 as the base - it is not
4253         #        always possible; though in some particular cases it might work
4254         #        it is not guaranteed. Thus, RestorePath function should not be
4255         #        considered as an exact reverse operation of the Pipe.
4256         #
4257         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4258         #                                source pipe's "path".
4259         #
4260         #  @ref tui_creation_pipe_path "Example"
4261         @ManageTransactions("PrimOp")
4262         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4263             """
4264             Build a middle path of a pipe-like shape.
4265             The path shape can be a wire or an edge.
4266
4267             Parameters:
4268                 theShape It can be closed or unclosed pipe-like shell
4269                          or a pipe-like solid.
4270                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4271                                        should be lists of edges of theShape.
4272                 theName Object name; when specified, this parameter is used
4273                         for result publication in the study. Otherwise, if automatic
4274                         publication is switched on, default value is used for result name.
4275
4276             Returns:
4277                 New GEOM_Object, containing an edge or wire that represent
4278                                  source pipe's path.
4279             """
4280             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4281             RaiseIfFailed("RestorePath", self.PrimOp)
4282             self._autoPublish(anObj, theName, "path")
4283             return anObj
4284
4285         # end of l3_complex
4286         ## @}
4287
4288         ## @addtogroup l3_advanced
4289         ## @{
4290
4291         ## Create a linear edge with specified ends.
4292         #  @param thePnt1 Point for the first end of edge.
4293         #  @param thePnt2 Point for the second end of edge.
4294         #  @param theName Object name; when specified, this parameter is used
4295         #         for result publication in the study. Otherwise, if automatic
4296         #         publication is switched on, default value is used for result name.
4297         #
4298         #  @return New GEOM.GEOM_Object, containing the created edge.
4299         #
4300         #  @ref tui_creation_edge "Example"
4301         @ManageTransactions("ShapesOp")
4302         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4303             """
4304             Create a linear edge with specified ends.
4305
4306             Parameters:
4307                 thePnt1 Point for the first end of edge.
4308                 thePnt2 Point for the second end of edge.
4309                 theName Object name; when specified, this parameter is used
4310                         for result publication in the study. Otherwise, if automatic
4311                         publication is switched on, default value is used for result name.
4312
4313             Returns:
4314                 New GEOM.GEOM_Object, containing the created edge.
4315             """
4316             # Example: see GEOM_TestAll.py
4317             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4318             RaiseIfFailed("MakeEdge", self.ShapesOp)
4319             self._autoPublish(anObj, theName, "edge")
4320             return anObj
4321
4322         ## Create a new edge, corresponding to the given length on the given curve.
4323         #  @param theRefCurve The referenced curve (edge).
4324         #  @param theLength Length on the referenced curve. It can be negative.
4325         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4326         #                       at the end of \a theRefCurve, close to the selected point.
4327         #                       If None, start from the first point of \a theRefCurve.
4328         #  @param theName Object name; when specified, this parameter is used
4329         #         for result publication in the study. Otherwise, if automatic
4330         #         publication is switched on, default value is used for result name.
4331         #
4332         #  @return New GEOM.GEOM_Object, containing the created edge.
4333         #
4334         #  @ref tui_creation_edge "Example"
4335         @ManageTransactions("ShapesOp")
4336         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4337             """
4338             Create a new edge, corresponding to the given length on the given curve.
4339
4340             Parameters:
4341                 theRefCurve The referenced curve (edge).
4342                 theLength Length on the referenced curve. It can be negative.
4343                 theStartPoint Any point can be selected for it, the new edge will begin
4344                               at the end of theRefCurve, close to the selected point.
4345                               If None, start from the first point of theRefCurve.
4346                 theName Object name; when specified, this parameter is used
4347                         for result publication in the study. Otherwise, if automatic
4348                         publication is switched on, default value is used for result name.
4349
4350             Returns:
4351                 New GEOM.GEOM_Object, containing the created edge.
4352             """
4353             # Example: see GEOM_TestAll.py
4354             theLength, Parameters = ParseParameters(theLength)
4355             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4356             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4357             anObj.SetParameters(Parameters)
4358             self._autoPublish(anObj, theName, "edge")
4359             return anObj
4360
4361         ## Create an edge from specified wire.
4362         #  @param theWire source Wire
4363         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4364         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4365         #  @param theName Object name; when specified, this parameter is used
4366         #         for result publication in the study. Otherwise, if automatic
4367         #         publication is switched on, default value is used for result name.
4368         #
4369         #  @return New GEOM.GEOM_Object, containing the created edge.
4370         #
4371         #  @ref tui_creation_edge "Example"
4372         @ManageTransactions("ShapesOp")
4373         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4374             """
4375             Create an edge from specified wire.
4376
4377             Parameters:
4378                 theWire source Wire
4379                 theLinearTolerance linear tolerance value (default = 1e-07)
4380                 theAngularTolerance angular tolerance value (default = 1e-12)
4381                 theName Object name; when specified, this parameter is used
4382                         for result publication in the study. Otherwise, if automatic
4383                         publication is switched on, default value is used for result name.
4384
4385             Returns:
4386                 New GEOM.GEOM_Object, containing the created edge.
4387             """
4388             # Example: see GEOM_TestAll.py
4389             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4390             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4391             self._autoPublish(anObj, theName, "edge")
4392             return anObj
4393
4394         ## Create a wire from the set of edges and wires.
4395         #  @param theEdgesAndWires List of edges and/or wires.
4396         #  @param theTolerance Maximum distance between vertices, that will be merged.
4397         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4398         #  @param theName Object name; when specified, this parameter is used
4399         #         for result publication in the study. Otherwise, if automatic
4400         #         publication is switched on, default value is used for result name.
4401         #
4402         #  @return New GEOM.GEOM_Object, containing the created wire.
4403         #
4404         #  @ref tui_creation_wire "Example"
4405         @ManageTransactions("ShapesOp")
4406         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4407             """
4408             Create a wire from the set of edges and wires.
4409
4410             Parameters:
4411                 theEdgesAndWires List of edges and/or wires.
4412                 theTolerance Maximum distance between vertices, that will be merged.
4413                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4414                 theName Object name; when specified, this parameter is used
4415                         for result publication in the study. Otherwise, if automatic
4416                         publication is switched on, default value is used for result name.
4417
4418             Returns:
4419                 New GEOM.GEOM_Object, containing the created wire.
4420             """
4421             # Example: see GEOM_TestAll.py
4422             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4423             RaiseIfFailed("MakeWire", self.ShapesOp)
4424             self._autoPublish(anObj, theName, "wire")
4425             return anObj
4426
4427         ## Create a face on the given wire.
4428         #  @param theWire closed Wire or Edge to build the face on.
4429         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4430         #                        If the tolerance of the obtained planar face is less
4431         #                        than 1e-06, this face will be returned, otherwise the
4432         #                        algorithm tries to build any suitable face on the given
4433         #                        wire and prints a warning message.
4434         #  @param theName Object name; when specified, this parameter is used
4435         #         for result publication in the study. Otherwise, if automatic
4436         #         publication is switched on, default value is used for result name.
4437         #
4438         #  @return New GEOM.GEOM_Object, containing the created face.
4439         #
4440         #  @ref tui_creation_face "Example"
4441         @ManageTransactions("ShapesOp")
4442         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4443             """
4444             Create a face on the given wire.
4445
4446             Parameters:
4447                 theWire closed Wire or Edge to build the face on.
4448                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4449                                If the tolerance of the obtained planar face is less
4450                                than 1e-06, this face will be returned, otherwise the
4451                                algorithm tries to build any suitable face on the given
4452                                wire and prints a warning message.
4453                 theName Object name; when specified, this parameter is used
4454                         for result publication in the study. Otherwise, if automatic
4455                         publication is switched on, default value is used for result name.
4456
4457             Returns:
4458                 New GEOM.GEOM_Object, containing the created face.
4459             """
4460             # Example: see GEOM_TestAll.py
4461             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4462             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4463                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4464             else:
4465                 RaiseIfFailed("MakeFace", self.ShapesOp)
4466             self._autoPublish(anObj, theName, "face")
4467             return anObj
4468
4469         ## Create a face on the given wires set.
4470         #  @param theWires List of closed wires or edges to build the face on.
4471         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4472         #                        If the tolerance of the obtained planar face is less
4473         #                        than 1e-06, this face will be returned, otherwise the
4474         #                        algorithm tries to build any suitable face on the given
4475         #                        wire and prints a warning message.
4476         #  @param theName Object name; when specified, this parameter is used
4477         #         for result publication in the study. Otherwise, if automatic
4478         #         publication is switched on, default value is used for result name.
4479         #
4480         #  @return New GEOM.GEOM_Object, containing the created face.
4481         #
4482         #  @ref tui_creation_face "Example"
4483         @ManageTransactions("ShapesOp")
4484         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4485             """
4486             Create a face on the given wires set.
4487
4488             Parameters:
4489                 theWires List of closed wires or edges to build the face on.
4490                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4491                                If the tolerance of the obtained planar face is less
4492                                than 1e-06, this face will be returned, otherwise the
4493                                algorithm tries to build any suitable face on the given
4494                                wire and prints a warning message.
4495                 theName Object name; when specified, this parameter is used
4496                         for result publication in the study. Otherwise, if automatic
4497                         publication is switched on, default value is used for result name.
4498
4499             Returns:
4500                 New GEOM.GEOM_Object, containing the created face.
4501             """
4502             # Example: see GEOM_TestAll.py
4503             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4504             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4505                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4506             else:
4507                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4508             self._autoPublish(anObj, theName, "face")
4509             return anObj
4510
4511         ## See MakeFaceWires() method for details.
4512         #
4513         #  @ref tui_creation_face "Example 1"
4514         #  \n @ref swig_MakeFaces  "Example 2"
4515         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4516             """
4517             See geompy.MakeFaceWires() method for details.
4518             """
4519             # Example: see GEOM_TestOthers.py
4520             # note: auto-publishing is done in self.MakeFaceWires()
4521             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4522             return anObj
4523
4524         ## Create a shell from the set of faces and shells.
4525         #  @param theFacesAndShells List of faces and/or shells.
4526         #  @param theName Object name; when specified, this parameter is used
4527         #         for result publication in the study. Otherwise, if automatic
4528         #         publication is switched on, default value is used for result name.
4529         #
4530         #  @return New GEOM.GEOM_Object, containing the created shell.
4531         #
4532         #  @ref tui_creation_shell "Example"
4533         @ManageTransactions("ShapesOp")
4534         def MakeShell(self, theFacesAndShells, theName=None):
4535             """
4536             Create a shell from the set of faces and shells.
4537
4538             Parameters:
4539                 theFacesAndShells List of faces and/or shells.
4540                 theName Object name; when specified, this parameter is used
4541                         for result publication in the study. Otherwise, if automatic
4542                         publication is switched on, default value is used for result name.
4543
4544             Returns:
4545                 New GEOM.GEOM_Object, containing the created shell.
4546             """
4547             # Example: see GEOM_TestAll.py
4548             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4549             RaiseIfFailed("MakeShell", self.ShapesOp)
4550             self._autoPublish(anObj, theName, "shell")
4551             return anObj
4552
4553         ## Create a solid, bounded by the given shells.
4554         #  @param theShells Sequence of bounding shells.
4555         #  @param theName Object name; when specified, this parameter is used
4556         #         for result publication in the study. Otherwise, if automatic
4557         #         publication is switched on, default value is used for result name.
4558         #
4559         #  @return New GEOM.GEOM_Object, containing the created solid.
4560         #
4561         #  @ref tui_creation_solid "Example"
4562         @ManageTransactions("ShapesOp")
4563         def MakeSolid(self, theShells, theName=None):
4564             """
4565             Create a solid, bounded by the given shells.
4566
4567             Parameters:
4568                 theShells Sequence of bounding shells.
4569                 theName Object name; when specified, this parameter is used
4570                         for result publication in the study. Otherwise, if automatic
4571                         publication is switched on, default value is used for result name.
4572
4573             Returns:
4574                 New GEOM.GEOM_Object, containing the created solid.
4575             """
4576             # Example: see GEOM_TestAll.py
4577             if len(theShells) == 1:
4578                 descr = self._IsGoodForSolid(theShells[0])
4579                 #if len(descr) > 0:
4580                 #    raise RuntimeError, "MakeSolidShells : " + descr
4581                 if descr == "WRN_SHAPE_UNCLOSED":
4582                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4583             anObj = self.ShapesOp.MakeSolidShells(theShells)
4584             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4585             self._autoPublish(anObj, theName, "solid")
4586             return anObj
4587
4588         ## Create a compound of the given shapes.
4589         #  @param theShapes List of shapes to put in compound.
4590         #  @param theName Object name; when specified, this parameter is used
4591         #         for result publication in the study. Otherwise, if automatic
4592         #         publication is switched on, default value is used for result name.
4593         #
4594         #  @return New GEOM.GEOM_Object, containing the created compound.
4595         #
4596         #  @ref tui_creation_compound "Example"
4597         @ManageTransactions("ShapesOp")
4598         def MakeCompound(self, theShapes, theName=None):
4599             """
4600             Create a compound of the given shapes.
4601
4602             Parameters:
4603                 theShapes List of shapes to put in compound.
4604                 theName Object name; when specified, this parameter is used
4605                         for result publication in the study. Otherwise, if automatic
4606                         publication is switched on, default value is used for result name.
4607
4608             Returns:
4609                 New GEOM.GEOM_Object, containing the created compound.
4610             """
4611             # Example: see GEOM_TestAll.py
4612             anObj = self.ShapesOp.MakeCompound(theShapes)
4613             RaiseIfFailed("MakeCompound", self.ShapesOp)
4614             self._autoPublish(anObj, theName, "compound")
4615             return anObj
4616
4617         # end of l3_advanced
4618         ## @}
4619
4620         ## @addtogroup l2_measure
4621         ## @{
4622
4623         ## Gives quantity of faces in the given shape.
4624         #  @param theShape Shape to count faces of.
4625         #  @return Quantity of faces.
4626         #
4627         #  @ref swig_NumberOf "Example"
4628         @ManageTransactions("ShapesOp")
4629         def NumberOfFaces(self, theShape):
4630             """
4631             Gives quantity of faces in the given shape.
4632
4633             Parameters:
4634                 theShape Shape to count faces of.
4635
4636             Returns:
4637                 Quantity of faces.
4638             """
4639             # Example: see GEOM_TestOthers.py
4640             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4641             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4642             return nb_faces
4643
4644         ## Gives quantity of edges in the given shape.
4645         #  @param theShape Shape to count edges of.
4646         #  @return Quantity of edges.
4647         #
4648         #  @ref swig_NumberOf "Example"
4649         @ManageTransactions("ShapesOp")
4650         def NumberOfEdges(self, theShape):
4651             """
4652             Gives quantity of edges in the given shape.
4653
4654             Parameters:
4655                 theShape Shape to count edges of.
4656
4657             Returns:
4658                 Quantity of edges.
4659             """
4660             # Example: see GEOM_TestOthers.py
4661             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4662             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4663             return nb_edges
4664
4665         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4666         #  @param theShape Shape to count sub-shapes of.
4667         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4668         #  @return Quantity of sub-shapes of given type.
4669         #
4670         #  @ref swig_NumberOf "Example"
4671         @ManageTransactions("ShapesOp")
4672         def NumberOfSubShapes(self, theShape, theShapeType):
4673             """
4674             Gives quantity of sub-shapes of type theShapeType in the given shape.
4675
4676             Parameters:
4677                 theShape Shape to count sub-shapes of.
4678                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4679
4680             Returns:
4681                 Quantity of sub-shapes of given type.
4682             """
4683             # Example: see GEOM_TestOthers.py
4684             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4685             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4686             return nb_ss
4687
4688         ## Gives quantity of solids in the given shape.
4689         #  @param theShape Shape to count solids in.
4690         #  @return Quantity of solids.
4691         #
4692         #  @ref swig_NumberOf "Example"
4693         @ManageTransactions("ShapesOp")
4694         def NumberOfSolids(self, theShape):
4695             """
4696             Gives quantity of solids in the given shape.
4697
4698             Parameters:
4699                 theShape Shape to count solids in.
4700
4701             Returns:
4702                 Quantity of solids.
4703             """
4704             # Example: see GEOM_TestOthers.py
4705             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4706             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4707             return nb_solids
4708
4709         # end of l2_measure
4710         ## @}
4711
4712         ## @addtogroup l3_healing
4713         ## @{
4714
4715         ## Reverses an orientation the given shape.
4716         #  @param theShape Shape to be reversed.
4717         #  @param theName Object name; when specified, this parameter is used
4718         #         for result publication in the study. Otherwise, if automatic
4719         #         publication is switched on, default value is used for result name.
4720         #
4721         #  @return The reversed copy of theShape.
4722         #
4723         #  @ref swig_ChangeOrientation "Example"
4724         @ManageTransactions("ShapesOp")
4725         def ChangeOrientation(self, theShape, theName=None):
4726             """
4727             Reverses an orientation the given shape.
4728
4729             Parameters:
4730                 theShape Shape to be reversed.
4731                 theName Object name; when specified, this parameter is used
4732                         for result publication in the study. Otherwise, if automatic
4733                         publication is switched on, default value is used for result name.
4734
4735             Returns:
4736                 The reversed copy of theShape.
4737             """
4738             # Example: see GEOM_TestAll.py
4739             anObj = self.ShapesOp.ChangeOrientation(theShape)
4740             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4741             self._autoPublish(anObj, theName, "reversed")
4742             return anObj
4743
4744         ## See ChangeOrientation() method for details.
4745         #
4746         #  @ref swig_OrientationChange "Example"
4747         def OrientationChange(self, theShape, theName=None):
4748             """
4749             See geompy.ChangeOrientation method for details.
4750             """
4751             # Example: see GEOM_TestOthers.py
4752             # note: auto-publishing is done in self.ChangeOrientation()
4753             anObj = self.ChangeOrientation(theShape, theName)
4754             return anObj
4755
4756         # end of l3_healing
4757         ## @}
4758
4759         ## @addtogroup l4_obtain
4760         ## @{
4761
4762         ## Retrieve all free faces from the given shape.
4763         #  Free face is a face, which is not shared between two shells of the shape.
4764         #  @param theShape Shape to find free faces in.
4765         #  @return List of IDs of all free faces, contained in theShape.
4766         #
4767         #  @ref tui_measurement_tools_page "Example"
4768         @ManageTransactions("ShapesOp")
4769         def GetFreeFacesIDs(self,theShape):
4770             """
4771             Retrieve all free faces from the given shape.
4772             Free face is a face, which is not shared between two shells of the shape.
4773
4774             Parameters:
4775                 theShape Shape to find free faces in.
4776
4777             Returns:
4778                 List of IDs of all free faces, contained in theShape.
4779             """
4780             # Example: see GEOM_TestOthers.py
4781             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4782             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4783             return anIDs
4784
4785         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4786         #  @param theShape1 Shape to find sub-shapes in.
4787         #  @param theShape2 Shape to find shared sub-shapes with.
4788         #  @param theShapeType Type of sub-shapes to be retrieved.
4789         #  @param theName Object name; when specified, this parameter is used
4790         #         for result publication in the study. Otherwise, if automatic
4791         #         publication is switched on, default value is used for result name.
4792         #
4793         #  @return List of sub-shapes of theShape1, shared with theShape2.
4794         #
4795         #  @ref swig_GetSharedShapes "Example"
4796         @ManageTransactions("ShapesOp")
4797         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4798             """
4799             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4800
4801             Parameters:
4802                 theShape1 Shape to find sub-shapes in.
4803                 theShape2 Shape to find shared sub-shapes with.
4804                 theShapeType Type of sub-shapes to be retrieved.
4805                 theName Object name; when specified, this parameter is used
4806                         for result publication in the study. Otherwise, if automatic
4807                         publication is switched on, default value is used for result name.
4808
4809             Returns:
4810                 List of sub-shapes of theShape1, shared with theShape2.
4811             """
4812             # Example: see GEOM_TestOthers.py
4813             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4814             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4815             self._autoPublish(aList, theName, "shared")
4816             return aList
4817
4818         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4819         #  @param theShapes Shapes to find common sub-shapes of.
4820         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4821         #  @param theName Object name; when specified, this parameter is used
4822         #         for result publication in the study. Otherwise, if automatic
4823         #         publication is switched on, default value is used for result name.
4824         #
4825         #  @return List of objects, that are sub-shapes of all given shapes.
4826         #
4827         #  @ref swig_GetSharedShapes "Example"
4828         @ManageTransactions("ShapesOp")
4829         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4830             """
4831             Get all sub-shapes, shared by all shapes in the list theShapes.
4832
4833             Parameters:
4834                 theShapes Shapes to find common sub-shapes of.
4835                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4836                 theName Object name; when specified, this parameter is used
4837                         for result publication in the study. Otherwise, if automatic
4838                         publication is switched on, default value is used for result name.
4839
4840             Returns:
4841                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4842             """
4843             # Example: see GEOM_TestOthers.py
4844             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4845             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4846             self._autoPublish(aList, theName, "shared")
4847             return aList
4848
4849         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4850         #  situated relatively the specified plane by the certain way,
4851         #  defined through <VAR>theState</VAR> parameter.
4852         #  @param theShape Shape to find sub-shapes of.
4853         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4854         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4855         #                direction and location of the plane to find shapes on.
4856         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4857         #  @param theName Object name; when specified, this parameter is used
4858         #         for result publication in the study. Otherwise, if automatic
4859         #         publication is switched on, default value is used for result name.
4860         #
4861         #  @return List of all found sub-shapes.
4862         #
4863         #  @ref swig_GetShapesOnPlane "Example"
4864         @ManageTransactions("ShapesOp")
4865         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4866             """
4867             Find in theShape all sub-shapes of type theShapeType,
4868             situated relatively the specified plane by the certain way,
4869             defined through theState parameter.
4870
4871             Parameters:
4872                 theShape Shape to find sub-shapes of.
4873                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4874                 theAx1 Vector (or line, or linear edge), specifying normal
4875                        direction and location of the plane to find shapes on.
4876                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4877                 theName Object name; when specified, this parameter is used
4878                         for result publication in the study. Otherwise, if automatic
4879                         publication is switched on, default value is used for result name.
4880
4881             Returns:
4882                 List of all found sub-shapes.
4883             """
4884             # Example: see GEOM_TestOthers.py
4885             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4886             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4887             self._autoPublish(aList, theName, "shapeOnPlane")
4888             return aList
4889
4890         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4891         #  situated relatively the specified plane by the certain way,
4892         #  defined through <VAR>theState</VAR> parameter.
4893         #  @param theShape Shape to find sub-shapes of.
4894         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4895         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4896         #                direction and location of the plane to find shapes on.
4897         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4898         #
4899         #  @return List of all found sub-shapes indices.
4900         #
4901         #  @ref swig_GetShapesOnPlaneIDs "Example"
4902         @ManageTransactions("ShapesOp")
4903         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4904             """
4905             Find in theShape all sub-shapes of type theShapeType,
4906             situated relatively the specified plane by the certain way,
4907             defined through theState parameter.
4908
4909             Parameters:
4910                 theShape Shape to find sub-shapes of.
4911                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4912                 theAx1 Vector (or line, or linear edge), specifying normal
4913                        direction and location of the plane to find shapes on.
4914                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4915
4916             Returns:
4917                 List of all found sub-shapes indices.
4918             """
4919             # Example: see GEOM_TestOthers.py
4920             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4921             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4922             return aList
4923
4924         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4925         #  situated relatively the specified plane by the certain way,
4926         #  defined through <VAR>theState</VAR> parameter.
4927         #  @param theShape Shape to find sub-shapes of.
4928         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4929         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4930         #                direction of the plane to find shapes on.
4931         #  @param thePnt Point specifying location of the plane to find shapes on.
4932         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4933         #  @param theName Object name; when specified, this parameter is used
4934         #         for result publication in the study. Otherwise, if automatic
4935         #         publication is switched on, default value is used for result name.
4936         #
4937         #  @return List of all found sub-shapes.
4938         #
4939         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4940         @ManageTransactions("ShapesOp")
4941         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4942             """
4943             Find in theShape all sub-shapes of type theShapeType,
4944             situated relatively the specified plane by the certain way,
4945             defined through theState parameter.
4946
4947             Parameters:
4948                 theShape Shape to find sub-shapes of.
4949                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4950                 theAx1 Vector (or line, or linear edge), specifying normal
4951                        direction and location of the plane to find shapes on.
4952                 thePnt Point specifying location of the plane to find shapes on.
4953                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4954                 theName Object name; when specified, this parameter is used
4955                         for result publication in the study. Otherwise, if automatic
4956                         publication is switched on, default value is used for result name.
4957
4958             Returns:
4959                 List of all found sub-shapes.
4960             """
4961             # Example: see GEOM_TestOthers.py
4962             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4963                                                                theAx1, thePnt, theState)
4964             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4965             self._autoPublish(aList, theName, "shapeOnPlane")
4966             return aList
4967
4968         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4969         #  situated relatively the specified plane by the certain way,
4970         #  defined through <VAR>theState</VAR> parameter.
4971         #  @param theShape Shape to find sub-shapes of.
4972         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4973         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4974         #                direction of the plane to find shapes on.
4975         #  @param thePnt Point specifying location of the plane to find shapes on.
4976         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4977         #
4978         #  @return List of all found sub-shapes indices.
4979         #
4980         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4981         @ManageTransactions("ShapesOp")
4982         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4983             """
4984             Find in theShape all sub-shapes of type theShapeType,
4985             situated relatively the specified plane by the certain way,
4986             defined through theState parameter.
4987
4988             Parameters:
4989                 theShape Shape to find sub-shapes of.
4990                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4991                 theAx1 Vector (or line, or linear edge), specifying normal
4992                        direction and location of the plane to find shapes on.
4993                 thePnt Point specifying location of the plane to find shapes on.
4994                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4995
4996             Returns:
4997                 List of all found sub-shapes indices.
4998             """
4999             # Example: see GEOM_TestOthers.py
5000             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5001                                                                   theAx1, thePnt, theState)
5002             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5003             return aList
5004
5005         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5006         #  the specified cylinder by the certain way, defined through \a theState parameter.
5007         #  @param theShape Shape to find sub-shapes of.
5008         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5009         #  @param theAxis Vector (or line, or linear edge), specifying
5010         #                 axis of the cylinder to find shapes on.
5011         #  @param theRadius Radius of the cylinder to find shapes on.
5012         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5013         #  @param theName Object name; when specified, this parameter is used
5014         #         for result publication in the study. Otherwise, if automatic
5015         #         publication is switched on, default value is used for result name.
5016         #
5017         #  @return List of all found sub-shapes.
5018         #
5019         #  @ref swig_GetShapesOnCylinder "Example"
5020         @ManageTransactions("ShapesOp")
5021         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5022             """
5023             Find in theShape all sub-shapes of type theShapeType, situated relatively
5024             the specified cylinder by the certain way, defined through theState parameter.
5025
5026             Parameters:
5027                 theShape Shape to find sub-shapes of.
5028                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5029                 theAxis Vector (or line, or linear edge), specifying
5030                         axis of the cylinder to find shapes on.
5031                 theRadius Radius of the cylinder to find shapes on.
5032                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5033                 theName Object name; when specified, this parameter is used
5034                         for result publication in the study. Otherwise, if automatic
5035                         publication is switched on, default value is used for result name.
5036
5037             Returns:
5038                 List of all found sub-shapes.
5039             """
5040             # Example: see GEOM_TestOthers.py
5041             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5042             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5043             self._autoPublish(aList, theName, "shapeOnCylinder")
5044             return aList
5045
5046         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5047         #  the specified cylinder by the certain way, defined through \a theState parameter.
5048         #  @param theShape Shape to find sub-shapes of.
5049         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5050         #  @param theAxis Vector (or line, or linear edge), specifying
5051         #                 axis of the cylinder to find shapes on.
5052         #  @param theRadius Radius of the cylinder to find shapes on.
5053         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5054         #
5055         #  @return List of all found sub-shapes indices.
5056         #
5057         #  @ref swig_GetShapesOnCylinderIDs "Example"
5058         @ManageTransactions("ShapesOp")
5059         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5060             """
5061             Find in theShape all sub-shapes of type theShapeType, situated relatively
5062             the specified cylinder by the certain way, defined through theState parameter.
5063
5064             Parameters:
5065                 theShape Shape to find sub-shapes of.
5066                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5067                 theAxis Vector (or line, or linear edge), specifying
5068                         axis of the cylinder to find shapes on.
5069                 theRadius Radius of the cylinder to find shapes on.
5070                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5071
5072             Returns:
5073                 List of all found sub-shapes indices.
5074             """
5075             # Example: see GEOM_TestOthers.py
5076             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5077             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5078             return aList
5079
5080         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5081         #  the specified cylinder by the certain way, defined through \a theState parameter.
5082         #  @param theShape Shape to find sub-shapes of.
5083         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5084         #  @param theAxis Vector (or line, or linear edge), specifying
5085         #                 axis of the cylinder to find shapes on.
5086         #  @param thePnt Point specifying location of the bottom of the cylinder.
5087         #  @param theRadius Radius of the cylinder to find shapes on.
5088         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5089         #  @param theName Object name; when specified, this parameter is used
5090         #         for result publication in the study. Otherwise, if automatic
5091         #         publication is switched on, default value is used for result name.
5092         #
5093         #  @return List of all found sub-shapes.
5094         #
5095         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5096         @ManageTransactions("ShapesOp")
5097         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5098             """
5099             Find in theShape all sub-shapes of type theShapeType, situated relatively
5100             the specified cylinder by the certain way, defined through theState parameter.
5101
5102             Parameters:
5103                 theShape Shape to find sub-shapes of.
5104                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5105                 theAxis Vector (or line, or linear edge), specifying
5106                         axis of the cylinder to find shapes on.
5107                 theRadius Radius of the cylinder to find shapes on.
5108                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5109                 theName Object name; when specified, this parameter is used
5110                         for result publication in the study. Otherwise, if automatic
5111                         publication is switched on, default value is used for result name.
5112
5113             Returns:
5114                 List of all found sub-shapes.
5115             """
5116             # Example: see GEOM_TestOthers.py
5117             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5118             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5119             self._autoPublish(aList, theName, "shapeOnCylinder")
5120             return aList
5121
5122         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5123         #  the specified cylinder by the certain way, defined through \a theState parameter.
5124         #  @param theShape Shape to find sub-shapes of.
5125         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5126         #  @param theAxis Vector (or line, or linear edge), specifying
5127         #                 axis of the cylinder to find shapes on.
5128         #  @param thePnt Point specifying location of the bottom of the cylinder.
5129         #  @param theRadius Radius of the cylinder to find shapes on.
5130         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5131         #
5132         #  @return List of all found sub-shapes indices
5133         #
5134         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5135         @ManageTransactions("ShapesOp")
5136         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5137             """
5138             Find in theShape all sub-shapes of type theShapeType, situated relatively
5139             the specified cylinder by the certain way, defined through theState parameter.
5140
5141             Parameters:
5142                 theShape Shape to find sub-shapes of.
5143                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5144                 theAxis Vector (or line, or linear edge), specifying
5145                         axis of the cylinder to find shapes on.
5146                 theRadius Radius of the cylinder to find shapes on.
5147                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5148
5149             Returns:
5150                 List of all found sub-shapes indices.
5151             """
5152             # Example: see GEOM_TestOthers.py
5153             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5154             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5155             return aList
5156
5157         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5158         #  the specified sphere by the certain way, defined through \a theState parameter.
5159         #  @param theShape Shape to find sub-shapes of.
5160         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5161         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5162         #  @param theRadius Radius of the sphere to find shapes on.
5163         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5164         #  @param theName Object name; when specified, this parameter is used
5165         #         for result publication in the study. Otherwise, if automatic
5166         #         publication is switched on, default value is used for result name.
5167         #
5168         #  @return List of all found sub-shapes.
5169         #
5170         #  @ref swig_GetShapesOnSphere "Example"
5171         @ManageTransactions("ShapesOp")
5172         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5173             """
5174             Find in theShape all sub-shapes of type theShapeType, situated relatively
5175             the specified sphere by the certain way, defined through theState parameter.
5176
5177             Parameters:
5178                 theShape Shape to find sub-shapes of.
5179                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5180                 theCenter Point, specifying center of the sphere to find shapes on.
5181                 theRadius Radius of the sphere to find shapes on.
5182                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5183                 theName Object name; when specified, this parameter is used
5184                         for result publication in the study. Otherwise, if automatic
5185                         publication is switched on, default value is used for result name.
5186
5187             Returns:
5188                 List of all found sub-shapes.
5189             """
5190             # Example: see GEOM_TestOthers.py
5191             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5192             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5193             self._autoPublish(aList, theName, "shapeOnSphere")
5194             return aList
5195
5196         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5197         #  the specified sphere by the certain way, defined through \a theState parameter.
5198         #  @param theShape Shape to find sub-shapes of.
5199         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5200         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5201         #  @param theRadius Radius of the sphere to find shapes on.
5202         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5203         #
5204         #  @return List of all found sub-shapes indices.
5205         #
5206         #  @ref swig_GetShapesOnSphereIDs "Example"
5207         @ManageTransactions("ShapesOp")
5208         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5209             """
5210             Find in theShape all sub-shapes of type theShapeType, situated relatively
5211             the specified sphere by the certain way, defined through theState parameter.
5212
5213             Parameters:
5214                 theShape Shape to find sub-shapes of.
5215                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5216                 theCenter Point, specifying center of the sphere to find shapes on.
5217                 theRadius Radius of the sphere to find shapes on.
5218                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5219
5220             Returns:
5221                 List of all found sub-shapes indices.
5222             """
5223             # Example: see GEOM_TestOthers.py
5224             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5225             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5226             return aList
5227
5228         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5229         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5230         #  @param theShape Shape to find sub-shapes of.
5231         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5232         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5233         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5234         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5235         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5236         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5237         #  @param theName Object name; when specified, this parameter is used
5238         #         for result publication in the study. Otherwise, if automatic
5239         #         publication is switched on, default value is used for result name.
5240         #
5241         #  @return List of all found sub-shapes.
5242         #
5243         #  @ref swig_GetShapesOnQuadrangle "Example"
5244         @ManageTransactions("ShapesOp")
5245         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5246                                   theTopLeftPoint, theTopRigthPoint,
5247                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5248             """
5249             Find in theShape all sub-shapes of type theShapeType, situated relatively
5250             the specified quadrangle by the certain way, defined through theState parameter.
5251
5252             Parameters:
5253                 theShape Shape to find sub-shapes of.
5254                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5255                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5256                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5257                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5258                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5259                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5260                 theName Object name; when specified, this parameter is used
5261                         for result publication in the study. Otherwise, if automatic
5262                         publication is switched on, default value is used for result name.
5263
5264             Returns:
5265                 List of all found sub-shapes.
5266             """
5267             # Example: see GEOM_TestOthers.py
5268             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5269                                                         theTopLeftPoint, theTopRigthPoint,
5270                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5271             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5272             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5273             return aList
5274
5275         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5276         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5277         #  @param theShape Shape to find sub-shapes of.
5278         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5279         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5280         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5281         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5282         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5283         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5284         #
5285         #  @return List of all found sub-shapes indices.
5286         #
5287         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5288         @ManageTransactions("ShapesOp")
5289         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5290                                      theTopLeftPoint, theTopRigthPoint,
5291                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5292             """
5293             Find in theShape all sub-shapes of type theShapeType, situated relatively
5294             the specified quadrangle by the certain way, defined through theState parameter.
5295
5296             Parameters:
5297                 theShape Shape to find sub-shapes of.
5298                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5299                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5300                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5301                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5302                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5303                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5304
5305             Returns:
5306                 List of all found sub-shapes indices.
5307             """
5308
5309             # Example: see GEOM_TestOthers.py
5310             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5311                                                            theTopLeftPoint, theTopRigthPoint,
5312                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5313             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5314             return aList
5315
5316         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5317         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5318         #  @param theBox Shape for relative comparing.
5319         #  @param theShape Shape to find sub-shapes of.
5320         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5321         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5322         #  @param theName Object name; when specified, this parameter is used
5323         #         for result publication in the study. Otherwise, if automatic
5324         #         publication is switched on, default value is used for result name.
5325         #
5326         #  @return List of all found sub-shapes.
5327         #
5328         #  @ref swig_GetShapesOnBox "Example"
5329         @ManageTransactions("ShapesOp")
5330         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5331             """
5332             Find in theShape all sub-shapes of type theShapeType, situated relatively
5333             the specified theBox by the certain way, defined through theState parameter.
5334
5335             Parameters:
5336                 theBox Shape for relative comparing.
5337                 theShape Shape to find sub-shapes of.
5338                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5339                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5340                 theName Object name; when specified, this parameter is used
5341                         for result publication in the study. Otherwise, if automatic
5342                         publication is switched on, default value is used for result name.
5343
5344             Returns:
5345                 List of all found sub-shapes.
5346             """
5347             # Example: see GEOM_TestOthers.py
5348             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5349             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5350             self._autoPublish(aList, theName, "shapeOnBox")
5351             return aList
5352
5353         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5354         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5355         #  @param theBox Shape for relative comparing.
5356         #  @param theShape Shape to find sub-shapes of.
5357         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5358         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5359         #
5360         #  @return List of all found sub-shapes indices.
5361         #
5362         #  @ref swig_GetShapesOnBoxIDs "Example"
5363         @ManageTransactions("ShapesOp")
5364         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5365             """
5366             Find in theShape all sub-shapes of type theShapeType, situated relatively
5367             the specified theBox by the certain way, defined through theState parameter.
5368
5369             Parameters:
5370                 theBox Shape for relative comparing.
5371                 theShape Shape to find sub-shapes of.
5372                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5373                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5374
5375             Returns:
5376                 List of all found sub-shapes indices.
5377             """
5378             # Example: see GEOM_TestOthers.py
5379             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5380             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5381             return aList
5382
5383         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5384         #  situated relatively the specified \a theCheckShape by the
5385         #  certain way, defined through \a theState parameter.
5386         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5387         #  @param theShape Shape to find sub-shapes of.
5388         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5389         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5390         #  @param theName Object name; when specified, this parameter is used
5391         #         for result publication in the study. Otherwise, if automatic
5392         #         publication is switched on, default value is used for result name.
5393         #
5394         #  @return List of all found sub-shapes.
5395         #
5396         #  @ref swig_GetShapesOnShape "Example"
5397         @ManageTransactions("ShapesOp")
5398         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5399             """
5400             Find in theShape all sub-shapes of type theShapeType,
5401             situated relatively the specified theCheckShape by the
5402             certain way, defined through theState parameter.
5403
5404             Parameters:
5405                 theCheckShape Shape for relative comparing. It must be a solid.
5406                 theShape Shape to find sub-shapes of.
5407                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5408                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5409                 theName Object name; when specified, this parameter is used
5410                         for result publication in the study. Otherwise, if automatic
5411                         publication is switched on, default value is used for result name.
5412
5413             Returns:
5414                 List of all found sub-shapes.
5415             """
5416             # Example: see GEOM_TestOthers.py
5417             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5418                                                    theShapeType, theState)
5419             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5420             self._autoPublish(aList, theName, "shapeOnShape")
5421             return aList
5422
5423         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5424         #  situated relatively the specified \a theCheckShape by the
5425         #  certain way, defined through \a theState parameter.
5426         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5427         #  @param theShape Shape to find sub-shapes of.
5428         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5429         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5430         #  @param theName Object name; when specified, this parameter is used
5431         #         for result publication in the study. Otherwise, if automatic
5432         #         publication is switched on, default value is used for result name.
5433         #
5434         #  @return All found sub-shapes as compound.
5435         #
5436         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5437         @ManageTransactions("ShapesOp")
5438         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5439             """
5440             Find in theShape all sub-shapes of type theShapeType,
5441             situated relatively the specified theCheckShape by the
5442             certain way, defined through theState parameter.
5443
5444             Parameters:
5445                 theCheckShape Shape for relative comparing. It must be a solid.
5446                 theShape Shape to find sub-shapes of.
5447                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5448                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5449                 theName Object name; when specified, this parameter is used
5450                         for result publication in the study. Otherwise, if automatic
5451                         publication is switched on, default value is used for result name.
5452
5453             Returns:
5454                 All found sub-shapes as compound.
5455             """
5456             # Example: see GEOM_TestOthers.py
5457             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5458                                                              theShapeType, theState)
5459             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5460             self._autoPublish(anObj, theName, "shapeOnShape")
5461             return anObj
5462
5463         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5464         #  situated relatively the specified \a theCheckShape by the
5465         #  certain way, defined through \a theState parameter.
5466         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5467         #  @param theShape Shape to find sub-shapes of.
5468         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5469         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5470         #
5471         #  @return List of all found sub-shapes indices.
5472         #
5473         #  @ref swig_GetShapesOnShapeIDs "Example"
5474         @ManageTransactions("ShapesOp")
5475         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5476             """
5477             Find in theShape all sub-shapes of type theShapeType,
5478             situated relatively the specified theCheckShape by the
5479             certain way, defined through theState parameter.
5480
5481             Parameters:
5482                 theCheckShape Shape for relative comparing. It must be a solid.
5483                 theShape Shape to find sub-shapes of.
5484                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5485                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5486
5487             Returns:
5488                 List of all found sub-shapes indices.
5489             """
5490             # Example: see GEOM_TestOthers.py
5491             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5492                                                       theShapeType, theState)
5493             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5494             return aList
5495
5496         ## Get sub-shape(s) of theShapeWhere, which are
5497         #  coincident with \a theShapeWhat or could be a part of it.
5498         #  @param theShapeWhere Shape to find sub-shapes of.
5499         #  @param theShapeWhat Shape, specifying what to find.
5500         #  @param isNewImplementation implementation of GetInPlace functionality
5501         #             (default = False, old alghorithm based on shape properties)
5502         #  @param theName Object name; when specified, this parameter is used
5503         #         for result publication in the study. Otherwise, if automatic
5504         #         publication is switched on, default value is used for result name.
5505         #
5506         #  @return Group of all found sub-shapes or a single found sub-shape.
5507         #
5508         #  @note This function has a restriction on argument shapes.
5509         #        If \a theShapeWhere has curved parts with significantly
5510         #        outstanding centres (i.e. the mass centre of a part is closer to
5511         #        \a theShapeWhat than to the part), such parts will not be found.
5512         #        @image html get_in_place_lost_part.png
5513         #
5514         #  @ref swig_GetInPlace "Example"
5515         @ManageTransactions("ShapesOp")
5516         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5517             """
5518             Get sub-shape(s) of theShapeWhere, which are
5519             coincident with  theShapeWhat or could be a part of it.
5520
5521             Parameters:
5522                 theShapeWhere Shape to find sub-shapes of.
5523                 theShapeWhat Shape, specifying what to find.
5524                 isNewImplementation Implementation of GetInPlace functionality
5525                                     (default = False, old alghorithm based on shape properties)
5526                 theName Object name; when specified, this parameter is used
5527                         for result publication in the study. Otherwise, if automatic
5528                         publication is switched on, default value is used for result name.
5529
5530             Returns:
5531                 Group of all found sub-shapes or a single found sub-shape.
5532
5533
5534             Note:
5535                 This function has a restriction on argument shapes.
5536                 If theShapeWhere has curved parts with significantly
5537                 outstanding centres (i.e. the mass centre of a part is closer to
5538                 theShapeWhat than to the part), such parts will not be found.
5539             """
5540             # Example: see GEOM_TestOthers.py
5541             anObj = None
5542             if isNewImplementation:
5543                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5544             else:
5545                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5546                 pass
5547             RaiseIfFailed("GetInPlace", self.ShapesOp)
5548             self._autoPublish(anObj, theName, "inplace")
5549             return anObj
5550
5551         ## Get sub-shape(s) of \a theShapeWhere, which are
5552         #  coincident with \a theShapeWhat or could be a part of it.
5553         #
5554         #  Implementation of this method is based on a saved history of an operation,
5555         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5556         #  arguments (an argument shape or a sub-shape of an argument shape).
5557         #  The operation could be the Partition or one of boolean operations,
5558         #  performed on simple shapes (not on compounds).
5559         #
5560         #  @param theShapeWhere Shape to find sub-shapes of.
5561         #  @param theShapeWhat Shape, specifying what to find (must be in the
5562         #                      building history of the ShapeWhere).
5563         #  @param theName Object name; when specified, this parameter is used
5564         #         for result publication in the study. Otherwise, if automatic
5565         #         publication is switched on, default value is used for result name.
5566         #
5567         #  @return Group of all found sub-shapes or a single found sub-shape.
5568         #
5569         #  @ref swig_GetInPlace "Example"
5570         @ManageTransactions("ShapesOp")
5571         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5572             """
5573             Implementation of this method is based on a saved history of an operation,
5574             produced theShapeWhere. The theShapeWhat must be among this operation's
5575             arguments (an argument shape or a sub-shape of an argument shape).
5576             The operation could be the Partition or one of boolean operations,
5577             performed on simple shapes (not on compounds).
5578
5579             Parameters:
5580                 theShapeWhere Shape to find sub-shapes of.
5581                 theShapeWhat Shape, specifying what to find (must be in the
5582                                 building history of the ShapeWhere).
5583                 theName Object name; when specified, this parameter is used
5584                         for result publication in the study. Otherwise, if automatic
5585                         publication is switched on, default value is used for result name.
5586
5587             Returns:
5588                 Group of all found sub-shapes or a single found sub-shape.
5589             """
5590             # Example: see GEOM_TestOthers.py
5591             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5592             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5593             self._autoPublish(anObj, theName, "inplace")
5594             return anObj
5595
5596         ## Get sub-shape of theShapeWhere, which is
5597         #  equal to \a theShapeWhat.
5598         #  @param theShapeWhere Shape to find sub-shape of.
5599         #  @param theShapeWhat Shape, specifying what to find.
5600         #  @param theName Object name; when specified, this parameter is used
5601         #         for result publication in the study. Otherwise, if automatic
5602         #         publication is switched on, default value is used for result name.
5603         #
5604         #  @return New GEOM.GEOM_Object for found sub-shape.
5605         #
5606         #  @ref swig_GetSame "Example"
5607         @ManageTransactions("ShapesOp")
5608         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5609             """
5610             Get sub-shape of theShapeWhere, which is
5611             equal to theShapeWhat.
5612
5613             Parameters:
5614                 theShapeWhere Shape to find sub-shape of.
5615                 theShapeWhat Shape, specifying what to find.
5616                 theName Object name; when specified, this parameter is used
5617                         for result publication in the study. Otherwise, if automatic
5618                         publication is switched on, default value is used for result name.
5619
5620             Returns:
5621                 New GEOM.GEOM_Object for found sub-shape.
5622             """
5623             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5624             RaiseIfFailed("GetSame", self.ShapesOp)
5625             self._autoPublish(anObj, theName, "sameShape")
5626             return anObj
5627
5628
5629         ## Get sub-shape indices of theShapeWhere, which is
5630         #  equal to \a theShapeWhat.
5631         #  @param theShapeWhere Shape to find sub-shape of.
5632         #  @param theShapeWhat Shape, specifying what to find.
5633         #  @return List of all found sub-shapes indices.
5634         #
5635         #  @ref swig_GetSame "Example"
5636         @ManageTransactions("ShapesOp")
5637         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5638             """
5639             Get sub-shape indices of theShapeWhere, which is
5640             equal to theShapeWhat.
5641
5642             Parameters:
5643                 theShapeWhere Shape to find sub-shape of.
5644                 theShapeWhat Shape, specifying what to find.
5645
5646             Returns:
5647                 List of all found sub-shapes indices.
5648             """
5649             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5650             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5651             return anObj
5652
5653
5654         # end of l4_obtain
5655         ## @}
5656
5657         ## @addtogroup l4_access
5658         ## @{
5659
5660         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5661         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5662         #  @param aShape Shape to get sub-shape of.
5663         #  @param ListOfID List of sub-shapes indices.
5664         #  @param theName Object name; when specified, this parameter is used
5665         #         for result publication in the study. Otherwise, if automatic
5666         #         publication is switched on, default value is used for result name.
5667         #
5668         #  @return Found sub-shape.
5669         #
5670         #  @ref swig_all_decompose "Example"
5671         def GetSubShape(self, aShape, ListOfID, theName=None):
5672             """
5673             Obtain a composite sub-shape of aShape, composed from sub-shapes
5674             of aShape, selected by their unique IDs inside aShape
5675
5676             Parameters:
5677                 aShape Shape to get sub-shape of.
5678                 ListOfID List of sub-shapes indices.
5679                 theName Object name; when specified, this parameter is used
5680                         for result publication in the study. Otherwise, if automatic
5681                         publication is switched on, default value is used for result name.
5682
5683             Returns:
5684                 Found sub-shape.
5685             """
5686             # Example: see GEOM_TestAll.py
5687             anObj = self.AddSubShape(aShape,ListOfID)
5688             self._autoPublish(anObj, theName, "subshape")
5689             return anObj
5690
5691         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5692         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5693         #  @param aShape Shape to get sub-shape of.
5694         #  @param aSubShape Sub-shapes of aShape.
5695         #  @return ID of found sub-shape.
5696         #
5697         #  @ref swig_all_decompose "Example"
5698         @ManageTransactions("LocalOp")
5699         def GetSubShapeID(self, aShape, aSubShape):
5700             """
5701             Obtain unique ID of sub-shape aSubShape inside aShape
5702             of aShape, selected by their unique IDs inside aShape
5703
5704             Parameters:
5705                aShape Shape to get sub-shape of.
5706                aSubShape Sub-shapes of aShape.
5707
5708             Returns:
5709                ID of found sub-shape.
5710             """
5711             # Example: see GEOM_TestAll.py
5712             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5713             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5714             return anID
5715
5716         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5717         #  This function is provided for performance purpose. The complexity is O(n) with n
5718         #  the number of subobjects of aShape
5719         #  @param aShape Shape to get sub-shape of.
5720         #  @param aSubShapes Sub-shapes of aShape.
5721         #  @return list of IDs of found sub-shapes.
5722         #
5723         #  @ref swig_all_decompose "Example"
5724         @ManageTransactions("ShapesOp")
5725         def GetSubShapesIDs(self, aShape, aSubShapes):
5726             """
5727             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5728             This function is provided for performance purpose. The complexity is O(n) with n
5729             the number of subobjects of aShape
5730
5731             Parameters:
5732                aShape Shape to get sub-shape of.
5733                aSubShapes Sub-shapes of aShape.
5734
5735             Returns:
5736                List of IDs of found sub-shape.
5737             """
5738             # Example: see GEOM_TestAll.py
5739             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5740             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5741             return anIDs
5742
5743         # end of l4_access
5744         ## @}
5745
5746         ## @addtogroup l4_decompose
5747         ## @{
5748
5749         ## Get all sub-shapes and groups of \a theShape,
5750         #  that were created already by any other methods.
5751         #  @param theShape Any shape.
5752         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5753         #                       returned, else all found sub-shapes and groups.
5754         #  @return List of existing sub-objects of \a theShape.
5755         #
5756         #  @ref swig_all_decompose "Example"
5757         @ManageTransactions("ShapesOp")
5758         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5759             """
5760             Get all sub-shapes and groups of theShape,
5761             that were created already by any other methods.
5762
5763             Parameters:
5764                 theShape Any shape.
5765                 theGroupsOnly If this parameter is TRUE, only groups will be
5766                                  returned, else all found sub-shapes and groups.
5767
5768             Returns:
5769                 List of existing sub-objects of theShape.
5770             """
5771             # Example: see GEOM_TestAll.py
5772             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5773             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5774             return ListObj
5775
5776         ## Get all groups of \a theShape,
5777         #  that were created already by any other methods.
5778         #  @param theShape Any shape.
5779         #  @return List of existing groups of \a theShape.
5780         #
5781         #  @ref swig_all_decompose "Example"
5782         @ManageTransactions("ShapesOp")
5783         def GetGroups(self, theShape):
5784             """
5785             Get all groups of theShape,
5786             that were created already by any other methods.
5787
5788             Parameters:
5789                 theShape Any shape.
5790
5791             Returns:
5792                 List of existing groups of theShape.
5793             """
5794             # Example: see GEOM_TestAll.py
5795             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5796             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5797             return ListObj
5798
5799         ## Explode a shape on sub-shapes of a given type.
5800         #  If the shape itself matches the type, it is also returned.
5801         #  @param aShape Shape to be exploded.
5802         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5803         #  @param theName Object name; when specified, this parameter is used
5804         #         for result publication in the study. Otherwise, if automatic
5805         #         publication is switched on, default value is used for result name.
5806         #
5807         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5808         #
5809         #  @ref swig_all_decompose "Example"
5810         @ManageTransactions("ShapesOp")
5811         def SubShapeAll(self, aShape, aType, theName=None):
5812             """
5813             Explode a shape on sub-shapes of a given type.
5814             If the shape itself matches the type, it is also returned.
5815
5816             Parameters:
5817                 aShape Shape to be exploded.
5818                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5819                 theName Object name; when specified, this parameter is used
5820                         for result publication in the study. Otherwise, if automatic
5821                         publication is switched on, default value is used for result name.
5822
5823             Returns:
5824                 List of sub-shapes of type theShapeType, contained in theShape.
5825             """
5826             # Example: see GEOM_TestAll.py
5827             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5828             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5829             self._autoPublish(ListObj, theName, "subshape")
5830             return ListObj
5831
5832         ## Explode a shape on sub-shapes of a given type.
5833         #  @param aShape Shape to be exploded.
5834         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5835         #  @return List of IDs of sub-shapes.
5836         #
5837         #  @ref swig_all_decompose "Example"
5838         @ManageTransactions("ShapesOp")
5839         def SubShapeAllIDs(self, aShape, aType):
5840             """
5841             Explode a shape on sub-shapes of a given type.
5842
5843             Parameters:
5844                 aShape Shape to be exploded (see geompy.ShapeType)
5845                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5846
5847             Returns:
5848                 List of IDs of sub-shapes.
5849             """
5850             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5851             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5852             return ListObj
5853
5854         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5855         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5856         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5857         #  @param aShape Shape to get sub-shape of.
5858         #  @param ListOfInd List of sub-shapes indices.
5859         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5860         #  @param theName Object name; when specified, this parameter is used
5861         #         for result publication in the study. Otherwise, if automatic
5862         #         publication is switched on, default value is used for result name.
5863         #
5864         #  @return A compound of sub-shapes of aShape.
5865         #
5866         #  @ref swig_all_decompose "Example"
5867         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5868             """
5869             Obtain a compound of sub-shapes of aShape,
5870             selected by their indices in list of all sub-shapes of type aType.
5871             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5872
5873             Parameters:
5874                 aShape Shape to get sub-shape of.
5875                 ListOfID List of sub-shapes indices.
5876                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5877                 theName Object name; when specified, this parameter is used
5878                         for result publication in the study. Otherwise, if automatic
5879                         publication is switched on, default value is used for result name.
5880
5881             Returns:
5882                 A compound of sub-shapes of aShape.
5883             """
5884             # Example: see GEOM_TestAll.py
5885             ListOfIDs = []
5886             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5887             for ind in ListOfInd:
5888                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5889             # note: auto-publishing is done in self.GetSubShape()
5890             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5891             return anObj
5892
5893         ## Explode a shape on sub-shapes of a given type.
5894         #  Sub-shapes will be sorted taking into account their gravity centers,
5895         #  to provide stable order of sub-shapes.
5896         #  If the shape itself matches the type, it is also returned.
5897         #  @param aShape Shape to be exploded.
5898         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5899         #  @param theName Object name; when specified, this parameter is used
5900         #         for result publication in the study. Otherwise, if automatic
5901         #         publication is switched on, default value is used for result name.
5902         #
5903         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5904         #
5905         #  @ref swig_SubShapeAllSorted "Example"
5906         @ManageTransactions("ShapesOp")
5907         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5908             """
5909             Explode a shape on sub-shapes of a given type.
5910             Sub-shapes will be sorted taking into account their gravity centers,
5911             to provide stable order of sub-shapes.
5912             If the shape itself matches the type, it is also returned.
5913
5914             Parameters:
5915                 aShape Shape to be exploded.
5916                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5917                 theName Object name; when specified, this parameter is used
5918                         for result publication in the study. Otherwise, if automatic
5919                         publication is switched on, default value is used for result name.
5920
5921             Returns:
5922                 List of sub-shapes of type theShapeType, contained in theShape.
5923             """
5924             # Example: see GEOM_TestAll.py
5925             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5926             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5927             self._autoPublish(ListObj, theName, "subshape")
5928             return ListObj
5929
5930         ## Explode a shape on sub-shapes of a given type.
5931         #  Sub-shapes will be sorted taking into account their gravity centers,
5932         #  to provide stable order of sub-shapes.
5933         #  @param aShape Shape to be exploded.
5934         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5935         #  @return List of IDs of sub-shapes.
5936         #
5937         #  @ref swig_all_decompose "Example"
5938         @ManageTransactions("ShapesOp")
5939         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5940             """
5941             Explode a shape on sub-shapes of a given type.
5942             Sub-shapes will be sorted taking into account their gravity centers,
5943             to provide stable order of sub-shapes.
5944
5945             Parameters:
5946                 aShape Shape to be exploded.
5947                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5948
5949             Returns:
5950                 List of IDs of sub-shapes.
5951             """
5952             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5953             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5954             return ListIDs
5955
5956         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5957         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5958         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5959         #  @param aShape Shape to get sub-shape of.
5960         #  @param ListOfInd List of sub-shapes indices.
5961         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5962         #  @param theName Object name; when specified, this parameter is used
5963         #         for result publication in the study. Otherwise, if automatic
5964         #         publication is switched on, default value is used for result name.
5965         #
5966         #  @return A compound of sub-shapes of aShape.
5967         #
5968         #  @ref swig_all_decompose "Example"
5969         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5970             """
5971             Obtain a compound of sub-shapes of aShape,
5972             selected by they indices in sorted list of all sub-shapes of type aType.
5973             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5974
5975             Parameters:
5976                 aShape Shape to get sub-shape of.
5977                 ListOfID List of sub-shapes indices.
5978                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5979                 theName Object name; when specified, this parameter is used
5980                         for result publication in the study. Otherwise, if automatic
5981                         publication is switched on, default value is used for result name.
5982
5983             Returns:
5984                 A compound of sub-shapes of aShape.
5985             """
5986             # Example: see GEOM_TestAll.py
5987             ListOfIDs = []
5988             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5989             for ind in ListOfInd:
5990                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5991             # note: auto-publishing is done in self.GetSubShape()
5992             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5993             return anObj
5994
5995         ## Extract shapes (excluding the main shape) of given type.
5996         #  @param aShape The shape.
5997         #  @param aType  The shape type (see ShapeType())
5998         #  @param isSorted Boolean flag to switch sorting on/off.
5999         #  @param theName Object name; when specified, this parameter is used
6000         #         for result publication in the study. Otherwise, if automatic
6001         #         publication is switched on, default value is used for result name.
6002         #
6003         #  @return List of sub-shapes of type aType, contained in aShape.
6004         #
6005         #  @ref swig_FilletChamfer "Example"
6006         @ManageTransactions("ShapesOp")
6007         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6008             """
6009             Extract shapes (excluding the main shape) of given type.
6010
6011             Parameters:
6012                 aShape The shape.
6013                 aType  The shape type (see geompy.ShapeType)
6014                 isSorted Boolean flag to switch sorting on/off.
6015                 theName Object name; when specified, this parameter is used
6016                         for result publication in the study. Otherwise, if automatic
6017                         publication is switched on, default value is used for result name.
6018
6019             Returns:
6020                 List of sub-shapes of type aType, contained in aShape.
6021             """
6022             # Example: see GEOM_TestAll.py
6023             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6024             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6025             self._autoPublish(ListObj, theName, "subshape")
6026             return ListObj
6027
6028         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6029         #  @param aShape Main shape.
6030         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6031         #  @param theName Object name; when specified, this parameter is used
6032         #         for result publication in the study. Otherwise, if automatic
6033         #         publication is switched on, default value is used for result name.
6034         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6035         #
6036         #  @ref swig_all_decompose "Example"
6037         @ManageTransactions("ShapesOp")
6038         def SubShapes(self, aShape, anIDs, theName=None):
6039             """
6040             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6041
6042             Parameters:
6043                 aShape Main shape.
6044                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6045                 theName Object name; when specified, this parameter is used
6046                         for result publication in the study. Otherwise, if automatic
6047                         publication is switched on, default value is used for result name.
6048
6049             Returns:
6050                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6051             """
6052             # Example: see GEOM_TestAll.py
6053             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6054             RaiseIfFailed("SubShapes", self.ShapesOp)
6055             self._autoPublish(ListObj, theName, "subshape")
6056             return ListObj
6057
6058         # end of l4_decompose
6059         ## @}
6060
6061         ## @addtogroup l4_decompose_d
6062         ## @{
6063
6064         ## Deprecated method
6065         #  It works like SubShapeAllSortedCentres(), but wrongly
6066         #  defines centres of faces, shells and solids.
6067         @ManageTransactions("ShapesOp")
6068         def SubShapeAllSorted(self, aShape, aType, theName=None):
6069             """
6070             Deprecated method
6071             It works like geompy.SubShapeAllSortedCentres, but wrongly
6072             defines centres of faces, shells and solids.
6073             """
6074             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6075             RaiseIfFailed("MakeExplode", self.ShapesOp)
6076             self._autoPublish(ListObj, theName, "subshape")
6077             return ListObj
6078
6079         ## Deprecated method
6080         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6081         #  defines centres of faces, shells and solids.
6082         @ManageTransactions("ShapesOp")
6083         def SubShapeAllSortedIDs(self, aShape, aType):
6084             """
6085             Deprecated method
6086             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6087             defines centres of faces, shells and solids.
6088             """
6089             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6090             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6091             return ListIDs
6092
6093         ## Deprecated method
6094         #  It works like SubShapeSortedCentres(), but has a bug
6095         #  (wrongly defines centres of faces, shells and solids).
6096         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6097             """
6098             Deprecated method
6099             It works like geompy.SubShapeSortedCentres, but has a bug
6100             (wrongly defines centres of faces, shells and solids).
6101             """
6102             ListOfIDs = []
6103             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6104             for ind in ListOfInd:
6105                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6106             # note: auto-publishing is done in self.GetSubShape()
6107             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6108             return anObj
6109
6110         # end of l4_decompose_d
6111         ## @}
6112
6113         ## @addtogroup l3_healing
6114         ## @{
6115
6116         ## Apply a sequence of Shape Healing operators to the given object.
6117         #  @param theShape Shape to be processed.
6118         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6119         #  @param theParameters List of names of parameters
6120         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6121         #  @param theValues List of values of parameters, in the same order
6122         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6123         #  @param theName Object name; when specified, this parameter is used
6124         #         for result publication in the study. Otherwise, if automatic
6125         #         publication is switched on, default value is used for result name.
6126         #
6127         #  <b> Operators and Parameters: </b> \n
6128         #
6129         #  * \b FixShape - corrects invalid shapes. \n
6130         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6131         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6132         #
6133         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6134         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6135         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6136         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6137         #
6138         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6139         #    surfaces in segments using a certain angle. \n
6140         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6141         #    if Angle=180, four if Angle=90, etc). \n
6142         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6143         #
6144         #  * \b SplitClosedFaces - splits closed faces in segments.
6145         #    The number of segments depends on the number of splitting points.\n
6146         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6147         #
6148         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6149         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6150         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6151         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6152         #   This and the previous parameters can take the following values:\n
6153         #   \b Parametric \b Continuity \n
6154         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6155         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6156         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6157         #    ruling out sharp edges).\n
6158         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6159         #       are of the same magnitude).\n
6160         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6161         #    or surfaces (d/du C(u)) are the same at junction. \n
6162         #   \b Geometric \b Continuity \n
6163         #   \b G1: first derivatives are proportional at junction.\n
6164         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6165         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6166         #   \b G2: first and second derivatives are proportional at junction.
6167         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6168         #    continuity requires that the underlying parameterization was continuous as well.
6169         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6170         #
6171         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6172         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6173         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6174         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6175         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6176         #       with the specified parameters.\n
6177         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6178         #       with the specified parameters.\n
6179         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6180         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6181         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6182         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6183         #
6184         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6185         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6186         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6187         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6188         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6189         #
6190         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6191         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6192         #
6193         #
6194         #  @return New GEOM.GEOM_Object, containing processed shape.
6195         #
6196         #  \n @ref tui_shape_processing "Example"
6197         @ManageTransactions("HealOp")
6198         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6199             """
6200             Apply a sequence of Shape Healing operators to the given object.
6201
6202             Parameters:
6203                 theShape Shape to be processed.
6204                 theValues List of values of parameters, in the same order
6205                           as parameters are listed in theParameters list.
6206                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6207                 theParameters List of names of parameters
6208                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6209                 theName Object name; when specified, this parameter is used
6210                         for result publication in the study. Otherwise, if automatic
6211                         publication is switched on, default value is used for result name.
6212
6213                 Operators and Parameters:
6214
6215                  * FixShape - corrects invalid shapes.
6216                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6217                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6218                  * FixFaceSize - removes small faces, such as spots and strips.
6219                      * FixFaceSize.Tolerance - defines minimum possible face size.
6220                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
6221                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6222                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6223                                 in segments using a certain angle.
6224                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6225                                           if Angle=180, four if Angle=90, etc).
6226                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6227                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6228                                       splitting points.
6229                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6230                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6231                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6232                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6233                      * SplitContinuity.CurveContinuity - required continuity for curves.
6234                        This and the previous parameters can take the following values:
6235
6236                        Parametric Continuity:
6237                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6238                                                    coincidental. The curves or surfaces may still meet at an angle,
6239                                                    giving rise to a sharp corner or edge).
6240                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6241                                                    are parallel, ruling out sharp edges).
6242                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6243                                                   or surfaces are of the same magnitude).
6244                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6245                           curves or surfaces (d/du C(u)) are the same at junction.
6246
6247                        Geometric Continuity:
6248                        G1: first derivatives are proportional at junction.
6249                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6250                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6251                        G2: first and second derivatives are proportional at junction. As the names imply,
6252                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6253                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6254                            geometric continuity of order n, but not vice-versa.
6255                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6256                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6257                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6258                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6259                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6260                                                         the specified parameters.
6261                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6262                                                         the specified parameters.
6263                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6264                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6265                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6266                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6267                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6268                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6269                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6270                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6271                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6272                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6273                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6274
6275             Returns:
6276                 New GEOM.GEOM_Object, containing processed shape.
6277
6278             Note: For more information look through SALOME Geometry User's Guide->
6279                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6280             """
6281             # Example: see GEOM_TestHealing.py
6282             theValues,Parameters = ParseList(theValues)
6283             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6284             # To avoid script failure in case of good argument shape
6285             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6286                 return theShape
6287             RaiseIfFailed("ProcessShape", self.HealOp)
6288             for string in (theOperators + theParameters):
6289                 Parameters = ":" + Parameters
6290                 pass
6291             anObj.SetParameters(Parameters)
6292             self._autoPublish(anObj, theName, "healed")
6293             return anObj
6294
6295         ## Remove faces from the given object (shape).
6296         #  @param theObject Shape to be processed.
6297         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6298         #                  removes ALL faces of the given object.
6299         #  @param theName Object name; when specified, this parameter is used
6300         #         for result publication in the study. Otherwise, if automatic
6301         #         publication is switched on, default value is used for result name.
6302         #
6303         #  @return New GEOM.GEOM_Object, containing processed shape.
6304         #
6305         #  @ref tui_suppress_faces "Example"
6306         @ManageTransactions("HealOp")
6307         def SuppressFaces(self, theObject, theFaces, theName=None):
6308             """
6309             Remove faces from the given object (shape).
6310
6311             Parameters:
6312                 theObject Shape to be processed.
6313                 theFaces Indices of faces to be removed, if EMPTY then the method
6314                          removes ALL faces of the given object.
6315                 theName Object name; when specified, this parameter is used
6316                         for result publication in the study. Otherwise, if automatic
6317                         publication is switched on, default value is used for result name.
6318
6319             Returns:
6320                 New GEOM.GEOM_Object, containing processed shape.
6321             """
6322             # Example: see GEOM_TestHealing.py
6323             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6324             RaiseIfFailed("SuppressFaces", self.HealOp)
6325             self._autoPublish(anObj, theName, "suppressFaces")
6326             return anObj
6327
6328         ## Sewing of faces into a single shell.
6329         #  @param ListShape Shapes to be processed.
6330         #  @param theTolerance Required tolerance value.
6331         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6332         #  @param theName Object name; when specified, this parameter is used
6333         #         for result publication in the study. Otherwise, if automatic
6334         #         publication is switched on, default value is used for result name.
6335         #
6336         #  @return New GEOM.GEOM_Object, containing a result shell.
6337         #
6338         #  @ref tui_sewing "Example"
6339         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6340             """
6341             Sewing of faces into a single shell.
6342
6343             Parameters:
6344                 ListShape Shapes to be processed.
6345                 theTolerance Required tolerance value.
6346                 AllowNonManifold Flag that allows non-manifold sewing.
6347                 theName Object name; when specified, this parameter is used
6348                         for result publication in the study. Otherwise, if automatic
6349                         publication is switched on, default value is used for result name.
6350
6351             Returns:
6352                 New GEOM.GEOM_Object, containing containing a result shell.
6353             """
6354             # Example: see GEOM_TestHealing.py
6355             # note: auto-publishing is done in self.Sew()
6356             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6357             return anObj
6358
6359         ## Sewing of faces into a single shell.
6360         #  @param ListShape Shapes to be processed.
6361         #  @param theTolerance Required tolerance value.
6362         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6363         #  @param theName Object name; when specified, this parameter is used
6364         #         for result publication in the study. Otherwise, if automatic
6365         #         publication is switched on, default value is used for result name.
6366         #
6367         #  @return New GEOM.GEOM_Object, containing a result shell.
6368         @ManageTransactions("HealOp")
6369         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6370             """
6371             Sewing of faces into a single shell.
6372
6373             Parameters:
6374                 ListShape Shapes to be processed.
6375                 theTolerance Required tolerance value.
6376                 AllowNonManifold Flag that allows non-manifold sewing.
6377                 theName Object name; when specified, this parameter is used
6378                         for result publication in the study. Otherwise, if automatic
6379                         publication is switched on, default value is used for result name.
6380
6381             Returns:
6382                 New GEOM.GEOM_Object, containing a result shell.
6383             """
6384             # Example: see MakeSewing() above
6385             theTolerance,Parameters = ParseParameters(theTolerance)
6386             if AllowNonManifold:
6387                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6388             else:
6389                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6390             # To avoid script failure in case of good argument shape
6391             # (Fix of test cases geom/bugs11/L7,L8)
6392             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6393                 return anObj
6394             RaiseIfFailed("Sew", self.HealOp)
6395             anObj.SetParameters(Parameters)
6396             self._autoPublish(anObj, theName, "sewed")
6397             return anObj
6398
6399         ## Rebuild the topology of theCompound of solids by removing
6400         #  of the faces that are shared by several solids.
6401         #  @param theCompound Shape to be processed.
6402         #  @param theName Object name; when specified, this parameter is used
6403         #         for result publication in the study. Otherwise, if automatic
6404         #         publication is switched on, default value is used for result name.
6405         #
6406         #  @return New GEOM.GEOM_Object, containing processed shape.
6407         #
6408         #  @ref tui_remove_webs "Example"
6409         @ManageTransactions("HealOp")
6410         def RemoveInternalFaces (self, theCompound, theName=None):
6411             """
6412             Rebuild the topology of theCompound of solids by removing
6413             of the faces that are shared by several solids.
6414
6415             Parameters:
6416                 theCompound Shape to be processed.
6417                 theName Object name; when specified, this parameter is used
6418                         for result publication in the study. Otherwise, if automatic
6419                         publication is switched on, default value is used for result name.
6420
6421             Returns:
6422                 New GEOM.GEOM_Object, containing processed shape.
6423             """
6424             # Example: see GEOM_TestHealing.py
6425             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6426             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6427             self._autoPublish(anObj, theName, "removeWebs")
6428             return anObj
6429
6430         ## Remove internal wires and edges from the given object (face).
6431         #  @param theObject Shape to be processed.
6432         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6433         #                  removes ALL internal wires of the given object.
6434         #  @param theName Object name; when specified, this parameter is used
6435         #         for result publication in the study. Otherwise, if automatic
6436         #         publication is switched on, default value is used for result name.
6437         #
6438         #  @return New GEOM.GEOM_Object, containing processed shape.
6439         #
6440         #  @ref tui_suppress_internal_wires "Example"
6441         @ManageTransactions("HealOp")
6442         def SuppressInternalWires(self, theObject, theWires, theName=None):
6443             """
6444             Remove internal wires and edges from the given object (face).
6445
6446             Parameters:
6447                 theObject Shape to be processed.
6448                 theWires Indices of wires to be removed, if EMPTY then the method
6449                          removes ALL internal wires of the given object.
6450                 theName Object name; when specified, this parameter is used
6451                         for result publication in the study. Otherwise, if automatic
6452                         publication is switched on, default value is used for result name.
6453
6454             Returns:
6455                 New GEOM.GEOM_Object, containing processed shape.
6456             """
6457             # Example: see GEOM_TestHealing.py
6458             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6459             RaiseIfFailed("RemoveIntWires", self.HealOp)
6460             self._autoPublish(anObj, theName, "suppressWires")
6461             return anObj
6462
6463         ## Remove internal closed contours (holes) from the given object.
6464         #  @param theObject Shape to be processed.
6465         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6466         #                  removes ALL internal holes of the given object
6467         #  @param theName Object name; when specified, this parameter is used
6468         #         for result publication in the study. Otherwise, if automatic
6469         #         publication is switched on, default value is used for result name.
6470         #
6471         #  @return New GEOM.GEOM_Object, containing processed shape.
6472         #
6473         #  @ref tui_suppress_holes "Example"
6474         @ManageTransactions("HealOp")
6475         def SuppressHoles(self, theObject, theWires, theName=None):
6476             """
6477             Remove internal closed contours (holes) from the given object.
6478
6479             Parameters:
6480                 theObject Shape to be processed.
6481                 theWires Indices of wires to be removed, if EMPTY then the method
6482                          removes ALL internal holes of the given object
6483                 theName Object name; when specified, this parameter is used
6484                         for result publication in the study. Otherwise, if automatic
6485                         publication is switched on, default value is used for result name.
6486
6487             Returns:
6488                 New GEOM.GEOM_Object, containing processed shape.
6489             """
6490             # Example: see GEOM_TestHealing.py
6491             anObj = self.HealOp.FillHoles(theObject, theWires)
6492             RaiseIfFailed("FillHoles", self.HealOp)
6493             self._autoPublish(anObj, theName, "suppressHoles")
6494             return anObj
6495
6496         ## Close an open wire.
6497         #  @param theObject Shape to be processed.
6498         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6499         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6500         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6501         #                        If False : closure by creation of an edge between ends.
6502         #  @param theName Object name; when specified, this parameter is used
6503         #         for result publication in the study. Otherwise, if automatic
6504         #         publication is switched on, default value is used for result name.
6505         #
6506         #  @return New GEOM.GEOM_Object, containing processed shape.
6507         #
6508         #  @ref tui_close_contour "Example"
6509         @ManageTransactions("HealOp")
6510         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6511             """
6512             Close an open wire.
6513
6514             Parameters:
6515                 theObject Shape to be processed.
6516                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6517                          if [ ], then theObject itself is a wire.
6518                 isCommonVertex If True  : closure by creation of a common vertex,
6519                                If False : closure by creation of an edge between ends.
6520                 theName Object name; when specified, this parameter is used
6521                         for result publication in the study. Otherwise, if automatic
6522                         publication is switched on, default value is used for result name.
6523
6524             Returns:
6525                 New GEOM.GEOM_Object, containing processed shape.
6526             """
6527             # Example: see GEOM_TestHealing.py
6528             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6529             RaiseIfFailed("CloseContour", self.HealOp)
6530             self._autoPublish(anObj, theName, "closeContour")
6531             return anObj
6532
6533         ## Addition of a point to a given edge object.
6534         #  @param theObject Shape to be processed.
6535         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6536         #                      if -1, then theObject itself is the edge.
6537         #  @param theValue Value of parameter on edge or length parameter,
6538         #                  depending on \a isByParameter.
6539         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6540         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6541         #  @param theName Object name; when specified, this parameter is used
6542         #         for result publication in the study. Otherwise, if automatic
6543         #         publication is switched on, default value is used for result name.
6544         #
6545         #  @return New GEOM.GEOM_Object, containing processed shape.
6546         #
6547         #  @ref tui_add_point_on_edge "Example"
6548         @ManageTransactions("HealOp")
6549         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6550             """
6551             Addition of a point to a given edge object.
6552
6553             Parameters:
6554                 theObject Shape to be processed.
6555                 theEdgeIndex Index of edge to be divided within theObject's shape,
6556                              if -1, then theObject itself is the edge.
6557                 theValue Value of parameter on edge or length parameter,
6558                          depending on isByParameter.
6559                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6560                               if FALSE : theValue is treated as a length parameter [0..1]
6561                 theName Object name; when specified, this parameter is used
6562                         for result publication in the study. Otherwise, if automatic
6563                         publication is switched on, default value is used for result name.
6564
6565             Returns:
6566                 New GEOM.GEOM_Object, containing processed shape.
6567             """
6568             # Example: see GEOM_TestHealing.py
6569             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6570             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6571             RaiseIfFailed("DivideEdge", self.HealOp)
6572             anObj.SetParameters(Parameters)
6573             self._autoPublish(anObj, theName, "divideEdge")
6574             return anObj
6575
6576         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6577         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6578         #  @param theVertices A list of vertices to suppress. If the list
6579         #                     is empty, all vertices in a wire will be assumed.
6580         #  @param theName Object name; when specified, this parameter is used
6581         #         for result publication in the study. Otherwise, if automatic
6582         #         publication is switched on, default value is used for result name.
6583         #
6584         #  @return New GEOM.GEOM_Object with modified wire.
6585         #
6586         #  @ref tui_fuse_collinear_edges "Example"
6587         @ManageTransactions("HealOp")
6588         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6589             """
6590             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6591
6592             Parameters:
6593                 theWire Wire to minimize the number of C1 continuous edges in.
6594                 theVertices A list of vertices to suppress. If the list
6595                             is empty, all vertices in a wire will be assumed.
6596                 theName Object name; when specified, this parameter is used
6597                         for result publication in the study. Otherwise, if automatic
6598                         publication is switched on, default value is used for result name.
6599
6600             Returns:
6601                 New GEOM.GEOM_Object with modified wire.
6602             """
6603             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6604             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6605             self._autoPublish(anObj, theName, "fuseEdges")
6606             return anObj
6607
6608         ## Change orientation of the given object. Updates given shape.
6609         #  @param theObject Shape to be processed.
6610         #  @return Updated <var>theObject</var>
6611         #
6612         #  @ref swig_todo "Example"
6613         @ManageTransactions("HealOp")
6614         def ChangeOrientationShell(self,theObject):
6615             """
6616             Change orientation of the given object. Updates given shape.
6617
6618             Parameters:
6619                 theObject Shape to be processed.
6620
6621             Returns:
6622                 Updated theObject
6623             """
6624             theObject = self.HealOp.ChangeOrientation(theObject)
6625             RaiseIfFailed("ChangeOrientation", self.HealOp)
6626             pass
6627
6628         ## Change orientation of the given object.
6629         #  @param theObject Shape to be processed.
6630         #  @param theName Object name; when specified, this parameter is used
6631         #         for result publication in the study. Otherwise, if automatic
6632         #         publication is switched on, default value is used for result name.
6633         #
6634         #  @return New GEOM.GEOM_Object, containing processed shape.
6635         #
6636         #  @ref swig_todo "Example"
6637         @ManageTransactions("HealOp")
6638         def ChangeOrientationShellCopy(self, theObject, theName=None):
6639             """
6640             Change orientation of the given object.
6641
6642             Parameters:
6643                 theObject Shape to be processed.
6644                 theName Object name; when specified, this parameter is used
6645                         for result publication in the study. Otherwise, if automatic
6646                         publication is switched on, default value is used for result name.
6647
6648             Returns:
6649                 New GEOM.GEOM_Object, containing processed shape.
6650             """
6651             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6652             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6653             self._autoPublish(anObj, theName, "reversed")
6654             return anObj
6655
6656         ## Try to limit tolerance of the given object by value \a theTolerance.
6657         #  @param theObject Shape to be processed.
6658         #  @param theTolerance Required tolerance value.
6659         #  @param theName Object name; when specified, this parameter is used
6660         #         for result publication in the study. Otherwise, if automatic
6661         #         publication is switched on, default value is used for result name.
6662         #
6663         #  @return New GEOM.GEOM_Object, containing processed shape.
6664         #
6665         #  @ref tui_limit_tolerance "Example"
6666         @ManageTransactions("HealOp")
6667         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6668             """
6669             Try to limit tolerance of the given object by value theTolerance.
6670
6671             Parameters:
6672                 theObject Shape to be processed.
6673                 theTolerance Required tolerance value.
6674                 theName Object name; when specified, this parameter is used
6675                         for result publication in the study. Otherwise, if automatic
6676                         publication is switched on, default value is used for result name.
6677
6678             Returns:
6679                 New GEOM.GEOM_Object, containing processed shape.
6680             """
6681             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6682             RaiseIfFailed("LimitTolerance", self.HealOp)
6683             self._autoPublish(anObj, theName, "limitTolerance")
6684             return anObj
6685
6686         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6687         #  that constitute a free boundary of the given shape.
6688         #  @param theObject Shape to get free boundary of.
6689         #  @param theName Object name; when specified, this parameter is used
6690         #         for result publication in the study. Otherwise, if automatic
6691         #         publication is switched on, default value is used for result name.
6692         #
6693         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6694         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6695         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6696         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6697         #
6698         #  @ref tui_measurement_tools_page "Example"
6699         @ManageTransactions("HealOp")
6700         def GetFreeBoundary(self, theObject, theName=None):
6701             """
6702             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6703             that constitute a free boundary of the given shape.
6704
6705             Parameters:
6706                 theObject Shape to get free boundary of.
6707                 theName Object name; when specified, this parameter is used
6708                         for result publication in the study. Otherwise, if automatic
6709                         publication is switched on, default value is used for result name.
6710
6711             Returns:
6712                 [status, theClosedWires, theOpenWires]
6713                  status: FALSE, if an error(s) occured during the method execution.
6714                  theClosedWires: Closed wires on the free boundary of the given shape.
6715                  theOpenWires: Open wires on the free boundary of the given shape.
6716             """
6717             # Example: see GEOM_TestHealing.py
6718             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
6719             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6720             self._autoPublish(anObj[1], theName, "closedWire")
6721             self._autoPublish(anObj[2], theName, "openWire")
6722             return anObj
6723
6724         ## Replace coincident faces in theShape by one face.
6725         #  @param theShape Initial shape.
6726         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6727         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6728         #                         otherwise all initial shapes.
6729         #  @param theName Object name; when specified, this parameter is used
6730         #         for result publication in the study. Otherwise, if automatic
6731         #         publication is switched on, default value is used for result name.
6732         #
6733         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6734         #
6735         #  @ref tui_glue_faces "Example"
6736         @ManageTransactions("ShapesOp")
6737         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6738             """
6739             Replace coincident faces in theShape by one face.
6740
6741             Parameters:
6742                 theShape Initial shape.
6743                 theTolerance Maximum distance between faces, which can be considered as coincident.
6744                 doKeepNonSolids If FALSE, only solids will present in the result,
6745                                 otherwise all initial shapes.
6746                 theName Object name; when specified, this parameter is used
6747                         for result publication in the study. Otherwise, if automatic
6748                         publication is switched on, default value is used for result name.
6749
6750             Returns:
6751                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6752             """
6753             # Example: see GEOM_Spanner.py
6754             theTolerance,Parameters = ParseParameters(theTolerance)
6755             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6756             if anObj is None:
6757                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6758             anObj.SetParameters(Parameters)
6759             self._autoPublish(anObj, theName, "glueFaces")
6760             return anObj
6761
6762         ## Find coincident faces in theShape for possible gluing.
6763         #  @param theShape Initial shape.
6764         #  @param theTolerance Maximum distance between faces,
6765         #                      which can be considered as coincident.
6766         #  @param theName Object name; when specified, this parameter is used
6767         #         for result publication in the study. Otherwise, if automatic
6768         #         publication is switched on, default value is used for result name.
6769         #
6770         #  @return GEOM.ListOfGO
6771         #
6772         #  @ref tui_glue_faces "Example"
6773         @ManageTransactions("ShapesOp")
6774         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6775             """
6776             Find coincident faces in theShape for possible gluing.
6777
6778             Parameters:
6779                 theShape Initial shape.
6780                 theTolerance Maximum distance between faces,
6781                              which can be considered as coincident.
6782                 theName Object name; when specified, this parameter is used
6783                         for result publication in the study. Otherwise, if automatic
6784                         publication is switched on, default value is used for result name.
6785
6786             Returns:
6787                 GEOM.ListOfGO
6788             """
6789             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6790             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6791             self._autoPublish(anObj, theName, "facesToGlue")
6792             return anObj
6793
6794         ## Replace coincident faces in theShape by one face
6795         #  in compliance with given list of faces
6796         #  @param theShape Initial shape.
6797         #  @param theTolerance Maximum distance between faces,
6798         #                      which can be considered as coincident.
6799         #  @param theFaces List of faces for gluing.
6800         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6801         #                         otherwise all initial shapes.
6802         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6803         #                        will be glued, otherwise only the edges,
6804         #                        belonging to <VAR>theFaces</VAR>.
6805         #  @param theName Object name; when specified, this parameter is used
6806         #         for result publication in the study. Otherwise, if automatic
6807         #         publication is switched on, default value is used for result name.
6808         #
6809         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6810         #          without some faces.
6811         #
6812         #  @ref tui_glue_faces "Example"
6813         @ManageTransactions("ShapesOp")
6814         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6815                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6816             """
6817             Replace coincident faces in theShape by one face
6818             in compliance with given list of faces
6819
6820             Parameters:
6821                 theShape Initial shape.
6822                 theTolerance Maximum distance between faces,
6823                              which can be considered as coincident.
6824                 theFaces List of faces for gluing.
6825                 doKeepNonSolids If FALSE, only solids will present in the result,
6826                                 otherwise all initial shapes.
6827                 doGlueAllEdges If TRUE, all coincident edges of theShape
6828                                will be glued, otherwise only the edges,
6829                                belonging to theFaces.
6830                 theName Object name; when specified, this parameter is used
6831                         for result publication in the study. Otherwise, if automatic
6832                         publication is switched on, default value is used for result name.
6833
6834             Returns:
6835                 New GEOM.GEOM_Object, containing a copy of theShape
6836                     without some faces.
6837             """
6838             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6839                                                       doKeepNonSolids, doGlueAllEdges)
6840             if anObj is None:
6841                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6842             self._autoPublish(anObj, theName, "glueFaces")
6843             return anObj
6844
6845         ## Replace coincident edges in theShape by one edge.
6846         #  @param theShape Initial shape.
6847         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6848         #  @param theName Object name; when specified, this parameter is used
6849         #         for result publication in the study. Otherwise, if automatic
6850         #         publication is switched on, default value is used for result name.
6851         #
6852         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6853         #
6854         #  @ref tui_glue_edges "Example"
6855         @ManageTransactions("ShapesOp")
6856         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6857             """
6858             Replace coincident edges in theShape by one edge.
6859
6860             Parameters:
6861                 theShape Initial shape.
6862                 theTolerance Maximum distance between edges, which can be considered as coincident.
6863                 theName Object name; when specified, this parameter is used
6864                         for result publication in the study. Otherwise, if automatic
6865                         publication is switched on, default value is used for result name.
6866
6867             Returns:
6868                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6869             """
6870             theTolerance,Parameters = ParseParameters(theTolerance)
6871             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6872             if anObj is None:
6873                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6874             anObj.SetParameters(Parameters)
6875             self._autoPublish(anObj, theName, "glueEdges")
6876             return anObj
6877
6878         ## Find coincident edges in theShape for possible gluing.
6879         #  @param theShape Initial shape.
6880         #  @param theTolerance Maximum distance between edges,
6881         #                      which can be considered as coincident.
6882         #  @param theName Object name; when specified, this parameter is used
6883         #         for result publication in the study. Otherwise, if automatic
6884         #         publication is switched on, default value is used for result name.
6885         #
6886         #  @return GEOM.ListOfGO
6887         #
6888         #  @ref tui_glue_edges "Example"
6889         @ManageTransactions("ShapesOp")
6890         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6891             """
6892             Find coincident edges in theShape for possible gluing.
6893
6894             Parameters:
6895                 theShape Initial shape.
6896                 theTolerance Maximum distance between edges,
6897                              which can be considered as coincident.
6898                 theName Object name; when specified, this parameter is used
6899                         for result publication in the study. Otherwise, if automatic
6900                         publication is switched on, default value is used for result name.
6901
6902             Returns:
6903                 GEOM.ListOfGO
6904             """
6905             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6906             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6907             self._autoPublish(anObj, theName, "edgesToGlue")
6908             return anObj
6909
6910         ## Replace coincident edges in theShape by one edge
6911         #  in compliance with given list of edges.
6912         #  @param theShape Initial shape.
6913         #  @param theTolerance Maximum distance between edges,
6914         #                      which can be considered as coincident.
6915         #  @param theEdges List of edges for gluing.
6916         #  @param theName Object name; when specified, this parameter is used
6917         #         for result publication in the study. Otherwise, if automatic
6918         #         publication is switched on, default value is used for result name.
6919         #
6920         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6921         #          without some edges.
6922         #
6923         #  @ref tui_glue_edges "Example"
6924         @ManageTransactions("ShapesOp")
6925         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6926             """
6927             Replace coincident edges in theShape by one edge
6928             in compliance with given list of edges.
6929
6930             Parameters:
6931                 theShape Initial shape.
6932                 theTolerance Maximum distance between edges,
6933                              which can be considered as coincident.
6934                 theEdges List of edges for gluing.
6935                 theName Object name; when specified, this parameter is used
6936                         for result publication in the study. Otherwise, if automatic
6937                         publication is switched on, default value is used for result name.
6938
6939             Returns:
6940                 New GEOM.GEOM_Object, containing a copy of theShape
6941                 without some edges.
6942             """
6943             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6944             if anObj is None:
6945                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6946             self._autoPublish(anObj, theName, "glueEdges")
6947             return anObj
6948
6949         # end of l3_healing
6950         ## @}
6951
6952         ## @addtogroup l3_boolean Boolean Operations
6953         ## @{
6954
6955         # -----------------------------------------------------------------------------
6956         # Boolean (Common, Cut, Fuse, Section)
6957         # -----------------------------------------------------------------------------
6958
6959         ## Perform one of boolean operations on two given shapes.
6960         #  @param theShape1 First argument for boolean operation.
6961         #  @param theShape2 Second argument for boolean operation.
6962         #  @param theOperation Indicates the operation to be done:\n
6963         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6964         #  @param checkSelfInte The flag that tells if the arguments should
6965         #         be checked for self-intersection prior to the operation.
6966         #  @param theName Object name; when specified, this parameter is used
6967         #         for result publication in the study. Otherwise, if automatic
6968         #         publication is switched on, default value is used for result name.
6969         #
6970         #  @note This algorithm doesn't find all types of self-intersections.
6971         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6972         #        vertex/face and edge/face intersections. Face/face
6973         #        intersections detection is switched off as it is a
6974         #        time-consuming operation that gives an impact on performance.
6975         #        To find all self-intersections please use
6976         #        CheckSelfIntersections() method.
6977         #
6978         #  @return New GEOM.GEOM_Object, containing the result shape.
6979         #
6980         #  @ref tui_fuse "Example"
6981         @ManageTransactions("BoolOp")
6982         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6983             """
6984             Perform one of boolean operations on two given shapes.
6985
6986             Parameters:
6987                 theShape1 First argument for boolean operation.
6988                 theShape2 Second argument for boolean operation.
6989                 theOperation Indicates the operation to be done:
6990                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6991                 checkSelfInte The flag that tells if the arguments should
6992                               be checked for self-intersection prior to
6993                               the operation.
6994                 theName Object name; when specified, this parameter is used
6995                         for result publication in the study. Otherwise, if automatic
6996                         publication is switched on, default value is used for result name.
6997
6998             Note:
6999                     This algorithm doesn't find all types of self-intersections.
7000                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7001                     vertex/face and edge/face intersections. Face/face
7002                     intersections detection is switched off as it is a
7003                     time-consuming operation that gives an impact on performance.
7004                     To find all self-intersections please use
7005                     CheckSelfIntersections() method.
7006
7007             Returns:
7008                 New GEOM.GEOM_Object, containing the result shape.
7009             """
7010             # Example: see GEOM_TestAll.py
7011             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7012             RaiseIfFailed("MakeBoolean", self.BoolOp)
7013             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7014             self._autoPublish(anObj, theName, def_names[theOperation])
7015             return anObj
7016
7017         ## Perform Common boolean operation on two given shapes.
7018         #  @param theShape1 First argument for boolean operation.
7019         #  @param theShape2 Second argument for boolean operation.
7020         #  @param checkSelfInte The flag that tells if the arguments should
7021         #         be checked for self-intersection prior to the operation.
7022         #  @param theName Object name; when specified, this parameter is used
7023         #         for result publication in the study. Otherwise, if automatic
7024         #         publication is switched on, default value is used for result name.
7025         #
7026         #  @note This algorithm doesn't find all types of self-intersections.
7027         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7028         #        vertex/face and edge/face intersections. Face/face
7029         #        intersections detection is switched off as it is a
7030         #        time-consuming operation that gives an impact on performance.
7031         #        To find all self-intersections please use
7032         #        CheckSelfIntersections() method.
7033         #
7034         #  @return New GEOM.GEOM_Object, containing the result shape.
7035         #
7036         #  @ref tui_common "Example 1"
7037         #  \n @ref swig_MakeCommon "Example 2"
7038         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7039             """
7040             Perform Common boolean operation on two given shapes.
7041
7042             Parameters:
7043                 theShape1 First argument for boolean operation.
7044                 theShape2 Second argument for boolean operation.
7045                 checkSelfInte The flag that tells if the arguments should
7046                               be checked for self-intersection prior to
7047                               the operation.
7048                 theName Object name; when specified, this parameter is used
7049                         for result publication in the study. Otherwise, if automatic
7050                         publication is switched on, default value is used for result name.
7051
7052             Note:
7053                     This algorithm doesn't find all types of self-intersections.
7054                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7055                     vertex/face and edge/face intersections. Face/face
7056                     intersections detection is switched off as it is a
7057                     time-consuming operation that gives an impact on performance.
7058                     To find all self-intersections please use
7059                     CheckSelfIntersections() method.
7060
7061             Returns:
7062                 New GEOM.GEOM_Object, containing the result shape.
7063             """
7064             # Example: see GEOM_TestOthers.py
7065             # note: auto-publishing is done in self.MakeBoolean()
7066             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7067
7068         ## Perform Cut boolean operation on two given shapes.
7069         #  @param theShape1 First argument for boolean operation.
7070         #  @param theShape2 Second argument for boolean operation.
7071         #  @param checkSelfInte The flag that tells if the arguments should
7072         #         be checked for self-intersection prior to the operation.
7073         #  @param theName Object name; when specified, this parameter is used
7074         #         for result publication in the study. Otherwise, if automatic
7075         #         publication is switched on, default value is used for result name.
7076         #
7077         #  @note This algorithm doesn't find all types of self-intersections.
7078         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7079         #        vertex/face and edge/face intersections. Face/face
7080         #        intersections detection is switched off as it is a
7081         #        time-consuming operation that gives an impact on performance.
7082         #        To find all self-intersections please use
7083         #        CheckSelfIntersections() method.
7084         #
7085         #  @return New GEOM.GEOM_Object, containing the result shape.
7086         #
7087         #  @ref tui_cut "Example 1"
7088         #  \n @ref swig_MakeCommon "Example 2"
7089         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7090             """
7091             Perform Cut boolean operation on two given shapes.
7092
7093             Parameters:
7094                 theShape1 First argument for boolean operation.
7095                 theShape2 Second argument for boolean operation.
7096                 checkSelfInte The flag that tells if the arguments should
7097                               be checked for self-intersection prior to
7098                               the operation.
7099                 theName Object name; when specified, this parameter is used
7100                         for result publication in the study. Otherwise, if automatic
7101                         publication is switched on, default value is used for result name.
7102
7103             Note:
7104                     This algorithm doesn't find all types of self-intersections.
7105                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7106                     vertex/face and edge/face intersections. Face/face
7107                     intersections detection is switched off as it is a
7108                     time-consuming operation that gives an impact on performance.
7109                     To find all self-intersections please use
7110                     CheckSelfIntersections() method.
7111
7112             Returns:
7113                 New GEOM.GEOM_Object, containing the result shape.
7114
7115             """
7116             # Example: see GEOM_TestOthers.py
7117             # note: auto-publishing is done in self.MakeBoolean()
7118             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7119
7120         ## Perform Fuse boolean operation on two given shapes.
7121         #  @param theShape1 First argument for boolean operation.
7122         #  @param theShape2 Second argument for boolean operation.
7123         #  @param checkSelfInte The flag that tells if the arguments should
7124         #         be checked for self-intersection prior to the operation.
7125         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7126         #         operation should be performed during the operation.
7127         #  @param theName Object name; when specified, this parameter is used
7128         #         for result publication in the study. Otherwise, if automatic
7129         #         publication is switched on, default value is used for result name.
7130         #
7131         #  @note This algorithm doesn't find all types of self-intersections.
7132         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7133         #        vertex/face and edge/face intersections. Face/face
7134         #        intersections detection is switched off as it is a
7135         #        time-consuming operation that gives an impact on performance.
7136         #        To find all self-intersections please use
7137         #        CheckSelfIntersections() method.
7138         #
7139         #  @return New GEOM.GEOM_Object, containing the result shape.
7140         #
7141         #  @ref tui_fuse "Example 1"
7142         #  \n @ref swig_MakeCommon "Example 2"
7143         @ManageTransactions("BoolOp")
7144         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7145                      rmExtraEdges=False, theName=None):
7146             """
7147             Perform Fuse boolean operation on two given shapes.
7148
7149             Parameters:
7150                 theShape1 First argument for boolean operation.
7151                 theShape2 Second argument for boolean operation.
7152                 checkSelfInte The flag that tells if the arguments should
7153                               be checked for self-intersection prior to
7154                               the operation.
7155                 rmExtraEdges The flag that tells if Remove Extra Edges
7156                              operation should be performed during the operation.
7157                 theName Object name; when specified, this parameter is used
7158                         for result publication in the study. Otherwise, if automatic
7159                         publication is switched on, default value is used for result name.
7160
7161             Note:
7162                     This algorithm doesn't find all types of self-intersections.
7163                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7164                     vertex/face and edge/face intersections. Face/face
7165                     intersections detection is switched off as it is a
7166                     time-consuming operation that gives an impact on performance.
7167                     To find all self-intersections please use
7168                     CheckSelfIntersections() method.
7169
7170             Returns:
7171                 New GEOM.GEOM_Object, containing the result shape.
7172
7173             """
7174             # Example: see GEOM_TestOthers.py
7175             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7176                                          checkSelfInte, rmExtraEdges)
7177             RaiseIfFailed("MakeFuse", self.BoolOp)
7178             self._autoPublish(anObj, theName, "fuse")
7179             return anObj
7180
7181         ## Perform Section boolean operation on two given shapes.
7182         #  @param theShape1 First argument for boolean operation.
7183         #  @param theShape2 Second argument for boolean operation.
7184         #  @param checkSelfInte The flag that tells if the arguments should
7185         #         be checked for self-intersection prior to the operation.
7186         #  @param theName Object name; when specified, this parameter is used
7187         #         for result publication in the study. Otherwise, if automatic
7188         #         publication is switched on, default value is used for result name.
7189         #
7190         #  @note This algorithm doesn't find all types of self-intersections.
7191         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7192         #        vertex/face and edge/face intersections. Face/face
7193         #        intersections detection is switched off as it is a
7194         #        time-consuming operation that gives an impact on performance.
7195         #        To find all self-intersections please use
7196         #        CheckSelfIntersections() method.
7197         #
7198         #  @return New GEOM.GEOM_Object, containing the result shape.
7199         #
7200         #  @ref tui_section "Example 1"
7201         #  \n @ref swig_MakeCommon "Example 2"
7202         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7203             """
7204             Perform Section boolean operation on two given shapes.
7205
7206             Parameters:
7207                 theShape1 First argument for boolean operation.
7208                 theShape2 Second argument for boolean operation.
7209                 checkSelfInte The flag that tells if the arguments should
7210                               be checked for self-intersection prior to
7211                               the operation.
7212                 theName Object name; when specified, this parameter is used
7213                         for result publication in the study. Otherwise, if automatic
7214                         publication is switched on, default value is used for result name.
7215
7216             Note:
7217                     This algorithm doesn't find all types of self-intersections.
7218                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7219                     vertex/face and edge/face intersections. Face/face
7220                     intersections detection is switched off as it is a
7221                     time-consuming operation that gives an impact on performance.
7222                     To find all self-intersections please use
7223                     CheckSelfIntersections() method.
7224
7225             Returns:
7226                 New GEOM.GEOM_Object, containing the result shape.
7227
7228             """
7229             # Example: see GEOM_TestOthers.py
7230             # note: auto-publishing is done in self.MakeBoolean()
7231             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7232
7233         ## Perform Fuse boolean operation on the list of shapes.
7234         #  @param theShapesList Shapes to be fused.
7235         #  @param checkSelfInte The flag that tells if the arguments should
7236         #         be checked for self-intersection prior to the operation.
7237         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7238         #         operation should be performed during the operation.
7239         #  @param theName Object name; when specified, this parameter is used
7240         #         for result publication in the study. Otherwise, if automatic
7241         #         publication is switched on, default value is used for result name.
7242         #
7243         #  @note This algorithm doesn't find all types of self-intersections.
7244         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7245         #        vertex/face and edge/face intersections. Face/face
7246         #        intersections detection is switched off as it is a
7247         #        time-consuming operation that gives an impact on performance.
7248         #        To find all self-intersections please use
7249         #        CheckSelfIntersections() method.
7250         #
7251         #  @return New GEOM.GEOM_Object, containing the result shape.
7252         #
7253         #  @ref tui_fuse "Example 1"
7254         #  \n @ref swig_MakeCommon "Example 2"
7255         @ManageTransactions("BoolOp")
7256         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7257                          rmExtraEdges=False, theName=None):
7258             """
7259             Perform Fuse boolean operation on the list of shapes.
7260
7261             Parameters:
7262                 theShapesList Shapes to be fused.
7263                 checkSelfInte The flag that tells if the arguments should
7264                               be checked for self-intersection prior to
7265                               the operation.
7266                 rmExtraEdges The flag that tells if Remove Extra Edges
7267                              operation should be performed during the operation.
7268                 theName Object name; when specified, this parameter is used
7269                         for result publication in the study. Otherwise, if automatic
7270                         publication is switched on, default value is used for result name.
7271
7272             Note:
7273                     This algorithm doesn't find all types of self-intersections.
7274                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7275                     vertex/face and edge/face intersections. Face/face
7276                     intersections detection is switched off as it is a
7277                     time-consuming operation that gives an impact on performance.
7278                     To find all self-intersections please use
7279                     CheckSelfIntersections() method.
7280
7281             Returns:
7282                 New GEOM.GEOM_Object, containing the result shape.
7283
7284             """
7285             # Example: see GEOM_TestOthers.py
7286             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7287                                              rmExtraEdges)
7288             RaiseIfFailed("MakeFuseList", self.BoolOp)
7289             self._autoPublish(anObj, theName, "fuse")
7290             return anObj
7291
7292         ## Perform Common boolean operation on the list of shapes.
7293         #  @param theShapesList Shapes for Common operation.
7294         #  @param checkSelfInte The flag that tells if the arguments should
7295         #         be checked for self-intersection prior to the operation.
7296         #  @param theName Object name; when specified, this parameter is used
7297         #         for result publication in the study. Otherwise, if automatic
7298         #         publication is switched on, default value is used for result name.
7299         #
7300         #  @note This algorithm doesn't find all types of self-intersections.
7301         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7302         #        vertex/face and edge/face intersections. Face/face
7303         #        intersections detection is switched off as it is a
7304         #        time-consuming operation that gives an impact on performance.
7305         #        To find all self-intersections please use
7306         #        CheckSelfIntersections() method.
7307         #
7308         #  @return New GEOM.GEOM_Object, containing the result shape.
7309         #
7310         #  @ref tui_common "Example 1"
7311         #  \n @ref swig_MakeCommon "Example 2"
7312         @ManageTransactions("BoolOp")
7313         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7314             """
7315             Perform Common boolean operation on the list of shapes.
7316
7317             Parameters:
7318                 theShapesList Shapes for Common operation.
7319                 checkSelfInte The flag that tells if the arguments should
7320                               be checked for self-intersection prior to
7321                               the operation.
7322                 theName Object name; when specified, this parameter is used
7323                         for result publication in the study. Otherwise, if automatic
7324                         publication is switched on, default value is used for result name.
7325
7326             Note:
7327                     This algorithm doesn't find all types of self-intersections.
7328                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7329                     vertex/face and edge/face intersections. Face/face
7330                     intersections detection is switched off as it is a
7331                     time-consuming operation that gives an impact on performance.
7332                     To find all self-intersections please use
7333                     CheckSelfIntersections() method.
7334
7335             Returns:
7336                 New GEOM.GEOM_Object, containing the result shape.
7337
7338             """
7339             # Example: see GEOM_TestOthers.py
7340             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7341             RaiseIfFailed("MakeCommonList", self.BoolOp)
7342             self._autoPublish(anObj, theName, "common")
7343             return anObj
7344
7345         ## Perform Cut boolean operation on one object and the list of tools.
7346         #  @param theMainShape The object of the operation.
7347         #  @param theShapesList The list of tools of the operation.
7348         #  @param checkSelfInte The flag that tells if the arguments should
7349         #         be checked for self-intersection prior to the operation.
7350         #  @param theName Object name; when specified, this parameter is used
7351         #         for result publication in the study. Otherwise, if automatic
7352         #         publication is switched on, default value is used for result name.
7353         #
7354         #  @note This algorithm doesn't find all types of self-intersections.
7355         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7356         #        vertex/face and edge/face intersections. Face/face
7357         #        intersections detection is switched off as it is a
7358         #        time-consuming operation that gives an impact on performance.
7359         #        To find all self-intersections please use
7360         #        CheckSelfIntersections() method.
7361         #
7362         #  @return New GEOM.GEOM_Object, containing the result shape.
7363         #
7364         #  @ref tui_cut "Example 1"
7365         #  \n @ref swig_MakeCommon "Example 2"
7366         @ManageTransactions("BoolOp")
7367         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7368             """
7369             Perform Cut boolean operation on one object and the list of tools.
7370
7371             Parameters:
7372                 theMainShape The object of the operation.
7373                 theShapesList The list of tools of the operation.
7374                 checkSelfInte The flag that tells if the arguments should
7375                               be checked for self-intersection prior to
7376                               the operation.
7377                 theName Object name; when specified, this parameter is used
7378                         for result publication in the study. Otherwise, if automatic
7379                         publication is switched on, default value is used for result name.
7380
7381             Note:
7382                     This algorithm doesn't find all types of self-intersections.
7383                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7384                     vertex/face and edge/face intersections. Face/face
7385                     intersections detection is switched off as it is a
7386                     time-consuming operation that gives an impact on performance.
7387                     To find all self-intersections please use
7388                     CheckSelfIntersections() method.
7389
7390             Returns:
7391                 New GEOM.GEOM_Object, containing the result shape.
7392
7393             """
7394             # Example: see GEOM_TestOthers.py
7395             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7396             RaiseIfFailed("MakeCutList", self.BoolOp)
7397             self._autoPublish(anObj, theName, "cut")
7398             return anObj
7399
7400         # end of l3_boolean
7401         ## @}
7402
7403         ## @addtogroup l3_basic_op
7404         ## @{
7405
7406         ## Perform partition operation.
7407         #  @param ListShapes Shapes to be intersected.
7408         #  @param ListTools Shapes to intersect theShapes.
7409         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7410         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7411         #         type will be detected automatically.
7412         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7413         #                             target type (equal to Limit) are kept in the result,
7414         #                             else standalone shapes of lower dimension
7415         #                             are kept also (if they exist).
7416         #
7417         #  @param theName Object name; when specified, this parameter is used
7418         #         for result publication in the study. Otherwise, if automatic
7419         #         publication is switched on, default value is used for result name.
7420         #
7421         #  @note Each compound from ListShapes and ListTools will be exploded
7422         #        in order to avoid possible intersection between shapes from this compound.
7423         #
7424         #  After implementation new version of PartitionAlgo (October 2006)
7425         #  other parameters are ignored by current functionality. They are kept
7426         #  in this function only for support old versions.
7427         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7428         #         Each shape from theKeepInside must belong to theShapes also.
7429         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7430         #         Each shape from theRemoveInside must belong to theShapes also.
7431         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7432         #      @param ListMaterials Material indices for each shape. Make sence,
7433         #         only if theRemoveWebs is TRUE.
7434         #
7435         #  @return New GEOM.GEOM_Object, containing the result shapes.
7436         #
7437         #  @ref tui_partition "Example"
7438         @ManageTransactions("BoolOp")
7439         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7440                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7441                           KeepNonlimitShapes=0, theName=None):
7442             """
7443             Perform partition operation.
7444
7445             Parameters:
7446                 ListShapes Shapes to be intersected.
7447                 ListTools Shapes to intersect theShapes.
7448                 Limit Type of resulting shapes (see geompy.ShapeType)
7449                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7450                       type will be detected automatically.
7451                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7452                                     target type (equal to Limit) are kept in the result,
7453                                     else standalone shapes of lower dimension
7454                                     are kept also (if they exist).
7455
7456                 theName Object name; when specified, this parameter is used
7457                         for result publication in the study. Otherwise, if automatic
7458                         publication is switched on, default value is used for result name.
7459             Note:
7460                     Each compound from ListShapes and ListTools will be exploded
7461                     in order to avoid possible intersection between shapes from
7462                     this compound.
7463
7464             After implementation new version of PartitionAlgo (October 2006) other
7465             parameters are ignored by current functionality. They are kept in this
7466             function only for support old versions.
7467
7468             Ignored parameters:
7469                 ListKeepInside Shapes, outside which the results will be deleted.
7470                                Each shape from theKeepInside must belong to theShapes also.
7471                 ListRemoveInside Shapes, inside which the results will be deleted.
7472                                  Each shape from theRemoveInside must belong to theShapes also.
7473                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7474                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7475
7476             Returns:
7477                 New GEOM.GEOM_Object, containing the result shapes.
7478             """
7479             # Example: see GEOM_TestAll.py
7480             if Limit == self.ShapeType["AUTO"]:
7481                 # automatic detection of the most appropriate shape limit type
7482                 lim = GEOM.SHAPE
7483                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7484                 Limit = EnumToLong(lim)
7485                 pass
7486             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7487                                               ListKeepInside, ListRemoveInside,
7488                                               Limit, RemoveWebs, ListMaterials,
7489                                               KeepNonlimitShapes);
7490             RaiseIfFailed("MakePartition", self.BoolOp)
7491             self._autoPublish(anObj, theName, "partition")
7492             return anObj
7493
7494         ## Perform partition operation.
7495         #  This method may be useful if it is needed to make a partition for
7496         #  compound contains nonintersected shapes. Performance will be better
7497         #  since intersection between shapes from compound is not performed.
7498         #
7499         #  Description of all parameters as in previous method MakePartition().
7500         #  One additional parameter is provided:
7501         #  @param checkSelfInte The flag that tells if the arguments should
7502         #         be checked for self-intersection prior to the operation.
7503         #
7504         #  @note This algorithm doesn't find all types of self-intersections.
7505         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7506         #        vertex/face and edge/face intersections. Face/face
7507         #        intersections detection is switched off as it is a
7508         #        time-consuming operation that gives an impact on performance.
7509         #        To find all self-intersections please use
7510         #        CheckSelfIntersections() method.
7511         #
7512         #  @note Passed compounds (via ListShapes or via ListTools)
7513         #           have to consist of nonintersecting shapes.
7514         #
7515         #  @return New GEOM.GEOM_Object, containing the result shapes.
7516         #
7517         #  @ref swig_todo "Example"
7518         @ManageTransactions("BoolOp")
7519         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7520                                                  ListKeepInside=[], ListRemoveInside=[],
7521                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7522                                                  ListMaterials=[], KeepNonlimitShapes=0,
7523                                                  checkSelfInte=False, theName=None):
7524             """
7525             Perform partition operation.
7526             This method may be useful if it is needed to make a partition for
7527             compound contains nonintersected shapes. Performance will be better
7528             since intersection between shapes from compound is not performed.
7529
7530             Parameters:
7531                 Description of all parameters as in method geompy.MakePartition.
7532                 One additional parameter is provided:
7533                 checkSelfInte The flag that tells if the arguments should
7534                               be checked for self-intersection prior to
7535                               the operation.
7536
7537             Note:
7538                     This algorithm doesn't find all types of self-intersections.
7539                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7540                     vertex/face and edge/face intersections. Face/face
7541                     intersections detection is switched off as it is a
7542                     time-consuming operation that gives an impact on performance.
7543                     To find all self-intersections please use
7544                     CheckSelfIntersections() method.
7545
7546             NOTE:
7547                 Passed compounds (via ListShapes or via ListTools)
7548                 have to consist of nonintersecting shapes.
7549
7550             Returns:
7551                 New GEOM.GEOM_Object, containing the result shapes.
7552             """
7553             if Limit == self.ShapeType["AUTO"]:
7554                 # automatic detection of the most appropriate shape limit type
7555                 lim = GEOM.SHAPE
7556                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7557                 Limit = EnumToLong(lim)
7558                 pass
7559             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7560                                                                      ListKeepInside, ListRemoveInside,
7561                                                                      Limit, RemoveWebs, ListMaterials,
7562                                                                      KeepNonlimitShapes, checkSelfInte);
7563             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7564             self._autoPublish(anObj, theName, "partition")
7565             return anObj
7566
7567         ## See method MakePartition() for more information.
7568         #
7569         #  @ref tui_partition "Example 1"
7570         #  \n @ref swig_Partition "Example 2"
7571         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7572                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7573                       KeepNonlimitShapes=0, theName=None):
7574             """
7575             See method geompy.MakePartition for more information.
7576             """
7577             # Example: see GEOM_TestOthers.py
7578             # note: auto-publishing is done in self.MakePartition()
7579             anObj = self.MakePartition(ListShapes, ListTools,
7580                                        ListKeepInside, ListRemoveInside,
7581                                        Limit, RemoveWebs, ListMaterials,
7582                                        KeepNonlimitShapes, theName);
7583             return anObj
7584
7585         ## Perform partition of the Shape with the Plane
7586         #  @param theShape Shape to be intersected.
7587         #  @param thePlane Tool shape, to intersect theShape.
7588         #  @param theName Object name; when specified, this parameter is used
7589         #         for result publication in the study. Otherwise, if automatic
7590         #         publication is switched on, default value is used for result name.
7591         #
7592         #  @return New GEOM.GEOM_Object, containing the result shape.
7593         #
7594         #  @ref tui_partition "Example"
7595         @ManageTransactions("BoolOp")
7596         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7597             """
7598             Perform partition of the Shape with the Plane
7599
7600             Parameters:
7601                 theShape Shape to be intersected.
7602                 thePlane Tool shape, to intersect theShape.
7603                 theName Object name; when specified, this parameter is used
7604                         for result publication in the study. Otherwise, if automatic
7605                         publication is switched on, default value is used for result name.
7606
7607             Returns:
7608                 New GEOM.GEOM_Object, containing the result shape.
7609             """
7610             # Example: see GEOM_TestAll.py
7611             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7612             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7613             self._autoPublish(anObj, theName, "partition")
7614             return anObj
7615
7616         # end of l3_basic_op
7617         ## @}
7618
7619         ## @addtogroup l3_transform
7620         ## @{
7621
7622         ## Translate the given object along the vector, specified
7623         #  by its end points.
7624         #  @param theObject The object to be translated.
7625         #  @param thePoint1 Start point of translation vector.
7626         #  @param thePoint2 End point of translation vector.
7627         #  @param theCopy Flag used to translate object itself or create a copy.
7628         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7629         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7630         @ManageTransactions("TrsfOp")
7631         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7632             """
7633             Translate the given object along the vector, specified by its end points.
7634
7635             Parameters:
7636                 theObject The object to be translated.
7637                 thePoint1 Start point of translation vector.
7638                 thePoint2 End point of translation vector.
7639                 theCopy Flag used to translate object itself or create a copy.
7640
7641             Returns:
7642                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7643                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7644             """
7645             if theCopy:
7646                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7647             else:
7648                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7649             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7650             return anObj
7651
7652         ## Translate the given object along the vector, specified
7653         #  by its end points, creating its copy before the translation.
7654         #  @param theObject The object to be translated.
7655         #  @param thePoint1 Start point of translation vector.
7656         #  @param thePoint2 End point of translation vector.
7657         #  @param theName Object name; when specified, this parameter is used
7658         #         for result publication in the study. Otherwise, if automatic
7659         #         publication is switched on, default value is used for result name.
7660         #
7661         #  @return New GEOM.GEOM_Object, containing the translated object.
7662         #
7663         #  @ref tui_translation "Example 1"
7664         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7665         @ManageTransactions("TrsfOp")
7666         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7667             """
7668             Translate the given object along the vector, specified
7669             by its end points, creating its copy before the translation.
7670
7671             Parameters:
7672                 theObject The object to be translated.
7673                 thePoint1 Start point of translation vector.
7674                 thePoint2 End point of translation vector.
7675                 theName Object name; when specified, this parameter is used
7676                         for result publication in the study. Otherwise, if automatic
7677                         publication is switched on, default value is used for result name.
7678
7679             Returns:
7680                 New GEOM.GEOM_Object, containing the translated object.
7681             """
7682             # Example: see GEOM_TestAll.py
7683             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7684             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7685             self._autoPublish(anObj, theName, "translated")
7686             return anObj
7687
7688         ## Translate the given object along the vector, specified by its components.
7689         #  @param theObject The object to be translated.
7690         #  @param theDX,theDY,theDZ Components of translation vector.
7691         #  @param theCopy Flag used to translate object itself or create a copy.
7692         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7693         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7694         #
7695         #  @ref tui_translation "Example"
7696         @ManageTransactions("TrsfOp")
7697         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7698             """
7699             Translate the given object along the vector, specified by its components.
7700
7701             Parameters:
7702                 theObject The object to be translated.
7703                 theDX,theDY,theDZ Components of translation vector.
7704                 theCopy Flag used to translate object itself or create a copy.
7705
7706             Returns:
7707                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7708                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7709             """
7710             # Example: see GEOM_TestAll.py
7711             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7712             if theCopy:
7713                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7714             else:
7715                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7716             anObj.SetParameters(Parameters)
7717             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7718             return anObj
7719
7720         ## Translate the given object along the vector, specified
7721         #  by its components, creating its copy before the translation.
7722         #  @param theObject The object to be translated.
7723         #  @param theDX,theDY,theDZ Components of translation vector.
7724         #  @param theName Object name; when specified, this parameter is used
7725         #         for result publication in the study. Otherwise, if automatic
7726         #         publication is switched on, default value is used for result name.
7727         #
7728         #  @return New GEOM.GEOM_Object, containing the translated object.
7729         #
7730         #  @ref tui_translation "Example"
7731         @ManageTransactions("TrsfOp")
7732         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7733             """
7734             Translate the given object along the vector, specified
7735             by its components, creating its copy before the translation.
7736
7737             Parameters:
7738                 theObject The object to be translated.
7739                 theDX,theDY,theDZ Components of translation vector.
7740                 theName Object name; when specified, this parameter is used
7741                         for result publication in the study. Otherwise, if automatic
7742                         publication is switched on, default value is used for result name.
7743
7744             Returns:
7745                 New GEOM.GEOM_Object, containing the translated object.
7746             """
7747             # Example: see GEOM_TestAll.py
7748             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7749             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7750             anObj.SetParameters(Parameters)
7751             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7752             self._autoPublish(anObj, theName, "translated")
7753             return anObj
7754
7755         ## Translate the given object along the given vector.
7756         #  @param theObject The object to be translated.
7757         #  @param theVector The translation vector.
7758         #  @param theCopy Flag used to translate object itself or create a copy.
7759         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7760         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7761         @ManageTransactions("TrsfOp")
7762         def TranslateVector(self, theObject, theVector, theCopy=False):
7763             """
7764             Translate the given object along the given vector.
7765
7766             Parameters:
7767                 theObject The object to be translated.
7768                 theVector The translation vector.
7769                 theCopy Flag used to translate object itself or create a copy.
7770
7771             Returns:
7772                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7773                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7774             """
7775             if theCopy:
7776                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7777             else:
7778                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7779             RaiseIfFailed("TranslateVector", self.TrsfOp)
7780             return anObj
7781
7782         ## Translate the given object along the given vector,
7783         #  creating its copy before the translation.
7784         #  @param theObject The object to be translated.
7785         #  @param theVector The translation vector.
7786         #  @param theName Object name; when specified, this parameter is used
7787         #         for result publication in the study. Otherwise, if automatic
7788         #         publication is switched on, default value is used for result name.
7789         #
7790         #  @return New GEOM.GEOM_Object, containing the translated object.
7791         #
7792         #  @ref tui_translation "Example"
7793         @ManageTransactions("TrsfOp")
7794         def MakeTranslationVector(self, theObject, theVector, theName=None):
7795             """
7796             Translate the given object along the given vector,
7797             creating its copy before the translation.
7798
7799             Parameters:
7800                 theObject The object to be translated.
7801                 theVector The translation vector.
7802                 theName Object name; when specified, this parameter is used
7803                         for result publication in the study. Otherwise, if automatic
7804                         publication is switched on, default value is used for result name.
7805
7806             Returns:
7807                 New GEOM.GEOM_Object, containing the translated object.
7808             """
7809             # Example: see GEOM_TestAll.py
7810             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7811             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7812             self._autoPublish(anObj, theName, "translated")
7813             return anObj
7814
7815         ## Translate the given object along the given vector on given distance.
7816         #  @param theObject The object to be translated.
7817         #  @param theVector The translation vector.
7818         #  @param theDistance The translation distance.
7819         #  @param theCopy Flag used to translate object itself or create a copy.
7820         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7821         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7822         #
7823         #  @ref tui_translation "Example"
7824         @ManageTransactions("TrsfOp")
7825         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7826             """
7827             Translate the given object along the given vector on given distance.
7828
7829             Parameters:
7830                 theObject The object to be translated.
7831                 theVector The translation vector.
7832                 theDistance The translation distance.
7833                 theCopy Flag used to translate object itself or create a copy.
7834
7835             Returns:
7836                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7837                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7838             """
7839             # Example: see GEOM_TestAll.py
7840             theDistance,Parameters = ParseParameters(theDistance)
7841             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7842             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7843             anObj.SetParameters(Parameters)
7844             return anObj
7845
7846         ## Translate the given object along the given vector on given distance,
7847         #  creating its copy before the translation.
7848         #  @param theObject The object to be translated.
7849         #  @param theVector The translation vector.
7850         #  @param theDistance The translation distance.
7851         #  @param theName Object name; when specified, this parameter is used
7852         #         for result publication in the study. Otherwise, if automatic
7853         #         publication is switched on, default value is used for result name.
7854         #
7855         #  @return New GEOM.GEOM_Object, containing the translated object.
7856         #
7857         #  @ref tui_translation "Example"
7858         @ManageTransactions("TrsfOp")
7859         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7860             """
7861             Translate the given object along the given vector on given distance,
7862             creating its copy before the translation.
7863
7864             Parameters:
7865                 theObject The object to be translated.
7866                 theVector The translation vector.
7867                 theDistance The translation distance.
7868                 theName Object name; when specified, this parameter is used
7869                         for result publication in the study. Otherwise, if automatic
7870                         publication is switched on, default value is used for result name.
7871
7872             Returns:
7873                 New GEOM.GEOM_Object, containing the translated object.
7874             """
7875             # Example: see GEOM_TestAll.py
7876             theDistance,Parameters = ParseParameters(theDistance)
7877             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7878             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7879             anObj.SetParameters(Parameters)
7880             self._autoPublish(anObj, theName, "translated")
7881             return anObj
7882
7883         ## Rotate the given object around the given axis on the given angle.
7884         #  @param theObject The object to be rotated.
7885         #  @param theAxis Rotation axis.
7886         #  @param theAngle Rotation angle in radians.
7887         #  @param theCopy Flag used to rotate object itself or create a copy.
7888         #
7889         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7890         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7891         #
7892         #  @ref tui_rotation "Example"
7893         @ManageTransactions("TrsfOp")
7894         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7895             """
7896             Rotate the given object around the given axis on the given angle.
7897
7898             Parameters:
7899                 theObject The object to be rotated.
7900                 theAxis Rotation axis.
7901                 theAngle Rotation angle in radians.
7902                 theCopy Flag used to rotate object itself or create a copy.
7903
7904             Returns:
7905                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7906                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7907             """
7908             # Example: see GEOM_TestAll.py
7909             flag = False
7910             if isinstance(theAngle,str):
7911                 flag = True
7912             theAngle, Parameters = ParseParameters(theAngle)
7913             if flag:
7914                 theAngle = theAngle*math.pi/180.0
7915             if theCopy:
7916                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7917             else:
7918                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7919             RaiseIfFailed("Rotate", self.TrsfOp)
7920             anObj.SetParameters(Parameters)
7921             return anObj
7922
7923         ## Rotate the given object around the given axis
7924         #  on the given angle, creating its copy before the rotation.
7925         #  @param theObject The object to be rotated.
7926         #  @param theAxis Rotation axis.
7927         #  @param theAngle Rotation angle in radians.
7928         #  @param theName Object name; when specified, this parameter is used
7929         #         for result publication in the study. Otherwise, if automatic
7930         #         publication is switched on, default value is used for result name.
7931         #
7932         #  @return New GEOM.GEOM_Object, containing the rotated object.
7933         #
7934         #  @ref tui_rotation "Example"
7935         @ManageTransactions("TrsfOp")
7936         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7937             """
7938             Rotate the given object around the given axis
7939             on the given angle, creating its copy before the rotatation.
7940
7941             Parameters:
7942                 theObject The object to be rotated.
7943                 theAxis Rotation axis.
7944                 theAngle Rotation angle in radians.
7945                 theName Object name; when specified, this parameter is used
7946                         for result publication in the study. Otherwise, if automatic
7947                         publication is switched on, default value is used for result name.
7948
7949             Returns:
7950                 New GEOM.GEOM_Object, containing the rotated object.
7951             """
7952             # Example: see GEOM_TestAll.py
7953             flag = False
7954             if isinstance(theAngle,str):
7955                 flag = True
7956             theAngle, Parameters = ParseParameters(theAngle)
7957             if flag:
7958                 theAngle = theAngle*math.pi/180.0
7959             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7960             RaiseIfFailed("RotateCopy", self.TrsfOp)
7961             anObj.SetParameters(Parameters)
7962             self._autoPublish(anObj, theName, "rotated")
7963             return anObj
7964
7965         ## Rotate given object around vector perpendicular to plane
7966         #  containing three points.
7967         #  @param theObject The object to be rotated.
7968         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7969         #  containing the three points.
7970         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7971         #  @param theCopy Flag used to rotate object itself or create a copy.
7972         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7973         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7974         @ManageTransactions("TrsfOp")
7975         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7976             """
7977             Rotate given object around vector perpendicular to plane
7978             containing three points.
7979
7980             Parameters:
7981                 theObject The object to be rotated.
7982                 theCentPoint central point  the axis is the vector perpendicular to the plane
7983                              containing the three points.
7984                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7985                 theCopy Flag used to rotate object itself or create a copy.
7986
7987             Returns:
7988                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7989                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7990             """
7991             if theCopy:
7992                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7993             else:
7994                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7995             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7996             return anObj
7997
7998         ## Rotate given object around vector perpendicular to plane
7999         #  containing three points, creating its copy before the rotatation.
8000         #  @param theObject The object to be rotated.
8001         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8002         #  containing the three points.
8003         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8004         #  @param theName Object name; when specified, this parameter is used
8005         #         for result publication in the study. Otherwise, if automatic
8006         #         publication is switched on, default value is used for result name.
8007         #
8008         #  @return New GEOM.GEOM_Object, containing the rotated object.
8009         #
8010         #  @ref tui_rotation "Example"
8011         @ManageTransactions("TrsfOp")
8012         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8013             """
8014             Rotate given object around vector perpendicular to plane
8015             containing three points, creating its copy before the rotatation.
8016
8017             Parameters:
8018                 theObject The object to be rotated.
8019                 theCentPoint central point  the axis is the vector perpendicular to the plane
8020                              containing the three points.
8021                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8022                 theName Object name; when specified, this parameter is used
8023                         for result publication in the study. Otherwise, if automatic
8024                         publication is switched on, default value is used for result name.
8025
8026             Returns:
8027                 New GEOM.GEOM_Object, containing the rotated object.
8028             """
8029             # Example: see GEOM_TestAll.py
8030             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8031             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8032             self._autoPublish(anObj, theName, "rotated")
8033             return anObj
8034
8035         ## Scale the given object by the specified factor.
8036         #  @param theObject The object to be scaled.
8037         #  @param thePoint Center point for scaling.
8038         #                  Passing None for it means scaling relatively the origin of global CS.
8039         #  @param theFactor Scaling factor value.
8040         #  @param theCopy Flag used to scale object itself or create a copy.
8041         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8042         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8043         @ManageTransactions("TrsfOp")
8044         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8045             """
8046             Scale the given object by the specified factor.
8047
8048             Parameters:
8049                 theObject The object to be scaled.
8050                 thePoint Center point for scaling.
8051                          Passing None for it means scaling relatively the origin of global CS.
8052                 theFactor Scaling factor value.
8053                 theCopy Flag used to scale object itself or create a copy.
8054
8055             Returns:
8056                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8057                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8058             """
8059             # Example: see GEOM_TestAll.py
8060             theFactor, Parameters = ParseParameters(theFactor)
8061             if theCopy:
8062                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8063             else:
8064                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8065             RaiseIfFailed("Scale", self.TrsfOp)
8066             anObj.SetParameters(Parameters)
8067             return anObj
8068
8069         ## Scale the given object by the factor, creating its copy before the scaling.
8070         #  @param theObject The object to be scaled.
8071         #  @param thePoint Center point for scaling.
8072         #                  Passing None for it means scaling relatively the origin of global CS.
8073         #  @param theFactor Scaling factor value.
8074         #  @param theName Object name; when specified, this parameter is used
8075         #         for result publication in the study. Otherwise, if automatic
8076         #         publication is switched on, default value is used for result name.
8077         #
8078         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8079         #
8080         #  @ref tui_scale "Example"
8081         @ManageTransactions("TrsfOp")
8082         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8083             """
8084             Scale the given object by the factor, creating its copy before the scaling.
8085
8086             Parameters:
8087                 theObject The object to be scaled.
8088                 thePoint Center point for scaling.
8089                          Passing None for it means scaling relatively the origin of global CS.
8090                 theFactor Scaling factor value.
8091                 theName Object name; when specified, this parameter is used
8092                         for result publication in the study. Otherwise, if automatic
8093                         publication is switched on, default value is used for result name.
8094
8095             Returns:
8096                 New GEOM.GEOM_Object, containing the scaled shape.
8097             """
8098             # Example: see GEOM_TestAll.py
8099             theFactor, Parameters = ParseParameters(theFactor)
8100             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8101             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8102             anObj.SetParameters(Parameters)
8103             self._autoPublish(anObj, theName, "scaled")
8104             return anObj
8105
8106         ## Scale the given object by different factors along coordinate axes.
8107         #  @param theObject The object to be scaled.
8108         #  @param thePoint Center point for scaling.
8109         #                  Passing None for it means scaling relatively the origin of global CS.
8110         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8111         #  @param theCopy Flag used to scale object itself or create a copy.
8112         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8113         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8114         @ManageTransactions("TrsfOp")
8115         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8116             """
8117             Scale the given object by different factors along coordinate axes.
8118
8119             Parameters:
8120                 theObject The object to be scaled.
8121                 thePoint Center point for scaling.
8122                             Passing None for it means scaling relatively the origin of global CS.
8123                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8124                 theCopy Flag used to scale object itself or create a copy.
8125
8126             Returns:
8127                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8128                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8129             """
8130             # Example: see GEOM_TestAll.py
8131             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8132             if theCopy:
8133                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8134                                                             theFactorX, theFactorY, theFactorZ)
8135             else:
8136                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8137                                                         theFactorX, theFactorY, theFactorZ)
8138             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8139             anObj.SetParameters(Parameters)
8140             return anObj
8141
8142         ## Scale the given object by different factors along coordinate axes,
8143         #  creating its copy before the scaling.
8144         #  @param theObject The object to be scaled.
8145         #  @param thePoint Center point for scaling.
8146         #                  Passing None for it means scaling relatively the origin of global CS.
8147         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8148         #  @param theName Object name; when specified, this parameter is used
8149         #         for result publication in the study. Otherwise, if automatic
8150         #         publication is switched on, default value is used for result name.
8151         #
8152         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8153         #
8154         #  @ref swig_scale "Example"
8155         @ManageTransactions("TrsfOp")
8156         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8157             """
8158             Scale the given object by different factors along coordinate axes,
8159             creating its copy before the scaling.
8160
8161             Parameters:
8162                 theObject The object to be scaled.
8163                 thePoint Center point for scaling.
8164                             Passing None for it means scaling relatively the origin of global CS.
8165                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8166                 theName Object name; when specified, this parameter is used
8167                         for result publication in the study. Otherwise, if automatic
8168                         publication is switched on, default value is used for result name.
8169
8170             Returns:
8171                 New GEOM.GEOM_Object, containing the scaled shape.
8172             """
8173             # Example: see GEOM_TestAll.py
8174             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8175             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8176                                                         theFactorX, theFactorY, theFactorZ)
8177             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8178             anObj.SetParameters(Parameters)
8179             self._autoPublish(anObj, theName, "scaled")
8180             return anObj
8181
8182         ## Mirror an object relatively the given plane.
8183         #  @param theObject The object to be mirrored.
8184         #  @param thePlane Plane of symmetry.
8185         #  @param theCopy Flag used to mirror object itself or create a copy.
8186         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8187         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8188         @ManageTransactions("TrsfOp")
8189         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8190             """
8191             Mirror an object relatively the given plane.
8192
8193             Parameters:
8194                 theObject The object to be mirrored.
8195                 thePlane Plane of symmetry.
8196                 theCopy Flag used to mirror object itself or create a copy.
8197
8198             Returns:
8199                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8200                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8201             """
8202             if theCopy:
8203                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8204             else:
8205                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8206             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8207             return anObj
8208
8209         ## Create an object, symmetrical
8210         #  to the given one relatively the given plane.
8211         #  @param theObject The object to be mirrored.
8212         #  @param thePlane Plane of symmetry.
8213         #  @param theName Object name; when specified, this parameter is used
8214         #         for result publication in the study. Otherwise, if automatic
8215         #         publication is switched on, default value is used for result name.
8216         #
8217         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8218         #
8219         #  @ref tui_mirror "Example"
8220         @ManageTransactions("TrsfOp")
8221         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8222             """
8223             Create an object, symmetrical to the given one relatively the given plane.
8224
8225             Parameters:
8226                 theObject The object to be mirrored.
8227                 thePlane Plane of symmetry.
8228                 theName Object name; when specified, this parameter is used
8229                         for result publication in the study. Otherwise, if automatic
8230                         publication is switched on, default value is used for result name.
8231
8232             Returns:
8233                 New GEOM.GEOM_Object, containing the mirrored shape.
8234             """
8235             # Example: see GEOM_TestAll.py
8236             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8237             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8238             self._autoPublish(anObj, theName, "mirrored")
8239             return anObj
8240
8241         ## Mirror an object relatively the given axis.
8242         #  @param theObject The object to be mirrored.
8243         #  @param theAxis Axis of symmetry.
8244         #  @param theCopy Flag used to mirror object itself or create a copy.
8245         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8246         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8247         @ManageTransactions("TrsfOp")
8248         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8249             """
8250             Mirror an object relatively the given axis.
8251
8252             Parameters:
8253                 theObject The object to be mirrored.
8254                 theAxis Axis of symmetry.
8255                 theCopy Flag used to mirror object itself or create a copy.
8256
8257             Returns:
8258                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8259                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8260             """
8261             if theCopy:
8262                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8263             else:
8264                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8265             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8266             return anObj
8267
8268         ## Create an object, symmetrical
8269         #  to the given one relatively the given axis.
8270         #  @param theObject The object to be mirrored.
8271         #  @param theAxis Axis of symmetry.
8272         #  @param theName Object name; when specified, this parameter is used
8273         #         for result publication in the study. Otherwise, if automatic
8274         #         publication is switched on, default value is used for result name.
8275         #
8276         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8277         #
8278         #  @ref tui_mirror "Example"
8279         @ManageTransactions("TrsfOp")
8280         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8281             """
8282             Create an object, symmetrical to the given one relatively the given axis.
8283
8284             Parameters:
8285                 theObject The object to be mirrored.
8286                 theAxis Axis of symmetry.
8287                 theName Object name; when specified, this parameter is used
8288                         for result publication in the study. Otherwise, if automatic
8289                         publication is switched on, default value is used for result name.
8290
8291             Returns:
8292                 New GEOM.GEOM_Object, containing the mirrored shape.
8293             """
8294             # Example: see GEOM_TestAll.py
8295             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8296             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8297             self._autoPublish(anObj, theName, "mirrored")
8298             return anObj
8299
8300         ## Mirror an object relatively the given point.
8301         #  @param theObject The object to be mirrored.
8302         #  @param thePoint Point of symmetry.
8303         #  @param theCopy Flag used to mirror object itself or create a copy.
8304         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8305         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8306         @ManageTransactions("TrsfOp")
8307         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8308             """
8309             Mirror an object relatively the given point.
8310
8311             Parameters:
8312                 theObject The object to be mirrored.
8313                 thePoint Point of symmetry.
8314                 theCopy Flag used to mirror object itself or create a copy.
8315
8316             Returns:
8317                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8318                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8319             """
8320             # Example: see GEOM_TestAll.py
8321             if theCopy:
8322                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8323             else:
8324                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8325             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8326             return anObj
8327
8328         ## Create an object, symmetrical
8329         #  to the given one relatively the given point.
8330         #  @param theObject The object to be mirrored.
8331         #  @param thePoint Point of symmetry.
8332         #  @param theName Object name; when specified, this parameter is used
8333         #         for result publication in the study. Otherwise, if automatic
8334         #         publication is switched on, default value is used for result name.
8335         #
8336         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8337         #
8338         #  @ref tui_mirror "Example"
8339         @ManageTransactions("TrsfOp")
8340         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8341             """
8342             Create an object, symmetrical
8343             to the given one relatively the given point.
8344
8345             Parameters:
8346                 theObject The object to be mirrored.
8347                 thePoint Point of symmetry.
8348                 theName Object name; when specified, this parameter is used
8349                         for result publication in the study. Otherwise, if automatic
8350                         publication is switched on, default value is used for result name.
8351
8352             Returns:
8353                 New GEOM.GEOM_Object, containing the mirrored shape.
8354             """
8355             # Example: see GEOM_TestAll.py
8356             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8357             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8358             self._autoPublish(anObj, theName, "mirrored")
8359             return anObj
8360
8361         ## Modify the location of the given object.
8362         #  @param theObject The object to be displaced.
8363         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8364         #                     If \a theStartLCS is NULL, displacement
8365         #                     will be performed from global CS.\n
8366         #                     If \a theObject itself is used as \a theStartLCS,
8367         #                     its location will be changed to \a theEndLCS.
8368         #  @param theEndLCS Coordinate system to perform displacement to it.
8369         #  @param theCopy Flag used to displace object itself or create a copy.
8370         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8371         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8372         @ManageTransactions("TrsfOp")
8373         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8374             """
8375             Modify the Location of the given object by LCS, creating its copy before the setting.
8376
8377             Parameters:
8378                 theObject The object to be displaced.
8379                 theStartLCS Coordinate system to perform displacement from it.
8380                             If theStartLCS is NULL, displacement
8381                             will be performed from global CS.
8382                             If theObject itself is used as theStartLCS,
8383                             its location will be changed to theEndLCS.
8384                 theEndLCS Coordinate system to perform displacement to it.
8385                 theCopy Flag used to displace object itself or create a copy.
8386
8387             Returns:
8388                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8389                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8390             """
8391             # Example: see GEOM_TestAll.py
8392             if theCopy:
8393                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8394             else:
8395                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8396             RaiseIfFailed("Displace", self.TrsfOp)
8397             return anObj
8398
8399         ## Modify the Location of the given object by LCS,
8400         #  creating its copy before the setting.
8401         #  @param theObject The object to be displaced.
8402         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8403         #                     If \a theStartLCS is NULL, displacement
8404         #                     will be performed from global CS.\n
8405         #                     If \a theObject itself is used as \a theStartLCS,
8406         #                     its location will be changed to \a theEndLCS.
8407         #  @param theEndLCS Coordinate system to perform displacement to it.
8408         #  @param theName Object name; when specified, this parameter is used
8409         #         for result publication in the study. Otherwise, if automatic
8410         #         publication is switched on, default value is used for result name.
8411         #
8412         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8413         #
8414         #  @ref tui_modify_location "Example"
8415         @ManageTransactions("TrsfOp")
8416         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8417             """
8418             Modify the Location of the given object by LCS, creating its copy before the setting.
8419
8420             Parameters:
8421                 theObject The object to be displaced.
8422                 theStartLCS Coordinate system to perform displacement from it.
8423                             If theStartLCS is NULL, displacement
8424                             will be performed from global CS.
8425                             If theObject itself is used as theStartLCS,
8426                             its location will be changed to theEndLCS.
8427                 theEndLCS Coordinate system to perform displacement to it.
8428                 theName Object name; when specified, this parameter is used
8429                         for result publication in the study. Otherwise, if automatic
8430                         publication is switched on, default value is used for result name.
8431
8432             Returns:
8433                 New GEOM.GEOM_Object, containing the displaced shape.
8434
8435             Example of usage:
8436                 # create local coordinate systems
8437                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8438                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8439                 # modify the location of the given object
8440                 position = geompy.MakePosition(cylinder, cs1, cs2)
8441             """
8442             # Example: see GEOM_TestAll.py
8443             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8444             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8445             self._autoPublish(anObj, theName, "displaced")
8446             return anObj
8447
8448         ## Modify the Location of the given object by Path.
8449         #  @param  theObject The object to be displaced.
8450         #  @param  thePath Wire or Edge along that the object will be translated.
8451         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8452         #  @param  theCopy is to create a copy objects if true.
8453         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8454         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8455         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8456         #
8457         #  @ref tui_modify_location "Example"
8458         @ManageTransactions("TrsfOp")
8459         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8460             """
8461             Modify the Location of the given object by Path.
8462
8463             Parameters:
8464                  theObject The object to be displaced.
8465                  thePath Wire or Edge along that the object will be translated.
8466                  theDistance progress of Path (0 = start location, 1 = end of path location).
8467                  theCopy is to create a copy objects if true.
8468                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8469
8470             Returns:
8471                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8472                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8473
8474             Example of usage:
8475                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8476             """
8477             # Example: see GEOM_TestAll.py
8478             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8479             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8480             return anObj
8481
8482         ## Modify the Location of the given object by Path, creating its copy before the operation.
8483         #  @param theObject The object to be displaced.
8484         #  @param thePath Wire or Edge along that the object will be translated.
8485         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8486         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8487         #  @param theName Object name; when specified, this parameter is used
8488         #         for result publication in the study. Otherwise, if automatic
8489         #         publication is switched on, default value is used for result name.
8490         #
8491         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8492         @ManageTransactions("TrsfOp")
8493         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8494             """
8495             Modify the Location of the given object by Path, creating its copy before the operation.
8496
8497             Parameters:
8498                  theObject The object to be displaced.
8499                  thePath Wire or Edge along that the object will be translated.
8500                  theDistance progress of Path (0 = start location, 1 = end of path location).
8501                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8502                  theName Object name; when specified, this parameter is used
8503                          for result publication in the study. Otherwise, if automatic
8504                          publication is switched on, default value is used for result name.
8505
8506             Returns:
8507                 New GEOM.GEOM_Object, containing the displaced shape.
8508             """
8509             # Example: see GEOM_TestAll.py
8510             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8511             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8512             self._autoPublish(anObj, theName, "displaced")
8513             return anObj
8514
8515         ## Offset given shape.
8516         #  @param theObject The base object for the offset.
8517         #  @param theOffset Offset value.
8518         #  @param theCopy Flag used to offset object itself or create a copy.
8519         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8520         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8521         @ManageTransactions("TrsfOp")
8522         def Offset(self, theObject, theOffset, theCopy=False):
8523             """
8524             Offset given shape.
8525
8526             Parameters:
8527                 theObject The base object for the offset.
8528                 theOffset Offset value.
8529                 theCopy Flag used to offset object itself or create a copy.
8530
8531             Returns:
8532                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8533                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8534             """
8535             theOffset, Parameters = ParseParameters(theOffset)
8536             if theCopy:
8537                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8538             else:
8539                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8540             RaiseIfFailed("Offset", self.TrsfOp)
8541             anObj.SetParameters(Parameters)
8542             return anObj
8543
8544         ## Create new object as offset of the given one.
8545         #  @param theObject The base object for the offset.
8546         #  @param theOffset Offset value.
8547         #  @param theName Object name; when specified, this parameter is used
8548         #         for result publication in the study. Otherwise, if automatic
8549         #         publication is switched on, default value is used for result name.
8550         #
8551         #  @return New GEOM.GEOM_Object, containing the offset object.
8552         #
8553         #  @ref tui_offset "Example"
8554         @ManageTransactions("TrsfOp")
8555         def MakeOffset(self, theObject, theOffset, theName=None):
8556             """
8557             Create new object as offset of the given one.
8558
8559             Parameters:
8560                 theObject The base object for the offset.
8561                 theOffset Offset value.
8562                 theName Object name; when specified, this parameter is used
8563                         for result publication in the study. Otherwise, if automatic
8564                         publication is switched on, default value is used for result name.
8565
8566             Returns:
8567                 New GEOM.GEOM_Object, containing the offset object.
8568
8569             Example of usage:
8570                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8571                  # create a new object as offset of the given object
8572                  offset = geompy.MakeOffset(box, 70.)
8573             """
8574             # Example: see GEOM_TestAll.py
8575             theOffset, Parameters = ParseParameters(theOffset)
8576             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8577             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8578             anObj.SetParameters(Parameters)
8579             self._autoPublish(anObj, theName, "offset")
8580             return anObj
8581
8582         ## Create new object as projection of the given one on a 2D surface.
8583         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8584         #  @param theTarget The target object. It can be planar or cylindrical face.
8585         #  @param theName Object name; when specified, this parameter is used
8586         #         for result publication in the study. Otherwise, if automatic
8587         #         publication is switched on, default value is used for result name.
8588         #
8589         #  @return New GEOM.GEOM_Object, containing the projection.
8590         #
8591         #  @ref tui_projection "Example"
8592         @ManageTransactions("TrsfOp")
8593         def MakeProjection(self, theSource, theTarget, theName=None):
8594             """
8595             Create new object as projection of the given one on a 2D surface.
8596
8597             Parameters:
8598                 theSource The source object for the projection. It can be a point, edge or wire.
8599                 theTarget The target object. It can be planar or cylindrical face.
8600                 theName Object name; when specified, this parameter is used
8601                         for result publication in the study. Otherwise, if automatic
8602                         publication is switched on, default value is used for result name.
8603
8604             Returns:
8605                 New GEOM.GEOM_Object, containing the projection.
8606             """
8607             # Example: see GEOM_TestAll.py
8608             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8609             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8610             self._autoPublish(anObj, theName, "projection")
8611             return anObj
8612
8613         ## Create a projection projection of the given point on a wire or an edge.
8614         #  If there are no solutions or there are 2 or more solutions It throws an
8615         #  exception.
8616         #  @param thePoint the point to be projected.
8617         #  @param theWire the wire. The edge is accepted as well.
8618         #  @param theName Object name; when specified, this parameter is used
8619         #         for result publication in the study. Otherwise, if automatic
8620         #         publication is switched on, default value is used for result name.
8621         #
8622         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8623         #  \n \a u: The parameter of projection point on edge.
8624         #  \n \a PointOnEdge: The projection point.
8625         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8626         #
8627         #  @ref tui_projection "Example"
8628         @ManageTransactions("TrsfOp")
8629         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8630             """
8631             Create a projection projection of the given point on a wire or an edge.
8632             If there are no solutions or there are 2 or more solutions It throws an
8633             exception.
8634
8635             Parameters:
8636                 thePoint the point to be projected.
8637                 theWire the wire. The edge is accepted as well.
8638                 theName Object name; when specified, this parameter is used
8639                         for result publication in the study. Otherwise, if automatic
8640                         publication is switched on, default value is used for result name.
8641
8642             Returns:
8643                 [u, PointOnEdge, EdgeInWireIndex]
8644                  u: The parameter of projection point on edge.
8645                  PointOnEdge: The projection point.
8646                  EdgeInWireIndex: The index of an edge in a wire.
8647             """
8648             # Example: see GEOM_TestAll.py
8649             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8650             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8651             self._autoPublish(anObj[1], theName, "projection")
8652             return anObj
8653
8654         # -----------------------------------------------------------------------------
8655         # Patterns
8656         # -----------------------------------------------------------------------------
8657
8658         ## Translate the given object along the given vector a given number times
8659         #  @param theObject The object to be translated.
8660         #  @param theVector Direction of the translation. DX if None.
8661         #  @param theStep Distance to translate on.
8662         #  @param theNbTimes Quantity of translations to be done.
8663         #  @param theName Object name; when specified, this parameter is used
8664         #         for result publication in the study. Otherwise, if automatic
8665         #         publication is switched on, default value is used for result name.
8666         #
8667         #  @return New GEOM.GEOM_Object, containing compound of all
8668         #          the shapes, obtained after each translation.
8669         #
8670         #  @ref tui_multi_translation "Example"
8671         @ManageTransactions("TrsfOp")
8672         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8673             """
8674             Translate the given object along the given vector a given number times
8675
8676             Parameters:
8677                 theObject The object to be translated.
8678                 theVector Direction of the translation. DX if None.
8679                 theStep Distance to translate on.
8680                 theNbTimes Quantity of translations to be done.
8681                 theName Object name; when specified, this parameter is used
8682                         for result publication in the study. Otherwise, if automatic
8683                         publication is switched on, default value is used for result name.
8684
8685             Returns:
8686                 New GEOM.GEOM_Object, containing compound of all
8687                 the shapes, obtained after each translation.
8688
8689             Example of usage:
8690                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8691             """
8692             # Example: see GEOM_TestAll.py
8693             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8694             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8695             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8696             anObj.SetParameters(Parameters)
8697             self._autoPublish(anObj, theName, "multitranslation")
8698             return anObj
8699
8700         ## Conseqently apply two specified translations to theObject specified number of times.
8701         #  @param theObject The object to be translated.
8702         #  @param theVector1 Direction of the first translation. DX if None.
8703         #  @param theStep1 Step of the first translation.
8704         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8705         #  @param theVector2 Direction of the second translation. DY if None.
8706         #  @param theStep2 Step of the second translation.
8707         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8708         #  @param theName Object name; when specified, this parameter is used
8709         #         for result publication in the study. Otherwise, if automatic
8710         #         publication is switched on, default value is used for result name.
8711         #
8712         #  @return New GEOM.GEOM_Object, containing compound of all
8713         #          the shapes, obtained after each translation.
8714         #
8715         #  @ref tui_multi_translation "Example"
8716         @ManageTransactions("TrsfOp")
8717         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8718                                    theVector2, theStep2, theNbTimes2, theName=None):
8719             """
8720             Conseqently apply two specified translations to theObject specified number of times.
8721
8722             Parameters:
8723                 theObject The object to be translated.
8724                 theVector1 Direction of the first translation. DX if None.
8725                 theStep1 Step of the first translation.
8726                 theNbTimes1 Quantity of translations to be done along theVector1.
8727                 theVector2 Direction of the second translation. DY if None.
8728                 theStep2 Step of the second translation.
8729                 theNbTimes2 Quantity of translations to be done along theVector2.
8730                 theName Object name; when specified, this parameter is used
8731                         for result publication in the study. Otherwise, if automatic
8732                         publication is switched on, default value is used for result name.
8733
8734             Returns:
8735                 New GEOM.GEOM_Object, containing compound of all
8736                 the shapes, obtained after each translation.
8737
8738             Example of usage:
8739                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8740             """
8741             # Example: see GEOM_TestAll.py
8742             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8743             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8744                                                  theVector2, theStep2, theNbTimes2)
8745             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8746             anObj.SetParameters(Parameters)
8747             self._autoPublish(anObj, theName, "multitranslation")
8748             return anObj
8749
8750         ## Rotate the given object around the given axis a given number times.
8751         #  Rotation angle will be 2*PI/theNbTimes.
8752         #  @param theObject The object to be rotated.
8753         #  @param theAxis The rotation axis. DZ if None.
8754         #  @param theNbTimes Quantity of rotations to be done.
8755         #  @param theName Object name; when specified, this parameter is used
8756         #         for result publication in the study. Otherwise, if automatic
8757         #         publication is switched on, default value is used for result name.
8758         #
8759         #  @return New GEOM.GEOM_Object, containing compound of all the
8760         #          shapes, obtained after each rotation.
8761         #
8762         #  @ref tui_multi_rotation "Example"
8763         @ManageTransactions("TrsfOp")
8764         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8765             """
8766             Rotate the given object around the given axis a given number times.
8767             Rotation angle will be 2*PI/theNbTimes.
8768
8769             Parameters:
8770                 theObject The object to be rotated.
8771                 theAxis The rotation axis. DZ if None.
8772                 theNbTimes Quantity of rotations to be done.
8773                 theName Object name; when specified, this parameter is used
8774                         for result publication in the study. Otherwise, if automatic
8775                         publication is switched on, default value is used for result name.
8776
8777             Returns:
8778                 New GEOM.GEOM_Object, containing compound of all the
8779                 shapes, obtained after each rotation.
8780
8781             Example of usage:
8782                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8783             """
8784             # Example: see GEOM_TestAll.py
8785             theNbTimes, Parameters = ParseParameters(theNbTimes)
8786             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8787             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8788             anObj.SetParameters(Parameters)
8789             self._autoPublish(anObj, theName, "multirotation")
8790             return anObj
8791
8792         ## Rotate the given object around the given axis
8793         #  a given number times on the given angle.
8794         #  @param theObject The object to be rotated.
8795         #  @param theAxis The rotation axis. DZ if None.
8796         #  @param theAngleStep Rotation angle in radians.
8797         #  @param theNbTimes Quantity of rotations to be done.
8798         #  @param theName Object name; when specified, this parameter is used
8799         #         for result publication in the study. Otherwise, if automatic
8800         #         publication is switched on, default value is used for result name.
8801         #
8802         #  @return New GEOM.GEOM_Object, containing compound of all the
8803         #          shapes, obtained after each rotation.
8804         #
8805         #  @ref tui_multi_rotation "Example"
8806         @ManageTransactions("TrsfOp")
8807         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8808             """
8809             Rotate the given object around the given axis
8810             a given number times on the given angle.
8811
8812             Parameters:
8813                 theObject The object to be rotated.
8814                 theAxis The rotation axis. DZ if None.
8815                 theAngleStep Rotation angle in radians.
8816                 theNbTimes Quantity of rotations to be done.
8817                 theName Object name; when specified, this parameter is used
8818                         for result publication in the study. Otherwise, if automatic
8819                         publication is switched on, default value is used for result name.
8820
8821             Returns:
8822                 New GEOM.GEOM_Object, containing compound of all the
8823                 shapes, obtained after each rotation.
8824
8825             Example of usage:
8826                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8827             """
8828             # Example: see GEOM_TestAll.py
8829             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8830             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8831             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8832             anObj.SetParameters(Parameters)
8833             self._autoPublish(anObj, theName, "multirotation")
8834             return anObj
8835
8836         ## Rotate the given object around the given axis a given
8837         #  number times and multi-translate each rotation result.
8838         #  Rotation angle will be 2*PI/theNbTimes1.
8839         #  Translation direction passes through center of gravity
8840         #  of rotated shape and its projection on the rotation axis.
8841         #  @param theObject The object to be rotated.
8842         #  @param theAxis Rotation axis. DZ if None.
8843         #  @param theNbTimes1 Quantity of rotations to be done.
8844         #  @param theRadialStep Translation distance.
8845         #  @param theNbTimes2 Quantity of translations to be done.
8846         #  @param theName Object name; when specified, this parameter is used
8847         #         for result publication in the study. Otherwise, if automatic
8848         #         publication is switched on, default value is used for result name.
8849         #
8850         #  @return New GEOM.GEOM_Object, containing compound of all the
8851         #          shapes, obtained after each transformation.
8852         #
8853         #  @ref tui_multi_rotation "Example"
8854         @ManageTransactions("TrsfOp")
8855         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8856             """
8857             Rotate the given object around the
8858             given axis on the given angle a given number
8859             times and multi-translate each rotation result.
8860             Translation direction passes through center of gravity
8861             of rotated shape and its projection on the rotation axis.
8862
8863             Parameters:
8864                 theObject The object to be rotated.
8865                 theAxis Rotation axis. DZ if None.
8866                 theNbTimes1 Quantity of rotations to be done.
8867                 theRadialStep Translation distance.
8868                 theNbTimes2 Quantity of translations to be done.
8869                 theName Object name; when specified, this parameter is used
8870                         for result publication in the study. Otherwise, if automatic
8871                         publication is switched on, default value is used for result name.
8872
8873             Returns:
8874                 New GEOM.GEOM_Object, containing compound of all the
8875                 shapes, obtained after each transformation.
8876
8877             Example of usage:
8878                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8879             """
8880             # Example: see GEOM_TestAll.py
8881             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8882             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8883             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8884             anObj.SetParameters(Parameters)
8885             self._autoPublish(anObj, theName, "multirotation")
8886             return anObj
8887
8888         ## Rotate the given object around the
8889         #  given axis on the given angle a given number
8890         #  times and multi-translate each rotation result.
8891         #  Translation direction passes through center of gravity
8892         #  of rotated shape and its projection on the rotation axis.
8893         #  @param theObject The object to be rotated.
8894         #  @param theAxis Rotation axis. DZ if None.
8895         #  @param theAngleStep Rotation angle in radians.
8896         #  @param theNbTimes1 Quantity of rotations to be done.
8897         #  @param theRadialStep Translation distance.
8898         #  @param theNbTimes2 Quantity of translations to be done.
8899         #  @param theName Object name; when specified, this parameter is used
8900         #         for result publication in the study. Otherwise, if automatic
8901         #         publication is switched on, default value is used for result name.
8902         #
8903         #  @return New GEOM.GEOM_Object, containing compound of all the
8904         #          shapes, obtained after each transformation.
8905         #
8906         #  @ref tui_multi_rotation "Example"
8907         @ManageTransactions("TrsfOp")
8908         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8909             """
8910             Rotate the given object around the
8911             given axis on the given angle a given number
8912             times and multi-translate each rotation result.
8913             Translation direction passes through center of gravity
8914             of rotated shape and its projection on the rotation axis.
8915
8916             Parameters:
8917                 theObject The object to be rotated.
8918                 theAxis Rotation axis. DZ if None.
8919                 theAngleStep Rotation angle in radians.
8920                 theNbTimes1 Quantity of rotations to be done.
8921                 theRadialStep Translation distance.
8922                 theNbTimes2 Quantity of translations to be done.
8923                 theName Object name; when specified, this parameter is used
8924                         for result publication in the study. Otherwise, if automatic
8925                         publication is switched on, default value is used for result name.
8926
8927             Returns:
8928                 New GEOM.GEOM_Object, containing compound of all the
8929                 shapes, obtained after each transformation.
8930
8931             Example of usage:
8932                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8933             """
8934             # Example: see GEOM_TestAll.py
8935             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8936             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8937             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8938             anObj.SetParameters(Parameters)
8939             self._autoPublish(anObj, theName, "multirotation")
8940             return anObj
8941
8942         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8943         #
8944         #  @ref swig_MakeMultiRotation "Example"
8945         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8946             """
8947             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8948
8949             Example of usage:
8950                 pz = geompy.MakeVertex(0, 0, 100)
8951                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8952                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8953             """
8954             # Example: see GEOM_TestOthers.py
8955             aVec = self.MakeLine(aPoint,aDir)
8956             # note: auto-publishing is done in self.MultiRotate1D()
8957             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8958             return anObj
8959
8960         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8961         #
8962         #  @ref swig_MakeMultiRotation "Example"
8963         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8964             """
8965             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8966
8967             Example of usage:
8968                 pz = geompy.MakeVertex(0, 0, 100)
8969                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8970                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8971             """
8972             # Example: see GEOM_TestOthers.py
8973             aVec = self.MakeLine(aPoint,aDir)
8974             # note: auto-publishing is done in self.MultiRotate1D()
8975             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8976             return anObj
8977
8978         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8979         #
8980         #  @ref swig_MakeMultiRotation "Example"
8981         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8982             """
8983             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8984
8985             Example of usage:
8986                 pz = geompy.MakeVertex(0, 0, 100)
8987                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8988                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8989             """
8990             # Example: see GEOM_TestOthers.py
8991             aVec = self.MakeLine(aPoint,aDir)
8992             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8993             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8994             return anObj
8995
8996         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8997         #
8998         #  @ref swig_MakeMultiRotation "Example"
8999         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9000             """
9001             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9002
9003             Example of usage:
9004                 pz = geompy.MakeVertex(0, 0, 100)
9005                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9006                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9007             """
9008             # Example: see GEOM_TestOthers.py
9009             aVec = self.MakeLine(aPoint,aDir)
9010             # note: auto-publishing is done in self.MultiRotate2D()
9011             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9012             return anObj
9013
9014         # end of l3_transform
9015         ## @}
9016
9017         ## @addtogroup l3_transform_d
9018         ## @{
9019
9020         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9021         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9022             """
9023             Deprecated method. Use MultiRotate1DNbTimes instead.
9024             """
9025             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9026             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9027
9028         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9029         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9030         @ManageTransactions("TrsfOp")
9031         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9032             """
9033             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9034             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9035
9036             Example of usage:
9037                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9038             """
9039             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9040             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9041             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9042             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9043             anObj.SetParameters(Parameters)
9044             self._autoPublish(anObj, theName, "multirotation")
9045             return anObj
9046
9047         ## The same, as MultiRotate1D(), but axis is given by direction and point
9048         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9049         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9050             """
9051             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9052             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9053
9054             Example of usage:
9055                 pz = geompy.MakeVertex(0, 0, 100)
9056                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9057                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9058             """
9059             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9060             aVec = self.MakeLine(aPoint,aDir)
9061             # note: auto-publishing is done in self.MultiRotate1D()
9062             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9063             return anObj
9064
9065         ## The same, as MultiRotate2D(), but axis is given by direction and point
9066         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9067         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9068             """
9069             The same, as MultiRotate2D(), but axis is given by direction and point
9070             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9071
9072             Example of usage:
9073                 pz = geompy.MakeVertex(0, 0, 100)
9074                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9075                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9076             """
9077             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9078             aVec = self.MakeLine(aPoint,aDir)
9079             # note: auto-publishing is done in self.MultiRotate2D()
9080             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9081             return anObj
9082
9083         # end of l3_transform_d
9084         ## @}
9085
9086         ## @addtogroup l3_local
9087         ## @{
9088
9089         ## Perform a fillet on all edges of the given shape.
9090         #  @param theShape Shape, to perform fillet on.
9091         #  @param theR Fillet radius.
9092         #  @param theName Object name; when specified, this parameter is used
9093         #         for result publication in the study. Otherwise, if automatic
9094         #         publication is switched on, default value is used for result name.
9095         #
9096         #  @return New GEOM.GEOM_Object, containing the result shape.
9097         #
9098         #  @ref tui_fillet "Example 1"
9099         #  \n @ref swig_MakeFilletAll "Example 2"
9100         @ManageTransactions("LocalOp")
9101         def MakeFilletAll(self, theShape, theR, theName=None):
9102             """
9103             Perform a fillet on all edges of the given shape.
9104
9105             Parameters:
9106                 theShape Shape, to perform fillet on.
9107                 theR Fillet radius.
9108                 theName Object name; when specified, this parameter is used
9109                         for result publication in the study. Otherwise, if automatic
9110                         publication is switched on, default value is used for result name.
9111
9112             Returns:
9113                 New GEOM.GEOM_Object, containing the result shape.
9114
9115             Example of usage:
9116                filletall = geompy.MakeFilletAll(prism, 10.)
9117             """
9118             # Example: see GEOM_TestOthers.py
9119             theR,Parameters = ParseParameters(theR)
9120             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9121             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9122             anObj.SetParameters(Parameters)
9123             self._autoPublish(anObj, theName, "fillet")
9124             return anObj
9125
9126         ## Perform a fillet on the specified edges/faces of the given shape
9127         #  @param theShape Shape, to perform fillet on.
9128         #  @param theR Fillet radius.
9129         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9130         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9131         #  @param theName Object name; when specified, this parameter is used
9132         #         for result publication in the study. Otherwise, if automatic
9133         #         publication is switched on, default value is used for result name.
9134         #
9135         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9136         #
9137         #  @return New GEOM.GEOM_Object, containing the result shape.
9138         #
9139         #  @ref tui_fillet "Example"
9140         @ManageTransactions("LocalOp")
9141         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9142             """
9143             Perform a fillet on the specified edges/faces of the given shape
9144
9145             Parameters:
9146                 theShape Shape, to perform fillet on.
9147                 theR Fillet radius.
9148                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9149                 theListShapes Global indices of edges/faces to perform fillet on.
9150                 theName Object name; when specified, this parameter is used
9151                         for result publication in the study. Otherwise, if automatic
9152                         publication is switched on, default value is used for result name.
9153
9154             Note:
9155                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9156
9157             Returns:
9158                 New GEOM.GEOM_Object, containing the result shape.
9159
9160             Example of usage:
9161                 # get the list of IDs (IDList) for the fillet
9162                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9163                 IDlist_e = []
9164                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9165                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9166                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9167                 # make a fillet on the specified edges of the given shape
9168                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9169             """
9170             # Example: see GEOM_TestAll.py
9171             theR,Parameters = ParseParameters(theR)
9172             anObj = None
9173             if theShapeType == self.ShapeType["EDGE"]:
9174                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9175                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9176             else:
9177                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9178                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9179             anObj.SetParameters(Parameters)
9180             self._autoPublish(anObj, theName, "fillet")
9181             return anObj
9182
9183         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9184         @ManageTransactions("LocalOp")
9185         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9186             """
9187             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9188
9189             Example of usage:
9190                 # get the list of IDs (IDList) for the fillet
9191                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9192                 IDlist_e = []
9193                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9194                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9195                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9196                 # make a fillet on the specified edges of the given shape
9197                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9198             """
9199             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9200             anObj = None
9201             if theShapeType == self.ShapeType["EDGE"]:
9202                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9203                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9204             else:
9205                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9206                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9207             anObj.SetParameters(Parameters)
9208             self._autoPublish(anObj, theName, "fillet")
9209             return anObj
9210
9211         ## Perform a fillet on the specified edges of the given shape
9212         #  @param theShape  Wire Shape to perform fillet on.
9213         #  @param theR  Fillet radius.
9214         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9215         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9216         #    \note The list of vertices could be empty,
9217         #          in this case fillet will done done at all vertices in wire
9218         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9219         #         by the length of the edges, nearest to the fillet vertex.
9220         #         But sometimes the next edge is C1 continuous with the one, nearest to
9221         #         the fillet point, and such two (or more) edges can be united to allow
9222         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9223         #         thus ignoring the secant vertex (vertices).
9224         #  @param theName Object name; when specified, this parameter is used
9225         #         for result publication in the study. Otherwise, if automatic
9226         #         publication is switched on, default value is used for result name.
9227         #
9228         #  @return New GEOM.GEOM_Object, containing the result shape.
9229         #
9230         #  @ref tui_fillet2d "Example"
9231         @ManageTransactions("LocalOp")
9232         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9233             """
9234             Perform a fillet on the specified edges of the given shape
9235
9236             Parameters:
9237                 theShape  Wire Shape to perform fillet on.
9238                 theR  Fillet radius.
9239                 theListOfVertexes Global indices of vertexes to perform fillet on.
9240                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9241                     by the length of the edges, nearest to the fillet vertex.
9242                     But sometimes the next edge is C1 continuous with the one, nearest to
9243                     the fillet point, and such two (or more) edges can be united to allow
9244                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9245                     thus ignoring the secant vertex (vertices).
9246                 theName Object name; when specified, this parameter is used
9247                         for result publication in the study. Otherwise, if automatic
9248                         publication is switched on, default value is used for result name.
9249             Note:
9250                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9251
9252                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9253
9254             Returns:
9255                 New GEOM.GEOM_Object, containing the result shape.
9256
9257             Example of usage:
9258                 # create wire
9259                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9260                 # make fillet at given wire vertices with giver radius
9261                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9262             """
9263             # Example: see GEOM_TestAll.py
9264             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9265             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9266             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9267             anObj.SetParameters(Parameters)
9268             self._autoPublish(anObj, theName, "fillet")
9269             return anObj
9270
9271         ## Perform a fillet at the specified vertices of the given face/shell.
9272         #  @param theShape Face or Shell shape to perform fillet on.
9273         #  @param theR Fillet radius.
9274         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9275         #  @param theName Object name; when specified, this parameter is used
9276         #         for result publication in the study. Otherwise, if automatic
9277         #         publication is switched on, default value is used for result name.
9278         #
9279         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9280         #
9281         #  @return New GEOM.GEOM_Object, containing the result shape.
9282         #
9283         #  @ref tui_fillet2d "Example"
9284         @ManageTransactions("LocalOp")
9285         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9286             """
9287             Perform a fillet at the specified vertices of the given face/shell.
9288
9289             Parameters:
9290                 theShape  Face or Shell shape to perform fillet on.
9291                 theR  Fillet radius.
9292                 theListOfVertexes Global indices of vertexes to perform fillet on.
9293                 theName Object name; when specified, this parameter is used
9294                         for result publication in the study. Otherwise, if automatic
9295                         publication is switched on, default value is used for result name.
9296             Note:
9297                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9298
9299             Returns:
9300                 New GEOM.GEOM_Object, containing the result shape.
9301
9302             Example of usage:
9303                 face = geompy.MakeFaceHW(100, 100, 1)
9304                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9305             """
9306             # Example: see GEOM_TestAll.py
9307             theR,Parameters = ParseParameters(theR)
9308             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9309             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9310             anObj.SetParameters(Parameters)
9311             self._autoPublish(anObj, theName, "fillet")
9312             return anObj
9313
9314         ## Perform a symmetric chamfer on all edges of the given shape.
9315         #  @param theShape Shape, to perform chamfer on.
9316         #  @param theD Chamfer size along each face.
9317         #  @param theName Object name; when specified, this parameter is used
9318         #         for result publication in the study. Otherwise, if automatic
9319         #         publication is switched on, default value is used for result name.
9320         #
9321         #  @return New GEOM.GEOM_Object, containing the result shape.
9322         #
9323         #  @ref tui_chamfer "Example 1"
9324         #  \n @ref swig_MakeChamferAll "Example 2"
9325         @ManageTransactions("LocalOp")
9326         def MakeChamferAll(self, theShape, theD, theName=None):
9327             """
9328             Perform a symmetric chamfer on all edges of the given shape.
9329
9330             Parameters:
9331                 theShape Shape, to perform chamfer on.
9332                 theD Chamfer size along each face.
9333                 theName Object name; when specified, this parameter is used
9334                         for result publication in the study. Otherwise, if automatic
9335                         publication is switched on, default value is used for result name.
9336
9337             Returns:
9338                 New GEOM.GEOM_Object, containing the result shape.
9339
9340             Example of usage:
9341                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9342             """
9343             # Example: see GEOM_TestOthers.py
9344             theD,Parameters = ParseParameters(theD)
9345             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9346             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9347             anObj.SetParameters(Parameters)
9348             self._autoPublish(anObj, theName, "chamfer")
9349             return anObj
9350
9351         ## Perform a chamfer on edges, common to the specified faces,
9352         #  with distance D1 on the Face1
9353         #  @param theShape Shape, to perform chamfer on.
9354         #  @param theD1 Chamfer size along \a theFace1.
9355         #  @param theD2 Chamfer size along \a theFace2.
9356         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9357         #  @param theName Object name; when specified, this parameter is used
9358         #         for result publication in the study. Otherwise, if automatic
9359         #         publication is switched on, default value is used for result name.
9360         #
9361         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9362         #
9363         #  @return New GEOM.GEOM_Object, containing the result shape.
9364         #
9365         #  @ref tui_chamfer "Example"
9366         @ManageTransactions("LocalOp")
9367         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9368             """
9369             Perform a chamfer on edges, common to the specified faces,
9370             with distance D1 on the Face1
9371
9372             Parameters:
9373                 theShape Shape, to perform chamfer on.
9374                 theD1 Chamfer size along theFace1.
9375                 theD2 Chamfer size along theFace2.
9376                 theFace1,theFace2 Global indices of two faces of theShape.
9377                 theName Object name; when specified, this parameter is used
9378                         for result publication in the study. Otherwise, if automatic
9379                         publication is switched on, default value is used for result name.
9380
9381             Note:
9382                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9383
9384             Returns:
9385                 New GEOM.GEOM_Object, containing the result shape.
9386
9387             Example of usage:
9388                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9389                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9390                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9391                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9392             """
9393             # Example: see GEOM_TestAll.py
9394             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9395             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9396             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9397             anObj.SetParameters(Parameters)
9398             self._autoPublish(anObj, theName, "chamfer")
9399             return anObj
9400
9401         ## Perform a chamfer on edges
9402         #  @param theShape Shape, to perform chamfer on.
9403         #  @param theD Chamfer length
9404         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9405         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9406         #  @param theName Object name; when specified, this parameter is used
9407         #         for result publication in the study. Otherwise, if automatic
9408         #         publication is switched on, default value is used for result name.
9409         #
9410         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9411         #
9412         #  @return New GEOM.GEOM_Object, containing the result shape.
9413         @ManageTransactions("LocalOp")
9414         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9415             """
9416             Perform a chamfer on edges
9417
9418             Parameters:
9419                 theShape Shape, to perform chamfer on.
9420                 theD1 Chamfer size along theFace1.
9421                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9422                 theFace1,theFace2 Global indices of two faces of theShape.
9423                 theName Object name; when specified, this parameter is used
9424                         for result publication in the study. Otherwise, if automatic
9425                         publication is switched on, default value is used for result name.
9426
9427             Note:
9428                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9429
9430             Returns:
9431                 New GEOM.GEOM_Object, containing the result shape.
9432
9433             Example of usage:
9434                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9435                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9436                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9437                 ang = 30
9438                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9439             """
9440             flag = False
9441             if isinstance(theAngle,str):
9442                 flag = True
9443             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9444             if flag:
9445                 theAngle = theAngle*math.pi/180.0
9446             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9447             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9448             anObj.SetParameters(Parameters)
9449             self._autoPublish(anObj, theName, "chamfer")
9450             return anObj
9451
9452         ## Perform a chamfer on all edges of the specified faces,
9453         #  with distance D1 on the first specified face (if several for one edge)
9454         #  @param theShape Shape, to perform chamfer on.
9455         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9456         #               connected to the edge, are in \a theFaces, \a theD1
9457         #               will be get along face, which is nearer to \a theFaces beginning.
9458         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9459         #  @param theFaces Sequence of global indices of faces of \a theShape.
9460         #  @param theName Object name; when specified, this parameter is used
9461         #         for result publication in the study. Otherwise, if automatic
9462         #         publication is switched on, default value is used for result name.
9463         #
9464         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9465         #
9466         #  @return New GEOM.GEOM_Object, containing the result shape.
9467         #
9468         #  @ref tui_chamfer "Example"
9469         @ManageTransactions("LocalOp")
9470         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9471             """
9472             Perform a chamfer on all edges of the specified faces,
9473             with distance D1 on the first specified face (if several for one edge)
9474
9475             Parameters:
9476                 theShape Shape, to perform chamfer on.
9477                 theD1 Chamfer size along face from  theFaces. If both faces,
9478                       connected to the edge, are in theFaces, theD1
9479                       will be get along face, which is nearer to theFaces beginning.
9480                 theD2 Chamfer size along another of two faces, connected to the edge.
9481                 theFaces Sequence of global indices of faces of theShape.
9482                 theName Object name; when specified, this parameter is used
9483                         for result publication in the study. Otherwise, if automatic
9484                         publication is switched on, default value is used for result name.
9485
9486             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9487
9488             Returns:
9489                 New GEOM.GEOM_Object, containing the result shape.
9490             """
9491             # Example: see GEOM_TestAll.py
9492             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9493             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9494             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9495             anObj.SetParameters(Parameters)
9496             self._autoPublish(anObj, theName, "chamfer")
9497             return anObj
9498
9499         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9500         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9501         #
9502         #  @ref swig_FilletChamfer "Example"
9503         @ManageTransactions("LocalOp")
9504         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9505             """
9506             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9507             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9508             """
9509             flag = False
9510             if isinstance(theAngle,str):
9511                 flag = True
9512             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9513             if flag:
9514                 theAngle = theAngle*math.pi/180.0
9515             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9516             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9517             anObj.SetParameters(Parameters)
9518             self._autoPublish(anObj, theName, "chamfer")
9519             return anObj
9520
9521         ## Perform a chamfer on edges,
9522         #  with distance D1 on the first specified face (if several for one edge)
9523         #  @param theShape Shape, to perform chamfer on.
9524         #  @param theD1,theD2 Chamfer size
9525         #  @param theEdges Sequence of edges of \a theShape.
9526         #  @param theName Object name; when specified, this parameter is used
9527         #         for result publication in the study. Otherwise, if automatic
9528         #         publication is switched on, default value is used for result name.
9529         #
9530         #  @return New GEOM.GEOM_Object, containing the result shape.
9531         #
9532         #  @ref swig_FilletChamfer "Example"
9533         @ManageTransactions("LocalOp")
9534         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9535             """
9536             Perform a chamfer on edges,
9537             with distance D1 on the first specified face (if several for one edge)
9538
9539             Parameters:
9540                 theShape Shape, to perform chamfer on.
9541                 theD1,theD2 Chamfer size
9542                 theEdges Sequence of edges of theShape.
9543                 theName Object name; when specified, this parameter is used
9544                         for result publication in the study. Otherwise, if automatic
9545                         publication is switched on, default value is used for result name.
9546
9547             Returns:
9548                 New GEOM.GEOM_Object, containing the result shape.
9549             """
9550             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9551             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9552             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9553             anObj.SetParameters(Parameters)
9554             self._autoPublish(anObj, theName, "chamfer")
9555             return anObj
9556
9557         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9558         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9559         @ManageTransactions("LocalOp")
9560         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9561             """
9562             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9563             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9564             """
9565             flag = False
9566             if isinstance(theAngle,str):
9567                 flag = True
9568             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9569             if flag:
9570                 theAngle = theAngle*math.pi/180.0
9571             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9572             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9573             anObj.SetParameters(Parameters)
9574             self._autoPublish(anObj, theName, "chamfer")
9575             return anObj
9576
9577         ## @sa MakeChamferEdge(), MakeChamferFaces()
9578         #
9579         #  @ref swig_MakeChamfer "Example"
9580         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9581             """
9582             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9583             """
9584             # Example: see GEOM_TestOthers.py
9585             anObj = None
9586             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9587             if aShapeType == self.ShapeType["EDGE"]:
9588                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9589             else:
9590                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9591             return anObj
9592
9593         ## Remove material from a solid by extrusion of the base shape on the given distance.
9594         #  @param theInit Shape to remove material from. It must be a solid or
9595         #  a compound made of a single solid.
9596         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9597         #  @param theH Prism dimension along the normal to theBase
9598         #  @param theAngle Draft angle in degrees.
9599         #  @param theName Object name; when specified, this parameter is used
9600         #         for result publication in the study. Otherwise, if automatic
9601         #         publication is switched on, default value is used for result name.
9602         #
9603         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9604         #
9605         #  @ref tui_creation_prism "Example"
9606         @ManageTransactions("PrimOp")
9607         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9608             """
9609             Add material to a solid by extrusion of the base shape on the given distance.
9610
9611             Parameters:
9612                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9613                 theBase Closed edge or wire defining the base shape to be extruded.
9614                 theH Prism dimension along the normal  to theBase
9615                 theAngle Draft angle in degrees.
9616                 theName Object name; when specified, this parameter is used
9617                         for result publication in the study. Otherwise, if automatic
9618                         publication is switched on, default value is used for result name.
9619
9620             Returns:
9621                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9622             """
9623             # Example: see GEOM_TestAll.py
9624             #theH,Parameters = ParseParameters(theH)
9625             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9626             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9627             #anObj.SetParameters(Parameters)
9628             self._autoPublish(anObj, theName, "extrudedCut")
9629             return anObj
9630
9631         ## Add material to a solid by extrusion of the base shape on the given distance.
9632         #  @param theInit Shape to add material to. It must be a solid or
9633         #  a compound made of a single solid.
9634         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9635         #  @param theH Prism dimension along the normal to theBase
9636         #  @param theAngle Draft angle in degrees.
9637         #  @param theName Object name; when specified, this parameter is used
9638         #         for result publication in the study. Otherwise, if automatic
9639         #         publication is switched on, default value is used for result name.
9640         #
9641         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9642         #
9643         #  @ref tui_creation_prism "Example"
9644         @ManageTransactions("PrimOp")
9645         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9646             """
9647             Add material to a solid by extrusion of the base shape on the given distance.
9648
9649             Parameters:
9650                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9651                 theBase Closed edge or wire defining the base shape to be extruded.
9652                 theH Prism dimension along the normal  to theBase
9653                 theAngle Draft angle in degrees.
9654                 theName Object name; when specified, this parameter is used
9655                         for result publication in the study. Otherwise, if automatic
9656                         publication is switched on, default value is used for result name.
9657
9658             Returns:
9659                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9660             """
9661             # Example: see GEOM_TestAll.py
9662             #theH,Parameters = ParseParameters(theH)
9663             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9664             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9665             #anObj.SetParameters(Parameters)
9666             self._autoPublish(anObj, theName, "extrudedBoss")
9667             return anObj
9668
9669         # end of l3_local
9670         ## @}
9671
9672         ## @addtogroup l3_basic_op
9673         ## @{
9674
9675         ## Perform an Archimde operation on the given shape with given parameters.
9676         #  The object presenting the resulting face is returned.
9677         #  @param theShape Shape to be put in water.
9678         #  @param theWeight Weight og the shape.
9679         #  @param theWaterDensity Density of the water.
9680         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9681         #  @param theName Object name; when specified, this parameter is used
9682         #         for result publication in the study. Otherwise, if automatic
9683         #         publication is switched on, default value is used for result name.
9684         #
9685         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9686         #          by a plane, corresponding to water level.
9687         #
9688         #  @ref tui_archimede "Example"
9689         @ManageTransactions("LocalOp")
9690         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9691             """
9692             Perform an Archimde operation on the given shape with given parameters.
9693             The object presenting the resulting face is returned.
9694
9695             Parameters:
9696                 theShape Shape to be put in water.
9697                 theWeight Weight og the shape.
9698                 theWaterDensity Density of the water.
9699                 theMeshDeflection Deflection of the mesh, using to compute the section.
9700                 theName Object name; when specified, this parameter is used
9701                         for result publication in the study. Otherwise, if automatic
9702                         publication is switched on, default value is used for result name.
9703
9704             Returns:
9705                 New GEOM.GEOM_Object, containing a section of theShape
9706                 by a plane, corresponding to water level.
9707             """
9708             # Example: see GEOM_TestAll.py
9709             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9710               theWeight,theWaterDensity,theMeshDeflection)
9711             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9712             RaiseIfFailed("MakeArchimede", self.LocalOp)
9713             anObj.SetParameters(Parameters)
9714             self._autoPublish(anObj, theName, "archimede")
9715             return anObj
9716
9717         # end of l3_basic_op
9718         ## @}
9719
9720         ## @addtogroup l2_measure
9721         ## @{
9722
9723         ## Get point coordinates
9724         #  @return [x, y, z]
9725         #
9726         #  @ref tui_measurement_tools_page "Example"
9727         @ManageTransactions("MeasuOp")
9728         def PointCoordinates(self,Point):
9729             """
9730             Get point coordinates
9731
9732             Returns:
9733                 [x, y, z]
9734             """
9735             # Example: see GEOM_TestMeasures.py
9736             aTuple = self.MeasuOp.PointCoordinates(Point)
9737             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9738             return aTuple
9739
9740         ## Get vector coordinates
9741         #  @return [x, y, z]
9742         #
9743         #  @ref tui_measurement_tools_page "Example"
9744         def VectorCoordinates(self,Vector):
9745             """
9746             Get vector coordinates
9747
9748             Returns:
9749                 [x, y, z]
9750             """
9751
9752             p1=self.GetFirstVertex(Vector)
9753             p2=self.GetLastVertex(Vector)
9754
9755             X1=self.PointCoordinates(p1)
9756             X2=self.PointCoordinates(p2)
9757
9758             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9759
9760
9761         ## Compute cross product
9762         #  @return vector w=u^v
9763         #
9764         #  @ref tui_measurement_tools_page "Example"
9765         def CrossProduct(self, Vector1, Vector2):
9766             """
9767             Compute cross product
9768
9769             Returns: vector w=u^v
9770             """
9771             u=self.VectorCoordinates(Vector1)
9772             v=self.VectorCoordinates(Vector2)
9773             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])
9774
9775             return w
9776
9777         ## Compute cross product
9778         #  @return dot product  p=u.v
9779         #
9780         #  @ref tui_measurement_tools_page "Example"
9781         def DotProduct(self, Vector1, Vector2):
9782             """
9783             Compute cross product
9784
9785             Returns: dot product  p=u.v
9786             """
9787             u=self.VectorCoordinates(Vector1)
9788             v=self.VectorCoordinates(Vector2)
9789             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9790
9791             return p
9792
9793
9794         ## Get summarized length of all wires,
9795         #  area of surface and volume of the given shape.
9796         #  @param theShape Shape to define properties of.
9797         #  @return [theLength, theSurfArea, theVolume]\n
9798         #  theLength:   Summarized length of all wires of the given shape.\n
9799         #  theSurfArea: Area of surface of the given shape.\n
9800         #  theVolume:   Volume of the given shape.
9801         #
9802         #  @ref tui_measurement_tools_page "Example"
9803         @ManageTransactions("MeasuOp")
9804         def BasicProperties(self,theShape):
9805             """
9806             Get summarized length of all wires,
9807             area of surface and volume of the given shape.
9808
9809             Parameters:
9810                 theShape Shape to define properties of.
9811
9812             Returns:
9813                 [theLength, theSurfArea, theVolume]
9814                  theLength:   Summarized length of all wires of the given shape.
9815                  theSurfArea: Area of surface of the given shape.
9816                  theVolume:   Volume of the given shape.
9817             """
9818             # Example: see GEOM_TestMeasures.py
9819             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9820             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9821             return aTuple
9822
9823         ## Get parameters of bounding box of the given shape
9824         #  @param theShape Shape to obtain bounding box of.
9825         #  @param precise TRUE for precise computation; FALSE for fast one.
9826         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9827         #  Xmin,Xmax: Limits of shape along OX axis.
9828         #  Ymin,Ymax: Limits of shape along OY axis.
9829         #  Zmin,Zmax: Limits of shape along OZ axis.
9830         #
9831         #  @ref tui_measurement_tools_page "Example"
9832         @ManageTransactions("MeasuOp")
9833         def BoundingBox (self, theShape, precise=False):
9834             """
9835             Get parameters of bounding box of the given shape
9836
9837             Parameters:
9838                 theShape Shape to obtain bounding box of.
9839                 precise TRUE for precise computation; FALSE for fast one.
9840
9841             Returns:
9842                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9843                  Xmin,Xmax: Limits of shape along OX axis.
9844                  Ymin,Ymax: Limits of shape along OY axis.
9845                  Zmin,Zmax: Limits of shape along OZ axis.
9846             """
9847             # Example: see GEOM_TestMeasures.py
9848             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9849             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9850             return aTuple
9851
9852         ## Get bounding box of the given shape
9853         #  @param theShape Shape to obtain bounding box of.
9854         #  @param precise TRUE for precise computation; FALSE for fast one.
9855         #  @param theName Object name; when specified, this parameter is used
9856         #         for result publication in the study. Otherwise, if automatic
9857         #         publication is switched on, default value is used for result name.
9858         #
9859         #  @return New GEOM.GEOM_Object, containing the created box.
9860         #
9861         #  @ref tui_measurement_tools_page "Example"
9862         @ManageTransactions("MeasuOp")
9863         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9864             """
9865             Get bounding box of the given shape
9866
9867             Parameters:
9868                 theShape Shape to obtain bounding box of.
9869                 precise TRUE for precise computation; FALSE for fast one.
9870                 theName Object name; when specified, this parameter is used
9871                         for result publication in the study. Otherwise, if automatic
9872                         publication is switched on, default value is used for result name.
9873
9874             Returns:
9875                 New GEOM.GEOM_Object, containing the created box.
9876             """
9877             # Example: see GEOM_TestMeasures.py
9878             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9879             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9880             self._autoPublish(anObj, theName, "bndbox")
9881             return anObj
9882
9883         ## Get inertia matrix and moments of inertia of theShape.
9884         #  @param theShape Shape to calculate inertia of.
9885         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9886         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9887         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9888         #
9889         #  @ref tui_measurement_tools_page "Example"
9890         @ManageTransactions("MeasuOp")
9891         def Inertia(self,theShape):
9892             """
9893             Get inertia matrix and moments of inertia of theShape.
9894
9895             Parameters:
9896                 theShape Shape to calculate inertia of.
9897
9898             Returns:
9899                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9900                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9901                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9902             """
9903             # Example: see GEOM_TestMeasures.py
9904             aTuple = self.MeasuOp.GetInertia(theShape)
9905             RaiseIfFailed("GetInertia", self.MeasuOp)
9906             return aTuple
9907
9908         ## Get if coords are included in the shape (ST_IN or ST_ON)
9909         #  @param theShape Shape
9910         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9911         #  @param tolerance to be used (default is 1.0e-7)
9912         #  @return list_of_boolean = [res1, res2, ...]
9913         @ManageTransactions("MeasuOp")
9914         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9915             """
9916             Get if coords are included in the shape (ST_IN or ST_ON)
9917
9918             Parameters:
9919                 theShape Shape
9920                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9921                 tolerance to be used (default is 1.0e-7)
9922
9923             Returns:
9924                 list_of_boolean = [res1, res2, ...]
9925             """
9926             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9927
9928         ## Get minimal distance between the given shapes.
9929         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9930         #  @return Value of the minimal distance between the given shapes.
9931         #
9932         #  @ref tui_measurement_tools_page "Example"
9933         @ManageTransactions("MeasuOp")
9934         def MinDistance(self, theShape1, theShape2):
9935             """
9936             Get minimal distance between the given shapes.
9937
9938             Parameters:
9939                 theShape1,theShape2 Shapes to find minimal distance between.
9940
9941             Returns:
9942                 Value of the minimal distance between the given shapes.
9943             """
9944             # Example: see GEOM_TestMeasures.py
9945             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9946             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9947             return aTuple[0]
9948
9949         ## Get minimal distance between the given shapes.
9950         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9951         #  @return Value of the minimal distance between the given shapes, in form of list
9952         #          [Distance, DX, DY, DZ].
9953         #
9954         #  @ref swig_all_measure "Example"
9955         @ManageTransactions("MeasuOp")
9956         def MinDistanceComponents(self, theShape1, theShape2):
9957             """
9958             Get minimal distance between the given shapes.
9959
9960             Parameters:
9961                 theShape1,theShape2 Shapes to find minimal distance between.
9962
9963             Returns:
9964                 Value of the minimal distance between the given shapes, in form of list
9965                 [Distance, DX, DY, DZ]
9966             """
9967             # Example: see GEOM_TestMeasures.py
9968             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9969             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9970             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9971             return aRes
9972
9973         ## Get closest points of the given shapes.
9974         #  @param theShape1,theShape2 Shapes to find closest points of.
9975         #  @return The number of found solutions (-1 in case of infinite number of
9976         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9977         #
9978         #  @ref tui_measurement_tools_page "Example"
9979         @ManageTransactions("MeasuOp")
9980         def ClosestPoints (self, theShape1, theShape2):
9981             """
9982             Get closest points of the given shapes.
9983
9984             Parameters:
9985                 theShape1,theShape2 Shapes to find closest points of.
9986
9987             Returns:
9988                 The number of found solutions (-1 in case of infinite number of
9989                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9990             """
9991             # Example: see GEOM_TestMeasures.py
9992             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9993             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9994             return aTuple
9995
9996         ## Get angle between the given shapes in degrees.
9997         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9998         #  @note If both arguments are vectors, the angle is computed in accordance
9999         #        with their orientations, otherwise the minimum angle is computed.
10000         #  @return Value of the angle between the given shapes in degrees.
10001         #
10002         #  @ref tui_measurement_tools_page "Example"
10003         @ManageTransactions("MeasuOp")
10004         def GetAngle(self, theShape1, theShape2):
10005             """
10006             Get angle between the given shapes in degrees.
10007
10008             Parameters:
10009                 theShape1,theShape2 Lines or linear edges to find angle between.
10010
10011             Note:
10012                 If both arguments are vectors, the angle is computed in accordance
10013                 with their orientations, otherwise the minimum angle is computed.
10014
10015             Returns:
10016                 Value of the angle between the given shapes in degrees.
10017             """
10018             # Example: see GEOM_TestMeasures.py
10019             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10020             RaiseIfFailed("GetAngle", self.MeasuOp)
10021             return anAngle
10022
10023         ## Get angle between the given shapes in radians.
10024         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10025         #  @note If both arguments are vectors, the angle is computed in accordance
10026         #        with their orientations, otherwise the minimum angle is computed.
10027         #  @return Value of the angle between the given shapes in radians.
10028         #
10029         #  @ref tui_measurement_tools_page "Example"
10030         @ManageTransactions("MeasuOp")
10031         def GetAngleRadians(self, theShape1, theShape2):
10032             """
10033             Get angle between the given shapes in radians.
10034
10035             Parameters:
10036                 theShape1,theShape2 Lines or linear edges to find angle between.
10037
10038
10039             Note:
10040                 If both arguments are vectors, the angle is computed in accordance
10041                 with their orientations, otherwise the minimum angle is computed.
10042
10043             Returns:
10044                 Value of the angle between the given shapes in radians.
10045             """
10046             # Example: see GEOM_TestMeasures.py
10047             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10048             RaiseIfFailed("GetAngle", self.MeasuOp)
10049             return anAngle
10050
10051         ## Get angle between the given vectors in degrees.
10052         #  @param theShape1,theShape2 Vectors to find angle between.
10053         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10054         #                 if False, the opposite vector to the normal vector is used.
10055         #  @return Value of the angle between the given vectors in degrees.
10056         #
10057         #  @ref tui_measurement_tools_page "Example"
10058         @ManageTransactions("MeasuOp")
10059         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10060             """
10061             Get angle between the given vectors in degrees.
10062
10063             Parameters:
10064                 theShape1,theShape2 Vectors to find angle between.
10065                 theFlag If True, the normal vector is defined by the two vectors cross,
10066                         if False, the opposite vector to the normal vector is used.
10067
10068             Returns:
10069                 Value of the angle between the given vectors in degrees.
10070             """
10071             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10072             if not theFlag:
10073                 anAngle = 360. - anAngle
10074             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10075             return anAngle
10076
10077         ## The same as GetAngleVectors, but the result is in radians.
10078         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10079             """
10080             Get angle between the given vectors in radians.
10081
10082             Parameters:
10083                 theShape1,theShape2 Vectors to find angle between.
10084                 theFlag If True, the normal vector is defined by the two vectors cross,
10085                         if False, the opposite vector to the normal vector is used.
10086
10087             Returns:
10088                 Value of the angle between the given vectors in radians.
10089             """
10090             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10091             return anAngle
10092
10093         ## @name Curve Curvature Measurement
10094         #  Methods for receiving radius of curvature of curves
10095         #  in the given point
10096         ## @{
10097
10098         ## Measure curvature of a curve at a point, set by parameter.
10099         #  @param theCurve a curve.
10100         #  @param theParam parameter.
10101         #  @return radius of curvature of \a theCurve.
10102         #
10103         #  @ref swig_todo "Example"
10104         @ManageTransactions("MeasuOp")
10105         def CurveCurvatureByParam(self, theCurve, theParam):
10106             """
10107             Measure curvature of a curve at a point, set by parameter.
10108
10109             Parameters:
10110                 theCurve a curve.
10111                 theParam parameter.
10112
10113             Returns:
10114                 radius of curvature of theCurve.
10115             """
10116             # Example: see GEOM_TestMeasures.py
10117             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10118             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10119             return aCurv
10120
10121         ## Measure curvature of a curve at a point.
10122         #  @param theCurve a curve.
10123         #  @param thePoint given point.
10124         #  @return radius of curvature of \a theCurve.
10125         #
10126         #  @ref swig_todo "Example"
10127         @ManageTransactions("MeasuOp")
10128         def CurveCurvatureByPoint(self, theCurve, thePoint):
10129             """
10130             Measure curvature of a curve at a point.
10131
10132             Parameters:
10133                 theCurve a curve.
10134                 thePoint given point.
10135
10136             Returns:
10137                 radius of curvature of theCurve.
10138             """
10139             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10140             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10141             return aCurv
10142         ## @}
10143
10144         ## @name Surface Curvature Measurement
10145         #  Methods for receiving max and min radius of curvature of surfaces
10146         #  in the given point
10147         ## @{
10148
10149         ## Measure max radius of curvature of surface.
10150         #  @param theSurf the given surface.
10151         #  @param theUParam Value of U-parameter on the referenced surface.
10152         #  @param theVParam Value of V-parameter on the referenced surface.
10153         #  @return max radius of curvature of theSurf.
10154         #
10155         ## @ref swig_todo "Example"
10156         @ManageTransactions("MeasuOp")
10157         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10158             """
10159             Measure max radius of curvature of surface.
10160
10161             Parameters:
10162                 theSurf the given surface.
10163                 theUParam Value of U-parameter on the referenced surface.
10164                 theVParam Value of V-parameter on the referenced surface.
10165
10166             Returns:
10167                 max radius of curvature of theSurf.
10168             """
10169             # Example: see GEOM_TestMeasures.py
10170             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10171             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10172             return aSurf
10173
10174         ## Measure max radius of curvature of surface in the given point
10175         #  @param theSurf the given surface.
10176         #  @param thePoint given point.
10177         #  @return max radius of curvature of theSurf.
10178         #
10179         ## @ref swig_todo "Example"
10180         @ManageTransactions("MeasuOp")
10181         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10182             """
10183             Measure max radius of curvature of surface in the given point.
10184
10185             Parameters:
10186                 theSurf the given surface.
10187                 thePoint given point.
10188
10189             Returns:
10190                 max radius of curvature of theSurf.
10191             """
10192             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10193             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10194             return aSurf
10195
10196         ## Measure min radius of curvature of surface.
10197         #  @param theSurf the given surface.
10198         #  @param theUParam Value of U-parameter on the referenced surface.
10199         #  @param theVParam Value of V-parameter on the referenced surface.
10200         #  @return min radius of curvature of theSurf.
10201         #
10202         ## @ref swig_todo "Example"
10203         @ManageTransactions("MeasuOp")
10204         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10205             """
10206             Measure min radius of curvature of surface.
10207
10208             Parameters:
10209                 theSurf the given surface.
10210                 theUParam Value of U-parameter on the referenced surface.
10211                 theVParam Value of V-parameter on the referenced surface.
10212
10213             Returns:
10214                 Min radius of curvature of theSurf.
10215             """
10216             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10217             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10218             return aSurf
10219
10220         ## Measure min radius of curvature of surface in the given point
10221         #  @param theSurf the given surface.
10222         #  @param thePoint given point.
10223         #  @return min radius of curvature of theSurf.
10224         #
10225         ## @ref swig_todo "Example"
10226         @ManageTransactions("MeasuOp")
10227         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10228             """
10229             Measure min radius of curvature of surface in the given point.
10230
10231             Parameters:
10232                 theSurf the given surface.
10233                 thePoint given point.
10234
10235             Returns:
10236                 Min radius of curvature of theSurf.
10237             """
10238             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10239             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10240             return aSurf
10241         ## @}
10242
10243         ## Get min and max tolerances of sub-shapes of theShape
10244         #  @param theShape Shape, to get tolerances of.
10245         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10246         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10247         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10248         #  VertMin,VertMax: Min and max tolerances of the vertices.
10249         #
10250         #  @ref tui_measurement_tools_page "Example"
10251         @ManageTransactions("MeasuOp")
10252         def Tolerance(self,theShape):
10253             """
10254             Get min and max tolerances of sub-shapes of theShape
10255
10256             Parameters:
10257                 theShape Shape, to get tolerances of.
10258
10259             Returns:
10260                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10261                  FaceMin,FaceMax: Min and max tolerances of the faces.
10262                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10263                  VertMin,VertMax: Min and max tolerances of the vertices.
10264             """
10265             # Example: see GEOM_TestMeasures.py
10266             aTuple = self.MeasuOp.GetTolerance(theShape)
10267             RaiseIfFailed("GetTolerance", self.MeasuOp)
10268             return aTuple
10269
10270         ## Obtain description of the given shape (number of sub-shapes of each type)
10271         #  @param theShape Shape to be described.
10272         #  @return Description of the given shape.
10273         #
10274         #  @ref tui_measurement_tools_page "Example"
10275         @ManageTransactions("MeasuOp")
10276         def WhatIs(self,theShape):
10277             """
10278             Obtain description of the given shape (number of sub-shapes of each type)
10279
10280             Parameters:
10281                 theShape Shape to be described.
10282
10283             Returns:
10284                 Description of the given shape.
10285             """
10286             # Example: see GEOM_TestMeasures.py
10287             aDescr = self.MeasuOp.WhatIs(theShape)
10288             RaiseIfFailed("WhatIs", self.MeasuOp)
10289             return aDescr
10290
10291         ## Obtain quantity of shapes of the given type in \a theShape.
10292         #  If \a theShape is of type \a theType, it is also counted.
10293         #  @param theShape Shape to be described.
10294         #  @param theType the given ShapeType().
10295         #  @return Quantity of shapes of type \a theType in \a theShape.
10296         #
10297         #  @ref tui_measurement_tools_page "Example"
10298         def NbShapes (self, theShape, theType):
10299             """
10300             Obtain quantity of shapes of the given type in theShape.
10301             If theShape is of type theType, it is also counted.
10302
10303             Parameters:
10304                 theShape Shape to be described.
10305                 theType the given geompy.ShapeType
10306
10307             Returns:
10308                 Quantity of shapes of type theType in theShape.
10309             """
10310             # Example: see GEOM_TestMeasures.py
10311             listSh = self.SubShapeAllIDs(theShape, theType)
10312             Nb = len(listSh)
10313             return Nb
10314
10315         ## Obtain quantity of shapes of each type in \a theShape.
10316         #  The \a theShape is also counted.
10317         #  @param theShape Shape to be described.
10318         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10319         #
10320         #  @ref tui_measurement_tools_page "Example"
10321         def ShapeInfo (self, theShape):
10322             """
10323             Obtain quantity of shapes of each type in theShape.
10324             The theShape is also counted.
10325
10326             Parameters:
10327                 theShape Shape to be described.
10328
10329             Returns:
10330                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10331             """
10332             # Example: see GEOM_TestMeasures.py
10333             aDict = {}
10334             for typeSh in self.ShapeType:
10335                 if typeSh in ( "AUTO", "SHAPE" ): continue
10336                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10337                 Nb = len(listSh)
10338                 aDict[typeSh] = Nb
10339                 pass
10340             return aDict
10341
10342         def GetCreationInformation(self, theShape):
10343             info = theShape.GetCreationInformation()
10344             # operationName
10345             opName = info.operationName
10346             if not opName: opName = "no info available"
10347             res = "Operation: " + opName
10348             # parameters
10349             for parVal in info.params:
10350                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10351             return res
10352
10353         ## Get a point, situated at the centre of mass of theShape.
10354         #  @param theShape Shape to define centre of mass of.
10355         #  @param theName Object name; when specified, this parameter is used
10356         #         for result publication in the study. Otherwise, if automatic
10357         #         publication is switched on, default value is used for result name.
10358         #
10359         #  @return New GEOM.GEOM_Object, containing the created point.
10360         #
10361         #  @ref tui_measurement_tools_page "Example"
10362         @ManageTransactions("MeasuOp")
10363         def MakeCDG(self, theShape, theName=None):
10364             """
10365             Get a point, situated at the centre of mass of theShape.
10366
10367             Parameters:
10368                 theShape Shape to define centre of mass of.
10369                 theName Object name; when specified, this parameter is used
10370                         for result publication in the study. Otherwise, if automatic
10371                         publication is switched on, default value is used for result name.
10372
10373             Returns:
10374                 New GEOM.GEOM_Object, containing the created point.
10375             """
10376             # Example: see GEOM_TestMeasures.py
10377             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10378             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10379             self._autoPublish(anObj, theName, "centerOfMass")
10380             return anObj
10381
10382         ## Get a vertex sub-shape by index depended with orientation.
10383         #  @param theShape Shape to find sub-shape.
10384         #  @param theIndex Index to find vertex by this index (starting from zero)
10385         #  @param theName Object name; when specified, this parameter is used
10386         #         for result publication in the study. Otherwise, if automatic
10387         #         publication is switched on, default value is used for result name.
10388         #
10389         #  @return New GEOM.GEOM_Object, containing the created vertex.
10390         #
10391         #  @ref tui_measurement_tools_page "Example"
10392         @ManageTransactions("MeasuOp")
10393         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10394             """
10395             Get a vertex sub-shape by index depended with orientation.
10396
10397             Parameters:
10398                 theShape Shape to find sub-shape.
10399                 theIndex Index to find vertex by this index (starting from zero)
10400                 theName Object name; when specified, this parameter is used
10401                         for result publication in the study. Otherwise, if automatic
10402                         publication is switched on, default value is used for result name.
10403
10404             Returns:
10405                 New GEOM.GEOM_Object, containing the created vertex.
10406             """
10407             # Example: see GEOM_TestMeasures.py
10408             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10409             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10410             self._autoPublish(anObj, theName, "vertex")
10411             return anObj
10412
10413         ## Get the first vertex of wire/edge depended orientation.
10414         #  @param theShape Shape to find first vertex.
10415         #  @param theName Object name; when specified, this parameter is used
10416         #         for result publication in the study. Otherwise, if automatic
10417         #         publication is switched on, default value is used for result name.
10418         #
10419         #  @return New GEOM.GEOM_Object, containing the created vertex.
10420         #
10421         #  @ref tui_measurement_tools_page "Example"
10422         def GetFirstVertex(self, theShape, theName=None):
10423             """
10424             Get the first vertex of wire/edge depended orientation.
10425
10426             Parameters:
10427                 theShape Shape to find first vertex.
10428                 theName Object name; when specified, this parameter is used
10429                         for result publication in the study. Otherwise, if automatic
10430                         publication is switched on, default value is used for result name.
10431
10432             Returns:
10433                 New GEOM.GEOM_Object, containing the created vertex.
10434             """
10435             # Example: see GEOM_TestMeasures.py
10436             # note: auto-publishing is done in self.GetVertexByIndex()
10437             return self.GetVertexByIndex(theShape, 0, theName)
10438
10439         ## Get the last vertex of wire/edge depended orientation.
10440         #  @param theShape Shape to find last vertex.
10441         #  @param theName Object name; when specified, this parameter is used
10442         #         for result publication in the study. Otherwise, if automatic
10443         #         publication is switched on, default value is used for result name.
10444         #
10445         #  @return New GEOM.GEOM_Object, containing the created vertex.
10446         #
10447         #  @ref tui_measurement_tools_page "Example"
10448         def GetLastVertex(self, theShape, theName=None):
10449             """
10450             Get the last vertex of wire/edge depended orientation.
10451
10452             Parameters:
10453                 theShape Shape to find last vertex.
10454                 theName Object name; when specified, this parameter is used
10455                         for result publication in the study. Otherwise, if automatic
10456                         publication is switched on, default value is used for result name.
10457
10458             Returns:
10459                 New GEOM.GEOM_Object, containing the created vertex.
10460             """
10461             # Example: see GEOM_TestMeasures.py
10462             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10463             # note: auto-publishing is done in self.GetVertexByIndex()
10464             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10465
10466         ## Get a normale to the given face. If the point is not given,
10467         #  the normale is calculated at the center of mass.
10468         #  @param theFace Face to define normale of.
10469         #  @param theOptionalPoint Point to compute the normale at.
10470         #  @param theName Object name; when specified, this parameter is used
10471         #         for result publication in the study. Otherwise, if automatic
10472         #         publication is switched on, default value is used for result name.
10473         #
10474         #  @return New GEOM.GEOM_Object, containing the created vector.
10475         #
10476         #  @ref swig_todo "Example"
10477         @ManageTransactions("MeasuOp")
10478         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10479             """
10480             Get a normale to the given face. If the point is not given,
10481             the normale is calculated at the center of mass.
10482
10483             Parameters:
10484                 theFace Face to define normale of.
10485                 theOptionalPoint Point to compute the normale at.
10486                 theName Object name; when specified, this parameter is used
10487                         for result publication in the study. Otherwise, if automatic
10488                         publication is switched on, default value is used for result name.
10489
10490             Returns:
10491                 New GEOM.GEOM_Object, containing the created vector.
10492             """
10493             # Example: see GEOM_TestMeasures.py
10494             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10495             RaiseIfFailed("GetNormal", self.MeasuOp)
10496             self._autoPublish(anObj, theName, "normal")
10497             return anObj
10498
10499         ## Print shape errors obtained from CheckShape.
10500         #  @param theShape Shape that was checked.
10501         #  @param theShapeErrors the shape errors obtained by CheckShape.
10502         #  @param theReturnStatus If 0 the description of problem is printed.
10503         #                         If 1 the description of problem is returned.
10504         #  @return If theReturnStatus is equal to 1 the description is returned.
10505         #          Otherwise doesn't return anything.
10506         #
10507         #  @ref tui_measurement_tools_page "Example"
10508         @ManageTransactions("MeasuOp")
10509         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10510             """
10511             Print shape errors obtained from CheckShape.
10512
10513             Parameters:
10514                 theShape Shape that was checked.
10515                 theShapeErrors the shape errors obtained by CheckShape.
10516                 theReturnStatus If 0 the description of problem is printed.
10517                                 If 1 the description of problem is returned.
10518
10519             Returns:
10520                 If theReturnStatus is equal to 1 the description is returned.
10521                   Otherwise doesn't return anything.
10522             """
10523             # Example: see GEOM_TestMeasures.py
10524             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10525             if theReturnStatus == 1:
10526                 return Descr
10527             print Descr
10528             pass
10529
10530         ## Check a topology of the given shape.
10531         #  @param theShape Shape to check validity of.
10532         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10533         #                        if TRUE, the shape's geometry will be checked also.
10534         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10535         #                         of problem is printed.
10536         #                         If 1 isValid flag and the description of
10537         #                         problem is returned.
10538         #                         If 2 isValid flag and the list of error data
10539         #                         is returned.
10540         #  @return TRUE, if the shape "seems to be valid".
10541         #          If theShape is invalid, prints a description of problem.
10542         #          If theReturnStatus is equal to 1 the description is returned
10543         #          along with IsValid flag.
10544         #          If theReturnStatus is equal to 2 the list of error data is
10545         #          returned along with IsValid flag.
10546         #
10547         #  @ref tui_measurement_tools_page "Example"
10548         @ManageTransactions("MeasuOp")
10549         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10550             """
10551             Check a topology of the given shape.
10552
10553             Parameters:
10554                 theShape Shape to check validity of.
10555                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10556                                if TRUE, the shape's geometry will be checked also.
10557                 theReturnStatus If 0 and if theShape is invalid, a description
10558                                 of problem is printed.
10559                                 If 1 IsValid flag and the description of
10560                                 problem is returned.
10561                                 If 2 IsValid flag and the list of error data
10562                                 is returned.
10563
10564             Returns:
10565                 TRUE, if the shape "seems to be valid".
10566                 If theShape is invalid, prints a description of problem.
10567                 If theReturnStatus is equal to 1 the description is returned
10568                 along with IsValid flag.
10569                 If theReturnStatus is equal to 2 the list of error data is
10570                 returned along with IsValid flag.
10571             """
10572             # Example: see GEOM_TestMeasures.py
10573             if theIsCheckGeom:
10574                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10575                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10576             else:
10577                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10578                 RaiseIfFailed("CheckShape", self.MeasuOp)
10579             if IsValid == 0:
10580                 if theReturnStatus == 0:
10581                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10582                     print Descr
10583             if theReturnStatus == 1:
10584               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10585               return (IsValid, Descr)
10586             elif theReturnStatus == 2:
10587               return (IsValid, ShapeErrors)
10588             return IsValid
10589
10590         ## Detect self-intersections in the given shape.
10591         #  @param theShape Shape to check.
10592         #  @return TRUE, if the shape contains no self-intersections.
10593         #
10594         #  @ref tui_measurement_tools_page "Example"
10595         @ManageTransactions("MeasuOp")
10596         def CheckSelfIntersections(self, theShape):
10597             """
10598             Detect self-intersections in the given shape.
10599
10600             Parameters:
10601                 theShape Shape to check.
10602
10603             Returns:
10604                 TRUE, if the shape contains no self-intersections.
10605             """
10606             # Example: see GEOM_TestMeasures.py
10607             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10608             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10609             return IsValid
10610
10611         ## Get position (LCS) of theShape.
10612         #
10613         #  Origin of the LCS is situated at the shape's center of mass.
10614         #  Axes of the LCS are obtained from shape's location or,
10615         #  if the shape is a planar face, from position of its plane.
10616         #
10617         #  @param theShape Shape to calculate position of.
10618         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10619         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10620         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10621         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10622         #
10623         #  @ref swig_todo "Example"
10624         @ManageTransactions("MeasuOp")
10625         def GetPosition(self,theShape):
10626             """
10627             Get position (LCS) of theShape.
10628             Origin of the LCS is situated at the shape's center of mass.
10629             Axes of the LCS are obtained from shape's location or,
10630             if the shape is a planar face, from position of its plane.
10631
10632             Parameters:
10633                 theShape Shape to calculate position of.
10634
10635             Returns:
10636                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10637                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10638                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10639                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10640             """
10641             # Example: see GEOM_TestMeasures.py
10642             aTuple = self.MeasuOp.GetPosition(theShape)
10643             RaiseIfFailed("GetPosition", self.MeasuOp)
10644             return aTuple
10645
10646         ## Get kind of theShape.
10647         #
10648         #  @param theShape Shape to get a kind of.
10649         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10650         #          and a list of parameters, describing the shape.
10651         #  @note  Concrete meaning of each value, returned via \a theIntegers
10652         #         or \a theDoubles list depends on the kind() of the shape.
10653         #
10654         #  @ref swig_todo "Example"
10655         @ManageTransactions("MeasuOp")
10656         def KindOfShape(self,theShape):
10657             """
10658             Get kind of theShape.
10659
10660             Parameters:
10661                 theShape Shape to get a kind of.
10662
10663             Returns:
10664                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10665                     and a list of parameters, describing the shape.
10666             Note:
10667                 Concrete meaning of each value, returned via theIntegers
10668                 or theDoubles list depends on the geompy.kind of the shape
10669             """
10670             # Example: see GEOM_TestMeasures.py
10671             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10672             RaiseIfFailed("KindOfShape", self.MeasuOp)
10673
10674             aKind  = aRoughTuple[0]
10675             anInts = aRoughTuple[1]
10676             aDbls  = aRoughTuple[2]
10677
10678             # Now there is no exception from this rule:
10679             aKindTuple = [aKind] + aDbls + anInts
10680
10681             # If they are we will regroup parameters for such kind of shape.
10682             # For example:
10683             #if aKind == kind.SOME_KIND:
10684             #    #  SOME_KIND     int int double int double double
10685             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10686
10687             return aKindTuple
10688
10689         ## Returns the string that describes if the shell is good for solid.
10690         #  This is a support method for MakeSolid.
10691         #
10692         #  @param theShell the shell to be checked.
10693         #  @return Returns a string that describes the shell validity for
10694         #          solid construction.
10695         @ManageTransactions("MeasuOp")
10696         def _IsGoodForSolid(self, theShell):
10697             """
10698             Returns the string that describes if the shell is good for solid.
10699             This is a support method for MakeSolid.
10700
10701             Parameter:
10702                 theShell the shell to be checked.
10703
10704             Returns:
10705                 Returns a string that describes the shell validity for
10706                 solid construction.
10707             """
10708             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
10709             return aDescr
10710
10711         # end of l2_measure
10712         ## @}
10713
10714         ## @addtogroup l2_import_export
10715         ## @{
10716
10717         ## Import a shape from the BREP, IGES, STEP or other file
10718         #  (depends on given format) with given name.
10719         #
10720         #  Note: this function is deprecated, it is kept for backward compatibility only
10721         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10722         #
10723         #  @param theFileName The file, containing the shape.
10724         #  @param theFormatName Specify format for the file reading.
10725         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10726         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10727         #            format 'STEP_SCALE' is used instead of 'STEP',
10728         #            length unit will be set to 'meter' and result model will be scaled.
10729         #  @param theName Object name; when specified, this parameter is used
10730         #         for result publication in the study. Otherwise, if automatic
10731         #         publication is switched on, default value is used for result name.
10732         #
10733         #  @return New GEOM.GEOM_Object, containing the imported shape.
10734         #          If material names are imported it returns the list of
10735         #          objects. The first one is the imported object followed by
10736         #          material groups.
10737         #  @note Auto publishing is allowed for the shape itself. Imported
10738         #        material groups are not automatically published.
10739         #
10740         #  @ref swig_Import_Export "Example"
10741         @ManageTransactions("InsertOp")
10742         def ImportFile(self, theFileName, theFormatName, theName=None):
10743             """
10744             Import a shape from the BREP, IGES, STEP or other file
10745             (depends on given format) with given name.
10746
10747             Note: this function is deprecated, it is kept for backward compatibility only
10748             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10749
10750             Parameters: 
10751                 theFileName The file, containing the shape.
10752                 theFormatName Specify format for the file reading.
10753                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10754                     If format 'IGES_SCALE' is used instead of 'IGES' or
10755                        format 'STEP_SCALE' is used instead of 'STEP',
10756                        length unit will be set to 'meter' and result model will be scaled.
10757                 theName Object name; when specified, this parameter is used
10758                         for result publication in the study. Otherwise, if automatic
10759                         publication is switched on, default value is used for result name.
10760
10761             Returns:
10762                 New GEOM.GEOM_Object, containing the imported shape.
10763                 If material names are imported it returns the list of
10764                 objects. The first one is the imported object followed by
10765                 material groups.
10766             Note:
10767                 Auto publishing is allowed for the shape itself. Imported
10768                 material groups are not automatically published.
10769             """
10770             # Example: see GEOM_TestOthers.py
10771             print """
10772             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
10773             where <FormatName> is a name of desirable format for importing.
10774             """
10775             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10776             RaiseIfFailed("ImportFile", self.InsertOp)
10777             aNbObj = len(aListObj)
10778             if aNbObj > 0:
10779                 self._autoPublish(aListObj[0], theName, "imported")
10780             if aNbObj == 1:
10781                 return aListObj[0]
10782             return aListObj
10783
10784         ## Deprecated analog of ImportFile()
10785         def Import(self, theFileName, theFormatName, theName=None):
10786             """
10787             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10788             """
10789             # note: auto-publishing is done in self.ImportFile()
10790             return self.ImportFile(theFileName, theFormatName, theName)
10791
10792         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10793         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10794         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10795         #  @param theStream The BRep binary stream.
10796         #  @param theName Object name; when specified, this parameter is used
10797         #         for result publication in the study. Otherwise, if automatic
10798         #         publication is switched on, default value is used for result name.
10799         #
10800         #  @return New GEOM_Object, containing the shape, read from theStream.
10801         #
10802         #  @ref swig_Import_Export "Example"
10803         @ManageTransactions("InsertOp")
10804         def RestoreShape (self, theStream, theName=None):
10805             """
10806             Read a shape from the binary stream, containing its bounding representation (BRep).
10807
10808             Note:
10809                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10810
10811             Parameters:
10812                 theStream The BRep binary stream.
10813                 theName Object name; when specified, this parameter is used
10814                         for result publication in the study. Otherwise, if automatic
10815                         publication is switched on, default value is used for result name.
10816
10817             Returns:
10818                 New GEOM_Object, containing the shape, read from theStream.
10819             """
10820             # Example: see GEOM_TestOthers.py
10821             anObj = self.InsertOp.RestoreShape(theStream)
10822             RaiseIfFailed("RestoreShape", self.InsertOp)
10823             self._autoPublish(anObj, theName, "restored")
10824             return anObj
10825
10826         ## Export the given shape into a file with given name.
10827         #
10828         #  Note: this function is deprecated, it is kept for backward compatibility only
10829         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
10830         #
10831         #  @param theObject Shape to be stored in the file.
10832         #  @param theFileName Name of the file to store the given shape in.
10833         #  @param theFormatName Specify format for the shape storage.
10834         #         Available formats can be obtained with
10835         #         geompy.InsertOp.ExportTranslators()[0] method.
10836         #
10837         #  @ref swig_Import_Export "Example"
10838         @ManageTransactions("InsertOp")
10839         def Export(self, theObject, theFileName, theFormatName):
10840             """
10841             Export the given shape into a file with given name.
10842
10843             Note: this function is deprecated, it is kept for backward compatibility only
10844             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
10845             
10846             Parameters: 
10847                 theObject Shape to be stored in the file.
10848                 theFileName Name of the file to store the given shape in.
10849                 theFormatName Specify format for the shape storage.
10850                               Available formats can be obtained with
10851                               geompy.InsertOp.ExportTranslators()[0] method.
10852             """
10853             # Example: see GEOM_TestOthers.py
10854             print """
10855             WARNING: Function Export is deprecated, use Export<FormatName> instead,
10856             where <FormatName> is a name of desirable format for exporting.
10857             """
10858             self.InsertOp.Export(theObject, theFileName, theFormatName)
10859             if self.InsertOp.IsDone() == 0:
10860                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10861                 pass
10862             pass
10863
10864         # end of l2_import_export
10865         ## @}
10866
10867         ## @addtogroup l3_blocks
10868         ## @{
10869
10870         ## Create a quadrangle face from four edges. Order of Edges is not
10871         #  important. It is  not necessary that edges share the same vertex.
10872         #  @param E1,E2,E3,E4 Edges for the face bound.
10873         #  @param theName Object name; when specified, this parameter is used
10874         #         for result publication in the study. Otherwise, if automatic
10875         #         publication is switched on, default value is used for result name.
10876         #
10877         #  @return New GEOM.GEOM_Object, containing the created face.
10878         #
10879         #  @ref tui_building_by_blocks_page "Example"
10880         @ManageTransactions("BlocksOp")
10881         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10882             """
10883             Create a quadrangle face from four edges. Order of Edges is not
10884             important. It is  not necessary that edges share the same vertex.
10885
10886             Parameters:
10887                 E1,E2,E3,E4 Edges for the face bound.
10888                 theName Object name; when specified, this parameter is used
10889                         for result publication in the study. Otherwise, if automatic
10890                         publication is switched on, default value is used for result name.
10891
10892             Returns:
10893                 New GEOM.GEOM_Object, containing the created face.
10894
10895             Example of usage:
10896                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10897             """
10898             # Example: see GEOM_Spanner.py
10899             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10900             RaiseIfFailed("MakeQuad", self.BlocksOp)
10901             self._autoPublish(anObj, theName, "quad")
10902             return anObj
10903
10904         ## Create a quadrangle face on two edges.
10905         #  The missing edges will be built by creating the shortest ones.
10906         #  @param E1,E2 Two opposite edges for the face.
10907         #  @param theName Object name; when specified, this parameter is used
10908         #         for result publication in the study. Otherwise, if automatic
10909         #         publication is switched on, default value is used for result name.
10910         #
10911         #  @return New GEOM.GEOM_Object, containing the created face.
10912         #
10913         #  @ref tui_building_by_blocks_page "Example"
10914         @ManageTransactions("BlocksOp")
10915         def MakeQuad2Edges(self, E1, E2, theName=None):
10916             """
10917             Create a quadrangle face on two edges.
10918             The missing edges will be built by creating the shortest ones.
10919
10920             Parameters:
10921                 E1,E2 Two opposite edges for the face.
10922                 theName Object name; when specified, this parameter is used
10923                         for result publication in the study. Otherwise, if automatic
10924                         publication is switched on, default value is used for result name.
10925
10926             Returns:
10927                 New GEOM.GEOM_Object, containing the created face.
10928
10929             Example of usage:
10930                 # create vertices
10931                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10932                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10933                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10934                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10935                 # create edges
10936                 edge1 = geompy.MakeEdge(p1, p2)
10937                 edge2 = geompy.MakeEdge(p3, p4)
10938                 # create a quadrangle face from two edges
10939                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10940             """
10941             # Example: see GEOM_Spanner.py
10942             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10943             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10944             self._autoPublish(anObj, theName, "quad")
10945             return anObj
10946
10947         ## Create a quadrangle face with specified corners.
10948         #  The missing edges will be built by creating the shortest ones.
10949         #  @param V1,V2,V3,V4 Corner vertices for the face.
10950         #  @param theName Object name; when specified, this parameter is used
10951         #         for result publication in the study. Otherwise, if automatic
10952         #         publication is switched on, default value is used for result name.
10953         #
10954         #  @return New GEOM.GEOM_Object, containing the created face.
10955         #
10956         #  @ref tui_building_by_blocks_page "Example 1"
10957         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10958         @ManageTransactions("BlocksOp")
10959         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10960             """
10961             Create a quadrangle face with specified corners.
10962             The missing edges will be built by creating the shortest ones.
10963
10964             Parameters:
10965                 V1,V2,V3,V4 Corner vertices for the face.
10966                 theName Object name; when specified, this parameter is used
10967                         for result publication in the study. Otherwise, if automatic
10968                         publication is switched on, default value is used for result name.
10969
10970             Returns:
10971                 New GEOM.GEOM_Object, containing the created face.
10972
10973             Example of usage:
10974                 # create vertices
10975                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10976                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10977                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10978                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10979                 # create a quadrangle from four points in its corners
10980                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10981             """
10982             # Example: see GEOM_Spanner.py
10983             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10984             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10985             self._autoPublish(anObj, theName, "quad")
10986             return anObj
10987
10988         ## Create a hexahedral solid, bounded by the six given faces. Order of
10989         #  faces is not important. It is  not necessary that Faces share the same edge.
10990         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10991         #  @param theName Object name; when specified, this parameter is used
10992         #         for result publication in the study. Otherwise, if automatic
10993         #         publication is switched on, default value is used for result name.
10994         #
10995         #  @return New GEOM.GEOM_Object, containing the created solid.
10996         #
10997         #  @ref tui_building_by_blocks_page "Example 1"
10998         #  \n @ref swig_MakeHexa "Example 2"
10999         @ManageTransactions("BlocksOp")
11000         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11001             """
11002             Create a hexahedral solid, bounded by the six given faces. Order of
11003             faces is not important. It is  not necessary that Faces share the same edge.
11004
11005             Parameters:
11006                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11007                 theName Object name; when specified, this parameter is used
11008                         for result publication in the study. Otherwise, if automatic
11009                         publication is switched on, default value is used for result name.
11010
11011             Returns:
11012                 New GEOM.GEOM_Object, containing the created solid.
11013
11014             Example of usage:
11015                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11016             """
11017             # Example: see GEOM_Spanner.py
11018             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11019             RaiseIfFailed("MakeHexa", self.BlocksOp)
11020             self._autoPublish(anObj, theName, "hexa")
11021             return anObj
11022
11023         ## Create a hexahedral solid between two given faces.
11024         #  The missing faces will be built by creating the smallest ones.
11025         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11026         #  @param theName Object name; when specified, this parameter is used
11027         #         for result publication in the study. Otherwise, if automatic
11028         #         publication is switched on, default value is used for result name.
11029         #
11030         #  @return New GEOM.GEOM_Object, containing the created solid.
11031         #
11032         #  @ref tui_building_by_blocks_page "Example 1"
11033         #  \n @ref swig_MakeHexa2Faces "Example 2"
11034         @ManageTransactions("BlocksOp")
11035         def MakeHexa2Faces(self, F1, F2, theName=None):
11036             """
11037             Create a hexahedral solid between two given faces.
11038             The missing faces will be built by creating the smallest ones.
11039
11040             Parameters:
11041                 F1,F2 Two opposite faces for the hexahedral solid.
11042                 theName Object name; when specified, this parameter is used
11043                         for result publication in the study. Otherwise, if automatic
11044                         publication is switched on, default value is used for result name.
11045
11046             Returns:
11047                 New GEOM.GEOM_Object, containing the created solid.
11048
11049             Example of usage:
11050                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11051             """
11052             # Example: see GEOM_Spanner.py
11053             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11054             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11055             self._autoPublish(anObj, theName, "hexa")
11056             return anObj
11057
11058         # end of l3_blocks
11059         ## @}
11060
11061         ## @addtogroup l3_blocks_op
11062         ## @{
11063
11064         ## Get a vertex, found in the given shape by its coordinates.
11065         #  @param theShape Block or a compound of blocks.
11066         #  @param theX,theY,theZ Coordinates of the sought vertex.
11067         #  @param theEpsilon Maximum allowed distance between the resulting
11068         #                    vertex and point with the given coordinates.
11069         #  @param theName Object name; when specified, this parameter is used
11070         #         for result publication in the study. Otherwise, if automatic
11071         #         publication is switched on, default value is used for result name.
11072         #
11073         #  @return New GEOM.GEOM_Object, containing the found vertex.
11074         #
11075         #  @ref swig_GetPoint "Example"
11076         @ManageTransactions("BlocksOp")
11077         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11078             """
11079             Get a vertex, found in the given shape by its coordinates.
11080
11081             Parameters:
11082                 theShape Block or a compound of blocks.
11083                 theX,theY,theZ Coordinates of the sought vertex.
11084                 theEpsilon Maximum allowed distance between the resulting
11085                            vertex and point with the given coordinates.
11086                 theName Object name; when specified, this parameter is used
11087                         for result publication in the study. Otherwise, if automatic
11088                         publication is switched on, default value is used for result name.
11089
11090             Returns:
11091                 New GEOM.GEOM_Object, containing the found vertex.
11092
11093             Example of usage:
11094                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11095             """
11096             # Example: see GEOM_TestOthers.py
11097             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11098             RaiseIfFailed("GetPoint", self.BlocksOp)
11099             self._autoPublish(anObj, theName, "vertex")
11100             return anObj
11101
11102         ## Find a vertex of the given shape, which has minimal distance to the given point.
11103         #  @param theShape Any shape.
11104         #  @param thePoint Point, close to the desired vertex.
11105         #  @param theName Object name; when specified, this parameter is used
11106         #         for result publication in the study. Otherwise, if automatic
11107         #         publication is switched on, default value is used for result name.
11108         #
11109         #  @return New GEOM.GEOM_Object, containing the found vertex.
11110         #
11111         #  @ref swig_GetVertexNearPoint "Example"
11112         @ManageTransactions("BlocksOp")
11113         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11114             """
11115             Find a vertex of the given shape, which has minimal distance to the given point.
11116
11117             Parameters:
11118                 theShape Any shape.
11119                 thePoint Point, close to the desired vertex.
11120                 theName Object name; when specified, this parameter is used
11121                         for result publication in the study. Otherwise, if automatic
11122                         publication is switched on, default value is used for result name.
11123
11124             Returns:
11125                 New GEOM.GEOM_Object, containing the found vertex.
11126
11127             Example of usage:
11128                 pmidle = geompy.MakeVertex(50, 0, 50)
11129                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11130             """
11131             # Example: see GEOM_TestOthers.py
11132             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11133             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11134             self._autoPublish(anObj, theName, "vertex")
11135             return anObj
11136
11137         ## Get an edge, found in the given shape by two given vertices.
11138         #  @param theShape Block or a compound of blocks.
11139         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11140         #  @param theName Object name; when specified, this parameter is used
11141         #         for result publication in the study. Otherwise, if automatic
11142         #         publication is switched on, default value is used for result name.
11143         #
11144         #  @return New GEOM.GEOM_Object, containing the found edge.
11145         #
11146         #  @ref swig_GetEdge "Example"
11147         @ManageTransactions("BlocksOp")
11148         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11149             """
11150             Get an edge, found in the given shape by two given vertices.
11151
11152             Parameters:
11153                 theShape Block or a compound of blocks.
11154                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11155                 theName Object name; when specified, this parameter is used
11156                         for result publication in the study. Otherwise, if automatic
11157                         publication is switched on, default value is used for result name.
11158
11159             Returns:
11160                 New GEOM.GEOM_Object, containing the found edge.
11161             """
11162             # Example: see GEOM_Spanner.py
11163             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11164             RaiseIfFailed("GetEdge", self.BlocksOp)
11165             self._autoPublish(anObj, theName, "edge")
11166             return anObj
11167
11168         ## Find an edge of the given shape, which has minimal distance to the given point.
11169         #  @param theShape Block or a compound of blocks.
11170         #  @param thePoint Point, close to the desired edge.
11171         #  @param theName Object name; when specified, this parameter is used
11172         #         for result publication in the study. Otherwise, if automatic
11173         #         publication is switched on, default value is used for result name.
11174         #
11175         #  @return New GEOM.GEOM_Object, containing the found edge.
11176         #
11177         #  @ref swig_GetEdgeNearPoint "Example"
11178         @ManageTransactions("BlocksOp")
11179         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11180             """
11181             Find an edge of the given shape, which has minimal distance to the given point.
11182
11183             Parameters:
11184                 theShape Block or a compound of blocks.
11185                 thePoint Point, close to the desired edge.
11186                 theName Object name; when specified, this parameter is used
11187                         for result publication in the study. Otherwise, if automatic
11188                         publication is switched on, default value is used for result name.
11189
11190             Returns:
11191                 New GEOM.GEOM_Object, containing the found edge.
11192             """
11193             # Example: see GEOM_TestOthers.py
11194             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11195             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11196             self._autoPublish(anObj, theName, "edge")
11197             return anObj
11198
11199         ## Returns a face, found in the given shape by four given corner vertices.
11200         #  @param theShape Block or a compound of blocks.
11201         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11202         #  @param theName Object name; when specified, this parameter is used
11203         #         for result publication in the study. Otherwise, if automatic
11204         #         publication is switched on, default value is used for result name.
11205         #
11206         #  @return New GEOM.GEOM_Object, containing the found face.
11207         #
11208         #  @ref swig_todo "Example"
11209         @ManageTransactions("BlocksOp")
11210         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11211             """
11212             Returns a face, found in the given shape by four given corner vertices.
11213
11214             Parameters:
11215                 theShape Block or a compound of blocks.
11216                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11217                 theName Object name; when specified, this parameter is used
11218                         for result publication in the study. Otherwise, if automatic
11219                         publication is switched on, default value is used for result name.
11220
11221             Returns:
11222                 New GEOM.GEOM_Object, containing the found face.
11223             """
11224             # Example: see GEOM_Spanner.py
11225             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11226             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11227             self._autoPublish(anObj, theName, "face")
11228             return anObj
11229
11230         ## Get a face of block, found in the given shape by two given edges.
11231         #  @param theShape Block or a compound of blocks.
11232         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11233         #  @param theName Object name; when specified, this parameter is used
11234         #         for result publication in the study. Otherwise, if automatic
11235         #         publication is switched on, default value is used for result name.
11236         #
11237         #  @return New GEOM.GEOM_Object, containing the found face.
11238         #
11239         #  @ref swig_todo "Example"
11240         @ManageTransactions("BlocksOp")
11241         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11242             """
11243             Get a face of block, found in the given shape by two given edges.
11244
11245             Parameters:
11246                 theShape Block or a compound of blocks.
11247                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11248                 theName Object name; when specified, this parameter is used
11249                         for result publication in the study. Otherwise, if automatic
11250                         publication is switched on, default value is used for result name.
11251
11252             Returns:
11253                 New GEOM.GEOM_Object, containing the found face.
11254             """
11255             # Example: see GEOM_Spanner.py
11256             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11257             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11258             self._autoPublish(anObj, theName, "face")
11259             return anObj
11260
11261         ## Find a face, opposite to the given one in the given block.
11262         #  @param theBlock Must be a hexahedral solid.
11263         #  @param theFace Face of \a theBlock, opposite to the desired face.
11264         #  @param theName Object name; when specified, this parameter is used
11265         #         for result publication in the study. Otherwise, if automatic
11266         #         publication is switched on, default value is used for result name.
11267         #
11268         #  @return New GEOM.GEOM_Object, containing the found face.
11269         #
11270         #  @ref swig_GetOppositeFace "Example"
11271         @ManageTransactions("BlocksOp")
11272         def GetOppositeFace(self, theBlock, theFace, theName=None):
11273             """
11274             Find a face, opposite to the given one in the given block.
11275
11276             Parameters:
11277                 theBlock Must be a hexahedral solid.
11278                 theFace Face of theBlock, opposite to the desired face.
11279                 theName Object name; when specified, this parameter is used
11280                         for result publication in the study. Otherwise, if automatic
11281                         publication is switched on, default value is used for result name.
11282
11283             Returns:
11284                 New GEOM.GEOM_Object, containing the found face.
11285             """
11286             # Example: see GEOM_Spanner.py
11287             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11288             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11289             self._autoPublish(anObj, theName, "face")
11290             return anObj
11291
11292         ## Find a face of the given shape, which has minimal distance to the given point.
11293         #  @param theShape Block or a compound of blocks.
11294         #  @param thePoint Point, close to the desired face.
11295         #  @param theName Object name; when specified, this parameter is used
11296         #         for result publication in the study. Otherwise, if automatic
11297         #         publication is switched on, default value is used for result name.
11298         #
11299         #  @return New GEOM.GEOM_Object, containing the found face.
11300         #
11301         #  @ref swig_GetFaceNearPoint "Example"
11302         @ManageTransactions("BlocksOp")
11303         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11304             """
11305             Find a face of the given shape, which has minimal distance to the given point.
11306
11307             Parameters:
11308                 theShape Block or a compound of blocks.
11309                 thePoint Point, close to the desired face.
11310                 theName Object name; when specified, this parameter is used
11311                         for result publication in the study. Otherwise, if automatic
11312                         publication is switched on, default value is used for result name.
11313
11314             Returns:
11315                 New GEOM.GEOM_Object, containing the found face.
11316             """
11317             # Example: see GEOM_Spanner.py
11318             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11319             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11320             self._autoPublish(anObj, theName, "face")
11321             return anObj
11322
11323         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11324         #  @param theBlock Block or a compound of blocks.
11325         #  @param theVector Vector, close to the normale of the desired face.
11326         #  @param theName Object name; when specified, this parameter is used
11327         #         for result publication in the study. Otherwise, if automatic
11328         #         publication is switched on, default value is used for result name.
11329         #
11330         #  @return New GEOM.GEOM_Object, containing the found face.
11331         #
11332         #  @ref swig_todo "Example"
11333         @ManageTransactions("BlocksOp")
11334         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11335             """
11336             Find a face of block, whose outside normale has minimal angle with the given vector.
11337
11338             Parameters:
11339                 theBlock Block or a compound of blocks.
11340                 theVector Vector, close to the normale of the desired face.
11341                 theName Object name; when specified, this parameter is used
11342                         for result publication in the study. Otherwise, if automatic
11343                         publication is switched on, default value is used for result name.
11344
11345             Returns:
11346                 New GEOM.GEOM_Object, containing the found face.
11347             """
11348             # Example: see GEOM_Spanner.py
11349             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11350             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11351             self._autoPublish(anObj, theName, "face")
11352             return anObj
11353
11354         ## Find all sub-shapes of type \a theShapeType of the given shape,
11355         #  which have minimal distance to the given point.
11356         #  @param theShape Any shape.
11357         #  @param thePoint Point, close to the desired shape.
11358         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11359         #  @param theTolerance The tolerance for distances comparison. All shapes
11360         #                      with distances to the given point in interval
11361         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11362         #  @param theName Object name; when specified, this parameter is used
11363         #         for result publication in the study. Otherwise, if automatic
11364         #         publication is switched on, default value is used for result name.
11365         #
11366         #  @return New GEOM_Object, containing a group of all found shapes.
11367         #
11368         #  @ref swig_GetShapesNearPoint "Example"
11369         @ManageTransactions("BlocksOp")
11370         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11371             """
11372             Find all sub-shapes of type theShapeType of the given shape,
11373             which have minimal distance to the given point.
11374
11375             Parameters:
11376                 theShape Any shape.
11377                 thePoint Point, close to the desired shape.
11378                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11379                 theTolerance The tolerance for distances comparison. All shapes
11380                                 with distances to the given point in interval
11381                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11382                 theName Object name; when specified, this parameter is used
11383                         for result publication in the study. Otherwise, if automatic
11384                         publication is switched on, default value is used for result name.
11385
11386             Returns:
11387                 New GEOM_Object, containing a group of all found shapes.
11388             """
11389             # Example: see GEOM_TestOthers.py
11390             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11391             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11392             self._autoPublish(anObj, theName, "group")
11393             return anObj
11394
11395         # end of l3_blocks_op
11396         ## @}
11397
11398         ## @addtogroup l4_blocks_measure
11399         ## @{
11400
11401         ## Check, if the compound of blocks is given.
11402         #  To be considered as a compound of blocks, the
11403         #  given shape must satisfy the following conditions:
11404         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11405         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11406         #  - The compound should be connexe.
11407         #  - The glue between two quadrangle faces should be applied.
11408         #  @param theCompound The compound to check.
11409         #  @return TRUE, if the given shape is a compound of blocks.
11410         #  If theCompound is not valid, prints all discovered errors.
11411         #
11412         #  @ref tui_measurement_tools_page "Example 1"
11413         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11414         @ManageTransactions("BlocksOp")
11415         def CheckCompoundOfBlocks(self,theCompound):
11416             """
11417             Check, if the compound of blocks is given.
11418             To be considered as a compound of blocks, the
11419             given shape must satisfy the following conditions:
11420             - Each element of the compound should be a Block (6 faces and 12 edges).
11421             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11422             - The compound should be connexe.
11423             - The glue between two quadrangle faces should be applied.
11424
11425             Parameters:
11426                 theCompound The compound to check.
11427
11428             Returns:
11429                 TRUE, if the given shape is a compound of blocks.
11430                 If theCompound is not valid, prints all discovered errors.
11431             """
11432             # Example: see GEOM_Spanner.py
11433             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11434             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11435             if IsValid == 0:
11436                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11437                 print Descr
11438             return IsValid
11439
11440         ## Retrieve all non blocks solids and faces from \a theShape.
11441         #  @param theShape The shape to explore.
11442         #  @param theName Object name; when specified, this parameter is used
11443         #         for result publication in the study. Otherwise, if automatic
11444         #         publication is switched on, default value is used for result name.
11445         #
11446         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11447         #          non block solids (= not 6 faces, or with 6 faces, but with the
11448         #          presence of non-quadrangular faces). The second object is a
11449         #          group of all non quadrangular faces.
11450         #
11451         #  @ref tui_measurement_tools_page "Example 1"
11452         #  \n @ref swig_GetNonBlocks "Example 2"
11453         @ManageTransactions("BlocksOp")
11454         def GetNonBlocks (self, theShape, theName=None):
11455             """
11456             Retrieve all non blocks solids and faces from theShape.
11457
11458             Parameters:
11459                 theShape The shape to explore.
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                 A tuple of two GEOM_Objects. The first object is a group of all
11466                 non block solids (= not 6 faces, or with 6 faces, but with the
11467                 presence of non-quadrangular faces). The second object is a
11468                 group of all non quadrangular faces.
11469
11470             Usage:
11471                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11472             """
11473             # Example: see GEOM_Spanner.py
11474             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11475             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11476             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11477             return aTuple
11478
11479         ## Remove all seam and degenerated edges from \a theShape.
11480         #  Unite faces and edges, sharing one surface. It means that
11481         #  this faces must have references to one C++ surface object (handle).
11482         #  @param theShape The compound or single solid to remove irregular edges from.
11483         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11484         #         do not unite faces.
11485         #  @param theName Object name; when specified, this parameter is used
11486         #         for result publication in the study. Otherwise, if automatic
11487         #         publication is switched on, default value is used for result name.
11488         #
11489         #  @return Improved shape.
11490         #
11491         #  @ref swig_RemoveExtraEdges "Example"
11492         @ManageTransactions("BlocksOp")
11493         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11494             """
11495             Remove all seam and degenerated edges from theShape.
11496             Unite faces and edges, sharing one surface. It means that
11497             this faces must have references to one C++ surface object (handle).
11498
11499             Parameters:
11500                 theShape The compound or single solid to remove irregular edges from.
11501                 doUnionFaces If True, then unite faces. If False (the default value),
11502                              do not unite faces.
11503                 theName Object name; when specified, this parameter is used
11504                         for result publication in the study. Otherwise, if automatic
11505                         publication is switched on, default value is used for result name.
11506
11507             Returns:
11508                 Improved shape.
11509             """
11510             # Example: see GEOM_TestOthers.py
11511             nbFacesOptimum = -1 # -1 means do not unite faces
11512             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11513             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11514             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11515             self._autoPublish(anObj, theName, "removeExtraEdges")
11516             return anObj
11517
11518         ## Performs union faces of \a theShape
11519         #  Unite faces sharing one surface. It means that
11520         #  these faces must have references to one C++ surface object (handle).
11521         #  @param theShape The compound or single solid that contains faces
11522         #         to perform union.
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 Improved shape.
11528         #
11529         #  @ref swig_UnionFaces "Example"
11530         @ManageTransactions("BlocksOp")
11531         def UnionFaces(self, theShape, theName=None):
11532             """
11533             Performs union faces of theShape.
11534             Unite faces sharing one surface. It means that
11535             these faces must have references to one C++ surface object (handle).
11536
11537             Parameters:
11538                 theShape The compound or single solid that contains faces
11539                          to perform union.
11540                 theName Object name; when specified, this parameter is used
11541                         for result publication in the study. Otherwise, if automatic
11542                         publication is switched on, default value is used for result name.
11543
11544             Returns:
11545                 Improved shape.
11546             """
11547             # Example: see GEOM_TestOthers.py
11548             anObj = self.BlocksOp.UnionFaces(theShape)
11549             RaiseIfFailed("UnionFaces", self.BlocksOp)
11550             self._autoPublish(anObj, theName, "unionFaces")
11551             return anObj
11552
11553         ## Check, if the given shape is a blocks compound.
11554         #  Fix all detected errors.
11555         #    \note Single block can be also fixed by this method.
11556         #  @param theShape The compound to check and improve.
11557         #  @param theName Object name; when specified, this parameter is used
11558         #         for result publication in the study. Otherwise, if automatic
11559         #         publication is switched on, default value is used for result name.
11560         #
11561         #  @return Improved compound.
11562         #
11563         #  @ref swig_CheckAndImprove "Example"
11564         @ManageTransactions("BlocksOp")
11565         def CheckAndImprove(self, theShape, theName=None):
11566             """
11567             Check, if the given shape is a blocks compound.
11568             Fix all detected errors.
11569
11570             Note:
11571                 Single block can be also fixed by this method.
11572
11573             Parameters:
11574                 theShape The compound to check and improve.
11575                 theName Object name; when specified, this parameter is used
11576                         for result publication in the study. Otherwise, if automatic
11577                         publication is switched on, default value is used for result name.
11578
11579             Returns:
11580                 Improved compound.
11581             """
11582             # Example: see GEOM_TestOthers.py
11583             anObj = self.BlocksOp.CheckAndImprove(theShape)
11584             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11585             self._autoPublish(anObj, theName, "improved")
11586             return anObj
11587
11588         # end of l4_blocks_measure
11589         ## @}
11590
11591         ## @addtogroup l3_blocks_op
11592         ## @{
11593
11594         ## Get all the blocks, contained in the given compound.
11595         #  @param theCompound The compound to explode.
11596         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11597         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11598         #  @param theName Object name; when specified, this parameter is used
11599         #         for result publication in the study. Otherwise, if automatic
11600         #         publication is switched on, default value is used for result name.
11601         #
11602         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11603         #
11604         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11605         #
11606         #  @ref tui_explode_on_blocks "Example 1"
11607         #  \n @ref swig_MakeBlockExplode "Example 2"
11608         @ManageTransactions("BlocksOp")
11609         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11610             """
11611             Get all the blocks, contained in the given compound.
11612
11613             Parameters:
11614                 theCompound The compound to explode.
11615                 theMinNbFaces If solid has lower number of faces, it is not a block.
11616                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11617                 theName Object name; when specified, this parameter is used
11618                         for result publication in the study. Otherwise, if automatic
11619                         publication is switched on, default value is used for result name.
11620
11621             Note:
11622                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11623
11624             Returns:
11625                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11626             """
11627             # Example: see GEOM_TestOthers.py
11628             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11629             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11630             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11631             for anObj in aList:
11632                 anObj.SetParameters(Parameters)
11633                 pass
11634             self._autoPublish(aList, theName, "block")
11635             return aList
11636
11637         ## Find block, containing the given point inside its volume or on boundary.
11638         #  @param theCompound Compound, to find block in.
11639         #  @param thePoint Point, close to the desired block. If the point lays on
11640         #         boundary between some blocks, we return block with nearest center.
11641         #  @param theName Object name; when specified, this parameter is used
11642         #         for result publication in the study. Otherwise, if automatic
11643         #         publication is switched on, default value is used for result name.
11644         #
11645         #  @return New GEOM.GEOM_Object, containing the found block.
11646         #
11647         #  @ref swig_todo "Example"
11648         @ManageTransactions("BlocksOp")
11649         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11650             """
11651             Find block, containing the given point inside its volume or on boundary.
11652
11653             Parameters:
11654                 theCompound Compound, to find block in.
11655                 thePoint Point, close to the desired block. If the point lays on
11656                          boundary between some blocks, we return block with nearest center.
11657                 theName Object name; when specified, this parameter is used
11658                         for result publication in the study. Otherwise, if automatic
11659                         publication is switched on, default value is used for result name.
11660
11661             Returns:
11662                 New GEOM.GEOM_Object, containing the found block.
11663             """
11664             # Example: see GEOM_Spanner.py
11665             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11666             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11667             self._autoPublish(anObj, theName, "block")
11668             return anObj
11669
11670         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11671         #  @param theCompound Compound, to find block in.
11672         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11673         #  @param theName Object name; when specified, this parameter is used
11674         #         for result publication in the study. Otherwise, if automatic
11675         #         publication is switched on, default value is used for result name.
11676         #
11677         #  @return New GEOM.GEOM_Object, containing the found block.
11678         #
11679         #  @ref swig_GetBlockByParts "Example"
11680         @ManageTransactions("BlocksOp")
11681         def GetBlockByParts(self, theCompound, theParts, theName=None):
11682             """
11683              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11684
11685              Parameters:
11686                 theCompound Compound, to find block in.
11687                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11688                 theName Object name; when specified, this parameter is used
11689                         for result publication in the study. Otherwise, if automatic
11690                         publication is switched on, default value is used for result name.
11691
11692             Returns:
11693                 New GEOM_Object, containing the found block.
11694             """
11695             # Example: see GEOM_TestOthers.py
11696             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11697             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11698             self._autoPublish(anObj, theName, "block")
11699             return anObj
11700
11701         ## Return all blocks, containing all the elements, passed as the parts.
11702         #  @param theCompound Compound, to find blocks in.
11703         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11704         #  @param theName Object name; when specified, this parameter is used
11705         #         for result publication in the study. Otherwise, if automatic
11706         #         publication is switched on, default value is used for result name.
11707         #
11708         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11709         #
11710         #  @ref swig_todo "Example"
11711         @ManageTransactions("BlocksOp")
11712         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11713             """
11714             Return all blocks, containing all the elements, passed as the parts.
11715
11716             Parameters:
11717                 theCompound Compound, to find blocks in.
11718                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11719                 theName Object name; when specified, this parameter is used
11720                         for result publication in the study. Otherwise, if automatic
11721                         publication is switched on, default value is used for result name.
11722
11723             Returns:
11724                 List of GEOM.GEOM_Object, containing the found blocks.
11725             """
11726             # Example: see GEOM_Spanner.py
11727             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11728             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11729             self._autoPublish(aList, theName, "block")
11730             return aList
11731
11732         ## Multi-transformate block and glue the result.
11733         #  Transformation is defined so, as to superpose direction faces.
11734         #  @param Block Hexahedral solid to be multi-transformed.
11735         #  @param DirFace1 ID of First direction face.
11736         #  @param DirFace2 ID of Second direction face.
11737         #  @param NbTimes Quantity of transformations to be done.
11738         #  @param theName Object name; when specified, this parameter is used
11739         #         for result publication in the study. Otherwise, if automatic
11740         #         publication is switched on, default value is used for result name.
11741         #
11742         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11743         #
11744         #  @return New GEOM.GEOM_Object, containing the result shape.
11745         #
11746         #  @ref tui_multi_transformation "Example"
11747         @ManageTransactions("BlocksOp")
11748         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11749             """
11750             Multi-transformate block and glue the result.
11751             Transformation is defined so, as to superpose direction faces.
11752
11753             Parameters:
11754                 Block Hexahedral solid to be multi-transformed.
11755                 DirFace1 ID of First direction face.
11756                 DirFace2 ID of Second direction face.
11757                 NbTimes Quantity of transformations to be done.
11758                 theName Object name; when specified, this parameter is used
11759                         for result publication in the study. Otherwise, if automatic
11760                         publication is switched on, default value is used for result name.
11761
11762             Note:
11763                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11764
11765             Returns:
11766                 New GEOM.GEOM_Object, containing the result shape.
11767             """
11768             # Example: see GEOM_Spanner.py
11769             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11770             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11771             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11772             anObj.SetParameters(Parameters)
11773             self._autoPublish(anObj, theName, "transformed")
11774             return anObj
11775
11776         ## Multi-transformate block and glue the result.
11777         #  @param Block Hexahedral solid to be multi-transformed.
11778         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11779         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11780         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11781         #  @param theName Object name; when specified, this parameter is used
11782         #         for result publication in the study. Otherwise, if automatic
11783         #         publication is switched on, default value is used for result name.
11784         #
11785         #  @return New GEOM.GEOM_Object, containing the result shape.
11786         #
11787         #  @ref tui_multi_transformation "Example"
11788         @ManageTransactions("BlocksOp")
11789         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11790                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11791             """
11792             Multi-transformate block and glue the result.
11793
11794             Parameters:
11795                 Block Hexahedral solid to be multi-transformed.
11796                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11797                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11798                 NbTimesU,NbTimesV Quantity of transformations to be done.
11799                 theName Object name; when specified, this parameter is used
11800                         for result publication in the study. Otherwise, if automatic
11801                         publication is switched on, default value is used for result name.
11802
11803             Returns:
11804                 New GEOM.GEOM_Object, containing the result shape.
11805             """
11806             # Example: see GEOM_Spanner.py
11807             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11808               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11809             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11810                                                             DirFace1V, DirFace2V, NbTimesV)
11811             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11812             anObj.SetParameters(Parameters)
11813             self._autoPublish(anObj, theName, "transformed")
11814             return anObj
11815
11816         ## Build all possible propagation groups.
11817         #  Propagation group is a set of all edges, opposite to one (main)
11818         #  edge of this group directly or through other opposite edges.
11819         #  Notion of Opposite Edge make sence only on quadrangle face.
11820         #  @param theShape Shape to build propagation groups on.
11821         #  @param theName Object name; when specified, this parameter is used
11822         #         for result publication in the study. Otherwise, if automatic
11823         #         publication is switched on, default value is used for result name.
11824         #
11825         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11826         #
11827         #  @ref swig_Propagate "Example"
11828         @ManageTransactions("BlocksOp")
11829         def Propagate(self, theShape, theName=None):
11830             """
11831             Build all possible propagation groups.
11832             Propagation group is a set of all edges, opposite to one (main)
11833             edge of this group directly or through other opposite edges.
11834             Notion of Opposite Edge make sence only on quadrangle face.
11835
11836             Parameters:
11837                 theShape Shape to build propagation groups on.
11838                 theName Object name; when specified, this parameter is used
11839                         for result publication in the study. Otherwise, if automatic
11840                         publication is switched on, default value is used for result name.
11841
11842             Returns:
11843                 List of GEOM.GEOM_Object, each of them is a propagation group.
11844             """
11845             # Example: see GEOM_TestOthers.py
11846             listChains = self.BlocksOp.Propagate(theShape)
11847             RaiseIfFailed("Propagate", self.BlocksOp)
11848             self._autoPublish(listChains, theName, "propagate")
11849             return listChains
11850
11851         # end of l3_blocks_op
11852         ## @}
11853
11854         ## @addtogroup l3_groups
11855         ## @{
11856
11857         ## Creates a new group which will store sub-shapes of theMainShape
11858         #  @param theMainShape is a GEOM object on which the group is selected
11859         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11860         #  @param theName Object name; when specified, this parameter is used
11861         #         for result publication in the study. Otherwise, if automatic
11862         #         publication is switched on, default value is used for result name.
11863         #
11864         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11865         #
11866         #  @ref tui_working_with_groups_page "Example 1"
11867         #  \n @ref swig_CreateGroup "Example 2"
11868         @ManageTransactions("GroupOp")
11869         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11870             """
11871             Creates a new group which will store sub-shapes of theMainShape
11872
11873             Parameters:
11874                theMainShape is a GEOM object on which the group is selected
11875                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11876                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11877                 theName Object name; when specified, this parameter is used
11878                         for result publication in the study. Otherwise, if automatic
11879                         publication is switched on, default value is used for result name.
11880
11881             Returns:
11882                a newly created GEOM group
11883
11884             Example of usage:
11885                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11886
11887             """
11888             # Example: see GEOM_TestOthers.py
11889             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11890             RaiseIfFailed("CreateGroup", self.GroupOp)
11891             self._autoPublish(anObj, theName, "group")
11892             return anObj
11893
11894         ## Adds a sub-object with ID theSubShapeId to the group
11895         #  @param theGroup is a GEOM group to which the new sub-shape is added
11896         #  @param theSubShapeID is a sub-shape ID in the main object.
11897         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11898         #
11899         #  @ref tui_working_with_groups_page "Example"
11900         @ManageTransactions("GroupOp")
11901         def AddObject(self,theGroup, theSubShapeID):
11902             """
11903             Adds a sub-object with ID theSubShapeId to the group
11904
11905             Parameters:
11906                 theGroup       is a GEOM group to which the new sub-shape is added
11907                 theSubShapeID  is a sub-shape ID in the main object.
11908
11909             Note:
11910                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11911             """
11912             # Example: see GEOM_TestOthers.py
11913             self.GroupOp.AddObject(theGroup, theSubShapeID)
11914             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11915                 RaiseIfFailed("AddObject", self.GroupOp)
11916                 pass
11917             pass
11918
11919         ## Removes a sub-object with ID \a theSubShapeId from the group
11920         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11921         #  @param theSubShapeID is a sub-shape ID in the main object.
11922         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11923         #
11924         #  @ref tui_working_with_groups_page "Example"
11925         @ManageTransactions("GroupOp")
11926         def RemoveObject(self,theGroup, theSubShapeID):
11927             """
11928             Removes a sub-object with ID theSubShapeId from the group
11929
11930             Parameters:
11931                 theGroup is a GEOM group from which the new sub-shape is removed
11932                 theSubShapeID is a sub-shape ID in the main object.
11933
11934             Note:
11935                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11936             """
11937             # Example: see GEOM_TestOthers.py
11938             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11939             RaiseIfFailed("RemoveObject", self.GroupOp)
11940             pass
11941
11942         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11943         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11944         #  @param theSubShapes is a list of sub-shapes to be added.
11945         #
11946         #  @ref tui_working_with_groups_page "Example"
11947         @ManageTransactions("GroupOp")
11948         def UnionList (self,theGroup, theSubShapes):
11949             """
11950             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11951
11952             Parameters:
11953                 theGroup is a GEOM group to which the new sub-shapes are added.
11954                 theSubShapes is a list of sub-shapes to be added.
11955             """
11956             # Example: see GEOM_TestOthers.py
11957             self.GroupOp.UnionList(theGroup, theSubShapes)
11958             RaiseIfFailed("UnionList", self.GroupOp)
11959             pass
11960
11961         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11962         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11963         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11964         #
11965         #  @ref swig_UnionIDs "Example"
11966         @ManageTransactions("GroupOp")
11967         def UnionIDs(self,theGroup, theSubShapes):
11968             """
11969             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11970
11971             Parameters:
11972                 theGroup is a GEOM group to which the new sub-shapes are added.
11973                 theSubShapes is a list of indices of sub-shapes to be added.
11974             """
11975             # Example: see GEOM_TestOthers.py
11976             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11977             RaiseIfFailed("UnionIDs", self.GroupOp)
11978             pass
11979
11980         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11981         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11982         #  @param theSubShapes is a list of sub-shapes to be removed.
11983         #
11984         #  @ref tui_working_with_groups_page "Example"
11985         @ManageTransactions("GroupOp")
11986         def DifferenceList (self,theGroup, theSubShapes):
11987             """
11988             Removes from the group all the given shapes. No errors, if some shapes are not included.
11989
11990             Parameters:
11991                 theGroup is a GEOM group from which the sub-shapes are removed.
11992                 theSubShapes is a list of sub-shapes to be removed.
11993             """
11994             # Example: see GEOM_TestOthers.py
11995             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11996             RaiseIfFailed("DifferenceList", self.GroupOp)
11997             pass
11998
11999         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12000         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12001         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12002         #
12003         #  @ref swig_DifferenceIDs "Example"
12004         @ManageTransactions("GroupOp")
12005         def DifferenceIDs(self,theGroup, theSubShapes):
12006             """
12007             Removes from the group all the given shapes. No errors, if some shapes are not included.
12008
12009             Parameters:
12010                 theGroup is a GEOM group from which the sub-shapes are removed.
12011                 theSubShapes is a list of indices of sub-shapes to be removed.
12012             """
12013             # Example: see GEOM_TestOthers.py
12014             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12015             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12016             pass
12017
12018         ## Union of two groups.
12019         #  New group is created. It will contain all entities
12020         #  which are present in groups theGroup1 and theGroup2.
12021         #  @param theGroup1, theGroup2 are the initial GEOM groups
12022         #                              to create the united group from.
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 a newly created GEOM group.
12028         #
12029         #  @ref tui_union_groups_anchor "Example"
12030         @ManageTransactions("GroupOp")
12031         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12032             """
12033             Union of two groups.
12034             New group is created. It will contain all entities
12035             which are present in groups theGroup1 and theGroup2.
12036
12037             Parameters:
12038                 theGroup1, theGroup2 are the initial GEOM groups
12039                                      to create the united group from.
12040                 theName Object name; when specified, this parameter is used
12041                         for result publication in the study. Otherwise, if automatic
12042                         publication is switched on, default value is used for result name.
12043
12044             Returns:
12045                 a newly created GEOM group.
12046             """
12047             # Example: see GEOM_TestOthers.py
12048             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12049             RaiseIfFailed("UnionGroups", self.GroupOp)
12050             self._autoPublish(aGroup, theName, "group")
12051             return aGroup
12052
12053         ## Intersection of two groups.
12054         #  New group is created. It will contain only those entities
12055         #  which are present in both groups theGroup1 and theGroup2.
12056         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12057         #  @param theName Object name; when specified, this parameter is used
12058         #         for result publication in the study. Otherwise, if automatic
12059         #         publication is switched on, default value is used for result name.
12060         #
12061         #  @return a newly created GEOM group.
12062         #
12063         #  @ref tui_intersect_groups_anchor "Example"
12064         @ManageTransactions("GroupOp")
12065         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12066             """
12067             Intersection of two groups.
12068             New group is created. It will contain only those entities
12069             which are present in both groups theGroup1 and theGroup2.
12070
12071             Parameters:
12072                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12073                 theName Object name; when specified, this parameter is used
12074                         for result publication in the study. Otherwise, if automatic
12075                         publication is switched on, default value is used for result name.
12076
12077             Returns:
12078                 a newly created GEOM group.
12079             """
12080             # Example: see GEOM_TestOthers.py
12081             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12082             RaiseIfFailed("IntersectGroups", self.GroupOp)
12083             self._autoPublish(aGroup, theName, "group")
12084             return aGroup
12085
12086         ## Cut of two groups.
12087         #  New group is created. It will contain entities which are
12088         #  present in group theGroup1 but are not present in group theGroup2.
12089         #  @param theGroup1 is a GEOM group to include elements of.
12090         #  @param theGroup2 is a GEOM group to exclude elements of.
12091         #  @param theName Object name; when specified, this parameter is used
12092         #         for result publication in the study. Otherwise, if automatic
12093         #         publication is switched on, default value is used for result name.
12094         #
12095         #  @return a newly created GEOM group.
12096         #
12097         #  @ref tui_cut_groups_anchor "Example"
12098         @ManageTransactions("GroupOp")
12099         def CutGroups (self, theGroup1, theGroup2, theName=None):
12100             """
12101             Cut of two groups.
12102             New group is created. It will contain entities which are
12103             present in group theGroup1 but are not present in group theGroup2.
12104
12105             Parameters:
12106                 theGroup1 is a GEOM group to include elements of.
12107                 theGroup2 is a GEOM group to exclude elements of.
12108                 theName Object name; when specified, this parameter is used
12109                         for result publication in the study. Otherwise, if automatic
12110                         publication is switched on, default value is used for result name.
12111
12112             Returns:
12113                 a newly created GEOM group.
12114             """
12115             # Example: see GEOM_TestOthers.py
12116             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12117             RaiseIfFailed("CutGroups", self.GroupOp)
12118             self._autoPublish(aGroup, theName, "group")
12119             return aGroup
12120
12121         ## Union of list of groups.
12122         #  New group is created. It will contain all entities that are
12123         #  present in groups listed in theGList.
12124         #  @param theGList is a list of GEOM groups to create the united group from.
12125         #  @param theName Object name; when specified, this parameter is used
12126         #         for result publication in the study. Otherwise, if automatic
12127         #         publication is switched on, default value is used for result name.
12128         #
12129         #  @return a newly created GEOM group.
12130         #
12131         #  @ref tui_union_groups_anchor "Example"
12132         @ManageTransactions("GroupOp")
12133         def UnionListOfGroups (self, theGList, theName=None):
12134             """
12135             Union of list of groups.
12136             New group is created. It will contain all entities that are
12137             present in groups listed in theGList.
12138
12139             Parameters:
12140                 theGList is a list of GEOM groups to create the united group from.
12141                 theName Object name; when specified, this parameter is used
12142                         for result publication in the study. Otherwise, if automatic
12143                         publication is switched on, default value is used for result name.
12144
12145             Returns:
12146                 a newly created GEOM group.
12147             """
12148             # Example: see GEOM_TestOthers.py
12149             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12150             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12151             self._autoPublish(aGroup, theName, "group")
12152             return aGroup
12153
12154         ## Cut of lists of groups.
12155         #  New group is created. It will contain only entities
12156         #  which are present in groups listed in theGList.
12157         #  @param theGList is a list of GEOM groups to include elements of.
12158         #  @param theName Object name; when specified, this parameter is used
12159         #         for result publication in the study. Otherwise, if automatic
12160         #         publication is switched on, default value is used for result name.
12161         #
12162         #  @return a newly created GEOM group.
12163         #
12164         #  @ref tui_intersect_groups_anchor "Example"
12165         @ManageTransactions("GroupOp")
12166         def IntersectListOfGroups (self, theGList, theName=None):
12167             """
12168             Cut of lists of groups.
12169             New group is created. It will contain only entities
12170             which are present in groups listed in theGList.
12171
12172             Parameters:
12173                 theGList is a list of GEOM groups to include elements of.
12174                 theName Object name; when specified, this parameter is used
12175                         for result publication in the study. Otherwise, if automatic
12176                         publication is switched on, default value is used for result name.
12177
12178             Returns:
12179                 a newly created GEOM group.
12180             """
12181             # Example: see GEOM_TestOthers.py
12182             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12183             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12184             self._autoPublish(aGroup, theName, "group")
12185             return aGroup
12186
12187         ## Cut of lists of groups.
12188         #  New group is created. It will contain only entities
12189         #  which are present in groups listed in theGList1 but
12190         #  are not present in groups from theGList2.
12191         #  @param theGList1 is a list of GEOM groups to include elements of.
12192         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12193         #  @param theName Object name; when specified, this parameter is used
12194         #         for result publication in the study. Otherwise, if automatic
12195         #         publication is switched on, default value is used for result name.
12196         #
12197         #  @return a newly created GEOM group.
12198         #
12199         #  @ref tui_cut_groups_anchor "Example"
12200         @ManageTransactions("GroupOp")
12201         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12202             """
12203             Cut of lists of groups.
12204             New group is created. It will contain only entities
12205             which are present in groups listed in theGList1 but
12206             are not present in groups from theGList2.
12207
12208             Parameters:
12209                 theGList1 is a list of GEOM groups to include elements of.
12210                 theGList2 is a list of GEOM groups to exclude elements of.
12211                 theName Object name; when specified, this parameter is used
12212                         for result publication in the study. Otherwise, if automatic
12213                         publication is switched on, default value is used for result name.
12214
12215             Returns:
12216                 a newly created GEOM group.
12217             """
12218             # Example: see GEOM_TestOthers.py
12219             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12220             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12221             self._autoPublish(aGroup, theName, "group")
12222             return aGroup
12223
12224         ## Returns a list of sub-objects ID stored in the group
12225         #  @param theGroup is a GEOM group for which a list of IDs is requested
12226         #
12227         #  @ref swig_GetObjectIDs "Example"
12228         @ManageTransactions("GroupOp")
12229         def GetObjectIDs(self,theGroup):
12230             """
12231             Returns a list of sub-objects ID stored in the group
12232
12233             Parameters:
12234                 theGroup is a GEOM group for which a list of IDs is requested
12235             """
12236             # Example: see GEOM_TestOthers.py
12237             ListIDs = self.GroupOp.GetObjects(theGroup)
12238             RaiseIfFailed("GetObjects", self.GroupOp)
12239             return ListIDs
12240
12241         ## Returns a type of sub-objects stored in the group
12242         #  @param theGroup is a GEOM group which type is returned.
12243         #
12244         #  @ref swig_GetType "Example"
12245         @ManageTransactions("GroupOp")
12246         def GetType(self,theGroup):
12247             """
12248             Returns a type of sub-objects stored in the group
12249
12250             Parameters:
12251                 theGroup is a GEOM group which type is returned.
12252             """
12253             # Example: see GEOM_TestOthers.py
12254             aType = self.GroupOp.GetType(theGroup)
12255             RaiseIfFailed("GetType", self.GroupOp)
12256             return aType
12257
12258         ## Convert a type of geom object from id to string value
12259         #  @param theId is a GEOM obect type id.
12260         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12261         #  @ref swig_GetType "Example"
12262         def ShapeIdToType(self, theId):
12263             """
12264             Convert a type of geom object from id to string value
12265
12266             Parameters:
12267                 theId is a GEOM obect type id.
12268
12269             Returns:
12270                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12271             """
12272             if theId == 0:
12273                 return "COPY"
12274             if theId == 1:
12275                 return "IMPORT"
12276             if theId == 2:
12277                 return "POINT"
12278             if theId == 3:
12279                 return "VECTOR"
12280             if theId == 4:
12281                 return "PLANE"
12282             if theId == 5:
12283                 return "LINE"
12284             if theId == 6:
12285                 return "TORUS"
12286             if theId == 7:
12287                 return "BOX"
12288             if theId == 8:
12289                 return "CYLINDER"
12290             if theId == 9:
12291                 return "CONE"
12292             if theId == 10:
12293                 return "SPHERE"
12294             if theId == 11:
12295                 return "PRISM"
12296             if theId == 12:
12297                 return "REVOLUTION"
12298             if theId == 13:
12299                 return "BOOLEAN"
12300             if theId == 14:
12301                 return "PARTITION"
12302             if theId == 15:
12303                 return "POLYLINE"
12304             if theId == 16:
12305                 return "CIRCLE"
12306             if theId == 17:
12307                 return "SPLINE"
12308             if theId == 18:
12309                 return "ELLIPSE"
12310             if theId == 19:
12311                 return "CIRC_ARC"
12312             if theId == 20:
12313                 return "FILLET"
12314             if theId == 21:
12315                 return "CHAMFER"
12316             if theId == 22:
12317                 return "EDGE"
12318             if theId == 23:
12319                 return "WIRE"
12320             if theId == 24:
12321                 return "FACE"
12322             if theId == 25:
12323                 return "SHELL"
12324             if theId == 26:
12325                 return "SOLID"
12326             if theId == 27:
12327                 return "COMPOUND"
12328             if theId == 28:
12329                 return "SUBSHAPE"
12330             if theId == 29:
12331                 return "PIPE"
12332             if theId == 30:
12333                 return "ARCHIMEDE"
12334             if theId == 31:
12335                 return "FILLING"
12336             if theId == 32:
12337                 return "EXPLODE"
12338             if theId == 33:
12339                 return "GLUED"
12340             if theId == 34:
12341                 return "SKETCHER"
12342             if theId == 35:
12343                 return "CDG"
12344             if theId == 36:
12345                 return "FREE_BOUNDS"
12346             if theId == 37:
12347                 return "GROUP"
12348             if theId == 38:
12349                 return "BLOCK"
12350             if theId == 39:
12351                 return "MARKER"
12352             if theId == 40:
12353                 return "THRUSECTIONS"
12354             if theId == 41:
12355                 return "COMPOUNDFILTER"
12356             if theId == 42:
12357                 return "SHAPES_ON_SHAPE"
12358             if theId == 43:
12359                 return "ELLIPSE_ARC"
12360             if theId == 44:
12361                 return "3DSKETCHER"
12362             if theId == 45:
12363                 return "FILLET_2D"
12364             if theId == 46:
12365                 return "FILLET_1D"
12366             if theId == 201:
12367                 return "PIPETSHAPE"
12368             return "Shape Id not exist."
12369
12370         ## Returns a main shape associated with the group
12371         #  @param theGroup is a GEOM group for which a main shape object is requested
12372         #  @return a GEOM object which is a main shape for theGroup
12373         #
12374         #  @ref swig_GetMainShape "Example"
12375         @ManageTransactions("GroupOp")
12376         def GetMainShape(self,theGroup):
12377             """
12378             Returns a main shape associated with the group
12379
12380             Parameters:
12381                 theGroup is a GEOM group for which a main shape object is requested
12382
12383             Returns:
12384                 a GEOM object which is a main shape for theGroup
12385
12386             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12387             """
12388             # Example: see GEOM_TestOthers.py
12389             anObj = self.GroupOp.GetMainShape(theGroup)
12390             RaiseIfFailed("GetMainShape", self.GroupOp)
12391             return anObj
12392
12393         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12394         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12395         #  @param theShape given shape (see GEOM.GEOM_Object)
12396         #  @param min_length minimum length of edges of theShape
12397         #  @param max_length maximum length of edges of theShape
12398         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12399         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12400         #  @param theName Object name; when specified, this parameter is used
12401         #         for result publication in the study. Otherwise, if automatic
12402         #         publication is switched on, default value is used for result name.
12403         #
12404         #  @return a newly created GEOM group of edges
12405         #
12406         #  @@ref swig_todo "Example"
12407         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12408             """
12409             Create group of edges of theShape, whose length is in range [min_length, max_length].
12410             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12411
12412             Parameters:
12413                 theShape given shape
12414                 min_length minimum length of edges of theShape
12415                 max_length maximum length of edges of theShape
12416                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12417                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12418                 theName Object name; when specified, this parameter is used
12419                         for result publication in the study. Otherwise, if automatic
12420                         publication is switched on, default value is used for result name.
12421
12422              Returns:
12423                 a newly created GEOM group of edges.
12424             """
12425             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12426             edges_in_range = []
12427             for edge in edges:
12428                 Props = self.BasicProperties(edge)
12429                 if min_length <= Props[0] and Props[0] <= max_length:
12430                     if (not include_min) and (min_length == Props[0]):
12431                         skip = 1
12432                     else:
12433                         if (not include_max) and (Props[0] == max_length):
12434                             skip = 1
12435                         else:
12436                             edges_in_range.append(edge)
12437
12438             if len(edges_in_range) <= 0:
12439                 print "No edges found by given criteria"
12440                 return None
12441
12442             # note: auto-publishing is done in self.CreateGroup()
12443             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12444             self.UnionList(group_edges, edges_in_range)
12445
12446             return group_edges
12447
12448         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12449         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12450         #  @param min_length minimum length of edges of selected shape
12451         #  @param max_length maximum length of edges of selected shape
12452         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12453         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12454         #  @return a newly created GEOM group of edges
12455         #  @ref swig_todo "Example"
12456         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12457             """
12458             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12459             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12460
12461             Parameters:
12462                 min_length minimum length of edges of selected shape
12463                 max_length maximum length of edges of selected shape
12464                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12465                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12466
12467              Returns:
12468                 a newly created GEOM group of edges.
12469             """
12470             nb_selected = sg.SelectedCount()
12471             if nb_selected < 1:
12472                 print "Select a shape before calling this function, please."
12473                 return 0
12474             if nb_selected > 1:
12475                 print "Only one shape must be selected"
12476                 return 0
12477
12478             id_shape = sg.getSelected(0)
12479             shape = IDToObject( id_shape )
12480
12481             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12482
12483             left_str  = " < "
12484             right_str = " < "
12485             if include_min: left_str  = " <= "
12486             if include_max: right_str  = " <= "
12487
12488             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12489                                     + left_str + "length" + right_str + `max_length`)
12490
12491             sg.updateObjBrowser(1)
12492
12493             return group_edges
12494
12495         # end of l3_groups
12496         ## @}
12497
12498         #@@ insert new functions before this line @@ do not remove this line @@#
12499
12500         ## Create a copy of the given object
12501         #
12502         #  @param theOriginal geometry object for copy
12503         #  @param theName Object name; when specified, this parameter is used
12504         #         for result publication in the study. Otherwise, if automatic
12505         #         publication is switched on, default value is used for result name.
12506         #
12507         #  @return New GEOM_Object, containing the copied shape.
12508         #
12509         #  @ingroup l1_geomBuilder_auxiliary
12510         #  @ref swig_MakeCopy "Example"
12511         @ManageTransactions("InsertOp")
12512         def MakeCopy(self, theOriginal, theName=None):
12513             """
12514             Create a copy of the given object
12515
12516             Parameters:
12517                 theOriginal geometry object for copy
12518                 theName Object name; when specified, this parameter is used
12519                         for result publication in the study. Otherwise, if automatic
12520                         publication is switched on, default value is used for result name.
12521
12522             Returns:
12523                 New GEOM_Object, containing the copied shape.
12524
12525             Example of usage: Copy = geompy.MakeCopy(Box)
12526             """
12527             # Example: see GEOM_TestAll.py
12528             anObj = self.InsertOp.MakeCopy(theOriginal)
12529             RaiseIfFailed("MakeCopy", self.InsertOp)
12530             self._autoPublish(anObj, theName, "copy")
12531             return anObj
12532
12533         ## Add Path to load python scripts from
12534         #  @param Path a path to load python scripts from
12535         #  @ingroup l1_geomBuilder_auxiliary
12536         def addPath(self,Path):
12537             """
12538             Add Path to load python scripts from
12539
12540             Parameters:
12541                 Path a path to load python scripts from
12542             """
12543             if (sys.path.count(Path) < 1):
12544                 sys.path.append(Path)
12545                 pass
12546             pass
12547
12548         ## Load marker texture from the file
12549         #  @param Path a path to the texture file
12550         #  @return unique texture identifier
12551         #  @ingroup l1_geomBuilder_auxiliary
12552         @ManageTransactions("InsertOp")
12553         def LoadTexture(self, Path):
12554             """
12555             Load marker texture from the file
12556
12557             Parameters:
12558                 Path a path to the texture file
12559
12560             Returns:
12561                 unique texture identifier
12562             """
12563             # Example: see GEOM_TestAll.py
12564             ID = self.InsertOp.LoadTexture(Path)
12565             RaiseIfFailed("LoadTexture", self.InsertOp)
12566             return ID
12567
12568         ## Get internal name of the object based on its study entry
12569         #  @note This method does not provide an unique identifier of the geometry object.
12570         #  @note This is internal function of GEOM component, though it can be used outside it for
12571         #  appropriate reason (e.g. for identification of geometry object).
12572         #  @param obj geometry object
12573         #  @return unique object identifier
12574         #  @ingroup l1_geomBuilder_auxiliary
12575         def getObjectID(self, obj):
12576             """
12577             Get internal name of the object based on its study entry.
12578             Note: this method does not provide an unique identifier of the geometry object.
12579             It is an internal function of GEOM component, though it can be used outside GEOM for
12580             appropriate reason (e.g. for identification of geometry object).
12581
12582             Parameters:
12583                 obj geometry object
12584
12585             Returns:
12586                 unique object identifier
12587             """
12588             ID = ""
12589             entry = salome.ObjectToID(obj)
12590             if entry is not None:
12591                 lst = entry.split(":")
12592                 if len(lst) > 0:
12593                     ID = lst[-1] # -1 means last item in the list
12594                     return "GEOM_" + ID
12595             return ID
12596
12597
12598
12599         ## Add marker texture. @a Width and @a Height parameters
12600         #  specify width and height of the texture in pixels.
12601         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12602         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12603         #  parameter should be unpacked string, in which '1' symbols represent opaque
12604         #  pixels and '0' represent transparent pixels of the texture bitmap.
12605         #
12606         #  @param Width texture width in pixels
12607         #  @param Height texture height in pixels
12608         #  @param Texture texture data
12609         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12610         #  @return unique texture identifier
12611         #  @ingroup l1_geomBuilder_auxiliary
12612         @ManageTransactions("InsertOp")
12613         def AddTexture(self, Width, Height, Texture, RowData=False):
12614             """
12615             Add marker texture. Width and Height parameters
12616             specify width and height of the texture in pixels.
12617             If RowData is True, Texture parameter should represent texture data
12618             packed into the byte array. If RowData is False (default), Texture
12619             parameter should be unpacked string, in which '1' symbols represent opaque
12620             pixels and '0' represent transparent pixels of the texture bitmap.
12621
12622             Parameters:
12623                 Width texture width in pixels
12624                 Height texture height in pixels
12625                 Texture texture data
12626                 RowData if True, Texture data are packed in the byte stream
12627
12628             Returns:
12629                 return unique texture identifier
12630             """
12631             if not RowData: Texture = PackData(Texture)
12632             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12633             RaiseIfFailed("AddTexture", self.InsertOp)
12634             return ID
12635
12636         ## Creates a new folder object. It is a container for any GEOM objects.
12637         #  @param Name name of the container
12638         #  @param Father parent object. If None,
12639         #         folder under 'Geometry' root object will be created.
12640         #  @return a new created folder
12641         #  @ingroup l1_publish_data
12642         def NewFolder(self, Name, Father=None):
12643             """
12644             Create a new folder object. It is an auxiliary container for any GEOM objects.
12645
12646             Parameters:
12647                 Name name of the container
12648                 Father parent object. If None,
12649                 folder under 'Geometry' root object will be created.
12650
12651             Returns:
12652                 a new created folder
12653             """
12654             if not Father: Father = self.father
12655             return self.CreateFolder(Name, Father)
12656
12657         ## Move object to the specified folder
12658         #  @param Object object to move
12659         #  @param Folder target folder
12660         #  @ingroup l1_publish_data
12661         def PutToFolder(self, Object, Folder):
12662             """
12663             Move object to the specified folder
12664
12665             Parameters:
12666                 Object object to move
12667                 Folder target folder
12668             """
12669             self.MoveToFolder(Object, Folder)
12670             pass
12671
12672         ## Move list of objects to the specified folder
12673         #  @param ListOfSO list of objects to move
12674         #  @param Folder target folder
12675         #  @ingroup l1_publish_data
12676         def PutListToFolder(self, ListOfSO, Folder):
12677             """
12678             Move list of objects to the specified folder
12679
12680             Parameters:
12681                 ListOfSO list of objects to move
12682                 Folder target folder
12683             """
12684             self.MoveListToFolder(ListOfSO, Folder)
12685             pass
12686
12687         ## @addtogroup l2_field
12688         ## @{
12689
12690         ## Creates a field
12691         #  @param shape the shape the field lies on
12692         #  @param name the field name
12693         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12694         #  @param dimension dimension of the shape the field lies on
12695         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12696         #  @param componentNames names of components
12697         #  @return a created field
12698         @ManageTransactions("FieldOp")
12699         def CreateField(self, shape, name, type, dimension, componentNames):
12700             """
12701             Creates a field
12702
12703             Parameters:
12704                 shape the shape the field lies on
12705                 name  the field name
12706                 type  type of field data
12707                 dimension dimension of the shape the field lies on
12708                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12709                 componentNames names of components
12710
12711             Returns:
12712                 a created field
12713             """
12714             if isinstance( type, int ):
12715                 if type < 0 or type > 3:
12716                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12717                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12718
12719             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12720             RaiseIfFailed("CreateField", self.FieldOp)
12721             global geom
12722             geom._autoPublish( f, "", name)
12723             return f
12724
12725         ## Removes a field from the GEOM component
12726         #  @param field the field to remove
12727         def RemoveField(self, field):
12728             "Removes a field from the GEOM component"
12729             global geom
12730             if isinstance( field, GEOM._objref_GEOM_Field ):
12731                 geom.RemoveObject( field )
12732             elif isinstance( field, geomField ):
12733                 geom.RemoveObject( field.field )
12734             else:
12735                 raise RuntimeError, "RemoveField() : the object is not a field"
12736             return
12737
12738         ## Returns number of fields on a shape
12739         @ManageTransactions("FieldOp")
12740         def CountFields(self, shape):
12741             "Returns number of fields on a shape"
12742             nb = self.FieldOp.CountFields( shape )
12743             RaiseIfFailed("CountFields", self.FieldOp)
12744             return nb
12745
12746         ## Returns all fields on a shape
12747         @ManageTransactions("FieldOp")
12748         def GetFields(self, shape):
12749             "Returns all fields on a shape"
12750             ff = self.FieldOp.GetFields( shape )
12751             RaiseIfFailed("GetFields", self.FieldOp)
12752             return ff
12753
12754         ## Returns a field on a shape by its name
12755         @ManageTransactions("FieldOp")
12756         def GetField(self, shape, name):
12757             "Returns a field on a shape by its name"
12758             f = self.FieldOp.GetField( shape, name )
12759             RaiseIfFailed("GetField", self.FieldOp)
12760             return f
12761
12762         # end of l2_field
12763         ## @}
12764
12765
12766 import omniORB
12767 # Register the new proxy for GEOM_Gen
12768 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12769
12770
12771 ## Field on Geometry
12772 #  @ingroup l2_field
12773 class geomField( GEOM._objref_GEOM_Field ):
12774
12775     def __init__(self):
12776         GEOM._objref_GEOM_Field.__init__(self)
12777         self.field = GEOM._objref_GEOM_Field
12778         return
12779
12780     ## Returns the shape the field lies on
12781     def getShape(self):
12782         "Returns the shape the field lies on"
12783         return self.field.GetShape(self)
12784
12785     ## Returns the field name
12786     def getName(self):
12787         "Returns the field name"
12788         return self.field.GetName(self)
12789
12790     ## Returns type of field data as integer [0-3]
12791     def getType(self):
12792         "Returns type of field data"
12793         return self.field.GetDataType(self)._v
12794
12795     ## Returns type of field data:
12796     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12797     def getTypeEnum(self):
12798         "Returns type of field data"
12799         return self.field.GetDataType(self)
12800
12801     ## Returns dimension of the shape the field lies on:
12802     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12803     def getDimension(self):
12804         """Returns dimension of the shape the field lies on:
12805         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
12806         return self.field.GetDimension(self)
12807
12808     ## Returns names of components
12809     def getComponents(self):
12810         "Returns names of components"
12811         return self.field.GetComponents(self)
12812
12813     ## Adds a time step to the field
12814     #  @param step the time step number further used as the step identifier
12815     #  @param stamp the time step time
12816     #  @param values the values of the time step
12817     def addStep(self, step, stamp, values):
12818         "Adds a time step to the field"
12819         stp = self.field.AddStep( self, step, stamp )
12820         if not stp:
12821             raise RuntimeError, \
12822                   "Field.addStep() : Error: step %s already exists in this field"%step
12823         global geom
12824         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
12825         self.setValues( step, values )
12826         return stp
12827
12828     ## Remove a time step from the field
12829     def removeStep(self,step):
12830         "Remove a time step from the field"
12831         stepSO = None
12832         try:
12833             stepObj = self.field.GetStep( self, step )
12834             if stepObj:
12835                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
12836         except:
12837             #import traceback
12838             #traceback.print_exc()
12839             pass
12840         self.field.RemoveStep( self, step )
12841         if stepSO:
12842             geom.myBuilder.RemoveObjectWithChildren( stepSO )
12843         return
12844
12845     ## Returns number of time steps in the field
12846     def countSteps(self):
12847         "Returns number of time steps in the field"
12848         return self.field.CountSteps(self)
12849
12850     ## Returns a list of time step IDs in the field
12851     def getSteps(self):
12852         "Returns a list of time step IDs in the field"
12853         return self.field.GetSteps(self)
12854
12855     ## Returns a time step by its ID
12856     def getStep(self,step):
12857         "Returns a time step by its ID"
12858         stp = self.field.GetStep(self, step)
12859         if not stp:
12860             raise RuntimeError, "Step %s is missing from this field"%step
12861         return stp
12862
12863     ## Returns the time of the field step
12864     def getStamp(self,step):
12865         "Returns the time of the field step"
12866         return self.getStep(step).GetStamp()
12867
12868     ## Changes the time of the field step
12869     def setStamp(self, step, stamp):
12870         "Changes the time of the field step"
12871         return self.getStep(step).SetStamp(stamp)
12872
12873     ## Returns values of the field step
12874     def getValues(self, step):
12875         "Returns values of the field step"
12876         return self.getStep(step).GetValues()
12877
12878     ## Changes values of the field step
12879     def setValues(self, step, values):
12880         "Changes values of the field step"
12881         stp = self.getStep(step)
12882         errBeg = "Field.setValues(values) : Error: "
12883         try:
12884             ok = stp.SetValues( values )
12885         except Exception, e:
12886             excStr = str(e)
12887             if excStr.find("WrongPythonType") > 0:
12888                 raise RuntimeError, errBeg +\
12889                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
12890             raise RuntimeError, errBeg + str(e)
12891         if not ok:
12892             nbOK = self.field.GetArraySize(self)
12893             nbKO = len(values)
12894             if nbOK != nbKO:
12895                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
12896             else:
12897                 raise RuntimeError, errBeg + "failed"
12898         return
12899
12900     pass # end of class geomField
12901
12902 # Register the new proxy for GEOM_Field
12903 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
12904
12905
12906 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12907 #  interface to GEOM operations.
12908 #
12909 #  Typical use is:
12910 #  \code
12911 #    import salome
12912 #    salome.salome_init()
12913 #    from salome.geom import geomBuilder
12914 #    geompy = geomBuilder.New(salome.myStudy)
12915 #  \endcode
12916 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12917 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12918 #  @return geomBuilder instance
12919 def New( study, instance=None):
12920     """
12921     Create a new geomBuilder instance.The geomBuilder class provides the Python
12922     interface to GEOM operations.
12923
12924     Typical use is:
12925         import salome
12926         salome.salome_init()
12927         from salome.geom import geomBuilder
12928         geompy = geomBuilder.New(salome.myStudy)
12929
12930     Parameters:
12931         study     SALOME study, generally obtained by salome.myStudy.
12932         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12933     Returns:
12934         geomBuilder instance
12935     """
12936     #print "New geomBuilder ", study, instance
12937     global engine
12938     global geom
12939     global doLcc
12940     engine = instance
12941     if engine is None:
12942       doLcc = True
12943     geom = geomBuilder()
12944     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12945     geom.init_geom(study)
12946     return geom
12947
12948
12949 # Register methods from the plug-ins in the geomBuilder class 
12950 plugins_var = os.environ.get( "GEOM_PluginsList" )
12951
12952 plugins = None
12953 if plugins_var is not None:
12954     plugins = plugins_var.split( ":" )
12955     plugins=filter(lambda x: len(x)>0, plugins)
12956 if plugins is not None:
12957     for pluginName in plugins:
12958         pluginBuilderName = pluginName + "Builder"
12959         try:
12960             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
12961         except Exception, e:
12962             from salome_utils import verbose
12963             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
12964             continue
12965         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
12966         plugin = eval( pluginBuilderName )
12967         
12968         # add methods from plugin module to the geomBuilder class
12969         for k in dir( plugin ):
12970             if k[0] == '_': continue
12971             method = getattr( plugin, k )
12972             if type( method ).__name__ == 'function':
12973                 if not hasattr( geomBuilder, k ):
12974                     setattr( geomBuilder, k, method )
12975                 pass
12976             pass
12977         del pluginName
12978         pass
12979     pass