Salome HOME
Regression of SALOME_TESTS/Grids/geom/imps_07/H9
[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 ## Information about closed/unclosed state of shell or wire
521 #  @ingroup l1_geomBuilder_auxiliary
522 class info:
523     """
524     Information about closed/unclosed state of shell or wire
525     """
526     UNKNOWN  = 0
527     CLOSED   = 1
528     UNCLOSED = 2
529
530 ## Private class used to bind calls of plugin operations to geomBuilder
531 class PluginOperation:
532   def __init__(self, operation, function):
533     self.operation = operation
534     self.function = function
535     pass
536
537   @ManageTransactions("operation")
538   def __call__(self, *args):
539     res = self.function(self.operation, *args)
540     RaiseIfFailed(self.function.__name__, self.operation)
541     return res
542
543 # Warning: geom is a singleton
544 geom = None
545 engine = None
546 doLcc = False
547 created = False
548
549 class geomBuilder(object, GEOM._objref_GEOM_Gen):
550
551         ## Enumeration ShapeType as a dictionary. \n
552         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
553         #  @ingroup l1_geomBuilder_auxiliary
554         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
555
556         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
557         #  and a list of parameters, describing the shape.
558         #  List of parameters, describing the shape:
559         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
560         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
561         #
562         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
563         #
564         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
565         #
566         #  - SPHERE:       [xc yc zc            R]
567         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
568         #  - BOX:          [xc yc zc                      ax ay az]
569         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
570         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
571         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
572         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
573         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
574         #
575         #  - SPHERE2D:     [xc yc zc            R]
576         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
577         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
578         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
579         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
580         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
581         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
582         #  - PLANE:        [xo yo zo  dx dy dz]
583         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
584         #  - FACE:                                       [nb_edges  nb_vertices]
585         #
586         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
587         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
588         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
589         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
590         #  - LINE:         [xo yo zo  dx dy dz]
591         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
592         #  - EDGE:                                                 [nb_vertices]
593         #
594         #  - VERTEX:       [x  y  z]
595         #  @ingroup l1_geomBuilder_auxiliary
596         kind = GEOM.GEOM_IKindOfShape
597
598         def __new__(cls):
599             global engine
600             global geom
601             global doLcc
602             global created
603             #print "==== __new__ ", engine, geom, doLcc, created
604             if geom is None:
605                 # geom engine is either retrieved from engine, or created
606                 geom = engine
607                 # Following test avoids a recursive loop
608                 if doLcc:
609                     if geom is not None:
610                         # geom engine not created: existing engine found
611                         doLcc = False
612                     if doLcc and not created:
613                         doLcc = False
614                         # FindOrLoadComponent called:
615                         # 1. CORBA resolution of server
616                         # 2. the __new__ method is called again
617                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
618                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
619                         #print "====1 ",geom
620                 else:
621                     # FindOrLoadComponent not called
622                     if geom is None:
623                         # geomBuilder instance is created from lcc.FindOrLoadComponent
624                         #print "==== super ", engine, geom, doLcc, created
625                         geom = super(geomBuilder,cls).__new__(cls)
626                         #print "====2 ",geom
627                     else:
628                         # geom engine not created: existing engine found
629                         #print "==== existing ", engine, geom, doLcc, created
630                         pass
631                 #print "return geom 1 ", geom
632                 return geom
633
634             #print "return geom 2 ", geom
635             return geom
636
637         def __init__(self):
638             global created
639             #print "-------- geomBuilder __init__ --- ", created, self
640             if not created:
641               created = True
642               GEOM._objref_GEOM_Gen.__init__(self)
643               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
644               self.myBuilder = None
645               self.myStudyId = 0
646               self.father    = None
647
648               self.BasicOp  = None
649               self.CurvesOp = None
650               self.PrimOp   = None
651               self.ShapesOp = None
652               self.HealOp   = None
653               self.InsertOp = None
654               self.BoolOp   = None
655               self.TrsfOp   = None
656               self.LocalOp  = None
657               self.MeasuOp  = None
658               self.BlocksOp = None
659               self.GroupOp  = None
660               self.FieldOp  = None
661             pass
662
663         ## Process object publication in the study, as follows:
664         #  - if @a theName is specified (not None), the object is published in the study
665         #    with this name, not taking into account "auto-publishing" option;
666         #  - if @a theName is NOT specified, the object is published in the study
667         #    (using default name, which can be customized using @a theDefaultName parameter)
668         #    only if auto-publishing is switched on.
669         #
670         #  @param theObj  object, a subject for publishing
671         #  @param theName object name for study
672         #  @param theDefaultName default name for the auto-publishing
673         #
674         #  @sa addToStudyAuto()
675         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
676             # ---
677             def _item_name(_names, _defname, _idx=-1):
678                 if not _names: _names = _defname
679                 if type(_names) in [types.ListType, types.TupleType]:
680                     if _idx >= 0:
681                         if _idx >= len(_names) or not _names[_idx]:
682                             if type(_defname) not in [types.ListType, types.TupleType]:
683                                 _name = "%s_%d"%(_defname, _idx+1)
684                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
685                                 _name = _defname[_idx]
686                             else:
687                                 _name = "%noname_%d"%(dn, _idx+1)
688                             pass
689                         else:
690                             _name = _names[_idx]
691                         pass
692                     else:
693                         # must be wrong  usage
694                         _name = _names[0]
695                     pass
696                 else:
697                     if _idx >= 0:
698                         _name = "%s_%d"%(_names, _idx+1)
699                     else:
700                         _name = _names
701                     pass
702                 return _name
703             # ---
704             def _publish( _name, _obj ):
705                 fatherObj = None
706                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
707                     fatherObj = _obj.GetShape()
708                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
709                     fatherObj = _obj.GetField()
710                 elif not _obj.IsMainShape():
711                     fatherObj = _obj.GetMainShape()
712                     pass
713                 if fatherObj and fatherObj.GetStudyEntry():
714                     self.addToStudyInFather(fatherObj, _obj, _name)
715                 else:
716                     self.addToStudy(_obj, _name)
717                     pass
718                 return
719             # ---
720             if not theObj:
721                 return # null object
722             if not theName and not self.myMaxNbSubShapesAllowed:
723                 return # nothing to do: auto-publishing is disabled
724             if not theName and not theDefaultName:
725                 return # neither theName nor theDefaultName is given
726             import types
727             if type(theObj) in [types.ListType, types.TupleType]:
728                 # list of objects is being published
729                 idx = 0
730                 for obj in theObj:
731                     if not obj: continue # bad object
732                     name = _item_name(theName, theDefaultName, idx)
733                     _publish( name, obj )
734                     idx = idx+1
735                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
736                     pass
737                 pass
738             else:
739                 # single object is published
740                 name = _item_name(theName, theDefaultName)
741                 _publish( name, theObj )
742             pass
743
744         ## @addtogroup l1_geomBuilder_auxiliary
745         ## @{
746         def init_geom(self,theStudy):
747             self.myStudy = theStudy
748             self.myStudyId = self.myStudy._get_StudyId()
749             self.myBuilder = self.myStudy.NewBuilder()
750             self.father = self.myStudy.FindComponent("GEOM")
751             notebook.myStudy = theStudy
752             if self.father is None:
753                 self.father = self.myBuilder.NewComponent("GEOM")
754                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
755                 FName = A1._narrow(SALOMEDS.AttributeName)
756                 FName.SetValue("Geometry")
757                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
758                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
759                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
760                 self.myBuilder.DefineComponentInstance(self.father,self)
761                 pass
762             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
763             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
764             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
765             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
766             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
767             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
768             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
769             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
770             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
771             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
772             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
773             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
774             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
775
776             # set GEOM as root in the use case tree
777             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
778             self.myUseCaseBuilder.SetRootCurrent()
779             self.myUseCaseBuilder.Append(self.father)
780             pass
781
782         def GetPluginOperations(self, studyID, libraryName):
783             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
784             return op
785
786         ## Enable / disable results auto-publishing
787         #
788         #  The automatic publishing is managed in the following way:
789         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
790         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
791         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
792         #  value passed as parameter has the same effect.
793         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
794         #  maximum number of sub-shapes allowed for publishing is set to specified value.
795         #
796         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
797         #  @ingroup l1_publish_data
798         def addToStudyAuto(self, maxNbSubShapes=-1):
799             """
800             Enable / disable results auto-publishing
801
802             The automatic publishing is managed in the following way:
803             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
804             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
805             maximum number of sub-shapes allowed for publishing is unlimited; any negative
806             value passed as parameter has the same effect.
807             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
808             maximum number of sub-shapes allowed for publishing is set to this value.
809
810             Parameters:
811                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
812
813             Example of usage:
814                 geompy.addToStudyAuto()   # enable auto-publishing
815                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
816                 geompy.addToStudyAuto(0)  # disable auto-publishing
817             """
818             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
819             pass
820
821         ## Dump component to the Python script
822         #  This method overrides IDL function to allow default values for the parameters.
823         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
824             """
825             Dump component to the Python script
826             This method overrides IDL function to allow default values for the parameters.
827             """
828             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
829
830         ## Get name for sub-shape aSubObj of shape aMainObj
831         #
832         # @ref swig_SubShapeName "Example"
833         @ManageTransactions("ShapesOp")
834         def SubShapeName(self,aSubObj, aMainObj):
835             """
836             Get name for sub-shape aSubObj of shape aMainObj
837             """
838             # Example: see GEOM_TestAll.py
839
840             #aSubId  = orb.object_to_string(aSubObj)
841             #aMainId = orb.object_to_string(aMainObj)
842             #index = gg.getIndexTopology(aSubId, aMainId)
843             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
844             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
845             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
846             return name
847
848         ## Publish in study aShape with name aName
849         #
850         #  \param aShape the shape to be published
851         #  \param aName  the name for the shape
852         #  \param doRestoreSubShapes if True, finds and publishes also
853         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
854         #         and published sub-shapes of arguments
855         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
856         #                                                  these arguments description
857         #  \return study entry of the published shape in form of string
858         #
859         #  @ingroup l1_publish_data
860         #  @ref swig_all_addtostudy "Example"
861         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
862                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
863             """
864             Publish in study aShape with name aName
865
866             Parameters:
867                 aShape the shape to be published
868                 aName  the name for the shape
869                 doRestoreSubShapes if True, finds and publishes also
870                                    sub-shapes of aShape, corresponding to its arguments
871                                    and published sub-shapes of arguments
872                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
873                                                          these arguments description
874
875             Returns:
876                 study entry of the published shape in form of string
877
878             Example of usage:
879                 id_block1 = geompy.addToStudy(Block1, "Block 1")
880             """
881             # Example: see GEOM_TestAll.py
882             try:
883                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
884                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
885                 if doRestoreSubShapes:
886                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
887                                             theFindMethod, theInheritFirstArg, True )
888             except:
889                 print "addToStudy() failed"
890                 return ""
891             return aShape.GetStudyEntry()
892
893         ## Publish in study aShape with name aName as sub-object of previously published aFather
894         #  \param aFather previously published object
895         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
896         #  \param aName  the name for the shape
897         #
898         #  \return study entry of the published shape in form of string
899         #
900         #  @ingroup l1_publish_data
901         #  @ref swig_all_addtostudyInFather "Example"
902         def addToStudyInFather(self, aFather, aShape, aName):
903             """
904             Publish in study aShape with name aName as sub-object of previously published aFather
905
906             Parameters:
907                 aFather previously published object
908                 aShape the shape to be published as sub-object of aFather
909                 aName  the name for the shape
910
911             Returns:
912                 study entry of the published shape in form of string
913             """
914             # Example: see GEOM_TestAll.py
915             try:
916                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
917                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
918             except:
919                 print "addToStudyInFather() failed"
920                 return ""
921             return aShape.GetStudyEntry()
922
923         ## Unpublish object in study
924         #
925         #  \param obj the object to be unpublished
926         def hideInStudy(self, obj):
927             """
928             Unpublish object in study
929
930             Parameters:
931                 obj the object to be unpublished
932             """
933             ior = salome.orb.object_to_string(obj)
934             aSObject = self.myStudy.FindObjectIOR(ior)
935             if aSObject is not None:
936                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
937                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
938                 drwAttribute.SetDrawable(False)
939                 # hide references if any
940                 vso = self.myStudy.FindDependances(aSObject);
941                 for refObj in vso :
942                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
943                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
944                     drwAttribute.SetDrawable(False)
945                     pass
946                 pass
947
948         # end of l1_geomBuilder_auxiliary
949         ## @}
950
951         ## @addtogroup l3_restore_ss
952         ## @{
953
954         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
955         #  To be used from python scripts out of addToStudy() (non-default usage)
956         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
957         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
958         #                   If this list is empty, all operation arguments will be published
959         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
960         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
961         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
962         #                            Do not publish sub-shapes in place of arguments, but only
963         #                            in place of sub-shapes of the first argument,
964         #                            because the whole shape corresponds to the first argument.
965         #                            Mainly to be used after transformations, but it also can be
966         #                            usefull after partition with one object shape, and some other
967         #                            operations, where only the first argument has to be considered.
968         #                            If theObject has only one argument shape, this flag is automatically
969         #                            considered as True, not regarding really passed value.
970         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
971         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
972         #  \return list of published sub-shapes
973         #
974         #  @ref tui_restore_prs_params "Example"
975         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
976                               theInheritFirstArg=False, theAddPrefix=True):
977             """
978             Publish sub-shapes, standing for arguments and sub-shapes of arguments
979             To be used from python scripts out of geompy.addToStudy (non-default usage)
980
981             Parameters:
982                 theObject published GEOM.GEOM_Object, arguments of which will be published
983                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
984                           If this list is empty, all operation arguments will be published
985                 theFindMethod method to search sub-shapes, corresponding to arguments and
986                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
987                 theInheritFirstArg set properties of the first argument for theObject.
988                                    Do not publish sub-shapes in place of arguments, but only
989                                    in place of sub-shapes of the first argument,
990                                    because the whole shape corresponds to the first argument.
991                                    Mainly to be used after transformations, but it also can be
992                                    usefull after partition with one object shape, and some other
993                                    operations, where only the first argument has to be considered.
994                                    If theObject has only one argument shape, this flag is automatically
995                                    considered as True, not regarding really passed value.
996                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
997                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
998             Returns:
999                 list of published sub-shapes
1000             """
1001             # Example: see GEOM_TestAll.py
1002             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1003                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1004
1005         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1006         #  To be used from python scripts out of addToStudy() (non-default usage)
1007         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1008         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1009         #                   If this list is empty, all operation arguments will be published
1010         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1011         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1012         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1013         #                            Do not publish sub-shapes in place of arguments, but only
1014         #                            in place of sub-shapes of the first argument,
1015         #                            because the whole shape corresponds to the first argument.
1016         #                            Mainly to be used after transformations, but it also can be
1017         #                            usefull after partition with one object shape, and some other
1018         #                            operations, where only the first argument has to be considered.
1019         #                            If theObject has only one argument shape, this flag is automatically
1020         #                            considered as True, not regarding really passed value.
1021         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1022         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1023         #  \return list of published sub-shapes
1024         #
1025         #  @ref tui_restore_prs_params "Example"
1026         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1027                                    theInheritFirstArg=False, theAddPrefix=True):
1028             """
1029             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1030             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1031
1032             Parameters:
1033                 theObject published GEOM.GEOM_Object, arguments of which will be published
1034                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1035                           If this list is empty, all operation arguments will be published
1036                 theFindMethod method to search sub-shapes, corresponding to arguments and
1037                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1038                 theInheritFirstArg set properties of the first argument for theObject.
1039                                    Do not publish sub-shapes in place of arguments, but only
1040                                    in place of sub-shapes of the first argument,
1041                                    because the whole shape corresponds to the first argument.
1042                                    Mainly to be used after transformations, but it also can be
1043                                    usefull after partition with one object shape, and some other
1044                                    operations, where only the first argument has to be considered.
1045                                    If theObject has only one argument shape, this flag is automatically
1046                                    considered as True, not regarding really passed value.
1047                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1048                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1049
1050             Returns:
1051                 list of published sub-shapes
1052             """
1053             # Example: see GEOM_TestAll.py
1054             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1055                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1056
1057         # end of l3_restore_ss
1058         ## @}
1059
1060         ## @addtogroup l3_basic_go
1061         ## @{
1062
1063         ## Create point by three coordinates.
1064         #  @param theX The X coordinate of the point.
1065         #  @param theY The Y coordinate of the point.
1066         #  @param theZ The Z coordinate of the point.
1067         #  @param theName Object name; when specified, this parameter is used
1068         #         for result publication in the study. Otherwise, if automatic
1069         #         publication is switched on, default value is used for result name.
1070         #
1071         #  @return New GEOM.GEOM_Object, containing the created point.
1072         #
1073         #  @ref tui_creation_point "Example"
1074         @ManageTransactions("BasicOp")
1075         def MakeVertex(self, theX, theY, theZ, theName=None):
1076             """
1077             Create point by three coordinates.
1078
1079             Parameters:
1080                 theX The X coordinate of the point.
1081                 theY The Y coordinate of the point.
1082                 theZ The Z coordinate of the point.
1083                 theName Object name; when specified, this parameter is used
1084                         for result publication in the study. Otherwise, if automatic
1085                         publication is switched on, default value is used for result name.
1086
1087             Returns:
1088                 New GEOM.GEOM_Object, containing the created point.
1089             """
1090             # Example: see GEOM_TestAll.py
1091             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1092             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1093             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1094             anObj.SetParameters(Parameters)
1095             self._autoPublish(anObj, theName, "vertex")
1096             return anObj
1097
1098         ## Create a point, distant from the referenced point
1099         #  on the given distances along the coordinate axes.
1100         #  @param theReference The referenced point.
1101         #  @param theX Displacement from the referenced point along OX axis.
1102         #  @param theY Displacement from the referenced point along OY axis.
1103         #  @param theZ Displacement from the referenced point along OZ axis.
1104         #  @param theName Object name; when specified, this parameter is used
1105         #         for result publication in the study. Otherwise, if automatic
1106         #         publication is switched on, default value is used for result name.
1107         #
1108         #  @return New GEOM.GEOM_Object, containing the created point.
1109         #
1110         #  @ref tui_creation_point "Example"
1111         @ManageTransactions("BasicOp")
1112         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1113             """
1114             Create a point, distant from the referenced point
1115             on the given distances along the coordinate axes.
1116
1117             Parameters:
1118                 theReference The referenced point.
1119                 theX Displacement from the referenced point along OX axis.
1120                 theY Displacement from the referenced point along OY axis.
1121                 theZ Displacement from the referenced point along OZ axis.
1122                 theName Object name; when specified, this parameter is used
1123                         for result publication in the study. Otherwise, if automatic
1124                         publication is switched on, default value is used for result name.
1125
1126             Returns:
1127                 New GEOM.GEOM_Object, containing the created point.
1128             """
1129             # Example: see GEOM_TestAll.py
1130             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1131             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1132             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1133             anObj.SetParameters(Parameters)
1134             self._autoPublish(anObj, theName, "vertex")
1135             return anObj
1136
1137         ## Create a point, corresponding to the given parameter on the given curve.
1138         #  @param theRefCurve The referenced curve.
1139         #  @param theParameter Value of parameter on the referenced curve.
1140         #  @param theName Object name; when specified, this parameter is used
1141         #         for result publication in the study. Otherwise, if automatic
1142         #         publication is switched on, default value is used for result name.
1143         #
1144         #  @return New GEOM.GEOM_Object, containing the created point.
1145         #
1146         #  @ref tui_creation_point "Example"
1147         @ManageTransactions("BasicOp")
1148         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1149             """
1150             Create a point, corresponding to the given parameter on the given curve.
1151
1152             Parameters:
1153                 theRefCurve The referenced curve.
1154                 theParameter Value of parameter on the referenced curve.
1155                 theName Object name; when specified, this parameter is used
1156                         for result publication in the study. Otherwise, if automatic
1157                         publication is switched on, default value is used for result name.
1158
1159             Returns:
1160                 New GEOM.GEOM_Object, containing the created point.
1161
1162             Example of usage:
1163                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1164             """
1165             # Example: see GEOM_TestAll.py
1166             theParameter, Parameters = ParseParameters(theParameter)
1167             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1168             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1169             anObj.SetParameters(Parameters)
1170             self._autoPublish(anObj, theName, "vertex")
1171             return anObj
1172
1173         ## Create a point by projection give coordinates on the given curve
1174         #  @param theRefCurve The referenced curve.
1175         #  @param theX X-coordinate in 3D space
1176         #  @param theY Y-coordinate in 3D space
1177         #  @param theZ Z-coordinate in 3D space
1178         #  @param theName Object name; when specified, this parameter is used
1179         #         for result publication in the study. Otherwise, if automatic
1180         #         publication is switched on, default value is used for result name.
1181         #
1182         #  @return New GEOM.GEOM_Object, containing the created point.
1183         #
1184         #  @ref tui_creation_point "Example"
1185         @ManageTransactions("BasicOp")
1186         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1187             """
1188             Create a point by projection give coordinates on the given curve
1189
1190             Parameters:
1191                 theRefCurve The referenced curve.
1192                 theX X-coordinate in 3D space
1193                 theY Y-coordinate in 3D space
1194                 theZ Z-coordinate in 3D space
1195                 theName Object name; when specified, this parameter is used
1196                         for result publication in the study. Otherwise, if automatic
1197                         publication is switched on, default value is used for result name.
1198
1199             Returns:
1200                 New GEOM.GEOM_Object, containing the created point.
1201
1202             Example of usage:
1203                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1204             """
1205             # Example: see GEOM_TestAll.py
1206             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1207             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1208             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1209             anObj.SetParameters(Parameters)
1210             self._autoPublish(anObj, theName, "vertex")
1211             return anObj
1212
1213         ## Create a point, corresponding to the given length on the given curve.
1214         #  @param theRefCurve The referenced curve.
1215         #  @param theLength Length on the referenced curve. It can be negative.
1216         #  @param theStartPoint Point allowing to choose the direction for the calculation
1217         #                       of the length. If None, start from the first point of theRefCurve.
1218         #  @param theName Object name; when specified, this parameter is used
1219         #         for result publication in the study. Otherwise, if automatic
1220         #         publication is switched on, default value is used for result name.
1221         #
1222         #  @return New GEOM.GEOM_Object, containing the created point.
1223         #
1224         #  @ref tui_creation_point "Example"
1225         @ManageTransactions("BasicOp")
1226         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1227             """
1228             Create a point, corresponding to the given length on the given curve.
1229
1230             Parameters:
1231                 theRefCurve The referenced curve.
1232                 theLength Length on the referenced curve. It can be negative.
1233                 theStartPoint Point allowing to choose the direction for the calculation
1234                               of the length. If None, start from the first point of theRefCurve.
1235                 theName Object name; when specified, this parameter is used
1236                         for result publication in the study. Otherwise, if automatic
1237                         publication is switched on, default value is used for result name.
1238
1239             Returns:
1240                 New GEOM.GEOM_Object, containing the created point.
1241             """
1242             # Example: see GEOM_TestAll.py
1243             theLength, Parameters = ParseParameters(theLength)
1244             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1245             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1246             anObj.SetParameters(Parameters)
1247             self._autoPublish(anObj, theName, "vertex")
1248             return anObj
1249
1250         ## Create a point, corresponding to the given parameters on the
1251         #    given surface.
1252         #  @param theRefSurf The referenced surface.
1253         #  @param theUParameter Value of U-parameter on the referenced surface.
1254         #  @param theVParameter Value of V-parameter on the referenced surface.
1255         #  @param theName Object name; when specified, this parameter is used
1256         #         for result publication in the study. Otherwise, if automatic
1257         #         publication is switched on, default value is used for result name.
1258         #
1259         #  @return New GEOM.GEOM_Object, containing the created point.
1260         #
1261         #  @ref swig_MakeVertexOnSurface "Example"
1262         @ManageTransactions("BasicOp")
1263         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1264             """
1265             Create a point, corresponding to the given parameters on the
1266             given surface.
1267
1268             Parameters:
1269                 theRefSurf The referenced surface.
1270                 theUParameter Value of U-parameter on the referenced surface.
1271                 theVParameter Value of V-parameter on the referenced surface.
1272                 theName Object name; when specified, this parameter is used
1273                         for result publication in the study. Otherwise, if automatic
1274                         publication is switched on, default value is used for result name.
1275
1276             Returns:
1277                 New GEOM.GEOM_Object, containing the created point.
1278
1279             Example of usage:
1280                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1281             """
1282             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1283             # Example: see GEOM_TestAll.py
1284             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1285             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1286             anObj.SetParameters(Parameters);
1287             self._autoPublish(anObj, theName, "vertex")
1288             return anObj
1289
1290         ## Create a point by projection give coordinates on the given surface
1291         #  @param theRefSurf The referenced surface.
1292         #  @param theX X-coordinate in 3D space
1293         #  @param theY Y-coordinate in 3D space
1294         #  @param theZ Z-coordinate in 3D space
1295         #  @param theName Object name; when specified, this parameter is used
1296         #         for result publication in the study. Otherwise, if automatic
1297         #         publication is switched on, default value is used for result name.
1298         #
1299         #  @return New GEOM.GEOM_Object, containing the created point.
1300         #
1301         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1302         @ManageTransactions("BasicOp")
1303         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1304             """
1305             Create a point by projection give coordinates on the given surface
1306
1307             Parameters:
1308                 theRefSurf The referenced surface.
1309                 theX X-coordinate in 3D space
1310                 theY Y-coordinate in 3D space
1311                 theZ Z-coordinate in 3D space
1312                 theName Object name; when specified, this parameter is used
1313                         for result publication in the study. Otherwise, if automatic
1314                         publication is switched on, default value is used for result name.
1315
1316             Returns:
1317                 New GEOM.GEOM_Object, containing the created point.
1318
1319             Example of usage:
1320                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1321             """
1322             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1323             # Example: see GEOM_TestAll.py
1324             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1325             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1326             anObj.SetParameters(Parameters);
1327             self._autoPublish(anObj, theName, "vertex")
1328             return anObj
1329
1330         ## Create a point, which lays on the given face.
1331         #  The point will lay in arbitrary place of the face.
1332         #  The only condition on it is a non-zero distance to the face boundary.
1333         #  Such point can be used to uniquely identify the face inside any
1334         #  shape in case, when the shape does not contain overlapped faces.
1335         #  @param theFace The referenced face.
1336         #  @param theName Object name; when specified, this parameter is used
1337         #         for result publication in the study. Otherwise, if automatic
1338         #         publication is switched on, default value is used for result name.
1339         #
1340         #  @return New GEOM.GEOM_Object, containing the created point.
1341         #
1342         #  @ref swig_MakeVertexInsideFace "Example"
1343         @ManageTransactions("BasicOp")
1344         def MakeVertexInsideFace (self, theFace, theName=None):
1345             """
1346             Create a point, which lays on the given face.
1347             The point will lay in arbitrary place of the face.
1348             The only condition on it is a non-zero distance to the face boundary.
1349             Such point can be used to uniquely identify the face inside any
1350             shape in case, when the shape does not contain overlapped faces.
1351
1352             Parameters:
1353                 theFace The referenced face.
1354                 theName Object name; when specified, this parameter is used
1355                         for result publication in the study. Otherwise, if automatic
1356                         publication is switched on, default value is used for result name.
1357
1358             Returns:
1359                 New GEOM.GEOM_Object, containing the created point.
1360
1361             Example of usage:
1362                 p_on_face = geompy.MakeVertexInsideFace(Face)
1363             """
1364             # Example: see GEOM_TestAll.py
1365             anObj = self.BasicOp.MakePointOnFace(theFace)
1366             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1367             self._autoPublish(anObj, theName, "vertex")
1368             return anObj
1369
1370         ## Create a point on intersection of two lines.
1371         #  @param theRefLine1, theRefLine2 The referenced lines.
1372         #  @param theName Object name; when specified, this parameter is used
1373         #         for result publication in the study. Otherwise, if automatic
1374         #         publication is switched on, default value is used for result name.
1375         #
1376         #  @return New GEOM.GEOM_Object, containing the created point.
1377         #
1378         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1379         @ManageTransactions("BasicOp")
1380         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1381             """
1382             Create a point on intersection of two lines.
1383
1384             Parameters:
1385                 theRefLine1, theRefLine2 The referenced lines.
1386                 theName Object name; when specified, this parameter is used
1387                         for result publication in the study. Otherwise, if automatic
1388                         publication is switched on, default value is used for result name.
1389
1390             Returns:
1391                 New GEOM.GEOM_Object, containing the created point.
1392             """
1393             # Example: see GEOM_TestAll.py
1394             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1395             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1396             self._autoPublish(anObj, theName, "vertex")
1397             return anObj
1398
1399         ## Create a tangent, corresponding to the given parameter on the given curve.
1400         #  @param theRefCurve The referenced curve.
1401         #  @param theParameter Value of parameter on the referenced curve.
1402         #  @param theName Object name; when specified, this parameter is used
1403         #         for result publication in the study. Otherwise, if automatic
1404         #         publication is switched on, default value is used for result name.
1405         #
1406         #  @return New GEOM.GEOM_Object, containing the created tangent.
1407         #
1408         #  @ref swig_MakeTangentOnCurve "Example"
1409         @ManageTransactions("BasicOp")
1410         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1411             """
1412             Create a tangent, corresponding to the given parameter on the given curve.
1413
1414             Parameters:
1415                 theRefCurve The referenced curve.
1416                 theParameter Value of parameter on the referenced curve.
1417                 theName Object name; when specified, this parameter is used
1418                         for result publication in the study. Otherwise, if automatic
1419                         publication is switched on, default value is used for result name.
1420
1421             Returns:
1422                 New GEOM.GEOM_Object, containing the created tangent.
1423
1424             Example of usage:
1425                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1426             """
1427             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1428             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1429             self._autoPublish(anObj, theName, "tangent")
1430             return anObj
1431
1432         ## Create a tangent plane, corresponding to the given parameter on the given face.
1433         #  @param theFace The face for which tangent plane should be built.
1434         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1435         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1436         #  @param theTrimSize the size of plane.
1437         #  @param theName Object name; when specified, this parameter is used
1438         #         for result publication in the study. Otherwise, if automatic
1439         #         publication is switched on, default value is used for result name.
1440         #
1441         #  @return New GEOM.GEOM_Object, containing the created tangent.
1442         #
1443         #  @ref swig_MakeTangentPlaneOnFace "Example"
1444         @ManageTransactions("BasicOp")
1445         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1446             """
1447             Create a tangent plane, corresponding to the given parameter on the given face.
1448
1449             Parameters:
1450                 theFace The face for which tangent plane should be built.
1451                 theParameterV vertical value of the center point (0.0 - 1.0).
1452                 theParameterU horisontal value of the center point (0.0 - 1.0).
1453                 theTrimSize the size of plane.
1454                 theName Object name; when specified, this parameter is used
1455                         for result publication in the study. Otherwise, if automatic
1456                         publication is switched on, default value is used for result name.
1457
1458            Returns:
1459                 New GEOM.GEOM_Object, containing the created tangent.
1460
1461            Example of usage:
1462                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1463             """
1464             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1465             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1466             self._autoPublish(anObj, theName, "tangent")
1467             return anObj
1468
1469         ## Create a vector with the given components.
1470         #  @param theDX X component of the vector.
1471         #  @param theDY Y component of the vector.
1472         #  @param theDZ Z component of the vector.
1473         #  @param theName Object name; when specified, this parameter is used
1474         #         for result publication in the study. Otherwise, if automatic
1475         #         publication is switched on, default value is used for result name.
1476         #
1477         #  @return New GEOM.GEOM_Object, containing the created vector.
1478         #
1479         #  @ref tui_creation_vector "Example"
1480         @ManageTransactions("BasicOp")
1481         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1482             """
1483             Create a vector with the given components.
1484
1485             Parameters:
1486                 theDX X component of the vector.
1487                 theDY Y component of the vector.
1488                 theDZ Z component of the vector.
1489                 theName Object name; when specified, this parameter is used
1490                         for result publication in the study. Otherwise, if automatic
1491                         publication is switched on, default value is used for result name.
1492
1493             Returns:
1494                 New GEOM.GEOM_Object, containing the created vector.
1495             """
1496             # Example: see GEOM_TestAll.py
1497             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1498             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1499             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1500             anObj.SetParameters(Parameters)
1501             self._autoPublish(anObj, theName, "vector")
1502             return anObj
1503
1504         ## Create a vector between two points.
1505         #  @param thePnt1 Start point for the vector.
1506         #  @param thePnt2 End point for the vector.
1507         #  @param theName Object name; when specified, this parameter is used
1508         #         for result publication in the study. Otherwise, if automatic
1509         #         publication is switched on, default value is used for result name.
1510         #
1511         #  @return New GEOM.GEOM_Object, containing the created vector.
1512         #
1513         #  @ref tui_creation_vector "Example"
1514         @ManageTransactions("BasicOp")
1515         def MakeVector(self, thePnt1, thePnt2, theName=None):
1516             """
1517             Create a vector between two points.
1518
1519             Parameters:
1520                 thePnt1 Start point for the vector.
1521                 thePnt2 End point for the vector.
1522                 theName Object name; when specified, this parameter is used
1523                         for result publication in the study. Otherwise, if automatic
1524                         publication is switched on, default value is used for result name.
1525
1526             Returns:
1527                 New GEOM.GEOM_Object, containing the created vector.
1528             """
1529             # Example: see GEOM_TestAll.py
1530             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1531             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1532             self._autoPublish(anObj, theName, "vector")
1533             return anObj
1534
1535         ## Create a line, passing through the given point
1536         #  and parrallel to the given direction
1537         #  @param thePnt Point. The resulting line will pass through it.
1538         #  @param theDir Direction. The resulting line will be parallel to it.
1539         #  @param theName Object name; when specified, this parameter is used
1540         #         for result publication in the study. Otherwise, if automatic
1541         #         publication is switched on, default value is used for result name.
1542         #
1543         #  @return New GEOM.GEOM_Object, containing the created line.
1544         #
1545         #  @ref tui_creation_line "Example"
1546         @ManageTransactions("BasicOp")
1547         def MakeLine(self, thePnt, theDir, theName=None):
1548             """
1549             Create a line, passing through the given point
1550             and parrallel to the given direction
1551
1552             Parameters:
1553                 thePnt Point. The resulting line will pass through it.
1554                 theDir Direction. The resulting line will be parallel to it.
1555                 theName Object name; when specified, this parameter is used
1556                         for result publication in the study. Otherwise, if automatic
1557                         publication is switched on, default value is used for result name.
1558
1559             Returns:
1560                 New GEOM.GEOM_Object, containing the created line.
1561             """
1562             # Example: see GEOM_TestAll.py
1563             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1564             RaiseIfFailed("MakeLine", self.BasicOp)
1565             self._autoPublish(anObj, theName, "line")
1566             return anObj
1567
1568         ## Create a line, passing through the given points
1569         #  @param thePnt1 First of two points, defining the line.
1570         #  @param thePnt2 Second of two points, defining the line.
1571         #  @param theName Object name; when specified, this parameter is used
1572         #         for result publication in the study. Otherwise, if automatic
1573         #         publication is switched on, default value is used for result name.
1574         #
1575         #  @return New GEOM.GEOM_Object, containing the created line.
1576         #
1577         #  @ref tui_creation_line "Example"
1578         @ManageTransactions("BasicOp")
1579         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1580             """
1581             Create a line, passing through the given points
1582
1583             Parameters:
1584                 thePnt1 First of two points, defining the line.
1585                 thePnt2 Second of two points, defining the line.
1586                 theName Object name; when specified, this parameter is used
1587                         for result publication in the study. Otherwise, if automatic
1588                         publication is switched on, default value is used for result name.
1589
1590             Returns:
1591                 New GEOM.GEOM_Object, containing the created line.
1592             """
1593             # Example: see GEOM_TestAll.py
1594             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1595             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1596             self._autoPublish(anObj, theName, "line")
1597             return anObj
1598
1599         ## Create a line on two faces intersection.
1600         #  @param theFace1 First of two faces, defining the line.
1601         #  @param theFace2 Second of two faces, defining the line.
1602         #  @param theName Object name; when specified, this parameter is used
1603         #         for result publication in the study. Otherwise, if automatic
1604         #         publication is switched on, default value is used for result name.
1605         #
1606         #  @return New GEOM.GEOM_Object, containing the created line.
1607         #
1608         #  @ref swig_MakeLineTwoFaces "Example"
1609         @ManageTransactions("BasicOp")
1610         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1611             """
1612             Create a line on two faces intersection.
1613
1614             Parameters:
1615                 theFace1 First of two faces, defining the line.
1616                 theFace2 Second of two faces, defining the line.
1617                 theName Object name; when specified, this parameter is used
1618                         for result publication in the study. Otherwise, if automatic
1619                         publication is switched on, default value is used for result name.
1620
1621             Returns:
1622                 New GEOM.GEOM_Object, containing the created line.
1623             """
1624             # Example: see GEOM_TestAll.py
1625             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1626             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1627             self._autoPublish(anObj, theName, "line")
1628             return anObj
1629
1630         ## Create a plane, passing through the given point
1631         #  and normal to the given vector.
1632         #  @param thePnt Point, the plane has to pass through.
1633         #  @param theVec Vector, defining the plane normal direction.
1634         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1635         #  @param theName Object name; when specified, this parameter is used
1636         #         for result publication in the study. Otherwise, if automatic
1637         #         publication is switched on, default value is used for result name.
1638         #
1639         #  @return New GEOM.GEOM_Object, containing the created plane.
1640         #
1641         #  @ref tui_creation_plane "Example"
1642         @ManageTransactions("BasicOp")
1643         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1644             """
1645             Create a plane, passing through the given point
1646             and normal to the given vector.
1647
1648             Parameters:
1649                 thePnt Point, the plane has to pass through.
1650                 theVec Vector, defining the plane normal direction.
1651                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1652                 theName Object name; when specified, this parameter is used
1653                         for result publication in the study. Otherwise, if automatic
1654                         publication is switched on, default value is used for result name.
1655
1656             Returns:
1657                 New GEOM.GEOM_Object, containing the created plane.
1658             """
1659             # Example: see GEOM_TestAll.py
1660             theTrimSize, Parameters = ParseParameters(theTrimSize);
1661             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1662             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1663             anObj.SetParameters(Parameters)
1664             self._autoPublish(anObj, theName, "plane")
1665             return anObj
1666
1667         ## Create a plane, passing through the three given points
1668         #  @param thePnt1 First of three points, defining the plane.
1669         #  @param thePnt2 Second of three points, defining the plane.
1670         #  @param thePnt3 Fird of three points, defining the plane.
1671         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1672         #  @param theName Object name; when specified, this parameter is used
1673         #         for result publication in the study. Otherwise, if automatic
1674         #         publication is switched on, default value is used for result name.
1675         #
1676         #  @return New GEOM.GEOM_Object, containing the created plane.
1677         #
1678         #  @ref tui_creation_plane "Example"
1679         @ManageTransactions("BasicOp")
1680         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1681             """
1682             Create a plane, passing through the three given points
1683
1684             Parameters:
1685                 thePnt1 First of three points, defining the plane.
1686                 thePnt2 Second of three points, defining the plane.
1687                 thePnt3 Fird of three points, defining the plane.
1688                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1689                 theName Object name; when specified, this parameter is used
1690                         for result publication in the study. Otherwise, if automatic
1691                         publication is switched on, default value is used for result name.
1692
1693             Returns:
1694                 New GEOM.GEOM_Object, containing the created plane.
1695             """
1696             # Example: see GEOM_TestAll.py
1697             theTrimSize, Parameters = ParseParameters(theTrimSize);
1698             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1699             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1700             anObj.SetParameters(Parameters)
1701             self._autoPublish(anObj, theName, "plane")
1702             return anObj
1703
1704         ## Create a plane, similar to the existing one, but with another size of representing face.
1705         #  @param theFace Referenced plane or LCS(Marker).
1706         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1707         #  @param theName Object name; when specified, this parameter is used
1708         #         for result publication in the study. Otherwise, if automatic
1709         #         publication is switched on, default value is used for result name.
1710         #
1711         #  @return New GEOM.GEOM_Object, containing the created plane.
1712         #
1713         #  @ref tui_creation_plane "Example"
1714         @ManageTransactions("BasicOp")
1715         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1716             """
1717             Create a plane, similar to the existing one, but with another size of representing face.
1718
1719             Parameters:
1720                 theFace Referenced plane or LCS(Marker).
1721                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1722                 theName Object name; when specified, this parameter is used
1723                         for result publication in the study. Otherwise, if automatic
1724                         publication is switched on, default value is used for result name.
1725
1726             Returns:
1727                 New GEOM.GEOM_Object, containing the created plane.
1728             """
1729             # Example: see GEOM_TestAll.py
1730             theTrimSize, Parameters = ParseParameters(theTrimSize);
1731             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1732             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1733             anObj.SetParameters(Parameters)
1734             self._autoPublish(anObj, theName, "plane")
1735             return anObj
1736
1737         ## Create a plane, passing through the 2 vectors
1738         #  with center in a start point of the first vector.
1739         #  @param theVec1 Vector, defining center point and plane direction.
1740         #  @param theVec2 Vector, defining the plane normal direction.
1741         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1742         #  @param theName Object name; when specified, this parameter is used
1743         #         for result publication in the study. Otherwise, if automatic
1744         #         publication is switched on, default value is used for result name.
1745         #
1746         #  @return New GEOM.GEOM_Object, containing the created plane.
1747         #
1748         #  @ref tui_creation_plane "Example"
1749         @ManageTransactions("BasicOp")
1750         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1751             """
1752             Create a plane, passing through the 2 vectors
1753             with center in a start point of the first vector.
1754
1755             Parameters:
1756                 theVec1 Vector, defining center point and plane direction.
1757                 theVec2 Vector, defining the plane normal direction.
1758                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1759                 theName Object name; when specified, this parameter is used
1760                         for result publication in the study. Otherwise, if automatic
1761                         publication is switched on, default value is used for result name.
1762
1763             Returns:
1764                 New GEOM.GEOM_Object, containing the created plane.
1765             """
1766             # Example: see GEOM_TestAll.py
1767             theTrimSize, Parameters = ParseParameters(theTrimSize);
1768             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1769             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1770             anObj.SetParameters(Parameters)
1771             self._autoPublish(anObj, theName, "plane")
1772             return anObj
1773
1774         ## Create a plane, based on a Local coordinate system.
1775         #  @param theLCS  coordinate system, defining plane.
1776         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1777         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1778         #  @param theName Object name; when specified, this parameter is used
1779         #         for result publication in the study. Otherwise, if automatic
1780         #         publication is switched on, default value is used for result name.
1781         #
1782         #  @return New GEOM.GEOM_Object, containing the created plane.
1783         #
1784         #  @ref tui_creation_plane "Example"
1785         @ManageTransactions("BasicOp")
1786         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1787             """
1788             Create a plane, based on a Local coordinate system.
1789
1790            Parameters:
1791                 theLCS  coordinate system, defining plane.
1792                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1793                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1794                 theName Object name; when specified, this parameter is used
1795                         for result publication in the study. Otherwise, if automatic
1796                         publication is switched on, default value is used for result name.
1797
1798             Returns:
1799                 New GEOM.GEOM_Object, containing the created plane.
1800             """
1801             # Example: see GEOM_TestAll.py
1802             theTrimSize, Parameters = ParseParameters(theTrimSize);
1803             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1804             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1805             anObj.SetParameters(Parameters)
1806             self._autoPublish(anObj, theName, "plane")
1807             return anObj
1808
1809         ## Create a local coordinate system.
1810         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1811         #  @param XDX,XDY,XDZ Three components of OX direction
1812         #  @param YDX,YDY,YDZ Three components of OY direction
1813         #  @param theName Object name; when specified, this parameter is used
1814         #         for result publication in the study. Otherwise, if automatic
1815         #         publication is switched on, default value is used for result name.
1816         #
1817         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1818         #
1819         #  @ref swig_MakeMarker "Example"
1820         @ManageTransactions("BasicOp")
1821         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1822             """
1823             Create a local coordinate system.
1824
1825             Parameters:
1826                 OX,OY,OZ Three coordinates of coordinate system origin.
1827                 XDX,XDY,XDZ Three components of OX direction
1828                 YDX,YDY,YDZ Three components of OY direction
1829                 theName Object name; when specified, this parameter is used
1830                         for result publication in the study. Otherwise, if automatic
1831                         publication is switched on, default value is used for result name.
1832
1833             Returns:
1834                 New GEOM.GEOM_Object, containing the created coordinate system.
1835             """
1836             # Example: see GEOM_TestAll.py
1837             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1838             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1839             RaiseIfFailed("MakeMarker", self.BasicOp)
1840             anObj.SetParameters(Parameters)
1841             self._autoPublish(anObj, theName, "lcs")
1842             return anObj
1843
1844         ## Create a local coordinate system from shape.
1845         #  @param theShape The initial shape to detect the coordinate system.
1846         #  @param theName Object name; when specified, this parameter is used
1847         #         for result publication in the study. Otherwise, if automatic
1848         #         publication is switched on, default value is used for result name.
1849         #
1850         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1851         #
1852         #  @ref tui_creation_lcs "Example"
1853         @ManageTransactions("BasicOp")
1854         def MakeMarkerFromShape(self, theShape, theName=None):
1855             """
1856             Create a local coordinate system from shape.
1857
1858             Parameters:
1859                 theShape The initial shape to detect the coordinate system.
1860                 theName Object name; when specified, this parameter is used
1861                         for result publication in the study. Otherwise, if automatic
1862                         publication is switched on, default value is used for result name.
1863
1864             Returns:
1865                 New GEOM.GEOM_Object, containing the created coordinate system.
1866             """
1867             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1868             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1869             self._autoPublish(anObj, theName, "lcs")
1870             return anObj
1871
1872         ## Create a local coordinate system from point and two vectors.
1873         #  @param theOrigin Point of coordinate system origin.
1874         #  @param theXVec Vector of X direction
1875         #  @param theYVec Vector of Y direction
1876         #  @param theName Object name; when specified, this parameter is used
1877         #         for result publication in the study. Otherwise, if automatic
1878         #         publication is switched on, default value is used for result name.
1879         #
1880         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1881         #
1882         #  @ref tui_creation_lcs "Example"
1883         @ManageTransactions("BasicOp")
1884         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1885             """
1886             Create a local coordinate system from point and two vectors.
1887
1888             Parameters:
1889                 theOrigin Point of coordinate system origin.
1890                 theXVec Vector of X direction
1891                 theYVec Vector of Y direction
1892                 theName Object name; when specified, this parameter is used
1893                         for result publication in the study. Otherwise, if automatic
1894                         publication is switched on, default value is used for result name.
1895
1896             Returns:
1897                 New GEOM.GEOM_Object, containing the created coordinate system.
1898
1899             """
1900             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1901             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1902             self._autoPublish(anObj, theName, "lcs")
1903             return anObj
1904
1905         # end of l3_basic_go
1906         ## @}
1907
1908         ## @addtogroup l4_curves
1909         ## @{
1910
1911         ##  Create an arc of circle, passing through three given points.
1912         #  @param thePnt1 Start point of the arc.
1913         #  @param thePnt2 Middle point of the arc.
1914         #  @param thePnt3 End point of the arc.
1915         #  @param theName Object name; when specified, this parameter is used
1916         #         for result publication in the study. Otherwise, if automatic
1917         #         publication is switched on, default value is used for result name.
1918         #
1919         #  @return New GEOM.GEOM_Object, containing the created arc.
1920         #
1921         #  @ref swig_MakeArc "Example"
1922         @ManageTransactions("CurvesOp")
1923         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1924             """
1925             Create an arc of circle, passing through three given points.
1926
1927             Parameters:
1928                 thePnt1 Start point of the arc.
1929                 thePnt2 Middle point of the arc.
1930                 thePnt3 End point of the arc.
1931                 theName Object name; when specified, this parameter is used
1932                         for result publication in the study. Otherwise, if automatic
1933                         publication is switched on, default value is used for result name.
1934
1935             Returns:
1936                 New GEOM.GEOM_Object, containing the created arc.
1937             """
1938             # Example: see GEOM_TestAll.py
1939             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1940             RaiseIfFailed("MakeArc", self.CurvesOp)
1941             self._autoPublish(anObj, theName, "arc")
1942             return anObj
1943
1944         ##  Create an arc of circle from a center and 2 points.
1945         #  @param thePnt1 Center of the arc
1946         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1947         #  @param thePnt3 End point of the arc (Gives also a direction)
1948         #  @param theSense Orientation of the arc
1949         #  @param theName Object name; when specified, this parameter is used
1950         #         for result publication in the study. Otherwise, if automatic
1951         #         publication is switched on, default value is used for result name.
1952         #
1953         #  @return New GEOM.GEOM_Object, containing the created arc.
1954         #
1955         #  @ref swig_MakeArc "Example"
1956         @ManageTransactions("CurvesOp")
1957         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1958             """
1959             Create an arc of circle from a center and 2 points.
1960
1961             Parameters:
1962                 thePnt1 Center of the arc
1963                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1964                 thePnt3 End point of the arc (Gives also a direction)
1965                 theSense Orientation of the arc
1966                 theName Object name; when specified, this parameter is used
1967                         for result publication in the study. Otherwise, if automatic
1968                         publication is switched on, default value is used for result name.
1969
1970             Returns:
1971                 New GEOM.GEOM_Object, containing the created arc.
1972             """
1973             # Example: see GEOM_TestAll.py
1974             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1975             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1976             self._autoPublish(anObj, theName, "arc")
1977             return anObj
1978
1979         ##  Create an arc of ellipse, of center and two points.
1980         #  @param theCenter Center of the arc.
1981         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1982         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1983         #  @param theName Object name; when specified, this parameter is used
1984         #         for result publication in the study. Otherwise, if automatic
1985         #         publication is switched on, default value is used for result name.
1986         #
1987         #  @return New GEOM.GEOM_Object, containing the created arc.
1988         #
1989         #  @ref swig_MakeArc "Example"
1990         @ManageTransactions("CurvesOp")
1991         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1992             """
1993             Create an arc of ellipse, of center and two points.
1994
1995             Parameters:
1996                 theCenter Center of the arc.
1997                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1998                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1999                 theName Object name; when specified, this parameter is used
2000                         for result publication in the study. Otherwise, if automatic
2001                         publication is switched on, default value is used for result name.
2002
2003             Returns:
2004                 New GEOM.GEOM_Object, containing the created arc.
2005             """
2006             # Example: see GEOM_TestAll.py
2007             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2008             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2009             self._autoPublish(anObj, theName, "arc")
2010             return anObj
2011
2012         ## Create a circle with given center, normal vector and radius.
2013         #  @param thePnt Circle center.
2014         #  @param theVec Vector, normal to the plane of the circle.
2015         #  @param theR Circle radius.
2016         #  @param theName Object name; when specified, this parameter is used
2017         #         for result publication in the study. Otherwise, if automatic
2018         #         publication is switched on, default value is used for result name.
2019         #
2020         #  @return New GEOM.GEOM_Object, containing the created circle.
2021         #
2022         #  @ref tui_creation_circle "Example"
2023         @ManageTransactions("CurvesOp")
2024         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2025             """
2026             Create a circle with given center, normal vector and radius.
2027
2028             Parameters:
2029                 thePnt Circle center.
2030                 theVec Vector, normal to the plane of the circle.
2031                 theR Circle radius.
2032                 theName Object name; when specified, this parameter is used
2033                         for result publication in the study. Otherwise, if automatic
2034                         publication is switched on, default value is used for result name.
2035
2036             Returns:
2037                 New GEOM.GEOM_Object, containing the created circle.
2038             """
2039             # Example: see GEOM_TestAll.py
2040             theR, Parameters = ParseParameters(theR)
2041             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2042             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2043             anObj.SetParameters(Parameters)
2044             self._autoPublish(anObj, theName, "circle")
2045             return anObj
2046
2047         ## Create a circle with given radius.
2048         #  Center of the circle will be in the origin of global
2049         #  coordinate system and normal vector will be codirected with Z axis
2050         #  @param theR Circle radius.
2051         #  @param theName Object name; when specified, this parameter is used
2052         #         for result publication in the study. Otherwise, if automatic
2053         #         publication is switched on, default value is used for result name.
2054         #
2055         #  @return New GEOM.GEOM_Object, containing the created circle.
2056         @ManageTransactions("CurvesOp")
2057         def MakeCircleR(self, theR, theName=None):
2058             """
2059             Create a circle with given radius.
2060             Center of the circle will be in the origin of global
2061             coordinate system and normal vector will be codirected with Z axis
2062
2063             Parameters:
2064                 theR Circle radius.
2065                 theName Object name; when specified, this parameter is used
2066                         for result publication in the study. Otherwise, if automatic
2067                         publication is switched on, default value is used for result name.
2068
2069             Returns:
2070                 New GEOM.GEOM_Object, containing the created circle.
2071             """
2072             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2073             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2074             self._autoPublish(anObj, theName, "circle")
2075             return anObj
2076
2077         ## Create a circle, passing through three given points
2078         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2079         #  @param theName Object name; when specified, this parameter is used
2080         #         for result publication in the study. Otherwise, if automatic
2081         #         publication is switched on, default value is used for result name.
2082         #
2083         #  @return New GEOM.GEOM_Object, containing the created circle.
2084         #
2085         #  @ref tui_creation_circle "Example"
2086         @ManageTransactions("CurvesOp")
2087         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2088             """
2089             Create a circle, passing through three given points
2090
2091             Parameters:
2092                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2093                 theName Object name; when specified, this parameter is used
2094                         for result publication in the study. Otherwise, if automatic
2095                         publication is switched on, default value is used for result name.
2096
2097             Returns:
2098                 New GEOM.GEOM_Object, containing the created circle.
2099             """
2100             # Example: see GEOM_TestAll.py
2101             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2102             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2103             self._autoPublish(anObj, theName, "circle")
2104             return anObj
2105
2106         ## Create a circle, with given point1 as center,
2107         #  passing through the point2 as radius and laying in the plane,
2108         #  defined by all three given points.
2109         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2110         #  @param theName Object name; when specified, this parameter is used
2111         #         for result publication in the study. Otherwise, if automatic
2112         #         publication is switched on, default value is used for result name.
2113         #
2114         #  @return New GEOM.GEOM_Object, containing the created circle.
2115         #
2116         #  @ref swig_MakeCircle "Example"
2117         @ManageTransactions("CurvesOp")
2118         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2119             """
2120             Create a circle, with given point1 as center,
2121             passing through the point2 as radius and laying in the plane,
2122             defined by all three given points.
2123
2124             Parameters:
2125                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2126                 theName Object name; when specified, this parameter is used
2127                         for result publication in the study. Otherwise, if automatic
2128                         publication is switched on, default value is used for result name.
2129
2130             Returns:
2131                 New GEOM.GEOM_Object, containing the created circle.
2132             """
2133             # Example: see GEOM_example6.py
2134             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2135             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2136             self._autoPublish(anObj, theName, "circle")
2137             return anObj
2138
2139         ## Create an ellipse with given center, normal vector and radiuses.
2140         #  @param thePnt Ellipse center.
2141         #  @param theVec Vector, normal to the plane of the ellipse.
2142         #  @param theRMajor Major ellipse radius.
2143         #  @param theRMinor Minor ellipse radius.
2144         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2145         #  @param theName Object name; when specified, this parameter is used
2146         #         for result publication in the study. Otherwise, if automatic
2147         #         publication is switched on, default value is used for result name.
2148         #
2149         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2150         #
2151         #  @ref tui_creation_ellipse "Example"
2152         @ManageTransactions("CurvesOp")
2153         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2154             """
2155             Create an ellipse with given center, normal vector and radiuses.
2156
2157             Parameters:
2158                 thePnt Ellipse center.
2159                 theVec Vector, normal to the plane of the ellipse.
2160                 theRMajor Major ellipse radius.
2161                 theRMinor Minor ellipse radius.
2162                 theVecMaj Vector, direction of the ellipse's main axis.
2163                 theName Object name; when specified, this parameter is used
2164                         for result publication in the study. Otherwise, if automatic
2165                         publication is switched on, default value is used for result name.
2166
2167             Returns:
2168                 New GEOM.GEOM_Object, containing the created ellipse.
2169             """
2170             # Example: see GEOM_TestAll.py
2171             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2172             if theVecMaj is not None:
2173                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2174             else:
2175                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2176                 pass
2177             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2178             anObj.SetParameters(Parameters)
2179             self._autoPublish(anObj, theName, "ellipse")
2180             return anObj
2181
2182         ## Create an ellipse with given radiuses.
2183         #  Center of the ellipse will be in the origin of global
2184         #  coordinate system and normal vector will be codirected with Z axis
2185         #  @param theRMajor Major ellipse radius.
2186         #  @param theRMinor Minor ellipse radius.
2187         #  @param theName Object name; when specified, this parameter is used
2188         #         for result publication in the study. Otherwise, if automatic
2189         #         publication is switched on, default value is used for result name.
2190         #
2191         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2192         @ManageTransactions("CurvesOp")
2193         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2194             """
2195             Create an ellipse with given radiuses.
2196             Center of the ellipse will be in the origin of global
2197             coordinate system and normal vector will be codirected with Z axis
2198
2199             Parameters:
2200                 theRMajor Major ellipse radius.
2201                 theRMinor Minor ellipse radius.
2202                 theName Object name; when specified, this parameter is used
2203                         for result publication in the study. Otherwise, if automatic
2204                         publication is switched on, default value is used for result name.
2205
2206             Returns:
2207             New GEOM.GEOM_Object, containing the created ellipse.
2208             """
2209             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2210             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2211             self._autoPublish(anObj, theName, "ellipse")
2212             return anObj
2213
2214         ## Create a polyline on the set of points.
2215         #  @param thePoints Sequence of points for the polyline.
2216         #  @param theIsClosed If True, build a closed wire.
2217         #  @param theName Object name; when specified, this parameter is used
2218         #         for result publication in the study. Otherwise, if automatic
2219         #         publication is switched on, default value is used for result name.
2220         #
2221         #  @return New GEOM.GEOM_Object, containing the created polyline.
2222         #
2223         #  @ref tui_creation_curve "Example"
2224         @ManageTransactions("CurvesOp")
2225         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2226             """
2227             Create a polyline on the set of points.
2228
2229             Parameters:
2230                 thePoints Sequence of points for the polyline.
2231                 theIsClosed If True, build a closed wire.
2232                 theName Object name; when specified, this parameter is used
2233                         for result publication in the study. Otherwise, if automatic
2234                         publication is switched on, default value is used for result name.
2235
2236             Returns:
2237                 New GEOM.GEOM_Object, containing the created polyline.
2238             """
2239             # Example: see GEOM_TestAll.py
2240             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2241             RaiseIfFailed("MakePolyline", self.CurvesOp)
2242             self._autoPublish(anObj, theName, "polyline")
2243             return anObj
2244
2245         ## Create bezier curve on the set of points.
2246         #  @param thePoints Sequence of points for the bezier curve.
2247         #  @param theIsClosed If True, build a closed curve.
2248         #  @param theName Object name; when specified, this parameter is used
2249         #         for result publication in the study. Otherwise, if automatic
2250         #         publication is switched on, default value is used for result name.
2251         #
2252         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2253         #
2254         #  @ref tui_creation_curve "Example"
2255         @ManageTransactions("CurvesOp")
2256         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2257             """
2258             Create bezier curve on the set of points.
2259
2260             Parameters:
2261                 thePoints Sequence of points for the bezier curve.
2262                 theIsClosed If True, build a closed curve.
2263                 theName Object name; when specified, this parameter is used
2264                         for result publication in the study. Otherwise, if automatic
2265                         publication is switched on, default value is used for result name.
2266
2267             Returns:
2268                 New GEOM.GEOM_Object, containing the created bezier curve.
2269             """
2270             # Example: see GEOM_TestAll.py
2271             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2272             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2273             self._autoPublish(anObj, theName, "bezier")
2274             return anObj
2275
2276         ## Create B-Spline curve on the set of points.
2277         #  @param thePoints Sequence of points for the B-Spline curve.
2278         #  @param theIsClosed If True, build a closed curve.
2279         #  @param theDoReordering If TRUE, the algo does not follow the order of
2280         #                         \a thePoints but searches for the closest vertex.
2281         #  @param theName Object name; when specified, this parameter is used
2282         #         for result publication in the study. Otherwise, if automatic
2283         #         publication is switched on, default value is used for result name.
2284         #
2285         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2286         #
2287         #  @ref tui_creation_curve "Example"
2288         @ManageTransactions("CurvesOp")
2289         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2290             """
2291             Create B-Spline curve on the set of points.
2292
2293             Parameters:
2294                 thePoints Sequence of points for the B-Spline curve.
2295                 theIsClosed If True, build a closed curve.
2296                 theDoReordering If True, the algo does not follow the order of
2297                                 thePoints but searches for the closest vertex.
2298                 theName Object name; when specified, this parameter is used
2299                         for result publication in the study. Otherwise, if automatic
2300                         publication is switched on, default value is used for result name.
2301
2302             Returns:
2303                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2304             """
2305             # Example: see GEOM_TestAll.py
2306             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2307             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2308             self._autoPublish(anObj, theName, "bspline")
2309             return anObj
2310
2311         ## Create B-Spline curve on the set of points.
2312         #  @param thePoints Sequence of points for the B-Spline curve.
2313         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2314         #  @param theLastVec Vector object, defining the curve direction at its last point.
2315         #  @param theName Object name; when specified, this parameter is used
2316         #         for result publication in the study. Otherwise, if automatic
2317         #         publication is switched on, default value is used for result name.
2318         #
2319         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2320         #
2321         #  @ref tui_creation_curve "Example"
2322         @ManageTransactions("CurvesOp")
2323         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2324             """
2325             Create B-Spline curve on the set of points.
2326
2327             Parameters:
2328                 thePoints Sequence of points for the B-Spline curve.
2329                 theFirstVec Vector object, defining the curve direction at its first point.
2330                 theLastVec Vector object, defining the curve direction at its last point.
2331                 theName Object name; when specified, this parameter is used
2332                         for result publication in the study. Otherwise, if automatic
2333                         publication is switched on, default value is used for result name.
2334
2335             Returns:
2336                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2337             """
2338             # Example: see GEOM_TestAll.py
2339             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2340             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2341             self._autoPublish(anObj, theName, "bspline")
2342             return anObj
2343
2344         ## Creates a curve using the parametric definition of the basic points.
2345         #  @param thexExpr parametric equation of the coordinates X.
2346         #  @param theyExpr parametric equation of the coordinates Y.
2347         #  @param thezExpr parametric equation of the coordinates Z.
2348         #  @param theParamMin the minimal value of the parameter.
2349         #  @param theParamMax the maximum value of the parameter.
2350         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2351         #  @param theCurveType the type of the curve,
2352         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2353         #  @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.
2354         #  @param theName Object name; when specified, this parameter is used
2355         #         for result publication in the study. Otherwise, if automatic
2356         #         publication is switched on, default value is used for result name.
2357         #
2358         #  @return New GEOM.GEOM_Object, containing the created curve.
2359         #
2360         #  @ref tui_creation_curve "Example"
2361         @ManageTransactions("CurvesOp")
2362         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2363                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2364             """
2365             Creates a curve using the parametric definition of the basic points.
2366
2367             Parameters:
2368                 thexExpr parametric equation of the coordinates X.
2369                 theyExpr parametric equation of the coordinates Y.
2370                 thezExpr parametric equation of the coordinates Z.
2371                 theParamMin the minimal value of the parameter.
2372                 theParamMax the maximum value of the parameter.
2373                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2374                 theCurveType the type of the curve,
2375                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2376                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2377                              method is used which can lead to a bug.
2378                 theName Object name; when specified, this parameter is used
2379                         for result publication in the study. Otherwise, if automatic
2380                         publication is switched on, default value is used for result name.
2381
2382             Returns:
2383                 New GEOM.GEOM_Object, containing the created curve.
2384             """
2385             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2386             if theNewMethod:
2387               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2388             else:
2389               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2390             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2391             anObj.SetParameters(Parameters)
2392             self._autoPublish(anObj, theName, "curve")
2393             return anObj
2394
2395         ## Create an isoline curve on a face.
2396         #  @param theFace the face for which an isoline is created.
2397         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2398         #         creation.
2399         #  @param theParameter the U parameter for U-isoline or V parameter
2400         #         for V-isoline.
2401         #  @param theName Object name; when specified, this parameter is used
2402         #         for result publication in the study. Otherwise, if automatic
2403         #         publication is switched on, default value is used for result name.
2404         #
2405         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2406         #          a compound of edges.
2407         #
2408         #  @ref tui_creation_curve "Example"
2409         @ManageTransactions("CurvesOp")
2410         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2411             """
2412             Create an isoline curve on a face.
2413
2414             Parameters:
2415                 theFace the face for which an isoline is created.
2416                 IsUIsoline True for U-isoline creation; False for V-isoline
2417                            creation.
2418                 theParameter the U parameter for U-isoline or V parameter
2419                              for V-isoline.
2420                 theName Object name; when specified, this parameter is used
2421                         for result publication in the study. Otherwise, if automatic
2422                         publication is switched on, default value is used for result name.
2423
2424             Returns:
2425                 New GEOM.GEOM_Object, containing the created isoline edge or a
2426                 compound of edges.
2427             """
2428             # Example: see GEOM_TestAll.py
2429             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2430             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2431             if IsUIsoline:
2432                 self._autoPublish(anObj, theName, "U-Isoline")
2433             else:
2434                 self._autoPublish(anObj, theName, "V-Isoline")
2435             return anObj
2436
2437         # end of l4_curves
2438         ## @}
2439
2440         ## @addtogroup l3_sketcher
2441         ## @{
2442
2443         ## Create a sketcher (wire or face), following the textual description,
2444         #  passed through <VAR>theCommand</VAR> argument. \n
2445         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2446         #  Format of the description string have to be the following:
2447         #
2448         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2449         #
2450         #  Where:
2451         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2452         #  - CMD is one of
2453         #     - "R angle" : Set the direction by angle
2454         #     - "D dx dy" : Set the direction by DX & DY
2455         #     .
2456         #       \n
2457         #     - "TT x y" : Create segment by point at X & Y
2458         #     - "T dx dy" : Create segment by point with DX & DY
2459         #     - "L length" : Create segment by direction & Length
2460         #     - "IX x" : Create segment by direction & Intersect. X
2461         #     - "IY y" : Create segment by direction & Intersect. Y
2462         #     .
2463         #       \n
2464         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2465         #     - "AA x y": Create arc by point at X & Y
2466         #     - "A dx dy" : Create arc by point with DX & DY
2467         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2468         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2469         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2470         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2471         #     .
2472         #       \n
2473         #     - "WW" : Close Wire (to finish)
2474         #     - "WF" : Close Wire and build face (to finish)
2475         #     .
2476         #        \n
2477         #  - Flag1 (= reverse) is 0 or 2 ...
2478         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2479         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2480         #     .
2481         #        \n
2482         #  - Flag2 (= control tolerance) is 0 or 1 ...
2483         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2484         #     - if 1 the wire is built only if the end point is on the arc
2485         #       with a tolerance of 10^-7 on the distance else the creation fails
2486         #
2487         #  @param theCommand String, defining the sketcher in local
2488         #                    coordinates of the working plane.
2489         #  @param theWorkingPlane Nine double values, defining origin,
2490         #                         OZ and OX directions of the working plane.
2491         #  @param theName Object name; when specified, this parameter is used
2492         #         for result publication in the study. Otherwise, if automatic
2493         #         publication is switched on, default value is used for result name.
2494         #
2495         #  @return New GEOM.GEOM_Object, containing the created wire.
2496         #
2497         #  @ref tui_sketcher_page "Example"
2498         @ManageTransactions("CurvesOp")
2499         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2500             """
2501             Create a sketcher (wire or face), following the textual description, passed
2502             through theCommand argument.
2503             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2504             Format of the description string have to be the following:
2505                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2506             Where:
2507             - x1, y1 are coordinates of the first sketcher point (zero by default),
2508             - CMD is one of
2509                - "R angle" : Set the direction by angle
2510                - "D dx dy" : Set the direction by DX & DY
2511
2512                - "TT x y" : Create segment by point at X & Y
2513                - "T dx dy" : Create segment by point with DX & DY
2514                - "L length" : Create segment by direction & Length
2515                - "IX x" : Create segment by direction & Intersect. X
2516                - "IY y" : Create segment by direction & Intersect. Y
2517
2518                - "C radius length" : Create arc by direction, radius and length(in degree)
2519                - "AA x y": Create arc by point at X & Y
2520                - "A dx dy" : Create arc by point with DX & DY
2521                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2522                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2523                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2524                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2525
2526                - "WW" : Close Wire (to finish)
2527                - "WF" : Close Wire and build face (to finish)
2528
2529             - Flag1 (= reverse) is 0 or 2 ...
2530                - if 0 the drawn arc is the one of lower angle (< Pi)
2531                - if 2 the drawn arc ius the one of greater angle (> Pi)
2532
2533             - Flag2 (= control tolerance) is 0 or 1 ...
2534                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2535                - if 1 the wire is built only if the end point is on the arc
2536                  with a tolerance of 10^-7 on the distance else the creation fails
2537
2538             Parameters:
2539                 theCommand String, defining the sketcher in local
2540                            coordinates of the working plane.
2541                 theWorkingPlane Nine double values, defining origin,
2542                                 OZ and OX directions of the working plane.
2543                 theName Object name; when specified, this parameter is used
2544                         for result publication in the study. Otherwise, if automatic
2545                         publication is switched on, default value is used for result name.
2546
2547             Returns:
2548                 New GEOM.GEOM_Object, containing the created wire.
2549             """
2550             # Example: see GEOM_TestAll.py
2551             theCommand,Parameters = ParseSketcherCommand(theCommand)
2552             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2553             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2554             anObj.SetParameters(Parameters)
2555             self._autoPublish(anObj, theName, "wire")
2556             return anObj
2557
2558         ## Create a sketcher (wire or face), following the textual description,
2559         #  passed through <VAR>theCommand</VAR> argument. \n
2560         #  For format of the description string see MakeSketcher() method.\n
2561         #  @param theCommand String, defining the sketcher in local
2562         #                    coordinates of the working plane.
2563         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2564         #  @param theName Object name; when specified, this parameter is used
2565         #         for result publication in the study. Otherwise, if automatic
2566         #         publication is switched on, default value is used for result name.
2567         #
2568         #  @return New GEOM.GEOM_Object, containing the created wire.
2569         #
2570         #  @ref tui_sketcher_page "Example"
2571         @ManageTransactions("CurvesOp")
2572         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2573             """
2574             Create a sketcher (wire or face), following the textual description,
2575             passed through theCommand argument.
2576             For format of the description string see geompy.MakeSketcher() method.
2577
2578             Parameters:
2579                 theCommand String, defining the sketcher in local
2580                            coordinates of the working plane.
2581                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2582                 theName Object name; when specified, this parameter is used
2583                         for result publication in the study. Otherwise, if automatic
2584                         publication is switched on, default value is used for result name.
2585
2586             Returns:
2587                 New GEOM.GEOM_Object, containing the created wire.
2588             """
2589             theCommand,Parameters = ParseSketcherCommand(theCommand)
2590             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2591             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2592             anObj.SetParameters(Parameters)
2593             self._autoPublish(anObj, theName, "wire")
2594             return anObj
2595
2596         ## Obtain a 2D sketcher interface
2597         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2598         def Sketcher2D (self):
2599             """
2600             Obtain a 2D sketcher interface.
2601
2602             Example of usage:
2603                sk = geompy.Sketcher2D()
2604                sk.addPoint(20, 20)
2605                sk.addSegmentRelative(15, 70)
2606                sk.addSegmentPerpY(50)
2607                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2608                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2609                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2610                sk.close()
2611                Sketch_1 = sk.wire(geomObj_1)
2612             """
2613             sk = Sketcher2D (self)
2614             return sk
2615
2616         ## Create a sketcher wire, following the numerical description,
2617         #  passed through <VAR>theCoordinates</VAR> argument. \n
2618         #  @param theCoordinates double values, defining points to create a wire,
2619         #                                                      passing from it.
2620         #  @param theName Object name; when specified, this parameter is used
2621         #         for result publication in the study. Otherwise, if automatic
2622         #         publication is switched on, default value is used for result name.
2623         #
2624         #  @return New GEOM.GEOM_Object, containing the created wire.
2625         #
2626         #  @ref tui_3dsketcher_page "Example"
2627         @ManageTransactions("CurvesOp")
2628         def Make3DSketcher(self, theCoordinates, theName=None):
2629             """
2630             Create a sketcher wire, following the numerical description,
2631             passed through theCoordinates argument.
2632
2633             Parameters:
2634                 theCoordinates double values, defining points to create a wire,
2635                                passing from it.
2636                 theName Object name; when specified, this parameter is used
2637                         for result publication in the study. Otherwise, if automatic
2638                         publication is switched on, default value is used for result name.
2639
2640             Returns:
2641                 New GEOM_Object, containing the created wire.
2642             """
2643             theCoordinates,Parameters = ParseParameters(theCoordinates)
2644             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2645             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2646             anObj.SetParameters(Parameters)
2647             self._autoPublish(anObj, theName, "wire")
2648             return anObj
2649
2650         ## Obtain a 3D sketcher interface
2651         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2652         #
2653         #  @ref tui_3dsketcher_page "Example"
2654         def Sketcher3D (self):
2655             """
2656             Obtain a 3D sketcher interface.
2657
2658             Example of usage:
2659                 sk = geompy.Sketcher3D()
2660                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2661                 sk.addPointsRelative(0, 0, 130)
2662                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2663                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2664                 sk.close()
2665                 a3D_Sketcher_1 = sk.wire()
2666             """
2667             sk = Sketcher3D (self)
2668             return sk
2669
2670         ## Obtain a 2D polyline creation interface
2671         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2672         #
2673         #  @ref tui_3dsketcher_page "Example"
2674         def Polyline2D (self):
2675             """
2676             Obtain a 2D polyline creation interface.
2677
2678             Example of usage:
2679                 pl = geompy.Polyline2D()
2680                 pl.addSection("section 1", GEOM.Polyline, True)
2681                 pl.addPoints(0, 0, 10, 0, 10, 10)
2682                 pl.addSection("section 2", GEOM.Interpolation, False)
2683                 pl.addPoints(20, 0, 30, 0, 30, 10)
2684                 resultObj = pl.result(WorkingPlane)
2685             """
2686             pl = Polyline2D (self)
2687             return pl
2688
2689         # end of l3_sketcher
2690         ## @}
2691
2692         ## @addtogroup l3_3d_primitives
2693         ## @{
2694
2695         ## Create a box by coordinates of two opposite vertices.
2696         #
2697         #  @param x1,y1,z1 double values, defining first point it.
2698         #  @param x2,y2,z2 double values, defining first point it.
2699         #  @param theName Object name; when specified, this parameter is used
2700         #         for result publication in the study. Otherwise, if automatic
2701         #         publication is switched on, default value is used for result name.
2702         #
2703         #  @return New GEOM.GEOM_Object, containing the created box.
2704         #
2705         #  @ref tui_creation_box "Example"
2706         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2707             """
2708             Create a box by coordinates of two opposite vertices.
2709
2710             Parameters:
2711                 x1,y1,z1 double values, defining first point.
2712                 x2,y2,z2 double values, defining second point.
2713                 theName Object name; when specified, this parameter is used
2714                         for result publication in the study. Otherwise, if automatic
2715                         publication is switched on, default value is used for result name.
2716
2717             Returns:
2718                 New GEOM.GEOM_Object, containing the created box.
2719             """
2720             # Example: see GEOM_TestAll.py
2721             pnt1 = self.MakeVertex(x1,y1,z1)
2722             pnt2 = self.MakeVertex(x2,y2,z2)
2723             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2724             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2725
2726         ## Create a box with specified dimensions along the coordinate axes
2727         #  and with edges, parallel to the coordinate axes.
2728         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2729         #  @param theDX Length of Box edges, parallel to OX axis.
2730         #  @param theDY Length of Box edges, parallel to OY axis.
2731         #  @param theDZ Length of Box edges, parallel to OZ axis.
2732         #  @param theName Object name; when specified, this parameter is used
2733         #         for result publication in the study. Otherwise, if automatic
2734         #         publication is switched on, default value is used for result name.
2735         #
2736         #  @return New GEOM.GEOM_Object, containing the created box.
2737         #
2738         #  @ref tui_creation_box "Example"
2739         @ManageTransactions("PrimOp")
2740         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2741             """
2742             Create a box with specified dimensions along the coordinate axes
2743             and with edges, parallel to the coordinate axes.
2744             Center of the box will be at point (DX/2, DY/2, DZ/2).
2745
2746             Parameters:
2747                 theDX Length of Box edges, parallel to OX axis.
2748                 theDY Length of Box edges, parallel to OY axis.
2749                 theDZ Length of Box edges, parallel to OZ axis.
2750                 theName Object name; when specified, this parameter is used
2751                         for result publication in the study. Otherwise, if automatic
2752                         publication is switched on, default value is used for result name.
2753
2754             Returns:
2755                 New GEOM.GEOM_Object, containing the created box.
2756             """
2757             # Example: see GEOM_TestAll.py
2758             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2759             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2760             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2761             anObj.SetParameters(Parameters)
2762             self._autoPublish(anObj, theName, "box")
2763             return anObj
2764
2765         ## Create a box with two specified opposite vertices,
2766         #  and with edges, parallel to the coordinate axes
2767         #  @param thePnt1 First of two opposite vertices.
2768         #  @param thePnt2 Second of two opposite vertices.
2769         #  @param theName Object name; when specified, this parameter is used
2770         #         for result publication in the study. Otherwise, if automatic
2771         #         publication is switched on, default value is used for result name.
2772         #
2773         #  @return New GEOM.GEOM_Object, containing the created box.
2774         #
2775         #  @ref tui_creation_box "Example"
2776         @ManageTransactions("PrimOp")
2777         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2778             """
2779             Create a box with two specified opposite vertices,
2780             and with edges, parallel to the coordinate axes
2781
2782             Parameters:
2783                 thePnt1 First of two opposite vertices.
2784                 thePnt2 Second of two opposite vertices.
2785                 theName Object name; when specified, this parameter is used
2786                         for result publication in the study. Otherwise, if automatic
2787                         publication is switched on, default value is used for result name.
2788
2789             Returns:
2790                 New GEOM.GEOM_Object, containing the created box.
2791             """
2792             # Example: see GEOM_TestAll.py
2793             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2794             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2795             self._autoPublish(anObj, theName, "box")
2796             return anObj
2797
2798         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2799         #  @param theH height of Face.
2800         #  @param theW width of Face.
2801         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2802         #  @param theName Object name; when specified, this parameter is used
2803         #         for result publication in the study. Otherwise, if automatic
2804         #         publication is switched on, default value is used for result name.
2805         #
2806         #  @return New GEOM.GEOM_Object, containing the created face.
2807         #
2808         #  @ref tui_creation_face "Example"
2809         @ManageTransactions("PrimOp")
2810         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2811             """
2812             Create a face with specified dimensions with edges parallel to coordinate axes.
2813
2814             Parameters:
2815                 theH height of Face.
2816                 theW width of Face.
2817                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2818                 theName Object name; when specified, this parameter is used
2819                         for result publication in the study. Otherwise, if automatic
2820                         publication is switched on, default value is used for result name.
2821
2822             Returns:
2823                 New GEOM.GEOM_Object, containing the created face.
2824             """
2825             # Example: see GEOM_TestAll.py
2826             theH,theW,Parameters = ParseParameters(theH, theW)
2827             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2828             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2829             anObj.SetParameters(Parameters)
2830             self._autoPublish(anObj, theName, "rectangle")
2831             return anObj
2832
2833         ## Create a face from another plane and two sizes,
2834         #  vertical size and horisontal size.
2835         #  @param theObj   Normale vector to the creating face or
2836         #  the face object.
2837         #  @param theH     Height (vertical size).
2838         #  @param theW     Width (horisontal size).
2839         #  @param theName Object name; when specified, this parameter is used
2840         #         for result publication in the study. Otherwise, if automatic
2841         #         publication is switched on, default value is used for result name.
2842         #
2843         #  @return New GEOM.GEOM_Object, containing the created face.
2844         #
2845         #  @ref tui_creation_face "Example"
2846         @ManageTransactions("PrimOp")
2847         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2848             """
2849             Create a face from another plane and two sizes,
2850             vertical size and horisontal size.
2851
2852             Parameters:
2853                 theObj   Normale vector to the creating face or
2854                          the face object.
2855                 theH     Height (vertical size).
2856                 theW     Width (horisontal size).
2857                 theName Object name; when specified, this parameter is used
2858                         for result publication in the study. Otherwise, if automatic
2859                         publication is switched on, default value is used for result name.
2860
2861             Returns:
2862                 New GEOM_Object, containing the created face.
2863             """
2864             # Example: see GEOM_TestAll.py
2865             theH,theW,Parameters = ParseParameters(theH, theW)
2866             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2867             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2868             anObj.SetParameters(Parameters)
2869             self._autoPublish(anObj, theName, "rectangle")
2870             return anObj
2871
2872         ## Create a disk with given center, normal vector and radius.
2873         #  @param thePnt Disk center.
2874         #  @param theVec Vector, normal to the plane of the disk.
2875         #  @param theR Disk radius.
2876         #  @param theName Object name; when specified, this parameter is used
2877         #         for result publication in the study. Otherwise, if automatic
2878         #         publication is switched on, default value is used for result name.
2879         #
2880         #  @return New GEOM.GEOM_Object, containing the created disk.
2881         #
2882         #  @ref tui_creation_disk "Example"
2883         @ManageTransactions("PrimOp")
2884         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2885             """
2886             Create a disk with given center, normal vector and radius.
2887
2888             Parameters:
2889                 thePnt Disk center.
2890                 theVec Vector, normal to the plane of the disk.
2891                 theR Disk radius.
2892                 theName Object name; when specified, this parameter is used
2893                         for result publication in the study. Otherwise, if automatic
2894                         publication is switched on, default value is used for result name.
2895
2896             Returns:
2897                 New GEOM.GEOM_Object, containing the created disk.
2898             """
2899             # Example: see GEOM_TestAll.py
2900             theR,Parameters = ParseParameters(theR)
2901             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2902             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2903             anObj.SetParameters(Parameters)
2904             self._autoPublish(anObj, theName, "disk")
2905             return anObj
2906
2907         ## Create a disk, passing through three given points
2908         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2909         #  @param theName Object name; when specified, this parameter is used
2910         #         for result publication in the study. Otherwise, if automatic
2911         #         publication is switched on, default value is used for result name.
2912         #
2913         #  @return New GEOM.GEOM_Object, containing the created disk.
2914         #
2915         #  @ref tui_creation_disk "Example"
2916         @ManageTransactions("PrimOp")
2917         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2918             """
2919             Create a disk, passing through three given points
2920
2921             Parameters:
2922                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2923                 theName Object name; when specified, this parameter is used
2924                         for result publication in the study. Otherwise, if automatic
2925                         publication is switched on, default value is used for result name.
2926
2927             Returns:
2928                 New GEOM.GEOM_Object, containing the created disk.
2929             """
2930             # Example: see GEOM_TestAll.py
2931             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2932             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2933             self._autoPublish(anObj, theName, "disk")
2934             return anObj
2935
2936         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2937         #  @param theR Radius of Face.
2938         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2939         #  @param theName Object name; when specified, this parameter is used
2940         #         for result publication in the study. Otherwise, if automatic
2941         #         publication is switched on, default value is used for result name.
2942         #
2943         #  @return New GEOM.GEOM_Object, containing the created disk.
2944         #
2945         #  @ref tui_creation_face "Example"
2946         @ManageTransactions("PrimOp")
2947         def MakeDiskR(self, theR, theOrientation, theName=None):
2948             """
2949             Create a disk with specified dimensions along OX-OY coordinate axes.
2950
2951             Parameters:
2952                 theR Radius of Face.
2953                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2954                 theName Object name; when specified, this parameter is used
2955                         for result publication in the study. Otherwise, if automatic
2956                         publication is switched on, default value is used for result name.
2957
2958             Returns:
2959                 New GEOM.GEOM_Object, containing the created disk.
2960
2961             Example of usage:
2962                 Disk3 = geompy.MakeDiskR(100., 1)
2963             """
2964             # Example: see GEOM_TestAll.py
2965             theR,Parameters = ParseParameters(theR)
2966             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2967             RaiseIfFailed("MakeDiskR", self.PrimOp)
2968             anObj.SetParameters(Parameters)
2969             self._autoPublish(anObj, theName, "disk")
2970             return anObj
2971
2972         ## Create a cylinder with given base point, axis, radius and height.
2973         #  @param thePnt Central point of cylinder base.
2974         #  @param theAxis Cylinder axis.
2975         #  @param theR Cylinder radius.
2976         #  @param theH Cylinder height.
2977         #  @param theName Object name; when specified, this parameter is used
2978         #         for result publication in the study. Otherwise, if automatic
2979         #         publication is switched on, default value is used for result name.
2980         #
2981         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2982         #
2983         #  @ref tui_creation_cylinder "Example"
2984         @ManageTransactions("PrimOp")
2985         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2986             """
2987             Create a cylinder with given base point, axis, radius and height.
2988
2989             Parameters:
2990                 thePnt Central point of cylinder base.
2991                 theAxis Cylinder axis.
2992                 theR Cylinder radius.
2993                 theH Cylinder height.
2994                 theName Object name; when specified, this parameter is used
2995                         for result publication in the study. Otherwise, if automatic
2996                         publication is switched on, default value is used for result name.
2997
2998             Returns:
2999                 New GEOM.GEOM_Object, containing the created cylinder.
3000             """
3001             # Example: see GEOM_TestAll.py
3002             theR,theH,Parameters = ParseParameters(theR, theH)
3003             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3004             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3005             anObj.SetParameters(Parameters)
3006             self._autoPublish(anObj, theName, "cylinder")
3007             return anObj
3008             
3009         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3010         #  @param thePnt Central point of cylinder base.
3011         #  @param theAxis Cylinder axis.
3012         #  @param theR Cylinder radius.
3013         #  @param theH Cylinder height.
3014         #  @param theA Cylinder angle in radians.
3015         #  @param theName Object name; when specified, this parameter is used
3016         #         for result publication in the study. Otherwise, if automatic
3017         #         publication is switched on, default value is used for result name.
3018         #
3019         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3020         #
3021         #  @ref tui_creation_cylinder "Example"
3022         @ManageTransactions("PrimOp")
3023         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3024             """
3025             Create a portion of cylinder with given base point, axis, radius, height and angle.
3026
3027             Parameters:
3028                 thePnt Central point of cylinder base.
3029                 theAxis Cylinder axis.
3030                 theR Cylinder radius.
3031                 theH Cylinder height.
3032                 theA Cylinder angle in radians.
3033                 theName Object name; when specified, this parameter is used
3034                         for result publication in the study. Otherwise, if automatic
3035                         publication is switched on, default value is used for result name.
3036
3037             Returns:
3038                 New GEOM.GEOM_Object, containing the created cylinder.
3039             """
3040             # Example: see GEOM_TestAll.py
3041             flag = False
3042             if isinstance(theA,str):
3043                 flag = True
3044             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3045             if flag:
3046                 theA = theA*math.pi/180.
3047             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3048             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3049             anObj.SetParameters(Parameters)
3050             self._autoPublish(anObj, theName, "cylinder")
3051             return anObj
3052
3053         ## Create a cylinder with given radius and height at
3054         #  the origin of coordinate system. Axis of the cylinder
3055         #  will be collinear to the OZ axis of the coordinate system.
3056         #  @param theR Cylinder radius.
3057         #  @param theH Cylinder height.
3058         #  @param theName Object name; when specified, this parameter is used
3059         #         for result publication in the study. Otherwise, if automatic
3060         #         publication is switched on, default value is used for result name.
3061         #
3062         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3063         #
3064         #  @ref tui_creation_cylinder "Example"
3065         @ManageTransactions("PrimOp")
3066         def MakeCylinderRH(self, theR, theH, theName=None):
3067             """
3068             Create a cylinder with given radius and height at
3069             the origin of coordinate system. Axis of the cylinder
3070             will be collinear to the OZ axis of the coordinate system.
3071
3072             Parameters:
3073                 theR Cylinder radius.
3074                 theH Cylinder height.
3075                 theName Object name; when specified, this parameter is used
3076                         for result publication in the study. Otherwise, if automatic
3077                         publication is switched on, default value is used for result name.
3078
3079             Returns:
3080                 New GEOM.GEOM_Object, containing the created cylinder.
3081             """
3082             # Example: see GEOM_TestAll.py
3083             theR,theH,Parameters = ParseParameters(theR, theH)
3084             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3085             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3086             anObj.SetParameters(Parameters)
3087             self._autoPublish(anObj, theName, "cylinder")
3088             return anObj
3089             
3090         ## Create a portion of cylinder with given radius, height and angle at
3091         #  the origin of coordinate system. Axis of the cylinder
3092         #  will be collinear to the OZ axis of the coordinate system.
3093         #  @param theR Cylinder radius.
3094         #  @param theH Cylinder height.
3095         #  @param theA Cylinder angle in radians.
3096         #  @param theName Object name; when specified, this parameter is used
3097         #         for result publication in the study. Otherwise, if automatic
3098         #         publication is switched on, default value is used for result name.
3099         #
3100         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3101         #
3102         #  @ref tui_creation_cylinder "Example"
3103         @ManageTransactions("PrimOp")
3104         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3105             """
3106             Create a portion of cylinder with given radius, height and angle at
3107             the origin of coordinate system. Axis of the cylinder
3108             will be collinear to the OZ axis of the coordinate system.
3109
3110             Parameters:
3111                 theR Cylinder radius.
3112                 theH Cylinder height.
3113                 theA Cylinder angle in radians.
3114                 theName Object name; when specified, this parameter is used
3115                         for result publication in the study. Otherwise, if automatic
3116                         publication is switched on, default value is used for result name.
3117
3118             Returns:
3119                 New GEOM.GEOM_Object, containing the created cylinder.
3120             """
3121             # Example: see GEOM_TestAll.py
3122             flag = False
3123             if isinstance(theA,str):
3124                 flag = True
3125             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3126             if flag:
3127                 theA = theA*math.pi/180.
3128             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3129             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3130             anObj.SetParameters(Parameters)
3131             self._autoPublish(anObj, theName, "cylinder")
3132             return anObj
3133
3134         ## Create a sphere with given center and radius.
3135         #  @param thePnt Sphere center.
3136         #  @param theR Sphere radius.
3137         #  @param theName Object name; when specified, this parameter is used
3138         #         for result publication in the study. Otherwise, if automatic
3139         #         publication is switched on, default value is used for result name.
3140         #
3141         #  @return New GEOM.GEOM_Object, containing the created sphere.
3142         #
3143         #  @ref tui_creation_sphere "Example"
3144         @ManageTransactions("PrimOp")
3145         def MakeSpherePntR(self, thePnt, theR, theName=None):
3146             """
3147             Create a sphere with given center and radius.
3148
3149             Parameters:
3150                 thePnt Sphere center.
3151                 theR Sphere radius.
3152                 theName Object name; when specified, this parameter is used
3153                         for result publication in the study. Otherwise, if automatic
3154                         publication is switched on, default value is used for result name.
3155
3156             Returns:
3157                 New GEOM.GEOM_Object, containing the created sphere.
3158             """
3159             # Example: see GEOM_TestAll.py
3160             theR,Parameters = ParseParameters(theR)
3161             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3162             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3163             anObj.SetParameters(Parameters)
3164             self._autoPublish(anObj, theName, "sphere")
3165             return anObj
3166
3167         ## Create a sphere with given center and radius.
3168         #  @param x,y,z Coordinates of sphere center.
3169         #  @param theR Sphere radius.
3170         #  @param theName Object name; when specified, this parameter is used
3171         #         for result publication in the study. Otherwise, if automatic
3172         #         publication is switched on, default value is used for result name.
3173         #
3174         #  @return New GEOM.GEOM_Object, containing the created sphere.
3175         #
3176         #  @ref tui_creation_sphere "Example"
3177         def MakeSphere(self, x, y, z, theR, theName=None):
3178             """
3179             Create a sphere with given center and radius.
3180
3181             Parameters:
3182                 x,y,z Coordinates of sphere center.
3183                 theR Sphere radius.
3184                 theName Object name; when specified, this parameter is used
3185                         for result publication in the study. Otherwise, if automatic
3186                         publication is switched on, default value is used for result name.
3187
3188             Returns:
3189                 New GEOM.GEOM_Object, containing the created sphere.
3190             """
3191             # Example: see GEOM_TestAll.py
3192             point = self.MakeVertex(x, y, z)
3193             # note: auto-publishing is done in self.MakeSpherePntR()
3194             anObj = self.MakeSpherePntR(point, theR, theName)
3195             return anObj
3196
3197         ## Create a sphere with given radius at the origin of coordinate system.
3198         #  @param theR Sphere radius.
3199         #  @param theName Object name; when specified, this parameter is used
3200         #         for result publication in the study. Otherwise, if automatic
3201         #         publication is switched on, default value is used for result name.
3202         #
3203         #  @return New GEOM.GEOM_Object, containing the created sphere.
3204         #
3205         #  @ref tui_creation_sphere "Example"
3206         @ManageTransactions("PrimOp")
3207         def MakeSphereR(self, theR, theName=None):
3208             """
3209             Create a sphere with given radius at the origin of coordinate system.
3210
3211             Parameters:
3212                 theR Sphere radius.
3213                 theName Object name; when specified, this parameter is used
3214                         for result publication in the study. Otherwise, if automatic
3215                         publication is switched on, default value is used for result name.
3216
3217             Returns:
3218                 New GEOM.GEOM_Object, containing the created sphere.
3219             """
3220             # Example: see GEOM_TestAll.py
3221             theR,Parameters = ParseParameters(theR)
3222             anObj = self.PrimOp.MakeSphereR(theR)
3223             RaiseIfFailed("MakeSphereR", self.PrimOp)
3224             anObj.SetParameters(Parameters)
3225             self._autoPublish(anObj, theName, "sphere")
3226             return anObj
3227
3228         ## Create a cone with given base point, axis, height and radiuses.
3229         #  @param thePnt Central point of the first cone base.
3230         #  @param theAxis Cone axis.
3231         #  @param theR1 Radius of the first cone base.
3232         #  @param theR2 Radius of the second cone base.
3233         #    \note If both radiuses are non-zero, the cone will be truncated.
3234         #    \note If the radiuses are equal, a cylinder will be created instead.
3235         #  @param theH Cone height.
3236         #  @param theName Object name; when specified, this parameter is used
3237         #         for result publication in the study. Otherwise, if automatic
3238         #         publication is switched on, default value is used for result name.
3239         #
3240         #  @return New GEOM.GEOM_Object, containing the created cone.
3241         #
3242         #  @ref tui_creation_cone "Example"
3243         @ManageTransactions("PrimOp")
3244         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3245             """
3246             Create a cone with given base point, axis, height and radiuses.
3247
3248             Parameters:
3249                 thePnt Central point of the first cone base.
3250                 theAxis Cone axis.
3251                 theR1 Radius of the first cone base.
3252                 theR2 Radius of the second cone base.
3253                 theH Cone height.
3254                 theName Object name; when specified, this parameter is used
3255                         for result publication in the study. Otherwise, if automatic
3256                         publication is switched on, default value is used for result name.
3257
3258             Note:
3259                 If both radiuses are non-zero, the cone will be truncated.
3260                 If the radiuses are equal, a cylinder will be created instead.
3261
3262             Returns:
3263                 New GEOM.GEOM_Object, containing the created cone.
3264             """
3265             # Example: see GEOM_TestAll.py
3266             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3267             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3268             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3269             anObj.SetParameters(Parameters)
3270             self._autoPublish(anObj, theName, "cone")
3271             return anObj
3272
3273         ## Create a cone with given height and radiuses at
3274         #  the origin of coordinate system. Axis of the cone will
3275         #  be collinear to the OZ axis of the coordinate system.
3276         #  @param theR1 Radius of the first cone base.
3277         #  @param theR2 Radius of the second cone base.
3278         #    \note If both radiuses are non-zero, the cone will be truncated.
3279         #    \note If the radiuses are equal, a cylinder will be created instead.
3280         #  @param theH Cone height.
3281         #  @param theName Object name; when specified, this parameter is used
3282         #         for result publication in the study. Otherwise, if automatic
3283         #         publication is switched on, default value is used for result name.
3284         #
3285         #  @return New GEOM.GEOM_Object, containing the created cone.
3286         #
3287         #  @ref tui_creation_cone "Example"
3288         @ManageTransactions("PrimOp")
3289         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3290             """
3291             Create a cone with given height and radiuses at
3292             the origin of coordinate system. Axis of the cone will
3293             be collinear to the OZ axis of the coordinate system.
3294
3295             Parameters:
3296                 theR1 Radius of the first cone base.
3297                 theR2 Radius of the second cone base.
3298                 theH Cone height.
3299                 theName Object name; when specified, this parameter is used
3300                         for result publication in the study. Otherwise, if automatic
3301                         publication is switched on, default value is used for result name.
3302
3303             Note:
3304                 If both radiuses are non-zero, the cone will be truncated.
3305                 If the radiuses are equal, a cylinder will be created instead.
3306
3307             Returns:
3308                 New GEOM.GEOM_Object, containing the created cone.
3309             """
3310             # Example: see GEOM_TestAll.py
3311             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3312             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3313             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3314             anObj.SetParameters(Parameters)
3315             self._autoPublish(anObj, theName, "cone")
3316             return anObj
3317
3318         ## Create a torus with given center, normal vector and radiuses.
3319         #  @param thePnt Torus central point.
3320         #  @param theVec Torus axis of symmetry.
3321         #  @param theRMajor Torus major radius.
3322         #  @param theRMinor Torus minor radius.
3323         #  @param theName Object name; when specified, this parameter is used
3324         #         for result publication in the study. Otherwise, if automatic
3325         #         publication is switched on, default value is used for result name.
3326         #
3327         #  @return New GEOM.GEOM_Object, containing the created torus.
3328         #
3329         #  @ref tui_creation_torus "Example"
3330         @ManageTransactions("PrimOp")
3331         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3332             """
3333             Create a torus with given center, normal vector and radiuses.
3334
3335             Parameters:
3336                 thePnt Torus central point.
3337                 theVec Torus axis of symmetry.
3338                 theRMajor Torus major radius.
3339                 theRMinor Torus minor radius.
3340                 theName Object name; when specified, this parameter is used
3341                         for result publication in the study. Otherwise, if automatic
3342                         publication is switched on, default value is used for result name.
3343
3344            Returns:
3345                 New GEOM.GEOM_Object, containing the created torus.
3346             """
3347             # Example: see GEOM_TestAll.py
3348             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3349             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3350             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3351             anObj.SetParameters(Parameters)
3352             self._autoPublish(anObj, theName, "torus")
3353             return anObj
3354
3355         ## Create a torus with given radiuses at the origin of coordinate system.
3356         #  @param theRMajor Torus major radius.
3357         #  @param theRMinor Torus minor radius.
3358         #  @param theName Object name; when specified, this parameter is used
3359         #         for result publication in the study. Otherwise, if automatic
3360         #         publication is switched on, default value is used for result name.
3361         #
3362         #  @return New GEOM.GEOM_Object, containing the created torus.
3363         #
3364         #  @ref tui_creation_torus "Example"
3365         @ManageTransactions("PrimOp")
3366         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3367             """
3368            Create a torus with given radiuses at the origin of coordinate system.
3369
3370            Parameters:
3371                 theRMajor Torus major radius.
3372                 theRMinor Torus minor radius.
3373                 theName Object name; when specified, this parameter is used
3374                         for result publication in the study. Otherwise, if automatic
3375                         publication is switched on, default value is used for result name.
3376
3377            Returns:
3378                 New GEOM.GEOM_Object, containing the created torus.
3379             """
3380             # Example: see GEOM_TestAll.py
3381             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3382             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3383             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3384             anObj.SetParameters(Parameters)
3385             self._autoPublish(anObj, theName, "torus")
3386             return anObj
3387
3388         # end of l3_3d_primitives
3389         ## @}
3390
3391         ## @addtogroup l3_complex
3392         ## @{
3393
3394         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3395         #  @param theBase Base shape to be extruded.
3396         #  @param thePoint1 First end of extrusion vector.
3397         #  @param thePoint2 Second end of extrusion vector.
3398         #  @param theScaleFactor Use it to make prism with scaled second base.
3399         #                        Nagative value means not scaled second base.
3400         #  @param theName Object name; when specified, this parameter is used
3401         #         for result publication in the study. Otherwise, if automatic
3402         #         publication is switched on, default value is used for result name.
3403         #
3404         #  @return New GEOM.GEOM_Object, containing the created prism.
3405         #
3406         #  @ref tui_creation_prism "Example"
3407         @ManageTransactions("PrimOp")
3408         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3409             """
3410             Create a shape by extrusion of the base shape along a vector, defined by two points.
3411
3412             Parameters:
3413                 theBase Base shape to be extruded.
3414                 thePoint1 First end of extrusion vector.
3415                 thePoint2 Second end of extrusion vector.
3416                 theScaleFactor Use it to make prism with scaled second base.
3417                                Nagative value means not scaled second base.
3418                 theName Object name; when specified, this parameter is used
3419                         for result publication in the study. Otherwise, if automatic
3420                         publication is switched on, default value is used for result name.
3421
3422             Returns:
3423                 New GEOM.GEOM_Object, containing the created prism.
3424             """
3425             # Example: see GEOM_TestAll.py
3426             anObj = None
3427             Parameters = ""
3428             if theScaleFactor > 0:
3429                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3430                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3431             else:
3432                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3433             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3434             anObj.SetParameters(Parameters)
3435             self._autoPublish(anObj, theName, "prism")
3436             return anObj
3437
3438         ## Create a shape by extrusion of the base shape along a
3439         #  vector, defined by two points, in 2 Ways (forward/backward).
3440         #  @param theBase Base shape to be extruded.
3441         #  @param thePoint1 First end of extrusion vector.
3442         #  @param thePoint2 Second end of extrusion vector.
3443         #  @param theName Object name; when specified, this parameter is used
3444         #         for result publication in the study. Otherwise, if automatic
3445         #         publication is switched on, default value is used for result name.
3446         #
3447         #  @return New GEOM.GEOM_Object, containing the created prism.
3448         #
3449         #  @ref tui_creation_prism "Example"
3450         @ManageTransactions("PrimOp")
3451         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3452             """
3453             Create a shape by extrusion of the base shape along a
3454             vector, defined by two points, in 2 Ways (forward/backward).
3455
3456             Parameters:
3457                 theBase Base shape to be extruded.
3458                 thePoint1 First end of extrusion vector.
3459                 thePoint2 Second end of extrusion vector.
3460                 theName Object name; when specified, this parameter is used
3461                         for result publication in the study. Otherwise, if automatic
3462                         publication is switched on, default value is used for result name.
3463
3464             Returns:
3465                 New GEOM.GEOM_Object, containing the created prism.
3466             """
3467             # Example: see GEOM_TestAll.py
3468             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3469             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3470             self._autoPublish(anObj, theName, "prism")
3471             return anObj
3472
3473         ## Create a shape by extrusion of the base shape along the vector,
3474         #  i.e. all the space, transfixed by the base shape during its translation
3475         #  along the vector on the given distance.
3476         #  @param theBase Base shape to be extruded.
3477         #  @param theVec Direction of extrusion.
3478         #  @param theH Prism dimension along theVec.
3479         #  @param theScaleFactor Use it to make prism with scaled second base.
3480         #                        Negative value means not scaled second base.
3481         #  @param theName Object name; when specified, this parameter is used
3482         #         for result publication in the study. Otherwise, if automatic
3483         #         publication is switched on, default value is used for result name.
3484         #
3485         #  @return New GEOM.GEOM_Object, containing the created prism.
3486         #
3487         #  @ref tui_creation_prism "Example"
3488         @ManageTransactions("PrimOp")
3489         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3490             """
3491             Create a shape by extrusion of the base shape along the vector,
3492             i.e. all the space, transfixed by the base shape during its translation
3493             along the vector on the given distance.
3494
3495             Parameters:
3496                 theBase Base shape to be extruded.
3497                 theVec Direction of extrusion.
3498                 theH Prism dimension along theVec.
3499                 theScaleFactor Use it to make prism with scaled second base.
3500                                Negative value means not scaled second base.
3501                 theName Object name; when specified, this parameter is used
3502                         for result publication in the study. Otherwise, if automatic
3503                         publication is switched on, default value is used for result name.
3504
3505             Returns:
3506                 New GEOM.GEOM_Object, containing the created prism.
3507             """
3508             # Example: see GEOM_TestAll.py
3509             anObj = None
3510             Parameters = ""
3511             if theScaleFactor > 0:
3512                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3513                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3514             else:
3515                 theH,Parameters = ParseParameters(theH)
3516                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3517             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3518             anObj.SetParameters(Parameters)
3519             self._autoPublish(anObj, theName, "prism")
3520             return anObj
3521
3522         ## Create a shape by extrusion of the base shape along the vector,
3523         #  i.e. all the space, transfixed by the base shape during its translation
3524         #  along the vector on the given distance in 2 Ways (forward/backward).
3525         #  @param theBase Base shape to be extruded.
3526         #  @param theVec Direction of extrusion.
3527         #  @param theH Prism dimension along theVec in forward direction.
3528         #  @param theName Object name; when specified, this parameter is used
3529         #         for result publication in the study. Otherwise, if automatic
3530         #         publication is switched on, default value is used for result name.
3531         #
3532         #  @return New GEOM.GEOM_Object, containing the created prism.
3533         #
3534         #  @ref tui_creation_prism "Example"
3535         @ManageTransactions("PrimOp")
3536         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3537             """
3538             Create a shape by extrusion of the base shape along the vector,
3539             i.e. all the space, transfixed by the base shape during its translation
3540             along the vector on the given distance in 2 Ways (forward/backward).
3541
3542             Parameters:
3543                 theBase Base shape to be extruded.
3544                 theVec Direction of extrusion.
3545                 theH Prism dimension along theVec in forward direction.
3546                 theName Object name; when specified, this parameter is used
3547                         for result publication in the study. Otherwise, if automatic
3548                         publication is switched on, default value is used for result name.
3549
3550             Returns:
3551                 New GEOM.GEOM_Object, containing the created prism.
3552             """
3553             # Example: see GEOM_TestAll.py
3554             theH,Parameters = ParseParameters(theH)
3555             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3556             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3557             anObj.SetParameters(Parameters)
3558             self._autoPublish(anObj, theName, "prism")
3559             return anObj
3560
3561         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3562         #  @param theBase Base shape to be extruded.
3563         #  @param theDX, theDY, theDZ Directions of extrusion.
3564         #  @param theScaleFactor Use it to make prism with scaled second base.
3565         #                        Nagative value means not scaled second base.
3566         #  @param theName Object name; when specified, this parameter is used
3567         #         for result publication in the study. Otherwise, if automatic
3568         #         publication is switched on, default value is used for result name.
3569         #
3570         #  @return New GEOM.GEOM_Object, containing the created prism.
3571         #
3572         #  @ref tui_creation_prism "Example"
3573         @ManageTransactions("PrimOp")
3574         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3575             """
3576             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3577
3578             Parameters:
3579                 theBase Base shape to be extruded.
3580                 theDX, theDY, theDZ Directions of extrusion.
3581                 theScaleFactor Use it to make prism with scaled second base.
3582                                Nagative value means not scaled second base.
3583                 theName Object name; when specified, this parameter is used
3584                         for result publication in the study. Otherwise, if automatic
3585                         publication is switched on, default value is used for result name.
3586
3587             Returns:
3588                 New GEOM.GEOM_Object, containing the created prism.
3589             """
3590             # Example: see GEOM_TestAll.py
3591             anObj = None
3592             Parameters = ""
3593             if theScaleFactor > 0:
3594                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3595                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3596             else:
3597                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3598                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3599             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3600             anObj.SetParameters(Parameters)
3601             self._autoPublish(anObj, theName, "prism")
3602             return anObj
3603
3604         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3605         #  i.e. all the space, transfixed by the base shape during its translation
3606         #  along the vector on the given distance in 2 Ways (forward/backward).
3607         #  @param theBase Base shape to be extruded.
3608         #  @param theDX, theDY, theDZ Directions of extrusion.
3609         #  @param theName Object name; when specified, this parameter is used
3610         #         for result publication in the study. Otherwise, if automatic
3611         #         publication is switched on, default value is used for result name.
3612         #
3613         #  @return New GEOM.GEOM_Object, containing the created prism.
3614         #
3615         #  @ref tui_creation_prism "Example"
3616         @ManageTransactions("PrimOp")
3617         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3618             """
3619             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3620             i.e. all the space, transfixed by the base shape during its translation
3621             along the vector on the given distance in 2 Ways (forward/backward).
3622
3623             Parameters:
3624                 theBase Base shape to be extruded.
3625                 theDX, theDY, theDZ Directions of extrusion.
3626                 theName Object name; when specified, this parameter is used
3627                         for result publication in the study. Otherwise, if automatic
3628                         publication is switched on, default value is used for result name.
3629
3630             Returns:
3631                 New GEOM.GEOM_Object, containing the created prism.
3632             """
3633             # Example: see GEOM_TestAll.py
3634             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3635             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3636             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3637             anObj.SetParameters(Parameters)
3638             self._autoPublish(anObj, theName, "prism")
3639             return anObj
3640
3641         ## Create a shape by revolution of the base shape around the axis
3642         #  on the given angle, i.e. all the space, transfixed by the base
3643         #  shape during its rotation around the axis on the given angle.
3644         #  @param theBase Base shape to be rotated.
3645         #  @param theAxis Rotation axis.
3646         #  @param theAngle Rotation angle in radians.
3647         #  @param theName Object name; when specified, this parameter is used
3648         #         for result publication in the study. Otherwise, if automatic
3649         #         publication is switched on, default value is used for result name.
3650         #
3651         #  @return New GEOM.GEOM_Object, containing the created revolution.
3652         #
3653         #  @ref tui_creation_revolution "Example"
3654         @ManageTransactions("PrimOp")
3655         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3656             """
3657             Create a shape by revolution of the base shape around the axis
3658             on the given angle, i.e. all the space, transfixed by the base
3659             shape during its rotation around the axis on the given angle.
3660
3661             Parameters:
3662                 theBase Base shape to be rotated.
3663                 theAxis Rotation axis.
3664                 theAngle Rotation angle in radians.
3665                 theName Object name; when specified, this parameter is used
3666                         for result publication in the study. Otherwise, if automatic
3667                         publication is switched on, default value is used for result name.
3668
3669             Returns:
3670                 New GEOM.GEOM_Object, containing the created revolution.
3671             """
3672             # Example: see GEOM_TestAll.py
3673             theAngle,Parameters = ParseParameters(theAngle)
3674             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3675             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3676             anObj.SetParameters(Parameters)
3677             self._autoPublish(anObj, theName, "revolution")
3678             return anObj
3679
3680         ## Create a shape by revolution of the base shape around the axis
3681         #  on the given angle, i.e. all the space, transfixed by the base
3682         #  shape during its rotation around the axis on the given angle in
3683         #  both directions (forward/backward)
3684         #  @param theBase Base shape to be rotated.
3685         #  @param theAxis Rotation axis.
3686         #  @param theAngle Rotation angle in radians.
3687         #  @param theName Object name; when specified, this parameter is used
3688         #         for result publication in the study. Otherwise, if automatic
3689         #         publication is switched on, default value is used for result name.
3690         #
3691         #  @return New GEOM.GEOM_Object, containing the created revolution.
3692         #
3693         #  @ref tui_creation_revolution "Example"
3694         @ManageTransactions("PrimOp")
3695         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3696             """
3697             Create a shape by revolution of the base shape around the axis
3698             on the given angle, i.e. all the space, transfixed by the base
3699             shape during its rotation around the axis on the given angle in
3700             both directions (forward/backward).
3701
3702             Parameters:
3703                 theBase Base shape to be rotated.
3704                 theAxis Rotation axis.
3705                 theAngle Rotation angle in radians.
3706                 theName Object name; when specified, this parameter is used
3707                         for result publication in the study. Otherwise, if automatic
3708                         publication is switched on, default value is used for result name.
3709
3710             Returns:
3711                 New GEOM.GEOM_Object, containing the created revolution.
3712             """
3713             theAngle,Parameters = ParseParameters(theAngle)
3714             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3715             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3716             anObj.SetParameters(Parameters)
3717             self._autoPublish(anObj, theName, "revolution")
3718             return anObj
3719
3720         ## Create a filling from the given compound of contours.
3721         #  @param theShape the compound of contours
3722         #  @param theMinDeg a minimal degree of BSpline surface to create
3723         #  @param theMaxDeg a maximal degree of BSpline surface to create
3724         #  @param theTol2D a 2d tolerance to be reached
3725         #  @param theTol3D a 3d tolerance to be reached
3726         #  @param theNbIter a number of iteration of approximation algorithm
3727         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3728         #  @param isApprox if True, BSpline curves are generated in the process
3729         #                  of surface construction. By default it is False, that means
3730         #                  the surface is created using given curves. The usage of
3731         #                  Approximation makes the algorithm work slower, but allows
3732         #                  building the surface for rather complex cases.
3733         #  @param theName Object name; when specified, this parameter is used
3734         #         for result publication in the study. Otherwise, if automatic
3735         #         publication is switched on, default value is used for result name.
3736         #
3737         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3738         #
3739         #  @ref tui_creation_filling "Example"
3740         @ManageTransactions("PrimOp")
3741         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3742                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3743             """
3744             Create a filling from the given compound of contours.
3745
3746             Parameters:
3747                 theShape the compound of contours
3748                 theMinDeg a minimal degree of BSpline surface to create
3749                 theMaxDeg a maximal degree of BSpline surface to create
3750                 theTol2D a 2d tolerance to be reached
3751                 theTol3D a 3d tolerance to be reached
3752                 theNbIter a number of iteration of approximation algorithm
3753                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3754                 isApprox if True, BSpline curves are generated in the process
3755                          of surface construction. By default it is False, that means
3756                          the surface is created using given curves. The usage of
3757                          Approximation makes the algorithm work slower, but allows
3758                          building the surface for rather complex cases
3759                 theName Object name; when specified, this parameter is used
3760                         for result publication in the study. Otherwise, if automatic
3761                         publication is switched on, default value is used for result name.
3762
3763             Returns:
3764                 New GEOM.GEOM_Object, containing the created filling surface.
3765
3766             Example of usage:
3767                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3768             """
3769             # Example: see GEOM_TestAll.py
3770             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3771             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3772                                             theTol2D, theTol3D, theNbIter,
3773                                             theMethod, isApprox)
3774             RaiseIfFailed("MakeFilling", self.PrimOp)
3775             anObj.SetParameters(Parameters)
3776             self._autoPublish(anObj, theName, "filling")
3777             return anObj
3778
3779
3780         ## Create a filling from the given compound of contours.
3781         #  This method corresponds to MakeFilling with isApprox=True
3782         #  @param theShape the compound of contours
3783         #  @param theMinDeg a minimal degree of BSpline surface to create
3784         #  @param theMaxDeg a maximal degree of BSpline surface to create
3785         #  @param theTol3D a 3d tolerance to be reached
3786         #  @param theName Object name; when specified, this parameter is used
3787         #         for result publication in the study. Otherwise, if automatic
3788         #         publication is switched on, default value is used for result name.
3789         #
3790         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3791         #
3792         #  @ref tui_creation_filling "Example"
3793         @ManageTransactions("PrimOp")
3794         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3795             """
3796             Create a filling from the given compound of contours.
3797             This method corresponds to MakeFilling with isApprox=True
3798
3799             Parameters:
3800                 theShape the compound of contours
3801                 theMinDeg a minimal degree of BSpline surface to create
3802                 theMaxDeg a maximal degree of BSpline surface to create
3803                 theTol3D a 3d tolerance to be reached
3804                 theName Object name; when specified, this parameter is used
3805                         for result publication in the study. Otherwise, if automatic
3806                         publication is switched on, default value is used for result name.
3807
3808             Returns:
3809                 New GEOM.GEOM_Object, containing the created filling surface.
3810
3811             Example of usage:
3812                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3813             """
3814             # Example: see GEOM_TestAll.py
3815             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3816             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3817                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3818             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3819             anObj.SetParameters(Parameters)
3820             self._autoPublish(anObj, theName, "filling")
3821             return anObj
3822
3823         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3824         #  @param theSeqSections - set of specified sections.
3825         #  @param theModeSolid - mode defining building solid or shell
3826         #  @param thePreci - precision 3D used for smoothing
3827         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3828         #  @param theName Object name; when specified, this parameter is used
3829         #         for result publication in the study. Otherwise, if automatic
3830         #         publication is switched on, default value is used for result name.
3831         #
3832         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3833         #
3834         #  @ref swig_todo "Example"
3835         @ManageTransactions("PrimOp")
3836         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3837             """
3838             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3839
3840             Parameters:
3841                 theSeqSections - set of specified sections.
3842                 theModeSolid - mode defining building solid or shell
3843                 thePreci - precision 3D used for smoothing
3844                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3845                 theName Object name; when specified, this parameter is used
3846                         for result publication in the study. Otherwise, if automatic
3847                         publication is switched on, default value is used for result name.
3848
3849             Returns:
3850                 New GEOM.GEOM_Object, containing the created shell or solid.
3851             """
3852             # Example: see GEOM_TestAll.py
3853             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3854             RaiseIfFailed("MakeThruSections", self.PrimOp)
3855             self._autoPublish(anObj, theName, "filling")
3856             return anObj
3857
3858         ## Create a shape by extrusion of the base shape along
3859         #  the path shape. The path shape can be a wire or an edge.
3860         #  @param theBase Base shape to be extruded.
3861         #  @param thePath Path shape to extrude the base shape along it.
3862         #  @param theName Object name; when specified, this parameter is used
3863         #         for result publication in the study. Otherwise, if automatic
3864         #         publication is switched on, default value is used for result name.
3865         #
3866         #  @return New GEOM.GEOM_Object, containing the created pipe.
3867         #
3868         #  @ref tui_creation_pipe "Example"
3869         @ManageTransactions("PrimOp")
3870         def MakePipe(self, theBase, thePath, theName=None):
3871             """
3872             Create a shape by extrusion of the base shape along
3873             the path shape. The path shape can be a wire or an edge.
3874
3875             Parameters:
3876                 theBase Base shape to be extruded.
3877                 thePath Path shape to extrude the base shape along it.
3878                 theName Object name; when specified, this parameter is used
3879                         for result publication in the study. Otherwise, if automatic
3880                         publication is switched on, default value is used for result name.
3881
3882             Returns:
3883                 New GEOM.GEOM_Object, containing the created pipe.
3884             """
3885             # Example: see GEOM_TestAll.py
3886             anObj = self.PrimOp.MakePipe(theBase, thePath)
3887             RaiseIfFailed("MakePipe", self.PrimOp)
3888             self._autoPublish(anObj, theName, "pipe")
3889             return anObj
3890
3891         ## Create a shape by extrusion of the profile shape along
3892         #  the path shape. The path shape can be a wire or an edge.
3893         #  the several profiles can be specified in the several locations of path.
3894         #  @param theSeqBases - list of  Bases shape to be extruded.
3895         #  @param theLocations - list of locations on the path corresponding
3896         #                        specified list of the Bases shapes. Number of locations
3897         #                        should be equal to number of bases or list of locations can be empty.
3898         #  @param thePath - Path shape to extrude the base shape along it.
3899         #  @param theWithContact - the mode defining that the section is translated to be in
3900         #                          contact with the spine.
3901         #  @param theWithCorrection - defining that the section is rotated to be
3902         #                             orthogonal to the spine tangent in the correspondent point
3903         #  @param theName Object name; when specified, this parameter is used
3904         #         for result publication in the study. Otherwise, if automatic
3905         #         publication is switched on, default value is used for result name.
3906         #
3907         #  @return New GEOM.GEOM_Object, containing the created pipe.
3908         #
3909         #  @ref tui_creation_pipe_with_diff_sec "Example"
3910         @ManageTransactions("PrimOp")
3911         def MakePipeWithDifferentSections(self, theSeqBases,
3912                                           theLocations, thePath,
3913                                           theWithContact, theWithCorrection, theName=None):
3914             """
3915             Create a shape by extrusion of the profile shape along
3916             the path shape. The path shape can be a wire or an edge.
3917             the several profiles can be specified in the several locations of path.
3918
3919             Parameters:
3920                 theSeqBases - list of  Bases shape to be extruded.
3921                 theLocations - list of locations on the path corresponding
3922                                specified list of the Bases shapes. Number of locations
3923                                should be equal to number of bases or list of locations can be empty.
3924                 thePath - Path shape to extrude the base shape along it.
3925                 theWithContact - the mode defining that the section is translated to be in
3926                                  contact with the spine(0/1)
3927                 theWithCorrection - defining that the section is rotated to be
3928                                     orthogonal to the spine tangent in the correspondent point (0/1)
3929                 theName Object name; when specified, this parameter is used
3930                         for result publication in the study. Otherwise, if automatic
3931                         publication is switched on, default value is used for result name.
3932
3933             Returns:
3934                 New GEOM.GEOM_Object, containing the created pipe.
3935             """
3936             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3937                                                               theLocations, thePath,
3938                                                               theWithContact, theWithCorrection)
3939             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3940             self._autoPublish(anObj, theName, "pipe")
3941             return anObj
3942
3943         ## Create a shape by extrusion of the profile shape along
3944         #  the path shape. The path shape can be a wire or a edge.
3945         #  the several profiles can be specified in the several locations of path.
3946         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3947         #                       shell or face. If number of faces in neighbour sections
3948         #                       aren't coincided result solid between such sections will
3949         #                       be created using external boundaries of this shells.
3950         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3951         #                          This list is used for searching correspondences between
3952         #                          faces in the sections. Size of this list must be equal
3953         #                          to size of list of base shapes.
3954         #  @param theLocations - list of locations on the path corresponding
3955         #                        specified list of the Bases shapes. Number of locations
3956         #                        should be equal to number of bases. First and last
3957         #                        locations must be coincided with first and last vertexes
3958         #                        of path correspondingly.
3959         #  @param thePath - Path shape to extrude the base shape along it.
3960         #  @param theWithContact - the mode defining that the section is translated to be in
3961         #                          contact with the spine.
3962         #  @param theWithCorrection - defining that the section is rotated to be
3963         #                             orthogonal to the spine tangent in the correspondent point
3964         #  @param theName Object name; when specified, this parameter is used
3965         #         for result publication in the study. Otherwise, if automatic
3966         #         publication is switched on, default value is used for result name.
3967         #
3968         #  @return New GEOM.GEOM_Object, containing the created solids.
3969         #
3970         #  @ref tui_creation_pipe_with_shell_sec "Example"
3971         @ManageTransactions("PrimOp")
3972         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3973                                       theLocations, thePath,
3974                                       theWithContact, theWithCorrection, theName=None):
3975             """
3976             Create a shape by extrusion of the profile shape along
3977             the path shape. The path shape can be a wire or a edge.
3978             the several profiles can be specified in the several locations of path.
3979
3980             Parameters:
3981                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3982                               shell or face. If number of faces in neighbour sections
3983                               aren't coincided result solid between such sections will
3984                               be created using external boundaries of this shells.
3985                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3986                                  This list is used for searching correspondences between
3987                                  faces in the sections. Size of this list must be equal
3988                                  to size of list of base shapes.
3989                 theLocations - list of locations on the path corresponding
3990                                specified list of the Bases shapes. Number of locations
3991                                should be equal to number of bases. First and last
3992                                locations must be coincided with first and last vertexes
3993                                of path correspondingly.
3994                 thePath - Path shape to extrude the base shape along it.
3995                 theWithContact - the mode defining that the section is translated to be in
3996                                  contact with the spine (0/1)
3997                 theWithCorrection - defining that the section is rotated to be
3998                                     orthogonal to the spine tangent in the correspondent point (0/1)
3999                 theName Object name; when specified, this parameter is used
4000                         for result publication in the study. Otherwise, if automatic
4001                         publication is switched on, default value is used for result name.
4002
4003             Returns:
4004                 New GEOM.GEOM_Object, containing the created solids.
4005             """
4006             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4007                                                           theLocations, thePath,
4008                                                           theWithContact, theWithCorrection)
4009             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4010             self._autoPublish(anObj, theName, "pipe")
4011             return anObj
4012
4013         ## Create a shape by extrusion of the profile shape along
4014         #  the path shape. This function is used only for debug pipe
4015         #  functionality - it is a version of function MakePipeWithShellSections()
4016         #  which give a possibility to recieve information about
4017         #  creating pipe between each pair of sections step by step.
4018         @ManageTransactions("PrimOp")
4019         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4020                                              theLocations, thePath,
4021                                              theWithContact, theWithCorrection, theName=None):
4022             """
4023             Create a shape by extrusion of the profile shape along
4024             the path shape. This function is used only for debug pipe
4025             functionality - it is a version of previous function
4026             geompy.MakePipeWithShellSections() which give a possibility to
4027             recieve information about creating pipe between each pair of
4028             sections step by step.
4029             """
4030             res = []
4031             nbsect = len(theSeqBases)
4032             nbsubsect = len(theSeqSubBases)
4033             #print "nbsect = ",nbsect
4034             for i in range(1,nbsect):
4035                 #print "  i = ",i
4036                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4037                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4038                 tmpSeqSubBases = []
4039                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4040                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4041                                                               tmpLocations, thePath,
4042                                                               theWithContact, theWithCorrection)
4043                 if self.PrimOp.IsDone() == 0:
4044                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4045                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4046                     break
4047                 else:
4048                     print "Pipe between ",i," and ",i+1," sections is OK"
4049                     res.append(anObj)
4050                     pass
4051                 pass
4052
4053             resc = self.MakeCompound(res)
4054             #resc = self.MakeSewing(res, 0.001)
4055             #print "resc: ",resc
4056             self._autoPublish(resc, theName, "pipe")
4057             return resc
4058
4059         ## Create solids between given sections
4060         #  @param theSeqBases - list of sections (shell or face).
4061         #  @param theLocations - list of corresponding vertexes
4062         #  @param theName Object name; when specified, this parameter is used
4063         #         for result publication in the study. Otherwise, if automatic
4064         #         publication is switched on, default value is used for result name.
4065         #
4066         #  @return New GEOM.GEOM_Object, containing the created solids.
4067         #
4068         #  @ref tui_creation_pipe_without_path "Example"
4069         @ManageTransactions("PrimOp")
4070         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
4071             """
4072             Create solids between given sections
4073
4074             Parameters:
4075                 theSeqBases - list of sections (shell or face).
4076                 theLocations - list of corresponding vertexes
4077                 theName Object name; when specified, this parameter is used
4078                         for result publication in the study. Otherwise, if automatic
4079                         publication is switched on, default value is used for result name.
4080
4081             Returns:
4082                 New GEOM.GEOM_Object, containing the created solids.
4083             """
4084             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
4085             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4086             self._autoPublish(anObj, theName, "pipe")
4087             return anObj
4088
4089         ## Create a shape by extrusion of the base shape along
4090         #  the path shape with constant bi-normal direction along the given vector.
4091         #  The path shape can be a wire or an edge.
4092         #  @param theBase Base shape to be extruded.
4093         #  @param thePath Path shape to extrude the base shape along it.
4094         #  @param theVec Vector defines a constant binormal direction to keep the
4095         #                same angle beetween the direction and the sections
4096         #                along the sweep surface.
4097         #  @param theName Object name; when specified, this parameter is used
4098         #         for result publication in the study. Otherwise, if automatic
4099         #         publication is switched on, default value is used for result name.
4100         #
4101         #  @return New GEOM.GEOM_Object, containing the created pipe.
4102         #
4103         #  @ref tui_creation_pipe "Example"
4104         @ManageTransactions("PrimOp")
4105         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4106             """
4107             Create a shape by extrusion of the base shape along
4108             the path shape with constant bi-normal direction along the given vector.
4109             The path shape can be a wire or an edge.
4110
4111             Parameters:
4112                 theBase Base shape to be extruded.
4113                 thePath Path shape to extrude the base shape along it.
4114                 theVec Vector defines a constant binormal direction to keep the
4115                        same angle beetween the direction and the sections
4116                        along the sweep surface.
4117                 theName Object name; when specified, this parameter is used
4118                         for result publication in the study. Otherwise, if automatic
4119                         publication is switched on, default value is used for result name.
4120
4121             Returns:
4122                 New GEOM.GEOM_Object, containing the created pipe.
4123             """
4124             # Example: see GEOM_TestAll.py
4125             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4126             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4127             self._autoPublish(anObj, theName, "pipe")
4128             return anObj
4129
4130         ## Makes a thick solid from a face or a shell
4131         #  @param theShape Face or Shell to be thicken
4132         #  @param theThickness Thickness of the resulting solid
4133         #  @param theName Object name; when specified, this parameter is used
4134         #         for result publication in the study. Otherwise, if automatic
4135         #         publication is switched on, default value is used for result name.
4136         #
4137         #  @return New GEOM.GEOM_Object, containing the created solid
4138         #
4139         @ManageTransactions("PrimOp")
4140         def MakeThickSolid(self, theShape, theThickness, theName=None):
4141             """
4142             Make a thick solid from a face or a shell
4143
4144             Parameters:
4145                  theShape Face or Shell to be thicken
4146                  theThickness Thickness of the resulting solid
4147                  theName Object name; when specified, this parameter is used
4148                  for result publication in the study. Otherwise, if automatic
4149                  publication is switched on, default value is used for result name.
4150
4151             Returns:
4152                 New GEOM.GEOM_Object, containing the created solid
4153             """
4154             # Example: see GEOM_TestAll.py
4155             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4156             RaiseIfFailed("MakeThickening", self.PrimOp)
4157             self._autoPublish(anObj, theName, "pipe")
4158             return anObj
4159
4160
4161         ## Modifies a face or a shell to make it a thick solid
4162         #  @param theShape Face or Shell to be thicken
4163         #  @param theThickness Thickness of the resulting solid
4164         #
4165         #  @return The modified shape
4166         #
4167         @ManageTransactions("PrimOp")
4168         def Thicken(self, theShape, theThickness):
4169             """
4170             Modifies a face or a shell to make it a thick solid
4171
4172             Parameters:
4173                 theBase Base shape to be extruded.
4174                 thePath Path shape to extrude the base shape along it.
4175                 theName Object name; when specified, this parameter is used
4176                         for result publication in the study. Otherwise, if automatic
4177                         publication is switched on, default value is used for result name.
4178
4179             Returns:
4180                 The modified shape
4181             """
4182             # Example: see GEOM_TestAll.py
4183             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4184             RaiseIfFailed("MakeThickening", self.PrimOp)
4185             return anObj
4186
4187         ## Build a middle path of a pipe-like shape.
4188         #  The path shape can be a wire or an edge.
4189         #  @param theShape It can be closed or unclosed pipe-like shell
4190         #                  or a pipe-like solid.
4191         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4192         #                            should be wires or faces of theShape.
4193         #  @param theName Object name; when specified, this parameter is used
4194         #         for result publication in the study. Otherwise, if automatic
4195         #         publication is switched on, default value is used for result name.
4196         #
4197         #  @note It is not assumed that exact or approximate copy of theShape
4198         #        can be obtained by applying existing Pipe operation on the
4199         #        resulting "Path" wire taking theBase1 as the base - it is not
4200         #        always possible; though in some particular cases it might work
4201         #        it is not guaranteed. Thus, RestorePath function should not be
4202         #        considered as an exact reverse operation of the Pipe.
4203         #
4204         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4205         #                                source pipe's "path".
4206         #
4207         #  @ref tui_creation_pipe_path "Example"
4208         @ManageTransactions("PrimOp")
4209         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4210             """
4211             Build a middle path of a pipe-like shape.
4212             The path shape can be a wire or an edge.
4213
4214             Parameters:
4215                 theShape It can be closed or unclosed pipe-like shell
4216                          or a pipe-like solid.
4217                 theBase1, theBase2 Two bases of the supposed pipe. This
4218                                    should be wires or faces of theShape.
4219                 theName Object name; when specified, this parameter is used
4220                         for result publication in the study. Otherwise, if automatic
4221                         publication is switched on, default value is used for result name.
4222
4223             Returns:
4224                 New GEOM_Object, containing an edge or wire that represent
4225                                  source pipe's path.
4226             """
4227             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4228             RaiseIfFailed("RestorePath", self.PrimOp)
4229             self._autoPublish(anObj, theName, "path")
4230             return anObj
4231
4232         ## Build a middle path of a pipe-like shape.
4233         #  The path shape can be a wire or an edge.
4234         #  @param theShape It can be closed or unclosed pipe-like shell
4235         #                  or a pipe-like solid.
4236         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4237         #                                should be lists of edges of theShape.
4238         #  @param theName Object name; when specified, this parameter is used
4239         #         for result publication in the study. Otherwise, if automatic
4240         #         publication is switched on, default value is used for result name.
4241         #
4242         #  @note It is not assumed that exact or approximate copy of theShape
4243         #        can be obtained by applying existing Pipe operation on the
4244         #        resulting "Path" wire taking theBase1 as the base - it is not
4245         #        always possible; though in some particular cases it might work
4246         #        it is not guaranteed. Thus, RestorePath function should not be
4247         #        considered as an exact reverse operation of the Pipe.
4248         #
4249         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4250         #                                source pipe's "path".
4251         #
4252         #  @ref tui_creation_pipe_path "Example"
4253         @ManageTransactions("PrimOp")
4254         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4255             """
4256             Build a middle path of a pipe-like shape.
4257             The path shape can be a wire or an edge.
4258
4259             Parameters:
4260                 theShape It can be closed or unclosed pipe-like shell
4261                          or a pipe-like solid.
4262                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4263                                        should be lists of edges of theShape.
4264                 theName Object name; when specified, this parameter is used
4265                         for result publication in the study. Otherwise, if automatic
4266                         publication is switched on, default value is used for result name.
4267
4268             Returns:
4269                 New GEOM_Object, containing an edge or wire that represent
4270                                  source pipe's path.
4271             """
4272             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4273             RaiseIfFailed("RestorePath", self.PrimOp)
4274             self._autoPublish(anObj, theName, "path")
4275             return anObj
4276
4277         # end of l3_complex
4278         ## @}
4279
4280         ## @addtogroup l3_advanced
4281         ## @{
4282
4283         ## Create a linear edge with specified ends.
4284         #  @param thePnt1 Point for the first end of edge.
4285         #  @param thePnt2 Point for the second end of edge.
4286         #  @param theName Object name; when specified, this parameter is used
4287         #         for result publication in the study. Otherwise, if automatic
4288         #         publication is switched on, default value is used for result name.
4289         #
4290         #  @return New GEOM.GEOM_Object, containing the created edge.
4291         #
4292         #  @ref tui_creation_edge "Example"
4293         @ManageTransactions("ShapesOp")
4294         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4295             """
4296             Create a linear edge with specified ends.
4297
4298             Parameters:
4299                 thePnt1 Point for the first end of edge.
4300                 thePnt2 Point for the second end of edge.
4301                 theName Object name; when specified, this parameter is used
4302                         for result publication in the study. Otherwise, if automatic
4303                         publication is switched on, default value is used for result name.
4304
4305             Returns:
4306                 New GEOM.GEOM_Object, containing the created edge.
4307             """
4308             # Example: see GEOM_TestAll.py
4309             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4310             RaiseIfFailed("MakeEdge", self.ShapesOp)
4311             self._autoPublish(anObj, theName, "edge")
4312             return anObj
4313
4314         ## Create a new edge, corresponding to the given length on the given curve.
4315         #  @param theRefCurve The referenced curve (edge).
4316         #  @param theLength Length on the referenced curve. It can be negative.
4317         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4318         #                       at the end of \a theRefCurve, close to the selected point.
4319         #                       If None, start from the first point of \a theRefCurve.
4320         #  @param theName Object name; when specified, this parameter is used
4321         #         for result publication in the study. Otherwise, if automatic
4322         #         publication is switched on, default value is used for result name.
4323         #
4324         #  @return New GEOM.GEOM_Object, containing the created edge.
4325         #
4326         #  @ref tui_creation_edge "Example"
4327         @ManageTransactions("ShapesOp")
4328         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4329             """
4330             Create a new edge, corresponding to the given length on the given curve.
4331
4332             Parameters:
4333                 theRefCurve The referenced curve (edge).
4334                 theLength Length on the referenced curve. It can be negative.
4335                 theStartPoint Any point can be selected for it, the new edge will begin
4336                               at the end of theRefCurve, close to the selected point.
4337                               If None, start from the first point of theRefCurve.
4338                 theName Object name; when specified, this parameter is used
4339                         for result publication in the study. Otherwise, if automatic
4340                         publication is switched on, default value is used for result name.
4341
4342             Returns:
4343                 New GEOM.GEOM_Object, containing the created edge.
4344             """
4345             # Example: see GEOM_TestAll.py
4346             theLength, Parameters = ParseParameters(theLength)
4347             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4348             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4349             anObj.SetParameters(Parameters)
4350             self._autoPublish(anObj, theName, "edge")
4351             return anObj
4352
4353         ## Create an edge from specified wire.
4354         #  @param theWire source Wire
4355         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4356         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4357         #  @param theName Object name; when specified, this parameter is used
4358         #         for result publication in the study. Otherwise, if automatic
4359         #         publication is switched on, default value is used for result name.
4360         #
4361         #  @return New GEOM.GEOM_Object, containing the created edge.
4362         #
4363         #  @ref tui_creation_edge "Example"
4364         @ManageTransactions("ShapesOp")
4365         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4366             """
4367             Create an edge from specified wire.
4368
4369             Parameters:
4370                 theWire source Wire
4371                 theLinearTolerance linear tolerance value (default = 1e-07)
4372                 theAngularTolerance angular tolerance value (default = 1e-12)
4373                 theName Object name; when specified, this parameter is used
4374                         for result publication in the study. Otherwise, if automatic
4375                         publication is switched on, default value is used for result name.
4376
4377             Returns:
4378                 New GEOM.GEOM_Object, containing the created edge.
4379             """
4380             # Example: see GEOM_TestAll.py
4381             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4382             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4383             self._autoPublish(anObj, theName, "edge")
4384             return anObj
4385
4386         ## Create a wire from the set of edges and wires.
4387         #  @param theEdgesAndWires List of edges and/or wires.
4388         #  @param theTolerance Maximum distance between vertices, that will be merged.
4389         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4390         #  @param theName Object name; when specified, this parameter is used
4391         #         for result publication in the study. Otherwise, if automatic
4392         #         publication is switched on, default value is used for result name.
4393         #
4394         #  @return New GEOM.GEOM_Object, containing the created wire.
4395         #
4396         #  @ref tui_creation_wire "Example"
4397         @ManageTransactions("ShapesOp")
4398         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4399             """
4400             Create a wire from the set of edges and wires.
4401
4402             Parameters:
4403                 theEdgesAndWires List of edges and/or wires.
4404                 theTolerance Maximum distance between vertices, that will be merged.
4405                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4406                 theName Object name; when specified, this parameter is used
4407                         for result publication in the study. Otherwise, if automatic
4408                         publication is switched on, default value is used for result name.
4409
4410             Returns:
4411                 New GEOM.GEOM_Object, containing the created wire.
4412             """
4413             # Example: see GEOM_TestAll.py
4414             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4415             RaiseIfFailed("MakeWire", self.ShapesOp)
4416             self._autoPublish(anObj, theName, "wire")
4417             return anObj
4418
4419         ## Create a face on the given wire.
4420         #  @param theWire closed Wire or Edge to build the face on.
4421         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4422         #                        If the tolerance of the obtained planar face is less
4423         #                        than 1e-06, this face will be returned, otherwise the
4424         #                        algorithm tries to build any suitable face on the given
4425         #                        wire and prints a warning message.
4426         #  @param theName Object name; when specified, this parameter is used
4427         #         for result publication in the study. Otherwise, if automatic
4428         #         publication is switched on, default value is used for result name.
4429         #
4430         #  @return New GEOM.GEOM_Object, containing the created face.
4431         #
4432         #  @ref tui_creation_face "Example"
4433         @ManageTransactions("ShapesOp")
4434         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4435             """
4436             Create a face on the given wire.
4437
4438             Parameters:
4439                 theWire closed Wire or Edge to build the face on.
4440                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4441                                If the tolerance of the obtained planar face is less
4442                                than 1e-06, this face will be returned, otherwise the
4443                                algorithm tries to build any suitable face on the given
4444                                wire and prints a warning message.
4445                 theName Object name; when specified, this parameter is used
4446                         for result publication in the study. Otherwise, if automatic
4447                         publication is switched on, default value is used for result name.
4448
4449             Returns:
4450                 New GEOM.GEOM_Object, containing the created face.
4451             """
4452             # Example: see GEOM_TestAll.py
4453             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4454             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4455                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4456             else:
4457                 RaiseIfFailed("MakeFace", self.ShapesOp)
4458             self._autoPublish(anObj, theName, "face")
4459             return anObj
4460
4461         ## Create a face on the given wires set.
4462         #  @param theWires List of closed wires or edges to build the face on.
4463         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4464         #                        If the tolerance of the obtained planar face is less
4465         #                        than 1e-06, this face will be returned, otherwise the
4466         #                        algorithm tries to build any suitable face on the given
4467         #                        wire and prints a warning message.
4468         #  @param theName Object name; when specified, this parameter is used
4469         #         for result publication in the study. Otherwise, if automatic
4470         #         publication is switched on, default value is used for result name.
4471         #
4472         #  @return New GEOM.GEOM_Object, containing the created face.
4473         #
4474         #  @ref tui_creation_face "Example"
4475         @ManageTransactions("ShapesOp")
4476         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4477             """
4478             Create a face on the given wires set.
4479
4480             Parameters:
4481                 theWires List of closed wires or edges to build the face on.
4482                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4483                                If the tolerance of the obtained planar face is less
4484                                than 1e-06, this face will be returned, otherwise the
4485                                algorithm tries to build any suitable face on the given
4486                                wire and prints a warning message.
4487                 theName Object name; when specified, this parameter is used
4488                         for result publication in the study. Otherwise, if automatic
4489                         publication is switched on, default value is used for result name.
4490
4491             Returns:
4492                 New GEOM.GEOM_Object, containing the created face.
4493             """
4494             # Example: see GEOM_TestAll.py
4495             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4496             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4497                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4498             else:
4499                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4500             self._autoPublish(anObj, theName, "face")
4501             return anObj
4502
4503         ## See MakeFaceWires() method for details.
4504         #
4505         #  @ref tui_creation_face "Example 1"
4506         #  \n @ref swig_MakeFaces  "Example 2"
4507         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4508             """
4509             See geompy.MakeFaceWires() method for details.
4510             """
4511             # Example: see GEOM_TestOthers.py
4512             # note: auto-publishing is done in self.MakeFaceWires()
4513             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4514             return anObj
4515
4516         ## Create a shell from the set of faces and shells.
4517         #  @param theFacesAndShells List of faces and/or shells.
4518         #  @param theName Object name; when specified, this parameter is used
4519         #         for result publication in the study. Otherwise, if automatic
4520         #         publication is switched on, default value is used for result name.
4521         #
4522         #  @return New GEOM.GEOM_Object, containing the created shell.
4523         #
4524         #  @ref tui_creation_shell "Example"
4525         @ManageTransactions("ShapesOp")
4526         def MakeShell(self, theFacesAndShells, theName=None):
4527             """
4528             Create a shell from the set of faces and shells.
4529
4530             Parameters:
4531                 theFacesAndShells List of faces and/or shells.
4532                 theName Object name; when specified, this parameter is used
4533                         for result publication in the study. Otherwise, if automatic
4534                         publication is switched on, default value is used for result name.
4535
4536             Returns:
4537                 New GEOM.GEOM_Object, containing the created shell.
4538             """
4539             # Example: see GEOM_TestAll.py
4540             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4541             RaiseIfFailed("MakeShell", self.ShapesOp)
4542             self._autoPublish(anObj, theName, "shell")
4543             return anObj
4544
4545         ## Create a solid, bounded by the given shells.
4546         #  @param theShells Sequence of bounding shells.
4547         #  @param theName Object name; when specified, this parameter is used
4548         #         for result publication in the study. Otherwise, if automatic
4549         #         publication is switched on, default value is used for result name.
4550         #
4551         #  @return New GEOM.GEOM_Object, containing the created solid.
4552         #
4553         #  @ref tui_creation_solid "Example"
4554         @ManageTransactions("ShapesOp")
4555         def MakeSolid(self, theShells, theName=None):
4556             """
4557             Create a solid, bounded by the given shells.
4558
4559             Parameters:
4560                 theShells Sequence of bounding shells.
4561                 theName Object name; when specified, this parameter is used
4562                         for result publication in the study. Otherwise, if automatic
4563                         publication is switched on, default value is used for result name.
4564
4565             Returns:
4566                 New GEOM.GEOM_Object, containing the created solid.
4567             """
4568             # Example: see GEOM_TestAll.py
4569             if len(theShells) == 1:
4570                 descr = self._IsGoodForSolid(theShells[0])
4571                 #if len(descr) > 0:
4572                 #    raise RuntimeError, "MakeSolidShells : " + descr
4573                 if descr == "WRN_SHAPE_UNCLOSED":
4574                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4575             anObj = self.ShapesOp.MakeSolidShells(theShells)
4576             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4577             self._autoPublish(anObj, theName, "solid")
4578             return anObj
4579
4580         ## Create a compound of the given shapes.
4581         #  @param theShapes List of shapes to put in compound.
4582         #  @param theName Object name; when specified, this parameter is used
4583         #         for result publication in the study. Otherwise, if automatic
4584         #         publication is switched on, default value is used for result name.
4585         #
4586         #  @return New GEOM.GEOM_Object, containing the created compound.
4587         #
4588         #  @ref tui_creation_compound "Example"
4589         @ManageTransactions("ShapesOp")
4590         def MakeCompound(self, theShapes, theName=None):
4591             """
4592             Create a compound of the given shapes.
4593
4594             Parameters:
4595                 theShapes List of shapes to put in compound.
4596                 theName Object name; when specified, this parameter is used
4597                         for result publication in the study. Otherwise, if automatic
4598                         publication is switched on, default value is used for result name.
4599
4600             Returns:
4601                 New GEOM.GEOM_Object, containing the created compound.
4602             """
4603             # Example: see GEOM_TestAll.py
4604             anObj = self.ShapesOp.MakeCompound(theShapes)
4605             RaiseIfFailed("MakeCompound", self.ShapesOp)
4606             self._autoPublish(anObj, theName, "compound")
4607             return anObj
4608
4609         # end of l3_advanced
4610         ## @}
4611
4612         ## @addtogroup l2_measure
4613         ## @{
4614
4615         ## Gives quantity of faces in the given shape.
4616         #  @param theShape Shape to count faces of.
4617         #  @return Quantity of faces.
4618         #
4619         #  @ref swig_NumberOf "Example"
4620         @ManageTransactions("ShapesOp")
4621         def NumberOfFaces(self, theShape):
4622             """
4623             Gives quantity of faces in the given shape.
4624
4625             Parameters:
4626                 theShape Shape to count faces of.
4627
4628             Returns:
4629                 Quantity of faces.
4630             """
4631             # Example: see GEOM_TestOthers.py
4632             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4633             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4634             return nb_faces
4635
4636         ## Gives quantity of edges in the given shape.
4637         #  @param theShape Shape to count edges of.
4638         #  @return Quantity of edges.
4639         #
4640         #  @ref swig_NumberOf "Example"
4641         @ManageTransactions("ShapesOp")
4642         def NumberOfEdges(self, theShape):
4643             """
4644             Gives quantity of edges in the given shape.
4645
4646             Parameters:
4647                 theShape Shape to count edges of.
4648
4649             Returns:
4650                 Quantity of edges.
4651             """
4652             # Example: see GEOM_TestOthers.py
4653             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4654             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4655             return nb_edges
4656
4657         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4658         #  @param theShape Shape to count sub-shapes of.
4659         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4660         #  @return Quantity of sub-shapes of given type.
4661         #
4662         #  @ref swig_NumberOf "Example"
4663         @ManageTransactions("ShapesOp")
4664         def NumberOfSubShapes(self, theShape, theShapeType):
4665             """
4666             Gives quantity of sub-shapes of type theShapeType in the given shape.
4667
4668             Parameters:
4669                 theShape Shape to count sub-shapes of.
4670                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4671
4672             Returns:
4673                 Quantity of sub-shapes of given type.
4674             """
4675             # Example: see GEOM_TestOthers.py
4676             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4677             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4678             return nb_ss
4679
4680         ## Gives quantity of solids in the given shape.
4681         #  @param theShape Shape to count solids in.
4682         #  @return Quantity of solids.
4683         #
4684         #  @ref swig_NumberOf "Example"
4685         @ManageTransactions("ShapesOp")
4686         def NumberOfSolids(self, theShape):
4687             """
4688             Gives quantity of solids in the given shape.
4689
4690             Parameters:
4691                 theShape Shape to count solids in.
4692
4693             Returns:
4694                 Quantity of solids.
4695             """
4696             # Example: see GEOM_TestOthers.py
4697             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4698             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4699             return nb_solids
4700
4701         # end of l2_measure
4702         ## @}
4703
4704         ## @addtogroup l3_healing
4705         ## @{
4706
4707         ## Reverses an orientation the given shape.
4708         #  @param theShape Shape to be reversed.
4709         #  @param theName Object name; when specified, this parameter is used
4710         #         for result publication in the study. Otherwise, if automatic
4711         #         publication is switched on, default value is used for result name.
4712         #
4713         #  @return The reversed copy of theShape.
4714         #
4715         #  @ref swig_ChangeOrientation "Example"
4716         @ManageTransactions("ShapesOp")
4717         def ChangeOrientation(self, theShape, theName=None):
4718             """
4719             Reverses an orientation the given shape.
4720
4721             Parameters:
4722                 theShape Shape to be reversed.
4723                 theName Object name; when specified, this parameter is used
4724                         for result publication in the study. Otherwise, if automatic
4725                         publication is switched on, default value is used for result name.
4726
4727             Returns:
4728                 The reversed copy of theShape.
4729             """
4730             # Example: see GEOM_TestAll.py
4731             anObj = self.ShapesOp.ChangeOrientation(theShape)
4732             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4733             self._autoPublish(anObj, theName, "reversed")
4734             return anObj
4735
4736         ## See ChangeOrientation() method for details.
4737         #
4738         #  @ref swig_OrientationChange "Example"
4739         def OrientationChange(self, theShape, theName=None):
4740             """
4741             See geompy.ChangeOrientation method for details.
4742             """
4743             # Example: see GEOM_TestOthers.py
4744             # note: auto-publishing is done in self.ChangeOrientation()
4745             anObj = self.ChangeOrientation(theShape, theName)
4746             return anObj
4747
4748         # end of l3_healing
4749         ## @}
4750
4751         ## @addtogroup l4_obtain
4752         ## @{
4753
4754         ## Retrieve all free faces from the given shape.
4755         #  Free face is a face, which is not shared between two shells of the shape.
4756         #  @param theShape Shape to find free faces in.
4757         #  @return List of IDs of all free faces, contained in theShape.
4758         #
4759         #  @ref tui_measurement_tools_page "Example"
4760         @ManageTransactions("ShapesOp")
4761         def GetFreeFacesIDs(self,theShape):
4762             """
4763             Retrieve all free faces from the given shape.
4764             Free face is a face, which is not shared between two shells of the shape.
4765
4766             Parameters:
4767                 theShape Shape to find free faces in.
4768
4769             Returns:
4770                 List of IDs of all free faces, contained in theShape.
4771             """
4772             # Example: see GEOM_TestOthers.py
4773             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4774             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4775             return anIDs
4776
4777         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4778         #  @param theShape1 Shape to find sub-shapes in.
4779         #  @param theShape2 Shape to find shared sub-shapes with.
4780         #  @param theShapeType Type of sub-shapes to be retrieved.
4781         #  @param theName Object name; when specified, this parameter is used
4782         #         for result publication in the study. Otherwise, if automatic
4783         #         publication is switched on, default value is used for result name.
4784         #
4785         #  @return List of sub-shapes of theShape1, shared with theShape2.
4786         #
4787         #  @ref swig_GetSharedShapes "Example"
4788         @ManageTransactions("ShapesOp")
4789         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4790             """
4791             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4792
4793             Parameters:
4794                 theShape1 Shape to find sub-shapes in.
4795                 theShape2 Shape to find shared sub-shapes with.
4796                 theShapeType Type of sub-shapes to be retrieved.
4797                 theName Object name; when specified, this parameter is used
4798                         for result publication in the study. Otherwise, if automatic
4799                         publication is switched on, default value is used for result name.
4800
4801             Returns:
4802                 List of sub-shapes of theShape1, shared with theShape2.
4803             """
4804             # Example: see GEOM_TestOthers.py
4805             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4806             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4807             self._autoPublish(aList, theName, "shared")
4808             return aList
4809
4810         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4811         #  @param theShapes Shapes to find common sub-shapes of.
4812         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4813         #  @param theName Object name; when specified, this parameter is used
4814         #         for result publication in the study. Otherwise, if automatic
4815         #         publication is switched on, default value is used for result name.
4816         #
4817         #  @return List of objects, that are sub-shapes of all given shapes.
4818         #
4819         #  @ref swig_GetSharedShapes "Example"
4820         @ManageTransactions("ShapesOp")
4821         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4822             """
4823             Get all sub-shapes, shared by all shapes in the list theShapes.
4824
4825             Parameters:
4826                 theShapes Shapes to find common sub-shapes of.
4827                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4828                 theName Object name; when specified, this parameter is used
4829                         for result publication in the study. Otherwise, if automatic
4830                         publication is switched on, default value is used for result name.
4831
4832             Returns:
4833                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4834             """
4835             # Example: see GEOM_TestOthers.py
4836             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4837             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4838             self._autoPublish(aList, theName, "shared")
4839             return aList
4840
4841         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4842         #  situated relatively the specified plane by the certain way,
4843         #  defined through <VAR>theState</VAR> parameter.
4844         #  @param theShape Shape to find sub-shapes of.
4845         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4846         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4847         #                direction and location of the plane to find shapes on.
4848         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4849         #  @param theName Object name; when specified, this parameter is used
4850         #         for result publication in the study. Otherwise, if automatic
4851         #         publication is switched on, default value is used for result name.
4852         #
4853         #  @return List of all found sub-shapes.
4854         #
4855         #  @ref swig_GetShapesOnPlane "Example"
4856         @ManageTransactions("ShapesOp")
4857         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4858             """
4859             Find in theShape all sub-shapes of type theShapeType,
4860             situated relatively the specified plane by the certain way,
4861             defined through theState parameter.
4862
4863             Parameters:
4864                 theShape Shape to find sub-shapes of.
4865                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4866                 theAx1 Vector (or line, or linear edge), specifying normal
4867                        direction and location of the plane to find shapes on.
4868                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4869                 theName Object name; when specified, this parameter is used
4870                         for result publication in the study. Otherwise, if automatic
4871                         publication is switched on, default value is used for result name.
4872
4873             Returns:
4874                 List of all found sub-shapes.
4875             """
4876             # Example: see GEOM_TestOthers.py
4877             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4878             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4879             self._autoPublish(aList, theName, "shapeOnPlane")
4880             return aList
4881
4882         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4883         #  situated relatively the specified plane by the certain way,
4884         #  defined through <VAR>theState</VAR> parameter.
4885         #  @param theShape Shape to find sub-shapes of.
4886         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4887         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4888         #                direction and location of the plane to find shapes on.
4889         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4890         #
4891         #  @return List of all found sub-shapes indices.
4892         #
4893         #  @ref swig_GetShapesOnPlaneIDs "Example"
4894         @ManageTransactions("ShapesOp")
4895         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4896             """
4897             Find in theShape all sub-shapes of type theShapeType,
4898             situated relatively the specified plane by the certain way,
4899             defined through theState parameter.
4900
4901             Parameters:
4902                 theShape Shape to find sub-shapes of.
4903                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4904                 theAx1 Vector (or line, or linear edge), specifying normal
4905                        direction and location of the plane to find shapes on.
4906                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4907
4908             Returns:
4909                 List of all found sub-shapes indices.
4910             """
4911             # Example: see GEOM_TestOthers.py
4912             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4913             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4914             return aList
4915
4916         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4917         #  situated relatively the specified plane by the certain way,
4918         #  defined through <VAR>theState</VAR> parameter.
4919         #  @param theShape Shape to find sub-shapes of.
4920         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4921         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4922         #                direction of the plane to find shapes on.
4923         #  @param thePnt Point specifying location of the plane to find shapes on.
4924         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4925         #  @param theName Object name; when specified, this parameter is used
4926         #         for result publication in the study. Otherwise, if automatic
4927         #         publication is switched on, default value is used for result name.
4928         #
4929         #  @return List of all found sub-shapes.
4930         #
4931         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4932         @ManageTransactions("ShapesOp")
4933         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4934             """
4935             Find in theShape all sub-shapes of type theShapeType,
4936             situated relatively the specified plane by the certain way,
4937             defined through theState parameter.
4938
4939             Parameters:
4940                 theShape Shape to find sub-shapes of.
4941                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4942                 theAx1 Vector (or line, or linear edge), specifying normal
4943                        direction and location of the plane to find shapes on.
4944                 thePnt Point specifying location of the plane to find shapes on.
4945                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4946                 theName Object name; when specified, this parameter is used
4947                         for result publication in the study. Otherwise, if automatic
4948                         publication is switched on, default value is used for result name.
4949
4950             Returns:
4951                 List of all found sub-shapes.
4952             """
4953             # Example: see GEOM_TestOthers.py
4954             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4955                                                                theAx1, thePnt, theState)
4956             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4957             self._autoPublish(aList, theName, "shapeOnPlane")
4958             return aList
4959
4960         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4961         #  situated relatively the specified plane by the certain way,
4962         #  defined through <VAR>theState</VAR> parameter.
4963         #  @param theShape Shape to find sub-shapes of.
4964         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4965         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4966         #                direction of the plane to find shapes on.
4967         #  @param thePnt Point specifying location of the plane to find shapes on.
4968         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4969         #
4970         #  @return List of all found sub-shapes indices.
4971         #
4972         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4973         @ManageTransactions("ShapesOp")
4974         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4975             """
4976             Find in theShape all sub-shapes of type theShapeType,
4977             situated relatively the specified plane by the certain way,
4978             defined through theState parameter.
4979
4980             Parameters:
4981                 theShape Shape to find sub-shapes of.
4982                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4983                 theAx1 Vector (or line, or linear edge), specifying normal
4984                        direction and location of the plane to find shapes on.
4985                 thePnt Point specifying location of the plane to find shapes on.
4986                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4987
4988             Returns:
4989                 List of all found sub-shapes indices.
4990             """
4991             # Example: see GEOM_TestOthers.py
4992             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4993                                                                   theAx1, thePnt, theState)
4994             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4995             return aList
4996
4997         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4998         #  the specified cylinder by the certain way, defined through \a theState parameter.
4999         #  @param theShape Shape to find sub-shapes of.
5000         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5001         #  @param theAxis Vector (or line, or linear edge), specifying
5002         #                 axis of the cylinder to find shapes on.
5003         #  @param theRadius Radius of the cylinder to find shapes on.
5004         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5005         #  @param theName Object name; when specified, this parameter is used
5006         #         for result publication in the study. Otherwise, if automatic
5007         #         publication is switched on, default value is used for result name.
5008         #
5009         #  @return List of all found sub-shapes.
5010         #
5011         #  @ref swig_GetShapesOnCylinder "Example"
5012         @ManageTransactions("ShapesOp")
5013         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5014             """
5015             Find in theShape all sub-shapes of type theShapeType, situated relatively
5016             the specified cylinder by the certain way, defined through theState parameter.
5017
5018             Parameters:
5019                 theShape Shape to find sub-shapes of.
5020                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5021                 theAxis Vector (or line, or linear edge), specifying
5022                         axis of the cylinder to find shapes on.
5023                 theRadius Radius of the cylinder to find shapes on.
5024                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5025                 theName Object name; when specified, this parameter is used
5026                         for result publication in the study. Otherwise, if automatic
5027                         publication is switched on, default value is used for result name.
5028
5029             Returns:
5030                 List of all found sub-shapes.
5031             """
5032             # Example: see GEOM_TestOthers.py
5033             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5034             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5035             self._autoPublish(aList, theName, "shapeOnCylinder")
5036             return aList
5037
5038         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5039         #  the specified cylinder by the certain way, defined through \a theState parameter.
5040         #  @param theShape Shape to find sub-shapes of.
5041         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5042         #  @param theAxis Vector (or line, or linear edge), specifying
5043         #                 axis of the cylinder to find shapes on.
5044         #  @param theRadius Radius of the cylinder to find shapes on.
5045         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5046         #
5047         #  @return List of all found sub-shapes indices.
5048         #
5049         #  @ref swig_GetShapesOnCylinderIDs "Example"
5050         @ManageTransactions("ShapesOp")
5051         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5052             """
5053             Find in theShape all sub-shapes of type theShapeType, situated relatively
5054             the specified cylinder by the certain way, defined through theState parameter.
5055
5056             Parameters:
5057                 theShape Shape to find sub-shapes of.
5058                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5059                 theAxis Vector (or line, or linear edge), specifying
5060                         axis of the cylinder to find shapes on.
5061                 theRadius Radius of the cylinder to find shapes on.
5062                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5063
5064             Returns:
5065                 List of all found sub-shapes indices.
5066             """
5067             # Example: see GEOM_TestOthers.py
5068             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5069             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5070             return aList
5071
5072         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5073         #  the specified cylinder by the certain way, defined through \a theState parameter.
5074         #  @param theShape Shape to find sub-shapes of.
5075         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5076         #  @param theAxis Vector (or line, or linear edge), specifying
5077         #                 axis of the cylinder to find shapes on.
5078         #  @param thePnt Point specifying location of the bottom of the cylinder.
5079         #  @param theRadius Radius of the cylinder to find shapes on.
5080         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5081         #  @param theName Object name; when specified, this parameter is used
5082         #         for result publication in the study. Otherwise, if automatic
5083         #         publication is switched on, default value is used for result name.
5084         #
5085         #  @return List of all found sub-shapes.
5086         #
5087         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5088         @ManageTransactions("ShapesOp")
5089         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5090             """
5091             Find in theShape all sub-shapes of type theShapeType, situated relatively
5092             the specified cylinder by the certain way, defined through theState parameter.
5093
5094             Parameters:
5095                 theShape Shape to find sub-shapes of.
5096                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5097                 theAxis Vector (or line, or linear edge), specifying
5098                         axis of the cylinder to find shapes on.
5099                 theRadius Radius of the cylinder to find shapes on.
5100                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5101                 theName Object name; when specified, this parameter is used
5102                         for result publication in the study. Otherwise, if automatic
5103                         publication is switched on, default value is used for result name.
5104
5105             Returns:
5106                 List of all found sub-shapes.
5107             """
5108             # Example: see GEOM_TestOthers.py
5109             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5110             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5111             self._autoPublish(aList, theName, "shapeOnCylinder")
5112             return aList
5113
5114         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5115         #  the specified cylinder by the certain way, defined through \a theState parameter.
5116         #  @param theShape Shape to find sub-shapes of.
5117         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5118         #  @param theAxis Vector (or line, or linear edge), specifying
5119         #                 axis of the cylinder to find shapes on.
5120         #  @param thePnt Point specifying location of the bottom of the cylinder.
5121         #  @param theRadius Radius of the cylinder to find shapes on.
5122         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5123         #
5124         #  @return List of all found sub-shapes indices
5125         #
5126         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5127         @ManageTransactions("ShapesOp")
5128         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5129             """
5130             Find in theShape all sub-shapes of type theShapeType, situated relatively
5131             the specified cylinder by the certain way, defined through theState parameter.
5132
5133             Parameters:
5134                 theShape Shape to find sub-shapes of.
5135                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5136                 theAxis Vector (or line, or linear edge), specifying
5137                         axis of the cylinder to find shapes on.
5138                 theRadius Radius of the cylinder to find shapes on.
5139                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5140
5141             Returns:
5142                 List of all found sub-shapes indices.
5143             """
5144             # Example: see GEOM_TestOthers.py
5145             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5146             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5147             return aList
5148
5149         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5150         #  the specified sphere by the certain way, defined through \a theState parameter.
5151         #  @param theShape Shape to find sub-shapes of.
5152         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5153         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5154         #  @param theRadius Radius of the sphere to find shapes on.
5155         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5156         #  @param theName Object name; when specified, this parameter is used
5157         #         for result publication in the study. Otherwise, if automatic
5158         #         publication is switched on, default value is used for result name.
5159         #
5160         #  @return List of all found sub-shapes.
5161         #
5162         #  @ref swig_GetShapesOnSphere "Example"
5163         @ManageTransactions("ShapesOp")
5164         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5165             """
5166             Find in theShape all sub-shapes of type theShapeType, situated relatively
5167             the specified sphere by the certain way, defined through theState parameter.
5168
5169             Parameters:
5170                 theShape Shape to find sub-shapes of.
5171                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5172                 theCenter Point, specifying center of the sphere to find shapes on.
5173                 theRadius Radius of the sphere to find shapes on.
5174                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5175                 theName Object name; when specified, this parameter is used
5176                         for result publication in the study. Otherwise, if automatic
5177                         publication is switched on, default value is used for result name.
5178
5179             Returns:
5180                 List of all found sub-shapes.
5181             """
5182             # Example: see GEOM_TestOthers.py
5183             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5184             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5185             self._autoPublish(aList, theName, "shapeOnSphere")
5186             return aList
5187
5188         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5189         #  the specified sphere by the certain way, defined through \a theState parameter.
5190         #  @param theShape Shape to find sub-shapes of.
5191         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5192         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5193         #  @param theRadius Radius of the sphere to find shapes on.
5194         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5195         #
5196         #  @return List of all found sub-shapes indices.
5197         #
5198         #  @ref swig_GetShapesOnSphereIDs "Example"
5199         @ManageTransactions("ShapesOp")
5200         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5201             """
5202             Find in theShape all sub-shapes of type theShapeType, situated relatively
5203             the specified sphere by the certain way, defined through theState parameter.
5204
5205             Parameters:
5206                 theShape Shape to find sub-shapes of.
5207                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5208                 theCenter Point, specifying center of the sphere to find shapes on.
5209                 theRadius Radius of the sphere to find shapes on.
5210                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5211
5212             Returns:
5213                 List of all found sub-shapes indices.
5214             """
5215             # Example: see GEOM_TestOthers.py
5216             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5217             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5218             return aList
5219
5220         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5221         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5222         #  @param theShape Shape to find sub-shapes of.
5223         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5224         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5225         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5226         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5227         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5228         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5229         #  @param theName Object name; when specified, this parameter is used
5230         #         for result publication in the study. Otherwise, if automatic
5231         #         publication is switched on, default value is used for result name.
5232         #
5233         #  @return List of all found sub-shapes.
5234         #
5235         #  @ref swig_GetShapesOnQuadrangle "Example"
5236         @ManageTransactions("ShapesOp")
5237         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5238                                   theTopLeftPoint, theTopRigthPoint,
5239                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5240             """
5241             Find in theShape all sub-shapes of type theShapeType, situated relatively
5242             the specified quadrangle by the certain way, defined through theState parameter.
5243
5244             Parameters:
5245                 theShape Shape to find sub-shapes of.
5246                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5247                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5248                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5249                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5250                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5251                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5252                 theName Object name; when specified, this parameter is used
5253                         for result publication in the study. Otherwise, if automatic
5254                         publication is switched on, default value is used for result name.
5255
5256             Returns:
5257                 List of all found sub-shapes.
5258             """
5259             # Example: see GEOM_TestOthers.py
5260             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5261                                                         theTopLeftPoint, theTopRigthPoint,
5262                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5263             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5264             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5265             return aList
5266
5267         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5268         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5269         #  @param theShape Shape to find sub-shapes of.
5270         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5271         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5272         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5273         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5274         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5275         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5276         #
5277         #  @return List of all found sub-shapes indices.
5278         #
5279         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5280         @ManageTransactions("ShapesOp")
5281         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5282                                      theTopLeftPoint, theTopRigthPoint,
5283                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5284             """
5285             Find in theShape all sub-shapes of type theShapeType, situated relatively
5286             the specified quadrangle by the certain way, defined through theState parameter.
5287
5288             Parameters:
5289                 theShape Shape to find sub-shapes of.
5290                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5291                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5292                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5293                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5294                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5295                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5296
5297             Returns:
5298                 List of all found sub-shapes indices.
5299             """
5300
5301             # Example: see GEOM_TestOthers.py
5302             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5303                                                            theTopLeftPoint, theTopRigthPoint,
5304                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5305             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5306             return aList
5307
5308         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5309         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5310         #  @param theBox Shape for relative comparing.
5311         #  @param theShape Shape to find sub-shapes of.
5312         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5313         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5314         #  @param theName Object name; when specified, this parameter is used
5315         #         for result publication in the study. Otherwise, if automatic
5316         #         publication is switched on, default value is used for result name.
5317         #
5318         #  @return List of all found sub-shapes.
5319         #
5320         #  @ref swig_GetShapesOnBox "Example"
5321         @ManageTransactions("ShapesOp")
5322         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5323             """
5324             Find in theShape all sub-shapes of type theShapeType, situated relatively
5325             the specified theBox by the certain way, defined through theState parameter.
5326
5327             Parameters:
5328                 theBox Shape for relative comparing.
5329                 theShape Shape to find sub-shapes of.
5330                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5331                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5332                 theName Object name; when specified, this parameter is used
5333                         for result publication in the study. Otherwise, if automatic
5334                         publication is switched on, default value is used for result name.
5335
5336             Returns:
5337                 List of all found sub-shapes.
5338             """
5339             # Example: see GEOM_TestOthers.py
5340             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5341             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5342             self._autoPublish(aList, theName, "shapeOnBox")
5343             return aList
5344
5345         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5346         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5347         #  @param theBox Shape for relative comparing.
5348         #  @param theShape Shape to find sub-shapes of.
5349         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5350         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5351         #
5352         #  @return List of all found sub-shapes indices.
5353         #
5354         #  @ref swig_GetShapesOnBoxIDs "Example"
5355         @ManageTransactions("ShapesOp")
5356         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5357             """
5358             Find in theShape all sub-shapes of type theShapeType, situated relatively
5359             the specified theBox by the certain way, defined through theState parameter.
5360
5361             Parameters:
5362                 theBox Shape for relative comparing.
5363                 theShape Shape to find sub-shapes of.
5364                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5365                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5366
5367             Returns:
5368                 List of all found sub-shapes indices.
5369             """
5370             # Example: see GEOM_TestOthers.py
5371             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5372             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5373             return aList
5374
5375         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5376         #  situated relatively the specified \a theCheckShape by the
5377         #  certain way, defined through \a theState parameter.
5378         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5379         #  @param theShape Shape to find sub-shapes of.
5380         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5381         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5382         #  @param theName Object name; when specified, this parameter is used
5383         #         for result publication in the study. Otherwise, if automatic
5384         #         publication is switched on, default value is used for result name.
5385         #
5386         #  @return List of all found sub-shapes.
5387         #
5388         #  @ref swig_GetShapesOnShape "Example"
5389         @ManageTransactions("ShapesOp")
5390         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5391             """
5392             Find in theShape all sub-shapes of type theShapeType,
5393             situated relatively the specified theCheckShape by the
5394             certain way, defined through theState parameter.
5395
5396             Parameters:
5397                 theCheckShape Shape for relative comparing. It must be a solid.
5398                 theShape Shape to find sub-shapes of.
5399                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5400                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5401                 theName Object name; when specified, this parameter is used
5402                         for result publication in the study. Otherwise, if automatic
5403                         publication is switched on, default value is used for result name.
5404
5405             Returns:
5406                 List of all found sub-shapes.
5407             """
5408             # Example: see GEOM_TestOthers.py
5409             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5410                                                    theShapeType, theState)
5411             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5412             self._autoPublish(aList, theName, "shapeOnShape")
5413             return aList
5414
5415         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5416         #  situated relatively the specified \a theCheckShape by the
5417         #  certain way, defined through \a theState parameter.
5418         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5419         #  @param theShape Shape to find sub-shapes of.
5420         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5421         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5422         #  @param theName Object name; when specified, this parameter is used
5423         #         for result publication in the study. Otherwise, if automatic
5424         #         publication is switched on, default value is used for result name.
5425         #
5426         #  @return All found sub-shapes as compound.
5427         #
5428         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5429         @ManageTransactions("ShapesOp")
5430         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5431             """
5432             Find in theShape all sub-shapes of type theShapeType,
5433             situated relatively the specified theCheckShape by the
5434             certain way, defined through theState parameter.
5435
5436             Parameters:
5437                 theCheckShape Shape for relative comparing. It must be a solid.
5438                 theShape Shape to find sub-shapes of.
5439                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5440                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5441                 theName Object name; when specified, this parameter is used
5442                         for result publication in the study. Otherwise, if automatic
5443                         publication is switched on, default value is used for result name.
5444
5445             Returns:
5446                 All found sub-shapes as compound.
5447             """
5448             # Example: see GEOM_TestOthers.py
5449             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5450                                                              theShapeType, theState)
5451             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5452             self._autoPublish(anObj, theName, "shapeOnShape")
5453             return anObj
5454
5455         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5456         #  situated relatively the specified \a theCheckShape by the
5457         #  certain way, defined through \a theState parameter.
5458         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5459         #  @param theShape Shape to find sub-shapes of.
5460         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5461         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5462         #
5463         #  @return List of all found sub-shapes indices.
5464         #
5465         #  @ref swig_GetShapesOnShapeIDs "Example"
5466         @ManageTransactions("ShapesOp")
5467         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5468             """
5469             Find in theShape all sub-shapes of type theShapeType,
5470             situated relatively the specified theCheckShape by the
5471             certain way, defined through theState parameter.
5472
5473             Parameters:
5474                 theCheckShape Shape for relative comparing. It must be a solid.
5475                 theShape Shape to find sub-shapes of.
5476                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5477                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5478
5479             Returns:
5480                 List of all found sub-shapes indices.
5481             """
5482             # Example: see GEOM_TestOthers.py
5483             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5484                                                       theShapeType, theState)
5485             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5486             return aList
5487
5488         ## Get sub-shape(s) of theShapeWhere, which are
5489         #  coincident with \a theShapeWhat or could be a part of it.
5490         #  @param theShapeWhere Shape to find sub-shapes of.
5491         #  @param theShapeWhat Shape, specifying what to find.
5492         #  @param isNewImplementation implementation of GetInPlace functionality
5493         #             (default = False, old alghorithm based on shape properties)
5494         #  @param theName Object name; when specified, this parameter is used
5495         #         for result publication in the study. Otherwise, if automatic
5496         #         publication is switched on, default value is used for result name.
5497         #
5498         #  @return Group of all found sub-shapes or a single found sub-shape.
5499         #
5500         #  @note This function has a restriction on argument shapes.
5501         #        If \a theShapeWhere has curved parts with significantly
5502         #        outstanding centres (i.e. the mass centre of a part is closer to
5503         #        \a theShapeWhat than to the part), such parts will not be found.
5504         #        @image html get_in_place_lost_part.png
5505         #
5506         #  @ref swig_GetInPlace "Example"
5507         @ManageTransactions("ShapesOp")
5508         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5509             """
5510             Get sub-shape(s) of theShapeWhere, which are
5511             coincident with  theShapeWhat or could be a part of it.
5512
5513             Parameters:
5514                 theShapeWhere Shape to find sub-shapes of.
5515                 theShapeWhat Shape, specifying what to find.
5516                 isNewImplementation Implementation of GetInPlace functionality
5517                                     (default = False, old alghorithm based on shape properties)
5518                 theName Object name; when specified, this parameter is used
5519                         for result publication in the study. Otherwise, if automatic
5520                         publication is switched on, default value is used for result name.
5521
5522             Returns:
5523                 Group of all found sub-shapes or a single found sub-shape.
5524
5525
5526             Note:
5527                 This function has a restriction on argument shapes.
5528                 If theShapeWhere has curved parts with significantly
5529                 outstanding centres (i.e. the mass centre of a part is closer to
5530                 theShapeWhat than to the part), such parts will not be found.
5531             """
5532             # Example: see GEOM_TestOthers.py
5533             anObj = None
5534             if isNewImplementation:
5535                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5536             else:
5537                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5538                 pass
5539             RaiseIfFailed("GetInPlace", self.ShapesOp)
5540             self._autoPublish(anObj, theName, "inplace")
5541             return anObj
5542
5543         ## Get sub-shape(s) of \a theShapeWhere, which are
5544         #  coincident with \a theShapeWhat or could be a part of it.
5545         #
5546         #  Implementation of this method is based on a saved history of an operation,
5547         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5548         #  arguments (an argument shape or a sub-shape of an argument shape).
5549         #  The operation could be the Partition or one of boolean operations,
5550         #  performed on simple shapes (not on compounds).
5551         #
5552         #  @param theShapeWhere Shape to find sub-shapes of.
5553         #  @param theShapeWhat Shape, specifying what to find (must be in the
5554         #                      building history of the ShapeWhere).
5555         #  @param theName Object name; when specified, this parameter is used
5556         #         for result publication in the study. Otherwise, if automatic
5557         #         publication is switched on, default value is used for result name.
5558         #
5559         #  @return Group of all found sub-shapes or a single found sub-shape.
5560         #
5561         #  @ref swig_GetInPlace "Example"
5562         @ManageTransactions("ShapesOp")
5563         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5564             """
5565             Implementation of this method is based on a saved history of an operation,
5566             produced theShapeWhere. The theShapeWhat must be among this operation's
5567             arguments (an argument shape or a sub-shape of an argument shape).
5568             The operation could be the Partition or one of boolean operations,
5569             performed on simple shapes (not on compounds).
5570
5571             Parameters:
5572                 theShapeWhere Shape to find sub-shapes of.
5573                 theShapeWhat Shape, specifying what to find (must be in the
5574                                 building history of the ShapeWhere).
5575                 theName Object name; when specified, this parameter is used
5576                         for result publication in the study. Otherwise, if automatic
5577                         publication is switched on, default value is used for result name.
5578
5579             Returns:
5580                 Group of all found sub-shapes or a single found sub-shape.
5581             """
5582             # Example: see GEOM_TestOthers.py
5583             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5584             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5585             self._autoPublish(anObj, theName, "inplace")
5586             return anObj
5587
5588         ## Get sub-shape of theShapeWhere, which is
5589         #  equal to \a theShapeWhat.
5590         #  @param theShapeWhere Shape to find sub-shape of.
5591         #  @param theShapeWhat Shape, specifying what to find.
5592         #  @param theName Object name; when specified, this parameter is used
5593         #         for result publication in the study. Otherwise, if automatic
5594         #         publication is switched on, default value is used for result name.
5595         #
5596         #  @return New GEOM.GEOM_Object for found sub-shape.
5597         #
5598         #  @ref swig_GetSame "Example"
5599         @ManageTransactions("ShapesOp")
5600         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5601             """
5602             Get sub-shape of theShapeWhere, which is
5603             equal to theShapeWhat.
5604
5605             Parameters:
5606                 theShapeWhere Shape to find sub-shape of.
5607                 theShapeWhat Shape, specifying what to find.
5608                 theName Object name; when specified, this parameter is used
5609                         for result publication in the study. Otherwise, if automatic
5610                         publication is switched on, default value is used for result name.
5611
5612             Returns:
5613                 New GEOM.GEOM_Object for found sub-shape.
5614             """
5615             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5616             RaiseIfFailed("GetSame", self.ShapesOp)
5617             self._autoPublish(anObj, theName, "sameShape")
5618             return anObj
5619
5620
5621         ## Get sub-shape indices of theShapeWhere, which is
5622         #  equal to \a theShapeWhat.
5623         #  @param theShapeWhere Shape to find sub-shape of.
5624         #  @param theShapeWhat Shape, specifying what to find.
5625         #  @return List of all found sub-shapes indices.
5626         #
5627         #  @ref swig_GetSame "Example"
5628         @ManageTransactions("ShapesOp")
5629         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5630             """
5631             Get sub-shape indices of theShapeWhere, which is
5632             equal to theShapeWhat.
5633
5634             Parameters:
5635                 theShapeWhere Shape to find sub-shape of.
5636                 theShapeWhat Shape, specifying what to find.
5637
5638             Returns:
5639                 List of all found sub-shapes indices.
5640             """
5641             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5642             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5643             return anObj
5644
5645
5646         # end of l4_obtain
5647         ## @}
5648
5649         ## @addtogroup l4_access
5650         ## @{
5651
5652         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5653         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5654         #  @param aShape Shape to get sub-shape of.
5655         #  @param ListOfID List of sub-shapes indices.
5656         #  @param theName Object name; when specified, this parameter is used
5657         #         for result publication in the study. Otherwise, if automatic
5658         #         publication is switched on, default value is used for result name.
5659         #
5660         #  @return Found sub-shape.
5661         #
5662         #  @ref swig_all_decompose "Example"
5663         def GetSubShape(self, aShape, ListOfID, theName=None):
5664             """
5665             Obtain a composite sub-shape of aShape, composed from sub-shapes
5666             of aShape, selected by their unique IDs inside aShape
5667
5668             Parameters:
5669                 aShape Shape to get sub-shape of.
5670                 ListOfID List of sub-shapes indices.
5671                 theName Object name; when specified, this parameter is used
5672                         for result publication in the study. Otherwise, if automatic
5673                         publication is switched on, default value is used for result name.
5674
5675             Returns:
5676                 Found sub-shape.
5677             """
5678             # Example: see GEOM_TestAll.py
5679             anObj = self.AddSubShape(aShape,ListOfID)
5680             self._autoPublish(anObj, theName, "subshape")
5681             return anObj
5682
5683         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5684         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5685         #  @param aShape Shape to get sub-shape of.
5686         #  @param aSubShape Sub-shapes of aShape.
5687         #  @return ID of found sub-shape.
5688         #
5689         #  @ref swig_all_decompose "Example"
5690         @ManageTransactions("LocalOp")
5691         def GetSubShapeID(self, aShape, aSubShape):
5692             """
5693             Obtain unique ID of sub-shape aSubShape inside aShape
5694             of aShape, selected by their unique IDs inside aShape
5695
5696             Parameters:
5697                aShape Shape to get sub-shape of.
5698                aSubShape Sub-shapes of aShape.
5699
5700             Returns:
5701                ID of found sub-shape.
5702             """
5703             # Example: see GEOM_TestAll.py
5704             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5705             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5706             return anID
5707
5708         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5709         #  This function is provided for performance purpose. The complexity is O(n) with n
5710         #  the number of subobjects of aShape
5711         #  @param aShape Shape to get sub-shape of.
5712         #  @param aSubShapes Sub-shapes of aShape.
5713         #  @return list of IDs of found sub-shapes.
5714         #
5715         #  @ref swig_all_decompose "Example"
5716         @ManageTransactions("ShapesOp")
5717         def GetSubShapesIDs(self, aShape, aSubShapes):
5718             """
5719             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5720             This function is provided for performance purpose. The complexity is O(n) with n
5721             the number of subobjects of aShape
5722
5723             Parameters:
5724                aShape Shape to get sub-shape of.
5725                aSubShapes Sub-shapes of aShape.
5726
5727             Returns:
5728                List of IDs of found sub-shape.
5729             """
5730             # Example: see GEOM_TestAll.py
5731             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5732             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5733             return anIDs
5734
5735         # end of l4_access
5736         ## @}
5737
5738         ## @addtogroup l4_decompose
5739         ## @{
5740
5741         ## Get all sub-shapes and groups of \a theShape,
5742         #  that were created already by any other methods.
5743         #  @param theShape Any shape.
5744         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5745         #                       returned, else all found sub-shapes and groups.
5746         #  @return List of existing sub-objects of \a theShape.
5747         #
5748         #  @ref swig_all_decompose "Example"
5749         @ManageTransactions("ShapesOp")
5750         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5751             """
5752             Get all sub-shapes and groups of theShape,
5753             that were created already by any other methods.
5754
5755             Parameters:
5756                 theShape Any shape.
5757                 theGroupsOnly If this parameter is TRUE, only groups will be
5758                                  returned, else all found sub-shapes and groups.
5759
5760             Returns:
5761                 List of existing sub-objects of theShape.
5762             """
5763             # Example: see GEOM_TestAll.py
5764             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5765             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5766             return ListObj
5767
5768         ## Get all groups of \a theShape,
5769         #  that were created already by any other methods.
5770         #  @param theShape Any shape.
5771         #  @return List of existing groups of \a theShape.
5772         #
5773         #  @ref swig_all_decompose "Example"
5774         @ManageTransactions("ShapesOp")
5775         def GetGroups(self, theShape):
5776             """
5777             Get all groups of theShape,
5778             that were created already by any other methods.
5779
5780             Parameters:
5781                 theShape Any shape.
5782
5783             Returns:
5784                 List of existing groups of theShape.
5785             """
5786             # Example: see GEOM_TestAll.py
5787             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5788             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5789             return ListObj
5790
5791         ## Explode a shape on sub-shapes of a given type.
5792         #  If the shape itself matches the type, it is also returned.
5793         #  @param aShape Shape to be exploded.
5794         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5795         #  @param theName Object name; when specified, this parameter is used
5796         #         for result publication in the study. Otherwise, if automatic
5797         #         publication is switched on, default value is used for result name.
5798         #
5799         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5800         #
5801         #  @ref swig_all_decompose "Example"
5802         @ManageTransactions("ShapesOp")
5803         def SubShapeAll(self, aShape, aType, theName=None):
5804             """
5805             Explode a shape on sub-shapes of a given type.
5806             If the shape itself matches the type, it is also returned.
5807
5808             Parameters:
5809                 aShape Shape to be exploded.
5810                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5811                 theName Object name; when specified, this parameter is used
5812                         for result publication in the study. Otherwise, if automatic
5813                         publication is switched on, default value is used for result name.
5814
5815             Returns:
5816                 List of sub-shapes of type theShapeType, contained in theShape.
5817             """
5818             # Example: see GEOM_TestAll.py
5819             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5820             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5821             self._autoPublish(ListObj, theName, "subshape")
5822             return ListObj
5823
5824         ## Explode a shape on sub-shapes of a given type.
5825         #  @param aShape Shape to be exploded.
5826         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5827         #  @return List of IDs of sub-shapes.
5828         #
5829         #  @ref swig_all_decompose "Example"
5830         @ManageTransactions("ShapesOp")
5831         def SubShapeAllIDs(self, aShape, aType):
5832             """
5833             Explode a shape on sub-shapes of a given type.
5834
5835             Parameters:
5836                 aShape Shape to be exploded (see geompy.ShapeType)
5837                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5838
5839             Returns:
5840                 List of IDs of sub-shapes.
5841             """
5842             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5843             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5844             return ListObj
5845
5846         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5847         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5848         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5849         #  @param aShape Shape to get sub-shape of.
5850         #  @param ListOfInd List of sub-shapes indices.
5851         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5852         #  @param theName Object name; when specified, this parameter is used
5853         #         for result publication in the study. Otherwise, if automatic
5854         #         publication is switched on, default value is used for result name.
5855         #
5856         #  @return A compound of sub-shapes of aShape.
5857         #
5858         #  @ref swig_all_decompose "Example"
5859         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5860             """
5861             Obtain a compound of sub-shapes of aShape,
5862             selected by their indices in list of all sub-shapes of type aType.
5863             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5864
5865             Parameters:
5866                 aShape Shape to get sub-shape of.
5867                 ListOfID List of sub-shapes indices.
5868                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5869                 theName Object name; when specified, this parameter is used
5870                         for result publication in the study. Otherwise, if automatic
5871                         publication is switched on, default value is used for result name.
5872
5873             Returns:
5874                 A compound of sub-shapes of aShape.
5875             """
5876             # Example: see GEOM_TestAll.py
5877             ListOfIDs = []
5878             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5879             for ind in ListOfInd:
5880                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5881             # note: auto-publishing is done in self.GetSubShape()
5882             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5883             return anObj
5884
5885         ## Explode a shape on sub-shapes of a given type.
5886         #  Sub-shapes will be sorted taking into account their gravity centers,
5887         #  to provide stable order of sub-shapes.
5888         #  If the shape itself matches the type, it is also returned.
5889         #  @param aShape Shape to be exploded.
5890         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5891         #  @param theName Object name; when specified, this parameter is used
5892         #         for result publication in the study. Otherwise, if automatic
5893         #         publication is switched on, default value is used for result name.
5894         #
5895         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5896         #
5897         #  @ref swig_SubShapeAllSorted "Example"
5898         @ManageTransactions("ShapesOp")
5899         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5900             """
5901             Explode a shape on sub-shapes of a given type.
5902             Sub-shapes will be sorted taking into account their gravity centers,
5903             to provide stable order of sub-shapes.
5904             If the shape itself matches the type, it is also returned.
5905
5906             Parameters:
5907                 aShape Shape to be exploded.
5908                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5909                 theName Object name; when specified, this parameter is used
5910                         for result publication in the study. Otherwise, if automatic
5911                         publication is switched on, default value is used for result name.
5912
5913             Returns:
5914                 List of sub-shapes of type theShapeType, contained in theShape.
5915             """
5916             # Example: see GEOM_TestAll.py
5917             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5918             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5919             self._autoPublish(ListObj, theName, "subshape")
5920             return ListObj
5921
5922         ## Explode a shape on sub-shapes of a given type.
5923         #  Sub-shapes will be sorted taking into account their gravity centers,
5924         #  to provide stable order of sub-shapes.
5925         #  @param aShape Shape to be exploded.
5926         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5927         #  @return List of IDs of sub-shapes.
5928         #
5929         #  @ref swig_all_decompose "Example"
5930         @ManageTransactions("ShapesOp")
5931         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5932             """
5933             Explode a shape on sub-shapes of a given type.
5934             Sub-shapes will be sorted taking into account their gravity centers,
5935             to provide stable order of sub-shapes.
5936
5937             Parameters:
5938                 aShape Shape to be exploded.
5939                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5940
5941             Returns:
5942                 List of IDs of sub-shapes.
5943             """
5944             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5945             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5946             return ListIDs
5947
5948         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5949         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5950         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5951         #  @param aShape Shape to get sub-shape of.
5952         #  @param ListOfInd List of sub-shapes indices.
5953         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5954         #  @param theName Object name; when specified, this parameter is used
5955         #         for result publication in the study. Otherwise, if automatic
5956         #         publication is switched on, default value is used for result name.
5957         #
5958         #  @return A compound of sub-shapes of aShape.
5959         #
5960         #  @ref swig_all_decompose "Example"
5961         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5962             """
5963             Obtain a compound of sub-shapes of aShape,
5964             selected by they indices in sorted list of all sub-shapes of type aType.
5965             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5966
5967             Parameters:
5968                 aShape Shape to get sub-shape of.
5969                 ListOfID List of sub-shapes indices.
5970                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5971                 theName Object name; when specified, this parameter is used
5972                         for result publication in the study. Otherwise, if automatic
5973                         publication is switched on, default value is used for result name.
5974
5975             Returns:
5976                 A compound of sub-shapes of aShape.
5977             """
5978             # Example: see GEOM_TestAll.py
5979             ListOfIDs = []
5980             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5981             for ind in ListOfInd:
5982                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5983             # note: auto-publishing is done in self.GetSubShape()
5984             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5985             return anObj
5986
5987         ## Extract shapes (excluding the main shape) of given type.
5988         #  @param aShape The shape.
5989         #  @param aType  The shape type (see ShapeType())
5990         #  @param isSorted Boolean flag to switch sorting on/off.
5991         #  @param theName Object name; when specified, this parameter is used
5992         #         for result publication in the study. Otherwise, if automatic
5993         #         publication is switched on, default value is used for result name.
5994         #
5995         #  @return List of sub-shapes of type aType, contained in aShape.
5996         #
5997         #  @ref swig_FilletChamfer "Example"
5998         @ManageTransactions("ShapesOp")
5999         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6000             """
6001             Extract shapes (excluding the main shape) of given type.
6002
6003             Parameters:
6004                 aShape The shape.
6005                 aType  The shape type (see geompy.ShapeType)
6006                 isSorted Boolean flag to switch sorting on/off.
6007                 theName Object name; when specified, this parameter is used
6008                         for result publication in the study. Otherwise, if automatic
6009                         publication is switched on, default value is used for result name.
6010
6011             Returns:
6012                 List of sub-shapes of type aType, contained in aShape.
6013             """
6014             # Example: see GEOM_TestAll.py
6015             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6016             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6017             self._autoPublish(ListObj, theName, "subshape")
6018             return ListObj
6019
6020         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6021         #  @param aShape Main shape.
6022         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6023         #  @param theName Object name; when specified, this parameter is used
6024         #         for result publication in the study. Otherwise, if automatic
6025         #         publication is switched on, default value is used for result name.
6026         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6027         #
6028         #  @ref swig_all_decompose "Example"
6029         @ManageTransactions("ShapesOp")
6030         def SubShapes(self, aShape, anIDs, theName=None):
6031             """
6032             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6033
6034             Parameters:
6035                 aShape Main shape.
6036                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6037                 theName Object name; when specified, this parameter is used
6038                         for result publication in the study. Otherwise, if automatic
6039                         publication is switched on, default value is used for result name.
6040
6041             Returns:
6042                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6043             """
6044             # Example: see GEOM_TestAll.py
6045             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6046             RaiseIfFailed("SubShapes", self.ShapesOp)
6047             self._autoPublish(ListObj, theName, "subshape")
6048             return ListObj
6049
6050         # end of l4_decompose
6051         ## @}
6052
6053         ## @addtogroup l4_decompose_d
6054         ## @{
6055
6056         ## Deprecated method
6057         #  It works like SubShapeAllSortedCentres(), but wrongly
6058         #  defines centres of faces, shells and solids.
6059         @ManageTransactions("ShapesOp")
6060         def SubShapeAllSorted(self, aShape, aType, theName=None):
6061             """
6062             Deprecated method
6063             It works like geompy.SubShapeAllSortedCentres, but wrongly
6064             defines centres of faces, shells and solids.
6065             """
6066             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6067             RaiseIfFailed("MakeExplode", self.ShapesOp)
6068             self._autoPublish(ListObj, theName, "subshape")
6069             return ListObj
6070
6071         ## Deprecated method
6072         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6073         #  defines centres of faces, shells and solids.
6074         @ManageTransactions("ShapesOp")
6075         def SubShapeAllSortedIDs(self, aShape, aType):
6076             """
6077             Deprecated method
6078             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6079             defines centres of faces, shells and solids.
6080             """
6081             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6082             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6083             return ListIDs
6084
6085         ## Deprecated method
6086         #  It works like SubShapeSortedCentres(), but has a bug
6087         #  (wrongly defines centres of faces, shells and solids).
6088         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6089             """
6090             Deprecated method
6091             It works like geompy.SubShapeSortedCentres, but has a bug
6092             (wrongly defines centres of faces, shells and solids).
6093             """
6094             ListOfIDs = []
6095             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6096             for ind in ListOfInd:
6097                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6098             # note: auto-publishing is done in self.GetSubShape()
6099             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6100             return anObj
6101
6102         # end of l4_decompose_d
6103         ## @}
6104
6105         ## @addtogroup l3_healing
6106         ## @{
6107
6108         ## Apply a sequence of Shape Healing operators to the given object.
6109         #  @param theShape Shape to be processed.
6110         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6111         #  @param theParameters List of names of parameters
6112         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6113         #  @param theValues List of values of parameters, in the same order
6114         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6115         #  @param theName Object name; when specified, this parameter is used
6116         #         for result publication in the study. Otherwise, if automatic
6117         #         publication is switched on, default value is used for result name.
6118         #
6119         #  <b> Operators and Parameters: </b> \n
6120         #
6121         #  * \b FixShape - corrects invalid shapes. \n
6122         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6123         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6124         #
6125         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6126         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6127         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6128         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6129         #
6130         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6131         #    surfaces in segments using a certain angle. \n
6132         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6133         #    if Angle=180, four if Angle=90, etc). \n
6134         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6135         #
6136         #  * \b SplitClosedFaces - splits closed faces in segments.
6137         #    The number of segments depends on the number of splitting points.\n
6138         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6139         #
6140         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6141         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6142         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6143         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6144         #   This and the previous parameters can take the following values:\n
6145         #   \b Parametric \b Continuity \n
6146         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6147         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6148         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6149         #    ruling out sharp edges).\n
6150         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6151         #       are of the same magnitude).\n
6152         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6153         #    or surfaces (d/du C(u)) are the same at junction. \n
6154         #   \b Geometric \b Continuity \n
6155         #   \b G1: first derivatives are proportional at junction.\n
6156         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6157         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6158         #   \b G2: first and second derivatives are proportional at junction.
6159         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6160         #    continuity requires that the underlying parameterization was continuous as well.
6161         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6162         #
6163         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6164         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6165         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6166         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6167         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6168         #       with the specified parameters.\n
6169         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6170         #       with the specified parameters.\n
6171         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6172         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6173         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6174         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6175         #
6176         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6177         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6178         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6179         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6180         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6181         #
6182         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6183         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6184         #
6185         #
6186         #  @return New GEOM.GEOM_Object, containing processed shape.
6187         #
6188         #  \n @ref tui_shape_processing "Example"
6189         @ManageTransactions("HealOp")
6190         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6191             """
6192             Apply a sequence of Shape Healing operators to the given object.
6193
6194             Parameters:
6195                 theShape Shape to be processed.
6196                 theValues List of values of parameters, in the same order
6197                           as parameters are listed in theParameters list.
6198                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6199                 theParameters List of names of parameters
6200                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6201                 theName Object name; when specified, this parameter is used
6202                         for result publication in the study. Otherwise, if automatic
6203                         publication is switched on, default value is used for result name.
6204
6205                 Operators and Parameters:
6206
6207                  * FixShape - corrects invalid shapes.
6208                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6209                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6210                  * FixFaceSize - removes small faces, such as spots and strips.
6211                      * FixFaceSize.Tolerance - defines minimum possible face size.
6212                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
6213                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6214                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6215                                 in segments using a certain angle.
6216                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6217                                           if Angle=180, four if Angle=90, etc).
6218                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6219                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6220                                       splitting points.
6221                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6222                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6223                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6224                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6225                      * SplitContinuity.CurveContinuity - required continuity for curves.
6226                        This and the previous parameters can take the following values:
6227
6228                        Parametric Continuity:
6229                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6230                                                    coincidental. The curves or surfaces may still meet at an angle,
6231                                                    giving rise to a sharp corner or edge).
6232                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6233                                                    are parallel, ruling out sharp edges).
6234                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6235                                                   or surfaces are of the same magnitude).
6236                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6237                           curves or surfaces (d/du C(u)) are the same at junction.
6238
6239                        Geometric Continuity:
6240                        G1: first derivatives are proportional at junction.
6241                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6242                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6243                        G2: first and second derivatives are proportional at junction. As the names imply,
6244                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6245                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6246                            geometric continuity of order n, but not vice-versa.
6247                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6248                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6249                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6250                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6251                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6252                                                         the specified parameters.
6253                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6254                                                         the specified parameters.
6255                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6256                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6257                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6258                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6259                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6260                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6261                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6262                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6263                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6264                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6265                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6266
6267             Returns:
6268                 New GEOM.GEOM_Object, containing processed shape.
6269
6270             Note: For more information look through SALOME Geometry User's Guide->
6271                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6272             """
6273             # Example: see GEOM_TestHealing.py
6274             theValues,Parameters = ParseList(theValues)
6275             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6276             # To avoid script failure in case of good argument shape
6277             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6278                 return theShape
6279             RaiseIfFailed("ProcessShape", self.HealOp)
6280             for string in (theOperators + theParameters):
6281                 Parameters = ":" + Parameters
6282                 pass
6283             anObj.SetParameters(Parameters)
6284             self._autoPublish(anObj, theName, "healed")
6285             return anObj
6286
6287         ## Remove faces from the given object (shape).
6288         #  @param theObject Shape to be processed.
6289         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6290         #                  removes ALL faces of the given object.
6291         #  @param theName Object name; when specified, this parameter is used
6292         #         for result publication in the study. Otherwise, if automatic
6293         #         publication is switched on, default value is used for result name.
6294         #
6295         #  @return New GEOM.GEOM_Object, containing processed shape.
6296         #
6297         #  @ref tui_suppress_faces "Example"
6298         @ManageTransactions("HealOp")
6299         def SuppressFaces(self, theObject, theFaces, theName=None):
6300             """
6301             Remove faces from the given object (shape).
6302
6303             Parameters:
6304                 theObject Shape to be processed.
6305                 theFaces Indices of faces to be removed, if EMPTY then the method
6306                          removes ALL faces of the given object.
6307                 theName Object name; when specified, this parameter is used
6308                         for result publication in the study. Otherwise, if automatic
6309                         publication is switched on, default value is used for result name.
6310
6311             Returns:
6312                 New GEOM.GEOM_Object, containing processed shape.
6313             """
6314             # Example: see GEOM_TestHealing.py
6315             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6316             RaiseIfFailed("SuppressFaces", self.HealOp)
6317             self._autoPublish(anObj, theName, "suppressFaces")
6318             return anObj
6319
6320         ## Sewing of some shapes into single shape.
6321         #  @param ListShape Shapes to be processed.
6322         #  @param theTolerance Required tolerance value.
6323         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6324         #  @param theName Object name; when specified, this parameter is used
6325         #         for result publication in the study. Otherwise, if automatic
6326         #         publication is switched on, default value is used for result name.
6327         #
6328         #  @return New GEOM.GEOM_Object, containing processed shape.
6329         #
6330         #  @ref tui_sewing "Example"
6331         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6332             """
6333             Sewing of some shapes into single shape.
6334
6335             Parameters:
6336                 ListShape Shapes to be processed.
6337                 theTolerance Required tolerance value.
6338                 AllowNonManifold Flag that allows non-manifold sewing.
6339                 theName Object name; when specified, this parameter is used
6340                         for result publication in the study. Otherwise, if automatic
6341                         publication is switched on, default value is used for result name.
6342
6343             Returns:
6344                 New GEOM.GEOM_Object, containing processed shape.
6345             """
6346             # Example: see GEOM_TestHealing.py
6347             comp = self.MakeCompound(ListShape)
6348             # note: auto-publishing is done in self.Sew()
6349             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6350             return anObj
6351
6352         ## Sewing of the given object.
6353         #  @param theObject Shape to be processed.
6354         #  @param theTolerance Required tolerance value.
6355         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6356         #  @param theName Object name; when specified, this parameter is used
6357         #         for result publication in the study. Otherwise, if automatic
6358         #         publication is switched on, default value is used for result name.
6359         #
6360         #  @return New GEOM.GEOM_Object, containing processed shape.
6361         @ManageTransactions("HealOp")
6362         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6363             """
6364             Sewing of the given object.
6365
6366             Parameters:
6367                 theObject Shape to be processed.
6368                 theTolerance Required tolerance value.
6369                 AllowNonManifold Flag that allows non-manifold sewing.
6370                 theName Object name; when specified, this parameter is used
6371                         for result publication in the study. Otherwise, if automatic
6372                         publication is switched on, default value is used for result name.
6373
6374             Returns:
6375                 New GEOM.GEOM_Object, containing processed shape.
6376             """
6377             # Example: see MakeSewing() above
6378             theTolerance,Parameters = ParseParameters(theTolerance)
6379             if AllowNonManifold:
6380                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6381             else:
6382                 anObj = self.HealOp.Sew(theObject, theTolerance)
6383             # To avoid script failure in case of good argument shape
6384             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6385                 return theObject
6386             RaiseIfFailed("Sew", self.HealOp)
6387             anObj.SetParameters(Parameters)
6388             self._autoPublish(anObj, theName, "sewed")
6389             return anObj
6390
6391         ## Rebuild the topology of theCompound of solids by removing
6392         #  of the faces that are shared by several solids.
6393         #  @param theCompound Shape to be processed.
6394         #  @param theName Object name; when specified, this parameter is used
6395         #         for result publication in the study. Otherwise, if automatic
6396         #         publication is switched on, default value is used for result name.
6397         #
6398         #  @return New GEOM.GEOM_Object, containing processed shape.
6399         #
6400         #  @ref tui_remove_webs "Example"
6401         @ManageTransactions("HealOp")
6402         def RemoveInternalFaces (self, theCompound, theName=None):
6403             """
6404             Rebuild the topology of theCompound of solids by removing
6405             of the faces that are shared by several solids.
6406
6407             Parameters:
6408                 theCompound Shape to be processed.
6409                 theName Object name; when specified, this parameter is used
6410                         for result publication in the study. Otherwise, if automatic
6411                         publication is switched on, default value is used for result name.
6412
6413             Returns:
6414                 New GEOM.GEOM_Object, containing processed shape.
6415             """
6416             # Example: see GEOM_TestHealing.py
6417             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6418             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6419             self._autoPublish(anObj, theName, "removeWebs")
6420             return anObj
6421
6422         ## Remove internal wires and edges from the given object (face).
6423         #  @param theObject Shape to be processed.
6424         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6425         #                  removes ALL internal wires of the given object.
6426         #  @param theName Object name; when specified, this parameter is used
6427         #         for result publication in the study. Otherwise, if automatic
6428         #         publication is switched on, default value is used for result name.
6429         #
6430         #  @return New GEOM.GEOM_Object, containing processed shape.
6431         #
6432         #  @ref tui_suppress_internal_wires "Example"
6433         @ManageTransactions("HealOp")
6434         def SuppressInternalWires(self, theObject, theWires, theName=None):
6435             """
6436             Remove internal wires and edges from the given object (face).
6437
6438             Parameters:
6439                 theObject Shape to be processed.
6440                 theWires Indices of wires to be removed, if EMPTY then the method
6441                          removes ALL internal wires of the given object.
6442                 theName Object name; when specified, this parameter is used
6443                         for result publication in the study. Otherwise, if automatic
6444                         publication is switched on, default value is used for result name.
6445
6446             Returns:
6447                 New GEOM.GEOM_Object, containing processed shape.
6448             """
6449             # Example: see GEOM_TestHealing.py
6450             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6451             RaiseIfFailed("RemoveIntWires", self.HealOp)
6452             self._autoPublish(anObj, theName, "suppressWires")
6453             return anObj
6454
6455         ## Remove internal closed contours (holes) from the given object.
6456         #  @param theObject Shape to be processed.
6457         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6458         #                  removes ALL internal holes of the given object
6459         #  @param theName Object name; when specified, this parameter is used
6460         #         for result publication in the study. Otherwise, if automatic
6461         #         publication is switched on, default value is used for result name.
6462         #
6463         #  @return New GEOM.GEOM_Object, containing processed shape.
6464         #
6465         #  @ref tui_suppress_holes "Example"
6466         @ManageTransactions("HealOp")
6467         def SuppressHoles(self, theObject, theWires, theName=None):
6468             """
6469             Remove internal closed contours (holes) from the given object.
6470
6471             Parameters:
6472                 theObject Shape to be processed.
6473                 theWires Indices of wires to be removed, if EMPTY then the method
6474                          removes ALL internal holes of the given object
6475                 theName Object name; when specified, this parameter is used
6476                         for result publication in the study. Otherwise, if automatic
6477                         publication is switched on, default value is used for result name.
6478
6479             Returns:
6480                 New GEOM.GEOM_Object, containing processed shape.
6481             """
6482             # Example: see GEOM_TestHealing.py
6483             anObj = self.HealOp.FillHoles(theObject, theWires)
6484             RaiseIfFailed("FillHoles", self.HealOp)
6485             self._autoPublish(anObj, theName, "suppressHoles")
6486             return anObj
6487
6488         ## Close an open wire.
6489         #  @param theObject Shape to be processed.
6490         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6491         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6492         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6493         #                        If False : closure by creation of an edge between ends.
6494         #  @param theName Object name; when specified, this parameter is used
6495         #         for result publication in the study. Otherwise, if automatic
6496         #         publication is switched on, default value is used for result name.
6497         #
6498         #  @return New GEOM.GEOM_Object, containing processed shape.
6499         #
6500         #  @ref tui_close_contour "Example"
6501         @ManageTransactions("HealOp")
6502         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6503             """
6504             Close an open wire.
6505
6506             Parameters:
6507                 theObject Shape to be processed.
6508                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6509                          if [ ], then theObject itself is a wire.
6510                 isCommonVertex If True  : closure by creation of a common vertex,
6511                                If False : closure by creation of an edge between ends.
6512                 theName Object name; when specified, this parameter is used
6513                         for result publication in the study. Otherwise, if automatic
6514                         publication is switched on, default value is used for result name.
6515
6516             Returns:
6517                 New GEOM.GEOM_Object, containing processed shape.
6518             """
6519             # Example: see GEOM_TestHealing.py
6520             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6521             RaiseIfFailed("CloseContour", self.HealOp)
6522             self._autoPublish(anObj, theName, "closeContour")
6523             return anObj
6524
6525         ## Addition of a point to a given edge object.
6526         #  @param theObject Shape to be processed.
6527         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6528         #                      if -1, then theObject itself is the edge.
6529         #  @param theValue Value of parameter on edge or length parameter,
6530         #                  depending on \a isByParameter.
6531         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6532         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6533         #  @param theName Object name; when specified, this parameter is used
6534         #         for result publication in the study. Otherwise, if automatic
6535         #         publication is switched on, default value is used for result name.
6536         #
6537         #  @return New GEOM.GEOM_Object, containing processed shape.
6538         #
6539         #  @ref tui_add_point_on_edge "Example"
6540         @ManageTransactions("HealOp")
6541         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6542             """
6543             Addition of a point to a given edge object.
6544
6545             Parameters:
6546                 theObject Shape to be processed.
6547                 theEdgeIndex Index of edge to be divided within theObject's shape,
6548                              if -1, then theObject itself is the edge.
6549                 theValue Value of parameter on edge or length parameter,
6550                          depending on isByParameter.
6551                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6552                               if FALSE : theValue is treated as a length parameter [0..1]
6553                 theName Object name; when specified, this parameter is used
6554                         for result publication in the study. Otherwise, if automatic
6555                         publication is switched on, default value is used for result name.
6556
6557             Returns:
6558                 New GEOM.GEOM_Object, containing processed shape.
6559             """
6560             # Example: see GEOM_TestHealing.py
6561             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6562             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6563             RaiseIfFailed("DivideEdge", self.HealOp)
6564             anObj.SetParameters(Parameters)
6565             self._autoPublish(anObj, theName, "divideEdge")
6566             return anObj
6567
6568         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6569         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6570         #  @param theVertices A list of vertices to suppress. If the list
6571         #                     is empty, all vertices in a wire will be assumed.
6572         #  @param theName Object name; when specified, this parameter is used
6573         #         for result publication in the study. Otherwise, if automatic
6574         #         publication is switched on, default value is used for result name.
6575         #
6576         #  @return New GEOM.GEOM_Object with modified wire.
6577         #
6578         #  @ref tui_fuse_collinear_edges "Example"
6579         @ManageTransactions("HealOp")
6580         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6581             """
6582             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6583
6584             Parameters:
6585                 theWire Wire to minimize the number of C1 continuous edges in.
6586                 theVertices A list of vertices to suppress. If the list
6587                             is empty, all vertices in a wire will be assumed.
6588                 theName Object name; when specified, this parameter is used
6589                         for result publication in the study. Otherwise, if automatic
6590                         publication is switched on, default value is used for result name.
6591
6592             Returns:
6593                 New GEOM.GEOM_Object with modified wire.
6594             """
6595             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6596             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6597             self._autoPublish(anObj, theName, "fuseEdges")
6598             return anObj
6599
6600         ## Change orientation of the given object. Updates given shape.
6601         #  @param theObject Shape to be processed.
6602         #  @return Updated <var>theObject</var>
6603         #
6604         #  @ref swig_todo "Example"
6605         @ManageTransactions("HealOp")
6606         def ChangeOrientationShell(self,theObject):
6607             """
6608             Change orientation of the given object. Updates given shape.
6609
6610             Parameters:
6611                 theObject Shape to be processed.
6612
6613             Returns:
6614                 Updated theObject
6615             """
6616             theObject = self.HealOp.ChangeOrientation(theObject)
6617             RaiseIfFailed("ChangeOrientation", self.HealOp)
6618             pass
6619
6620         ## Change orientation of the given object.
6621         #  @param theObject Shape to be processed.
6622         #  @param theName Object name; when specified, this parameter is used
6623         #         for result publication in the study. Otherwise, if automatic
6624         #         publication is switched on, default value is used for result name.
6625         #
6626         #  @return New GEOM.GEOM_Object, containing processed shape.
6627         #
6628         #  @ref swig_todo "Example"
6629         @ManageTransactions("HealOp")
6630         def ChangeOrientationShellCopy(self, theObject, theName=None):
6631             """
6632             Change orientation of the given object.
6633
6634             Parameters:
6635                 theObject Shape to be processed.
6636                 theName Object name; when specified, this parameter is used
6637                         for result publication in the study. Otherwise, if automatic
6638                         publication is switched on, default value is used for result name.
6639
6640             Returns:
6641                 New GEOM.GEOM_Object, containing processed shape.
6642             """
6643             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6644             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6645             self._autoPublish(anObj, theName, "reversed")
6646             return anObj
6647
6648         ## Try to limit tolerance of the given object by value \a theTolerance.
6649         #  @param theObject Shape to be processed.
6650         #  @param theTolerance Required tolerance value.
6651         #  @param theName Object name; when specified, this parameter is used
6652         #         for result publication in the study. Otherwise, if automatic
6653         #         publication is switched on, default value is used for result name.
6654         #
6655         #  @return New GEOM.GEOM_Object, containing processed shape.
6656         #
6657         #  @ref tui_limit_tolerance "Example"
6658         @ManageTransactions("HealOp")
6659         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6660             """
6661             Try to limit tolerance of the given object by value theTolerance.
6662
6663             Parameters:
6664                 theObject Shape to be processed.
6665                 theTolerance Required tolerance value.
6666                 theName Object name; when specified, this parameter is used
6667                         for result publication in the study. Otherwise, if automatic
6668                         publication is switched on, default value is used for result name.
6669
6670             Returns:
6671                 New GEOM.GEOM_Object, containing processed shape.
6672             """
6673             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6674             RaiseIfFailed("LimitTolerance", self.HealOp)
6675             self._autoPublish(anObj, theName, "limitTolerance")
6676             return anObj
6677
6678         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6679         #  that constitute a free boundary of the given shape.
6680         #  @param theObject Shape to get free boundary of.
6681         #  @param theName Object name; when specified, this parameter is used
6682         #         for result publication in the study. Otherwise, if automatic
6683         #         publication is switched on, default value is used for result name.
6684         #
6685         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6686         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6687         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6688         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6689         #
6690         #  @ref tui_measurement_tools_page "Example"
6691         @ManageTransactions("HealOp")
6692         def GetFreeBoundary(self, theObject, theName=None):
6693             """
6694             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6695             that constitute a free boundary of the given shape.
6696
6697             Parameters:
6698                 theObject Shape to get free boundary of.
6699                 theName Object name; when specified, this parameter is used
6700                         for result publication in the study. Otherwise, if automatic
6701                         publication is switched on, default value is used for result name.
6702
6703             Returns:
6704                 [status, theClosedWires, theOpenWires]
6705                  status: FALSE, if an error(s) occured during the method execution.
6706                  theClosedWires: Closed wires on the free boundary of the given shape.
6707                  theOpenWires: Open wires on the free boundary of the given shape.
6708             """
6709             # Example: see GEOM_TestHealing.py
6710             anObj = self.HealOp.GetFreeBoundary(theObject)
6711             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6712             self._autoPublish(anObj[1], theName, "closedWire")
6713             self._autoPublish(anObj[2], theName, "openWire")
6714             return anObj
6715
6716         ## Replace coincident faces in theShape by one face.
6717         #  @param theShape Initial shape.
6718         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6719         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6720         #                         otherwise all initial shapes.
6721         #  @param theName Object name; when specified, this parameter is used
6722         #         for result publication in the study. Otherwise, if automatic
6723         #         publication is switched on, default value is used for result name.
6724         #
6725         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6726         #
6727         #  @ref tui_glue_faces "Example"
6728         @ManageTransactions("ShapesOp")
6729         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6730             """
6731             Replace coincident faces in theShape by one face.
6732
6733             Parameters:
6734                 theShape Initial shape.
6735                 theTolerance Maximum distance between faces, which can be considered as coincident.
6736                 doKeepNonSolids If FALSE, only solids will present in the result,
6737                                 otherwise all initial shapes.
6738                 theName Object name; when specified, this parameter is used
6739                         for result publication in the study. Otherwise, if automatic
6740                         publication is switched on, default value is used for result name.
6741
6742             Returns:
6743                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6744             """
6745             # Example: see GEOM_Spanner.py
6746             theTolerance,Parameters = ParseParameters(theTolerance)
6747             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6748             if anObj is None:
6749                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6750             anObj.SetParameters(Parameters)
6751             self._autoPublish(anObj, theName, "glueFaces")
6752             return anObj
6753
6754         ## Find coincident faces in theShape for possible gluing.
6755         #  @param theShape Initial shape.
6756         #  @param theTolerance Maximum distance between faces,
6757         #                      which can be considered as coincident.
6758         #  @param theName Object name; when specified, this parameter is used
6759         #         for result publication in the study. Otherwise, if automatic
6760         #         publication is switched on, default value is used for result name.
6761         #
6762         #  @return GEOM.ListOfGO
6763         #
6764         #  @ref tui_glue_faces "Example"
6765         @ManageTransactions("ShapesOp")
6766         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6767             """
6768             Find coincident faces in theShape for possible gluing.
6769
6770             Parameters:
6771                 theShape Initial shape.
6772                 theTolerance Maximum distance between faces,
6773                              which can be considered as coincident.
6774                 theName Object name; when specified, this parameter is used
6775                         for result publication in the study. Otherwise, if automatic
6776                         publication is switched on, default value is used for result name.
6777
6778             Returns:
6779                 GEOM.ListOfGO
6780             """
6781             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6782             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6783             self._autoPublish(anObj, theName, "facesToGlue")
6784             return anObj
6785
6786         ## Replace coincident faces in theShape by one face
6787         #  in compliance with given list of faces
6788         #  @param theShape Initial shape.
6789         #  @param theTolerance Maximum distance between faces,
6790         #                      which can be considered as coincident.
6791         #  @param theFaces List of faces for gluing.
6792         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6793         #                         otherwise all initial shapes.
6794         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6795         #                        will be glued, otherwise only the edges,
6796         #                        belonging to <VAR>theFaces</VAR>.
6797         #  @param theName Object name; when specified, this parameter is used
6798         #         for result publication in the study. Otherwise, if automatic
6799         #         publication is switched on, default value is used for result name.
6800         #
6801         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6802         #          without some faces.
6803         #
6804         #  @ref tui_glue_faces "Example"
6805         @ManageTransactions("ShapesOp")
6806         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6807                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6808             """
6809             Replace coincident faces in theShape by one face
6810             in compliance with given list of faces
6811
6812             Parameters:
6813                 theShape Initial shape.
6814                 theTolerance Maximum distance between faces,
6815                              which can be considered as coincident.
6816                 theFaces List of faces for gluing.
6817                 doKeepNonSolids If FALSE, only solids will present in the result,
6818                                 otherwise all initial shapes.
6819                 doGlueAllEdges If TRUE, all coincident edges of theShape
6820                                will be glued, otherwise only the edges,
6821                                belonging to theFaces.
6822                 theName Object name; when specified, this parameter is used
6823                         for result publication in the study. Otherwise, if automatic
6824                         publication is switched on, default value is used for result name.
6825
6826             Returns:
6827                 New GEOM.GEOM_Object, containing a copy of theShape
6828                     without some faces.
6829             """
6830             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6831                                                       doKeepNonSolids, doGlueAllEdges)
6832             if anObj is None:
6833                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6834             self._autoPublish(anObj, theName, "glueFaces")
6835             return anObj
6836
6837         ## Replace coincident edges in theShape by one edge.
6838         #  @param theShape Initial shape.
6839         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6840         #  @param theName Object name; when specified, this parameter is used
6841         #         for result publication in the study. Otherwise, if automatic
6842         #         publication is switched on, default value is used for result name.
6843         #
6844         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6845         #
6846         #  @ref tui_glue_edges "Example"
6847         @ManageTransactions("ShapesOp")
6848         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6849             """
6850             Replace coincident edges in theShape by one edge.
6851
6852             Parameters:
6853                 theShape Initial shape.
6854                 theTolerance Maximum distance between edges, which can be considered as coincident.
6855                 theName Object name; when specified, this parameter is used
6856                         for result publication in the study. Otherwise, if automatic
6857                         publication is switched on, default value is used for result name.
6858
6859             Returns:
6860                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6861             """
6862             theTolerance,Parameters = ParseParameters(theTolerance)
6863             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6864             if anObj is None:
6865                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6866             anObj.SetParameters(Parameters)
6867             self._autoPublish(anObj, theName, "glueEdges")
6868             return anObj
6869
6870         ## Find coincident edges in theShape for possible gluing.
6871         #  @param theShape Initial shape.
6872         #  @param theTolerance Maximum distance between edges,
6873         #                      which can be considered as coincident.
6874         #  @param theName Object name; when specified, this parameter is used
6875         #         for result publication in the study. Otherwise, if automatic
6876         #         publication is switched on, default value is used for result name.
6877         #
6878         #  @return GEOM.ListOfGO
6879         #
6880         #  @ref tui_glue_edges "Example"
6881         @ManageTransactions("ShapesOp")
6882         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6883             """
6884             Find coincident edges in theShape for possible gluing.
6885
6886             Parameters:
6887                 theShape Initial shape.
6888                 theTolerance Maximum distance between edges,
6889                              which can be considered as coincident.
6890                 theName Object name; when specified, this parameter is used
6891                         for result publication in the study. Otherwise, if automatic
6892                         publication is switched on, default value is used for result name.
6893
6894             Returns:
6895                 GEOM.ListOfGO
6896             """
6897             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6898             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6899             self._autoPublish(anObj, theName, "edgesToGlue")
6900             return anObj
6901
6902         ## Replace coincident edges in theShape by one edge
6903         #  in compliance with given list of edges.
6904         #  @param theShape Initial shape.
6905         #  @param theTolerance Maximum distance between edges,
6906         #                      which can be considered as coincident.
6907         #  @param theEdges List of edges for gluing.
6908         #  @param theName Object name; when specified, this parameter is used
6909         #         for result publication in the study. Otherwise, if automatic
6910         #         publication is switched on, default value is used for result name.
6911         #
6912         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6913         #          without some edges.
6914         #
6915         #  @ref tui_glue_edges "Example"
6916         @ManageTransactions("ShapesOp")
6917         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6918             """
6919             Replace coincident edges in theShape by one edge
6920             in compliance with given list of edges.
6921
6922             Parameters:
6923                 theShape Initial shape.
6924                 theTolerance Maximum distance between edges,
6925                              which can be considered as coincident.
6926                 theEdges List of edges for gluing.
6927                 theName Object name; when specified, this parameter is used
6928                         for result publication in the study. Otherwise, if automatic
6929                         publication is switched on, default value is used for result name.
6930
6931             Returns:
6932                 New GEOM.GEOM_Object, containing a copy of theShape
6933                 without some edges.
6934             """
6935             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6936             if anObj is None:
6937                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6938             self._autoPublish(anObj, theName, "glueEdges")
6939             return anObj
6940
6941         # end of l3_healing
6942         ## @}
6943
6944         ## @addtogroup l3_boolean Boolean Operations
6945         ## @{
6946
6947         # -----------------------------------------------------------------------------
6948         # Boolean (Common, Cut, Fuse, Section)
6949         # -----------------------------------------------------------------------------
6950
6951         ## Perform one of boolean operations on two given shapes.
6952         #  @param theShape1 First argument for boolean operation.
6953         #  @param theShape2 Second argument for boolean operation.
6954         #  @param theOperation Indicates the operation to be done:\n
6955         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6956         #  @param checkSelfInte The flag that tells if the arguments should
6957         #         be checked for self-intersection prior to the operation.
6958         #  @param theName Object name; when specified, this parameter is used
6959         #         for result publication in the study. Otherwise, if automatic
6960         #         publication is switched on, default value is used for result name.
6961         #
6962         #  @note This algorithm doesn't find all types of self-intersections.
6963         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6964         #        vertex/face and edge/face intersections. Face/face
6965         #        intersections detection is switched off as it is a
6966         #        time-consuming operation that gives an impact on performance.
6967         #        To find all self-intersections please use
6968         #        CheckSelfIntersections() method.
6969         #
6970         #  @return New GEOM.GEOM_Object, containing the result shape.
6971         #
6972         #  @ref tui_fuse "Example"
6973         @ManageTransactions("BoolOp")
6974         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6975             """
6976             Perform one of boolean operations on two given shapes.
6977
6978             Parameters:
6979                 theShape1 First argument for boolean operation.
6980                 theShape2 Second argument for boolean operation.
6981                 theOperation Indicates the operation to be done:
6982                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6983                 checkSelfInte The flag that tells if the arguments should
6984                               be checked for self-intersection prior to
6985                               the operation.
6986                 theName Object name; when specified, this parameter is used
6987                         for result publication in the study. Otherwise, if automatic
6988                         publication is switched on, default value is used for result name.
6989
6990             Note:
6991                     This algorithm doesn't find all types of self-intersections.
6992                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6993                     vertex/face and edge/face intersections. Face/face
6994                     intersections detection is switched off as it is a
6995                     time-consuming operation that gives an impact on performance.
6996                     To find all self-intersections please use
6997                     CheckSelfIntersections() method.
6998
6999             Returns:
7000                 New GEOM.GEOM_Object, containing the result shape.
7001             """
7002             # Example: see GEOM_TestAll.py
7003             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7004             RaiseIfFailed("MakeBoolean", self.BoolOp)
7005             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7006             self._autoPublish(anObj, theName, def_names[theOperation])
7007             return anObj
7008
7009         ## Perform Common boolean operation on two given shapes.
7010         #  @param theShape1 First argument for boolean operation.
7011         #  @param theShape2 Second argument for boolean operation.
7012         #  @param checkSelfInte The flag that tells if the arguments should
7013         #         be checked for self-intersection prior to the operation.
7014         #  @param theName Object name; when specified, this parameter is used
7015         #         for result publication in the study. Otherwise, if automatic
7016         #         publication is switched on, default value is used for result name.
7017         #
7018         #  @note This algorithm doesn't find all types of self-intersections.
7019         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7020         #        vertex/face and edge/face intersections. Face/face
7021         #        intersections detection is switched off as it is a
7022         #        time-consuming operation that gives an impact on performance.
7023         #        To find all self-intersections please use
7024         #        CheckSelfIntersections() method.
7025         #
7026         #  @return New GEOM.GEOM_Object, containing the result shape.
7027         #
7028         #  @ref tui_common "Example 1"
7029         #  \n @ref swig_MakeCommon "Example 2"
7030         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7031             """
7032             Perform Common boolean operation on two given shapes.
7033
7034             Parameters:
7035                 theShape1 First argument for boolean operation.
7036                 theShape2 Second argument for boolean operation.
7037                 checkSelfInte The flag that tells if the arguments should
7038                               be checked for self-intersection prior to
7039                               the operation.
7040                 theName Object name; when specified, this parameter is used
7041                         for result publication in the study. Otherwise, if automatic
7042                         publication is switched on, default value is used for result name.
7043
7044             Note:
7045                     This algorithm doesn't find all types of self-intersections.
7046                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7047                     vertex/face and edge/face intersections. Face/face
7048                     intersections detection is switched off as it is a
7049                     time-consuming operation that gives an impact on performance.
7050                     To find all self-intersections please use
7051                     CheckSelfIntersections() method.
7052
7053             Returns:
7054                 New GEOM.GEOM_Object, containing the result shape.
7055             """
7056             # Example: see GEOM_TestOthers.py
7057             # note: auto-publishing is done in self.MakeBoolean()
7058             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7059
7060         ## Perform Cut boolean operation on two given shapes.
7061         #  @param theShape1 First argument for boolean operation.
7062         #  @param theShape2 Second argument for boolean operation.
7063         #  @param checkSelfInte The flag that tells if the arguments should
7064         #         be checked for self-intersection prior to the operation.
7065         #  @param theName Object name; when specified, this parameter is used
7066         #         for result publication in the study. Otherwise, if automatic
7067         #         publication is switched on, default value is used for result name.
7068         #
7069         #  @note This algorithm doesn't find all types of self-intersections.
7070         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7071         #        vertex/face and edge/face intersections. Face/face
7072         #        intersections detection is switched off as it is a
7073         #        time-consuming operation that gives an impact on performance.
7074         #        To find all self-intersections please use
7075         #        CheckSelfIntersections() method.
7076         #
7077         #  @return New GEOM.GEOM_Object, containing the result shape.
7078         #
7079         #  @ref tui_cut "Example 1"
7080         #  \n @ref swig_MakeCommon "Example 2"
7081         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7082             """
7083             Perform Cut boolean operation on two given shapes.
7084
7085             Parameters:
7086                 theShape1 First argument for boolean operation.
7087                 theShape2 Second argument for boolean operation.
7088                 checkSelfInte The flag that tells if the arguments should
7089                               be checked for self-intersection prior to
7090                               the operation.
7091                 theName Object name; when specified, this parameter is used
7092                         for result publication in the study. Otherwise, if automatic
7093                         publication is switched on, default value is used for result name.
7094
7095             Note:
7096                     This algorithm doesn't find all types of self-intersections.
7097                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7098                     vertex/face and edge/face intersections. Face/face
7099                     intersections detection is switched off as it is a
7100                     time-consuming operation that gives an impact on performance.
7101                     To find all self-intersections please use
7102                     CheckSelfIntersections() method.
7103
7104             Returns:
7105                 New GEOM.GEOM_Object, containing the result shape.
7106
7107             """
7108             # Example: see GEOM_TestOthers.py
7109             # note: auto-publishing is done in self.MakeBoolean()
7110             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7111
7112         ## Perform Fuse boolean operation on two given shapes.
7113         #  @param theShape1 First argument for boolean operation.
7114         #  @param theShape2 Second argument for boolean operation.
7115         #  @param checkSelfInte The flag that tells if the arguments should
7116         #         be checked for self-intersection prior to the operation.
7117         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7118         #         operation should be performed during the operation.
7119         #  @param theName Object name; when specified, this parameter is used
7120         #         for result publication in the study. Otherwise, if automatic
7121         #         publication is switched on, default value is used for result name.
7122         #
7123         #  @note This algorithm doesn't find all types of self-intersections.
7124         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7125         #        vertex/face and edge/face intersections. Face/face
7126         #        intersections detection is switched off as it is a
7127         #        time-consuming operation that gives an impact on performance.
7128         #        To find all self-intersections please use
7129         #        CheckSelfIntersections() method.
7130         #
7131         #  @return New GEOM.GEOM_Object, containing the result shape.
7132         #
7133         #  @ref tui_fuse "Example 1"
7134         #  \n @ref swig_MakeCommon "Example 2"
7135         @ManageTransactions("BoolOp")
7136         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7137                      rmExtraEdges=False, theName=None):
7138             """
7139             Perform Fuse boolean operation on two given shapes.
7140
7141             Parameters:
7142                 theShape1 First argument for boolean operation.
7143                 theShape2 Second argument for boolean operation.
7144                 checkSelfInte The flag that tells if the arguments should
7145                               be checked for self-intersection prior to
7146                               the operation.
7147                 rmExtraEdges The flag that tells if Remove Extra Edges
7148                              operation should be performed during the operation.
7149                 theName Object name; when specified, this parameter is used
7150                         for result publication in the study. Otherwise, if automatic
7151                         publication is switched on, default value is used for result name.
7152
7153             Note:
7154                     This algorithm doesn't find all types of self-intersections.
7155                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7156                     vertex/face and edge/face intersections. Face/face
7157                     intersections detection is switched off as it is a
7158                     time-consuming operation that gives an impact on performance.
7159                     To find all self-intersections please use
7160                     CheckSelfIntersections() method.
7161
7162             Returns:
7163                 New GEOM.GEOM_Object, containing the result shape.
7164
7165             """
7166             # Example: see GEOM_TestOthers.py
7167             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7168                                          checkSelfInte, rmExtraEdges)
7169             RaiseIfFailed("MakeFuse", self.BoolOp)
7170             self._autoPublish(anObj, theName, "fuse")
7171             return anObj
7172
7173         ## Perform Section boolean operation on two given shapes.
7174         #  @param theShape1 First argument for boolean operation.
7175         #  @param theShape2 Second argument for boolean operation.
7176         #  @param checkSelfInte The flag that tells if the arguments should
7177         #         be checked for self-intersection prior to the operation.
7178         #  @param theName Object name; when specified, this parameter is used
7179         #         for result publication in the study. Otherwise, if automatic
7180         #         publication is switched on, default value is used for result name.
7181         #
7182         #  @note This algorithm doesn't find all types of self-intersections.
7183         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7184         #        vertex/face and edge/face intersections. Face/face
7185         #        intersections detection is switched off as it is a
7186         #        time-consuming operation that gives an impact on performance.
7187         #        To find all self-intersections please use
7188         #        CheckSelfIntersections() method.
7189         #
7190         #  @return New GEOM.GEOM_Object, containing the result shape.
7191         #
7192         #  @ref tui_section "Example 1"
7193         #  \n @ref swig_MakeCommon "Example 2"
7194         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7195             """
7196             Perform Section boolean operation on two given shapes.
7197
7198             Parameters:
7199                 theShape1 First argument for boolean operation.
7200                 theShape2 Second argument for boolean operation.
7201                 checkSelfInte The flag that tells if the arguments should
7202                               be checked for self-intersection prior to
7203                               the operation.
7204                 theName Object name; when specified, this parameter is used
7205                         for result publication in the study. Otherwise, if automatic
7206                         publication is switched on, default value is used for result name.
7207
7208             Note:
7209                     This algorithm doesn't find all types of self-intersections.
7210                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7211                     vertex/face and edge/face intersections. Face/face
7212                     intersections detection is switched off as it is a
7213                     time-consuming operation that gives an impact on performance.
7214                     To find all self-intersections please use
7215                     CheckSelfIntersections() method.
7216
7217             Returns:
7218                 New GEOM.GEOM_Object, containing the result shape.
7219
7220             """
7221             # Example: see GEOM_TestOthers.py
7222             # note: auto-publishing is done in self.MakeBoolean()
7223             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7224
7225         ## Perform Fuse boolean operation on the list of shapes.
7226         #  @param theShapesList Shapes to be fused.
7227         #  @param checkSelfInte The flag that tells if the arguments should
7228         #         be checked for self-intersection prior to the operation.
7229         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7230         #         operation should be performed during the operation.
7231         #  @param theName Object name; when specified, this parameter is used
7232         #         for result publication in the study. Otherwise, if automatic
7233         #         publication is switched on, default value is used for result name.
7234         #
7235         #  @note This algorithm doesn't find all types of self-intersections.
7236         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7237         #        vertex/face and edge/face intersections. Face/face
7238         #        intersections detection is switched off as it is a
7239         #        time-consuming operation that gives an impact on performance.
7240         #        To find all self-intersections please use
7241         #        CheckSelfIntersections() method.
7242         #
7243         #  @return New GEOM.GEOM_Object, containing the result shape.
7244         #
7245         #  @ref tui_fuse "Example 1"
7246         #  \n @ref swig_MakeCommon "Example 2"
7247         @ManageTransactions("BoolOp")
7248         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7249                          rmExtraEdges=False, theName=None):
7250             """
7251             Perform Fuse boolean operation on the list of shapes.
7252
7253             Parameters:
7254                 theShapesList Shapes to be fused.
7255                 checkSelfInte The flag that tells if the arguments should
7256                               be checked for self-intersection prior to
7257                               the operation.
7258                 rmExtraEdges The flag that tells if Remove Extra Edges
7259                              operation should be performed during the operation.
7260                 theName Object name; when specified, this parameter is used
7261                         for result publication in the study. Otherwise, if automatic
7262                         publication is switched on, default value is used for result name.
7263
7264             Note:
7265                     This algorithm doesn't find all types of self-intersections.
7266                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7267                     vertex/face and edge/face intersections. Face/face
7268                     intersections detection is switched off as it is a
7269                     time-consuming operation that gives an impact on performance.
7270                     To find all self-intersections please use
7271                     CheckSelfIntersections() method.
7272
7273             Returns:
7274                 New GEOM.GEOM_Object, containing the result shape.
7275
7276             """
7277             # Example: see GEOM_TestOthers.py
7278             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7279                                              rmExtraEdges)
7280             RaiseIfFailed("MakeFuseList", self.BoolOp)
7281             self._autoPublish(anObj, theName, "fuse")
7282             return anObj
7283
7284         ## Perform Common boolean operation on the list of shapes.
7285         #  @param theShapesList Shapes for Common operation.
7286         #  @param checkSelfInte The flag that tells if the arguments should
7287         #         be checked for self-intersection prior to the operation.
7288         #  @param theName Object name; when specified, this parameter is used
7289         #         for result publication in the study. Otherwise, if automatic
7290         #         publication is switched on, default value is used for result name.
7291         #
7292         #  @note This algorithm doesn't find all types of self-intersections.
7293         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7294         #        vertex/face and edge/face intersections. Face/face
7295         #        intersections detection is switched off as it is a
7296         #        time-consuming operation that gives an impact on performance.
7297         #        To find all self-intersections please use
7298         #        CheckSelfIntersections() method.
7299         #
7300         #  @return New GEOM.GEOM_Object, containing the result shape.
7301         #
7302         #  @ref tui_common "Example 1"
7303         #  \n @ref swig_MakeCommon "Example 2"
7304         @ManageTransactions("BoolOp")
7305         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7306             """
7307             Perform Common boolean operation on the list of shapes.
7308
7309             Parameters:
7310                 theShapesList Shapes for Common operation.
7311                 checkSelfInte The flag that tells if the arguments should
7312                               be checked for self-intersection prior to
7313                               the operation.
7314                 theName Object name; when specified, this parameter is used
7315                         for result publication in the study. Otherwise, if automatic
7316                         publication is switched on, default value is used for result name.
7317
7318             Note:
7319                     This algorithm doesn't find all types of self-intersections.
7320                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7321                     vertex/face and edge/face intersections. Face/face
7322                     intersections detection is switched off as it is a
7323                     time-consuming operation that gives an impact on performance.
7324                     To find all self-intersections please use
7325                     CheckSelfIntersections() method.
7326
7327             Returns:
7328                 New GEOM.GEOM_Object, containing the result shape.
7329
7330             """
7331             # Example: see GEOM_TestOthers.py
7332             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7333             RaiseIfFailed("MakeCommonList", self.BoolOp)
7334             self._autoPublish(anObj, theName, "common")
7335             return anObj
7336
7337         ## Perform Cut boolean operation on one object and the list of tools.
7338         #  @param theMainShape The object of the operation.
7339         #  @param theShapesList The list of tools of the operation.
7340         #  @param checkSelfInte The flag that tells if the arguments should
7341         #         be checked for self-intersection prior to the operation.
7342         #  @param theName Object name; when specified, this parameter is used
7343         #         for result publication in the study. Otherwise, if automatic
7344         #         publication is switched on, default value is used for result name.
7345         #
7346         #  @note This algorithm doesn't find all types of self-intersections.
7347         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7348         #        vertex/face and edge/face intersections. Face/face
7349         #        intersections detection is switched off as it is a
7350         #        time-consuming operation that gives an impact on performance.
7351         #        To find all self-intersections please use
7352         #        CheckSelfIntersections() method.
7353         #
7354         #  @return New GEOM.GEOM_Object, containing the result shape.
7355         #
7356         #  @ref tui_cut "Example 1"
7357         #  \n @ref swig_MakeCommon "Example 2"
7358         @ManageTransactions("BoolOp")
7359         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7360             """
7361             Perform Cut boolean operation on one object and the list of tools.
7362
7363             Parameters:
7364                 theMainShape The object of the operation.
7365                 theShapesList The list of tools of the operation.
7366                 checkSelfInte The flag that tells if the arguments should
7367                               be checked for self-intersection prior to
7368                               the operation.
7369                 theName Object name; when specified, this parameter is used
7370                         for result publication in the study. Otherwise, if automatic
7371                         publication is switched on, default value is used for result name.
7372
7373             Note:
7374                     This algorithm doesn't find all types of self-intersections.
7375                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7376                     vertex/face and edge/face intersections. Face/face
7377                     intersections detection is switched off as it is a
7378                     time-consuming operation that gives an impact on performance.
7379                     To find all self-intersections please use
7380                     CheckSelfIntersections() method.
7381
7382             Returns:
7383                 New GEOM.GEOM_Object, containing the result shape.
7384
7385             """
7386             # Example: see GEOM_TestOthers.py
7387             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7388             RaiseIfFailed("MakeCutList", self.BoolOp)
7389             self._autoPublish(anObj, theName, "cut")
7390             return anObj
7391
7392         # end of l3_boolean
7393         ## @}
7394
7395         ## @addtogroup l3_basic_op
7396         ## @{
7397
7398         ## Perform partition operation.
7399         #  @param ListShapes Shapes to be intersected.
7400         #  @param ListTools Shapes to intersect theShapes.
7401         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7402         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7403         #         type will be detected automatically.
7404         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7405         #                             target type (equal to Limit) are kept in the result,
7406         #                             else standalone shapes of lower dimension
7407         #                             are kept also (if they exist).
7408         #
7409         #  @param theName Object name; when specified, this parameter is used
7410         #         for result publication in the study. Otherwise, if automatic
7411         #         publication is switched on, default value is used for result name.
7412         #
7413         #  @note Each compound from ListShapes and ListTools will be exploded
7414         #        in order to avoid possible intersection between shapes from this compound.
7415         #
7416         #  After implementation new version of PartitionAlgo (October 2006)
7417         #  other parameters are ignored by current functionality. They are kept
7418         #  in this function only for support old versions.
7419         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7420         #         Each shape from theKeepInside must belong to theShapes also.
7421         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7422         #         Each shape from theRemoveInside must belong to theShapes also.
7423         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7424         #      @param ListMaterials Material indices for each shape. Make sence,
7425         #         only if theRemoveWebs is TRUE.
7426         #
7427         #  @return New GEOM.GEOM_Object, containing the result shapes.
7428         #
7429         #  @ref tui_partition "Example"
7430         @ManageTransactions("BoolOp")
7431         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7432                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7433                           KeepNonlimitShapes=0, theName=None):
7434             """
7435             Perform partition operation.
7436
7437             Parameters:
7438                 ListShapes Shapes to be intersected.
7439                 ListTools Shapes to intersect theShapes.
7440                 Limit Type of resulting shapes (see geompy.ShapeType)
7441                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7442                       type will be detected automatically.
7443                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7444                                     target type (equal to Limit) are kept in the result,
7445                                     else standalone shapes of lower dimension
7446                                     are kept also (if they exist).
7447
7448                 theName Object name; when specified, this parameter is used
7449                         for result publication in the study. Otherwise, if automatic
7450                         publication is switched on, default value is used for result name.
7451             Note:
7452                     Each compound from ListShapes and ListTools will be exploded
7453                     in order to avoid possible intersection between shapes from
7454                     this compound.
7455
7456             After implementation new version of PartitionAlgo (October 2006) other
7457             parameters are ignored by current functionality. They are kept in this
7458             function only for support old versions.
7459
7460             Ignored parameters:
7461                 ListKeepInside Shapes, outside which the results will be deleted.
7462                                Each shape from theKeepInside must belong to theShapes also.
7463                 ListRemoveInside Shapes, inside which the results will be deleted.
7464                                  Each shape from theRemoveInside must belong to theShapes also.
7465                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7466                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7467
7468             Returns:
7469                 New GEOM.GEOM_Object, containing the result shapes.
7470             """
7471             # Example: see GEOM_TestAll.py
7472             if Limit == self.ShapeType["AUTO"]:
7473                 # automatic detection of the most appropriate shape limit type
7474                 lim = GEOM.SHAPE
7475                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7476                 Limit = EnumToLong(lim)
7477                 pass
7478             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7479                                               ListKeepInside, ListRemoveInside,
7480                                               Limit, RemoveWebs, ListMaterials,
7481                                               KeepNonlimitShapes);
7482             RaiseIfFailed("MakePartition", self.BoolOp)
7483             self._autoPublish(anObj, theName, "partition")
7484             return anObj
7485
7486         ## Perform partition operation.
7487         #  This method may be useful if it is needed to make a partition for
7488         #  compound contains nonintersected shapes. Performance will be better
7489         #  since intersection between shapes from compound is not performed.
7490         #
7491         #  Description of all parameters as in previous method MakePartition().
7492         #  One additional parameter is provided:
7493         #  @param checkSelfInte The flag that tells if the arguments should
7494         #         be checked for self-intersection prior to the operation.
7495         #
7496         #  @note This algorithm doesn't find all types of self-intersections.
7497         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7498         #        vertex/face and edge/face intersections. Face/face
7499         #        intersections detection is switched off as it is a
7500         #        time-consuming operation that gives an impact on performance.
7501         #        To find all self-intersections please use
7502         #        CheckSelfIntersections() method.
7503         #
7504         #  @note Passed compounds (via ListShapes or via ListTools)
7505         #           have to consist of nonintersecting shapes.
7506         #
7507         #  @return New GEOM.GEOM_Object, containing the result shapes.
7508         #
7509         #  @ref swig_todo "Example"
7510         @ManageTransactions("BoolOp")
7511         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7512                                                  ListKeepInside=[], ListRemoveInside=[],
7513                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7514                                                  ListMaterials=[], KeepNonlimitShapes=0,
7515                                                  checkSelfInte=False, theName=None):
7516             """
7517             Perform partition operation.
7518             This method may be useful if it is needed to make a partition for
7519             compound contains nonintersected shapes. Performance will be better
7520             since intersection between shapes from compound is not performed.
7521
7522             Parameters:
7523                 Description of all parameters as in method geompy.MakePartition.
7524                 One additional parameter is provided:
7525                 checkSelfInte The flag that tells if the arguments should
7526                               be checked for self-intersection prior to
7527                               the operation.
7528
7529             Note:
7530                     This algorithm doesn't find all types of self-intersections.
7531                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7532                     vertex/face and edge/face intersections. Face/face
7533                     intersections detection is switched off as it is a
7534                     time-consuming operation that gives an impact on performance.
7535                     To find all self-intersections please use
7536                     CheckSelfIntersections() method.
7537
7538             NOTE:
7539                 Passed compounds (via ListShapes or via ListTools)
7540                 have to consist of nonintersecting shapes.
7541
7542             Returns:
7543                 New GEOM.GEOM_Object, containing the result shapes.
7544             """
7545             if Limit == self.ShapeType["AUTO"]:
7546                 # automatic detection of the most appropriate shape limit type
7547                 lim = GEOM.SHAPE
7548                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7549                 Limit = EnumToLong(lim)
7550                 pass
7551             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7552                                                                      ListKeepInside, ListRemoveInside,
7553                                                                      Limit, RemoveWebs, ListMaterials,
7554                                                                      KeepNonlimitShapes, checkSelfInte);
7555             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7556             self._autoPublish(anObj, theName, "partition")
7557             return anObj
7558
7559         ## See method MakePartition() for more information.
7560         #
7561         #  @ref tui_partition "Example 1"
7562         #  \n @ref swig_Partition "Example 2"
7563         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7564                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7565                       KeepNonlimitShapes=0, theName=None):
7566             """
7567             See method geompy.MakePartition for more information.
7568             """
7569             # Example: see GEOM_TestOthers.py
7570             # note: auto-publishing is done in self.MakePartition()
7571             anObj = self.MakePartition(ListShapes, ListTools,
7572                                        ListKeepInside, ListRemoveInside,
7573                                        Limit, RemoveWebs, ListMaterials,
7574                                        KeepNonlimitShapes, theName);
7575             return anObj
7576
7577         ## Perform partition of the Shape with the Plane
7578         #  @param theShape Shape to be intersected.
7579         #  @param thePlane Tool shape, to intersect theShape.
7580         #  @param theName Object name; when specified, this parameter is used
7581         #         for result publication in the study. Otherwise, if automatic
7582         #         publication is switched on, default value is used for result name.
7583         #
7584         #  @return New GEOM.GEOM_Object, containing the result shape.
7585         #
7586         #  @ref tui_partition "Example"
7587         @ManageTransactions("BoolOp")
7588         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7589             """
7590             Perform partition of the Shape with the Plane
7591
7592             Parameters:
7593                 theShape Shape to be intersected.
7594                 thePlane Tool shape, to intersect theShape.
7595                 theName Object name; when specified, this parameter is used
7596                         for result publication in the study. Otherwise, if automatic
7597                         publication is switched on, default value is used for result name.
7598
7599             Returns:
7600                 New GEOM.GEOM_Object, containing the result shape.
7601             """
7602             # Example: see GEOM_TestAll.py
7603             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7604             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7605             self._autoPublish(anObj, theName, "partition")
7606             return anObj
7607
7608         # end of l3_basic_op
7609         ## @}
7610
7611         ## @addtogroup l3_transform
7612         ## @{
7613
7614         ## Translate the given object along the vector, specified
7615         #  by its end points.
7616         #  @param theObject The object to be translated.
7617         #  @param thePoint1 Start point of translation vector.
7618         #  @param thePoint2 End point of translation vector.
7619         #  @param theCopy Flag used to translate object itself or create a copy.
7620         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7621         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7622         @ManageTransactions("TrsfOp")
7623         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7624             """
7625             Translate the given object along the vector, specified by its end points.
7626
7627             Parameters:
7628                 theObject The object to be translated.
7629                 thePoint1 Start point of translation vector.
7630                 thePoint2 End point of translation vector.
7631                 theCopy Flag used to translate object itself or create a copy.
7632
7633             Returns:
7634                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7635                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7636             """
7637             if theCopy:
7638                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7639             else:
7640                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7641             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7642             return anObj
7643
7644         ## Translate the given object along the vector, specified
7645         #  by its end points, creating its copy before the translation.
7646         #  @param theObject The object to be translated.
7647         #  @param thePoint1 Start point of translation vector.
7648         #  @param thePoint2 End point of translation vector.
7649         #  @param theName Object name; when specified, this parameter is used
7650         #         for result publication in the study. Otherwise, if automatic
7651         #         publication is switched on, default value is used for result name.
7652         #
7653         #  @return New GEOM.GEOM_Object, containing the translated object.
7654         #
7655         #  @ref tui_translation "Example 1"
7656         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7657         @ManageTransactions("TrsfOp")
7658         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7659             """
7660             Translate the given object along the vector, specified
7661             by its end points, creating its copy before the translation.
7662
7663             Parameters:
7664                 theObject The object to be translated.
7665                 thePoint1 Start point of translation vector.
7666                 thePoint2 End point of translation vector.
7667                 theName Object name; when specified, this parameter is used
7668                         for result publication in the study. Otherwise, if automatic
7669                         publication is switched on, default value is used for result name.
7670
7671             Returns:
7672                 New GEOM.GEOM_Object, containing the translated object.
7673             """
7674             # Example: see GEOM_TestAll.py
7675             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7676             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7677             self._autoPublish(anObj, theName, "translated")
7678             return anObj
7679
7680         ## Translate the given object along the vector, specified by its components.
7681         #  @param theObject The object to be translated.
7682         #  @param theDX,theDY,theDZ Components of translation vector.
7683         #  @param theCopy Flag used to translate object itself or create a copy.
7684         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7685         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7686         #
7687         #  @ref tui_translation "Example"
7688         @ManageTransactions("TrsfOp")
7689         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7690             """
7691             Translate the given object along the vector, specified by its components.
7692
7693             Parameters:
7694                 theObject The object to be translated.
7695                 theDX,theDY,theDZ Components of translation vector.
7696                 theCopy Flag used to translate object itself or create a copy.
7697
7698             Returns:
7699                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7700                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7701             """
7702             # Example: see GEOM_TestAll.py
7703             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7704             if theCopy:
7705                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7706             else:
7707                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7708             anObj.SetParameters(Parameters)
7709             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7710             return anObj
7711
7712         ## Translate the given object along the vector, specified
7713         #  by its components, creating its copy before the translation.
7714         #  @param theObject The object to be translated.
7715         #  @param theDX,theDY,theDZ Components of translation vector.
7716         #  @param theName Object name; when specified, this parameter is used
7717         #         for result publication in the study. Otherwise, if automatic
7718         #         publication is switched on, default value is used for result name.
7719         #
7720         #  @return New GEOM.GEOM_Object, containing the translated object.
7721         #
7722         #  @ref tui_translation "Example"
7723         @ManageTransactions("TrsfOp")
7724         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7725             """
7726             Translate the given object along the vector, specified
7727             by its components, creating its copy before the translation.
7728
7729             Parameters:
7730                 theObject The object to be translated.
7731                 theDX,theDY,theDZ Components of translation vector.
7732                 theName Object name; when specified, this parameter is used
7733                         for result publication in the study. Otherwise, if automatic
7734                         publication is switched on, default value is used for result name.
7735
7736             Returns:
7737                 New GEOM.GEOM_Object, containing the translated object.
7738             """
7739             # Example: see GEOM_TestAll.py
7740             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7741             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7742             anObj.SetParameters(Parameters)
7743             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7744             self._autoPublish(anObj, theName, "translated")
7745             return anObj
7746
7747         ## Translate the given object along the given vector.
7748         #  @param theObject The object to be translated.
7749         #  @param theVector The translation vector.
7750         #  @param theCopy Flag used to translate object itself or create a copy.
7751         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7752         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7753         @ManageTransactions("TrsfOp")
7754         def TranslateVector(self, theObject, theVector, theCopy=False):
7755             """
7756             Translate the given object along the given vector.
7757
7758             Parameters:
7759                 theObject The object to be translated.
7760                 theVector The translation vector.
7761                 theCopy Flag used to translate object itself or create a copy.
7762
7763             Returns:
7764                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7765                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7766             """
7767             if theCopy:
7768                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7769             else:
7770                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7771             RaiseIfFailed("TranslateVector", self.TrsfOp)
7772             return anObj
7773
7774         ## Translate the given object along the given vector,
7775         #  creating its copy before the translation.
7776         #  @param theObject The object to be translated.
7777         #  @param theVector The translation vector.
7778         #  @param theName Object name; when specified, this parameter is used
7779         #         for result publication in the study. Otherwise, if automatic
7780         #         publication is switched on, default value is used for result name.
7781         #
7782         #  @return New GEOM.GEOM_Object, containing the translated object.
7783         #
7784         #  @ref tui_translation "Example"
7785         @ManageTransactions("TrsfOp")
7786         def MakeTranslationVector(self, theObject, theVector, theName=None):
7787             """
7788             Translate the given object along the given vector,
7789             creating its copy before the translation.
7790
7791             Parameters:
7792                 theObject The object to be translated.
7793                 theVector The translation vector.
7794                 theName Object name; when specified, this parameter is used
7795                         for result publication in the study. Otherwise, if automatic
7796                         publication is switched on, default value is used for result name.
7797
7798             Returns:
7799                 New GEOM.GEOM_Object, containing the translated object.
7800             """
7801             # Example: see GEOM_TestAll.py
7802             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7803             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7804             self._autoPublish(anObj, theName, "translated")
7805             return anObj
7806
7807         ## Translate the given object along the given vector on given distance.
7808         #  @param theObject The object to be translated.
7809         #  @param theVector The translation vector.
7810         #  @param theDistance The translation distance.
7811         #  @param theCopy Flag used to translate object itself or create a copy.
7812         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7813         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7814         #
7815         #  @ref tui_translation "Example"
7816         @ManageTransactions("TrsfOp")
7817         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7818             """
7819             Translate the given object along the given vector on given distance.
7820
7821             Parameters:
7822                 theObject The object to be translated.
7823                 theVector The translation vector.
7824                 theDistance The translation distance.
7825                 theCopy Flag used to translate object itself or create a copy.
7826
7827             Returns:
7828                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7829                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7830             """
7831             # Example: see GEOM_TestAll.py
7832             theDistance,Parameters = ParseParameters(theDistance)
7833             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7834             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7835             anObj.SetParameters(Parameters)
7836             return anObj
7837
7838         ## Translate the given object along the given vector on given distance,
7839         #  creating its copy before the translation.
7840         #  @param theObject The object to be translated.
7841         #  @param theVector The translation vector.
7842         #  @param theDistance The translation distance.
7843         #  @param theName Object name; when specified, this parameter is used
7844         #         for result publication in the study. Otherwise, if automatic
7845         #         publication is switched on, default value is used for result name.
7846         #
7847         #  @return New GEOM.GEOM_Object, containing the translated object.
7848         #
7849         #  @ref tui_translation "Example"
7850         @ManageTransactions("TrsfOp")
7851         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7852             """
7853             Translate the given object along the given vector on given distance,
7854             creating its copy before the translation.
7855
7856             Parameters:
7857                 theObject The object to be translated.
7858                 theVector The translation vector.
7859                 theDistance The translation distance.
7860                 theName Object name; when specified, this parameter is used
7861                         for result publication in the study. Otherwise, if automatic
7862                         publication is switched on, default value is used for result name.
7863
7864             Returns:
7865                 New GEOM.GEOM_Object, containing the translated object.
7866             """
7867             # Example: see GEOM_TestAll.py
7868             theDistance,Parameters = ParseParameters(theDistance)
7869             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7870             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7871             anObj.SetParameters(Parameters)
7872             self._autoPublish(anObj, theName, "translated")
7873             return anObj
7874
7875         ## Rotate the given object around the given axis on the given angle.
7876         #  @param theObject The object to be rotated.
7877         #  @param theAxis Rotation axis.
7878         #  @param theAngle Rotation angle in radians.
7879         #  @param theCopy Flag used to rotate object itself or create a copy.
7880         #
7881         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7882         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7883         #
7884         #  @ref tui_rotation "Example"
7885         @ManageTransactions("TrsfOp")
7886         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7887             """
7888             Rotate the given object around the given axis on the given angle.
7889
7890             Parameters:
7891                 theObject The object to be rotated.
7892                 theAxis Rotation axis.
7893                 theAngle Rotation angle in radians.
7894                 theCopy Flag used to rotate object itself or create a copy.
7895
7896             Returns:
7897                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7898                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7899             """
7900             # Example: see GEOM_TestAll.py
7901             flag = False
7902             if isinstance(theAngle,str):
7903                 flag = True
7904             theAngle, Parameters = ParseParameters(theAngle)
7905             if flag:
7906                 theAngle = theAngle*math.pi/180.0
7907             if theCopy:
7908                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7909             else:
7910                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7911             RaiseIfFailed("Rotate", self.TrsfOp)
7912             anObj.SetParameters(Parameters)
7913             return anObj
7914
7915         ## Rotate the given object around the given axis
7916         #  on the given angle, creating its copy before the rotation.
7917         #  @param theObject The object to be rotated.
7918         #  @param theAxis Rotation axis.
7919         #  @param theAngle Rotation angle in radians.
7920         #  @param theName Object name; when specified, this parameter is used
7921         #         for result publication in the study. Otherwise, if automatic
7922         #         publication is switched on, default value is used for result name.
7923         #
7924         #  @return New GEOM.GEOM_Object, containing the rotated object.
7925         #
7926         #  @ref tui_rotation "Example"
7927         @ManageTransactions("TrsfOp")
7928         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7929             """
7930             Rotate the given object around the given axis
7931             on the given angle, creating its copy before the rotatation.
7932
7933             Parameters:
7934                 theObject The object to be rotated.
7935                 theAxis Rotation axis.
7936                 theAngle Rotation angle in radians.
7937                 theName Object name; when specified, this parameter is used
7938                         for result publication in the study. Otherwise, if automatic
7939                         publication is switched on, default value is used for result name.
7940
7941             Returns:
7942                 New GEOM.GEOM_Object, containing the rotated object.
7943             """
7944             # Example: see GEOM_TestAll.py
7945             flag = False
7946             if isinstance(theAngle,str):
7947                 flag = True
7948             theAngle, Parameters = ParseParameters(theAngle)
7949             if flag:
7950                 theAngle = theAngle*math.pi/180.0
7951             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7952             RaiseIfFailed("RotateCopy", self.TrsfOp)
7953             anObj.SetParameters(Parameters)
7954             self._autoPublish(anObj, theName, "rotated")
7955             return anObj
7956
7957         ## Rotate given object around vector perpendicular to plane
7958         #  containing three points.
7959         #  @param theObject The object to be rotated.
7960         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7961         #  containing the three points.
7962         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7963         #  @param theCopy Flag used to rotate object itself or create a copy.
7964         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7965         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7966         @ManageTransactions("TrsfOp")
7967         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7968             """
7969             Rotate given object around vector perpendicular to plane
7970             containing three points.
7971
7972             Parameters:
7973                 theObject The object to be rotated.
7974                 theCentPoint central point  the axis is the vector perpendicular to the plane
7975                              containing the three points.
7976                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7977                 theCopy Flag used to rotate object itself or create a copy.
7978
7979             Returns:
7980                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7981                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7982             """
7983             if theCopy:
7984                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7985             else:
7986                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7987             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7988             return anObj
7989
7990         ## Rotate given object around vector perpendicular to plane
7991         #  containing three points, creating its copy before the rotatation.
7992         #  @param theObject The object to be rotated.
7993         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7994         #  containing the three points.
7995         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7996         #  @param theName Object name; when specified, this parameter is used
7997         #         for result publication in the study. Otherwise, if automatic
7998         #         publication is switched on, default value is used for result name.
7999         #
8000         #  @return New GEOM.GEOM_Object, containing the rotated object.
8001         #
8002         #  @ref tui_rotation "Example"
8003         @ManageTransactions("TrsfOp")
8004         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8005             """
8006             Rotate given object around vector perpendicular to plane
8007             containing three points, creating its copy before the rotatation.
8008
8009             Parameters:
8010                 theObject The object to be rotated.
8011                 theCentPoint central point  the axis is the vector perpendicular to the plane
8012                              containing the three points.
8013                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8014                 theName Object name; when specified, this parameter is used
8015                         for result publication in the study. Otherwise, if automatic
8016                         publication is switched on, default value is used for result name.
8017
8018             Returns:
8019                 New GEOM.GEOM_Object, containing the rotated object.
8020             """
8021             # Example: see GEOM_TestAll.py
8022             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8023             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8024             self._autoPublish(anObj, theName, "rotated")
8025             return anObj
8026
8027         ## Scale the given object by the specified factor.
8028         #  @param theObject The object to be scaled.
8029         #  @param thePoint Center point for scaling.
8030         #                  Passing None for it means scaling relatively the origin of global CS.
8031         #  @param theFactor Scaling factor value.
8032         #  @param theCopy Flag used to scale object itself or create a copy.
8033         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8034         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8035         @ManageTransactions("TrsfOp")
8036         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8037             """
8038             Scale the given object by the specified factor.
8039
8040             Parameters:
8041                 theObject The object to be scaled.
8042                 thePoint Center point for scaling.
8043                          Passing None for it means scaling relatively the origin of global CS.
8044                 theFactor Scaling factor value.
8045                 theCopy Flag used to scale object itself or create a copy.
8046
8047             Returns:
8048                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8049                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8050             """
8051             # Example: see GEOM_TestAll.py
8052             theFactor, Parameters = ParseParameters(theFactor)
8053             if theCopy:
8054                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8055             else:
8056                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8057             RaiseIfFailed("Scale", self.TrsfOp)
8058             anObj.SetParameters(Parameters)
8059             return anObj
8060
8061         ## Scale the given object by the factor, creating its copy before the scaling.
8062         #  @param theObject The object to be scaled.
8063         #  @param thePoint Center point for scaling.
8064         #                  Passing None for it means scaling relatively the origin of global CS.
8065         #  @param theFactor Scaling factor value.
8066         #  @param theName Object name; when specified, this parameter is used
8067         #         for result publication in the study. Otherwise, if automatic
8068         #         publication is switched on, default value is used for result name.
8069         #
8070         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8071         #
8072         #  @ref tui_scale "Example"
8073         @ManageTransactions("TrsfOp")
8074         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8075             """
8076             Scale the given object by the factor, creating its copy before the scaling.
8077
8078             Parameters:
8079                 theObject The object to be scaled.
8080                 thePoint Center point for scaling.
8081                          Passing None for it means scaling relatively the origin of global CS.
8082                 theFactor Scaling factor value.
8083                 theName Object name; when specified, this parameter is used
8084                         for result publication in the study. Otherwise, if automatic
8085                         publication is switched on, default value is used for result name.
8086
8087             Returns:
8088                 New GEOM.GEOM_Object, containing the scaled shape.
8089             """
8090             # Example: see GEOM_TestAll.py
8091             theFactor, Parameters = ParseParameters(theFactor)
8092             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8093             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8094             anObj.SetParameters(Parameters)
8095             self._autoPublish(anObj, theName, "scaled")
8096             return anObj
8097
8098         ## Scale the given object by different factors along coordinate axes.
8099         #  @param theObject The object to be scaled.
8100         #  @param thePoint Center point for scaling.
8101         #                  Passing None for it means scaling relatively the origin of global CS.
8102         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8103         #  @param theCopy Flag used to scale object itself or create a copy.
8104         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8105         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8106         @ManageTransactions("TrsfOp")
8107         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8108             """
8109             Scale the given object by different factors along coordinate axes.
8110
8111             Parameters:
8112                 theObject The object to be scaled.
8113                 thePoint Center point for scaling.
8114                             Passing None for it means scaling relatively the origin of global CS.
8115                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8116                 theCopy Flag used to scale object itself or create a copy.
8117
8118             Returns:
8119                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8120                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8121             """
8122             # Example: see GEOM_TestAll.py
8123             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8124             if theCopy:
8125                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8126                                                             theFactorX, theFactorY, theFactorZ)
8127             else:
8128                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8129                                                         theFactorX, theFactorY, theFactorZ)
8130             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8131             anObj.SetParameters(Parameters)
8132             return anObj
8133
8134         ## Scale the given object by different factors along coordinate axes,
8135         #  creating its copy before the scaling.
8136         #  @param theObject The object to be scaled.
8137         #  @param thePoint Center point for scaling.
8138         #                  Passing None for it means scaling relatively the origin of global CS.
8139         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8140         #  @param theName Object name; when specified, this parameter is used
8141         #         for result publication in the study. Otherwise, if automatic
8142         #         publication is switched on, default value is used for result name.
8143         #
8144         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8145         #
8146         #  @ref swig_scale "Example"
8147         @ManageTransactions("TrsfOp")
8148         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8149             """
8150             Scale the given object by different factors along coordinate axes,
8151             creating its copy before the scaling.
8152
8153             Parameters:
8154                 theObject The object to be scaled.
8155                 thePoint Center point for scaling.
8156                             Passing None for it means scaling relatively the origin of global CS.
8157                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8158                 theName Object name; when specified, this parameter is used
8159                         for result publication in the study. Otherwise, if automatic
8160                         publication is switched on, default value is used for result name.
8161
8162             Returns:
8163                 New GEOM.GEOM_Object, containing the scaled shape.
8164             """
8165             # Example: see GEOM_TestAll.py
8166             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8167             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8168                                                         theFactorX, theFactorY, theFactorZ)
8169             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8170             anObj.SetParameters(Parameters)
8171             self._autoPublish(anObj, theName, "scaled")
8172             return anObj
8173
8174         ## Mirror an object relatively the given plane.
8175         #  @param theObject The object to be mirrored.
8176         #  @param thePlane Plane of symmetry.
8177         #  @param theCopy Flag used to mirror object itself or create a copy.
8178         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8179         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8180         @ManageTransactions("TrsfOp")
8181         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8182             """
8183             Mirror an object relatively the given plane.
8184
8185             Parameters:
8186                 theObject The object to be mirrored.
8187                 thePlane Plane of symmetry.
8188                 theCopy Flag used to mirror object itself or create a copy.
8189
8190             Returns:
8191                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8192                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8193             """
8194             if theCopy:
8195                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8196             else:
8197                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8198             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8199             return anObj
8200
8201         ## Create an object, symmetrical
8202         #  to the given one relatively the given plane.
8203         #  @param theObject The object to be mirrored.
8204         #  @param thePlane Plane of symmetry.
8205         #  @param theName Object name; when specified, this parameter is used
8206         #         for result publication in the study. Otherwise, if automatic
8207         #         publication is switched on, default value is used for result name.
8208         #
8209         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8210         #
8211         #  @ref tui_mirror "Example"
8212         @ManageTransactions("TrsfOp")
8213         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8214             """
8215             Create an object, symmetrical to the given one relatively the given plane.
8216
8217             Parameters:
8218                 theObject The object to be mirrored.
8219                 thePlane Plane of symmetry.
8220                 theName Object name; when specified, this parameter is used
8221                         for result publication in the study. Otherwise, if automatic
8222                         publication is switched on, default value is used for result name.
8223
8224             Returns:
8225                 New GEOM.GEOM_Object, containing the mirrored shape.
8226             """
8227             # Example: see GEOM_TestAll.py
8228             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8229             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8230             self._autoPublish(anObj, theName, "mirrored")
8231             return anObj
8232
8233         ## Mirror an object relatively the given axis.
8234         #  @param theObject The object to be mirrored.
8235         #  @param theAxis Axis of symmetry.
8236         #  @param theCopy Flag used to mirror object itself or create a copy.
8237         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8238         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8239         @ManageTransactions("TrsfOp")
8240         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8241             """
8242             Mirror an object relatively the given axis.
8243
8244             Parameters:
8245                 theObject The object to be mirrored.
8246                 theAxis Axis of symmetry.
8247                 theCopy Flag used to mirror object itself or create a copy.
8248
8249             Returns:
8250                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8251                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8252             """
8253             if theCopy:
8254                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8255             else:
8256                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8257             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8258             return anObj
8259
8260         ## Create an object, symmetrical
8261         #  to the given one relatively the given axis.
8262         #  @param theObject The object to be mirrored.
8263         #  @param theAxis Axis of symmetry.
8264         #  @param theName Object name; when specified, this parameter is used
8265         #         for result publication in the study. Otherwise, if automatic
8266         #         publication is switched on, default value is used for result name.
8267         #
8268         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8269         #
8270         #  @ref tui_mirror "Example"
8271         @ManageTransactions("TrsfOp")
8272         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8273             """
8274             Create an object, symmetrical to the given one relatively the given axis.
8275
8276             Parameters:
8277                 theObject The object to be mirrored.
8278                 theAxis Axis of symmetry.
8279                 theName Object name; when specified, this parameter is used
8280                         for result publication in the study. Otherwise, if automatic
8281                         publication is switched on, default value is used for result name.
8282
8283             Returns:
8284                 New GEOM.GEOM_Object, containing the mirrored shape.
8285             """
8286             # Example: see GEOM_TestAll.py
8287             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8288             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8289             self._autoPublish(anObj, theName, "mirrored")
8290             return anObj
8291
8292         ## Mirror an object relatively the given point.
8293         #  @param theObject The object to be mirrored.
8294         #  @param thePoint Point of symmetry.
8295         #  @param theCopy Flag used to mirror object itself or create a copy.
8296         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8297         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8298         @ManageTransactions("TrsfOp")
8299         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8300             """
8301             Mirror an object relatively the given point.
8302
8303             Parameters:
8304                 theObject The object to be mirrored.
8305                 thePoint Point of symmetry.
8306                 theCopy Flag used to mirror object itself or create a copy.
8307
8308             Returns:
8309                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8310                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8311             """
8312             # Example: see GEOM_TestAll.py
8313             if theCopy:
8314                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8315             else:
8316                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8317             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8318             return anObj
8319
8320         ## Create an object, symmetrical
8321         #  to the given one relatively the given point.
8322         #  @param theObject The object to be mirrored.
8323         #  @param thePoint Point of symmetry.
8324         #  @param theName Object name; when specified, this parameter is used
8325         #         for result publication in the study. Otherwise, if automatic
8326         #         publication is switched on, default value is used for result name.
8327         #
8328         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8329         #
8330         #  @ref tui_mirror "Example"
8331         @ManageTransactions("TrsfOp")
8332         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8333             """
8334             Create an object, symmetrical
8335             to the given one relatively the given point.
8336
8337             Parameters:
8338                 theObject The object to be mirrored.
8339                 thePoint Point of symmetry.
8340                 theName Object name; when specified, this parameter is used
8341                         for result publication in the study. Otherwise, if automatic
8342                         publication is switched on, default value is used for result name.
8343
8344             Returns:
8345                 New GEOM.GEOM_Object, containing the mirrored shape.
8346             """
8347             # Example: see GEOM_TestAll.py
8348             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8349             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8350             self._autoPublish(anObj, theName, "mirrored")
8351             return anObj
8352
8353         ## Modify the location of the given object.
8354         #  @param theObject The object to be displaced.
8355         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8356         #                     If \a theStartLCS is NULL, displacement
8357         #                     will be performed from global CS.\n
8358         #                     If \a theObject itself is used as \a theStartLCS,
8359         #                     its location will be changed to \a theEndLCS.
8360         #  @param theEndLCS Coordinate system to perform displacement to it.
8361         #  @param theCopy Flag used to displace object itself or create a copy.
8362         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8363         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8364         @ManageTransactions("TrsfOp")
8365         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8366             """
8367             Modify the Location of the given object by LCS, creating its copy before the setting.
8368
8369             Parameters:
8370                 theObject The object to be displaced.
8371                 theStartLCS Coordinate system to perform displacement from it.
8372                             If theStartLCS is NULL, displacement
8373                             will be performed from global CS.
8374                             If theObject itself is used as theStartLCS,
8375                             its location will be changed to theEndLCS.
8376                 theEndLCS Coordinate system to perform displacement to it.
8377                 theCopy Flag used to displace object itself or create a copy.
8378
8379             Returns:
8380                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8381                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8382             """
8383             # Example: see GEOM_TestAll.py
8384             if theCopy:
8385                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8386             else:
8387                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8388             RaiseIfFailed("Displace", self.TrsfOp)
8389             return anObj
8390
8391         ## Modify the Location of the given object by LCS,
8392         #  creating its copy before the setting.
8393         #  @param theObject The object to be displaced.
8394         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8395         #                     If \a theStartLCS is NULL, displacement
8396         #                     will be performed from global CS.\n
8397         #                     If \a theObject itself is used as \a theStartLCS,
8398         #                     its location will be changed to \a theEndLCS.
8399         #  @param theEndLCS Coordinate system to perform displacement to it.
8400         #  @param theName Object name; when specified, this parameter is used
8401         #         for result publication in the study. Otherwise, if automatic
8402         #         publication is switched on, default value is used for result name.
8403         #
8404         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8405         #
8406         #  @ref tui_modify_location "Example"
8407         @ManageTransactions("TrsfOp")
8408         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8409             """
8410             Modify the Location of the given object by LCS, creating its copy before the setting.
8411
8412             Parameters:
8413                 theObject The object to be displaced.
8414                 theStartLCS Coordinate system to perform displacement from it.
8415                             If theStartLCS is NULL, displacement
8416                             will be performed from global CS.
8417                             If theObject itself is used as theStartLCS,
8418                             its location will be changed to theEndLCS.
8419                 theEndLCS Coordinate system to perform displacement to it.
8420                 theName Object name; when specified, this parameter is used
8421                         for result publication in the study. Otherwise, if automatic
8422                         publication is switched on, default value is used for result name.
8423
8424             Returns:
8425                 New GEOM.GEOM_Object, containing the displaced shape.
8426
8427             Example of usage:
8428                 # create local coordinate systems
8429                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8430                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8431                 # modify the location of the given object
8432                 position = geompy.MakePosition(cylinder, cs1, cs2)
8433             """
8434             # Example: see GEOM_TestAll.py
8435             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8436             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8437             self._autoPublish(anObj, theName, "displaced")
8438             return anObj
8439
8440         ## Modify the Location of the given object by Path.
8441         #  @param  theObject The object to be displaced.
8442         #  @param  thePath Wire or Edge along that the object will be translated.
8443         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8444         #  @param  theCopy is to create a copy objects if true.
8445         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8446         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8447         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8448         #
8449         #  @ref tui_modify_location "Example"
8450         @ManageTransactions("TrsfOp")
8451         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8452             """
8453             Modify the Location of the given object by Path.
8454
8455             Parameters:
8456                  theObject The object to be displaced.
8457                  thePath Wire or Edge along that the object will be translated.
8458                  theDistance progress of Path (0 = start location, 1 = end of path location).
8459                  theCopy is to create a copy objects if true.
8460                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8461
8462             Returns:
8463                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8464                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8465
8466             Example of usage:
8467                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8468             """
8469             # Example: see GEOM_TestAll.py
8470             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8471             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8472             return anObj
8473
8474         ## Modify the Location of the given object by Path, creating its copy before the operation.
8475         #  @param theObject The object to be displaced.
8476         #  @param thePath Wire or Edge along that the object will be translated.
8477         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8478         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8479         #  @param theName Object name; when specified, this parameter is used
8480         #         for result publication in the study. Otherwise, if automatic
8481         #         publication is switched on, default value is used for result name.
8482         #
8483         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8484         @ManageTransactions("TrsfOp")
8485         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8486             """
8487             Modify the Location of the given object by Path, creating its copy before the operation.
8488
8489             Parameters:
8490                  theObject The object to be displaced.
8491                  thePath Wire or Edge along that the object will be translated.
8492                  theDistance progress of Path (0 = start location, 1 = end of path location).
8493                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8494                  theName Object name; when specified, this parameter is used
8495                          for result publication in the study. Otherwise, if automatic
8496                          publication is switched on, default value is used for result name.
8497
8498             Returns:
8499                 New GEOM.GEOM_Object, containing the displaced shape.
8500             """
8501             # Example: see GEOM_TestAll.py
8502             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8503             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8504             self._autoPublish(anObj, theName, "displaced")
8505             return anObj
8506
8507         ## Offset given shape.
8508         #  @param theObject The base object for the offset.
8509         #  @param theOffset Offset value.
8510         #  @param theCopy Flag used to offset object itself or create a copy.
8511         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8512         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8513         @ManageTransactions("TrsfOp")
8514         def Offset(self, theObject, theOffset, theCopy=False):
8515             """
8516             Offset given shape.
8517
8518             Parameters:
8519                 theObject The base object for the offset.
8520                 theOffset Offset value.
8521                 theCopy Flag used to offset object itself or create a copy.
8522
8523             Returns:
8524                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8525                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8526             """
8527             theOffset, Parameters = ParseParameters(theOffset)
8528             if theCopy:
8529                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8530             else:
8531                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8532             RaiseIfFailed("Offset", self.TrsfOp)
8533             anObj.SetParameters(Parameters)
8534             return anObj
8535
8536         ## Create new object as offset of the given one.
8537         #  @param theObject The base object for the offset.
8538         #  @param theOffset Offset value.
8539         #  @param theName Object name; when specified, this parameter is used
8540         #         for result publication in the study. Otherwise, if automatic
8541         #         publication is switched on, default value is used for result name.
8542         #
8543         #  @return New GEOM.GEOM_Object, containing the offset object.
8544         #
8545         #  @ref tui_offset "Example"
8546         @ManageTransactions("TrsfOp")
8547         def MakeOffset(self, theObject, theOffset, theName=None):
8548             """
8549             Create new object as offset of the given one.
8550
8551             Parameters:
8552                 theObject The base object for the offset.
8553                 theOffset Offset value.
8554                 theName Object name; when specified, this parameter is used
8555                         for result publication in the study. Otherwise, if automatic
8556                         publication is switched on, default value is used for result name.
8557
8558             Returns:
8559                 New GEOM.GEOM_Object, containing the offset object.
8560
8561             Example of usage:
8562                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8563                  # create a new object as offset of the given object
8564                  offset = geompy.MakeOffset(box, 70.)
8565             """
8566             # Example: see GEOM_TestAll.py
8567             theOffset, Parameters = ParseParameters(theOffset)
8568             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8569             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8570             anObj.SetParameters(Parameters)
8571             self._autoPublish(anObj, theName, "offset")
8572             return anObj
8573
8574         ## Create new object as projection of the given one on a 2D surface.
8575         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8576         #  @param theTarget The target object. It can be planar or cylindrical face.
8577         #  @param theName Object name; when specified, this parameter is used
8578         #         for result publication in the study. Otherwise, if automatic
8579         #         publication is switched on, default value is used for result name.
8580         #
8581         #  @return New GEOM.GEOM_Object, containing the projection.
8582         #
8583         #  @ref tui_projection "Example"
8584         @ManageTransactions("TrsfOp")
8585         def MakeProjection(self, theSource, theTarget, theName=None):
8586             """
8587             Create new object as projection of the given one on a 2D surface.
8588
8589             Parameters:
8590                 theSource The source object for the projection. It can be a point, edge or wire.
8591                 theTarget The target object. It can be planar or cylindrical face.
8592                 theName Object name; when specified, this parameter is used
8593                         for result publication in the study. Otherwise, if automatic
8594                         publication is switched on, default value is used for result name.
8595
8596             Returns:
8597                 New GEOM.GEOM_Object, containing the projection.
8598             """
8599             # Example: see GEOM_TestAll.py
8600             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8601             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8602             self._autoPublish(anObj, theName, "projection")
8603             return anObj
8604
8605         ## Create a projection projection of the given point on a wire or an edge.
8606         #  If there are no solutions or there are 2 or more solutions It throws an
8607         #  exception.
8608         #  @param thePoint the point to be projected.
8609         #  @param theWire the wire. The edge is accepted as well.
8610         #  @param theName Object name; when specified, this parameter is used
8611         #         for result publication in the study. Otherwise, if automatic
8612         #         publication is switched on, default value is used for result name.
8613         #
8614         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8615         #  \n \a u: The parameter of projection point on edge.
8616         #  \n \a PointOnEdge: The projection point.
8617         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8618         #
8619         #  @ref tui_projection "Example"
8620         @ManageTransactions("TrsfOp")
8621         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8622             """
8623             Create a projection projection of the given point on a wire or an edge.
8624             If there are no solutions or there are 2 or more solutions It throws an
8625             exception.
8626
8627             Parameters:
8628                 thePoint the point to be projected.
8629                 theWire the wire. The edge is accepted as well.
8630                 theName Object name; when specified, this parameter is used
8631                         for result publication in the study. Otherwise, if automatic
8632                         publication is switched on, default value is used for result name.
8633
8634             Returns:
8635                 [u, PointOnEdge, EdgeInWireIndex]
8636                  u: The parameter of projection point on edge.
8637                  PointOnEdge: The projection point.
8638                  EdgeInWireIndex: The index of an edge in a wire.
8639             """
8640             # Example: see GEOM_TestAll.py
8641             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8642             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8643             self._autoPublish(anObj[1], theName, "projection")
8644             return anObj
8645
8646         # -----------------------------------------------------------------------------
8647         # Patterns
8648         # -----------------------------------------------------------------------------
8649
8650         ## Translate the given object along the given vector a given number times
8651         #  @param theObject The object to be translated.
8652         #  @param theVector Direction of the translation. DX if None.
8653         #  @param theStep Distance to translate on.
8654         #  @param theNbTimes Quantity of translations to be done.
8655         #  @param theName Object name; when specified, this parameter is used
8656         #         for result publication in the study. Otherwise, if automatic
8657         #         publication is switched on, default value is used for result name.
8658         #
8659         #  @return New GEOM.GEOM_Object, containing compound of all
8660         #          the shapes, obtained after each translation.
8661         #
8662         #  @ref tui_multi_translation "Example"
8663         @ManageTransactions("TrsfOp")
8664         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8665             """
8666             Translate the given object along the given vector a given number times
8667
8668             Parameters:
8669                 theObject The object to be translated.
8670                 theVector Direction of the translation. DX if None.
8671                 theStep Distance to translate on.
8672                 theNbTimes Quantity of translations to be done.
8673                 theName Object name; when specified, this parameter is used
8674                         for result publication in the study. Otherwise, if automatic
8675                         publication is switched on, default value is used for result name.
8676
8677             Returns:
8678                 New GEOM.GEOM_Object, containing compound of all
8679                 the shapes, obtained after each translation.
8680
8681             Example of usage:
8682                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8683             """
8684             # Example: see GEOM_TestAll.py
8685             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8686             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8687             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8688             anObj.SetParameters(Parameters)
8689             self._autoPublish(anObj, theName, "multitranslation")
8690             return anObj
8691
8692         ## Conseqently apply two specified translations to theObject specified number of times.
8693         #  @param theObject The object to be translated.
8694         #  @param theVector1 Direction of the first translation. DX if None.
8695         #  @param theStep1 Step of the first translation.
8696         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8697         #  @param theVector2 Direction of the second translation. DY if None.
8698         #  @param theStep2 Step of the second translation.
8699         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8700         #  @param theName Object name; when specified, this parameter is used
8701         #         for result publication in the study. Otherwise, if automatic
8702         #         publication is switched on, default value is used for result name.
8703         #
8704         #  @return New GEOM.GEOM_Object, containing compound of all
8705         #          the shapes, obtained after each translation.
8706         #
8707         #  @ref tui_multi_translation "Example"
8708         @ManageTransactions("TrsfOp")
8709         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8710                                    theVector2, theStep2, theNbTimes2, theName=None):
8711             """
8712             Conseqently apply two specified translations to theObject specified number of times.
8713
8714             Parameters:
8715                 theObject The object to be translated.
8716                 theVector1 Direction of the first translation. DX if None.
8717                 theStep1 Step of the first translation.
8718                 theNbTimes1 Quantity of translations to be done along theVector1.
8719                 theVector2 Direction of the second translation. DY if None.
8720                 theStep2 Step of the second translation.
8721                 theNbTimes2 Quantity of translations to be done along theVector2.
8722                 theName Object name; when specified, this parameter is used
8723                         for result publication in the study. Otherwise, if automatic
8724                         publication is switched on, default value is used for result name.
8725
8726             Returns:
8727                 New GEOM.GEOM_Object, containing compound of all
8728                 the shapes, obtained after each translation.
8729
8730             Example of usage:
8731                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8732             """
8733             # Example: see GEOM_TestAll.py
8734             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8735             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8736                                                  theVector2, theStep2, theNbTimes2)
8737             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8738             anObj.SetParameters(Parameters)
8739             self._autoPublish(anObj, theName, "multitranslation")
8740             return anObj
8741
8742         ## Rotate the given object around the given axis a given number times.
8743         #  Rotation angle will be 2*PI/theNbTimes.
8744         #  @param theObject The object to be rotated.
8745         #  @param theAxis The rotation axis. DZ if None.
8746         #  @param theNbTimes Quantity of rotations to be done.
8747         #  @param theName Object name; when specified, this parameter is used
8748         #         for result publication in the study. Otherwise, if automatic
8749         #         publication is switched on, default value is used for result name.
8750         #
8751         #  @return New GEOM.GEOM_Object, containing compound of all the
8752         #          shapes, obtained after each rotation.
8753         #
8754         #  @ref tui_multi_rotation "Example"
8755         @ManageTransactions("TrsfOp")
8756         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8757             """
8758             Rotate the given object around the given axis a given number times.
8759             Rotation angle will be 2*PI/theNbTimes.
8760
8761             Parameters:
8762                 theObject The object to be rotated.
8763                 theAxis The rotation axis. DZ if None.
8764                 theNbTimes Quantity of rotations to be done.
8765                 theName Object name; when specified, this parameter is used
8766                         for result publication in the study. Otherwise, if automatic
8767                         publication is switched on, default value is used for result name.
8768
8769             Returns:
8770                 New GEOM.GEOM_Object, containing compound of all the
8771                 shapes, obtained after each rotation.
8772
8773             Example of usage:
8774                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8775             """
8776             # Example: see GEOM_TestAll.py
8777             theNbTimes, Parameters = ParseParameters(theNbTimes)
8778             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8779             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8780             anObj.SetParameters(Parameters)
8781             self._autoPublish(anObj, theName, "multirotation")
8782             return anObj
8783
8784         ## Rotate the given object around the given axis
8785         #  a given number times on the given angle.
8786         #  @param theObject The object to be rotated.
8787         #  @param theAxis The rotation axis. DZ if None.
8788         #  @param theAngleStep Rotation angle in radians.
8789         #  @param theNbTimes Quantity of rotations to be done.
8790         #  @param theName Object name; when specified, this parameter is used
8791         #         for result publication in the study. Otherwise, if automatic
8792         #         publication is switched on, default value is used for result name.
8793         #
8794         #  @return New GEOM.GEOM_Object, containing compound of all the
8795         #          shapes, obtained after each rotation.
8796         #
8797         #  @ref tui_multi_rotation "Example"
8798         @ManageTransactions("TrsfOp")
8799         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8800             """
8801             Rotate the given object around the given axis
8802             a given number times on the given angle.
8803
8804             Parameters:
8805                 theObject The object to be rotated.
8806                 theAxis The rotation axis. DZ if None.
8807                 theAngleStep Rotation angle in radians.
8808                 theNbTimes Quantity of rotations to be done.
8809                 theName Object name; when specified, this parameter is used
8810                         for result publication in the study. Otherwise, if automatic
8811                         publication is switched on, default value is used for result name.
8812
8813             Returns:
8814                 New GEOM.GEOM_Object, containing compound of all the
8815                 shapes, obtained after each rotation.
8816
8817             Example of usage:
8818                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8819             """
8820             # Example: see GEOM_TestAll.py
8821             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8822             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8823             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8824             anObj.SetParameters(Parameters)
8825             self._autoPublish(anObj, theName, "multirotation")
8826             return anObj
8827
8828         ## Rotate the given object around the given axis a given
8829         #  number times and multi-translate each rotation result.
8830         #  Rotation angle will be 2*PI/theNbTimes1.
8831         #  Translation direction passes through center of gravity
8832         #  of rotated shape and its projection on the rotation axis.
8833         #  @param theObject The object to be rotated.
8834         #  @param theAxis Rotation axis. DZ if None.
8835         #  @param theNbTimes1 Quantity of rotations to be done.
8836         #  @param theRadialStep Translation distance.
8837         #  @param theNbTimes2 Quantity of translations to be done.
8838         #  @param theName Object name; when specified, this parameter is used
8839         #         for result publication in the study. Otherwise, if automatic
8840         #         publication is switched on, default value is used for result name.
8841         #
8842         #  @return New GEOM.GEOM_Object, containing compound of all the
8843         #          shapes, obtained after each transformation.
8844         #
8845         #  @ref tui_multi_rotation "Example"
8846         @ManageTransactions("TrsfOp")
8847         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8848             """
8849             Rotate the given object around the
8850             given axis on the given angle a given number
8851             times and multi-translate each rotation result.
8852             Translation direction passes through center of gravity
8853             of rotated shape and its projection on the rotation axis.
8854
8855             Parameters:
8856                 theObject The object to be rotated.
8857                 theAxis Rotation axis. DZ if None.
8858                 theNbTimes1 Quantity of rotations to be done.
8859                 theRadialStep Translation distance.
8860                 theNbTimes2 Quantity of translations to be done.
8861                 theName Object name; when specified, this parameter is used
8862                         for result publication in the study. Otherwise, if automatic
8863                         publication is switched on, default value is used for result name.
8864
8865             Returns:
8866                 New GEOM.GEOM_Object, containing compound of all the
8867                 shapes, obtained after each transformation.
8868
8869             Example of usage:
8870                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8871             """
8872             # Example: see GEOM_TestAll.py
8873             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8874             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8875             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8876             anObj.SetParameters(Parameters)
8877             self._autoPublish(anObj, theName, "multirotation")
8878             return anObj
8879
8880         ## Rotate the given object around the
8881         #  given axis on the given angle a given number
8882         #  times and multi-translate each rotation result.
8883         #  Translation direction passes through center of gravity
8884         #  of rotated shape and its projection on the rotation axis.
8885         #  @param theObject The object to be rotated.
8886         #  @param theAxis Rotation axis. DZ if None.
8887         #  @param theAngleStep Rotation angle in radians.
8888         #  @param theNbTimes1 Quantity of rotations to be done.
8889         #  @param theRadialStep Translation distance.
8890         #  @param theNbTimes2 Quantity of translations to be done.
8891         #  @param theName Object name; when specified, this parameter is used
8892         #         for result publication in the study. Otherwise, if automatic
8893         #         publication is switched on, default value is used for result name.
8894         #
8895         #  @return New GEOM.GEOM_Object, containing compound of all the
8896         #          shapes, obtained after each transformation.
8897         #
8898         #  @ref tui_multi_rotation "Example"
8899         @ManageTransactions("TrsfOp")
8900         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8901             """
8902             Rotate the given object around the
8903             given axis on the given angle a given number
8904             times and multi-translate each rotation result.
8905             Translation direction passes through center of gravity
8906             of rotated shape and its projection on the rotation axis.
8907
8908             Parameters:
8909                 theObject The object to be rotated.
8910                 theAxis Rotation axis. DZ if None.
8911                 theAngleStep Rotation angle in radians.
8912                 theNbTimes1 Quantity of rotations to be done.
8913                 theRadialStep Translation distance.
8914                 theNbTimes2 Quantity of translations to be done.
8915                 theName Object name; when specified, this parameter is used
8916                         for result publication in the study. Otherwise, if automatic
8917                         publication is switched on, default value is used for result name.
8918
8919             Returns:
8920                 New GEOM.GEOM_Object, containing compound of all the
8921                 shapes, obtained after each transformation.
8922
8923             Example of usage:
8924                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8925             """
8926             # Example: see GEOM_TestAll.py
8927             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8928             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8929             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8930             anObj.SetParameters(Parameters)
8931             self._autoPublish(anObj, theName, "multirotation")
8932             return anObj
8933
8934         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8935         #
8936         #  @ref swig_MakeMultiRotation "Example"
8937         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8938             """
8939             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8940
8941             Example of usage:
8942                 pz = geompy.MakeVertex(0, 0, 100)
8943                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8944                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8945             """
8946             # Example: see GEOM_TestOthers.py
8947             aVec = self.MakeLine(aPoint,aDir)
8948             # note: auto-publishing is done in self.MultiRotate1D()
8949             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8950             return anObj
8951
8952         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8953         #
8954         #  @ref swig_MakeMultiRotation "Example"
8955         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8956             """
8957             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8958
8959             Example of usage:
8960                 pz = geompy.MakeVertex(0, 0, 100)
8961                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8962                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8963             """
8964             # Example: see GEOM_TestOthers.py
8965             aVec = self.MakeLine(aPoint,aDir)
8966             # note: auto-publishing is done in self.MultiRotate1D()
8967             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8968             return anObj
8969
8970         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8971         #
8972         #  @ref swig_MakeMultiRotation "Example"
8973         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8974             """
8975             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8976
8977             Example of usage:
8978                 pz = geompy.MakeVertex(0, 0, 100)
8979                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8980                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8981             """
8982             # Example: see GEOM_TestOthers.py
8983             aVec = self.MakeLine(aPoint,aDir)
8984             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8985             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8986             return anObj
8987
8988         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8989         #
8990         #  @ref swig_MakeMultiRotation "Example"
8991         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8992             """
8993             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8994
8995             Example of usage:
8996                 pz = geompy.MakeVertex(0, 0, 100)
8997                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8998                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8999             """
9000             # Example: see GEOM_TestOthers.py
9001             aVec = self.MakeLine(aPoint,aDir)
9002             # note: auto-publishing is done in self.MultiRotate2D()
9003             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9004             return anObj
9005
9006         # end of l3_transform
9007         ## @}
9008
9009         ## @addtogroup l3_transform_d
9010         ## @{
9011
9012         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9013         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9014             """
9015             Deprecated method. Use MultiRotate1DNbTimes instead.
9016             """
9017             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9018             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9019
9020         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9021         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9022         @ManageTransactions("TrsfOp")
9023         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9024             """
9025             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9026             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9027
9028             Example of usage:
9029                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9030             """
9031             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9032             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9033             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9034             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9035             anObj.SetParameters(Parameters)
9036             self._autoPublish(anObj, theName, "multirotation")
9037             return anObj
9038
9039         ## The same, as MultiRotate1D(), but axis is given by direction and point
9040         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9041         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9042             """
9043             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9044             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9045
9046             Example of usage:
9047                 pz = geompy.MakeVertex(0, 0, 100)
9048                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9049                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9050             """
9051             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9052             aVec = self.MakeLine(aPoint,aDir)
9053             # note: auto-publishing is done in self.MultiRotate1D()
9054             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9055             return anObj
9056
9057         ## The same, as MultiRotate2D(), but axis is given by direction and point
9058         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9059         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9060             """
9061             The same, as MultiRotate2D(), but axis is given by direction and point
9062             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9063
9064             Example of usage:
9065                 pz = geompy.MakeVertex(0, 0, 100)
9066                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9067                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9068             """
9069             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9070             aVec = self.MakeLine(aPoint,aDir)
9071             # note: auto-publishing is done in self.MultiRotate2D()
9072             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9073             return anObj
9074
9075         # end of l3_transform_d
9076         ## @}
9077
9078         ## @addtogroup l3_local
9079         ## @{
9080
9081         ## Perform a fillet on all edges of the given shape.
9082         #  @param theShape Shape, to perform fillet on.
9083         #  @param theR Fillet radius.
9084         #  @param theName Object name; when specified, this parameter is used
9085         #         for result publication in the study. Otherwise, if automatic
9086         #         publication is switched on, default value is used for result name.
9087         #
9088         #  @return New GEOM.GEOM_Object, containing the result shape.
9089         #
9090         #  @ref tui_fillet "Example 1"
9091         #  \n @ref swig_MakeFilletAll "Example 2"
9092         @ManageTransactions("LocalOp")
9093         def MakeFilletAll(self, theShape, theR, theName=None):
9094             """
9095             Perform a fillet on all edges of the given shape.
9096
9097             Parameters:
9098                 theShape Shape, to perform fillet on.
9099                 theR Fillet radius.
9100                 theName Object name; when specified, this parameter is used
9101                         for result publication in the study. Otherwise, if automatic
9102                         publication is switched on, default value is used for result name.
9103
9104             Returns:
9105                 New GEOM.GEOM_Object, containing the result shape.
9106
9107             Example of usage:
9108                filletall = geompy.MakeFilletAll(prism, 10.)
9109             """
9110             # Example: see GEOM_TestOthers.py
9111             theR,Parameters = ParseParameters(theR)
9112             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9113             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9114             anObj.SetParameters(Parameters)
9115             self._autoPublish(anObj, theName, "fillet")
9116             return anObj
9117
9118         ## Perform a fillet on the specified edges/faces of the given shape
9119         #  @param theShape Shape, to perform fillet on.
9120         #  @param theR Fillet radius.
9121         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9122         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9123         #  @param theName Object name; when specified, this parameter is used
9124         #         for result publication in the study. Otherwise, if automatic
9125         #         publication is switched on, default value is used for result name.
9126         #
9127         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9128         #
9129         #  @return New GEOM.GEOM_Object, containing the result shape.
9130         #
9131         #  @ref tui_fillet "Example"
9132         @ManageTransactions("LocalOp")
9133         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9134             """
9135             Perform a fillet on the specified edges/faces of the given shape
9136
9137             Parameters:
9138                 theShape Shape, to perform fillet on.
9139                 theR Fillet radius.
9140                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9141                 theListShapes Global indices of edges/faces to perform fillet on.
9142                 theName Object name; when specified, this parameter is used
9143                         for result publication in the study. Otherwise, if automatic
9144                         publication is switched on, default value is used for result name.
9145
9146             Note:
9147                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9148
9149             Returns:
9150                 New GEOM.GEOM_Object, containing the result shape.
9151
9152             Example of usage:
9153                 # get the list of IDs (IDList) for the fillet
9154                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9155                 IDlist_e = []
9156                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9157                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9158                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9159                 # make a fillet on the specified edges of the given shape
9160                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9161             """
9162             # Example: see GEOM_TestAll.py
9163             theR,Parameters = ParseParameters(theR)
9164             anObj = None
9165             if theShapeType == self.ShapeType["EDGE"]:
9166                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9167                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9168             else:
9169                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9170                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9171             anObj.SetParameters(Parameters)
9172             self._autoPublish(anObj, theName, "fillet")
9173             return anObj
9174
9175         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9176         @ManageTransactions("LocalOp")
9177         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9178             """
9179             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9180
9181             Example of usage:
9182                 # get the list of IDs (IDList) for the fillet
9183                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9184                 IDlist_e = []
9185                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9186                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9187                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9188                 # make a fillet on the specified edges of the given shape
9189                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9190             """
9191             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9192             anObj = None
9193             if theShapeType == self.ShapeType["EDGE"]:
9194                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9195                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9196             else:
9197                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9198                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9199             anObj.SetParameters(Parameters)
9200             self._autoPublish(anObj, theName, "fillet")
9201             return anObj
9202
9203         ## Perform a fillet on the specified edges of the given shape
9204         #  @param theShape  Wire Shape to perform fillet on.
9205         #  @param theR  Fillet radius.
9206         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9207         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9208         #    \note The list of vertices could be empty,
9209         #          in this case fillet will done done at all vertices in wire
9210         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9211         #         by the length of the edges, nearest to the fillet vertex.
9212         #         But sometimes the next edge is C1 continuous with the one, nearest to
9213         #         the fillet point, and such two (or more) edges can be united to allow
9214         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9215         #         thus ignoring the secant vertex (vertices).
9216         #  @param theName Object name; when specified, this parameter is used
9217         #         for result publication in the study. Otherwise, if automatic
9218         #         publication is switched on, default value is used for result name.
9219         #
9220         #  @return New GEOM.GEOM_Object, containing the result shape.
9221         #
9222         #  @ref tui_fillet2d "Example"
9223         @ManageTransactions("LocalOp")
9224         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9225             """
9226             Perform a fillet on the specified edges of the given shape
9227
9228             Parameters:
9229                 theShape  Wire Shape to perform fillet on.
9230                 theR  Fillet radius.
9231                 theListOfVertexes Global indices of vertexes to perform fillet on.
9232                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9233                     by the length of the edges, nearest to the fillet vertex.
9234                     But sometimes the next edge is C1 continuous with the one, nearest to
9235                     the fillet point, and such two (or more) edges can be united to allow
9236                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9237                     thus ignoring the secant vertex (vertices).
9238                 theName Object name; when specified, this parameter is used
9239                         for result publication in the study. Otherwise, if automatic
9240                         publication is switched on, default value is used for result name.
9241             Note:
9242                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9243
9244                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9245
9246             Returns:
9247                 New GEOM.GEOM_Object, containing the result shape.
9248
9249             Example of usage:
9250                 # create wire
9251                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9252                 # make fillet at given wire vertices with giver radius
9253                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9254             """
9255             # Example: see GEOM_TestAll.py
9256             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9257             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9258             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9259             anObj.SetParameters(Parameters)
9260             self._autoPublish(anObj, theName, "fillet")
9261             return anObj
9262
9263         ## Perform a fillet at the specified vertices of the given face/shell.
9264         #  @param theShape Face or Shell shape to perform fillet on.
9265         #  @param theR Fillet radius.
9266         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9267         #  @param theName Object name; when specified, this parameter is used
9268         #         for result publication in the study. Otherwise, if automatic
9269         #         publication is switched on, default value is used for result name.
9270         #
9271         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9272         #
9273         #  @return New GEOM.GEOM_Object, containing the result shape.
9274         #
9275         #  @ref tui_fillet2d "Example"
9276         @ManageTransactions("LocalOp")
9277         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9278             """
9279             Perform a fillet at the specified vertices of the given face/shell.
9280
9281             Parameters:
9282                 theShape  Face or Shell shape to perform fillet on.
9283                 theR  Fillet radius.
9284                 theListOfVertexes Global indices of vertexes to perform fillet on.
9285                 theName Object name; when specified, this parameter is used
9286                         for result publication in the study. Otherwise, if automatic
9287                         publication is switched on, default value is used for result name.
9288             Note:
9289                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9290
9291             Returns:
9292                 New GEOM.GEOM_Object, containing the result shape.
9293
9294             Example of usage:
9295                 face = geompy.MakeFaceHW(100, 100, 1)
9296                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9297             """
9298             # Example: see GEOM_TestAll.py
9299             theR,Parameters = ParseParameters(theR)
9300             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9301             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9302             anObj.SetParameters(Parameters)
9303             self._autoPublish(anObj, theName, "fillet")
9304             return anObj
9305
9306         ## Perform a symmetric chamfer on all edges of the given shape.
9307         #  @param theShape Shape, to perform chamfer on.
9308         #  @param theD Chamfer size along each face.
9309         #  @param theName Object name; when specified, this parameter is used
9310         #         for result publication in the study. Otherwise, if automatic
9311         #         publication is switched on, default value is used for result name.
9312         #
9313         #  @return New GEOM.GEOM_Object, containing the result shape.
9314         #
9315         #  @ref tui_chamfer "Example 1"
9316         #  \n @ref swig_MakeChamferAll "Example 2"
9317         @ManageTransactions("LocalOp")
9318         def MakeChamferAll(self, theShape, theD, theName=None):
9319             """
9320             Perform a symmetric chamfer on all edges of the given shape.
9321
9322             Parameters:
9323                 theShape Shape, to perform chamfer on.
9324                 theD Chamfer size along each face.
9325                 theName Object name; when specified, this parameter is used
9326                         for result publication in the study. Otherwise, if automatic
9327                         publication is switched on, default value is used for result name.
9328
9329             Returns:
9330                 New GEOM.GEOM_Object, containing the result shape.
9331
9332             Example of usage:
9333                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9334             """
9335             # Example: see GEOM_TestOthers.py
9336             theD,Parameters = ParseParameters(theD)
9337             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9338             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9339             anObj.SetParameters(Parameters)
9340             self._autoPublish(anObj, theName, "chamfer")
9341             return anObj
9342
9343         ## Perform a chamfer on edges, common to the specified faces,
9344         #  with distance D1 on the Face1
9345         #  @param theShape Shape, to perform chamfer on.
9346         #  @param theD1 Chamfer size along \a theFace1.
9347         #  @param theD2 Chamfer size along \a theFace2.
9348         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9349         #  @param theName Object name; when specified, this parameter is used
9350         #         for result publication in the study. Otherwise, if automatic
9351         #         publication is switched on, default value is used for result name.
9352         #
9353         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9354         #
9355         #  @return New GEOM.GEOM_Object, containing the result shape.
9356         #
9357         #  @ref tui_chamfer "Example"
9358         @ManageTransactions("LocalOp")
9359         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9360             """
9361             Perform a chamfer on edges, common to the specified faces,
9362             with distance D1 on the Face1
9363
9364             Parameters:
9365                 theShape Shape, to perform chamfer on.
9366                 theD1 Chamfer size along theFace1.
9367                 theD2 Chamfer size along theFace2.
9368                 theFace1,theFace2 Global indices of two faces of theShape.
9369                 theName Object name; when specified, this parameter is used
9370                         for result publication in the study. Otherwise, if automatic
9371                         publication is switched on, default value is used for result name.
9372
9373             Note:
9374                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9375
9376             Returns:
9377                 New GEOM.GEOM_Object, containing the result shape.
9378
9379             Example of usage:
9380                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9381                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9382                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9383                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9384             """
9385             # Example: see GEOM_TestAll.py
9386             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9387             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9388             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9389             anObj.SetParameters(Parameters)
9390             self._autoPublish(anObj, theName, "chamfer")
9391             return anObj
9392
9393         ## Perform a chamfer on edges
9394         #  @param theShape Shape, to perform chamfer on.
9395         #  @param theD Chamfer length
9396         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9397         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9398         #  @param theName Object name; when specified, this parameter is used
9399         #         for result publication in the study. Otherwise, if automatic
9400         #         publication is switched on, default value is used for result name.
9401         #
9402         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9403         #
9404         #  @return New GEOM.GEOM_Object, containing the result shape.
9405         @ManageTransactions("LocalOp")
9406         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9407             """
9408             Perform a chamfer on edges
9409
9410             Parameters:
9411                 theShape Shape, to perform chamfer on.
9412                 theD1 Chamfer size along theFace1.
9413                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9414                 theFace1,theFace2 Global indices of two faces of theShape.
9415                 theName Object name; when specified, this parameter is used
9416                         for result publication in the study. Otherwise, if automatic
9417                         publication is switched on, default value is used for result name.
9418
9419             Note:
9420                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9421
9422             Returns:
9423                 New GEOM.GEOM_Object, containing the result shape.
9424
9425             Example of usage:
9426                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9427                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9428                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9429                 ang = 30
9430                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9431             """
9432             flag = False
9433             if isinstance(theAngle,str):
9434                 flag = True
9435             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9436             if flag:
9437                 theAngle = theAngle*math.pi/180.0
9438             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9439             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9440             anObj.SetParameters(Parameters)
9441             self._autoPublish(anObj, theName, "chamfer")
9442             return anObj
9443
9444         ## Perform a chamfer on all edges of the specified faces,
9445         #  with distance D1 on the first specified face (if several for one edge)
9446         #  @param theShape Shape, to perform chamfer on.
9447         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9448         #               connected to the edge, are in \a theFaces, \a theD1
9449         #               will be get along face, which is nearer to \a theFaces beginning.
9450         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9451         #  @param theFaces Sequence of global indices of faces of \a theShape.
9452         #  @param theName Object name; when specified, this parameter is used
9453         #         for result publication in the study. Otherwise, if automatic
9454         #         publication is switched on, default value is used for result name.
9455         #
9456         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9457         #
9458         #  @return New GEOM.GEOM_Object, containing the result shape.
9459         #
9460         #  @ref tui_chamfer "Example"
9461         @ManageTransactions("LocalOp")
9462         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9463             """
9464             Perform a chamfer on all edges of the specified faces,
9465             with distance D1 on the first specified face (if several for one edge)
9466
9467             Parameters:
9468                 theShape Shape, to perform chamfer on.
9469                 theD1 Chamfer size along face from  theFaces. If both faces,
9470                       connected to the edge, are in theFaces, theD1
9471                       will be get along face, which is nearer to theFaces beginning.
9472                 theD2 Chamfer size along another of two faces, connected to the edge.
9473                 theFaces Sequence of global indices of faces of theShape.
9474                 theName Object name; when specified, this parameter is used
9475                         for result publication in the study. Otherwise, if automatic
9476                         publication is switched on, default value is used for result name.
9477
9478             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9479
9480             Returns:
9481                 New GEOM.GEOM_Object, containing the result shape.
9482             """
9483             # Example: see GEOM_TestAll.py
9484             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9485             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9486             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9487             anObj.SetParameters(Parameters)
9488             self._autoPublish(anObj, theName, "chamfer")
9489             return anObj
9490
9491         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9492         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9493         #
9494         #  @ref swig_FilletChamfer "Example"
9495         @ManageTransactions("LocalOp")
9496         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9497             """
9498             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9499             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9500             """
9501             flag = False
9502             if isinstance(theAngle,str):
9503                 flag = True
9504             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9505             if flag:
9506                 theAngle = theAngle*math.pi/180.0
9507             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9508             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9509             anObj.SetParameters(Parameters)
9510             self._autoPublish(anObj, theName, "chamfer")
9511             return anObj
9512
9513         ## Perform a chamfer on edges,
9514         #  with distance D1 on the first specified face (if several for one edge)
9515         #  @param theShape Shape, to perform chamfer on.
9516         #  @param theD1,theD2 Chamfer size
9517         #  @param theEdges Sequence of edges of \a theShape.
9518         #  @param theName Object name; when specified, this parameter is used
9519         #         for result publication in the study. Otherwise, if automatic
9520         #         publication is switched on, default value is used for result name.
9521         #
9522         #  @return New GEOM.GEOM_Object, containing the result shape.
9523         #
9524         #  @ref swig_FilletChamfer "Example"
9525         @ManageTransactions("LocalOp")
9526         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9527             """
9528             Perform a chamfer on edges,
9529             with distance D1 on the first specified face (if several for one edge)
9530
9531             Parameters:
9532                 theShape Shape, to perform chamfer on.
9533                 theD1,theD2 Chamfer size
9534                 theEdges Sequence of edges of theShape.
9535                 theName Object name; when specified, this parameter is used
9536                         for result publication in the study. Otherwise, if automatic
9537                         publication is switched on, default value is used for result name.
9538
9539             Returns:
9540                 New GEOM.GEOM_Object, containing the result shape.
9541             """
9542             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9543             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9544             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9545             anObj.SetParameters(Parameters)
9546             self._autoPublish(anObj, theName, "chamfer")
9547             return anObj
9548
9549         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9550         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9551         @ManageTransactions("LocalOp")
9552         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9553             """
9554             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9555             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9556             """
9557             flag = False
9558             if isinstance(theAngle,str):
9559                 flag = True
9560             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9561             if flag:
9562                 theAngle = theAngle*math.pi/180.0
9563             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9564             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9565             anObj.SetParameters(Parameters)
9566             self._autoPublish(anObj, theName, "chamfer")
9567             return anObj
9568
9569         ## @sa MakeChamferEdge(), MakeChamferFaces()
9570         #
9571         #  @ref swig_MakeChamfer "Example"
9572         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9573             """
9574             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9575             """
9576             # Example: see GEOM_TestOthers.py
9577             anObj = None
9578             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9579             if aShapeType == self.ShapeType["EDGE"]:
9580                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9581             else:
9582                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9583             return anObj
9584
9585         ## Remove material from a solid by extrusion of the base shape on the given distance.
9586         #  @param theInit Shape to remove material from. It must be a solid or
9587         #  a compound made of a single solid.
9588         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9589         #  @param theH Prism dimension along the normal to theBase
9590         #  @param theAngle Draft angle in degrees.
9591         #  @param theName Object name; when specified, this parameter is used
9592         #         for result publication in the study. Otherwise, if automatic
9593         #         publication is switched on, default value is used for result name.
9594         #
9595         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9596         #
9597         #  @ref tui_creation_prism "Example"
9598         @ManageTransactions("PrimOp")
9599         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9600             """
9601             Add material to a solid by extrusion of the base shape on the given distance.
9602
9603             Parameters:
9604                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9605                 theBase Closed edge or wire defining the base shape to be extruded.
9606                 theH Prism dimension along the normal  to theBase
9607                 theAngle Draft angle in degrees.
9608                 theName Object name; when specified, this parameter is used
9609                         for result publication in the study. Otherwise, if automatic
9610                         publication is switched on, default value is used for result name.
9611
9612             Returns:
9613                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9614             """
9615             # Example: see GEOM_TestAll.py
9616             #theH,Parameters = ParseParameters(theH)
9617             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9618             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9619             #anObj.SetParameters(Parameters)
9620             self._autoPublish(anObj, theName, "extrudedCut")
9621             return anObj
9622
9623         ## Add material to a solid by extrusion of the base shape on the given distance.
9624         #  @param theInit Shape to add material to. It must be a solid or
9625         #  a compound made of a single solid.
9626         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9627         #  @param theH Prism dimension along the normal to theBase
9628         #  @param theAngle Draft angle in degrees.
9629         #  @param theName Object name; when specified, this parameter is used
9630         #         for result publication in the study. Otherwise, if automatic
9631         #         publication is switched on, default value is used for result name.
9632         #
9633         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9634         #
9635         #  @ref tui_creation_prism "Example"
9636         @ManageTransactions("PrimOp")
9637         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9638             """
9639             Add material to a solid by extrusion of the base shape on the given distance.
9640
9641             Parameters:
9642                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9643                 theBase Closed edge or wire defining the base shape to be extruded.
9644                 theH Prism dimension along the normal  to theBase
9645                 theAngle Draft angle in degrees.
9646                 theName Object name; when specified, this parameter is used
9647                         for result publication in the study. Otherwise, if automatic
9648                         publication is switched on, default value is used for result name.
9649
9650             Returns:
9651                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9652             """
9653             # Example: see GEOM_TestAll.py
9654             #theH,Parameters = ParseParameters(theH)
9655             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9656             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9657             #anObj.SetParameters(Parameters)
9658             self._autoPublish(anObj, theName, "extrudedBoss")
9659             return anObj
9660
9661         # end of l3_local
9662         ## @}
9663
9664         ## @addtogroup l3_basic_op
9665         ## @{
9666
9667         ## Perform an Archimde operation on the given shape with given parameters.
9668         #  The object presenting the resulting face is returned.
9669         #  @param theShape Shape to be put in water.
9670         #  @param theWeight Weight og the shape.
9671         #  @param theWaterDensity Density of the water.
9672         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9673         #  @param theName Object name; when specified, this parameter is used
9674         #         for result publication in the study. Otherwise, if automatic
9675         #         publication is switched on, default value is used for result name.
9676         #
9677         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9678         #          by a plane, corresponding to water level.
9679         #
9680         #  @ref tui_archimede "Example"
9681         @ManageTransactions("LocalOp")
9682         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9683             """
9684             Perform an Archimde operation on the given shape with given parameters.
9685             The object presenting the resulting face is returned.
9686
9687             Parameters:
9688                 theShape Shape to be put in water.
9689                 theWeight Weight og the shape.
9690                 theWaterDensity Density of the water.
9691                 theMeshDeflection Deflection of the mesh, using to compute the section.
9692                 theName Object name; when specified, this parameter is used
9693                         for result publication in the study. Otherwise, if automatic
9694                         publication is switched on, default value is used for result name.
9695
9696             Returns:
9697                 New GEOM.GEOM_Object, containing a section of theShape
9698                 by a plane, corresponding to water level.
9699             """
9700             # Example: see GEOM_TestAll.py
9701             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9702               theWeight,theWaterDensity,theMeshDeflection)
9703             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9704             RaiseIfFailed("MakeArchimede", self.LocalOp)
9705             anObj.SetParameters(Parameters)
9706             self._autoPublish(anObj, theName, "archimede")
9707             return anObj
9708
9709         # end of l3_basic_op
9710         ## @}
9711
9712         ## @addtogroup l2_measure
9713         ## @{
9714
9715         ## Get point coordinates
9716         #  @return [x, y, z]
9717         #
9718         #  @ref tui_measurement_tools_page "Example"
9719         @ManageTransactions("MeasuOp")
9720         def PointCoordinates(self,Point):
9721             """
9722             Get point coordinates
9723
9724             Returns:
9725                 [x, y, z]
9726             """
9727             # Example: see GEOM_TestMeasures.py
9728             aTuple = self.MeasuOp.PointCoordinates(Point)
9729             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9730             return aTuple
9731
9732         ## Get vector coordinates
9733         #  @return [x, y, z]
9734         #
9735         #  @ref tui_measurement_tools_page "Example"
9736         def VectorCoordinates(self,Vector):
9737             """
9738             Get vector coordinates
9739
9740             Returns:
9741                 [x, y, z]
9742             """
9743
9744             p1=self.GetFirstVertex(Vector)
9745             p2=self.GetLastVertex(Vector)
9746
9747             X1=self.PointCoordinates(p1)
9748             X2=self.PointCoordinates(p2)
9749
9750             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9751
9752
9753         ## Compute cross product
9754         #  @return vector w=u^v
9755         #
9756         #  @ref tui_measurement_tools_page "Example"
9757         def CrossProduct(self, Vector1, Vector2):
9758             """
9759             Compute cross product
9760
9761             Returns: vector w=u^v
9762             """
9763             u=self.VectorCoordinates(Vector1)
9764             v=self.VectorCoordinates(Vector2)
9765             w=self.MakeVectorDXDYDZ(u[1]*v[2]-u[2]*v[1], u[2]*v[0]-u[0]*v[2], u[0]*v[1]-u[1]*v[0])
9766
9767             return w
9768
9769         ## Compute cross product
9770         #  @return dot product  p=u.v
9771         #
9772         #  @ref tui_measurement_tools_page "Example"
9773         def DotProduct(self, Vector1, Vector2):
9774             """
9775             Compute cross product
9776
9777             Returns: dot product  p=u.v
9778             """
9779             u=self.VectorCoordinates(Vector1)
9780             v=self.VectorCoordinates(Vector2)
9781             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9782
9783             return p
9784
9785
9786         ## Get summarized length of all wires,
9787         #  area of surface and volume of the given shape.
9788         #  @param theShape Shape to define properties of.
9789         #  @return [theLength, theSurfArea, theVolume]\n
9790         #  theLength:   Summarized length of all wires of the given shape.\n
9791         #  theSurfArea: Area of surface of the given shape.\n
9792         #  theVolume:   Volume of the given shape.
9793         #
9794         #  @ref tui_measurement_tools_page "Example"
9795         @ManageTransactions("MeasuOp")
9796         def BasicProperties(self,theShape):
9797             """
9798             Get summarized length of all wires,
9799             area of surface and volume of the given shape.
9800
9801             Parameters:
9802                 theShape Shape to define properties of.
9803
9804             Returns:
9805                 [theLength, theSurfArea, theVolume]
9806                  theLength:   Summarized length of all wires of the given shape.
9807                  theSurfArea: Area of surface of the given shape.
9808                  theVolume:   Volume of the given shape.
9809             """
9810             # Example: see GEOM_TestMeasures.py
9811             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9812             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9813             return aTuple
9814
9815         ## Get parameters of bounding box of the given shape
9816         #  @param theShape Shape to obtain bounding box of.
9817         #  @param precise TRUE for precise computation; FALSE for fast one.
9818         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9819         #  Xmin,Xmax: Limits of shape along OX axis.
9820         #  Ymin,Ymax: Limits of shape along OY axis.
9821         #  Zmin,Zmax: Limits of shape along OZ axis.
9822         #
9823         #  @ref tui_measurement_tools_page "Example"
9824         @ManageTransactions("MeasuOp")
9825         def BoundingBox (self, theShape, precise=False):
9826             """
9827             Get parameters of bounding box of the given shape
9828
9829             Parameters:
9830                 theShape Shape to obtain bounding box of.
9831                 precise TRUE for precise computation; FALSE for fast one.
9832
9833             Returns:
9834                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9835                  Xmin,Xmax: Limits of shape along OX axis.
9836                  Ymin,Ymax: Limits of shape along OY axis.
9837                  Zmin,Zmax: Limits of shape along OZ axis.
9838             """
9839             # Example: see GEOM_TestMeasures.py
9840             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9841             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9842             return aTuple
9843
9844         ## Get bounding box of the given shape
9845         #  @param theShape Shape to obtain bounding box of.
9846         #  @param precise TRUE for precise computation; FALSE for fast one.
9847         #  @param theName Object name; when specified, this parameter is used
9848         #         for result publication in the study. Otherwise, if automatic
9849         #         publication is switched on, default value is used for result name.
9850         #
9851         #  @return New GEOM.GEOM_Object, containing the created box.
9852         #
9853         #  @ref tui_measurement_tools_page "Example"
9854         @ManageTransactions("MeasuOp")
9855         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9856             """
9857             Get bounding box of the given shape
9858
9859             Parameters:
9860                 theShape Shape to obtain bounding box of.
9861                 precise TRUE for precise computation; FALSE for fast one.
9862                 theName Object name; when specified, this parameter is used
9863                         for result publication in the study. Otherwise, if automatic
9864                         publication is switched on, default value is used for result name.
9865
9866             Returns:
9867                 New GEOM.GEOM_Object, containing the created box.
9868             """
9869             # Example: see GEOM_TestMeasures.py
9870             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9871             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9872             self._autoPublish(anObj, theName, "bndbox")
9873             return anObj
9874
9875         ## Get inertia matrix and moments of inertia of theShape.
9876         #  @param theShape Shape to calculate inertia of.
9877         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9878         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9879         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9880         #
9881         #  @ref tui_measurement_tools_page "Example"
9882         @ManageTransactions("MeasuOp")
9883         def Inertia(self,theShape):
9884             """
9885             Get inertia matrix and moments of inertia of theShape.
9886
9887             Parameters:
9888                 theShape Shape to calculate inertia of.
9889
9890             Returns:
9891                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9892                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9893                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9894             """
9895             # Example: see GEOM_TestMeasures.py
9896             aTuple = self.MeasuOp.GetInertia(theShape)
9897             RaiseIfFailed("GetInertia", self.MeasuOp)
9898             return aTuple
9899
9900         ## Get if coords are included in the shape (ST_IN or ST_ON)
9901         #  @param theShape Shape
9902         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9903         #  @param tolerance to be used (default is 1.0e-7)
9904         #  @return list_of_boolean = [res1, res2, ...]
9905         @ManageTransactions("MeasuOp")
9906         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9907             """
9908             Get if coords are included in the shape (ST_IN or ST_ON)
9909
9910             Parameters:
9911                 theShape Shape
9912                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9913                 tolerance to be used (default is 1.0e-7)
9914
9915             Returns:
9916                 list_of_boolean = [res1, res2, ...]
9917             """
9918             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9919
9920         ## Get minimal distance between the given shapes.
9921         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9922         #  @return Value of the minimal distance between the given shapes.
9923         #
9924         #  @ref tui_measurement_tools_page "Example"
9925         @ManageTransactions("MeasuOp")
9926         def MinDistance(self, theShape1, theShape2):
9927             """
9928             Get minimal distance between the given shapes.
9929
9930             Parameters:
9931                 theShape1,theShape2 Shapes to find minimal distance between.
9932
9933             Returns:
9934                 Value of the minimal distance between the given shapes.
9935             """
9936             # Example: see GEOM_TestMeasures.py
9937             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9938             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9939             return aTuple[0]
9940
9941         ## Get minimal distance between the given shapes.
9942         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9943         #  @return Value of the minimal distance between the given shapes, in form of list
9944         #          [Distance, DX, DY, DZ].
9945         #
9946         #  @ref swig_all_measure "Example"
9947         @ManageTransactions("MeasuOp")
9948         def MinDistanceComponents(self, theShape1, theShape2):
9949             """
9950             Get minimal distance between the given shapes.
9951
9952             Parameters:
9953                 theShape1,theShape2 Shapes to find minimal distance between.
9954
9955             Returns:
9956                 Value of the minimal distance between the given shapes, in form of list
9957                 [Distance, DX, DY, DZ]
9958             """
9959             # Example: see GEOM_TestMeasures.py
9960             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9961             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9962             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9963             return aRes
9964
9965         ## Get closest points of the given shapes.
9966         #  @param theShape1,theShape2 Shapes to find closest points of.
9967         #  @return The number of found solutions (-1 in case of infinite number of
9968         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9969         #
9970         #  @ref tui_measurement_tools_page "Example"
9971         @ManageTransactions("MeasuOp")
9972         def ClosestPoints (self, theShape1, theShape2):
9973             """
9974             Get closest points of the given shapes.
9975
9976             Parameters:
9977                 theShape1,theShape2 Shapes to find closest points of.
9978
9979             Returns:
9980                 The number of found solutions (-1 in case of infinite number of
9981                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9982             """
9983             # Example: see GEOM_TestMeasures.py
9984             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9985             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9986             return aTuple
9987
9988         ## Get angle between the given shapes in degrees.
9989         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9990         #  @note If both arguments are vectors, the angle is computed in accordance
9991         #        with their orientations, otherwise the minimum angle is computed.
9992         #  @return Value of the angle between the given shapes in degrees.
9993         #
9994         #  @ref tui_measurement_tools_page "Example"
9995         @ManageTransactions("MeasuOp")
9996         def GetAngle(self, theShape1, theShape2):
9997             """
9998             Get angle between the given shapes in degrees.
9999
10000             Parameters:
10001                 theShape1,theShape2 Lines or linear edges to find angle between.
10002
10003             Note:
10004                 If both arguments are vectors, the angle is computed in accordance
10005                 with their orientations, otherwise the minimum angle is computed.
10006
10007             Returns:
10008                 Value of the angle between the given shapes in degrees.
10009             """
10010             # Example: see GEOM_TestMeasures.py
10011             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10012             RaiseIfFailed("GetAngle", self.MeasuOp)
10013             return anAngle
10014
10015         ## Get angle between the given shapes in radians.
10016         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10017         #  @note If both arguments are vectors, the angle is computed in accordance
10018         #        with their orientations, otherwise the minimum angle is computed.
10019         #  @return Value of the angle between the given shapes in radians.
10020         #
10021         #  @ref tui_measurement_tools_page "Example"
10022         @ManageTransactions("MeasuOp")
10023         def GetAngleRadians(self, theShape1, theShape2):
10024             """
10025             Get angle between the given shapes in radians.
10026
10027             Parameters:
10028                 theShape1,theShape2 Lines or linear edges to find angle between.
10029
10030
10031             Note:
10032                 If both arguments are vectors, the angle is computed in accordance
10033                 with their orientations, otherwise the minimum angle is computed.
10034
10035             Returns:
10036                 Value of the angle between the given shapes in radians.
10037             """
10038             # Example: see GEOM_TestMeasures.py
10039             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10040             RaiseIfFailed("GetAngle", self.MeasuOp)
10041             return anAngle
10042
10043         ## Get angle between the given vectors in degrees.
10044         #  @param theShape1,theShape2 Vectors to find angle between.
10045         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10046         #                 if False, the opposite vector to the normal vector is used.
10047         #  @return Value of the angle between the given vectors in degrees.
10048         #
10049         #  @ref tui_measurement_tools_page "Example"
10050         @ManageTransactions("MeasuOp")
10051         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10052             """
10053             Get angle between the given vectors in degrees.
10054
10055             Parameters:
10056                 theShape1,theShape2 Vectors to find angle between.
10057                 theFlag If True, the normal vector is defined by the two vectors cross,
10058                         if False, the opposite vector to the normal vector is used.
10059
10060             Returns:
10061                 Value of the angle between the given vectors in degrees.
10062             """
10063             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10064             if not theFlag:
10065                 anAngle = 360. - anAngle
10066             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10067             return anAngle
10068
10069         ## The same as GetAngleVectors, but the result is in radians.
10070         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10071             """
10072             Get angle between the given vectors in radians.
10073
10074             Parameters:
10075                 theShape1,theShape2 Vectors to find angle between.
10076                 theFlag If True, the normal vector is defined by the two vectors cross,
10077                         if False, the opposite vector to the normal vector is used.
10078
10079             Returns:
10080                 Value of the angle between the given vectors in radians.
10081             """
10082             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10083             return anAngle
10084
10085         ## @name Curve Curvature Measurement
10086         #  Methods for receiving radius of curvature of curves
10087         #  in the given point
10088         ## @{
10089
10090         ## Measure curvature of a curve at a point, set by parameter.
10091         #  @param theCurve a curve.
10092         #  @param theParam parameter.
10093         #  @return radius of curvature of \a theCurve.
10094         #
10095         #  @ref swig_todo "Example"
10096         @ManageTransactions("MeasuOp")
10097         def CurveCurvatureByParam(self, theCurve, theParam):
10098             """
10099             Measure curvature of a curve at a point, set by parameter.
10100
10101             Parameters:
10102                 theCurve a curve.
10103                 theParam parameter.
10104
10105             Returns:
10106                 radius of curvature of theCurve.
10107             """
10108             # Example: see GEOM_TestMeasures.py
10109             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10110             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10111             return aCurv
10112
10113         ## Measure curvature of a curve at a point.
10114         #  @param theCurve a curve.
10115         #  @param thePoint given point.
10116         #  @return radius of curvature of \a theCurve.
10117         #
10118         #  @ref swig_todo "Example"
10119         @ManageTransactions("MeasuOp")
10120         def CurveCurvatureByPoint(self, theCurve, thePoint):
10121             """
10122             Measure curvature of a curve at a point.
10123
10124             Parameters:
10125                 theCurve a curve.
10126                 thePoint given point.
10127
10128             Returns:
10129                 radius of curvature of theCurve.
10130             """
10131             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10132             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10133             return aCurv
10134         ## @}
10135
10136         ## @name Surface Curvature Measurement
10137         #  Methods for receiving max and min radius of curvature of surfaces
10138         #  in the given point
10139         ## @{
10140
10141         ## Measure max radius of curvature of surface.
10142         #  @param theSurf the given surface.
10143         #  @param theUParam Value of U-parameter on the referenced surface.
10144         #  @param theVParam Value of V-parameter on the referenced surface.
10145         #  @return max radius of curvature of theSurf.
10146         #
10147         ## @ref swig_todo "Example"
10148         @ManageTransactions("MeasuOp")
10149         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10150             """
10151             Measure max radius of curvature of surface.
10152
10153             Parameters:
10154                 theSurf the given surface.
10155                 theUParam Value of U-parameter on the referenced surface.
10156                 theVParam Value of V-parameter on the referenced surface.
10157
10158             Returns:
10159                 max radius of curvature of theSurf.
10160             """
10161             # Example: see GEOM_TestMeasures.py
10162             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10163             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10164             return aSurf
10165
10166         ## Measure max radius of curvature of surface in the given point
10167         #  @param theSurf the given surface.
10168         #  @param thePoint given point.
10169         #  @return max radius of curvature of theSurf.
10170         #
10171         ## @ref swig_todo "Example"
10172         @ManageTransactions("MeasuOp")
10173         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10174             """
10175             Measure max radius of curvature of surface in the given point.
10176
10177             Parameters:
10178                 theSurf the given surface.
10179                 thePoint given point.
10180
10181             Returns:
10182                 max radius of curvature of theSurf.
10183             """
10184             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10185             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10186             return aSurf
10187
10188         ## Measure min radius of curvature of surface.
10189         #  @param theSurf the given surface.
10190         #  @param theUParam Value of U-parameter on the referenced surface.
10191         #  @param theVParam Value of V-parameter on the referenced surface.
10192         #  @return min radius of curvature of theSurf.
10193         #
10194         ## @ref swig_todo "Example"
10195         @ManageTransactions("MeasuOp")
10196         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10197             """
10198             Measure min radius of curvature of surface.
10199
10200             Parameters:
10201                 theSurf the given surface.
10202                 theUParam Value of U-parameter on the referenced surface.
10203                 theVParam Value of V-parameter on the referenced surface.
10204
10205             Returns:
10206                 Min radius of curvature of theSurf.
10207             """
10208             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10209             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10210             return aSurf
10211
10212         ## Measure min radius of curvature of surface in the given point
10213         #  @param theSurf the given surface.
10214         #  @param thePoint given point.
10215         #  @return min radius of curvature of theSurf.
10216         #
10217         ## @ref swig_todo "Example"
10218         @ManageTransactions("MeasuOp")
10219         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10220             """
10221             Measure min radius of curvature of surface in the given point.
10222
10223             Parameters:
10224                 theSurf the given surface.
10225                 thePoint given point.
10226
10227             Returns:
10228                 Min radius of curvature of theSurf.
10229             """
10230             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10231             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10232             return aSurf
10233         ## @}
10234
10235         ## Get min and max tolerances of sub-shapes of theShape
10236         #  @param theShape Shape, to get tolerances of.
10237         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10238         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10239         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10240         #  VertMin,VertMax: Min and max tolerances of the vertices.
10241         #
10242         #  @ref tui_measurement_tools_page "Example"
10243         @ManageTransactions("MeasuOp")
10244         def Tolerance(self,theShape):
10245             """
10246             Get min and max tolerances of sub-shapes of theShape
10247
10248             Parameters:
10249                 theShape Shape, to get tolerances of.
10250
10251             Returns:
10252                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10253                  FaceMin,FaceMax: Min and max tolerances of the faces.
10254                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10255                  VertMin,VertMax: Min and max tolerances of the vertices.
10256             """
10257             # Example: see GEOM_TestMeasures.py
10258             aTuple = self.MeasuOp.GetTolerance(theShape)
10259             RaiseIfFailed("GetTolerance", self.MeasuOp)
10260             return aTuple
10261
10262         ## Obtain description of the given shape (number of sub-shapes of each type)
10263         #  @param theShape Shape to be described.
10264         #  @return Description of the given shape.
10265         #
10266         #  @ref tui_measurement_tools_page "Example"
10267         @ManageTransactions("MeasuOp")
10268         def WhatIs(self,theShape):
10269             """
10270             Obtain description of the given shape (number of sub-shapes of each type)
10271
10272             Parameters:
10273                 theShape Shape to be described.
10274
10275             Returns:
10276                 Description of the given shape.
10277             """
10278             # Example: see GEOM_TestMeasures.py
10279             aDescr = self.MeasuOp.WhatIs(theShape)
10280             RaiseIfFailed("WhatIs", self.MeasuOp)
10281             return aDescr
10282
10283         ## Obtain quantity of shapes of the given type in \a theShape.
10284         #  If \a theShape is of type \a theType, it is also counted.
10285         #  @param theShape Shape to be described.
10286         #  @param theType the given ShapeType().
10287         #  @return Quantity of shapes of type \a theType in \a theShape.
10288         #
10289         #  @ref tui_measurement_tools_page "Example"
10290         def NbShapes (self, theShape, theType):
10291             """
10292             Obtain quantity of shapes of the given type in theShape.
10293             If theShape is of type theType, it is also counted.
10294
10295             Parameters:
10296                 theShape Shape to be described.
10297                 theType the given geompy.ShapeType
10298
10299             Returns:
10300                 Quantity of shapes of type theType in theShape.
10301             """
10302             # Example: see GEOM_TestMeasures.py
10303             listSh = self.SubShapeAllIDs(theShape, theType)
10304             Nb = len(listSh)
10305             return Nb
10306
10307         ## Obtain quantity of shapes of each type in \a theShape.
10308         #  The \a theShape is also counted.
10309         #  @param theShape Shape to be described.
10310         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10311         #
10312         #  @ref tui_measurement_tools_page "Example"
10313         def ShapeInfo (self, theShape):
10314             """
10315             Obtain quantity of shapes of each type in theShape.
10316             The theShape is also counted.
10317
10318             Parameters:
10319                 theShape Shape to be described.
10320
10321             Returns:
10322                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10323             """
10324             # Example: see GEOM_TestMeasures.py
10325             aDict = {}
10326             for typeSh in self.ShapeType:
10327                 if typeSh in ( "AUTO", "SHAPE" ): continue
10328                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10329                 Nb = len(listSh)
10330                 aDict[typeSh] = Nb
10331                 pass
10332             return aDict
10333
10334         def GetCreationInformation(self, theShape):
10335             info = theShape.GetCreationInformation()
10336             # operationName
10337             opName = info.operationName
10338             if not opName: opName = "no info available"
10339             res = "Operation: " + opName
10340             # parameters
10341             for parVal in info.params:
10342                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10343             return res
10344
10345         ## Get a point, situated at the centre of mass of theShape.
10346         #  @param theShape Shape to define centre of mass of.
10347         #  @param theName Object name; when specified, this parameter is used
10348         #         for result publication in the study. Otherwise, if automatic
10349         #         publication is switched on, default value is used for result name.
10350         #
10351         #  @return New GEOM.GEOM_Object, containing the created point.
10352         #
10353         #  @ref tui_measurement_tools_page "Example"
10354         @ManageTransactions("MeasuOp")
10355         def MakeCDG(self, theShape, theName=None):
10356             """
10357             Get a point, situated at the centre of mass of theShape.
10358
10359             Parameters:
10360                 theShape Shape to define centre of mass of.
10361                 theName Object name; when specified, this parameter is used
10362                         for result publication in the study. Otherwise, if automatic
10363                         publication is switched on, default value is used for result name.
10364
10365             Returns:
10366                 New GEOM.GEOM_Object, containing the created point.
10367             """
10368             # Example: see GEOM_TestMeasures.py
10369             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10370             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10371             self._autoPublish(anObj, theName, "centerOfMass")
10372             return anObj
10373
10374         ## Get a vertex sub-shape by index depended with orientation.
10375         #  @param theShape Shape to find sub-shape.
10376         #  @param theIndex Index to find vertex by this index (starting from zero)
10377         #  @param theName Object name; when specified, this parameter is used
10378         #         for result publication in the study. Otherwise, if automatic
10379         #         publication is switched on, default value is used for result name.
10380         #
10381         #  @return New GEOM.GEOM_Object, containing the created vertex.
10382         #
10383         #  @ref tui_measurement_tools_page "Example"
10384         @ManageTransactions("MeasuOp")
10385         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10386             """
10387             Get a vertex sub-shape by index depended with orientation.
10388
10389             Parameters:
10390                 theShape Shape to find sub-shape.
10391                 theIndex Index to find vertex by this index (starting from zero)
10392                 theName Object name; when specified, this parameter is used
10393                         for result publication in the study. Otherwise, if automatic
10394                         publication is switched on, default value is used for result name.
10395
10396             Returns:
10397                 New GEOM.GEOM_Object, containing the created vertex.
10398             """
10399             # Example: see GEOM_TestMeasures.py
10400             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10401             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10402             self._autoPublish(anObj, theName, "vertex")
10403             return anObj
10404
10405         ## Get the first vertex of wire/edge depended orientation.
10406         #  @param theShape Shape to find first vertex.
10407         #  @param theName Object name; when specified, this parameter is used
10408         #         for result publication in the study. Otherwise, if automatic
10409         #         publication is switched on, default value is used for result name.
10410         #
10411         #  @return New GEOM.GEOM_Object, containing the created vertex.
10412         #
10413         #  @ref tui_measurement_tools_page "Example"
10414         def GetFirstVertex(self, theShape, theName=None):
10415             """
10416             Get the first vertex of wire/edge depended orientation.
10417
10418             Parameters:
10419                 theShape Shape to find first vertex.
10420                 theName Object name; when specified, this parameter is used
10421                         for result publication in the study. Otherwise, if automatic
10422                         publication is switched on, default value is used for result name.
10423
10424             Returns:
10425                 New GEOM.GEOM_Object, containing the created vertex.
10426             """
10427             # Example: see GEOM_TestMeasures.py
10428             # note: auto-publishing is done in self.GetVertexByIndex()
10429             return self.GetVertexByIndex(theShape, 0, theName)
10430
10431         ## Get the last vertex of wire/edge depended orientation.
10432         #  @param theShape Shape to find last vertex.
10433         #  @param theName Object name; when specified, this parameter is used
10434         #         for result publication in the study. Otherwise, if automatic
10435         #         publication is switched on, default value is used for result name.
10436         #
10437         #  @return New GEOM.GEOM_Object, containing the created vertex.
10438         #
10439         #  @ref tui_measurement_tools_page "Example"
10440         def GetLastVertex(self, theShape, theName=None):
10441             """
10442             Get the last vertex of wire/edge depended orientation.
10443
10444             Parameters:
10445                 theShape Shape to find last vertex.
10446                 theName Object name; when specified, this parameter is used
10447                         for result publication in the study. Otherwise, if automatic
10448                         publication is switched on, default value is used for result name.
10449
10450             Returns:
10451                 New GEOM.GEOM_Object, containing the created vertex.
10452             """
10453             # Example: see GEOM_TestMeasures.py
10454             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10455             # note: auto-publishing is done in self.GetVertexByIndex()
10456             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10457
10458         ## Get a normale to the given face. If the point is not given,
10459         #  the normale is calculated at the center of mass.
10460         #  @param theFace Face to define normale of.
10461         #  @param theOptionalPoint Point to compute the normale at.
10462         #  @param theName Object name; when specified, this parameter is used
10463         #         for result publication in the study. Otherwise, if automatic
10464         #         publication is switched on, default value is used for result name.
10465         #
10466         #  @return New GEOM.GEOM_Object, containing the created vector.
10467         #
10468         #  @ref swig_todo "Example"
10469         @ManageTransactions("MeasuOp")
10470         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10471             """
10472             Get a normale to the given face. If the point is not given,
10473             the normale is calculated at the center of mass.
10474
10475             Parameters:
10476                 theFace Face to define normale of.
10477                 theOptionalPoint Point to compute the normale at.
10478                 theName Object name; when specified, this parameter is used
10479                         for result publication in the study. Otherwise, if automatic
10480                         publication is switched on, default value is used for result name.
10481
10482             Returns:
10483                 New GEOM.GEOM_Object, containing the created vector.
10484             """
10485             # Example: see GEOM_TestMeasures.py
10486             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10487             RaiseIfFailed("GetNormal", self.MeasuOp)
10488             self._autoPublish(anObj, theName, "normal")
10489             return anObj
10490
10491         ## Print shape errors obtained from CheckShape.
10492         #  @param theShape Shape that was checked.
10493         #  @param theShapeErrors the shape errors obtained by CheckShape.
10494         #  @param theReturnStatus If 0 the description of problem is printed.
10495         #                         If 1 the description of problem is returned.
10496         #  @return If theReturnStatus is equal to 1 the description is returned.
10497         #          Otherwise doesn't return anything.
10498         #
10499         #  @ref tui_measurement_tools_page "Example"
10500         @ManageTransactions("MeasuOp")
10501         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10502             """
10503             Print shape errors obtained from CheckShape.
10504
10505             Parameters:
10506                 theShape Shape that was checked.
10507                 theShapeErrors the shape errors obtained by CheckShape.
10508                 theReturnStatus If 0 the description of problem is printed.
10509                                 If 1 the description of problem is returned.
10510
10511             Returns:
10512                 If theReturnStatus is equal to 1 the description is returned.
10513                   Otherwise doesn't return anything.
10514             """
10515             # Example: see GEOM_TestMeasures.py
10516             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10517             if theReturnStatus == 1:
10518                 return Descr
10519             print Descr
10520             pass
10521
10522         ## Check a topology of the given shape.
10523         #  @param theShape Shape to check validity of.
10524         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10525         #                        if TRUE, the shape's geometry will be checked also.
10526         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10527         #                         of problem is printed.
10528         #                         If 1 isValid flag and the description of
10529         #                         problem is returned.
10530         #                         If 2 isValid flag and the list of error data
10531         #                         is returned.
10532         #  @return TRUE, if the shape "seems to be valid".
10533         #          If theShape is invalid, prints a description of problem.
10534         #          If theReturnStatus is equal to 1 the description is returned
10535         #          along with IsValid flag.
10536         #          If theReturnStatus is equal to 2 the list of error data is
10537         #          returned along with IsValid flag.
10538         #
10539         #  @ref tui_measurement_tools_page "Example"
10540         @ManageTransactions("MeasuOp")
10541         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10542             """
10543             Check a topology of the given shape.
10544
10545             Parameters:
10546                 theShape Shape to check validity of.
10547                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10548                                if TRUE, the shape's geometry will be checked also.
10549                 theReturnStatus If 0 and if theShape is invalid, a description
10550                                 of problem is printed.
10551                                 If 1 IsValid flag and the description of
10552                                 problem is returned.
10553                                 If 2 IsValid flag and the list of error data
10554                                 is returned.
10555
10556             Returns:
10557                 TRUE, if the shape "seems to be valid".
10558                 If theShape is invalid, prints a description of problem.
10559                 If theReturnStatus is equal to 1 the description is returned
10560                 along with IsValid flag.
10561                 If theReturnStatus is equal to 2 the list of error data is
10562                 returned along with IsValid flag.
10563             """
10564             # Example: see GEOM_TestMeasures.py
10565             if theIsCheckGeom:
10566                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10567                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10568             else:
10569                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10570                 RaiseIfFailed("CheckShape", self.MeasuOp)
10571             if IsValid == 0:
10572                 if theReturnStatus == 0:
10573                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10574                     print Descr
10575             if theReturnStatus == 1:
10576               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10577               return (IsValid, Descr)
10578             elif theReturnStatus == 2:
10579               return (IsValid, ShapeErrors)
10580             return IsValid
10581
10582         ## Detect self-intersections in the given shape.
10583         #  @param theShape Shape to check.
10584         #  @return TRUE, if the shape contains no self-intersections.
10585         #
10586         #  @ref tui_measurement_tools_page "Example"
10587         @ManageTransactions("MeasuOp")
10588         def CheckSelfIntersections(self, theShape):
10589             """
10590             Detect self-intersections in the given shape.
10591
10592             Parameters:
10593                 theShape Shape to check.
10594
10595             Returns:
10596                 TRUE, if the shape contains no self-intersections.
10597             """
10598             # Example: see GEOM_TestMeasures.py
10599             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10600             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10601             return IsValid
10602
10603         ## Get position (LCS) of theShape.
10604         #
10605         #  Origin of the LCS is situated at the shape's center of mass.
10606         #  Axes of the LCS are obtained from shape's location or,
10607         #  if the shape is a planar face, from position of its plane.
10608         #
10609         #  @param theShape Shape to calculate position of.
10610         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10611         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10612         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10613         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10614         #
10615         #  @ref swig_todo "Example"
10616         @ManageTransactions("MeasuOp")
10617         def GetPosition(self,theShape):
10618             """
10619             Get position (LCS) of theShape.
10620             Origin of the LCS is situated at the shape's center of mass.
10621             Axes of the LCS are obtained from shape's location or,
10622             if the shape is a planar face, from position of its plane.
10623
10624             Parameters:
10625                 theShape Shape to calculate position of.
10626
10627             Returns:
10628                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10629                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10630                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10631                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10632             """
10633             # Example: see GEOM_TestMeasures.py
10634             aTuple = self.MeasuOp.GetPosition(theShape)
10635             RaiseIfFailed("GetPosition", self.MeasuOp)
10636             return aTuple
10637
10638         ## Get kind of theShape.
10639         #
10640         #  @param theShape Shape to get a kind of.
10641         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10642         #          and a list of parameters, describing the shape.
10643         #  @note  Concrete meaning of each value, returned via \a theIntegers
10644         #         or \a theDoubles list depends on the kind() of the shape.
10645         #
10646         #  @ref swig_todo "Example"
10647         @ManageTransactions("MeasuOp")
10648         def KindOfShape(self,theShape):
10649             """
10650             Get kind of theShape.
10651
10652             Parameters:
10653                 theShape Shape to get a kind of.
10654
10655             Returns:
10656                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10657                     and a list of parameters, describing the shape.
10658             Note:
10659                 Concrete meaning of each value, returned via theIntegers
10660                 or theDoubles list depends on the geompy.kind of the shape
10661             """
10662             # Example: see GEOM_TestMeasures.py
10663             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10664             RaiseIfFailed("KindOfShape", self.MeasuOp)
10665
10666             aKind  = aRoughTuple[0]
10667             anInts = aRoughTuple[1]
10668             aDbls  = aRoughTuple[2]
10669
10670             # Now there is no exception from this rule:
10671             aKindTuple = [aKind] + aDbls + anInts
10672
10673             # If they are we will regroup parameters for such kind of shape.
10674             # For example:
10675             #if aKind == kind.SOME_KIND:
10676             #    #  SOME_KIND     int int double int double double
10677             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10678
10679             return aKindTuple
10680
10681         ## Returns the string that describes if the shell is good for solid.
10682         #  This is a support method for MakeSolid.
10683         #
10684         #  @param theShell the shell to be checked.
10685         #  @return Returns a string that describes the shell validity for
10686         #          solid construction.
10687         @ManageTransactions("MeasuOp")
10688         def _IsGoodForSolid(self, theShell):
10689             """
10690             Returns the string that describes if the shell is good for solid.
10691             This is a support method for MakeSolid.
10692
10693             Parameter:
10694                 theShell the shell to be checked.
10695
10696             Returns:
10697                 Returns a string that describes the shell validity for
10698                 solid construction.
10699             """
10700             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
10701             return aDescr
10702
10703         # end of l2_measure
10704         ## @}
10705
10706         ## @addtogroup l2_import_export
10707         ## @{
10708
10709         ## Import a shape from the BREP, IGES, STEP or other file
10710         #  (depends on given format) with given name.
10711         #
10712         #  Note: this function is deprecated, it is kept for backward compatibility only
10713         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10714         #
10715         #  @param theFileName The file, containing the shape.
10716         #  @param theFormatName Specify format for the file reading.
10717         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10718         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10719         #            format 'STEP_SCALE' is used instead of 'STEP',
10720         #            length unit will be set to 'meter' and result model will be scaled.
10721         #  @param theName Object name; when specified, this parameter is used
10722         #         for result publication in the study. Otherwise, if automatic
10723         #         publication is switched on, default value is used for result name.
10724         #
10725         #  @return New GEOM.GEOM_Object, containing the imported shape.
10726         #          If material names are imported it returns the list of
10727         #          objects. The first one is the imported object followed by
10728         #          material groups.
10729         #  @note Auto publishing is allowed for the shape itself. Imported
10730         #        material groups are not automatically published.
10731         #
10732         #  @ref swig_Import_Export "Example"
10733         @ManageTransactions("InsertOp")
10734         def ImportFile(self, theFileName, theFormatName, theName=None):
10735             """
10736             Import a shape from the BREP, IGES, STEP or other file
10737             (depends on given format) with given name.
10738
10739             Note: this function is deprecated, it is kept for backward compatibility only
10740             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10741
10742             Parameters: 
10743                 theFileName The file, containing the shape.
10744                 theFormatName Specify format for the file reading.
10745                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10746                     If format 'IGES_SCALE' is used instead of 'IGES' or
10747                        format 'STEP_SCALE' is used instead of 'STEP',
10748                        length unit will be set to 'meter' and result model will be scaled.
10749                 theName Object name; when specified, this parameter is used
10750                         for result publication in the study. Otherwise, if automatic
10751                         publication is switched on, default value is used for result name.
10752
10753             Returns:
10754                 New GEOM.GEOM_Object, containing the imported shape.
10755                 If material names are imported it returns the list of
10756                 objects. The first one is the imported object followed by
10757                 material groups.
10758             Note:
10759                 Auto publishing is allowed for the shape itself. Imported
10760                 material groups are not automatically published.
10761             """
10762             # Example: see GEOM_TestOthers.py
10763             print """
10764             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
10765             where <FormatName> is a name of desirable format for importing.
10766             """
10767             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10768             RaiseIfFailed("ImportFile", self.InsertOp)
10769             aNbObj = len(aListObj)
10770             if aNbObj > 0:
10771                 self._autoPublish(aListObj[0], theName, "imported")
10772             if aNbObj == 1:
10773                 return aListObj[0]
10774             return aListObj
10775
10776         ## Deprecated analog of ImportFile()
10777         def Import(self, theFileName, theFormatName, theName=None):
10778             """
10779             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10780             """
10781             # note: auto-publishing is done in self.ImportFile()
10782             return self.ImportFile(theFileName, theFormatName, theName)
10783
10784         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10785         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10786         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10787         #  @param theStream The BRep binary stream.
10788         #  @param theName Object name; when specified, this parameter is used
10789         #         for result publication in the study. Otherwise, if automatic
10790         #         publication is switched on, default value is used for result name.
10791         #
10792         #  @return New GEOM_Object, containing the shape, read from theStream.
10793         #
10794         #  @ref swig_Import_Export "Example"
10795         @ManageTransactions("InsertOp")
10796         def RestoreShape (self, theStream, theName=None):
10797             """
10798             Read a shape from the binary stream, containing its bounding representation (BRep).
10799
10800             Note:
10801                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10802
10803             Parameters:
10804                 theStream The BRep binary stream.
10805                 theName Object name; when specified, this parameter is used
10806                         for result publication in the study. Otherwise, if automatic
10807                         publication is switched on, default value is used for result name.
10808
10809             Returns:
10810                 New GEOM_Object, containing the shape, read from theStream.
10811             """
10812             # Example: see GEOM_TestOthers.py
10813             anObj = self.InsertOp.RestoreShape(theStream)
10814             RaiseIfFailed("RestoreShape", self.InsertOp)
10815             self._autoPublish(anObj, theName, "restored")
10816             return anObj
10817
10818         ## Export the given shape into a file with given name.
10819         #
10820         #  Note: this function is deprecated, it is kept for backward compatibility only
10821         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
10822         #
10823         #  @param theObject Shape to be stored in the file.
10824         #  @param theFileName Name of the file to store the given shape in.
10825         #  @param theFormatName Specify format for the shape storage.
10826         #         Available formats can be obtained with
10827         #         geompy.InsertOp.ExportTranslators()[0] method.
10828         #
10829         #  @ref swig_Import_Export "Example"
10830         @ManageTransactions("InsertOp")
10831         def Export(self, theObject, theFileName, theFormatName):
10832             """
10833             Export the given shape into a file with given name.
10834
10835             Note: this function is deprecated, it is kept for backward compatibility only
10836             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
10837             
10838             Parameters: 
10839                 theObject Shape to be stored in the file.
10840                 theFileName Name of the file to store the given shape in.
10841                 theFormatName Specify format for the shape storage.
10842                               Available formats can be obtained with
10843                               geompy.InsertOp.ExportTranslators()[0] method.
10844             """
10845             # Example: see GEOM_TestOthers.py
10846             print """
10847             WARNING: Function Export is deprecated, use Export<FormatName> instead,
10848             where <FormatName> is a name of desirable format for exporting.
10849             """
10850             self.InsertOp.Export(theObject, theFileName, theFormatName)
10851             if self.InsertOp.IsDone() == 0:
10852                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10853                 pass
10854             pass
10855
10856         # end of l2_import_export
10857         ## @}
10858
10859         ## @addtogroup l3_blocks
10860         ## @{
10861
10862         ## Create a quadrangle face from four edges. Order of Edges is not
10863         #  important. It is  not necessary that edges share the same vertex.
10864         #  @param E1,E2,E3,E4 Edges for the face bound.
10865         #  @param theName Object name; when specified, this parameter is used
10866         #         for result publication in the study. Otherwise, if automatic
10867         #         publication is switched on, default value is used for result name.
10868         #
10869         #  @return New GEOM.GEOM_Object, containing the created face.
10870         #
10871         #  @ref tui_building_by_blocks_page "Example"
10872         @ManageTransactions("BlocksOp")
10873         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10874             """
10875             Create a quadrangle face from four edges. Order of Edges is not
10876             important. It is  not necessary that edges share the same vertex.
10877
10878             Parameters:
10879                 E1,E2,E3,E4 Edges for the face bound.
10880                 theName Object name; when specified, this parameter is used
10881                         for result publication in the study. Otherwise, if automatic
10882                         publication is switched on, default value is used for result name.
10883
10884             Returns:
10885                 New GEOM.GEOM_Object, containing the created face.
10886
10887             Example of usage:
10888                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10889             """
10890             # Example: see GEOM_Spanner.py
10891             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10892             RaiseIfFailed("MakeQuad", self.BlocksOp)
10893             self._autoPublish(anObj, theName, "quad")
10894             return anObj
10895
10896         ## Create a quadrangle face on two edges.
10897         #  The missing edges will be built by creating the shortest ones.
10898         #  @param E1,E2 Two opposite edges for the face.
10899         #  @param theName Object name; when specified, this parameter is used
10900         #         for result publication in the study. Otherwise, if automatic
10901         #         publication is switched on, default value is used for result name.
10902         #
10903         #  @return New GEOM.GEOM_Object, containing the created face.
10904         #
10905         #  @ref tui_building_by_blocks_page "Example"
10906         @ManageTransactions("BlocksOp")
10907         def MakeQuad2Edges(self, E1, E2, theName=None):
10908             """
10909             Create a quadrangle face on two edges.
10910             The missing edges will be built by creating the shortest ones.
10911
10912             Parameters:
10913                 E1,E2 Two opposite edges for the face.
10914                 theName Object name; when specified, this parameter is used
10915                         for result publication in the study. Otherwise, if automatic
10916                         publication is switched on, default value is used for result name.
10917
10918             Returns:
10919                 New GEOM.GEOM_Object, containing the created face.
10920
10921             Example of usage:
10922                 # create vertices
10923                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10924                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10925                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10926                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10927                 # create edges
10928                 edge1 = geompy.MakeEdge(p1, p2)
10929                 edge2 = geompy.MakeEdge(p3, p4)
10930                 # create a quadrangle face from two edges
10931                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10932             """
10933             # Example: see GEOM_Spanner.py
10934             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10935             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10936             self._autoPublish(anObj, theName, "quad")
10937             return anObj
10938
10939         ## Create a quadrangle face with specified corners.
10940         #  The missing edges will be built by creating the shortest ones.
10941         #  @param V1,V2,V3,V4 Corner vertices for the face.
10942         #  @param theName Object name; when specified, this parameter is used
10943         #         for result publication in the study. Otherwise, if automatic
10944         #         publication is switched on, default value is used for result name.
10945         #
10946         #  @return New GEOM.GEOM_Object, containing the created face.
10947         #
10948         #  @ref tui_building_by_blocks_page "Example 1"
10949         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10950         @ManageTransactions("BlocksOp")
10951         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10952             """
10953             Create a quadrangle face with specified corners.
10954             The missing edges will be built by creating the shortest ones.
10955
10956             Parameters:
10957                 V1,V2,V3,V4 Corner vertices for the face.
10958                 theName Object name; when specified, this parameter is used
10959                         for result publication in the study. Otherwise, if automatic
10960                         publication is switched on, default value is used for result name.
10961
10962             Returns:
10963                 New GEOM.GEOM_Object, containing the created face.
10964
10965             Example of usage:
10966                 # create vertices
10967                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10968                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10969                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10970                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10971                 # create a quadrangle from four points in its corners
10972                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10973             """
10974             # Example: see GEOM_Spanner.py
10975             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10976             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10977             self._autoPublish(anObj, theName, "quad")
10978             return anObj
10979
10980         ## Create a hexahedral solid, bounded by the six given faces. Order of
10981         #  faces is not important. It is  not necessary that Faces share the same edge.
10982         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10983         #  @param theName Object name; when specified, this parameter is used
10984         #         for result publication in the study. Otherwise, if automatic
10985         #         publication is switched on, default value is used for result name.
10986         #
10987         #  @return New GEOM.GEOM_Object, containing the created solid.
10988         #
10989         #  @ref tui_building_by_blocks_page "Example 1"
10990         #  \n @ref swig_MakeHexa "Example 2"
10991         @ManageTransactions("BlocksOp")
10992         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10993             """
10994             Create a hexahedral solid, bounded by the six given faces. Order of
10995             faces is not important. It is  not necessary that Faces share the same edge.
10996
10997             Parameters:
10998                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10999                 theName Object name; when specified, this parameter is used
11000                         for result publication in the study. Otherwise, if automatic
11001                         publication is switched on, default value is used for result name.
11002
11003             Returns:
11004                 New GEOM.GEOM_Object, containing the created solid.
11005
11006             Example of usage:
11007                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11008             """
11009             # Example: see GEOM_Spanner.py
11010             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11011             RaiseIfFailed("MakeHexa", self.BlocksOp)
11012             self._autoPublish(anObj, theName, "hexa")
11013             return anObj
11014
11015         ## Create a hexahedral solid between two given faces.
11016         #  The missing faces will be built by creating the smallest ones.
11017         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11018         #  @param theName Object name; when specified, this parameter is used
11019         #         for result publication in the study. Otherwise, if automatic
11020         #         publication is switched on, default value is used for result name.
11021         #
11022         #  @return New GEOM.GEOM_Object, containing the created solid.
11023         #
11024         #  @ref tui_building_by_blocks_page "Example 1"
11025         #  \n @ref swig_MakeHexa2Faces "Example 2"
11026         @ManageTransactions("BlocksOp")
11027         def MakeHexa2Faces(self, F1, F2, theName=None):
11028             """
11029             Create a hexahedral solid between two given faces.
11030             The missing faces will be built by creating the smallest ones.
11031
11032             Parameters:
11033                 F1,F2 Two opposite faces for the hexahedral solid.
11034                 theName Object name; when specified, this parameter is used
11035                         for result publication in the study. Otherwise, if automatic
11036                         publication is switched on, default value is used for result name.
11037
11038             Returns:
11039                 New GEOM.GEOM_Object, containing the created solid.
11040
11041             Example of usage:
11042                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11043             """
11044             # Example: see GEOM_Spanner.py
11045             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11046             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11047             self._autoPublish(anObj, theName, "hexa")
11048             return anObj
11049
11050         # end of l3_blocks
11051         ## @}
11052
11053         ## @addtogroup l3_blocks_op
11054         ## @{
11055
11056         ## Get a vertex, found in the given shape by its coordinates.
11057         #  @param theShape Block or a compound of blocks.
11058         #  @param theX,theY,theZ Coordinates of the sought vertex.
11059         #  @param theEpsilon Maximum allowed distance between the resulting
11060         #                    vertex and point with the given coordinates.
11061         #  @param theName Object name; when specified, this parameter is used
11062         #         for result publication in the study. Otherwise, if automatic
11063         #         publication is switched on, default value is used for result name.
11064         #
11065         #  @return New GEOM.GEOM_Object, containing the found vertex.
11066         #
11067         #  @ref swig_GetPoint "Example"
11068         @ManageTransactions("BlocksOp")
11069         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11070             """
11071             Get a vertex, found in the given shape by its coordinates.
11072
11073             Parameters:
11074                 theShape Block or a compound of blocks.
11075                 theX,theY,theZ Coordinates of the sought vertex.
11076                 theEpsilon Maximum allowed distance between the resulting
11077                            vertex and point with the given coordinates.
11078                 theName Object name; when specified, this parameter is used
11079                         for result publication in the study. Otherwise, if automatic
11080                         publication is switched on, default value is used for result name.
11081
11082             Returns:
11083                 New GEOM.GEOM_Object, containing the found vertex.
11084
11085             Example of usage:
11086                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11087             """
11088             # Example: see GEOM_TestOthers.py
11089             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11090             RaiseIfFailed("GetPoint", self.BlocksOp)
11091             self._autoPublish(anObj, theName, "vertex")
11092             return anObj
11093
11094         ## Find a vertex of the given shape, which has minimal distance to the given point.
11095         #  @param theShape Any shape.
11096         #  @param thePoint Point, close to the desired vertex.
11097         #  @param theName Object name; when specified, this parameter is used
11098         #         for result publication in the study. Otherwise, if automatic
11099         #         publication is switched on, default value is used for result name.
11100         #
11101         #  @return New GEOM.GEOM_Object, containing the found vertex.
11102         #
11103         #  @ref swig_GetVertexNearPoint "Example"
11104         @ManageTransactions("BlocksOp")
11105         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11106             """
11107             Find a vertex of the given shape, which has minimal distance to the given point.
11108
11109             Parameters:
11110                 theShape Any shape.
11111                 thePoint Point, close to the desired vertex.
11112                 theName Object name; when specified, this parameter is used
11113                         for result publication in the study. Otherwise, if automatic
11114                         publication is switched on, default value is used for result name.
11115
11116             Returns:
11117                 New GEOM.GEOM_Object, containing the found vertex.
11118
11119             Example of usage:
11120                 pmidle = geompy.MakeVertex(50, 0, 50)
11121                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11122             """
11123             # Example: see GEOM_TestOthers.py
11124             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11125             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11126             self._autoPublish(anObj, theName, "vertex")
11127             return anObj
11128
11129         ## Get an edge, found in the given shape by two given vertices.
11130         #  @param theShape Block or a compound of blocks.
11131         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11132         #  @param theName Object name; when specified, this parameter is used
11133         #         for result publication in the study. Otherwise, if automatic
11134         #         publication is switched on, default value is used for result name.
11135         #
11136         #  @return New GEOM.GEOM_Object, containing the found edge.
11137         #
11138         #  @ref swig_GetEdge "Example"
11139         @ManageTransactions("BlocksOp")
11140         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11141             """
11142             Get an edge, found in the given shape by two given vertices.
11143
11144             Parameters:
11145                 theShape Block or a compound of blocks.
11146                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11147                 theName Object name; when specified, this parameter is used
11148                         for result publication in the study. Otherwise, if automatic
11149                         publication is switched on, default value is used for result name.
11150
11151             Returns:
11152                 New GEOM.GEOM_Object, containing the found edge.
11153             """
11154             # Example: see GEOM_Spanner.py
11155             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11156             RaiseIfFailed("GetEdge", self.BlocksOp)
11157             self._autoPublish(anObj, theName, "edge")
11158             return anObj
11159
11160         ## Find an edge of the given shape, which has minimal distance to the given point.
11161         #  @param theShape Block or a compound of blocks.
11162         #  @param thePoint Point, close to the desired edge.
11163         #  @param theName Object name; when specified, this parameter is used
11164         #         for result publication in the study. Otherwise, if automatic
11165         #         publication is switched on, default value is used for result name.
11166         #
11167         #  @return New GEOM.GEOM_Object, containing the found edge.
11168         #
11169         #  @ref swig_GetEdgeNearPoint "Example"
11170         @ManageTransactions("BlocksOp")
11171         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11172             """
11173             Find an edge of the given shape, which has minimal distance to the given point.
11174
11175             Parameters:
11176                 theShape Block or a compound of blocks.
11177                 thePoint Point, close to the desired edge.
11178                 theName Object name; when specified, this parameter is used
11179                         for result publication in the study. Otherwise, if automatic
11180                         publication is switched on, default value is used for result name.
11181
11182             Returns:
11183                 New GEOM.GEOM_Object, containing the found edge.
11184             """
11185             # Example: see GEOM_TestOthers.py
11186             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11187             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11188             self._autoPublish(anObj, theName, "edge")
11189             return anObj
11190
11191         ## Returns a face, found in the given shape by four given corner vertices.
11192         #  @param theShape Block or a compound of blocks.
11193         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11194         #  @param theName Object name; when specified, this parameter is used
11195         #         for result publication in the study. Otherwise, if automatic
11196         #         publication is switched on, default value is used for result name.
11197         #
11198         #  @return New GEOM.GEOM_Object, containing the found face.
11199         #
11200         #  @ref swig_todo "Example"
11201         @ManageTransactions("BlocksOp")
11202         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11203             """
11204             Returns a face, found in the given shape by four given corner vertices.
11205
11206             Parameters:
11207                 theShape Block or a compound of blocks.
11208                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11209                 theName Object name; when specified, this parameter is used
11210                         for result publication in the study. Otherwise, if automatic
11211                         publication is switched on, default value is used for result name.
11212
11213             Returns:
11214                 New GEOM.GEOM_Object, containing the found face.
11215             """
11216             # Example: see GEOM_Spanner.py
11217             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11218             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11219             self._autoPublish(anObj, theName, "face")
11220             return anObj
11221
11222         ## Get a face of block, found in the given shape by two given edges.
11223         #  @param theShape Block or a compound of blocks.
11224         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11225         #  @param theName Object name; when specified, this parameter is used
11226         #         for result publication in the study. Otherwise, if automatic
11227         #         publication is switched on, default value is used for result name.
11228         #
11229         #  @return New GEOM.GEOM_Object, containing the found face.
11230         #
11231         #  @ref swig_todo "Example"
11232         @ManageTransactions("BlocksOp")
11233         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11234             """
11235             Get a face of block, found in the given shape by two given edges.
11236
11237             Parameters:
11238                 theShape Block or a compound of blocks.
11239                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11240                 theName Object name; when specified, this parameter is used
11241                         for result publication in the study. Otherwise, if automatic
11242                         publication is switched on, default value is used for result name.
11243
11244             Returns:
11245                 New GEOM.GEOM_Object, containing the found face.
11246             """
11247             # Example: see GEOM_Spanner.py
11248             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11249             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11250             self._autoPublish(anObj, theName, "face")
11251             return anObj
11252
11253         ## Find a face, opposite to the given one in the given block.
11254         #  @param theBlock Must be a hexahedral solid.
11255         #  @param theFace Face of \a theBlock, opposite to the desired face.
11256         #  @param theName Object name; when specified, this parameter is used
11257         #         for result publication in the study. Otherwise, if automatic
11258         #         publication is switched on, default value is used for result name.
11259         #
11260         #  @return New GEOM.GEOM_Object, containing the found face.
11261         #
11262         #  @ref swig_GetOppositeFace "Example"
11263         @ManageTransactions("BlocksOp")
11264         def GetOppositeFace(self, theBlock, theFace, theName=None):
11265             """
11266             Find a face, opposite to the given one in the given block.
11267
11268             Parameters:
11269                 theBlock Must be a hexahedral solid.
11270                 theFace Face of theBlock, opposite to the desired face.
11271                 theName Object name; when specified, this parameter is used
11272                         for result publication in the study. Otherwise, if automatic
11273                         publication is switched on, default value is used for result name.
11274
11275             Returns:
11276                 New GEOM.GEOM_Object, containing the found face.
11277             """
11278             # Example: see GEOM_Spanner.py
11279             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11280             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11281             self._autoPublish(anObj, theName, "face")
11282             return anObj
11283
11284         ## Find a face of the given shape, which has minimal distance to the given point.
11285         #  @param theShape Block or a compound of blocks.
11286         #  @param thePoint Point, close to the desired face.
11287         #  @param theName Object name; when specified, this parameter is used
11288         #         for result publication in the study. Otherwise, if automatic
11289         #         publication is switched on, default value is used for result name.
11290         #
11291         #  @return New GEOM.GEOM_Object, containing the found face.
11292         #
11293         #  @ref swig_GetFaceNearPoint "Example"
11294         @ManageTransactions("BlocksOp")
11295         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11296             """
11297             Find a face of the given shape, which has minimal distance to the given point.
11298
11299             Parameters:
11300                 theShape Block or a compound of blocks.
11301                 thePoint Point, close to the desired face.
11302                 theName Object name; when specified, this parameter is used
11303                         for result publication in the study. Otherwise, if automatic
11304                         publication is switched on, default value is used for result name.
11305
11306             Returns:
11307                 New GEOM.GEOM_Object, containing the found face.
11308             """
11309             # Example: see GEOM_Spanner.py
11310             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11311             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11312             self._autoPublish(anObj, theName, "face")
11313             return anObj
11314
11315         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11316         #  @param theBlock Block or a compound of blocks.
11317         #  @param theVector Vector, close to the normale of the desired face.
11318         #  @param theName Object name; when specified, this parameter is used
11319         #         for result publication in the study. Otherwise, if automatic
11320         #         publication is switched on, default value is used for result name.
11321         #
11322         #  @return New GEOM.GEOM_Object, containing the found face.
11323         #
11324         #  @ref swig_todo "Example"
11325         @ManageTransactions("BlocksOp")
11326         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11327             """
11328             Find a face of block, whose outside normale has minimal angle with the given vector.
11329
11330             Parameters:
11331                 theBlock Block or a compound of blocks.
11332                 theVector Vector, close to the normale of the desired face.
11333                 theName Object name; when specified, this parameter is used
11334                         for result publication in the study. Otherwise, if automatic
11335                         publication is switched on, default value is used for result name.
11336
11337             Returns:
11338                 New GEOM.GEOM_Object, containing the found face.
11339             """
11340             # Example: see GEOM_Spanner.py
11341             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11342             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11343             self._autoPublish(anObj, theName, "face")
11344             return anObj
11345
11346         ## Find all sub-shapes of type \a theShapeType of the given shape,
11347         #  which have minimal distance to the given point.
11348         #  @param theShape Any shape.
11349         #  @param thePoint Point, close to the desired shape.
11350         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11351         #  @param theTolerance The tolerance for distances comparison. All shapes
11352         #                      with distances to the given point in interval
11353         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11354         #  @param theName Object name; when specified, this parameter is used
11355         #         for result publication in the study. Otherwise, if automatic
11356         #         publication is switched on, default value is used for result name.
11357         #
11358         #  @return New GEOM_Object, containing a group of all found shapes.
11359         #
11360         #  @ref swig_GetShapesNearPoint "Example"
11361         @ManageTransactions("BlocksOp")
11362         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11363             """
11364             Find all sub-shapes of type theShapeType of the given shape,
11365             which have minimal distance to the given point.
11366
11367             Parameters:
11368                 theShape Any shape.
11369                 thePoint Point, close to the desired shape.
11370                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11371                 theTolerance The tolerance for distances comparison. All shapes
11372                                 with distances to the given point in interval
11373                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11374                 theName Object name; when specified, this parameter is used
11375                         for result publication in the study. Otherwise, if automatic
11376                         publication is switched on, default value is used for result name.
11377
11378             Returns:
11379                 New GEOM_Object, containing a group of all found shapes.
11380             """
11381             # Example: see GEOM_TestOthers.py
11382             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11383             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11384             self._autoPublish(anObj, theName, "group")
11385             return anObj
11386
11387         # end of l3_blocks_op
11388         ## @}
11389
11390         ## @addtogroup l4_blocks_measure
11391         ## @{
11392
11393         ## Check, if the compound of blocks is given.
11394         #  To be considered as a compound of blocks, the
11395         #  given shape must satisfy the following conditions:
11396         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11397         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11398         #  - The compound should be connexe.
11399         #  - The glue between two quadrangle faces should be applied.
11400         #  @param theCompound The compound to check.
11401         #  @return TRUE, if the given shape is a compound of blocks.
11402         #  If theCompound is not valid, prints all discovered errors.
11403         #
11404         #  @ref tui_measurement_tools_page "Example 1"
11405         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11406         @ManageTransactions("BlocksOp")
11407         def CheckCompoundOfBlocks(self,theCompound):
11408             """
11409             Check, if the compound of blocks is given.
11410             To be considered as a compound of blocks, the
11411             given shape must satisfy the following conditions:
11412             - Each element of the compound should be a Block (6 faces and 12 edges).
11413             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11414             - The compound should be connexe.
11415             - The glue between two quadrangle faces should be applied.
11416
11417             Parameters:
11418                 theCompound The compound to check.
11419
11420             Returns:
11421                 TRUE, if the given shape is a compound of blocks.
11422                 If theCompound is not valid, prints all discovered errors.
11423             """
11424             # Example: see GEOM_Spanner.py
11425             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11426             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11427             if IsValid == 0:
11428                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11429                 print Descr
11430             return IsValid
11431
11432         ## Retrieve all non blocks solids and faces from \a theShape.
11433         #  @param theShape The shape to explore.
11434         #  @param theName Object name; when specified, this parameter is used
11435         #         for result publication in the study. Otherwise, if automatic
11436         #         publication is switched on, default value is used for result name.
11437         #
11438         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11439         #          non block solids (= not 6 faces, or with 6 faces, but with the
11440         #          presence of non-quadrangular faces). The second object is a
11441         #          group of all non quadrangular faces.
11442         #
11443         #  @ref tui_measurement_tools_page "Example 1"
11444         #  \n @ref swig_GetNonBlocks "Example 2"
11445         @ManageTransactions("BlocksOp")
11446         def GetNonBlocks (self, theShape, theName=None):
11447             """
11448             Retrieve all non blocks solids and faces from theShape.
11449
11450             Parameters:
11451                 theShape The shape to explore.
11452                 theName Object name; when specified, this parameter is used
11453                         for result publication in the study. Otherwise, if automatic
11454                         publication is switched on, default value is used for result name.
11455
11456             Returns:
11457                 A tuple of two GEOM_Objects. The first object is a group of all
11458                 non block solids (= not 6 faces, or with 6 faces, but with the
11459                 presence of non-quadrangular faces). The second object is a
11460                 group of all non quadrangular faces.
11461
11462             Usage:
11463                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11464             """
11465             # Example: see GEOM_Spanner.py
11466             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11467             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11468             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11469             return aTuple
11470
11471         ## Remove all seam and degenerated edges from \a theShape.
11472         #  Unite faces and edges, sharing one surface. It means that
11473         #  this faces must have references to one C++ surface object (handle).
11474         #  @param theShape The compound or single solid to remove irregular edges from.
11475         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11476         #         do not unite faces.
11477         #  @param theName Object name; when specified, this parameter is used
11478         #         for result publication in the study. Otherwise, if automatic
11479         #         publication is switched on, default value is used for result name.
11480         #
11481         #  @return Improved shape.
11482         #
11483         #  @ref swig_RemoveExtraEdges "Example"
11484         @ManageTransactions("BlocksOp")
11485         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11486             """
11487             Remove all seam and degenerated edges from theShape.
11488             Unite faces and edges, sharing one surface. It means that
11489             this faces must have references to one C++ surface object (handle).
11490
11491             Parameters:
11492                 theShape The compound or single solid to remove irregular edges from.
11493                 doUnionFaces If True, then unite faces. If False (the default value),
11494                              do not unite faces.
11495                 theName Object name; when specified, this parameter is used
11496                         for result publication in the study. Otherwise, if automatic
11497                         publication is switched on, default value is used for result name.
11498
11499             Returns:
11500                 Improved shape.
11501             """
11502             # Example: see GEOM_TestOthers.py
11503             nbFacesOptimum = -1 # -1 means do not unite faces
11504             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11505             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11506             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11507             self._autoPublish(anObj, theName, "removeExtraEdges")
11508             return anObj
11509
11510         ## Performs union faces of \a theShape
11511         #  Unite faces sharing one surface. It means that
11512         #  these faces must have references to one C++ surface object (handle).
11513         #  @param theShape The compound or single solid that contains faces
11514         #         to perform union.
11515         #  @param theName Object name; when specified, this parameter is used
11516         #         for result publication in the study. Otherwise, if automatic
11517         #         publication is switched on, default value is used for result name.
11518         #
11519         #  @return Improved shape.
11520         #
11521         #  @ref swig_UnionFaces "Example"
11522         @ManageTransactions("BlocksOp")
11523         def UnionFaces(self, theShape, theName=None):
11524             """
11525             Performs union faces of theShape.
11526             Unite faces sharing one surface. It means that
11527             these faces must have references to one C++ surface object (handle).
11528
11529             Parameters:
11530                 theShape The compound or single solid that contains faces
11531                          to perform union.
11532                 theName Object name; when specified, this parameter is used
11533                         for result publication in the study. Otherwise, if automatic
11534                         publication is switched on, default value is used for result name.
11535
11536             Returns:
11537                 Improved shape.
11538             """
11539             # Example: see GEOM_TestOthers.py
11540             anObj = self.BlocksOp.UnionFaces(theShape)
11541             RaiseIfFailed("UnionFaces", self.BlocksOp)
11542             self._autoPublish(anObj, theName, "unionFaces")
11543             return anObj
11544
11545         ## Check, if the given shape is a blocks compound.
11546         #  Fix all detected errors.
11547         #    \note Single block can be also fixed by this method.
11548         #  @param theShape The compound to check and improve.
11549         #  @param theName Object name; when specified, this parameter is used
11550         #         for result publication in the study. Otherwise, if automatic
11551         #         publication is switched on, default value is used for result name.
11552         #
11553         #  @return Improved compound.
11554         #
11555         #  @ref swig_CheckAndImprove "Example"
11556         @ManageTransactions("BlocksOp")
11557         def CheckAndImprove(self, theShape, theName=None):
11558             """
11559             Check, if the given shape is a blocks compound.
11560             Fix all detected errors.
11561
11562             Note:
11563                 Single block can be also fixed by this method.
11564
11565             Parameters:
11566                 theShape The compound to check and improve.
11567                 theName Object name; when specified, this parameter is used
11568                         for result publication in the study. Otherwise, if automatic
11569                         publication is switched on, default value is used for result name.
11570
11571             Returns:
11572                 Improved compound.
11573             """
11574             # Example: see GEOM_TestOthers.py
11575             anObj = self.BlocksOp.CheckAndImprove(theShape)
11576             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11577             self._autoPublish(anObj, theName, "improved")
11578             return anObj
11579
11580         # end of l4_blocks_measure
11581         ## @}
11582
11583         ## @addtogroup l3_blocks_op
11584         ## @{
11585
11586         ## Get all the blocks, contained in the given compound.
11587         #  @param theCompound The compound to explode.
11588         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11589         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11590         #  @param theName Object name; when specified, this parameter is used
11591         #         for result publication in the study. Otherwise, if automatic
11592         #         publication is switched on, default value is used for result name.
11593         #
11594         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11595         #
11596         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11597         #
11598         #  @ref tui_explode_on_blocks "Example 1"
11599         #  \n @ref swig_MakeBlockExplode "Example 2"
11600         @ManageTransactions("BlocksOp")
11601         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11602             """
11603             Get all the blocks, contained in the given compound.
11604
11605             Parameters:
11606                 theCompound The compound to explode.
11607                 theMinNbFaces If solid has lower number of faces, it is not a block.
11608                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11609                 theName Object name; when specified, this parameter is used
11610                         for result publication in the study. Otherwise, if automatic
11611                         publication is switched on, default value is used for result name.
11612
11613             Note:
11614                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11615
11616             Returns:
11617                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11618             """
11619             # Example: see GEOM_TestOthers.py
11620             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11621             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11622             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11623             for anObj in aList:
11624                 anObj.SetParameters(Parameters)
11625                 pass
11626             self._autoPublish(aList, theName, "block")
11627             return aList
11628
11629         ## Find block, containing the given point inside its volume or on boundary.
11630         #  @param theCompound Compound, to find block in.
11631         #  @param thePoint Point, close to the desired block. If the point lays on
11632         #         boundary between some blocks, we return block with nearest center.
11633         #  @param theName Object name; when specified, this parameter is used
11634         #         for result publication in the study. Otherwise, if automatic
11635         #         publication is switched on, default value is used for result name.
11636         #
11637         #  @return New GEOM.GEOM_Object, containing the found block.
11638         #
11639         #  @ref swig_todo "Example"
11640         @ManageTransactions("BlocksOp")
11641         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11642             """
11643             Find block, containing the given point inside its volume or on boundary.
11644
11645             Parameters:
11646                 theCompound Compound, to find block in.
11647                 thePoint Point, close to the desired block. If the point lays on
11648                          boundary between some blocks, we return block with nearest center.
11649                 theName Object name; when specified, this parameter is used
11650                         for result publication in the study. Otherwise, if automatic
11651                         publication is switched on, default value is used for result name.
11652
11653             Returns:
11654                 New GEOM.GEOM_Object, containing the found block.
11655             """
11656             # Example: see GEOM_Spanner.py
11657             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11658             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11659             self._autoPublish(anObj, theName, "block")
11660             return anObj
11661
11662         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11663         #  @param theCompound Compound, to find block in.
11664         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11665         #  @param theName Object name; when specified, this parameter is used
11666         #         for result publication in the study. Otherwise, if automatic
11667         #         publication is switched on, default value is used for result name.
11668         #
11669         #  @return New GEOM.GEOM_Object, containing the found block.
11670         #
11671         #  @ref swig_GetBlockByParts "Example"
11672         @ManageTransactions("BlocksOp")
11673         def GetBlockByParts(self, theCompound, theParts, theName=None):
11674             """
11675              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11676
11677              Parameters:
11678                 theCompound Compound, to find block in.
11679                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11680                 theName Object name; when specified, this parameter is used
11681                         for result publication in the study. Otherwise, if automatic
11682                         publication is switched on, default value is used for result name.
11683
11684             Returns:
11685                 New GEOM_Object, containing the found block.
11686             """
11687             # Example: see GEOM_TestOthers.py
11688             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11689             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11690             self._autoPublish(anObj, theName, "block")
11691             return anObj
11692
11693         ## Return all blocks, containing all the elements, passed as the parts.
11694         #  @param theCompound Compound, to find blocks in.
11695         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11696         #  @param theName Object name; when specified, this parameter is used
11697         #         for result publication in the study. Otherwise, if automatic
11698         #         publication is switched on, default value is used for result name.
11699         #
11700         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11701         #
11702         #  @ref swig_todo "Example"
11703         @ManageTransactions("BlocksOp")
11704         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11705             """
11706             Return all blocks, containing all the elements, passed as the parts.
11707
11708             Parameters:
11709                 theCompound Compound, to find blocks in.
11710                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11711                 theName Object name; when specified, this parameter is used
11712                         for result publication in the study. Otherwise, if automatic
11713                         publication is switched on, default value is used for result name.
11714
11715             Returns:
11716                 List of GEOM.GEOM_Object, containing the found blocks.
11717             """
11718             # Example: see GEOM_Spanner.py
11719             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11720             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11721             self._autoPublish(aList, theName, "block")
11722             return aList
11723
11724         ## Multi-transformate block and glue the result.
11725         #  Transformation is defined so, as to superpose direction faces.
11726         #  @param Block Hexahedral solid to be multi-transformed.
11727         #  @param DirFace1 ID of First direction face.
11728         #  @param DirFace2 ID of Second direction face.
11729         #  @param NbTimes Quantity of transformations to be done.
11730         #  @param theName Object name; when specified, this parameter is used
11731         #         for result publication in the study. Otherwise, if automatic
11732         #         publication is switched on, default value is used for result name.
11733         #
11734         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11735         #
11736         #  @return New GEOM.GEOM_Object, containing the result shape.
11737         #
11738         #  @ref tui_multi_transformation "Example"
11739         @ManageTransactions("BlocksOp")
11740         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11741             """
11742             Multi-transformate block and glue the result.
11743             Transformation is defined so, as to superpose direction faces.
11744
11745             Parameters:
11746                 Block Hexahedral solid to be multi-transformed.
11747                 DirFace1 ID of First direction face.
11748                 DirFace2 ID of Second direction face.
11749                 NbTimes Quantity of transformations to be done.
11750                 theName Object name; when specified, this parameter is used
11751                         for result publication in the study. Otherwise, if automatic
11752                         publication is switched on, default value is used for result name.
11753
11754             Note:
11755                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11756
11757             Returns:
11758                 New GEOM.GEOM_Object, containing the result shape.
11759             """
11760             # Example: see GEOM_Spanner.py
11761             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11762             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11763             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11764             anObj.SetParameters(Parameters)
11765             self._autoPublish(anObj, theName, "transformed")
11766             return anObj
11767
11768         ## Multi-transformate block and glue the result.
11769         #  @param Block Hexahedral solid to be multi-transformed.
11770         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11771         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11772         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11773         #  @param theName Object name; when specified, this parameter is used
11774         #         for result publication in the study. Otherwise, if automatic
11775         #         publication is switched on, default value is used for result name.
11776         #
11777         #  @return New GEOM.GEOM_Object, containing the result shape.
11778         #
11779         #  @ref tui_multi_transformation "Example"
11780         @ManageTransactions("BlocksOp")
11781         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11782                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11783             """
11784             Multi-transformate block and glue the result.
11785
11786             Parameters:
11787                 Block Hexahedral solid to be multi-transformed.
11788                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11789                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11790                 NbTimesU,NbTimesV Quantity of transformations to be done.
11791                 theName Object name; when specified, this parameter is used
11792                         for result publication in the study. Otherwise, if automatic
11793                         publication is switched on, default value is used for result name.
11794
11795             Returns:
11796                 New GEOM.GEOM_Object, containing the result shape.
11797             """
11798             # Example: see GEOM_Spanner.py
11799             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11800               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11801             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11802                                                             DirFace1V, DirFace2V, NbTimesV)
11803             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11804             anObj.SetParameters(Parameters)
11805             self._autoPublish(anObj, theName, "transformed")
11806             return anObj
11807
11808         ## Build all possible propagation groups.
11809         #  Propagation group is a set of all edges, opposite to one (main)
11810         #  edge of this group directly or through other opposite edges.
11811         #  Notion of Opposite Edge make sence only on quadrangle face.
11812         #  @param theShape Shape to build propagation groups on.
11813         #  @param theName Object name; when specified, this parameter is used
11814         #         for result publication in the study. Otherwise, if automatic
11815         #         publication is switched on, default value is used for result name.
11816         #
11817         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11818         #
11819         #  @ref swig_Propagate "Example"
11820         @ManageTransactions("BlocksOp")
11821         def Propagate(self, theShape, theName=None):
11822             """
11823             Build all possible propagation groups.
11824             Propagation group is a set of all edges, opposite to one (main)
11825             edge of this group directly or through other opposite edges.
11826             Notion of Opposite Edge make sence only on quadrangle face.
11827
11828             Parameters:
11829                 theShape Shape to build propagation groups on.
11830                 theName Object name; when specified, this parameter is used
11831                         for result publication in the study. Otherwise, if automatic
11832                         publication is switched on, default value is used for result name.
11833
11834             Returns:
11835                 List of GEOM.GEOM_Object, each of them is a propagation group.
11836             """
11837             # Example: see GEOM_TestOthers.py
11838             listChains = self.BlocksOp.Propagate(theShape)
11839             RaiseIfFailed("Propagate", self.BlocksOp)
11840             self._autoPublish(listChains, theName, "propagate")
11841             return listChains
11842
11843         # end of l3_blocks_op
11844         ## @}
11845
11846         ## @addtogroup l3_groups
11847         ## @{
11848
11849         ## Creates a new group which will store sub-shapes of theMainShape
11850         #  @param theMainShape is a GEOM object on which the group is selected
11851         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11852         #  @param theName Object name; when specified, this parameter is used
11853         #         for result publication in the study. Otherwise, if automatic
11854         #         publication is switched on, default value is used for result name.
11855         #
11856         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11857         #
11858         #  @ref tui_working_with_groups_page "Example 1"
11859         #  \n @ref swig_CreateGroup "Example 2"
11860         @ManageTransactions("GroupOp")
11861         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11862             """
11863             Creates a new group which will store sub-shapes of theMainShape
11864
11865             Parameters:
11866                theMainShape is a GEOM object on which the group is selected
11867                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11868                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11869                 theName Object name; when specified, this parameter is used
11870                         for result publication in the study. Otherwise, if automatic
11871                         publication is switched on, default value is used for result name.
11872
11873             Returns:
11874                a newly created GEOM group
11875
11876             Example of usage:
11877                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11878
11879             """
11880             # Example: see GEOM_TestOthers.py
11881             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11882             RaiseIfFailed("CreateGroup", self.GroupOp)
11883             self._autoPublish(anObj, theName, "group")
11884             return anObj
11885
11886         ## Adds a sub-object with ID theSubShapeId to the group
11887         #  @param theGroup is a GEOM group to which the new sub-shape is added
11888         #  @param theSubShapeID is a sub-shape ID in the main object.
11889         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11890         #
11891         #  @ref tui_working_with_groups_page "Example"
11892         @ManageTransactions("GroupOp")
11893         def AddObject(self,theGroup, theSubShapeID):
11894             """
11895             Adds a sub-object with ID theSubShapeId to the group
11896
11897             Parameters:
11898                 theGroup       is a GEOM group to which the new sub-shape is added
11899                 theSubShapeID  is a sub-shape ID in the main object.
11900
11901             Note:
11902                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11903             """
11904             # Example: see GEOM_TestOthers.py
11905             self.GroupOp.AddObject(theGroup, theSubShapeID)
11906             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11907                 RaiseIfFailed("AddObject", self.GroupOp)
11908                 pass
11909             pass
11910
11911         ## Removes a sub-object with ID \a theSubShapeId from the group
11912         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11913         #  @param theSubShapeID is a sub-shape ID in the main object.
11914         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11915         #
11916         #  @ref tui_working_with_groups_page "Example"
11917         @ManageTransactions("GroupOp")
11918         def RemoveObject(self,theGroup, theSubShapeID):
11919             """
11920             Removes a sub-object with ID theSubShapeId from the group
11921
11922             Parameters:
11923                 theGroup is a GEOM group from which the new sub-shape is removed
11924                 theSubShapeID is a sub-shape ID in the main object.
11925
11926             Note:
11927                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11928             """
11929             # Example: see GEOM_TestOthers.py
11930             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11931             RaiseIfFailed("RemoveObject", self.GroupOp)
11932             pass
11933
11934         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11935         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11936         #  @param theSubShapes is a list of sub-shapes to be added.
11937         #
11938         #  @ref tui_working_with_groups_page "Example"
11939         @ManageTransactions("GroupOp")
11940         def UnionList (self,theGroup, theSubShapes):
11941             """
11942             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11943
11944             Parameters:
11945                 theGroup is a GEOM group to which the new sub-shapes are added.
11946                 theSubShapes is a list of sub-shapes to be added.
11947             """
11948             # Example: see GEOM_TestOthers.py
11949             self.GroupOp.UnionList(theGroup, theSubShapes)
11950             RaiseIfFailed("UnionList", self.GroupOp)
11951             pass
11952
11953         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11954         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11955         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11956         #
11957         #  @ref swig_UnionIDs "Example"
11958         @ManageTransactions("GroupOp")
11959         def UnionIDs(self,theGroup, theSubShapes):
11960             """
11961             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11962
11963             Parameters:
11964                 theGroup is a GEOM group to which the new sub-shapes are added.
11965                 theSubShapes is a list of indices of sub-shapes to be added.
11966             """
11967             # Example: see GEOM_TestOthers.py
11968             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11969             RaiseIfFailed("UnionIDs", self.GroupOp)
11970             pass
11971
11972         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11973         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11974         #  @param theSubShapes is a list of sub-shapes to be removed.
11975         #
11976         #  @ref tui_working_with_groups_page "Example"
11977         @ManageTransactions("GroupOp")
11978         def DifferenceList (self,theGroup, theSubShapes):
11979             """
11980             Removes from the group all the given shapes. No errors, if some shapes are not included.
11981
11982             Parameters:
11983                 theGroup is a GEOM group from which the sub-shapes are removed.
11984                 theSubShapes is a list of sub-shapes to be removed.
11985             """
11986             # Example: see GEOM_TestOthers.py
11987             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11988             RaiseIfFailed("DifferenceList", self.GroupOp)
11989             pass
11990
11991         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11992         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11993         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11994         #
11995         #  @ref swig_DifferenceIDs "Example"
11996         @ManageTransactions("GroupOp")
11997         def DifferenceIDs(self,theGroup, theSubShapes):
11998             """
11999             Removes from the group all the given shapes. No errors, if some shapes are not included.
12000
12001             Parameters:
12002                 theGroup is a GEOM group from which the sub-shapes are removed.
12003                 theSubShapes is a list of indices of sub-shapes to be removed.
12004             """
12005             # Example: see GEOM_TestOthers.py
12006             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12007             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12008             pass
12009
12010         ## Union of two groups.
12011         #  New group is created. It will contain all entities
12012         #  which are present in groups theGroup1 and theGroup2.
12013         #  @param theGroup1, theGroup2 are the initial GEOM groups
12014         #                              to create the united group from.
12015         #  @param theName Object name; when specified, this parameter is used
12016         #         for result publication in the study. Otherwise, if automatic
12017         #         publication is switched on, default value is used for result name.
12018         #
12019         #  @return a newly created GEOM group.
12020         #
12021         #  @ref tui_union_groups_anchor "Example"
12022         @ManageTransactions("GroupOp")
12023         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12024             """
12025             Union of two groups.
12026             New group is created. It will contain all entities
12027             which are present in groups theGroup1 and theGroup2.
12028
12029             Parameters:
12030                 theGroup1, theGroup2 are the initial GEOM groups
12031                                      to create the united group from.
12032                 theName Object name; when specified, this parameter is used
12033                         for result publication in the study. Otherwise, if automatic
12034                         publication is switched on, default value is used for result name.
12035
12036             Returns:
12037                 a newly created GEOM group.
12038             """
12039             # Example: see GEOM_TestOthers.py
12040             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12041             RaiseIfFailed("UnionGroups", self.GroupOp)
12042             self._autoPublish(aGroup, theName, "group")
12043             return aGroup
12044
12045         ## Intersection of two groups.
12046         #  New group is created. It will contain only those entities
12047         #  which are present in both groups theGroup1 and theGroup2.
12048         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12049         #  @param theName Object name; when specified, this parameter is used
12050         #         for result publication in the study. Otherwise, if automatic
12051         #         publication is switched on, default value is used for result name.
12052         #
12053         #  @return a newly created GEOM group.
12054         #
12055         #  @ref tui_intersect_groups_anchor "Example"
12056         @ManageTransactions("GroupOp")
12057         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12058             """
12059             Intersection of two groups.
12060             New group is created. It will contain only those entities
12061             which are present in both groups theGroup1 and theGroup2.
12062
12063             Parameters:
12064                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12065                 theName Object name; when specified, this parameter is used
12066                         for result publication in the study. Otherwise, if automatic
12067                         publication is switched on, default value is used for result name.
12068
12069             Returns:
12070                 a newly created GEOM group.
12071             """
12072             # Example: see GEOM_TestOthers.py
12073             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12074             RaiseIfFailed("IntersectGroups", self.GroupOp)
12075             self._autoPublish(aGroup, theName, "group")
12076             return aGroup
12077
12078         ## Cut of two groups.
12079         #  New group is created. It will contain entities which are
12080         #  present in group theGroup1 but are not present in group theGroup2.
12081         #  @param theGroup1 is a GEOM group to include elements of.
12082         #  @param theGroup2 is a GEOM group to exclude elements of.
12083         #  @param theName Object name; when specified, this parameter is used
12084         #         for result publication in the study. Otherwise, if automatic
12085         #         publication is switched on, default value is used for result name.
12086         #
12087         #  @return a newly created GEOM group.
12088         #
12089         #  @ref tui_cut_groups_anchor "Example"
12090         @ManageTransactions("GroupOp")
12091         def CutGroups (self, theGroup1, theGroup2, theName=None):
12092             """
12093             Cut of two groups.
12094             New group is created. It will contain entities which are
12095             present in group theGroup1 but are not present in group theGroup2.
12096
12097             Parameters:
12098                 theGroup1 is a GEOM group to include elements of.
12099                 theGroup2 is a GEOM group to exclude elements of.
12100                 theName Object name; when specified, this parameter is used
12101                         for result publication in the study. Otherwise, if automatic
12102                         publication is switched on, default value is used for result name.
12103
12104             Returns:
12105                 a newly created GEOM group.
12106             """
12107             # Example: see GEOM_TestOthers.py
12108             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12109             RaiseIfFailed("CutGroups", self.GroupOp)
12110             self._autoPublish(aGroup, theName, "group")
12111             return aGroup
12112
12113         ## Union of list of groups.
12114         #  New group is created. It will contain all entities that are
12115         #  present in groups listed in theGList.
12116         #  @param theGList is a list of GEOM groups to create the united group from.
12117         #  @param theName Object name; when specified, this parameter is used
12118         #         for result publication in the study. Otherwise, if automatic
12119         #         publication is switched on, default value is used for result name.
12120         #
12121         #  @return a newly created GEOM group.
12122         #
12123         #  @ref tui_union_groups_anchor "Example"
12124         @ManageTransactions("GroupOp")
12125         def UnionListOfGroups (self, theGList, theName=None):
12126             """
12127             Union of list of groups.
12128             New group is created. It will contain all entities that are
12129             present in groups listed in theGList.
12130
12131             Parameters:
12132                 theGList is a list of GEOM groups to create the united group from.
12133                 theName Object name; when specified, this parameter is used
12134                         for result publication in the study. Otherwise, if automatic
12135                         publication is switched on, default value is used for result name.
12136
12137             Returns:
12138                 a newly created GEOM group.
12139             """
12140             # Example: see GEOM_TestOthers.py
12141             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12142             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12143             self._autoPublish(aGroup, theName, "group")
12144             return aGroup
12145
12146         ## Cut of lists of groups.
12147         #  New group is created. It will contain only entities
12148         #  which are present in groups listed in theGList.
12149         #  @param theGList is a list of GEOM groups to include elements of.
12150         #  @param theName Object name; when specified, this parameter is used
12151         #         for result publication in the study. Otherwise, if automatic
12152         #         publication is switched on, default value is used for result name.
12153         #
12154         #  @return a newly created GEOM group.
12155         #
12156         #  @ref tui_intersect_groups_anchor "Example"
12157         @ManageTransactions("GroupOp")
12158         def IntersectListOfGroups (self, theGList, theName=None):
12159             """
12160             Cut of lists of groups.
12161             New group is created. It will contain only entities
12162             which are present in groups listed in theGList.
12163
12164             Parameters:
12165                 theGList is a list of GEOM groups to include elements of.
12166                 theName Object name; when specified, this parameter is used
12167                         for result publication in the study. Otherwise, if automatic
12168                         publication is switched on, default value is used for result name.
12169
12170             Returns:
12171                 a newly created GEOM group.
12172             """
12173             # Example: see GEOM_TestOthers.py
12174             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12175             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12176             self._autoPublish(aGroup, theName, "group")
12177             return aGroup
12178
12179         ## Cut of lists of groups.
12180         #  New group is created. It will contain only entities
12181         #  which are present in groups listed in theGList1 but
12182         #  are not present in groups from theGList2.
12183         #  @param theGList1 is a list of GEOM groups to include elements of.
12184         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12185         #  @param theName Object name; when specified, this parameter is used
12186         #         for result publication in the study. Otherwise, if automatic
12187         #         publication is switched on, default value is used for result name.
12188         #
12189         #  @return a newly created GEOM group.
12190         #
12191         #  @ref tui_cut_groups_anchor "Example"
12192         @ManageTransactions("GroupOp")
12193         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12194             """
12195             Cut of lists of groups.
12196             New group is created. It will contain only entities
12197             which are present in groups listed in theGList1 but
12198             are not present in groups from theGList2.
12199
12200             Parameters:
12201                 theGList1 is a list of GEOM groups to include elements of.
12202                 theGList2 is a list of GEOM groups to exclude elements of.
12203                 theName Object name; when specified, this parameter is used
12204                         for result publication in the study. Otherwise, if automatic
12205                         publication is switched on, default value is used for result name.
12206
12207             Returns:
12208                 a newly created GEOM group.
12209             """
12210             # Example: see GEOM_TestOthers.py
12211             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12212             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12213             self._autoPublish(aGroup, theName, "group")
12214             return aGroup
12215
12216         ## Returns a list of sub-objects ID stored in the group
12217         #  @param theGroup is a GEOM group for which a list of IDs is requested
12218         #
12219         #  @ref swig_GetObjectIDs "Example"
12220         @ManageTransactions("GroupOp")
12221         def GetObjectIDs(self,theGroup):
12222             """
12223             Returns a list of sub-objects ID stored in the group
12224
12225             Parameters:
12226                 theGroup is a GEOM group for which a list of IDs is requested
12227             """
12228             # Example: see GEOM_TestOthers.py
12229             ListIDs = self.GroupOp.GetObjects(theGroup)
12230             RaiseIfFailed("GetObjects", self.GroupOp)
12231             return ListIDs
12232
12233         ## Returns a type of sub-objects stored in the group
12234         #  @param theGroup is a GEOM group which type is returned.
12235         #
12236         #  @ref swig_GetType "Example"
12237         @ManageTransactions("GroupOp")
12238         def GetType(self,theGroup):
12239             """
12240             Returns a type of sub-objects stored in the group
12241
12242             Parameters:
12243                 theGroup is a GEOM group which type is returned.
12244             """
12245             # Example: see GEOM_TestOthers.py
12246             aType = self.GroupOp.GetType(theGroup)
12247             RaiseIfFailed("GetType", self.GroupOp)
12248             return aType
12249
12250         ## Convert a type of geom object from id to string value
12251         #  @param theId is a GEOM obect type id.
12252         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12253         #  @ref swig_GetType "Example"
12254         def ShapeIdToType(self, theId):
12255             """
12256             Convert a type of geom object from id to string value
12257
12258             Parameters:
12259                 theId is a GEOM obect type id.
12260
12261             Returns:
12262                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12263             """
12264             if theId == 0:
12265                 return "COPY"
12266             if theId == 1:
12267                 return "IMPORT"
12268             if theId == 2:
12269                 return "POINT"
12270             if theId == 3:
12271                 return "VECTOR"
12272             if theId == 4:
12273                 return "PLANE"
12274             if theId == 5:
12275                 return "LINE"
12276             if theId == 6:
12277                 return "TORUS"
12278             if theId == 7:
12279                 return "BOX"
12280             if theId == 8:
12281                 return "CYLINDER"
12282             if theId == 9:
12283                 return "CONE"
12284             if theId == 10:
12285                 return "SPHERE"
12286             if theId == 11:
12287                 return "PRISM"
12288             if theId == 12:
12289                 return "REVOLUTION"
12290             if theId == 13:
12291                 return "BOOLEAN"
12292             if theId == 14:
12293                 return "PARTITION"
12294             if theId == 15:
12295                 return "POLYLINE"
12296             if theId == 16:
12297                 return "CIRCLE"
12298             if theId == 17:
12299                 return "SPLINE"
12300             if theId == 18:
12301                 return "ELLIPSE"
12302             if theId == 19:
12303                 return "CIRC_ARC"
12304             if theId == 20:
12305                 return "FILLET"
12306             if theId == 21:
12307                 return "CHAMFER"
12308             if theId == 22:
12309                 return "EDGE"
12310             if theId == 23:
12311                 return "WIRE"
12312             if theId == 24:
12313                 return "FACE"
12314             if theId == 25:
12315                 return "SHELL"
12316             if theId == 26:
12317                 return "SOLID"
12318             if theId == 27:
12319                 return "COMPOUND"
12320             if theId == 28:
12321                 return "SUBSHAPE"
12322             if theId == 29:
12323                 return "PIPE"
12324             if theId == 30:
12325                 return "ARCHIMEDE"
12326             if theId == 31:
12327                 return "FILLING"
12328             if theId == 32:
12329                 return "EXPLODE"
12330             if theId == 33:
12331                 return "GLUED"
12332             if theId == 34:
12333                 return "SKETCHER"
12334             if theId == 35:
12335                 return "CDG"
12336             if theId == 36:
12337                 return "FREE_BOUNDS"
12338             if theId == 37:
12339                 return "GROUP"
12340             if theId == 38:
12341                 return "BLOCK"
12342             if theId == 39:
12343                 return "MARKER"
12344             if theId == 40:
12345                 return "THRUSECTIONS"
12346             if theId == 41:
12347                 return "COMPOUNDFILTER"
12348             if theId == 42:
12349                 return "SHAPES_ON_SHAPE"
12350             if theId == 43:
12351                 return "ELLIPSE_ARC"
12352             if theId == 44:
12353                 return "3DSKETCHER"
12354             if theId == 45:
12355                 return "FILLET_2D"
12356             if theId == 46:
12357                 return "FILLET_1D"
12358             if theId == 201:
12359                 return "PIPETSHAPE"
12360             return "Shape Id not exist."
12361
12362         ## Returns a main shape associated with the group
12363         #  @param theGroup is a GEOM group for which a main shape object is requested
12364         #  @return a GEOM object which is a main shape for theGroup
12365         #
12366         #  @ref swig_GetMainShape "Example"
12367         @ManageTransactions("GroupOp")
12368         def GetMainShape(self,theGroup):
12369             """
12370             Returns a main shape associated with the group
12371
12372             Parameters:
12373                 theGroup is a GEOM group for which a main shape object is requested
12374
12375             Returns:
12376                 a GEOM object which is a main shape for theGroup
12377
12378             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12379             """
12380             # Example: see GEOM_TestOthers.py
12381             anObj = self.GroupOp.GetMainShape(theGroup)
12382             RaiseIfFailed("GetMainShape", self.GroupOp)
12383             return anObj
12384
12385         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12386         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12387         #  @param theShape given shape (see GEOM.GEOM_Object)
12388         #  @param min_length minimum length of edges of theShape
12389         #  @param max_length maximum length of edges of theShape
12390         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12391         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12392         #  @param theName Object name; when specified, this parameter is used
12393         #         for result publication in the study. Otherwise, if automatic
12394         #         publication is switched on, default value is used for result name.
12395         #
12396         #  @return a newly created GEOM group of edges
12397         #
12398         #  @@ref swig_todo "Example"
12399         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12400             """
12401             Create group of edges of theShape, whose length is in range [min_length, max_length].
12402             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12403
12404             Parameters:
12405                 theShape given shape
12406                 min_length minimum length of edges of theShape
12407                 max_length maximum length of edges of theShape
12408                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12409                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12410                 theName Object name; when specified, this parameter is used
12411                         for result publication in the study. Otherwise, if automatic
12412                         publication is switched on, default value is used for result name.
12413
12414              Returns:
12415                 a newly created GEOM group of edges.
12416             """
12417             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12418             edges_in_range = []
12419             for edge in edges:
12420                 Props = self.BasicProperties(edge)
12421                 if min_length <= Props[0] and Props[0] <= max_length:
12422                     if (not include_min) and (min_length == Props[0]):
12423                         skip = 1
12424                     else:
12425                         if (not include_max) and (Props[0] == max_length):
12426                             skip = 1
12427                         else:
12428                             edges_in_range.append(edge)
12429
12430             if len(edges_in_range) <= 0:
12431                 print "No edges found by given criteria"
12432                 return None
12433
12434             # note: auto-publishing is done in self.CreateGroup()
12435             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12436             self.UnionList(group_edges, edges_in_range)
12437
12438             return group_edges
12439
12440         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12441         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12442         #  @param min_length minimum length of edges of selected shape
12443         #  @param max_length maximum length of edges of selected shape
12444         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12445         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12446         #  @return a newly created GEOM group of edges
12447         #  @ref swig_todo "Example"
12448         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12449             """
12450             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12451             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12452
12453             Parameters:
12454                 min_length minimum length of edges of selected shape
12455                 max_length maximum length of edges of selected shape
12456                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12457                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12458
12459              Returns:
12460                 a newly created GEOM group of edges.
12461             """
12462             nb_selected = sg.SelectedCount()
12463             if nb_selected < 1:
12464                 print "Select a shape before calling this function, please."
12465                 return 0
12466             if nb_selected > 1:
12467                 print "Only one shape must be selected"
12468                 return 0
12469
12470             id_shape = sg.getSelected(0)
12471             shape = IDToObject( id_shape )
12472
12473             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12474
12475             left_str  = " < "
12476             right_str = " < "
12477             if include_min: left_str  = " <= "
12478             if include_max: right_str  = " <= "
12479
12480             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12481                                     + left_str + "length" + right_str + `max_length`)
12482
12483             sg.updateObjBrowser(1)
12484
12485             return group_edges
12486
12487         # end of l3_groups
12488         ## @}
12489
12490         #@@ insert new functions before this line @@ do not remove this line @@#
12491
12492         ## Create a copy of the given object
12493         #
12494         #  @param theOriginal geometry object for copy
12495         #  @param theName Object name; when specified, this parameter is used
12496         #         for result publication in the study. Otherwise, if automatic
12497         #         publication is switched on, default value is used for result name.
12498         #
12499         #  @return New GEOM_Object, containing the copied shape.
12500         #
12501         #  @ingroup l1_geomBuilder_auxiliary
12502         #  @ref swig_MakeCopy "Example"
12503         @ManageTransactions("InsertOp")
12504         def MakeCopy(self, theOriginal, theName=None):
12505             """
12506             Create a copy of the given object
12507
12508             Parameters:
12509                 theOriginal geometry object for copy
12510                 theName Object name; when specified, this parameter is used
12511                         for result publication in the study. Otherwise, if automatic
12512                         publication is switched on, default value is used for result name.
12513
12514             Returns:
12515                 New GEOM_Object, containing the copied shape.
12516
12517             Example of usage: Copy = geompy.MakeCopy(Box)
12518             """
12519             # Example: see GEOM_TestAll.py
12520             anObj = self.InsertOp.MakeCopy(theOriginal)
12521             RaiseIfFailed("MakeCopy", self.InsertOp)
12522             self._autoPublish(anObj, theName, "copy")
12523             return anObj
12524
12525         ## Add Path to load python scripts from
12526         #  @param Path a path to load python scripts from
12527         #  @ingroup l1_geomBuilder_auxiliary
12528         def addPath(self,Path):
12529             """
12530             Add Path to load python scripts from
12531
12532             Parameters:
12533                 Path a path to load python scripts from
12534             """
12535             if (sys.path.count(Path) < 1):
12536                 sys.path.append(Path)
12537                 pass
12538             pass
12539
12540         ## Load marker texture from the file
12541         #  @param Path a path to the texture file
12542         #  @return unique texture identifier
12543         #  @ingroup l1_geomBuilder_auxiliary
12544         @ManageTransactions("InsertOp")
12545         def LoadTexture(self, Path):
12546             """
12547             Load marker texture from the file
12548
12549             Parameters:
12550                 Path a path to the texture file
12551
12552             Returns:
12553                 unique texture identifier
12554             """
12555             # Example: see GEOM_TestAll.py
12556             ID = self.InsertOp.LoadTexture(Path)
12557             RaiseIfFailed("LoadTexture", self.InsertOp)
12558             return ID
12559
12560         ## Get internal name of the object based on its study entry
12561         #  @note This method does not provide an unique identifier of the geometry object.
12562         #  @note This is internal function of GEOM component, though it can be used outside it for
12563         #  appropriate reason (e.g. for identification of geometry object).
12564         #  @param obj geometry object
12565         #  @return unique object identifier
12566         #  @ingroup l1_geomBuilder_auxiliary
12567         def getObjectID(self, obj):
12568             """
12569             Get internal name of the object based on its study entry.
12570             Note: this method does not provide an unique identifier of the geometry object.
12571             It is an internal function of GEOM component, though it can be used outside GEOM for
12572             appropriate reason (e.g. for identification of geometry object).
12573
12574             Parameters:
12575                 obj geometry object
12576
12577             Returns:
12578                 unique object identifier
12579             """
12580             ID = ""
12581             entry = salome.ObjectToID(obj)
12582             if entry is not None:
12583                 lst = entry.split(":")
12584                 if len(lst) > 0:
12585                     ID = lst[-1] # -1 means last item in the list
12586                     return "GEOM_" + ID
12587             return ID
12588
12589
12590
12591         ## Add marker texture. @a Width and @a Height parameters
12592         #  specify width and height of the texture in pixels.
12593         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12594         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12595         #  parameter should be unpacked string, in which '1' symbols represent opaque
12596         #  pixels and '0' represent transparent pixels of the texture bitmap.
12597         #
12598         #  @param Width texture width in pixels
12599         #  @param Height texture height in pixels
12600         #  @param Texture texture data
12601         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12602         #  @return unique texture identifier
12603         #  @ingroup l1_geomBuilder_auxiliary
12604         @ManageTransactions("InsertOp")
12605         def AddTexture(self, Width, Height, Texture, RowData=False):
12606             """
12607             Add marker texture. Width and Height parameters
12608             specify width and height of the texture in pixels.
12609             If RowData is True, Texture parameter should represent texture data
12610             packed into the byte array. If RowData is False (default), Texture
12611             parameter should be unpacked string, in which '1' symbols represent opaque
12612             pixels and '0' represent transparent pixels of the texture bitmap.
12613
12614             Parameters:
12615                 Width texture width in pixels
12616                 Height texture height in pixels
12617                 Texture texture data
12618                 RowData if True, Texture data are packed in the byte stream
12619
12620             Returns:
12621                 return unique texture identifier
12622             """
12623             if not RowData: Texture = PackData(Texture)
12624             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12625             RaiseIfFailed("AddTexture", self.InsertOp)
12626             return ID
12627
12628         ## Creates a new folder object. It is a container for any GEOM objects.
12629         #  @param Name name of the container
12630         #  @param Father parent object. If None,
12631         #         folder under 'Geometry' root object will be created.
12632         #  @return a new created folder
12633         #  @ingroup l1_publish_data
12634         def NewFolder(self, Name, Father=None):
12635             """
12636             Create a new folder object. It is an auxiliary container for any GEOM objects.
12637
12638             Parameters:
12639                 Name name of the container
12640                 Father parent object. If None,
12641                 folder under 'Geometry' root object will be created.
12642
12643             Returns:
12644                 a new created folder
12645             """
12646             if not Father: Father = self.father
12647             return self.CreateFolder(Name, Father)
12648
12649         ## Move object to the specified folder
12650         #  @param Object object to move
12651         #  @param Folder target folder
12652         #  @ingroup l1_publish_data
12653         def PutToFolder(self, Object, Folder):
12654             """
12655             Move object to the specified folder
12656
12657             Parameters:
12658                 Object object to move
12659                 Folder target folder
12660             """
12661             self.MoveToFolder(Object, Folder)
12662             pass
12663
12664         ## Move list of objects to the specified folder
12665         #  @param ListOfSO list of objects to move
12666         #  @param Folder target folder
12667         #  @ingroup l1_publish_data
12668         def PutListToFolder(self, ListOfSO, Folder):
12669             """
12670             Move list of objects to the specified folder
12671
12672             Parameters:
12673                 ListOfSO list of objects to move
12674                 Folder target folder
12675             """
12676             self.MoveListToFolder(ListOfSO, Folder)
12677             pass
12678
12679         ## @addtogroup l2_field
12680         ## @{
12681
12682         ## Creates a field
12683         #  @param shape the shape the field lies on
12684         #  @param name the field name
12685         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12686         #  @param dimension dimension of the shape the field lies on
12687         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12688         #  @param componentNames names of components
12689         #  @return a created field
12690         @ManageTransactions("FieldOp")
12691         def CreateField(self, shape, name, type, dimension, componentNames):
12692             """
12693             Creates a field
12694
12695             Parameters:
12696                 shape the shape the field lies on
12697                 name  the field name
12698                 type  type of field data
12699                 dimension dimension of the shape the field lies on
12700                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12701                 componentNames names of components
12702
12703             Returns:
12704                 a created field
12705             """
12706             if isinstance( type, int ):
12707                 if type < 0 or type > 3:
12708                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12709                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12710
12711             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12712             RaiseIfFailed("CreateField", self.FieldOp)
12713             global geom
12714             geom._autoPublish( f, "", name)
12715             return f
12716
12717         ## Removes a field from the GEOM component
12718         #  @param field the field to remove
12719         def RemoveField(self, field):
12720             "Removes a field from the GEOM component"
12721             global geom
12722             if isinstance( field, GEOM._objref_GEOM_Field ):
12723                 geom.RemoveObject( field )
12724             elif isinstance( field, geomField ):
12725                 geom.RemoveObject( field.field )
12726             else:
12727                 raise RuntimeError, "RemoveField() : the object is not a field"
12728             return
12729
12730         ## Returns number of fields on a shape
12731         @ManageTransactions("FieldOp")
12732         def CountFields(self, shape):
12733             "Returns number of fields on a shape"
12734             nb = self.FieldOp.CountFields( shape )
12735             RaiseIfFailed("CountFields", self.FieldOp)
12736             return nb
12737
12738         ## Returns all fields on a shape
12739         @ManageTransactions("FieldOp")
12740         def GetFields(self, shape):
12741             "Returns all fields on a shape"
12742             ff = self.FieldOp.GetFields( shape )
12743             RaiseIfFailed("GetFields", self.FieldOp)
12744             return ff
12745
12746         ## Returns a field on a shape by its name
12747         @ManageTransactions("FieldOp")
12748         def GetField(self, shape, name):
12749             "Returns a field on a shape by its name"
12750             f = self.FieldOp.GetField( shape, name )
12751             RaiseIfFailed("GetField", self.FieldOp)
12752             return f
12753
12754         # end of l2_field
12755         ## @}
12756
12757
12758 import omniORB
12759 # Register the new proxy for GEOM_Gen
12760 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12761
12762
12763 ## Field on Geometry
12764 #  @ingroup l2_field
12765 class geomField( GEOM._objref_GEOM_Field ):
12766
12767     def __init__(self):
12768         GEOM._objref_GEOM_Field.__init__(self)
12769         self.field = GEOM._objref_GEOM_Field
12770         return
12771
12772     ## Returns the shape the field lies on
12773     def getShape(self):
12774         "Returns the shape the field lies on"
12775         return self.field.GetShape(self)
12776
12777     ## Returns the field name
12778     def getName(self):
12779         "Returns the field name"
12780         return self.field.GetName(self)
12781
12782     ## Returns type of field data as integer [0-3]
12783     def getType(self):
12784         "Returns type of field data"
12785         return self.field.GetDataType(self)._v
12786
12787     ## Returns type of field data:
12788     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12789     def getTypeEnum(self):
12790         "Returns type of field data"
12791         return self.field.GetDataType(self)
12792
12793     ## Returns dimension of the shape the field lies on:
12794     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12795     def getDimension(self):
12796         """Returns dimension of the shape the field lies on:
12797         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
12798         return self.field.GetDimension(self)
12799
12800     ## Returns names of components
12801     def getComponents(self):
12802         "Returns names of components"
12803         return self.field.GetComponents(self)
12804
12805     ## Adds a time step to the field
12806     #  @param step the time step number further used as the step identifier
12807     #  @param stamp the time step time
12808     #  @param values the values of the time step
12809     def addStep(self, step, stamp, values):
12810         "Adds a time step to the field"
12811         stp = self.field.AddStep( self, step, stamp )
12812         if not stp:
12813             raise RuntimeError, \
12814                   "Field.addStep() : Error: step %s already exists in this field"%step
12815         global geom
12816         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
12817         self.setValues( step, values )
12818         return stp
12819
12820     ## Remove a time step from the field
12821     def removeStep(self,step):
12822         "Remove a time step from the field"
12823         stepSO = None
12824         try:
12825             stepObj = self.field.GetStep( self, step )
12826             if stepObj:
12827                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
12828         except:
12829             #import traceback
12830             #traceback.print_exc()
12831             pass
12832         self.field.RemoveStep( self, step )
12833         if stepSO:
12834             geom.myBuilder.RemoveObjectWithChildren( stepSO )
12835         return
12836
12837     ## Returns number of time steps in the field
12838     def countSteps(self):
12839         "Returns number of time steps in the field"
12840         return self.field.CountSteps(self)
12841
12842     ## Returns a list of time step IDs in the field
12843     def getSteps(self):
12844         "Returns a list of time step IDs in the field"
12845         return self.field.GetSteps(self)
12846
12847     ## Returns a time step by its ID
12848     def getStep(self,step):
12849         "Returns a time step by its ID"
12850         stp = self.field.GetStep(self, step)
12851         if not stp:
12852             raise RuntimeError, "Step %s is missing from this field"%step
12853         return stp
12854
12855     ## Returns the time of the field step
12856     def getStamp(self,step):
12857         "Returns the time of the field step"
12858         return self.getStep(step).GetStamp()
12859
12860     ## Changes the time of the field step
12861     def setStamp(self, step, stamp):
12862         "Changes the time of the field step"
12863         return self.getStep(step).SetStamp(stamp)
12864
12865     ## Returns values of the field step
12866     def getValues(self, step):
12867         "Returns values of the field step"
12868         return self.getStep(step).GetValues()
12869
12870     ## Changes values of the field step
12871     def setValues(self, step, values):
12872         "Changes values of the field step"
12873         stp = self.getStep(step)
12874         errBeg = "Field.setValues(values) : Error: "
12875         try:
12876             ok = stp.SetValues( values )
12877         except Exception, e:
12878             excStr = str(e)
12879             if excStr.find("WrongPythonType") > 0:
12880                 raise RuntimeError, errBeg +\
12881                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
12882             raise RuntimeError, errBeg + str(e)
12883         if not ok:
12884             nbOK = self.field.GetArraySize(self)
12885             nbKO = len(values)
12886             if nbOK != nbKO:
12887                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
12888             else:
12889                 raise RuntimeError, errBeg + "failed"
12890         return
12891
12892     pass # end of class geomField
12893
12894 # Register the new proxy for GEOM_Field
12895 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
12896
12897
12898 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12899 #  interface to GEOM operations.
12900 #
12901 #  Typical use is:
12902 #  \code
12903 #    import salome
12904 #    salome.salome_init()
12905 #    from salome.geom import geomBuilder
12906 #    geompy = geomBuilder.New(salome.myStudy)
12907 #  \endcode
12908 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12909 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12910 #  @return geomBuilder instance
12911 def New( study, instance=None):
12912     """
12913     Create a new geomBuilder instance.The geomBuilder class provides the Python
12914     interface to GEOM operations.
12915
12916     Typical use is:
12917         import salome
12918         salome.salome_init()
12919         from salome.geom import geomBuilder
12920         geompy = geomBuilder.New(salome.myStudy)
12921
12922     Parameters:
12923         study     SALOME study, generally obtained by salome.myStudy.
12924         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12925     Returns:
12926         geomBuilder instance
12927     """
12928     #print "New geomBuilder ", study, instance
12929     global engine
12930     global geom
12931     global doLcc
12932     engine = instance
12933     if engine is None:
12934       doLcc = True
12935     geom = geomBuilder()
12936     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12937     geom.init_geom(study)
12938     return geom
12939
12940
12941 # Register methods from the plug-ins in the geomBuilder class 
12942 plugins_var = os.environ.get( "GEOM_PluginsList" )
12943
12944 plugins = None
12945 if plugins_var is not None:
12946     plugins = plugins_var.split( ":" )
12947     plugins=filter(lambda x: len(x)>0, plugins)
12948 if plugins is not None:
12949     for pluginName in plugins:
12950         pluginBuilderName = pluginName + "Builder"
12951         try:
12952             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
12953         except Exception, e:
12954             from salome_utils import verbose
12955             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
12956             continue
12957         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
12958         plugin = eval( pluginBuilderName )
12959         
12960         # add methods from plugin module to the geomBuilder class
12961         for k in dir( plugin ):
12962             if k[0] == '_': continue
12963             method = getattr( plugin, k )
12964             if type( method ).__name__ == 'function':
12965                 if not hasattr( geomBuilder, k ):
12966                     setattr( geomBuilder, k, method )
12967                 pass
12968             pass
12969         del pluginName
12970         pass
12971     pass