Salome HOME
0022757: [EDF] Vertex on Edge
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup geomBuilder geomBuilder Python module
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ##
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ##
50 ## For example, consider the following Python script:
51 ##
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ##
60 ## Last two lines can be replaced by one-line instruction:
61 ##
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ##
66 ## ... or simply
67 ##
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ##
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100)
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Pack an argument into a list
521 def ToList( arg ):
522     if isinstance( arg, list ):
523         return arg
524     if hasattr( arg, "__getitem__" ):
525         return list( arg )
526     return [ arg ]
527
528 ## Information about closed/unclosed state of shell or wire
529 #  @ingroup l1_geomBuilder_auxiliary
530 class info:
531     """
532     Information about closed/unclosed state of shell or wire
533     """
534     UNKNOWN  = 0
535     CLOSED   = 1
536     UNCLOSED = 2
537
538 ## Private class used to bind calls of plugin operations to geomBuilder
539 class PluginOperation:
540   def __init__(self, operation, function):
541     self.operation = operation
542     self.function = function
543     pass
544
545   @ManageTransactions("operation")
546   def __call__(self, *args):
547     res = self.function(self.operation, *args)
548     RaiseIfFailed(self.function.__name__, self.operation)
549     return res
550
551 # Warning: geom is a singleton
552 geom = None
553 engine = None
554 doLcc = False
555 created = False
556
557 class geomBuilder(object, GEOM._objref_GEOM_Gen):
558
559         ## Enumeration ShapeType as a dictionary. \n
560         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
561         #  @ingroup l1_geomBuilder_auxiliary
562         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
563
564         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
565         #  and a list of parameters, describing the shape.
566         #  List of parameters, describing the shape:
567         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
568         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
569         #
570         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
571         #
572         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
573         #
574         #  - SPHERE:       [xc yc zc            R]
575         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
576         #  - BOX:          [xc yc zc                      ax ay az]
577         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
578         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
579         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
580         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
581         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
582         #
583         #  - SPHERE2D:     [xc yc zc            R]
584         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
585         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
586         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
587         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
588         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
589         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
590         #  - PLANE:        [xo yo zo  dx dy dz]
591         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
592         #  - FACE:                                       [nb_edges  nb_vertices]
593         #
594         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
595         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
596         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
597         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
598         #  - LINE:         [xo yo zo  dx dy dz]
599         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
600         #  - EDGE:                                                 [nb_vertices]
601         #
602         #  - VERTEX:       [x  y  z]
603         #  @ingroup l1_geomBuilder_auxiliary
604         kind = GEOM.GEOM_IKindOfShape
605
606         def __new__(cls):
607             global engine
608             global geom
609             global doLcc
610             global created
611             #print "==== __new__ ", engine, geom, doLcc, created
612             if geom is None:
613                 # geom engine is either retrieved from engine, or created
614                 geom = engine
615                 # Following test avoids a recursive loop
616                 if doLcc:
617                     if geom is not None:
618                         # geom engine not created: existing engine found
619                         doLcc = False
620                     if doLcc and not created:
621                         doLcc = False
622                         # FindOrLoadComponent called:
623                         # 1. CORBA resolution of server
624                         # 2. the __new__ method is called again
625                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
626                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
627                         #print "====1 ",geom
628                 else:
629                     # FindOrLoadComponent not called
630                     if geom is None:
631                         # geomBuilder instance is created from lcc.FindOrLoadComponent
632                         #print "==== super ", engine, geom, doLcc, created
633                         geom = super(geomBuilder,cls).__new__(cls)
634                         #print "====2 ",geom
635                     else:
636                         # geom engine not created: existing engine found
637                         #print "==== existing ", engine, geom, doLcc, created
638                         pass
639                 #print "return geom 1 ", geom
640                 return geom
641
642             #print "return geom 2 ", geom
643             return geom
644
645         def __init__(self):
646             global created
647             #print "-------- geomBuilder __init__ --- ", created, self
648             if not created:
649               created = True
650               GEOM._objref_GEOM_Gen.__init__(self)
651               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
652               self.myBuilder = None
653               self.myStudyId = 0
654               self.father    = None
655
656               self.BasicOp  = None
657               self.CurvesOp = None
658               self.PrimOp   = None
659               self.ShapesOp = None
660               self.HealOp   = None
661               self.InsertOp = None
662               self.BoolOp   = None
663               self.TrsfOp   = None
664               self.LocalOp  = None
665               self.MeasuOp  = None
666               self.BlocksOp = None
667               self.GroupOp  = None
668               self.FieldOp  = None
669             pass
670
671         ## Process object publication in the study, as follows:
672         #  - if @a theName is specified (not None), the object is published in the study
673         #    with this name, not taking into account "auto-publishing" option;
674         #  - if @a theName is NOT specified, the object is published in the study
675         #    (using default name, which can be customized using @a theDefaultName parameter)
676         #    only if auto-publishing is switched on.
677         #
678         #  @param theObj  object, a subject for publishing
679         #  @param theName object name for study
680         #  @param theDefaultName default name for the auto-publishing
681         #
682         #  @sa addToStudyAuto()
683         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
684             # ---
685             def _item_name(_names, _defname, _idx=-1):
686                 if not _names: _names = _defname
687                 if type(_names) in [types.ListType, types.TupleType]:
688                     if _idx >= 0:
689                         if _idx >= len(_names) or not _names[_idx]:
690                             if type(_defname) not in [types.ListType, types.TupleType]:
691                                 _name = "%s_%d"%(_defname, _idx+1)
692                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
693                                 _name = _defname[_idx]
694                             else:
695                                 _name = "%noname_%d"%(dn, _idx+1)
696                             pass
697                         else:
698                             _name = _names[_idx]
699                         pass
700                     else:
701                         # must be wrong  usage
702                         _name = _names[0]
703                     pass
704                 else:
705                     if _idx >= 0:
706                         _name = "%s_%d"%(_names, _idx+1)
707                     else:
708                         _name = _names
709                     pass
710                 return _name
711             # ---
712             def _publish( _name, _obj ):
713                 fatherObj = None
714                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
715                     fatherObj = _obj.GetShape()
716                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
717                     fatherObj = _obj.GetField()
718                 elif not _obj.IsMainShape():
719                     fatherObj = _obj.GetMainShape()
720                     pass
721                 if fatherObj and fatherObj.GetStudyEntry():
722                     self.addToStudyInFather(fatherObj, _obj, _name)
723                 else:
724                     self.addToStudy(_obj, _name)
725                     pass
726                 return
727             # ---
728             if not theObj:
729                 return # null object
730             if not theName and not self.myMaxNbSubShapesAllowed:
731                 return # nothing to do: auto-publishing is disabled
732             if not theName and not theDefaultName:
733                 return # neither theName nor theDefaultName is given
734             import types
735             if type(theObj) in [types.ListType, types.TupleType]:
736                 # list of objects is being published
737                 idx = 0
738                 for obj in theObj:
739                     if not obj: continue # bad object
740                     name = _item_name(theName, theDefaultName, idx)
741                     _publish( name, obj )
742                     idx = idx+1
743                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
744                     pass
745                 pass
746             else:
747                 # single object is published
748                 name = _item_name(theName, theDefaultName)
749                 _publish( name, theObj )
750             pass
751
752         ## @addtogroup l1_geomBuilder_auxiliary
753         ## @{
754         def init_geom(self,theStudy):
755             self.myStudy = theStudy
756             self.myStudyId = self.myStudy._get_StudyId()
757             self.myBuilder = self.myStudy.NewBuilder()
758             self.father = self.myStudy.FindComponent("GEOM")
759             notebook.myStudy = theStudy
760             if self.father is None:
761                 self.father = self.myBuilder.NewComponent("GEOM")
762                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
763                 FName = A1._narrow(SALOMEDS.AttributeName)
764                 FName.SetValue("Geometry")
765                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
766                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
767                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
768                 self.myBuilder.DefineComponentInstance(self.father,self)
769                 pass
770             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
771             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
772             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
773             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
774             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
775             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
776             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
777             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
778             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
779             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
780             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
781             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
782             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
783
784             # set GEOM as root in the use case tree
785             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
786             self.myUseCaseBuilder.SetRootCurrent()
787             self.myUseCaseBuilder.Append(self.father)
788             pass
789
790         def GetPluginOperations(self, studyID, libraryName):
791             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
792             return op
793
794         ## Enable / disable results auto-publishing
795         #
796         #  The automatic publishing is managed in the following way:
797         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
798         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
799         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
800         #  value passed as parameter has the same effect.
801         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
802         #  maximum number of sub-shapes allowed for publishing is set to specified value.
803         #
804         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
805         #  @ingroup l1_publish_data
806         def addToStudyAuto(self, maxNbSubShapes=-1):
807             """
808             Enable / disable results auto-publishing
809
810             The automatic publishing is managed in the following way:
811             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
812             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
813             maximum number of sub-shapes allowed for publishing is unlimited; any negative
814             value passed as parameter has the same effect.
815             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
816             maximum number of sub-shapes allowed for publishing is set to this value.
817
818             Parameters:
819                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
820
821             Example of usage:
822                 geompy.addToStudyAuto()   # enable auto-publishing
823                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
824                 geompy.addToStudyAuto(0)  # disable auto-publishing
825             """
826             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
827             pass
828
829         ## Dump component to the Python script
830         #  This method overrides IDL function to allow default values for the parameters.
831         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
832             """
833             Dump component to the Python script
834             This method overrides IDL function to allow default values for the parameters.
835             """
836             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
837
838         ## Get name for sub-shape aSubObj of shape aMainObj
839         #
840         # @ref swig_SubShapeName "Example"
841         @ManageTransactions("ShapesOp")
842         def SubShapeName(self,aSubObj, aMainObj):
843             """
844             Get name for sub-shape aSubObj of shape aMainObj
845             """
846             # Example: see GEOM_TestAll.py
847
848             #aSubId  = orb.object_to_string(aSubObj)
849             #aMainId = orb.object_to_string(aMainObj)
850             #index = gg.getIndexTopology(aSubId, aMainId)
851             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
852             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
853             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
854             return name
855
856         ## Publish in study aShape with name aName
857         #
858         #  \param aShape the shape to be published
859         #  \param aName  the name for the shape
860         #  \param doRestoreSubShapes if True, finds and publishes also
861         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
862         #         and published sub-shapes of arguments
863         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
864         #                                                  these arguments description
865         #  \return study entry of the published shape in form of string
866         #
867         #  @ingroup l1_publish_data
868         #  @ref swig_all_addtostudy "Example"
869         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
870                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
871             """
872             Publish in study aShape with name aName
873
874             Parameters:
875                 aShape the shape to be published
876                 aName  the name for the shape
877                 doRestoreSubShapes if True, finds and publishes also
878                                    sub-shapes of aShape, corresponding to its arguments
879                                    and published sub-shapes of arguments
880                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
881                                                          these arguments description
882
883             Returns:
884                 study entry of the published shape in form of string
885
886             Example of usage:
887                 id_block1 = geompy.addToStudy(Block1, "Block 1")
888             """
889             # Example: see GEOM_TestAll.py
890             try:
891                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
892                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
893                 if doRestoreSubShapes:
894                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
895                                             theFindMethod, theInheritFirstArg, True )
896             except:
897                 print "addToStudy() failed"
898                 return ""
899             return aShape.GetStudyEntry()
900
901         ## Publish in study aShape with name aName as sub-object of previously published aFather
902         #  \param aFather previously published object
903         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
904         #  \param aName  the name for the shape
905         #
906         #  \return study entry of the published shape in form of string
907         #
908         #  @ingroup l1_publish_data
909         #  @ref swig_all_addtostudyInFather "Example"
910         def addToStudyInFather(self, aFather, aShape, aName):
911             """
912             Publish in study aShape with name aName as sub-object of previously published aFather
913
914             Parameters:
915                 aFather previously published object
916                 aShape the shape to be published as sub-object of aFather
917                 aName  the name for the shape
918
919             Returns:
920                 study entry of the published shape in form of string
921             """
922             # Example: see GEOM_TestAll.py
923             try:
924                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
925                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
926             except:
927                 print "addToStudyInFather() failed"
928                 return ""
929             return aShape.GetStudyEntry()
930
931         ## Unpublish object in study
932         #
933         #  \param obj the object to be unpublished
934         def hideInStudy(self, obj):
935             """
936             Unpublish object in study
937
938             Parameters:
939                 obj the object to be unpublished
940             """
941             ior = salome.orb.object_to_string(obj)
942             aSObject = self.myStudy.FindObjectIOR(ior)
943             if aSObject is not None:
944                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
945                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
946                 drwAttribute.SetDrawable(False)
947                 # hide references if any
948                 vso = self.myStudy.FindDependances(aSObject);
949                 for refObj in vso :
950                     genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
951                     drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
952                     drwAttribute.SetDrawable(False)
953                     pass
954                 pass
955
956         # end of l1_geomBuilder_auxiliary
957         ## @}
958
959         ## @addtogroup l3_restore_ss
960         ## @{
961
962         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
963         #  To be used from python scripts out of addToStudy() (non-default usage)
964         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
965         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
966         #                   If this list is empty, all operation arguments will be published
967         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
968         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
969         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
970         #                            Do not publish sub-shapes in place of arguments, but only
971         #                            in place of sub-shapes of the first argument,
972         #                            because the whole shape corresponds to the first argument.
973         #                            Mainly to be used after transformations, but it also can be
974         #                            usefull after partition with one object shape, and some other
975         #                            operations, where only the first argument has to be considered.
976         #                            If theObject has only one argument shape, this flag is automatically
977         #                            considered as True, not regarding really passed value.
978         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
979         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
980         #  \return list of published sub-shapes
981         #
982         #  @ref tui_restore_prs_params "Example"
983         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
984                               theInheritFirstArg=False, theAddPrefix=True):
985             """
986             Publish sub-shapes, standing for arguments and sub-shapes of arguments
987             To be used from python scripts out of geompy.addToStudy (non-default usage)
988
989             Parameters:
990                 theObject published GEOM.GEOM_Object, arguments of which will be published
991                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
992                           If this list is empty, all operation arguments will be published
993                 theFindMethod method to search sub-shapes, corresponding to arguments and
994                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
995                 theInheritFirstArg set properties of the first argument for theObject.
996                                    Do not publish sub-shapes in place of arguments, but only
997                                    in place of sub-shapes of the first argument,
998                                    because the whole shape corresponds to the first argument.
999                                    Mainly to be used after transformations, but it also can be
1000                                    usefull after partition with one object shape, and some other
1001                                    operations, where only the first argument has to be considered.
1002                                    If theObject has only one argument shape, this flag is automatically
1003                                    considered as True, not regarding really passed value.
1004                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1005                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1006             Returns:
1007                 list of published sub-shapes
1008             """
1009             # Example: see GEOM_TestAll.py
1010             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1011                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1012
1013         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1014         #  To be used from python scripts out of addToStudy() (non-default usage)
1015         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1016         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1017         #                   If this list is empty, all operation arguments will be published
1018         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1019         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1020         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1021         #                            Do not publish sub-shapes in place of arguments, but only
1022         #                            in place of sub-shapes of the first argument,
1023         #                            because the whole shape corresponds to the first argument.
1024         #                            Mainly to be used after transformations, but it also can be
1025         #                            usefull after partition with one object shape, and some other
1026         #                            operations, where only the first argument has to be considered.
1027         #                            If theObject has only one argument shape, this flag is automatically
1028         #                            considered as True, not regarding really passed value.
1029         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1030         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1031         #  \return list of published sub-shapes
1032         #
1033         #  @ref tui_restore_prs_params "Example"
1034         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1035                                    theInheritFirstArg=False, theAddPrefix=True):
1036             """
1037             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1038             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1039
1040             Parameters:
1041                 theObject published GEOM.GEOM_Object, arguments of which will be published
1042                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1043                           If this list is empty, all operation arguments will be published
1044                 theFindMethod method to search sub-shapes, corresponding to arguments and
1045                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1046                 theInheritFirstArg set properties of the first argument for theObject.
1047                                    Do not publish sub-shapes in place of arguments, but only
1048                                    in place of sub-shapes of the first argument,
1049                                    because the whole shape corresponds to the first argument.
1050                                    Mainly to be used after transformations, but it also can be
1051                                    usefull after partition with one object shape, and some other
1052                                    operations, where only the first argument has to be considered.
1053                                    If theObject has only one argument shape, this flag is automatically
1054                                    considered as True, not regarding really passed value.
1055                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1056                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1057
1058             Returns:
1059                 list of published sub-shapes
1060             """
1061             # Example: see GEOM_TestAll.py
1062             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1063                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1064
1065         # end of l3_restore_ss
1066         ## @}
1067
1068         ## @addtogroup l3_basic_go
1069         ## @{
1070
1071         ## Create point by three coordinates.
1072         #  @param theX The X coordinate of the point.
1073         #  @param theY The Y coordinate of the point.
1074         #  @param theZ The Z coordinate of the point.
1075         #  @param theName Object name; when specified, this parameter is used
1076         #         for result publication in the study. Otherwise, if automatic
1077         #         publication is switched on, default value is used for result name.
1078         #
1079         #  @return New GEOM.GEOM_Object, containing the created point.
1080         #
1081         #  @ref tui_creation_point "Example"
1082         @ManageTransactions("BasicOp")
1083         def MakeVertex(self, theX, theY, theZ, theName=None):
1084             """
1085             Create point by three coordinates.
1086
1087             Parameters:
1088                 theX The X coordinate of the point.
1089                 theY The Y coordinate of the point.
1090                 theZ The Z coordinate of the point.
1091                 theName Object name; when specified, this parameter is used
1092                         for result publication in the study. Otherwise, if automatic
1093                         publication is switched on, default value is used for result name.
1094
1095             Returns:
1096                 New GEOM.GEOM_Object, containing the created point.
1097             """
1098             # Example: see GEOM_TestAll.py
1099             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1100             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1101             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1102             anObj.SetParameters(Parameters)
1103             self._autoPublish(anObj, theName, "vertex")
1104             return anObj
1105
1106         ## Create a point, distant from the referenced point
1107         #  on the given distances along the coordinate axes.
1108         #  @param theReference The referenced point.
1109         #  @param theX Displacement from the referenced point along OX axis.
1110         #  @param theY Displacement from the referenced point along OY axis.
1111         #  @param theZ Displacement from the referenced point along OZ axis.
1112         #  @param theName Object name; when specified, this parameter is used
1113         #         for result publication in the study. Otherwise, if automatic
1114         #         publication is switched on, default value is used for result name.
1115         #
1116         #  @return New GEOM.GEOM_Object, containing the created point.
1117         #
1118         #  @ref tui_creation_point "Example"
1119         @ManageTransactions("BasicOp")
1120         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1121             """
1122             Create a point, distant from the referenced point
1123             on the given distances along the coordinate axes.
1124
1125             Parameters:
1126                 theReference The referenced point.
1127                 theX Displacement from the referenced point along OX axis.
1128                 theY Displacement from the referenced point along OY axis.
1129                 theZ Displacement from the referenced point along OZ axis.
1130                 theName Object name; when specified, this parameter is used
1131                         for result publication in the study. Otherwise, if automatic
1132                         publication is switched on, default value is used for result name.
1133
1134             Returns:
1135                 New GEOM.GEOM_Object, containing the created point.
1136             """
1137             # Example: see GEOM_TestAll.py
1138             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1139             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1140             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1141             anObj.SetParameters(Parameters)
1142             self._autoPublish(anObj, theName, "vertex")
1143             return anObj
1144
1145         ## Create a point, corresponding to the given parameter on the given curve.
1146         #  @param theRefCurve The referenced curve.
1147         #  @param theParameter Value of parameter on the referenced curve.
1148         #  @param theName Object name; when specified, this parameter is used
1149         #         for result publication in the study. Otherwise, if automatic
1150         #         publication is switched on, default value is used for result name.
1151         #
1152         #  @return New GEOM.GEOM_Object, containing the created point.
1153         #
1154         #  @ref tui_creation_point "Example"
1155         @ManageTransactions("BasicOp")
1156         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1157             """
1158             Create a point, corresponding to the given parameter on the given curve.
1159
1160             Parameters:
1161                 theRefCurve The referenced curve.
1162                 theParameter Value of parameter on the referenced curve.
1163                 theName Object name; when specified, this parameter is used
1164                         for result publication in the study. Otherwise, if automatic
1165                         publication is switched on, default value is used for result name.
1166
1167             Returns:
1168                 New GEOM.GEOM_Object, containing the created point.
1169
1170             Example of usage:
1171                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1172             """
1173             # Example: see GEOM_TestAll.py
1174             theParameter, Parameters = ParseParameters(theParameter)
1175             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1176             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1177             anObj.SetParameters(Parameters)
1178             self._autoPublish(anObj, theName, "vertex")
1179             return anObj
1180
1181         ## Create a point by projection give coordinates on the given curve
1182         #  @param theRefCurve The referenced curve.
1183         #  @param theX X-coordinate in 3D space
1184         #  @param theY Y-coordinate in 3D space
1185         #  @param theZ Z-coordinate in 3D space
1186         #  @param theName Object name; when specified, this parameter is used
1187         #         for result publication in the study. Otherwise, if automatic
1188         #         publication is switched on, default value is used for result name.
1189         #
1190         #  @return New GEOM.GEOM_Object, containing the created point.
1191         #
1192         #  @ref tui_creation_point "Example"
1193         @ManageTransactions("BasicOp")
1194         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1195             """
1196             Create a point by projection give coordinates on the given curve
1197
1198             Parameters:
1199                 theRefCurve The referenced curve.
1200                 theX X-coordinate in 3D space
1201                 theY Y-coordinate in 3D space
1202                 theZ Z-coordinate in 3D space
1203                 theName Object name; when specified, this parameter is used
1204                         for result publication in the study. Otherwise, if automatic
1205                         publication is switched on, default value is used for result name.
1206
1207             Returns:
1208                 New GEOM.GEOM_Object, containing the created point.
1209
1210             Example of usage:
1211                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1212             """
1213             # Example: see GEOM_TestAll.py
1214             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1215             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1216             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1217             anObj.SetParameters(Parameters)
1218             self._autoPublish(anObj, theName, "vertex")
1219             return anObj
1220
1221         ## Create a point, corresponding to the given length on the given curve.
1222         #  @param theRefCurve The referenced curve.
1223         #  @param theLength Length on the referenced curve. It can be negative.
1224         #  @param theStartPoint Point allowing to choose the direction for the calculation
1225         #                       of the length. If None, start from the first point of theRefCurve.
1226         #  @param theName Object name; when specified, this parameter is used
1227         #         for result publication in the study. Otherwise, if automatic
1228         #         publication is switched on, default value is used for result name.
1229         #
1230         #  @return New GEOM.GEOM_Object, containing the created point.
1231         #
1232         #  @ref tui_creation_point "Example"
1233         @ManageTransactions("BasicOp")
1234         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1235             """
1236             Create a point, corresponding to the given length on the given curve.
1237
1238             Parameters:
1239                 theRefCurve The referenced curve.
1240                 theLength Length on the referenced curve. It can be negative.
1241                 theStartPoint Point allowing to choose the direction for the calculation
1242                               of the length. If None, start from the first point of theRefCurve.
1243                 theName Object name; when specified, this parameter is used
1244                         for result publication in the study. Otherwise, if automatic
1245                         publication is switched on, default value is used for result name.
1246
1247             Returns:
1248                 New GEOM.GEOM_Object, containing the created point.
1249             """
1250             # Example: see GEOM_TestAll.py
1251             theLength, Parameters = ParseParameters(theLength)
1252             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1253             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1254             anObj.SetParameters(Parameters)
1255             self._autoPublish(anObj, theName, "vertex")
1256             return anObj
1257
1258         ## Create a point, corresponding to the given parameters on the
1259         #    given surface.
1260         #  @param theRefSurf The referenced surface.
1261         #  @param theUParameter Value of U-parameter on the referenced surface.
1262         #  @param theVParameter Value of V-parameter on the referenced surface.
1263         #  @param theName Object name; when specified, this parameter is used
1264         #         for result publication in the study. Otherwise, if automatic
1265         #         publication is switched on, default value is used for result name.
1266         #
1267         #  @return New GEOM.GEOM_Object, containing the created point.
1268         #
1269         #  @ref swig_MakeVertexOnSurface "Example"
1270         @ManageTransactions("BasicOp")
1271         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1272             """
1273             Create a point, corresponding to the given parameters on the
1274             given surface.
1275
1276             Parameters:
1277                 theRefSurf The referenced surface.
1278                 theUParameter Value of U-parameter on the referenced surface.
1279                 theVParameter Value of V-parameter on the referenced surface.
1280                 theName Object name; when specified, this parameter is used
1281                         for result publication in the study. Otherwise, if automatic
1282                         publication is switched on, default value is used for result name.
1283
1284             Returns:
1285                 New GEOM.GEOM_Object, containing the created point.
1286
1287             Example of usage:
1288                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1289             """
1290             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1291             # Example: see GEOM_TestAll.py
1292             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1293             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1294             anObj.SetParameters(Parameters);
1295             self._autoPublish(anObj, theName, "vertex")
1296             return anObj
1297
1298         ## Create a point by projection give coordinates on the given surface
1299         #  @param theRefSurf The referenced surface.
1300         #  @param theX X-coordinate in 3D space
1301         #  @param theY Y-coordinate in 3D space
1302         #  @param theZ Z-coordinate in 3D space
1303         #  @param theName Object name; when specified, this parameter is used
1304         #         for result publication in the study. Otherwise, if automatic
1305         #         publication is switched on, default value is used for result name.
1306         #
1307         #  @return New GEOM.GEOM_Object, containing the created point.
1308         #
1309         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1310         @ManageTransactions("BasicOp")
1311         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1312             """
1313             Create a point by projection give coordinates on the given surface
1314
1315             Parameters:
1316                 theRefSurf The referenced surface.
1317                 theX X-coordinate in 3D space
1318                 theY Y-coordinate in 3D space
1319                 theZ Z-coordinate in 3D space
1320                 theName Object name; when specified, this parameter is used
1321                         for result publication in the study. Otherwise, if automatic
1322                         publication is switched on, default value is used for result name.
1323
1324             Returns:
1325                 New GEOM.GEOM_Object, containing the created point.
1326
1327             Example of usage:
1328                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1329             """
1330             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1331             # Example: see GEOM_TestAll.py
1332             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1333             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1334             anObj.SetParameters(Parameters);
1335             self._autoPublish(anObj, theName, "vertex")
1336             return anObj
1337
1338         ## Create a point, which lays on the given face.
1339         #  The point will lay in arbitrary place of the face.
1340         #  The only condition on it is a non-zero distance to the face boundary.
1341         #  Such point can be used to uniquely identify the face inside any
1342         #  shape in case, when the shape does not contain overlapped faces.
1343         #  @param theFace The referenced face.
1344         #  @param theName Object name; when specified, this parameter is used
1345         #         for result publication in the study. Otherwise, if automatic
1346         #         publication is switched on, default value is used for result name.
1347         #
1348         #  @return New GEOM.GEOM_Object, containing the created point.
1349         #
1350         #  @ref swig_MakeVertexInsideFace "Example"
1351         @ManageTransactions("BasicOp")
1352         def MakeVertexInsideFace (self, theFace, theName=None):
1353             """
1354             Create a point, which lays on the given face.
1355             The point will lay in arbitrary place of the face.
1356             The only condition on it is a non-zero distance to the face boundary.
1357             Such point can be used to uniquely identify the face inside any
1358             shape in case, when the shape does not contain overlapped faces.
1359
1360             Parameters:
1361                 theFace The referenced face.
1362                 theName Object name; when specified, this parameter is used
1363                         for result publication in the study. Otherwise, if automatic
1364                         publication is switched on, default value is used for result name.
1365
1366             Returns:
1367                 New GEOM.GEOM_Object, containing the created point.
1368
1369             Example of usage:
1370                 p_on_face = geompy.MakeVertexInsideFace(Face)
1371             """
1372             # Example: see GEOM_TestAll.py
1373             anObj = self.BasicOp.MakePointOnFace(theFace)
1374             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1375             self._autoPublish(anObj, theName, "vertex")
1376             return anObj
1377
1378         ## Create a point on intersection of two lines.
1379         #  @param theRefLine1, theRefLine2 The referenced lines.
1380         #  @param theName Object name; when specified, this parameter is used
1381         #         for result publication in the study. Otherwise, if automatic
1382         #         publication is switched on, default value is used for result name.
1383         #
1384         #  @return New GEOM.GEOM_Object, containing the created point.
1385         #
1386         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1387         @ManageTransactions("BasicOp")
1388         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1389             """
1390             Create a point on intersection of two lines.
1391
1392             Parameters:
1393                 theRefLine1, theRefLine2 The referenced lines.
1394                 theName Object name; when specified, this parameter is used
1395                         for result publication in the study. Otherwise, if automatic
1396                         publication is switched on, default value is used for result name.
1397
1398             Returns:
1399                 New GEOM.GEOM_Object, containing the created point.
1400             """
1401             # Example: see GEOM_TestAll.py
1402             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1403             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1404             self._autoPublish(anObj, theName, "vertex")
1405             return anObj
1406
1407         ## Create a tangent, corresponding to the given parameter on the given curve.
1408         #  @param theRefCurve The referenced curve.
1409         #  @param theParameter Value of parameter on the referenced curve.
1410         #  @param theName Object name; when specified, this parameter is used
1411         #         for result publication in the study. Otherwise, if automatic
1412         #         publication is switched on, default value is used for result name.
1413         #
1414         #  @return New GEOM.GEOM_Object, containing the created tangent.
1415         #
1416         #  @ref swig_MakeTangentOnCurve "Example"
1417         @ManageTransactions("BasicOp")
1418         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1419             """
1420             Create a tangent, corresponding to the given parameter on the given curve.
1421
1422             Parameters:
1423                 theRefCurve The referenced curve.
1424                 theParameter Value of parameter on the referenced curve.
1425                 theName Object name; when specified, this parameter is used
1426                         for result publication in the study. Otherwise, if automatic
1427                         publication is switched on, default value is used for result name.
1428
1429             Returns:
1430                 New GEOM.GEOM_Object, containing the created tangent.
1431
1432             Example of usage:
1433                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1434             """
1435             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1436             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1437             self._autoPublish(anObj, theName, "tangent")
1438             return anObj
1439
1440         ## Create a tangent plane, corresponding to the given parameter on the given face.
1441         #  @param theFace The face for which tangent plane should be built.
1442         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1443         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1444         #  @param theTrimSize the size of plane.
1445         #  @param theName Object name; when specified, this parameter is used
1446         #         for result publication in the study. Otherwise, if automatic
1447         #         publication is switched on, default value is used for result name.
1448         #
1449         #  @return New GEOM.GEOM_Object, containing the created tangent.
1450         #
1451         #  @ref swig_MakeTangentPlaneOnFace "Example"
1452         @ManageTransactions("BasicOp")
1453         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1454             """
1455             Create a tangent plane, corresponding to the given parameter on the given face.
1456
1457             Parameters:
1458                 theFace The face for which tangent plane should be built.
1459                 theParameterV vertical value of the center point (0.0 - 1.0).
1460                 theParameterU horisontal value of the center point (0.0 - 1.0).
1461                 theTrimSize the size of plane.
1462                 theName Object name; when specified, this parameter is used
1463                         for result publication in the study. Otherwise, if automatic
1464                         publication is switched on, default value is used for result name.
1465
1466            Returns:
1467                 New GEOM.GEOM_Object, containing the created tangent.
1468
1469            Example of usage:
1470                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1471             """
1472             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1473             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1474             self._autoPublish(anObj, theName, "tangent")
1475             return anObj
1476
1477         ## Create a vector with the given components.
1478         #  @param theDX X component of the vector.
1479         #  @param theDY Y component of the vector.
1480         #  @param theDZ Z component of the vector.
1481         #  @param theName Object name; when specified, this parameter is used
1482         #         for result publication in the study. Otherwise, if automatic
1483         #         publication is switched on, default value is used for result name.
1484         #
1485         #  @return New GEOM.GEOM_Object, containing the created vector.
1486         #
1487         #  @ref tui_creation_vector "Example"
1488         @ManageTransactions("BasicOp")
1489         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1490             """
1491             Create a vector with the given components.
1492
1493             Parameters:
1494                 theDX X component of the vector.
1495                 theDY Y component of the vector.
1496                 theDZ Z component of the vector.
1497                 theName Object name; when specified, this parameter is used
1498                         for result publication in the study. Otherwise, if automatic
1499                         publication is switched on, default value is used for result name.
1500
1501             Returns:
1502                 New GEOM.GEOM_Object, containing the created vector.
1503             """
1504             # Example: see GEOM_TestAll.py
1505             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1506             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1507             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1508             anObj.SetParameters(Parameters)
1509             self._autoPublish(anObj, theName, "vector")
1510             return anObj
1511
1512         ## Create a vector between two points.
1513         #  @param thePnt1 Start point for the vector.
1514         #  @param thePnt2 End point for the vector.
1515         #  @param theName Object name; when specified, this parameter is used
1516         #         for result publication in the study. Otherwise, if automatic
1517         #         publication is switched on, default value is used for result name.
1518         #
1519         #  @return New GEOM.GEOM_Object, containing the created vector.
1520         #
1521         #  @ref tui_creation_vector "Example"
1522         @ManageTransactions("BasicOp")
1523         def MakeVector(self, thePnt1, thePnt2, theName=None):
1524             """
1525             Create a vector between two points.
1526
1527             Parameters:
1528                 thePnt1 Start point for the vector.
1529                 thePnt2 End point for the vector.
1530                 theName Object name; when specified, this parameter is used
1531                         for result publication in the study. Otherwise, if automatic
1532                         publication is switched on, default value is used for result name.
1533
1534             Returns:
1535                 New GEOM.GEOM_Object, containing the created vector.
1536             """
1537             # Example: see GEOM_TestAll.py
1538             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1539             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1540             self._autoPublish(anObj, theName, "vector")
1541             return anObj
1542
1543         ## Create a line, passing through the given point
1544         #  and parrallel to the given direction
1545         #  @param thePnt Point. The resulting line will pass through it.
1546         #  @param theDir Direction. The resulting line will be parallel to it.
1547         #  @param theName Object name; when specified, this parameter is used
1548         #         for result publication in the study. Otherwise, if automatic
1549         #         publication is switched on, default value is used for result name.
1550         #
1551         #  @return New GEOM.GEOM_Object, containing the created line.
1552         #
1553         #  @ref tui_creation_line "Example"
1554         @ManageTransactions("BasicOp")
1555         def MakeLine(self, thePnt, theDir, theName=None):
1556             """
1557             Create a line, passing through the given point
1558             and parrallel to the given direction
1559
1560             Parameters:
1561                 thePnt Point. The resulting line will pass through it.
1562                 theDir Direction. The resulting line will be parallel to it.
1563                 theName Object name; when specified, this parameter is used
1564                         for result publication in the study. Otherwise, if automatic
1565                         publication is switched on, default value is used for result name.
1566
1567             Returns:
1568                 New GEOM.GEOM_Object, containing the created line.
1569             """
1570             # Example: see GEOM_TestAll.py
1571             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1572             RaiseIfFailed("MakeLine", self.BasicOp)
1573             self._autoPublish(anObj, theName, "line")
1574             return anObj
1575
1576         ## Create a line, passing through the given points
1577         #  @param thePnt1 First of two points, defining the line.
1578         #  @param thePnt2 Second of two points, defining the line.
1579         #  @param theName Object name; when specified, this parameter is used
1580         #         for result publication in the study. Otherwise, if automatic
1581         #         publication is switched on, default value is used for result name.
1582         #
1583         #  @return New GEOM.GEOM_Object, containing the created line.
1584         #
1585         #  @ref tui_creation_line "Example"
1586         @ManageTransactions("BasicOp")
1587         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1588             """
1589             Create a line, passing through the given points
1590
1591             Parameters:
1592                 thePnt1 First of two points, defining the line.
1593                 thePnt2 Second of two points, defining the line.
1594                 theName Object name; when specified, this parameter is used
1595                         for result publication in the study. Otherwise, if automatic
1596                         publication is switched on, default value is used for result name.
1597
1598             Returns:
1599                 New GEOM.GEOM_Object, containing the created line.
1600             """
1601             # Example: see GEOM_TestAll.py
1602             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1603             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1604             self._autoPublish(anObj, theName, "line")
1605             return anObj
1606
1607         ## Create a line on two faces intersection.
1608         #  @param theFace1 First of two faces, defining the line.
1609         #  @param theFace2 Second of two faces, defining the line.
1610         #  @param theName Object name; when specified, this parameter is used
1611         #         for result publication in the study. Otherwise, if automatic
1612         #         publication is switched on, default value is used for result name.
1613         #
1614         #  @return New GEOM.GEOM_Object, containing the created line.
1615         #
1616         #  @ref swig_MakeLineTwoFaces "Example"
1617         @ManageTransactions("BasicOp")
1618         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1619             """
1620             Create a line on two faces intersection.
1621
1622             Parameters:
1623                 theFace1 First of two faces, defining the line.
1624                 theFace2 Second of two faces, defining the line.
1625                 theName Object name; when specified, this parameter is used
1626                         for result publication in the study. Otherwise, if automatic
1627                         publication is switched on, default value is used for result name.
1628
1629             Returns:
1630                 New GEOM.GEOM_Object, containing the created line.
1631             """
1632             # Example: see GEOM_TestAll.py
1633             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1634             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1635             self._autoPublish(anObj, theName, "line")
1636             return anObj
1637
1638         ## Create a plane, passing through the given point
1639         #  and normal to the given vector.
1640         #  @param thePnt Point, the plane has to pass through.
1641         #  @param theVec Vector, defining the plane normal direction.
1642         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1643         #  @param theName Object name; when specified, this parameter is used
1644         #         for result publication in the study. Otherwise, if automatic
1645         #         publication is switched on, default value is used for result name.
1646         #
1647         #  @return New GEOM.GEOM_Object, containing the created plane.
1648         #
1649         #  @ref tui_creation_plane "Example"
1650         @ManageTransactions("BasicOp")
1651         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1652             """
1653             Create a plane, passing through the given point
1654             and normal to the given vector.
1655
1656             Parameters:
1657                 thePnt Point, the plane has to pass through.
1658                 theVec Vector, defining the plane normal direction.
1659                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1660                 theName Object name; when specified, this parameter is used
1661                         for result publication in the study. Otherwise, if automatic
1662                         publication is switched on, default value is used for result name.
1663
1664             Returns:
1665                 New GEOM.GEOM_Object, containing the created plane.
1666             """
1667             # Example: see GEOM_TestAll.py
1668             theTrimSize, Parameters = ParseParameters(theTrimSize);
1669             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1670             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1671             anObj.SetParameters(Parameters)
1672             self._autoPublish(anObj, theName, "plane")
1673             return anObj
1674
1675         ## Create a plane, passing through the three given points
1676         #  @param thePnt1 First of three points, defining the plane.
1677         #  @param thePnt2 Second of three points, defining the plane.
1678         #  @param thePnt3 Fird of three points, defining the plane.
1679         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1680         #  @param theName Object name; when specified, this parameter is used
1681         #         for result publication in the study. Otherwise, if automatic
1682         #         publication is switched on, default value is used for result name.
1683         #
1684         #  @return New GEOM.GEOM_Object, containing the created plane.
1685         #
1686         #  @ref tui_creation_plane "Example"
1687         @ManageTransactions("BasicOp")
1688         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1689             """
1690             Create a plane, passing through the three given points
1691
1692             Parameters:
1693                 thePnt1 First of three points, defining the plane.
1694                 thePnt2 Second of three points, defining the plane.
1695                 thePnt3 Fird of three points, defining the plane.
1696                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1697                 theName Object name; when specified, this parameter is used
1698                         for result publication in the study. Otherwise, if automatic
1699                         publication is switched on, default value is used for result name.
1700
1701             Returns:
1702                 New GEOM.GEOM_Object, containing the created plane.
1703             """
1704             # Example: see GEOM_TestAll.py
1705             theTrimSize, Parameters = ParseParameters(theTrimSize);
1706             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1707             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1708             anObj.SetParameters(Parameters)
1709             self._autoPublish(anObj, theName, "plane")
1710             return anObj
1711
1712         ## Create a plane, similar to the existing one, but with another size of representing face.
1713         #  @param theFace Referenced plane or LCS(Marker).
1714         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1715         #  @param theName Object name; when specified, this parameter is used
1716         #         for result publication in the study. Otherwise, if automatic
1717         #         publication is switched on, default value is used for result name.
1718         #
1719         #  @return New GEOM.GEOM_Object, containing the created plane.
1720         #
1721         #  @ref tui_creation_plane "Example"
1722         @ManageTransactions("BasicOp")
1723         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1724             """
1725             Create a plane, similar to the existing one, but with another size of representing face.
1726
1727             Parameters:
1728                 theFace Referenced plane or LCS(Marker).
1729                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1730                 theName Object name; when specified, this parameter is used
1731                         for result publication in the study. Otherwise, if automatic
1732                         publication is switched on, default value is used for result name.
1733
1734             Returns:
1735                 New GEOM.GEOM_Object, containing the created plane.
1736             """
1737             # Example: see GEOM_TestAll.py
1738             theTrimSize, Parameters = ParseParameters(theTrimSize);
1739             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1740             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1741             anObj.SetParameters(Parameters)
1742             self._autoPublish(anObj, theName, "plane")
1743             return anObj
1744
1745         ## Create a plane, passing through the 2 vectors
1746         #  with center in a start point of the first vector.
1747         #  @param theVec1 Vector, defining center point and plane direction.
1748         #  @param theVec2 Vector, defining the plane normal direction.
1749         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1750         #  @param theName Object name; when specified, this parameter is used
1751         #         for result publication in the study. Otherwise, if automatic
1752         #         publication is switched on, default value is used for result name.
1753         #
1754         #  @return New GEOM.GEOM_Object, containing the created plane.
1755         #
1756         #  @ref tui_creation_plane "Example"
1757         @ManageTransactions("BasicOp")
1758         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1759             """
1760             Create a plane, passing through the 2 vectors
1761             with center in a start point of the first vector.
1762
1763             Parameters:
1764                 theVec1 Vector, defining center point and plane direction.
1765                 theVec2 Vector, defining the plane normal direction.
1766                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1767                 theName Object name; when specified, this parameter is used
1768                         for result publication in the study. Otherwise, if automatic
1769                         publication is switched on, default value is used for result name.
1770
1771             Returns:
1772                 New GEOM.GEOM_Object, containing the created plane.
1773             """
1774             # Example: see GEOM_TestAll.py
1775             theTrimSize, Parameters = ParseParameters(theTrimSize);
1776             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1777             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1778             anObj.SetParameters(Parameters)
1779             self._autoPublish(anObj, theName, "plane")
1780             return anObj
1781
1782         ## Create a plane, based on a Local coordinate system.
1783         #  @param theLCS  coordinate system, defining plane.
1784         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1785         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1786         #  @param theName Object name; when specified, this parameter is used
1787         #         for result publication in the study. Otherwise, if automatic
1788         #         publication is switched on, default value is used for result name.
1789         #
1790         #  @return New GEOM.GEOM_Object, containing the created plane.
1791         #
1792         #  @ref tui_creation_plane "Example"
1793         @ManageTransactions("BasicOp")
1794         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1795             """
1796             Create a plane, based on a Local coordinate system.
1797
1798            Parameters:
1799                 theLCS  coordinate system, defining plane.
1800                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1801                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1802                 theName Object name; when specified, this parameter is used
1803                         for result publication in the study. Otherwise, if automatic
1804                         publication is switched on, default value is used for result name.
1805
1806             Returns:
1807                 New GEOM.GEOM_Object, containing the created plane.
1808             """
1809             # Example: see GEOM_TestAll.py
1810             theTrimSize, Parameters = ParseParameters(theTrimSize);
1811             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1812             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1813             anObj.SetParameters(Parameters)
1814             self._autoPublish(anObj, theName, "plane")
1815             return anObj
1816
1817         ## Create a local coordinate system.
1818         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1819         #  @param XDX,XDY,XDZ Three components of OX direction
1820         #  @param YDX,YDY,YDZ Three components of OY direction
1821         #  @param theName Object name; when specified, this parameter is used
1822         #         for result publication in the study. Otherwise, if automatic
1823         #         publication is switched on, default value is used for result name.
1824         #
1825         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1826         #
1827         #  @ref swig_MakeMarker "Example"
1828         @ManageTransactions("BasicOp")
1829         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1830             """
1831             Create a local coordinate system.
1832
1833             Parameters:
1834                 OX,OY,OZ Three coordinates of coordinate system origin.
1835                 XDX,XDY,XDZ Three components of OX direction
1836                 YDX,YDY,YDZ Three components of OY direction
1837                 theName Object name; when specified, this parameter is used
1838                         for result publication in the study. Otherwise, if automatic
1839                         publication is switched on, default value is used for result name.
1840
1841             Returns:
1842                 New GEOM.GEOM_Object, containing the created coordinate system.
1843             """
1844             # Example: see GEOM_TestAll.py
1845             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1846             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1847             RaiseIfFailed("MakeMarker", self.BasicOp)
1848             anObj.SetParameters(Parameters)
1849             self._autoPublish(anObj, theName, "lcs")
1850             return anObj
1851
1852         ## Create a local coordinate system from shape.
1853         #  @param theShape The initial shape to detect the coordinate system.
1854         #  @param theName Object name; when specified, this parameter is used
1855         #         for result publication in the study. Otherwise, if automatic
1856         #         publication is switched on, default value is used for result name.
1857         #
1858         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1859         #
1860         #  @ref tui_creation_lcs "Example"
1861         @ManageTransactions("BasicOp")
1862         def MakeMarkerFromShape(self, theShape, theName=None):
1863             """
1864             Create a local coordinate system from shape.
1865
1866             Parameters:
1867                 theShape The initial shape to detect the coordinate system.
1868                 theName Object name; when specified, this parameter is used
1869                         for result publication in the study. Otherwise, if automatic
1870                         publication is switched on, default value is used for result name.
1871
1872             Returns:
1873                 New GEOM.GEOM_Object, containing the created coordinate system.
1874             """
1875             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1876             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1877             self._autoPublish(anObj, theName, "lcs")
1878             return anObj
1879
1880         ## Create a local coordinate system from point and two vectors.
1881         #  @param theOrigin Point of coordinate system origin.
1882         #  @param theXVec Vector of X direction
1883         #  @param theYVec Vector of Y direction
1884         #  @param theName Object name; when specified, this parameter is used
1885         #         for result publication in the study. Otherwise, if automatic
1886         #         publication is switched on, default value is used for result name.
1887         #
1888         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1889         #
1890         #  @ref tui_creation_lcs "Example"
1891         @ManageTransactions("BasicOp")
1892         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1893             """
1894             Create a local coordinate system from point and two vectors.
1895
1896             Parameters:
1897                 theOrigin Point of coordinate system origin.
1898                 theXVec Vector of X direction
1899                 theYVec Vector of Y direction
1900                 theName Object name; when specified, this parameter is used
1901                         for result publication in the study. Otherwise, if automatic
1902                         publication is switched on, default value is used for result name.
1903
1904             Returns:
1905                 New GEOM.GEOM_Object, containing the created coordinate system.
1906
1907             """
1908             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1909             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1910             self._autoPublish(anObj, theName, "lcs")
1911             return anObj
1912
1913         # end of l3_basic_go
1914         ## @}
1915
1916         ## @addtogroup l4_curves
1917         ## @{
1918
1919         ##  Create an arc of circle, passing through three given points.
1920         #  @param thePnt1 Start point of the arc.
1921         #  @param thePnt2 Middle point of the arc.
1922         #  @param thePnt3 End point of the arc.
1923         #  @param theName Object name; when specified, this parameter is used
1924         #         for result publication in the study. Otherwise, if automatic
1925         #         publication is switched on, default value is used for result name.
1926         #
1927         #  @return New GEOM.GEOM_Object, containing the created arc.
1928         #
1929         #  @ref swig_MakeArc "Example"
1930         @ManageTransactions("CurvesOp")
1931         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1932             """
1933             Create an arc of circle, passing through three given points.
1934
1935             Parameters:
1936                 thePnt1 Start point of the arc.
1937                 thePnt2 Middle point of the arc.
1938                 thePnt3 End point of the arc.
1939                 theName Object name; when specified, this parameter is used
1940                         for result publication in the study. Otherwise, if automatic
1941                         publication is switched on, default value is used for result name.
1942
1943             Returns:
1944                 New GEOM.GEOM_Object, containing the created arc.
1945             """
1946             # Example: see GEOM_TestAll.py
1947             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1948             RaiseIfFailed("MakeArc", self.CurvesOp)
1949             self._autoPublish(anObj, theName, "arc")
1950             return anObj
1951
1952         ##  Create an arc of circle from a center and 2 points.
1953         #  @param thePnt1 Center of the arc
1954         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1955         #  @param thePnt3 End point of the arc (Gives also a direction)
1956         #  @param theSense Orientation of the arc
1957         #  @param theName Object name; when specified, this parameter is used
1958         #         for result publication in the study. Otherwise, if automatic
1959         #         publication is switched on, default value is used for result name.
1960         #
1961         #  @return New GEOM.GEOM_Object, containing the created arc.
1962         #
1963         #  @ref swig_MakeArc "Example"
1964         @ManageTransactions("CurvesOp")
1965         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1966             """
1967             Create an arc of circle from a center and 2 points.
1968
1969             Parameters:
1970                 thePnt1 Center of the arc
1971                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1972                 thePnt3 End point of the arc (Gives also a direction)
1973                 theSense Orientation of the arc
1974                 theName Object name; when specified, this parameter is used
1975                         for result publication in the study. Otherwise, if automatic
1976                         publication is switched on, default value is used for result name.
1977
1978             Returns:
1979                 New GEOM.GEOM_Object, containing the created arc.
1980             """
1981             # Example: see GEOM_TestAll.py
1982             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1983             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1984             self._autoPublish(anObj, theName, "arc")
1985             return anObj
1986
1987         ##  Create an arc of ellipse, of center and two points.
1988         #  @param theCenter Center of the arc.
1989         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1990         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1991         #  @param theName Object name; when specified, this parameter is used
1992         #         for result publication in the study. Otherwise, if automatic
1993         #         publication is switched on, default value is used for result name.
1994         #
1995         #  @return New GEOM.GEOM_Object, containing the created arc.
1996         #
1997         #  @ref swig_MakeArc "Example"
1998         @ManageTransactions("CurvesOp")
1999         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2000             """
2001             Create an arc of ellipse, of center and two points.
2002
2003             Parameters:
2004                 theCenter Center of the arc.
2005                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2006                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2007                 theName Object name; when specified, this parameter is used
2008                         for result publication in the study. Otherwise, if automatic
2009                         publication is switched on, default value is used for result name.
2010
2011             Returns:
2012                 New GEOM.GEOM_Object, containing the created arc.
2013             """
2014             # Example: see GEOM_TestAll.py
2015             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2016             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2017             self._autoPublish(anObj, theName, "arc")
2018             return anObj
2019
2020         ## Create a circle with given center, normal vector and radius.
2021         #  @param thePnt Circle center.
2022         #  @param theVec Vector, normal to the plane of the circle.
2023         #  @param theR Circle radius.
2024         #  @param theName Object name; when specified, this parameter is used
2025         #         for result publication in the study. Otherwise, if automatic
2026         #         publication is switched on, default value is used for result name.
2027         #
2028         #  @return New GEOM.GEOM_Object, containing the created circle.
2029         #
2030         #  @ref tui_creation_circle "Example"
2031         @ManageTransactions("CurvesOp")
2032         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2033             """
2034             Create a circle with given center, normal vector and radius.
2035
2036             Parameters:
2037                 thePnt Circle center.
2038                 theVec Vector, normal to the plane of the circle.
2039                 theR Circle radius.
2040                 theName Object name; when specified, this parameter is used
2041                         for result publication in the study. Otherwise, if automatic
2042                         publication is switched on, default value is used for result name.
2043
2044             Returns:
2045                 New GEOM.GEOM_Object, containing the created circle.
2046             """
2047             # Example: see GEOM_TestAll.py
2048             theR, Parameters = ParseParameters(theR)
2049             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2050             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2051             anObj.SetParameters(Parameters)
2052             self._autoPublish(anObj, theName, "circle")
2053             return anObj
2054
2055         ## Create a circle with given radius.
2056         #  Center of the circle will be in the origin of global
2057         #  coordinate system and normal vector will be codirected with Z axis
2058         #  @param theR Circle radius.
2059         #  @param theName Object name; when specified, this parameter is used
2060         #         for result publication in the study. Otherwise, if automatic
2061         #         publication is switched on, default value is used for result name.
2062         #
2063         #  @return New GEOM.GEOM_Object, containing the created circle.
2064         @ManageTransactions("CurvesOp")
2065         def MakeCircleR(self, theR, theName=None):
2066             """
2067             Create a circle with given radius.
2068             Center of the circle will be in the origin of global
2069             coordinate system and normal vector will be codirected with Z axis
2070
2071             Parameters:
2072                 theR Circle radius.
2073                 theName Object name; when specified, this parameter is used
2074                         for result publication in the study. Otherwise, if automatic
2075                         publication is switched on, default value is used for result name.
2076
2077             Returns:
2078                 New GEOM.GEOM_Object, containing the created circle.
2079             """
2080             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2081             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2082             self._autoPublish(anObj, theName, "circle")
2083             return anObj
2084
2085         ## Create a circle, passing through three given points
2086         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2087         #  @param theName Object name; when specified, this parameter is used
2088         #         for result publication in the study. Otherwise, if automatic
2089         #         publication is switched on, default value is used for result name.
2090         #
2091         #  @return New GEOM.GEOM_Object, containing the created circle.
2092         #
2093         #  @ref tui_creation_circle "Example"
2094         @ManageTransactions("CurvesOp")
2095         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2096             """
2097             Create a circle, passing through three given points
2098
2099             Parameters:
2100                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2101                 theName Object name; when specified, this parameter is used
2102                         for result publication in the study. Otherwise, if automatic
2103                         publication is switched on, default value is used for result name.
2104
2105             Returns:
2106                 New GEOM.GEOM_Object, containing the created circle.
2107             """
2108             # Example: see GEOM_TestAll.py
2109             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2110             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2111             self._autoPublish(anObj, theName, "circle")
2112             return anObj
2113
2114         ## Create a circle, with given point1 as center,
2115         #  passing through the point2 as radius and laying in the plane,
2116         #  defined by all three given points.
2117         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2118         #  @param theName Object name; when specified, this parameter is used
2119         #         for result publication in the study. Otherwise, if automatic
2120         #         publication is switched on, default value is used for result name.
2121         #
2122         #  @return New GEOM.GEOM_Object, containing the created circle.
2123         #
2124         #  @ref swig_MakeCircle "Example"
2125         @ManageTransactions("CurvesOp")
2126         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2127             """
2128             Create a circle, with given point1 as center,
2129             passing through the point2 as radius and laying in the plane,
2130             defined by all three given points.
2131
2132             Parameters:
2133                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2134                 theName Object name; when specified, this parameter is used
2135                         for result publication in the study. Otherwise, if automatic
2136                         publication is switched on, default value is used for result name.
2137
2138             Returns:
2139                 New GEOM.GEOM_Object, containing the created circle.
2140             """
2141             # Example: see GEOM_example6.py
2142             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2143             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2144             self._autoPublish(anObj, theName, "circle")
2145             return anObj
2146
2147         ## Create an ellipse with given center, normal vector and radiuses.
2148         #  @param thePnt Ellipse center.
2149         #  @param theVec Vector, normal to the plane of the ellipse.
2150         #  @param theRMajor Major ellipse radius.
2151         #  @param theRMinor Minor ellipse radius.
2152         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2153         #  @param theName Object name; when specified, this parameter is used
2154         #         for result publication in the study. Otherwise, if automatic
2155         #         publication is switched on, default value is used for result name.
2156         #
2157         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2158         #
2159         #  @ref tui_creation_ellipse "Example"
2160         @ManageTransactions("CurvesOp")
2161         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2162             """
2163             Create an ellipse with given center, normal vector and radiuses.
2164
2165             Parameters:
2166                 thePnt Ellipse center.
2167                 theVec Vector, normal to the plane of the ellipse.
2168                 theRMajor Major ellipse radius.
2169                 theRMinor Minor ellipse radius.
2170                 theVecMaj Vector, direction of the ellipse's main axis.
2171                 theName Object name; when specified, this parameter is used
2172                         for result publication in the study. Otherwise, if automatic
2173                         publication is switched on, default value is used for result name.
2174
2175             Returns:
2176                 New GEOM.GEOM_Object, containing the created ellipse.
2177             """
2178             # Example: see GEOM_TestAll.py
2179             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2180             if theVecMaj is not None:
2181                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2182             else:
2183                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2184                 pass
2185             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2186             anObj.SetParameters(Parameters)
2187             self._autoPublish(anObj, theName, "ellipse")
2188             return anObj
2189
2190         ## Create an ellipse with given radiuses.
2191         #  Center of the ellipse will be in the origin of global
2192         #  coordinate system and normal vector will be codirected with Z axis
2193         #  @param theRMajor Major ellipse radius.
2194         #  @param theRMinor Minor ellipse radius.
2195         #  @param theName Object name; when specified, this parameter is used
2196         #         for result publication in the study. Otherwise, if automatic
2197         #         publication is switched on, default value is used for result name.
2198         #
2199         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2200         @ManageTransactions("CurvesOp")
2201         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2202             """
2203             Create an ellipse with given radiuses.
2204             Center of the ellipse will be in the origin of global
2205             coordinate system and normal vector will be codirected with Z axis
2206
2207             Parameters:
2208                 theRMajor Major ellipse radius.
2209                 theRMinor Minor ellipse radius.
2210                 theName Object name; when specified, this parameter is used
2211                         for result publication in the study. Otherwise, if automatic
2212                         publication is switched on, default value is used for result name.
2213
2214             Returns:
2215             New GEOM.GEOM_Object, containing the created ellipse.
2216             """
2217             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2218             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2219             self._autoPublish(anObj, theName, "ellipse")
2220             return anObj
2221
2222         ## Create a polyline on the set of points.
2223         #  @param thePoints Sequence of points for the polyline.
2224         #  @param theIsClosed If True, build a closed wire.
2225         #  @param theName Object name; when specified, this parameter is used
2226         #         for result publication in the study. Otherwise, if automatic
2227         #         publication is switched on, default value is used for result name.
2228         #
2229         #  @return New GEOM.GEOM_Object, containing the created polyline.
2230         #
2231         #  @ref tui_creation_curve "Example"
2232         @ManageTransactions("CurvesOp")
2233         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2234             """
2235             Create a polyline on the set of points.
2236
2237             Parameters:
2238                 thePoints Sequence of points for the polyline.
2239                 theIsClosed If True, build a closed wire.
2240                 theName Object name; when specified, this parameter is used
2241                         for result publication in the study. Otherwise, if automatic
2242                         publication is switched on, default value is used for result name.
2243
2244             Returns:
2245                 New GEOM.GEOM_Object, containing the created polyline.
2246             """
2247             # Example: see GEOM_TestAll.py
2248             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2249             RaiseIfFailed("MakePolyline", self.CurvesOp)
2250             self._autoPublish(anObj, theName, "polyline")
2251             return anObj
2252
2253         ## Create bezier curve on the set of points.
2254         #  @param thePoints Sequence of points for the bezier curve.
2255         #  @param theIsClosed If True, build a closed curve.
2256         #  @param theName Object name; when specified, this parameter is used
2257         #         for result publication in the study. Otherwise, if automatic
2258         #         publication is switched on, default value is used for result name.
2259         #
2260         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2261         #
2262         #  @ref tui_creation_curve "Example"
2263         @ManageTransactions("CurvesOp")
2264         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2265             """
2266             Create bezier curve on the set of points.
2267
2268             Parameters:
2269                 thePoints Sequence of points for the bezier curve.
2270                 theIsClosed If True, build a closed curve.
2271                 theName Object name; when specified, this parameter is used
2272                         for result publication in the study. Otherwise, if automatic
2273                         publication is switched on, default value is used for result name.
2274
2275             Returns:
2276                 New GEOM.GEOM_Object, containing the created bezier curve.
2277             """
2278             # Example: see GEOM_TestAll.py
2279             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2280             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2281             self._autoPublish(anObj, theName, "bezier")
2282             return anObj
2283
2284         ## Create B-Spline curve on the set of points.
2285         #  @param thePoints Sequence of points for the B-Spline curve.
2286         #  @param theIsClosed If True, build a closed curve.
2287         #  @param theDoReordering If TRUE, the algo does not follow the order of
2288         #                         \a thePoints but searches for the closest vertex.
2289         #  @param theName Object name; when specified, this parameter is used
2290         #         for result publication in the study. Otherwise, if automatic
2291         #         publication is switched on, default value is used for result name.
2292         #
2293         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2294         #
2295         #  @ref tui_creation_curve "Example"
2296         @ManageTransactions("CurvesOp")
2297         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2298             """
2299             Create B-Spline curve on the set of points.
2300
2301             Parameters:
2302                 thePoints Sequence of points for the B-Spline curve.
2303                 theIsClosed If True, build a closed curve.
2304                 theDoReordering If True, the algo does not follow the order of
2305                                 thePoints but searches for the closest vertex.
2306                 theName Object name; when specified, this parameter is used
2307                         for result publication in the study. Otherwise, if automatic
2308                         publication is switched on, default value is used for result name.
2309
2310             Returns:
2311                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2312             """
2313             # Example: see GEOM_TestAll.py
2314             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2315             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2316             self._autoPublish(anObj, theName, "bspline")
2317             return anObj
2318
2319         ## Create B-Spline curve on the set of points.
2320         #  @param thePoints Sequence of points for the B-Spline curve.
2321         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2322         #  @param theLastVec Vector object, defining the curve direction at its last point.
2323         #  @param theName Object name; when specified, this parameter is used
2324         #         for result publication in the study. Otherwise, if automatic
2325         #         publication is switched on, default value is used for result name.
2326         #
2327         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2328         #
2329         #  @ref tui_creation_curve "Example"
2330         @ManageTransactions("CurvesOp")
2331         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2332             """
2333             Create B-Spline curve on the set of points.
2334
2335             Parameters:
2336                 thePoints Sequence of points for the B-Spline curve.
2337                 theFirstVec Vector object, defining the curve direction at its first point.
2338                 theLastVec Vector object, defining the curve direction at its last point.
2339                 theName Object name; when specified, this parameter is used
2340                         for result publication in the study. Otherwise, if automatic
2341                         publication is switched on, default value is used for result name.
2342
2343             Returns:
2344                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2345             """
2346             # Example: see GEOM_TestAll.py
2347             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2348             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2349             self._autoPublish(anObj, theName, "bspline")
2350             return anObj
2351
2352         ## Creates a curve using the parametric definition of the basic points.
2353         #  @param thexExpr parametric equation of the coordinates X.
2354         #  @param theyExpr parametric equation of the coordinates Y.
2355         #  @param thezExpr parametric equation of the coordinates Z.
2356         #  @param theParamMin the minimal value of the parameter.
2357         #  @param theParamMax the maximum value of the parameter.
2358         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2359         #  @param theCurveType the type of the curve,
2360         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2361         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2362         #  @param theName Object name; when specified, this parameter is used
2363         #         for result publication in the study. Otherwise, if automatic
2364         #         publication is switched on, default value is used for result name.
2365         #
2366         #  @return New GEOM.GEOM_Object, containing the created curve.
2367         #
2368         #  @ref tui_creation_curve "Example"
2369         @ManageTransactions("CurvesOp")
2370         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2371                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2372             """
2373             Creates a curve using the parametric definition of the basic points.
2374
2375             Parameters:
2376                 thexExpr parametric equation of the coordinates X.
2377                 theyExpr parametric equation of the coordinates Y.
2378                 thezExpr parametric equation of the coordinates Z.
2379                 theParamMin the minimal value of the parameter.
2380                 theParamMax the maximum value of the parameter.
2381                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2382                 theCurveType the type of the curve,
2383                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2384                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2385                              method is used which can lead to a bug.
2386                 theName Object name; when specified, this parameter is used
2387                         for result publication in the study. Otherwise, if automatic
2388                         publication is switched on, default value is used for result name.
2389
2390             Returns:
2391                 New GEOM.GEOM_Object, containing the created curve.
2392             """
2393             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2394             if theNewMethod:
2395               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2396             else:
2397               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2398             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2399             anObj.SetParameters(Parameters)
2400             self._autoPublish(anObj, theName, "curve")
2401             return anObj
2402
2403         ## Create an isoline curve on a face.
2404         #  @param theFace the face for which an isoline is created.
2405         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2406         #         creation.
2407         #  @param theParameter the U parameter for U-isoline or V parameter
2408         #         for V-isoline.
2409         #  @param theName Object name; when specified, this parameter is used
2410         #         for result publication in the study. Otherwise, if automatic
2411         #         publication is switched on, default value is used for result name.
2412         #
2413         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2414         #          a compound of edges.
2415         #
2416         #  @ref tui_creation_curve "Example"
2417         @ManageTransactions("CurvesOp")
2418         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2419             """
2420             Create an isoline curve on a face.
2421
2422             Parameters:
2423                 theFace the face for which an isoline is created.
2424                 IsUIsoline True for U-isoline creation; False for V-isoline
2425                            creation.
2426                 theParameter the U parameter for U-isoline or V parameter
2427                              for V-isoline.
2428                 theName Object name; when specified, this parameter is used
2429                         for result publication in the study. Otherwise, if automatic
2430                         publication is switched on, default value is used for result name.
2431
2432             Returns:
2433                 New GEOM.GEOM_Object, containing the created isoline edge or a
2434                 compound of edges.
2435             """
2436             # Example: see GEOM_TestAll.py
2437             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2438             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2439             if IsUIsoline:
2440                 self._autoPublish(anObj, theName, "U-Isoline")
2441             else:
2442                 self._autoPublish(anObj, theName, "V-Isoline")
2443             return anObj
2444
2445         # end of l4_curves
2446         ## @}
2447
2448         ## @addtogroup l3_sketcher
2449         ## @{
2450
2451         ## Create a sketcher (wire or face), following the textual description,
2452         #  passed through <VAR>theCommand</VAR> argument. \n
2453         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2454         #  Format of the description string have to be the following:
2455         #
2456         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2457         #
2458         #  Where:
2459         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2460         #  - CMD is one of
2461         #     - "R angle" : Set the direction by angle
2462         #     - "D dx dy" : Set the direction by DX & DY
2463         #     .
2464         #       \n
2465         #     - "TT x y" : Create segment by point at X & Y
2466         #     - "T dx dy" : Create segment by point with DX & DY
2467         #     - "L length" : Create segment by direction & Length
2468         #     - "IX x" : Create segment by direction & Intersect. X
2469         #     - "IY y" : Create segment by direction & Intersect. Y
2470         #     .
2471         #       \n
2472         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2473         #     - "AA x y": Create arc by point at X & Y
2474         #     - "A dx dy" : Create arc by point with DX & DY
2475         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2476         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2477         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2478         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2479         #     .
2480         #       \n
2481         #     - "WW" : Close Wire (to finish)
2482         #     - "WF" : Close Wire and build face (to finish)
2483         #     .
2484         #        \n
2485         #  - Flag1 (= reverse) is 0 or 2 ...
2486         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2487         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2488         #     .
2489         #        \n
2490         #  - Flag2 (= control tolerance) is 0 or 1 ...
2491         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2492         #     - if 1 the wire is built only if the end point is on the arc
2493         #       with a tolerance of 10^-7 on the distance else the creation fails
2494         #
2495         #  @param theCommand String, defining the sketcher in local
2496         #                    coordinates of the working plane.
2497         #  @param theWorkingPlane Nine double values, defining origin,
2498         #                         OZ and OX directions of the working plane.
2499         #  @param theName Object name; when specified, this parameter is used
2500         #         for result publication in the study. Otherwise, if automatic
2501         #         publication is switched on, default value is used for result name.
2502         #
2503         #  @return New GEOM.GEOM_Object, containing the created wire.
2504         #
2505         #  @ref tui_sketcher_page "Example"
2506         @ManageTransactions("CurvesOp")
2507         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2508             """
2509             Create a sketcher (wire or face), following the textual description, passed
2510             through theCommand argument.
2511             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2512             Format of the description string have to be the following:
2513                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2514             Where:
2515             - x1, y1 are coordinates of the first sketcher point (zero by default),
2516             - CMD is one of
2517                - "R angle" : Set the direction by angle
2518                - "D dx dy" : Set the direction by DX & DY
2519
2520                - "TT x y" : Create segment by point at X & Y
2521                - "T dx dy" : Create segment by point with DX & DY
2522                - "L length" : Create segment by direction & Length
2523                - "IX x" : Create segment by direction & Intersect. X
2524                - "IY y" : Create segment by direction & Intersect. Y
2525
2526                - "C radius length" : Create arc by direction, radius and length(in degree)
2527                - "AA x y": Create arc by point at X & Y
2528                - "A dx dy" : Create arc by point with DX & DY
2529                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2530                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2531                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2532                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2533
2534                - "WW" : Close Wire (to finish)
2535                - "WF" : Close Wire and build face (to finish)
2536
2537             - Flag1 (= reverse) is 0 or 2 ...
2538                - if 0 the drawn arc is the one of lower angle (< Pi)
2539                - if 2 the drawn arc ius the one of greater angle (> Pi)
2540
2541             - Flag2 (= control tolerance) is 0 or 1 ...
2542                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2543                - if 1 the wire is built only if the end point is on the arc
2544                  with a tolerance of 10^-7 on the distance else the creation fails
2545
2546             Parameters:
2547                 theCommand String, defining the sketcher in local
2548                            coordinates of the working plane.
2549                 theWorkingPlane Nine double values, defining origin,
2550                                 OZ and OX directions of the working plane.
2551                 theName Object name; when specified, this parameter is used
2552                         for result publication in the study. Otherwise, if automatic
2553                         publication is switched on, default value is used for result name.
2554
2555             Returns:
2556                 New GEOM.GEOM_Object, containing the created wire.
2557             """
2558             # Example: see GEOM_TestAll.py
2559             theCommand,Parameters = ParseSketcherCommand(theCommand)
2560             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2561             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2562             anObj.SetParameters(Parameters)
2563             self._autoPublish(anObj, theName, "wire")
2564             return anObj
2565
2566         ## Create a sketcher (wire or face), following the textual description,
2567         #  passed through <VAR>theCommand</VAR> argument. \n
2568         #  For format of the description string see MakeSketcher() method.\n
2569         #  @param theCommand String, defining the sketcher in local
2570         #                    coordinates of the working plane.
2571         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2572         #  @param theName Object name; when specified, this parameter is used
2573         #         for result publication in the study. Otherwise, if automatic
2574         #         publication is switched on, default value is used for result name.
2575         #
2576         #  @return New GEOM.GEOM_Object, containing the created wire.
2577         #
2578         #  @ref tui_sketcher_page "Example"
2579         @ManageTransactions("CurvesOp")
2580         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2581             """
2582             Create a sketcher (wire or face), following the textual description,
2583             passed through theCommand argument.
2584             For format of the description string see geompy.MakeSketcher() method.
2585
2586             Parameters:
2587                 theCommand String, defining the sketcher in local
2588                            coordinates of the working plane.
2589                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2590                 theName Object name; when specified, this parameter is used
2591                         for result publication in the study. Otherwise, if automatic
2592                         publication is switched on, default value is used for result name.
2593
2594             Returns:
2595                 New GEOM.GEOM_Object, containing the created wire.
2596             """
2597             theCommand,Parameters = ParseSketcherCommand(theCommand)
2598             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2599             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2600             anObj.SetParameters(Parameters)
2601             self._autoPublish(anObj, theName, "wire")
2602             return anObj
2603
2604         ## Obtain a 2D sketcher interface
2605         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2606         def Sketcher2D (self):
2607             """
2608             Obtain a 2D sketcher interface.
2609
2610             Example of usage:
2611                sk = geompy.Sketcher2D()
2612                sk.addPoint(20, 20)
2613                sk.addSegmentRelative(15, 70)
2614                sk.addSegmentPerpY(50)
2615                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2616                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2617                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2618                sk.close()
2619                Sketch_1 = sk.wire(geomObj_1)
2620             """
2621             sk = Sketcher2D (self)
2622             return sk
2623
2624         ## Create a sketcher wire, following the numerical description,
2625         #  passed through <VAR>theCoordinates</VAR> argument. \n
2626         #  @param theCoordinates double values, defining points to create a wire,
2627         #                                                      passing from it.
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created wire.
2633         #
2634         #  @ref tui_3dsketcher_page "Example"
2635         @ManageTransactions("CurvesOp")
2636         def Make3DSketcher(self, theCoordinates, theName=None):
2637             """
2638             Create a sketcher wire, following the numerical description,
2639             passed through theCoordinates argument.
2640
2641             Parameters:
2642                 theCoordinates double values, defining points to create a wire,
2643                                passing from it.
2644                 theName Object name; when specified, this parameter is used
2645                         for result publication in the study. Otherwise, if automatic
2646                         publication is switched on, default value is used for result name.
2647
2648             Returns:
2649                 New GEOM_Object, containing the created wire.
2650             """
2651             theCoordinates,Parameters = ParseParameters(theCoordinates)
2652             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2653             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2654             anObj.SetParameters(Parameters)
2655             self._autoPublish(anObj, theName, "wire")
2656             return anObj
2657
2658         ## Obtain a 3D sketcher interface
2659         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2660         #
2661         #  @ref tui_3dsketcher_page "Example"
2662         def Sketcher3D (self):
2663             """
2664             Obtain a 3D sketcher interface.
2665
2666             Example of usage:
2667                 sk = geompy.Sketcher3D()
2668                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2669                 sk.addPointsRelative(0, 0, 130)
2670                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2671                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2672                 sk.close()
2673                 a3D_Sketcher_1 = sk.wire()
2674             """
2675             sk = Sketcher3D (self)
2676             return sk
2677
2678         ## Obtain a 2D polyline creation interface
2679         #  @return An instance of @ref gsketcher.Polyline2D "Polyline2D" interface
2680         #
2681         #  @ref tui_3dsketcher_page "Example"
2682         def Polyline2D (self):
2683             """
2684             Obtain a 2D polyline creation interface.
2685
2686             Example of usage:
2687                 pl = geompy.Polyline2D()
2688                 pl.addSection("section 1", GEOM.Polyline, True)
2689                 pl.addPoints(0, 0, 10, 0, 10, 10)
2690                 pl.addSection("section 2", GEOM.Interpolation, False)
2691                 pl.addPoints(20, 0, 30, 0, 30, 10)
2692                 resultObj = pl.result(WorkingPlane)
2693             """
2694             pl = Polyline2D (self)
2695             return pl
2696
2697         # end of l3_sketcher
2698         ## @}
2699
2700         ## @addtogroup l3_3d_primitives
2701         ## @{
2702
2703         ## Create a box by coordinates of two opposite vertices.
2704         #
2705         #  @param x1,y1,z1 double values, defining first point it.
2706         #  @param x2,y2,z2 double values, defining first point it.
2707         #  @param theName Object name; when specified, this parameter is used
2708         #         for result publication in the study. Otherwise, if automatic
2709         #         publication is switched on, default value is used for result name.
2710         #
2711         #  @return New GEOM.GEOM_Object, containing the created box.
2712         #
2713         #  @ref tui_creation_box "Example"
2714         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2715             """
2716             Create a box by coordinates of two opposite vertices.
2717
2718             Parameters:
2719                 x1,y1,z1 double values, defining first point.
2720                 x2,y2,z2 double values, defining second point.
2721                 theName Object name; when specified, this parameter is used
2722                         for result publication in the study. Otherwise, if automatic
2723                         publication is switched on, default value is used for result name.
2724
2725             Returns:
2726                 New GEOM.GEOM_Object, containing the created box.
2727             """
2728             # Example: see GEOM_TestAll.py
2729             pnt1 = self.MakeVertex(x1,y1,z1)
2730             pnt2 = self.MakeVertex(x2,y2,z2)
2731             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2732             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2733
2734         ## Create a box with specified dimensions along the coordinate axes
2735         #  and with edges, parallel to the coordinate axes.
2736         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2737         #  @param theDX Length of Box edges, parallel to OX axis.
2738         #  @param theDY Length of Box edges, parallel to OY axis.
2739         #  @param theDZ Length of Box edges, parallel to OZ axis.
2740         #  @param theName Object name; when specified, this parameter is used
2741         #         for result publication in the study. Otherwise, if automatic
2742         #         publication is switched on, default value is used for result name.
2743         #
2744         #  @return New GEOM.GEOM_Object, containing the created box.
2745         #
2746         #  @ref tui_creation_box "Example"
2747         @ManageTransactions("PrimOp")
2748         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2749             """
2750             Create a box with specified dimensions along the coordinate axes
2751             and with edges, parallel to the coordinate axes.
2752             Center of the box will be at point (DX/2, DY/2, DZ/2).
2753
2754             Parameters:
2755                 theDX Length of Box edges, parallel to OX axis.
2756                 theDY Length of Box edges, parallel to OY axis.
2757                 theDZ Length of Box edges, parallel to OZ axis.
2758                 theName Object name; when specified, this parameter is used
2759                         for result publication in the study. Otherwise, if automatic
2760                         publication is switched on, default value is used for result name.
2761
2762             Returns:
2763                 New GEOM.GEOM_Object, containing the created box.
2764             """
2765             # Example: see GEOM_TestAll.py
2766             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2767             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2768             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2769             anObj.SetParameters(Parameters)
2770             self._autoPublish(anObj, theName, "box")
2771             return anObj
2772
2773         ## Create a box with two specified opposite vertices,
2774         #  and with edges, parallel to the coordinate axes
2775         #  @param thePnt1 First of two opposite vertices.
2776         #  @param thePnt2 Second of two opposite vertices.
2777         #  @param theName Object name; when specified, this parameter is used
2778         #         for result publication in the study. Otherwise, if automatic
2779         #         publication is switched on, default value is used for result name.
2780         #
2781         #  @return New GEOM.GEOM_Object, containing the created box.
2782         #
2783         #  @ref tui_creation_box "Example"
2784         @ManageTransactions("PrimOp")
2785         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2786             """
2787             Create a box with two specified opposite vertices,
2788             and with edges, parallel to the coordinate axes
2789
2790             Parameters:
2791                 thePnt1 First of two opposite vertices.
2792                 thePnt2 Second of two opposite vertices.
2793                 theName Object name; when specified, this parameter is used
2794                         for result publication in the study. Otherwise, if automatic
2795                         publication is switched on, default value is used for result name.
2796
2797             Returns:
2798                 New GEOM.GEOM_Object, containing the created box.
2799             """
2800             # Example: see GEOM_TestAll.py
2801             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2802             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2803             self._autoPublish(anObj, theName, "box")
2804             return anObj
2805
2806         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2807         #  @param theH height of Face.
2808         #  @param theW width of Face.
2809         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2810         #  @param theName Object name; when specified, this parameter is used
2811         #         for result publication in the study. Otherwise, if automatic
2812         #         publication is switched on, default value is used for result name.
2813         #
2814         #  @return New GEOM.GEOM_Object, containing the created face.
2815         #
2816         #  @ref tui_creation_face "Example"
2817         @ManageTransactions("PrimOp")
2818         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2819             """
2820             Create a face with specified dimensions with edges parallel to coordinate axes.
2821
2822             Parameters:
2823                 theH height of Face.
2824                 theW width of Face.
2825                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2826                 theName Object name; when specified, this parameter is used
2827                         for result publication in the study. Otherwise, if automatic
2828                         publication is switched on, default value is used for result name.
2829
2830             Returns:
2831                 New GEOM.GEOM_Object, containing the created face.
2832             """
2833             # Example: see GEOM_TestAll.py
2834             theH,theW,Parameters = ParseParameters(theH, theW)
2835             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2836             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2837             anObj.SetParameters(Parameters)
2838             self._autoPublish(anObj, theName, "rectangle")
2839             return anObj
2840
2841         ## Create a face from another plane and two sizes,
2842         #  vertical size and horisontal size.
2843         #  @param theObj   Normale vector to the creating face or
2844         #  the face object.
2845         #  @param theH     Height (vertical size).
2846         #  @param theW     Width (horisontal size).
2847         #  @param theName Object name; when specified, this parameter is used
2848         #         for result publication in the study. Otherwise, if automatic
2849         #         publication is switched on, default value is used for result name.
2850         #
2851         #  @return New GEOM.GEOM_Object, containing the created face.
2852         #
2853         #  @ref tui_creation_face "Example"
2854         @ManageTransactions("PrimOp")
2855         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2856             """
2857             Create a face from another plane and two sizes,
2858             vertical size and horisontal size.
2859
2860             Parameters:
2861                 theObj   Normale vector to the creating face or
2862                          the face object.
2863                 theH     Height (vertical size).
2864                 theW     Width (horisontal size).
2865                 theName Object name; when specified, this parameter is used
2866                         for result publication in the study. Otherwise, if automatic
2867                         publication is switched on, default value is used for result name.
2868
2869             Returns:
2870                 New GEOM_Object, containing the created face.
2871             """
2872             # Example: see GEOM_TestAll.py
2873             theH,theW,Parameters = ParseParameters(theH, theW)
2874             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2875             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2876             anObj.SetParameters(Parameters)
2877             self._autoPublish(anObj, theName, "rectangle")
2878             return anObj
2879
2880         ## Create a disk with given center, normal vector and radius.
2881         #  @param thePnt Disk center.
2882         #  @param theVec Vector, normal to the plane of the disk.
2883         #  @param theR Disk radius.
2884         #  @param theName Object name; when specified, this parameter is used
2885         #         for result publication in the study. Otherwise, if automatic
2886         #         publication is switched on, default value is used for result name.
2887         #
2888         #  @return New GEOM.GEOM_Object, containing the created disk.
2889         #
2890         #  @ref tui_creation_disk "Example"
2891         @ManageTransactions("PrimOp")
2892         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2893             """
2894             Create a disk with given center, normal vector and radius.
2895
2896             Parameters:
2897                 thePnt Disk center.
2898                 theVec Vector, normal to the plane of the disk.
2899                 theR Disk radius.
2900                 theName Object name; when specified, this parameter is used
2901                         for result publication in the study. Otherwise, if automatic
2902                         publication is switched on, default value is used for result name.
2903
2904             Returns:
2905                 New GEOM.GEOM_Object, containing the created disk.
2906             """
2907             # Example: see GEOM_TestAll.py
2908             theR,Parameters = ParseParameters(theR)
2909             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2910             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2911             anObj.SetParameters(Parameters)
2912             self._autoPublish(anObj, theName, "disk")
2913             return anObj
2914
2915         ## Create a disk, passing through three given points
2916         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2917         #  @param theName Object name; when specified, this parameter is used
2918         #         for result publication in the study. Otherwise, if automatic
2919         #         publication is switched on, default value is used for result name.
2920         #
2921         #  @return New GEOM.GEOM_Object, containing the created disk.
2922         #
2923         #  @ref tui_creation_disk "Example"
2924         @ManageTransactions("PrimOp")
2925         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2926             """
2927             Create a disk, passing through three given points
2928
2929             Parameters:
2930                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2931                 theName Object name; when specified, this parameter is used
2932                         for result publication in the study. Otherwise, if automatic
2933                         publication is switched on, default value is used for result name.
2934
2935             Returns:
2936                 New GEOM.GEOM_Object, containing the created disk.
2937             """
2938             # Example: see GEOM_TestAll.py
2939             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2940             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2941             self._autoPublish(anObj, theName, "disk")
2942             return anObj
2943
2944         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2945         #  @param theR Radius of Face.
2946         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2947         #  @param theName Object name; when specified, this parameter is used
2948         #         for result publication in the study. Otherwise, if automatic
2949         #         publication is switched on, default value is used for result name.
2950         #
2951         #  @return New GEOM.GEOM_Object, containing the created disk.
2952         #
2953         #  @ref tui_creation_face "Example"
2954         @ManageTransactions("PrimOp")
2955         def MakeDiskR(self, theR, theOrientation, theName=None):
2956             """
2957             Create a disk with specified dimensions along OX-OY coordinate axes.
2958
2959             Parameters:
2960                 theR Radius of Face.
2961                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2962                 theName Object name; when specified, this parameter is used
2963                         for result publication in the study. Otherwise, if automatic
2964                         publication is switched on, default value is used for result name.
2965
2966             Returns:
2967                 New GEOM.GEOM_Object, containing the created disk.
2968
2969             Example of usage:
2970                 Disk3 = geompy.MakeDiskR(100., 1)
2971             """
2972             # Example: see GEOM_TestAll.py
2973             theR,Parameters = ParseParameters(theR)
2974             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2975             RaiseIfFailed("MakeDiskR", self.PrimOp)
2976             anObj.SetParameters(Parameters)
2977             self._autoPublish(anObj, theName, "disk")
2978             return anObj
2979
2980         ## Create a cylinder with given base point, axis, radius and height.
2981         #  @param thePnt Central point of cylinder base.
2982         #  @param theAxis Cylinder axis.
2983         #  @param theR Cylinder radius.
2984         #  @param theH Cylinder height.
2985         #  @param theName Object name; when specified, this parameter is used
2986         #         for result publication in the study. Otherwise, if automatic
2987         #         publication is switched on, default value is used for result name.
2988         #
2989         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2990         #
2991         #  @ref tui_creation_cylinder "Example"
2992         @ManageTransactions("PrimOp")
2993         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2994             """
2995             Create a cylinder with given base point, axis, radius and height.
2996
2997             Parameters:
2998                 thePnt Central point of cylinder base.
2999                 theAxis Cylinder axis.
3000                 theR Cylinder radius.
3001                 theH Cylinder height.
3002                 theName Object name; when specified, this parameter is used
3003                         for result publication in the study. Otherwise, if automatic
3004                         publication is switched on, default value is used for result name.
3005
3006             Returns:
3007                 New GEOM.GEOM_Object, containing the created cylinder.
3008             """
3009             # Example: see GEOM_TestAll.py
3010             theR,theH,Parameters = ParseParameters(theR, theH)
3011             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
3012             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
3013             anObj.SetParameters(Parameters)
3014             self._autoPublish(anObj, theName, "cylinder")
3015             return anObj
3016             
3017         ## Create a portion of cylinder with given base point, axis, radius, height and angle.
3018         #  @param thePnt Central point of cylinder base.
3019         #  @param theAxis Cylinder axis.
3020         #  @param theR Cylinder radius.
3021         #  @param theH Cylinder height.
3022         #  @param theA Cylinder angle in radians.
3023         #  @param theName Object name; when specified, this parameter is used
3024         #         for result publication in the study. Otherwise, if automatic
3025         #         publication is switched on, default value is used for result name.
3026         #
3027         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3028         #
3029         #  @ref tui_creation_cylinder "Example"
3030         @ManageTransactions("PrimOp")
3031         def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
3032             """
3033             Create a portion of cylinder with given base point, axis, radius, height and angle.
3034
3035             Parameters:
3036                 thePnt Central point of cylinder base.
3037                 theAxis Cylinder axis.
3038                 theR Cylinder radius.
3039                 theH Cylinder height.
3040                 theA Cylinder angle in radians.
3041                 theName Object name; when specified, this parameter is used
3042                         for result publication in the study. Otherwise, if automatic
3043                         publication is switched on, default value is used for result name.
3044
3045             Returns:
3046                 New GEOM.GEOM_Object, containing the created cylinder.
3047             """
3048             # Example: see GEOM_TestAll.py
3049             flag = False
3050             if isinstance(theA,str):
3051                 flag = True
3052             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3053             if flag:
3054                 theA = theA*math.pi/180.
3055             anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
3056             RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
3057             anObj.SetParameters(Parameters)
3058             self._autoPublish(anObj, theName, "cylinder")
3059             return anObj
3060
3061         ## Create a cylinder with given radius and height at
3062         #  the origin of coordinate system. Axis of the cylinder
3063         #  will be collinear to the OZ axis of the coordinate system.
3064         #  @param theR Cylinder radius.
3065         #  @param theH Cylinder height.
3066         #  @param theName Object name; when specified, this parameter is used
3067         #         for result publication in the study. Otherwise, if automatic
3068         #         publication is switched on, default value is used for result name.
3069         #
3070         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3071         #
3072         #  @ref tui_creation_cylinder "Example"
3073         @ManageTransactions("PrimOp")
3074         def MakeCylinderRH(self, theR, theH, theName=None):
3075             """
3076             Create a cylinder with given radius and height at
3077             the origin of coordinate system. Axis of the cylinder
3078             will be collinear to the OZ axis of the coordinate system.
3079
3080             Parameters:
3081                 theR Cylinder radius.
3082                 theH Cylinder height.
3083                 theName Object name; when specified, this parameter is used
3084                         for result publication in the study. Otherwise, if automatic
3085                         publication is switched on, default value is used for result name.
3086
3087             Returns:
3088                 New GEOM.GEOM_Object, containing the created cylinder.
3089             """
3090             # Example: see GEOM_TestAll.py
3091             theR,theH,Parameters = ParseParameters(theR, theH)
3092             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3093             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3094             anObj.SetParameters(Parameters)
3095             self._autoPublish(anObj, theName, "cylinder")
3096             return anObj
3097             
3098         ## Create a portion of cylinder with given radius, height and angle at
3099         #  the origin of coordinate system. Axis of the cylinder
3100         #  will be collinear to the OZ axis of the coordinate system.
3101         #  @param theR Cylinder radius.
3102         #  @param theH Cylinder height.
3103         #  @param theA Cylinder angle in radians.
3104         #  @param theName Object name; when specified, this parameter is used
3105         #         for result publication in the study. Otherwise, if automatic
3106         #         publication is switched on, default value is used for result name.
3107         #
3108         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3109         #
3110         #  @ref tui_creation_cylinder "Example"
3111         @ManageTransactions("PrimOp")
3112         def MakeCylinderRHA(self, theR, theH, theA, theName=None):
3113             """
3114             Create a portion of cylinder with given radius, height and angle at
3115             the origin of coordinate system. Axis of the cylinder
3116             will be collinear to the OZ axis of the coordinate system.
3117
3118             Parameters:
3119                 theR Cylinder radius.
3120                 theH Cylinder height.
3121                 theA Cylinder angle in radians.
3122                 theName Object name; when specified, this parameter is used
3123                         for result publication in the study. Otherwise, if automatic
3124                         publication is switched on, default value is used for result name.
3125
3126             Returns:
3127                 New GEOM.GEOM_Object, containing the created cylinder.
3128             """
3129             # Example: see GEOM_TestAll.py
3130             flag = False
3131             if isinstance(theA,str):
3132                 flag = True
3133             theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
3134             if flag:
3135                 theA = theA*math.pi/180.
3136             anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
3137             RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
3138             anObj.SetParameters(Parameters)
3139             self._autoPublish(anObj, theName, "cylinder")
3140             return anObj
3141
3142         ## Create a sphere with given center and radius.
3143         #  @param thePnt Sphere center.
3144         #  @param theR Sphere radius.
3145         #  @param theName Object name; when specified, this parameter is used
3146         #         for result publication in the study. Otherwise, if automatic
3147         #         publication is switched on, default value is used for result name.
3148         #
3149         #  @return New GEOM.GEOM_Object, containing the created sphere.
3150         #
3151         #  @ref tui_creation_sphere "Example"
3152         @ManageTransactions("PrimOp")
3153         def MakeSpherePntR(self, thePnt, theR, theName=None):
3154             """
3155             Create a sphere with given center and radius.
3156
3157             Parameters:
3158                 thePnt Sphere center.
3159                 theR Sphere radius.
3160                 theName Object name; when specified, this parameter is used
3161                         for result publication in the study. Otherwise, if automatic
3162                         publication is switched on, default value is used for result name.
3163
3164             Returns:
3165                 New GEOM.GEOM_Object, containing the created sphere.
3166             """
3167             # Example: see GEOM_TestAll.py
3168             theR,Parameters = ParseParameters(theR)
3169             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3170             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3171             anObj.SetParameters(Parameters)
3172             self._autoPublish(anObj, theName, "sphere")
3173             return anObj
3174
3175         ## Create a sphere with given center and radius.
3176         #  @param x,y,z Coordinates of sphere center.
3177         #  @param theR Sphere radius.
3178         #  @param theName Object name; when specified, this parameter is used
3179         #         for result publication in the study. Otherwise, if automatic
3180         #         publication is switched on, default value is used for result name.
3181         #
3182         #  @return New GEOM.GEOM_Object, containing the created sphere.
3183         #
3184         #  @ref tui_creation_sphere "Example"
3185         def MakeSphere(self, x, y, z, theR, theName=None):
3186             """
3187             Create a sphere with given center and radius.
3188
3189             Parameters:
3190                 x,y,z Coordinates of sphere center.
3191                 theR Sphere radius.
3192                 theName Object name; when specified, this parameter is used
3193                         for result publication in the study. Otherwise, if automatic
3194                         publication is switched on, default value is used for result name.
3195
3196             Returns:
3197                 New GEOM.GEOM_Object, containing the created sphere.
3198             """
3199             # Example: see GEOM_TestAll.py
3200             point = self.MakeVertex(x, y, z)
3201             # note: auto-publishing is done in self.MakeSpherePntR()
3202             anObj = self.MakeSpherePntR(point, theR, theName)
3203             return anObj
3204
3205         ## Create a sphere with given radius at the origin of coordinate system.
3206         #  @param theR Sphere radius.
3207         #  @param theName Object name; when specified, this parameter is used
3208         #         for result publication in the study. Otherwise, if automatic
3209         #         publication is switched on, default value is used for result name.
3210         #
3211         #  @return New GEOM.GEOM_Object, containing the created sphere.
3212         #
3213         #  @ref tui_creation_sphere "Example"
3214         @ManageTransactions("PrimOp")
3215         def MakeSphereR(self, theR, theName=None):
3216             """
3217             Create a sphere with given radius at the origin of coordinate system.
3218
3219             Parameters:
3220                 theR Sphere radius.
3221                 theName Object name; when specified, this parameter is used
3222                         for result publication in the study. Otherwise, if automatic
3223                         publication is switched on, default value is used for result name.
3224
3225             Returns:
3226                 New GEOM.GEOM_Object, containing the created sphere.
3227             """
3228             # Example: see GEOM_TestAll.py
3229             theR,Parameters = ParseParameters(theR)
3230             anObj = self.PrimOp.MakeSphereR(theR)
3231             RaiseIfFailed("MakeSphereR", self.PrimOp)
3232             anObj.SetParameters(Parameters)
3233             self._autoPublish(anObj, theName, "sphere")
3234             return anObj
3235
3236         ## Create a cone with given base point, axis, height and radiuses.
3237         #  @param thePnt Central point of the first cone base.
3238         #  @param theAxis Cone axis.
3239         #  @param theR1 Radius of the first cone base.
3240         #  @param theR2 Radius of the second cone base.
3241         #    \note If both radiuses are non-zero, the cone will be truncated.
3242         #    \note If the radiuses are equal, a cylinder will be created instead.
3243         #  @param theH Cone height.
3244         #  @param theName Object name; when specified, this parameter is used
3245         #         for result publication in the study. Otherwise, if automatic
3246         #         publication is switched on, default value is used for result name.
3247         #
3248         #  @return New GEOM.GEOM_Object, containing the created cone.
3249         #
3250         #  @ref tui_creation_cone "Example"
3251         @ManageTransactions("PrimOp")
3252         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3253             """
3254             Create a cone with given base point, axis, height and radiuses.
3255
3256             Parameters:
3257                 thePnt Central point of the first cone base.
3258                 theAxis Cone axis.
3259                 theR1 Radius of the first cone base.
3260                 theR2 Radius of the second cone base.
3261                 theH Cone height.
3262                 theName Object name; when specified, this parameter is used
3263                         for result publication in the study. Otherwise, if automatic
3264                         publication is switched on, default value is used for result name.
3265
3266             Note:
3267                 If both radiuses are non-zero, the cone will be truncated.
3268                 If the radiuses are equal, a cylinder will be created instead.
3269
3270             Returns:
3271                 New GEOM.GEOM_Object, containing the created cone.
3272             """
3273             # Example: see GEOM_TestAll.py
3274             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3275             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3276             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3277             anObj.SetParameters(Parameters)
3278             self._autoPublish(anObj, theName, "cone")
3279             return anObj
3280
3281         ## Create a cone with given height and radiuses at
3282         #  the origin of coordinate system. Axis of the cone will
3283         #  be collinear to the OZ axis of the coordinate system.
3284         #  @param theR1 Radius of the first cone base.
3285         #  @param theR2 Radius of the second cone base.
3286         #    \note If both radiuses are non-zero, the cone will be truncated.
3287         #    \note If the radiuses are equal, a cylinder will be created instead.
3288         #  @param theH Cone height.
3289         #  @param theName Object name; when specified, this parameter is used
3290         #         for result publication in the study. Otherwise, if automatic
3291         #         publication is switched on, default value is used for result name.
3292         #
3293         #  @return New GEOM.GEOM_Object, containing the created cone.
3294         #
3295         #  @ref tui_creation_cone "Example"
3296         @ManageTransactions("PrimOp")
3297         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3298             """
3299             Create a cone with given height and radiuses at
3300             the origin of coordinate system. Axis of the cone will
3301             be collinear to the OZ axis of the coordinate system.
3302
3303             Parameters:
3304                 theR1 Radius of the first cone base.
3305                 theR2 Radius of the second cone base.
3306                 theH Cone height.
3307                 theName Object name; when specified, this parameter is used
3308                         for result publication in the study. Otherwise, if automatic
3309                         publication is switched on, default value is used for result name.
3310
3311             Note:
3312                 If both radiuses are non-zero, the cone will be truncated.
3313                 If the radiuses are equal, a cylinder will be created instead.
3314
3315             Returns:
3316                 New GEOM.GEOM_Object, containing the created cone.
3317             """
3318             # Example: see GEOM_TestAll.py
3319             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3320             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3321             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3322             anObj.SetParameters(Parameters)
3323             self._autoPublish(anObj, theName, "cone")
3324             return anObj
3325
3326         ## Create a torus with given center, normal vector and radiuses.
3327         #  @param thePnt Torus central point.
3328         #  @param theVec Torus axis of symmetry.
3329         #  @param theRMajor Torus major radius.
3330         #  @param theRMinor Torus minor radius.
3331         #  @param theName Object name; when specified, this parameter is used
3332         #         for result publication in the study. Otherwise, if automatic
3333         #         publication is switched on, default value is used for result name.
3334         #
3335         #  @return New GEOM.GEOM_Object, containing the created torus.
3336         #
3337         #  @ref tui_creation_torus "Example"
3338         @ManageTransactions("PrimOp")
3339         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3340             """
3341             Create a torus with given center, normal vector and radiuses.
3342
3343             Parameters:
3344                 thePnt Torus central point.
3345                 theVec Torus axis of symmetry.
3346                 theRMajor Torus major radius.
3347                 theRMinor Torus minor radius.
3348                 theName Object name; when specified, this parameter is used
3349                         for result publication in the study. Otherwise, if automatic
3350                         publication is switched on, default value is used for result name.
3351
3352            Returns:
3353                 New GEOM.GEOM_Object, containing the created torus.
3354             """
3355             # Example: see GEOM_TestAll.py
3356             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3357             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3358             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3359             anObj.SetParameters(Parameters)
3360             self._autoPublish(anObj, theName, "torus")
3361             return anObj
3362
3363         ## Create a torus with given radiuses at the origin of coordinate system.
3364         #  @param theRMajor Torus major radius.
3365         #  @param theRMinor Torus minor radius.
3366         #  @param theName Object name; when specified, this parameter is used
3367         #         for result publication in the study. Otherwise, if automatic
3368         #         publication is switched on, default value is used for result name.
3369         #
3370         #  @return New GEOM.GEOM_Object, containing the created torus.
3371         #
3372         #  @ref tui_creation_torus "Example"
3373         @ManageTransactions("PrimOp")
3374         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3375             """
3376            Create a torus with given radiuses at the origin of coordinate system.
3377
3378            Parameters:
3379                 theRMajor Torus major radius.
3380                 theRMinor Torus minor radius.
3381                 theName Object name; when specified, this parameter is used
3382                         for result publication in the study. Otherwise, if automatic
3383                         publication is switched on, default value is used for result name.
3384
3385            Returns:
3386                 New GEOM.GEOM_Object, containing the created torus.
3387             """
3388             # Example: see GEOM_TestAll.py
3389             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3390             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3391             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3392             anObj.SetParameters(Parameters)
3393             self._autoPublish(anObj, theName, "torus")
3394             return anObj
3395
3396         # end of l3_3d_primitives
3397         ## @}
3398
3399         ## @addtogroup l3_complex
3400         ## @{
3401
3402         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3403         #  @param theBase Base shape to be extruded.
3404         #  @param thePoint1 First end of extrusion vector.
3405         #  @param thePoint2 Second end of extrusion vector.
3406         #  @param theScaleFactor Use it to make prism with scaled second base.
3407         #                        Nagative value means not scaled second base.
3408         #  @param theName Object name; when specified, this parameter is used
3409         #         for result publication in the study. Otherwise, if automatic
3410         #         publication is switched on, default value is used for result name.
3411         #
3412         #  @return New GEOM.GEOM_Object, containing the created prism.
3413         #
3414         #  @ref tui_creation_prism "Example"
3415         @ManageTransactions("PrimOp")
3416         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3417             """
3418             Create a shape by extrusion of the base shape along a vector, defined by two points.
3419
3420             Parameters:
3421                 theBase Base shape to be extruded.
3422                 thePoint1 First end of extrusion vector.
3423                 thePoint2 Second end of extrusion vector.
3424                 theScaleFactor Use it to make prism with scaled second base.
3425                                Nagative value means not scaled second base.
3426                 theName Object name; when specified, this parameter is used
3427                         for result publication in the study. Otherwise, if automatic
3428                         publication is switched on, default value is used for result name.
3429
3430             Returns:
3431                 New GEOM.GEOM_Object, containing the created prism.
3432             """
3433             # Example: see GEOM_TestAll.py
3434             anObj = None
3435             Parameters = ""
3436             if theScaleFactor > 0:
3437                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3438                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3439             else:
3440                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3441             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3442             anObj.SetParameters(Parameters)
3443             self._autoPublish(anObj, theName, "prism")
3444             return anObj
3445
3446         ## Create a shape by extrusion of the base shape along a
3447         #  vector, defined by two points, in 2 Ways (forward/backward).
3448         #  @param theBase Base shape to be extruded.
3449         #  @param thePoint1 First end of extrusion vector.
3450         #  @param thePoint2 Second end of extrusion vector.
3451         #  @param theName Object name; when specified, this parameter is used
3452         #         for result publication in the study. Otherwise, if automatic
3453         #         publication is switched on, default value is used for result name.
3454         #
3455         #  @return New GEOM.GEOM_Object, containing the created prism.
3456         #
3457         #  @ref tui_creation_prism "Example"
3458         @ManageTransactions("PrimOp")
3459         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3460             """
3461             Create a shape by extrusion of the base shape along a
3462             vector, defined by two points, in 2 Ways (forward/backward).
3463
3464             Parameters:
3465                 theBase Base shape to be extruded.
3466                 thePoint1 First end of extrusion vector.
3467                 thePoint2 Second end of extrusion vector.
3468                 theName Object name; when specified, this parameter is used
3469                         for result publication in the study. Otherwise, if automatic
3470                         publication is switched on, default value is used for result name.
3471
3472             Returns:
3473                 New GEOM.GEOM_Object, containing the created prism.
3474             """
3475             # Example: see GEOM_TestAll.py
3476             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3477             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3478             self._autoPublish(anObj, theName, "prism")
3479             return anObj
3480
3481         ## Create a shape by extrusion of the base shape along the vector,
3482         #  i.e. all the space, transfixed by the base shape during its translation
3483         #  along the vector on the given distance.
3484         #  @param theBase Base shape to be extruded.
3485         #  @param theVec Direction of extrusion.
3486         #  @param theH Prism dimension along theVec.
3487         #  @param theScaleFactor Use it to make prism with scaled second base.
3488         #                        Negative value means not scaled second base.
3489         #  @param theName Object name; when specified, this parameter is used
3490         #         for result publication in the study. Otherwise, if automatic
3491         #         publication is switched on, default value is used for result name.
3492         #
3493         #  @return New GEOM.GEOM_Object, containing the created prism.
3494         #
3495         #  @ref tui_creation_prism "Example"
3496         @ManageTransactions("PrimOp")
3497         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3498             """
3499             Create a shape by extrusion of the base shape along the vector,
3500             i.e. all the space, transfixed by the base shape during its translation
3501             along the vector on the given distance.
3502
3503             Parameters:
3504                 theBase Base shape to be extruded.
3505                 theVec Direction of extrusion.
3506                 theH Prism dimension along theVec.
3507                 theScaleFactor Use it to make prism with scaled second base.
3508                                Negative value means not scaled second base.
3509                 theName Object name; when specified, this parameter is used
3510                         for result publication in the study. Otherwise, if automatic
3511                         publication is switched on, default value is used for result name.
3512
3513             Returns:
3514                 New GEOM.GEOM_Object, containing the created prism.
3515             """
3516             # Example: see GEOM_TestAll.py
3517             anObj = None
3518             Parameters = ""
3519             if theScaleFactor > 0:
3520                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3521                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3522             else:
3523                 theH,Parameters = ParseParameters(theH)
3524                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3525             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3526             anObj.SetParameters(Parameters)
3527             self._autoPublish(anObj, theName, "prism")
3528             return anObj
3529
3530         ## Create a shape by extrusion of the base shape along the vector,
3531         #  i.e. all the space, transfixed by the base shape during its translation
3532         #  along the vector on the given distance in 2 Ways (forward/backward).
3533         #  @param theBase Base shape to be extruded.
3534         #  @param theVec Direction of extrusion.
3535         #  @param theH Prism dimension along theVec in forward direction.
3536         #  @param theName Object name; when specified, this parameter is used
3537         #         for result publication in the study. Otherwise, if automatic
3538         #         publication is switched on, default value is used for result name.
3539         #
3540         #  @return New GEOM.GEOM_Object, containing the created prism.
3541         #
3542         #  @ref tui_creation_prism "Example"
3543         @ManageTransactions("PrimOp")
3544         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3545             """
3546             Create a shape by extrusion of the base shape along the vector,
3547             i.e. all the space, transfixed by the base shape during its translation
3548             along the vector on the given distance in 2 Ways (forward/backward).
3549
3550             Parameters:
3551                 theBase Base shape to be extruded.
3552                 theVec Direction of extrusion.
3553                 theH Prism dimension along theVec in forward direction.
3554                 theName Object name; when specified, this parameter is used
3555                         for result publication in the study. Otherwise, if automatic
3556                         publication is switched on, default value is used for result name.
3557
3558             Returns:
3559                 New GEOM.GEOM_Object, containing the created prism.
3560             """
3561             # Example: see GEOM_TestAll.py
3562             theH,Parameters = ParseParameters(theH)
3563             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3564             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3565             anObj.SetParameters(Parameters)
3566             self._autoPublish(anObj, theName, "prism")
3567             return anObj
3568
3569         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3570         #  @param theBase Base shape to be extruded.
3571         #  @param theDX, theDY, theDZ Directions of extrusion.
3572         #  @param theScaleFactor Use it to make prism with scaled second base.
3573         #                        Nagative value means not scaled second base.
3574         #  @param theName Object name; when specified, this parameter is used
3575         #         for result publication in the study. Otherwise, if automatic
3576         #         publication is switched on, default value is used for result name.
3577         #
3578         #  @return New GEOM.GEOM_Object, containing the created prism.
3579         #
3580         #  @ref tui_creation_prism "Example"
3581         @ManageTransactions("PrimOp")
3582         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3583             """
3584             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3585
3586             Parameters:
3587                 theBase Base shape to be extruded.
3588                 theDX, theDY, theDZ Directions of extrusion.
3589                 theScaleFactor Use it to make prism with scaled second base.
3590                                Nagative value means not scaled second base.
3591                 theName Object name; when specified, this parameter is used
3592                         for result publication in the study. Otherwise, if automatic
3593                         publication is switched on, default value is used for result name.
3594
3595             Returns:
3596                 New GEOM.GEOM_Object, containing the created prism.
3597             """
3598             # Example: see GEOM_TestAll.py
3599             anObj = None
3600             Parameters = ""
3601             if theScaleFactor > 0:
3602                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3603                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3604             else:
3605                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3606                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3607             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3608             anObj.SetParameters(Parameters)
3609             self._autoPublish(anObj, theName, "prism")
3610             return anObj
3611
3612         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3613         #  i.e. all the space, transfixed by the base shape during its translation
3614         #  along the vector on the given distance in 2 Ways (forward/backward).
3615         #  @param theBase Base shape to be extruded.
3616         #  @param theDX, theDY, theDZ Directions of extrusion.
3617         #  @param theName Object name; when specified, this parameter is used
3618         #         for result publication in the study. Otherwise, if automatic
3619         #         publication is switched on, default value is used for result name.
3620         #
3621         #  @return New GEOM.GEOM_Object, containing the created prism.
3622         #
3623         #  @ref tui_creation_prism "Example"
3624         @ManageTransactions("PrimOp")
3625         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3626             """
3627             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3628             i.e. all the space, transfixed by the base shape during its translation
3629             along the vector on the given distance in 2 Ways (forward/backward).
3630
3631             Parameters:
3632                 theBase Base shape to be extruded.
3633                 theDX, theDY, theDZ Directions of extrusion.
3634                 theName Object name; when specified, this parameter is used
3635                         for result publication in the study. Otherwise, if automatic
3636                         publication is switched on, default value is used for result name.
3637
3638             Returns:
3639                 New GEOM.GEOM_Object, containing the created prism.
3640             """
3641             # Example: see GEOM_TestAll.py
3642             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3643             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3644             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3645             anObj.SetParameters(Parameters)
3646             self._autoPublish(anObj, theName, "prism")
3647             return anObj
3648
3649         ## Create a shape by revolution of the base shape around the axis
3650         #  on the given angle, i.e. all the space, transfixed by the base
3651         #  shape during its rotation around the axis on the given angle.
3652         #  @param theBase Base shape to be rotated.
3653         #  @param theAxis Rotation axis.
3654         #  @param theAngle Rotation angle in radians.
3655         #  @param theName Object name; when specified, this parameter is used
3656         #         for result publication in the study. Otherwise, if automatic
3657         #         publication is switched on, default value is used for result name.
3658         #
3659         #  @return New GEOM.GEOM_Object, containing the created revolution.
3660         #
3661         #  @ref tui_creation_revolution "Example"
3662         @ManageTransactions("PrimOp")
3663         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3664             """
3665             Create a shape by revolution of the base shape around the axis
3666             on the given angle, i.e. all the space, transfixed by the base
3667             shape during its rotation around the axis on the given angle.
3668
3669             Parameters:
3670                 theBase Base shape to be rotated.
3671                 theAxis Rotation axis.
3672                 theAngle Rotation angle in radians.
3673                 theName Object name; when specified, this parameter is used
3674                         for result publication in the study. Otherwise, if automatic
3675                         publication is switched on, default value is used for result name.
3676
3677             Returns:
3678                 New GEOM.GEOM_Object, containing the created revolution.
3679             """
3680             # Example: see GEOM_TestAll.py
3681             theAngle,Parameters = ParseParameters(theAngle)
3682             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3683             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3684             anObj.SetParameters(Parameters)
3685             self._autoPublish(anObj, theName, "revolution")
3686             return anObj
3687
3688         ## Create a shape by revolution of the base shape around the axis
3689         #  on the given angle, i.e. all the space, transfixed by the base
3690         #  shape during its rotation around the axis on the given angle in
3691         #  both directions (forward/backward)
3692         #  @param theBase Base shape to be rotated.
3693         #  @param theAxis Rotation axis.
3694         #  @param theAngle Rotation angle in radians.
3695         #  @param theName Object name; when specified, this parameter is used
3696         #         for result publication in the study. Otherwise, if automatic
3697         #         publication is switched on, default value is used for result name.
3698         #
3699         #  @return New GEOM.GEOM_Object, containing the created revolution.
3700         #
3701         #  @ref tui_creation_revolution "Example"
3702         @ManageTransactions("PrimOp")
3703         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3704             """
3705             Create a shape by revolution of the base shape around the axis
3706             on the given angle, i.e. all the space, transfixed by the base
3707             shape during its rotation around the axis on the given angle in
3708             both directions (forward/backward).
3709
3710             Parameters:
3711                 theBase Base shape to be rotated.
3712                 theAxis Rotation axis.
3713                 theAngle Rotation angle in radians.
3714                 theName Object name; when specified, this parameter is used
3715                         for result publication in the study. Otherwise, if automatic
3716                         publication is switched on, default value is used for result name.
3717
3718             Returns:
3719                 New GEOM.GEOM_Object, containing the created revolution.
3720             """
3721             theAngle,Parameters = ParseParameters(theAngle)
3722             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3723             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3724             anObj.SetParameters(Parameters)
3725             self._autoPublish(anObj, theName, "revolution")
3726             return anObj
3727
3728         ## Create a face from a given set of contours.
3729         #  @param theContours either a list or a compound of edges/wires.
3730         #  @param theMinDeg a minimal degree of BSpline surface to create.
3731         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3732         #  @param theTol2D a 2d tolerance to be reached.
3733         #  @param theTol3D a 3d tolerance to be reached.
3734         #  @param theNbIter a number of iteration of approximation algorithm.
3735         #  @param theMethod Kind of method to perform filling operation
3736         #         (see GEOM.filling_oper_method enum).
3737         #  @param isApprox if True, BSpline curves are generated in the process
3738         #                  of surface construction. By default it is False, that means
3739         #                  the surface is created using given curves. The usage of
3740         #                  Approximation makes the algorithm work slower, but allows
3741         #                  building the surface for rather complex cases.
3742         #  @param theName Object name; when specified, this parameter is used
3743         #         for result publication in the study. Otherwise, if automatic
3744         #         publication is switched on, default value is used for result name.
3745         #
3746         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3747         #
3748         #  @ref tui_creation_filling "Example"
3749         @ManageTransactions("PrimOp")
3750         def MakeFilling(self, theContours, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3751                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3752             """
3753             Create a face from a given set of contours.
3754
3755             Parameters:
3756                 theContours either a list or a compound of edges/wires.
3757                 theMinDeg a minimal degree of BSpline surface to create.
3758                 theMaxDeg a maximal degree of BSpline surface to create.
3759                 theTol2D a 2d tolerance to be reached.
3760                 theTol3D a 3d tolerance to be reached.
3761                 theNbIter a number of iteration of approximation algorithm.
3762                 theMethod Kind of method to perform filling operation
3763                           (see GEOM.filling_oper_method enum).
3764                 isApprox if True, BSpline curves are generated in the process
3765                          of surface construction. By default it is False, that means
3766                          the surface is created using given curves. The usage of
3767                          Approximation makes the algorithm work slower, but allows
3768                          building the surface for rather complex cases.
3769                 theName Object name; when specified, this parameter is used
3770                         for result publication in the study. Otherwise, if automatic
3771                         publication is switched on, default value is used for result name.
3772
3773             Returns:
3774                 New GEOM.GEOM_Object (face), containing the created filling surface.
3775
3776             Example of usage:
3777                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3778             """
3779             # Example: see GEOM_TestAll.py
3780             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3781             anObj = self.PrimOp.MakeFilling(ToList(theContours), theMinDeg, theMaxDeg,
3782                                             theTol2D, theTol3D, theNbIter,
3783                                             theMethod, isApprox)
3784             RaiseIfFailed("MakeFilling", self.PrimOp)
3785             anObj.SetParameters(Parameters)
3786             self._autoPublish(anObj, theName, "filling")
3787             return anObj
3788
3789
3790         ## Create a face from a given set of contours.
3791         #  This method corresponds to MakeFilling() with isApprox=True.
3792         #  @param theContours either a list or a compound of edges/wires.
3793         #  @param theMinDeg a minimal degree of BSpline surface to create.
3794         #  @param theMaxDeg a maximal degree of BSpline surface to create.
3795         #  @param theTol3D a 3d tolerance to be reached.
3796         #  @param theName Object name; when specified, this parameter is used
3797         #         for result publication in the study. Otherwise, if automatic
3798         #         publication is switched on, default value is used for result name.
3799         #
3800         #  @return New GEOM.GEOM_Object (face), containing the created filling surface.
3801         #
3802         #  @ref tui_creation_filling "Example"
3803         @ManageTransactions("PrimOp")
3804         def MakeFillingNew(self, theContours, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3805             """
3806             Create a filling from the given compound of contours.
3807             This method corresponds to MakeFilling() with isApprox=True.
3808
3809             Parameters:
3810                 theContours either a list or a compound of edges/wires.
3811                 theMinDeg a minimal degree of BSpline surface to create.
3812                 theMaxDeg a maximal degree of BSpline surface to create.
3813                 theTol3D a 3d tolerance to be reached.
3814                 theName Object name; when specified, this parameter is used
3815                         for result publication in the study. Otherwise, if automatic
3816                         publication is switched on, default value is used for result name.
3817
3818             Returns:
3819                 New GEOM.GEOM_Object (face), containing the created filling surface.
3820
3821             Example of usage:
3822                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3823             """
3824             # Example: see GEOM_TestAll.py
3825             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3826             anObj = self.PrimOp.MakeFilling(theContours, theMinDeg, theMaxDeg,
3827                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3828             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3829             anObj.SetParameters(Parameters)
3830             self._autoPublish(anObj, theName, "filling")
3831             return anObj
3832
3833         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3834         #  @param theSeqSections - set of specified sections.
3835         #  @param theModeSolid - mode defining building solid or shell
3836         #  @param thePreci - precision 3D used for smoothing
3837         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3838         #  @param theName Object name; when specified, this parameter is used
3839         #         for result publication in the study. Otherwise, if automatic
3840         #         publication is switched on, default value is used for result name.
3841         #
3842         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3843         #
3844         #  @ref swig_todo "Example"
3845         @ManageTransactions("PrimOp")
3846         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3847             """
3848             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3849
3850             Parameters:
3851                 theSeqSections - set of specified sections.
3852                 theModeSolid - mode defining building solid or shell
3853                 thePreci - precision 3D used for smoothing
3854                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3855                 theName Object name; when specified, this parameter is used
3856                         for result publication in the study. Otherwise, if automatic
3857                         publication is switched on, default value is used for result name.
3858
3859             Returns:
3860                 New GEOM.GEOM_Object, containing the created shell or solid.
3861             """
3862             # Example: see GEOM_TestAll.py
3863             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3864             RaiseIfFailed("MakeThruSections", self.PrimOp)
3865             self._autoPublish(anObj, theName, "filling")
3866             return anObj
3867
3868         ## Create a shape by extrusion of the base shape along
3869         #  the path shape. The path shape can be a wire or an edge.
3870         #  @param theBase Base shape to be extruded.
3871         #  @param thePath Path shape to extrude the base shape along it.
3872         #  @param theName Object name; when specified, this parameter is used
3873         #         for result publication in the study. Otherwise, if automatic
3874         #         publication is switched on, default value is used for result name.
3875         #
3876         #  @return New GEOM.GEOM_Object, containing the created pipe.
3877         #
3878         #  @ref tui_creation_pipe "Example"
3879         @ManageTransactions("PrimOp")
3880         def MakePipe(self, theBase, thePath, theName=None):
3881             """
3882             Create a shape by extrusion of the base shape along
3883             the path shape. The path shape can be a wire or an edge.
3884
3885             Parameters:
3886                 theBase Base shape to be extruded.
3887                 thePath Path shape to extrude the base shape along it.
3888                 theName Object name; when specified, this parameter is used
3889                         for result publication in the study. Otherwise, if automatic
3890                         publication is switched on, default value is used for result name.
3891
3892             Returns:
3893                 New GEOM.GEOM_Object, containing the created pipe.
3894             """
3895             # Example: see GEOM_TestAll.py
3896             anObj = self.PrimOp.MakePipe(theBase, thePath)
3897             RaiseIfFailed("MakePipe", self.PrimOp)
3898             self._autoPublish(anObj, theName, "pipe")
3899             return anObj
3900
3901         ## Create a shape by extrusion of the profile shape along
3902         #  the path shape. The path shape can be a wire or an edge.
3903         #  the several profiles can be specified in the several locations of path.
3904         #  @param theSeqBases - list of  Bases shape to be extruded.
3905         #  @param theLocations - list of locations on the path corresponding
3906         #                        specified list of the Bases shapes. Number of locations
3907         #                        should be equal to number of bases or list of locations can be empty.
3908         #  @param thePath - Path shape to extrude the base shape along it.
3909         #  @param theWithContact - the mode defining that the section is translated to be in
3910         #                          contact with the spine.
3911         #  @param theWithCorrection - defining that the section is rotated to be
3912         #                             orthogonal to the spine tangent in the correspondent point
3913         #  @param theName Object name; when specified, this parameter is used
3914         #         for result publication in the study. Otherwise, if automatic
3915         #         publication is switched on, default value is used for result name.
3916         #
3917         #  @return New GEOM.GEOM_Object, containing the created pipe.
3918         #
3919         #  @ref tui_creation_pipe_with_diff_sec "Example"
3920         @ManageTransactions("PrimOp")
3921         def MakePipeWithDifferentSections(self, theSeqBases,
3922                                           theLocations, thePath,
3923                                           theWithContact, theWithCorrection, theName=None):
3924             """
3925             Create a shape by extrusion of the profile shape along
3926             the path shape. The path shape can be a wire or an edge.
3927             the several profiles can be specified in the several locations of path.
3928
3929             Parameters:
3930                 theSeqBases - list of  Bases shape to be extruded.
3931                 theLocations - list of locations on the path corresponding
3932                                specified list of the Bases shapes. Number of locations
3933                                should be equal to number of bases or list of locations can be empty.
3934                 thePath - Path shape to extrude the base shape along it.
3935                 theWithContact - the mode defining that the section is translated to be in
3936                                  contact with the spine(0/1)
3937                 theWithCorrection - defining that the section is rotated to be
3938                                     orthogonal to the spine tangent in the correspondent point (0/1)
3939                 theName Object name; when specified, this parameter is used
3940                         for result publication in the study. Otherwise, if automatic
3941                         publication is switched on, default value is used for result name.
3942
3943             Returns:
3944                 New GEOM.GEOM_Object, containing the created pipe.
3945             """
3946             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3947                                                               theLocations, thePath,
3948                                                               theWithContact, theWithCorrection)
3949             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3950             self._autoPublish(anObj, theName, "pipe")
3951             return anObj
3952
3953         ## Create a shape by extrusion of the profile shape along
3954         #  the path shape. The path shape can be a wire or a edge.
3955         #  the several profiles can be specified in the several locations of path.
3956         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3957         #                       shell or face. If number of faces in neighbour sections
3958         #                       aren't coincided result solid between such sections will
3959         #                       be created using external boundaries of this shells.
3960         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3961         #                          This list is used for searching correspondences between
3962         #                          faces in the sections. Size of this list must be equal
3963         #                          to size of list of base shapes.
3964         #  @param theLocations - list of locations on the path corresponding
3965         #                        specified list of the Bases shapes. Number of locations
3966         #                        should be equal to number of bases. First and last
3967         #                        locations must be coincided with first and last vertexes
3968         #                        of path correspondingly.
3969         #  @param thePath - Path shape to extrude the base shape along it.
3970         #  @param theWithContact - the mode defining that the section is translated to be in
3971         #                          contact with the spine.
3972         #  @param theWithCorrection - defining that the section is rotated to be
3973         #                             orthogonal to the spine tangent in the correspondent point
3974         #  @param theName Object name; when specified, this parameter is used
3975         #         for result publication in the study. Otherwise, if automatic
3976         #         publication is switched on, default value is used for result name.
3977         #
3978         #  @return New GEOM.GEOM_Object, containing the created solids.
3979         #
3980         #  @ref tui_creation_pipe_with_shell_sec "Example"
3981         @ManageTransactions("PrimOp")
3982         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3983                                       theLocations, thePath,
3984                                       theWithContact, theWithCorrection, theName=None):
3985             """
3986             Create a shape by extrusion of the profile shape along
3987             the path shape. The path shape can be a wire or a edge.
3988             the several profiles can be specified in the several locations of path.
3989
3990             Parameters:
3991                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3992                               shell or face. If number of faces in neighbour sections
3993                               aren't coincided result solid between such sections will
3994                               be created using external boundaries of this shells.
3995                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3996                                  This list is used for searching correspondences between
3997                                  faces in the sections. Size of this list must be equal
3998                                  to size of list of base shapes.
3999                 theLocations - list of locations on the path corresponding
4000                                specified list of the Bases shapes. Number of locations
4001                                should be equal to number of bases. First and last
4002                                locations must be coincided with first and last vertexes
4003                                of path correspondingly.
4004                 thePath - Path shape to extrude the base shape along it.
4005                 theWithContact - the mode defining that the section is translated to be in
4006                                  contact with the spine (0/1)
4007                 theWithCorrection - defining that the section is rotated to be
4008                                     orthogonal to the spine tangent in the correspondent point (0/1)
4009                 theName Object name; when specified, this parameter is used
4010                         for result publication in the study. Otherwise, if automatic
4011                         publication is switched on, default value is used for result name.
4012
4013             Returns:
4014                 New GEOM.GEOM_Object, containing the created solids.
4015             """
4016             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
4017                                                           theLocations, thePath,
4018                                                           theWithContact, theWithCorrection)
4019             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4020             self._autoPublish(anObj, theName, "pipe")
4021             return anObj
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 function MakePipeWithShellSections()
4026         #  which give a possibility to recieve information about
4027         #  creating pipe between each pair of sections step by step.
4028         @ManageTransactions("PrimOp")
4029         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
4030                                              theLocations, thePath,
4031                                              theWithContact, theWithCorrection, theName=None):
4032             """
4033             Create a shape by extrusion of the profile shape along
4034             the path shape. This function is used only for debug pipe
4035             functionality - it is a version of previous function
4036             geompy.MakePipeWithShellSections() which give a possibility to
4037             recieve information about creating pipe between each pair of
4038             sections step by step.
4039             """
4040             res = []
4041             nbsect = len(theSeqBases)
4042             nbsubsect = len(theSeqSubBases)
4043             #print "nbsect = ",nbsect
4044             for i in range(1,nbsect):
4045                 #print "  i = ",i
4046                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
4047                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
4048                 tmpSeqSubBases = []
4049                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
4050                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
4051                                                               tmpLocations, thePath,
4052                                                               theWithContact, theWithCorrection)
4053                 if self.PrimOp.IsDone() == 0:
4054                     print "Problems with pipe creation between ",i," and ",i+1," sections"
4055                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
4056                     break
4057                 else:
4058                     print "Pipe between ",i," and ",i+1," sections is OK"
4059                     res.append(anObj)
4060                     pass
4061                 pass
4062
4063             resc = self.MakeCompound(res)
4064             #resc = self.MakeSewing(res, 0.001)
4065             #print "resc: ",resc
4066             self._autoPublish(resc, theName, "pipe")
4067             return resc
4068
4069         ## Create solids between given sections
4070         #  @param theSeqBases - list of sections (shell or face).
4071         #  @param theLocations - list of corresponding vertexes
4072         #  @param theName Object name; when specified, this parameter is used
4073         #         for result publication in the study. Otherwise, if automatic
4074         #         publication is switched on, default value is used for result name.
4075         #
4076         #  @return New GEOM.GEOM_Object, containing the created solids.
4077         #
4078         #  @ref tui_creation_pipe_without_path "Example"
4079         @ManageTransactions("PrimOp")
4080         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
4081             """
4082             Create solids between given sections
4083
4084             Parameters:
4085                 theSeqBases - list of sections (shell or face).
4086                 theLocations - list of corresponding vertexes
4087                 theName Object name; when specified, this parameter is used
4088                         for result publication in the study. Otherwise, if automatic
4089                         publication is switched on, default value is used for result name.
4090
4091             Returns:
4092                 New GEOM.GEOM_Object, containing the created solids.
4093             """
4094             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
4095             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
4096             self._autoPublish(anObj, theName, "pipe")
4097             return anObj
4098
4099         ## Create a shape by extrusion of the base shape along
4100         #  the path shape with constant bi-normal direction along the given vector.
4101         #  The path shape can be a wire or an edge.
4102         #  @param theBase Base shape to be extruded.
4103         #  @param thePath Path shape to extrude the base shape along it.
4104         #  @param theVec Vector defines a constant binormal direction to keep the
4105         #                same angle beetween the direction and the sections
4106         #                along the sweep surface.
4107         #  @param theName Object name; when specified, this parameter is used
4108         #         for result publication in the study. Otherwise, if automatic
4109         #         publication is switched on, default value is used for result name.
4110         #
4111         #  @return New GEOM.GEOM_Object, containing the created pipe.
4112         #
4113         #  @ref tui_creation_pipe "Example"
4114         @ManageTransactions("PrimOp")
4115         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4116             """
4117             Create a shape by extrusion of the base shape along
4118             the path shape with constant bi-normal direction along the given vector.
4119             The path shape can be a wire or an edge.
4120
4121             Parameters:
4122                 theBase Base shape to be extruded.
4123                 thePath Path shape to extrude the base shape along it.
4124                 theVec Vector defines a constant binormal direction to keep the
4125                        same angle beetween the direction and the sections
4126                        along the sweep surface.
4127                 theName Object name; when specified, this parameter is used
4128                         for result publication in the study. Otherwise, if automatic
4129                         publication is switched on, default value is used for result name.
4130
4131             Returns:
4132                 New GEOM.GEOM_Object, containing the created pipe.
4133             """
4134             # Example: see GEOM_TestAll.py
4135             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4136             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4137             self._autoPublish(anObj, theName, "pipe")
4138             return anObj
4139
4140         ## Makes a thick solid from a face or a shell
4141         #  @param theShape Face or Shell to be thicken
4142         #  @param theThickness Thickness of the resulting solid
4143         #  @param theName Object name; when specified, this parameter is used
4144         #         for result publication in the study. Otherwise, if automatic
4145         #         publication is switched on, default value is used for result name.
4146         #
4147         #  @return New GEOM.GEOM_Object, containing the created solid
4148         #
4149         @ManageTransactions("PrimOp")
4150         def MakeThickSolid(self, theShape, theThickness, theName=None):
4151             """
4152             Make a thick solid from a face or a shell
4153
4154             Parameters:
4155                  theShape Face or Shell to be thicken
4156                  theThickness Thickness of the resulting solid
4157                  theName Object name; when specified, this parameter is used
4158                  for result publication in the study. Otherwise, if automatic
4159                  publication is switched on, default value is used for result name.
4160
4161             Returns:
4162                 New GEOM.GEOM_Object, containing the created solid
4163             """
4164             # Example: see GEOM_TestAll.py
4165             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4166             RaiseIfFailed("MakeThickening", self.PrimOp)
4167             self._autoPublish(anObj, theName, "pipe")
4168             return anObj
4169
4170
4171         ## Modifies a face or a shell to make it a thick solid
4172         #  @param theShape Face or Shell to be thicken
4173         #  @param theThickness Thickness of the resulting solid
4174         #
4175         #  @return The modified shape
4176         #
4177         @ManageTransactions("PrimOp")
4178         def Thicken(self, theShape, theThickness):
4179             """
4180             Modifies a face or a shell to make it a thick solid
4181
4182             Parameters:
4183                 theBase Base shape to be extruded.
4184                 thePath Path shape to extrude the base shape along it.
4185                 theName Object name; when specified, this parameter is used
4186                         for result publication in the study. Otherwise, if automatic
4187                         publication is switched on, default value is used for result name.
4188
4189             Returns:
4190                 The modified shape
4191             """
4192             # Example: see GEOM_TestAll.py
4193             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4194             RaiseIfFailed("MakeThickening", self.PrimOp)
4195             return anObj
4196
4197         ## Build a middle path of a pipe-like shape.
4198         #  The path shape can be a wire or an edge.
4199         #  @param theShape It can be closed or unclosed pipe-like shell
4200         #                  or a pipe-like solid.
4201         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4202         #                            should be wires or faces of theShape.
4203         #  @param theName Object name; when specified, this parameter is used
4204         #         for result publication in the study. Otherwise, if automatic
4205         #         publication is switched on, default value is used for result name.
4206         #
4207         #  @note It is not assumed that exact or approximate copy of theShape
4208         #        can be obtained by applying existing Pipe operation on the
4209         #        resulting "Path" wire taking theBase1 as the base - it is not
4210         #        always possible; though in some particular cases it might work
4211         #        it is not guaranteed. Thus, RestorePath function should not be
4212         #        considered as an exact reverse operation of the Pipe.
4213         #
4214         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4215         #                                source pipe's "path".
4216         #
4217         #  @ref tui_creation_pipe_path "Example"
4218         @ManageTransactions("PrimOp")
4219         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4220             """
4221             Build a middle path of a pipe-like shape.
4222             The path shape can be a wire or an edge.
4223
4224             Parameters:
4225                 theShape It can be closed or unclosed pipe-like shell
4226                          or a pipe-like solid.
4227                 theBase1, theBase2 Two bases of the supposed pipe. This
4228                                    should be wires or faces of theShape.
4229                 theName Object name; when specified, this parameter is used
4230                         for result publication in the study. Otherwise, if automatic
4231                         publication is switched on, default value is used for result name.
4232
4233             Returns:
4234                 New GEOM_Object, containing an edge or wire that represent
4235                                  source pipe's path.
4236             """
4237             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4238             RaiseIfFailed("RestorePath", self.PrimOp)
4239             self._autoPublish(anObj, theName, "path")
4240             return anObj
4241
4242         ## Build a middle path of a pipe-like shape.
4243         #  The path shape can be a wire or an edge.
4244         #  @param theShape It can be closed or unclosed pipe-like shell
4245         #                  or a pipe-like solid.
4246         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4247         #                                should be lists of edges of theShape.
4248         #  @param theName Object name; when specified, this parameter is used
4249         #         for result publication in the study. Otherwise, if automatic
4250         #         publication is switched on, default value is used for result name.
4251         #
4252         #  @note It is not assumed that exact or approximate copy of theShape
4253         #        can be obtained by applying existing Pipe operation on the
4254         #        resulting "Path" wire taking theBase1 as the base - it is not
4255         #        always possible; though in some particular cases it might work
4256         #        it is not guaranteed. Thus, RestorePath function should not be
4257         #        considered as an exact reverse operation of the Pipe.
4258         #
4259         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4260         #                                source pipe's "path".
4261         #
4262         #  @ref tui_creation_pipe_path "Example"
4263         @ManageTransactions("PrimOp")
4264         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4265             """
4266             Build a middle path of a pipe-like shape.
4267             The path shape can be a wire or an edge.
4268
4269             Parameters:
4270                 theShape It can be closed or unclosed pipe-like shell
4271                          or a pipe-like solid.
4272                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4273                                        should be lists of edges of theShape.
4274                 theName Object name; when specified, this parameter is used
4275                         for result publication in the study. Otherwise, if automatic
4276                         publication is switched on, default value is used for result name.
4277
4278             Returns:
4279                 New GEOM_Object, containing an edge or wire that represent
4280                                  source pipe's path.
4281             """
4282             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4283             RaiseIfFailed("RestorePath", self.PrimOp)
4284             self._autoPublish(anObj, theName, "path")
4285             return anObj
4286
4287         # end of l3_complex
4288         ## @}
4289
4290         ## @addtogroup l3_advanced
4291         ## @{
4292
4293         ## Create a linear edge with specified ends.
4294         #  @param thePnt1 Point for the first end of edge.
4295         #  @param thePnt2 Point for the second end of edge.
4296         #  @param theName Object name; when specified, this parameter is used
4297         #         for result publication in the study. Otherwise, if automatic
4298         #         publication is switched on, default value is used for result name.
4299         #
4300         #  @return New GEOM.GEOM_Object, containing the created edge.
4301         #
4302         #  @ref tui_creation_edge "Example"
4303         @ManageTransactions("ShapesOp")
4304         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4305             """
4306             Create a linear edge with specified ends.
4307
4308             Parameters:
4309                 thePnt1 Point for the first end of edge.
4310                 thePnt2 Point for the second end of edge.
4311                 theName Object name; when specified, this parameter is used
4312                         for result publication in the study. Otherwise, if automatic
4313                         publication is switched on, default value is used for result name.
4314
4315             Returns:
4316                 New GEOM.GEOM_Object, containing the created edge.
4317             """
4318             # Example: see GEOM_TestAll.py
4319             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4320             RaiseIfFailed("MakeEdge", self.ShapesOp)
4321             self._autoPublish(anObj, theName, "edge")
4322             return anObj
4323
4324         ## Create a new edge, corresponding to the given length on the given curve.
4325         #  @param theRefCurve The referenced curve (edge).
4326         #  @param theLength Length on the referenced curve. It can be negative.
4327         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4328         #                       at the end of \a theRefCurve, close to the selected point.
4329         #                       If None, start from the first point of \a theRefCurve.
4330         #  @param theName Object name; when specified, this parameter is used
4331         #         for result publication in the study. Otherwise, if automatic
4332         #         publication is switched on, default value is used for result name.
4333         #
4334         #  @return New GEOM.GEOM_Object, containing the created edge.
4335         #
4336         #  @ref tui_creation_edge "Example"
4337         @ManageTransactions("ShapesOp")
4338         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4339             """
4340             Create a new edge, corresponding to the given length on the given curve.
4341
4342             Parameters:
4343                 theRefCurve The referenced curve (edge).
4344                 theLength Length on the referenced curve. It can be negative.
4345                 theStartPoint Any point can be selected for it, the new edge will begin
4346                               at the end of theRefCurve, close to the selected point.
4347                               If None, start from the first point of theRefCurve.
4348                 theName Object name; when specified, this parameter is used
4349                         for result publication in the study. Otherwise, if automatic
4350                         publication is switched on, default value is used for result name.
4351
4352             Returns:
4353                 New GEOM.GEOM_Object, containing the created edge.
4354             """
4355             # Example: see GEOM_TestAll.py
4356             theLength, Parameters = ParseParameters(theLength)
4357             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4358             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4359             anObj.SetParameters(Parameters)
4360             self._autoPublish(anObj, theName, "edge")
4361             return anObj
4362
4363         ## Create an edge from specified wire.
4364         #  @param theWire source Wire
4365         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4366         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4367         #  @param theName Object name; when specified, this parameter is used
4368         #         for result publication in the study. Otherwise, if automatic
4369         #         publication is switched on, default value is used for result name.
4370         #
4371         #  @return New GEOM.GEOM_Object, containing the created edge.
4372         #
4373         #  @ref tui_creation_edge "Example"
4374         @ManageTransactions("ShapesOp")
4375         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4376             """
4377             Create an edge from specified wire.
4378
4379             Parameters:
4380                 theWire source Wire
4381                 theLinearTolerance linear tolerance value (default = 1e-07)
4382                 theAngularTolerance angular tolerance value (default = 1e-12)
4383                 theName Object name; when specified, this parameter is used
4384                         for result publication in the study. Otherwise, if automatic
4385                         publication is switched on, default value is used for result name.
4386
4387             Returns:
4388                 New GEOM.GEOM_Object, containing the created edge.
4389             """
4390             # Example: see GEOM_TestAll.py
4391             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4392             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4393             self._autoPublish(anObj, theName, "edge")
4394             return anObj
4395
4396         ## Create a wire from the set of edges and wires.
4397         #  @param theEdgesAndWires List of edges and/or wires.
4398         #  @param theTolerance Maximum distance between vertices, that will be merged.
4399         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4400         #  @param theName Object name; when specified, this parameter is used
4401         #         for result publication in the study. Otherwise, if automatic
4402         #         publication is switched on, default value is used for result name.
4403         #
4404         #  @return New GEOM.GEOM_Object, containing the created wire.
4405         #
4406         #  @ref tui_creation_wire "Example"
4407         @ManageTransactions("ShapesOp")
4408         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4409             """
4410             Create a wire from the set of edges and wires.
4411
4412             Parameters:
4413                 theEdgesAndWires List of edges and/or wires.
4414                 theTolerance Maximum distance between vertices, that will be merged.
4415                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4416                 theName Object name; when specified, this parameter is used
4417                         for result publication in the study. Otherwise, if automatic
4418                         publication is switched on, default value is used for result name.
4419
4420             Returns:
4421                 New GEOM.GEOM_Object, containing the created wire.
4422             """
4423             # Example: see GEOM_TestAll.py
4424             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4425             RaiseIfFailed("MakeWire", self.ShapesOp)
4426             self._autoPublish(anObj, theName, "wire")
4427             return anObj
4428
4429         ## Create a face on the given wire.
4430         #  @param theWire closed Wire or Edge to build the face on.
4431         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4432         #                        If the tolerance of the obtained planar face is less
4433         #                        than 1e-06, this face will be returned, otherwise the
4434         #                        algorithm tries to build any suitable face on the given
4435         #                        wire and prints a warning message.
4436         #  @param theName Object name; when specified, this parameter is used
4437         #         for result publication in the study. Otherwise, if automatic
4438         #         publication is switched on, default value is used for result name.
4439         #
4440         #  @return New GEOM.GEOM_Object, containing the created face.
4441         #
4442         #  @ref tui_creation_face "Example"
4443         @ManageTransactions("ShapesOp")
4444         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4445             """
4446             Create a face on the given wire.
4447
4448             Parameters:
4449                 theWire closed Wire or Edge to build the face on.
4450                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4451                                If the tolerance of the obtained planar face is less
4452                                than 1e-06, this face will be returned, otherwise the
4453                                algorithm tries to build any suitable face on the given
4454                                wire and prints a warning message.
4455                 theName Object name; when specified, this parameter is used
4456                         for result publication in the study. Otherwise, if automatic
4457                         publication is switched on, default value is used for result name.
4458
4459             Returns:
4460                 New GEOM.GEOM_Object, containing the created face.
4461             """
4462             # Example: see GEOM_TestAll.py
4463             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4464             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4465                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4466             else:
4467                 RaiseIfFailed("MakeFace", self.ShapesOp)
4468             self._autoPublish(anObj, theName, "face")
4469             return anObj
4470
4471         ## Create a face on the given wires set.
4472         #  @param theWires List of closed wires or edges to build the face on.
4473         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4474         #                        If the tolerance of the obtained planar face is less
4475         #                        than 1e-06, this face will be returned, otherwise the
4476         #                        algorithm tries to build any suitable face on the given
4477         #                        wire and prints a warning message.
4478         #  @param theName Object name; when specified, this parameter is used
4479         #         for result publication in the study. Otherwise, if automatic
4480         #         publication is switched on, default value is used for result name.
4481         #
4482         #  @return New GEOM.GEOM_Object, containing the created face.
4483         #
4484         #  @ref tui_creation_face "Example"
4485         @ManageTransactions("ShapesOp")
4486         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4487             """
4488             Create a face on the given wires set.
4489
4490             Parameters:
4491                 theWires List of closed wires or edges to build the face on.
4492                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4493                                If the tolerance of the obtained planar face is less
4494                                than 1e-06, this face will be returned, otherwise the
4495                                algorithm tries to build any suitable face on the given
4496                                wire and prints a warning message.
4497                 theName Object name; when specified, this parameter is used
4498                         for result publication in the study. Otherwise, if automatic
4499                         publication is switched on, default value is used for result name.
4500
4501             Returns:
4502                 New GEOM.GEOM_Object, containing the created face.
4503             """
4504             # Example: see GEOM_TestAll.py
4505             anObj = self.ShapesOp.MakeFaceWires(ToList(theWires), isPlanarWanted)
4506             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4507                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4508             else:
4509                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4510             self._autoPublish(anObj, theName, "face")
4511             return anObj
4512
4513         ## See MakeFaceWires() method for details.
4514         #
4515         #  @ref tui_creation_face "Example 1"
4516         #  \n @ref swig_MakeFaces  "Example 2"
4517         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4518             """
4519             See geompy.MakeFaceWires() method for details.
4520             """
4521             # Example: see GEOM_TestOthers.py
4522             # note: auto-publishing is done in self.MakeFaceWires()
4523             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4524             return anObj
4525
4526         ## Create a face based on a surface from given face bounded
4527         #  by given wire.
4528         #  @param theFace the face whose surface is used to create a new face.
4529         #  @param theWire the wire that will bound a new face.
4530         #  @param theName Object name; when specified, this parameter is used
4531         #         for result publication in the study. Otherwise, if automatic
4532         #         publication is switched on, default value is used for result name.
4533         #
4534         #  @return New GEOM.GEOM_Object, containing the created face.
4535         #
4536         #  @ref tui_creation_face "Example"
4537         @ManageTransactions("ShapesOp")
4538         def MakeFaceFromSurface(self, theFace, theWire, theName=None):
4539             """
4540             Create a face based on a surface from given face bounded
4541             by given wire.
4542
4543             Parameters:
4544                 theFace the face whose surface is used to create a new face.
4545                 theWire the wire that will bound a new face.
4546                 theName Object name; when specified, this parameter is used
4547                         for result publication in the study. Otherwise, if automatic
4548                         publication is switched on, default value is used for result name.
4549
4550             Returns:
4551                 New GEOM.GEOM_Object, containing the created face.
4552             """
4553             # Example: see GEOM_TestAll.py
4554             anObj = self.ShapesOp.MakeFaceFromSurface(theFace, theWire)
4555             RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
4556             self._autoPublish(anObj, theName, "face")
4557             return anObj
4558
4559         ## Create a shell from the set of faces and shells.
4560         #  @param theFacesAndShells List of faces and/or shells.
4561         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created shell.
4566         #
4567         #  @ref tui_creation_shell "Example"
4568         @ManageTransactions("ShapesOp")
4569         def MakeShell(self, theFacesAndShells, theName=None):
4570             """
4571             Create a shell from the set of faces and shells.
4572
4573             Parameters:
4574                 theFacesAndShells List of faces and/or shells.
4575                 theName Object name; when specified, this parameter is used
4576                         for result publication in the study. Otherwise, if automatic
4577                         publication is switched on, default value is used for result name.
4578
4579             Returns:
4580                 New GEOM.GEOM_Object, containing the created shell.
4581             """
4582             # Example: see GEOM_TestAll.py
4583             anObj = self.ShapesOp.MakeShell( ToList( theFacesAndShells ))
4584             RaiseIfFailed("MakeShell", self.ShapesOp)
4585             self._autoPublish(anObj, theName, "shell")
4586             return anObj
4587
4588         ## Create a solid, bounded by the given shells.
4589         #  @param theShells Sequence of bounding shells.
4590         #  @param theName Object name; when specified, this parameter is used
4591         #         for result publication in the study. Otherwise, if automatic
4592         #         publication is switched on, default value is used for result name.
4593         #
4594         #  @return New GEOM.GEOM_Object, containing the created solid.
4595         #
4596         #  @ref tui_creation_solid "Example"
4597         @ManageTransactions("ShapesOp")
4598         def MakeSolid(self, theShells, theName=None):
4599             """
4600             Create a solid, bounded by the given shells.
4601
4602             Parameters:
4603                 theShells Sequence of bounding shells.
4604                 theName Object name; when specified, this parameter is used
4605                         for result publication in the study. Otherwise, if automatic
4606                         publication is switched on, default value is used for result name.
4607
4608             Returns:
4609                 New GEOM.GEOM_Object, containing the created solid.
4610             """
4611             # Example: see GEOM_TestAll.py
4612             theShells = ToList(theShells)
4613             if len(theShells) == 1:
4614                 descr = self._IsGoodForSolid(theShells[0])
4615                 #if len(descr) > 0:
4616                 #    raise RuntimeError, "MakeSolidShells : " + descr
4617                 if descr == "WRN_SHAPE_UNCLOSED":
4618                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4619             anObj = self.ShapesOp.MakeSolidShells(theShells)
4620             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4621             self._autoPublish(anObj, theName, "solid")
4622             return anObj
4623
4624         ## Create a compound of the given shapes.
4625         #  @param theShapes List of shapes to put in compound.
4626         #  @param theName Object name; when specified, this parameter is used
4627         #         for result publication in the study. Otherwise, if automatic
4628         #         publication is switched on, default value is used for result name.
4629         #
4630         #  @return New GEOM.GEOM_Object, containing the created compound.
4631         #
4632         #  @ref tui_creation_compound "Example"
4633         @ManageTransactions("ShapesOp")
4634         def MakeCompound(self, theShapes, theName=None):
4635             """
4636             Create a compound of the given shapes.
4637
4638             Parameters:
4639                 theShapes List of shapes to put in compound.
4640                 theName Object name; when specified, this parameter is used
4641                         for result publication in the study. Otherwise, if automatic
4642                         publication is switched on, default value is used for result name.
4643
4644             Returns:
4645                 New GEOM.GEOM_Object, containing the created compound.
4646             """
4647             # Example: see GEOM_TestAll.py
4648             anObj = self.ShapesOp.MakeCompound(ToList(theShapes))
4649             RaiseIfFailed("MakeCompound", self.ShapesOp)
4650             self._autoPublish(anObj, theName, "compound")
4651             return anObj
4652
4653         # end of l3_advanced
4654         ## @}
4655
4656         ## @addtogroup l2_measure
4657         ## @{
4658
4659         ## Gives quantity of faces in the given shape.
4660         #  @param theShape Shape to count faces of.
4661         #  @return Quantity of faces.
4662         #
4663         #  @ref swig_NumberOf "Example"
4664         @ManageTransactions("ShapesOp")
4665         def NumberOfFaces(self, theShape):
4666             """
4667             Gives quantity of faces in the given shape.
4668
4669             Parameters:
4670                 theShape Shape to count faces of.
4671
4672             Returns:
4673                 Quantity of faces.
4674             """
4675             # Example: see GEOM_TestOthers.py
4676             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4677             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4678             return nb_faces
4679
4680         ## Gives quantity of edges in the given shape.
4681         #  @param theShape Shape to count edges of.
4682         #  @return Quantity of edges.
4683         #
4684         #  @ref swig_NumberOf "Example"
4685         @ManageTransactions("ShapesOp")
4686         def NumberOfEdges(self, theShape):
4687             """
4688             Gives quantity of edges in the given shape.
4689
4690             Parameters:
4691                 theShape Shape to count edges of.
4692
4693             Returns:
4694                 Quantity of edges.
4695             """
4696             # Example: see GEOM_TestOthers.py
4697             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4698             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4699             return nb_edges
4700
4701         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4702         #  @param theShape Shape to count sub-shapes of.
4703         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4704         #  @return Quantity of sub-shapes of given type.
4705         #
4706         #  @ref swig_NumberOf "Example"
4707         @ManageTransactions("ShapesOp")
4708         def NumberOfSubShapes(self, theShape, theShapeType):
4709             """
4710             Gives quantity of sub-shapes of type theShapeType in the given shape.
4711
4712             Parameters:
4713                 theShape Shape to count sub-shapes of.
4714                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4715
4716             Returns:
4717                 Quantity of sub-shapes of given type.
4718             """
4719             # Example: see GEOM_TestOthers.py
4720             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4721             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4722             return nb_ss
4723
4724         ## Gives quantity of solids in the given shape.
4725         #  @param theShape Shape to count solids in.
4726         #  @return Quantity of solids.
4727         #
4728         #  @ref swig_NumberOf "Example"
4729         @ManageTransactions("ShapesOp")
4730         def NumberOfSolids(self, theShape):
4731             """
4732             Gives quantity of solids in the given shape.
4733
4734             Parameters:
4735                 theShape Shape to count solids in.
4736
4737             Returns:
4738                 Quantity of solids.
4739             """
4740             # Example: see GEOM_TestOthers.py
4741             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4742             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4743             return nb_solids
4744
4745         # end of l2_measure
4746         ## @}
4747
4748         ## @addtogroup l3_healing
4749         ## @{
4750
4751         ## Reverses an orientation the given shape.
4752         #  @param theShape Shape to be reversed.
4753         #  @param theName Object name; when specified, this parameter is used
4754         #         for result publication in the study. Otherwise, if automatic
4755         #         publication is switched on, default value is used for result name.
4756         #
4757         #  @return The reversed copy of theShape.
4758         #
4759         #  @ref swig_ChangeOrientation "Example"
4760         @ManageTransactions("ShapesOp")
4761         def ChangeOrientation(self, theShape, theName=None):
4762             """
4763             Reverses an orientation the given shape.
4764
4765             Parameters:
4766                 theShape Shape to be reversed.
4767                 theName Object name; when specified, this parameter is used
4768                         for result publication in the study. Otherwise, if automatic
4769                         publication is switched on, default value is used for result name.
4770
4771             Returns:
4772                 The reversed copy of theShape.
4773             """
4774             # Example: see GEOM_TestAll.py
4775             anObj = self.ShapesOp.ChangeOrientation(theShape)
4776             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4777             self._autoPublish(anObj, theName, "reversed")
4778             return anObj
4779
4780         ## See ChangeOrientation() method for details.
4781         #
4782         #  @ref swig_OrientationChange "Example"
4783         def OrientationChange(self, theShape, theName=None):
4784             """
4785             See geompy.ChangeOrientation method for details.
4786             """
4787             # Example: see GEOM_TestOthers.py
4788             # note: auto-publishing is done in self.ChangeOrientation()
4789             anObj = self.ChangeOrientation(theShape, theName)
4790             return anObj
4791
4792         # end of l3_healing
4793         ## @}
4794
4795         ## @addtogroup l4_obtain
4796         ## @{
4797
4798         ## Retrieve all free faces from the given shape.
4799         #  Free face is a face, which is not shared between two shells of the shape.
4800         #  @param theShape Shape to find free faces in.
4801         #  @return List of IDs of all free faces, contained in theShape.
4802         #
4803         #  @ref tui_measurement_tools_page "Example"
4804         @ManageTransactions("ShapesOp")
4805         def GetFreeFacesIDs(self,theShape):
4806             """
4807             Retrieve all free faces from the given shape.
4808             Free face is a face, which is not shared between two shells of the shape.
4809
4810             Parameters:
4811                 theShape Shape to find free faces in.
4812
4813             Returns:
4814                 List of IDs of all free faces, contained in theShape.
4815             """
4816             # Example: see GEOM_TestOthers.py
4817             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4818             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4819             return anIDs
4820
4821         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4822         #  @param theShape1 Shape to find sub-shapes in.
4823         #  @param theShape2 Shape to find shared sub-shapes with.
4824         #  @param theShapeType Type of sub-shapes to be retrieved.
4825         #  @param theName Object name; when specified, this parameter is used
4826         #         for result publication in the study. Otherwise, if automatic
4827         #         publication is switched on, default value is used for result name.
4828         #
4829         #  @return List of sub-shapes of theShape1, shared with theShape2.
4830         #
4831         #  @ref swig_GetSharedShapes "Example"
4832         @ManageTransactions("ShapesOp")
4833         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4834             """
4835             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4836
4837             Parameters:
4838                 theShape1 Shape to find sub-shapes in.
4839                 theShape2 Shape to find shared sub-shapes with.
4840                 theShapeType Type of sub-shapes to be retrieved.
4841                 theName Object name; when specified, this parameter is used
4842                         for result publication in the study. Otherwise, if automatic
4843                         publication is switched on, default value is used for result name.
4844
4845             Returns:
4846                 List of sub-shapes of theShape1, shared with theShape2.
4847             """
4848             # Example: see GEOM_TestOthers.py
4849             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4850             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4851             self._autoPublish(aList, theName, "shared")
4852             return aList
4853
4854         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4855         #  @param theShapes Either a list or compound of shapes to find common sub-shapes of.
4856         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4857         #  @param theName Object name; when specified, this parameter is used
4858         #         for result publication in the study. Otherwise, if automatic
4859         #         publication is switched on, default value is used for result name.
4860         #
4861         #  @return List of objects, that are sub-shapes of all given shapes.
4862         #
4863         #  @ref swig_GetSharedShapes "Example"
4864         @ManageTransactions("ShapesOp")
4865         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4866             """
4867             Get all sub-shapes, shared by all shapes in the list theShapes.
4868
4869             Parameters:
4870                 theShapes Either a list or compound of shapes to find common sub-shapes of.
4871                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4872                 theName Object name; when specified, this parameter is used
4873                         for result publication in the study. Otherwise, if automatic
4874                         publication is switched on, default value is used for result name.
4875
4876             Returns:
4877                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4878             """
4879             # Example: see GEOM_TestOthers.py
4880             aList = self.ShapesOp.GetSharedShapesMulti(ToList(theShapes), theShapeType)
4881             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4882             self._autoPublish(aList, theName, "shared")
4883             return aList
4884
4885         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4886         #  situated relatively the specified plane by the certain way,
4887         #  defined through <VAR>theState</VAR> parameter.
4888         #  @param theShape Shape to find sub-shapes of.
4889         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4890         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4891         #                direction and location of the plane to find shapes on.
4892         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4893         #  @param theName Object name; when specified, this parameter is used
4894         #         for result publication in the study. Otherwise, if automatic
4895         #         publication is switched on, default value is used for result name.
4896         #
4897         #  @return List of all found sub-shapes.
4898         #
4899         #  @ref swig_GetShapesOnPlane "Example"
4900         @ManageTransactions("ShapesOp")
4901         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4902             """
4903             Find in theShape all sub-shapes of type theShapeType,
4904             situated relatively the specified plane by the certain way,
4905             defined through theState parameter.
4906
4907             Parameters:
4908                 theShape Shape to find sub-shapes of.
4909                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4910                 theAx1 Vector (or line, or linear edge), specifying normal
4911                        direction and location of the plane to find shapes on.
4912                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4913                 theName Object name; when specified, this parameter is used
4914                         for result publication in the study. Otherwise, if automatic
4915                         publication is switched on, default value is used for result name.
4916
4917             Returns:
4918                 List of all found sub-shapes.
4919             """
4920             # Example: see GEOM_TestOthers.py
4921             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4922             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4923             self._autoPublish(aList, theName, "shapeOnPlane")
4924             return aList
4925
4926         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4927         #  situated relatively the specified plane by the certain way,
4928         #  defined through <VAR>theState</VAR> parameter.
4929         #  @param theShape Shape to find sub-shapes of.
4930         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4931         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4932         #                direction and location of the plane to find shapes on.
4933         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4934         #
4935         #  @return List of all found sub-shapes indices.
4936         #
4937         #  @ref swig_GetShapesOnPlaneIDs "Example"
4938         @ManageTransactions("ShapesOp")
4939         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4940             """
4941             Find in theShape all sub-shapes of type theShapeType,
4942             situated relatively the specified plane by the certain way,
4943             defined through theState parameter.
4944
4945             Parameters:
4946                 theShape Shape to find sub-shapes of.
4947                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4948                 theAx1 Vector (or line, or linear edge), specifying normal
4949                        direction and location of the plane to find shapes on.
4950                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4951
4952             Returns:
4953                 List of all found sub-shapes indices.
4954             """
4955             # Example: see GEOM_TestOthers.py
4956             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4957             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
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         #  @param theName Object name; when specified, this parameter is used
4970         #         for result publication in the study. Otherwise, if automatic
4971         #         publication is switched on, default value is used for result name.
4972         #
4973         #  @return List of all found sub-shapes.
4974         #
4975         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4976         @ManageTransactions("ShapesOp")
4977         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4978             """
4979             Find in theShape all sub-shapes of type theShapeType,
4980             situated relatively the specified plane by the certain way,
4981             defined through theState parameter.
4982
4983             Parameters:
4984                 theShape Shape to find sub-shapes of.
4985                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4986                 theAx1 Vector (or line, or linear edge), specifying normal
4987                        direction and location of the plane to find shapes on.
4988                 thePnt Point specifying location of the plane to find shapes on.
4989                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4990                 theName Object name; when specified, this parameter is used
4991                         for result publication in the study. Otherwise, if automatic
4992                         publication is switched on, default value is used for result name.
4993
4994             Returns:
4995                 List of all found sub-shapes.
4996             """
4997             # Example: see GEOM_TestOthers.py
4998             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4999                                                                theAx1, thePnt, theState)
5000             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
5001             self._autoPublish(aList, theName, "shapeOnPlane")
5002             return aList
5003
5004         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
5005         #  situated relatively the specified plane by the certain way,
5006         #  defined through <VAR>theState</VAR> parameter.
5007         #  @param theShape Shape to find sub-shapes of.
5008         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5009         #  @param theAx1 Vector (or line, or linear edge), specifying normal
5010         #                direction of the plane to find shapes on.
5011         #  @param thePnt Point specifying location of the plane to find shapes on.
5012         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5013         #
5014         #  @return List of all found sub-shapes indices.
5015         #
5016         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
5017         @ManageTransactions("ShapesOp")
5018         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
5019             """
5020             Find in theShape all sub-shapes of type theShapeType,
5021             situated relatively the specified plane by the certain way,
5022             defined through theState parameter.
5023
5024             Parameters:
5025                 theShape Shape to find sub-shapes of.
5026                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5027                 theAx1 Vector (or line, or linear edge), specifying normal
5028                        direction and location of the plane to find shapes on.
5029                 thePnt Point specifying location of the plane to find shapes on.
5030                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5031
5032             Returns:
5033                 List of all found sub-shapes indices.
5034             """
5035             # Example: see GEOM_TestOthers.py
5036             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
5037                                                                   theAx1, thePnt, theState)
5038             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
5039             return aList
5040
5041         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5042         #  the specified cylinder by the certain way, defined through \a theState parameter.
5043         #  @param theShape Shape to find sub-shapes of.
5044         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5045         #  @param theAxis Vector (or line, or linear edge), specifying
5046         #                 axis of the cylinder to find shapes on.
5047         #  @param theRadius Radius of the cylinder to find shapes on.
5048         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5049         #  @param theName Object name; when specified, this parameter is used
5050         #         for result publication in the study. Otherwise, if automatic
5051         #         publication is switched on, default value is used for result name.
5052         #
5053         #  @return List of all found sub-shapes.
5054         #
5055         #  @ref swig_GetShapesOnCylinder "Example"
5056         @ManageTransactions("ShapesOp")
5057         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
5058             """
5059             Find in theShape all sub-shapes of type theShapeType, situated relatively
5060             the specified cylinder by the certain way, defined through theState parameter.
5061
5062             Parameters:
5063                 theShape Shape to find sub-shapes of.
5064                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5065                 theAxis Vector (or line, or linear edge), specifying
5066                         axis of the cylinder to find shapes on.
5067                 theRadius Radius of the cylinder to find shapes on.
5068                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5069                 theName Object name; when specified, this parameter is used
5070                         for result publication in the study. Otherwise, if automatic
5071                         publication is switched on, default value is used for result name.
5072
5073             Returns:
5074                 List of all found sub-shapes.
5075             """
5076             # Example: see GEOM_TestOthers.py
5077             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
5078             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
5079             self._autoPublish(aList, theName, "shapeOnCylinder")
5080             return aList
5081
5082         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5083         #  the specified cylinder by the certain way, defined through \a theState parameter.
5084         #  @param theShape Shape to find sub-shapes of.
5085         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5086         #  @param theAxis Vector (or line, or linear edge), specifying
5087         #                 axis of the cylinder to find shapes on.
5088         #  @param theRadius Radius of the cylinder to find shapes on.
5089         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5090         #
5091         #  @return List of all found sub-shapes indices.
5092         #
5093         #  @ref swig_GetShapesOnCylinderIDs "Example"
5094         @ManageTransactions("ShapesOp")
5095         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
5096             """
5097             Find in theShape all sub-shapes of type theShapeType, situated relatively
5098             the specified cylinder by the certain way, defined through theState parameter.
5099
5100             Parameters:
5101                 theShape Shape to find sub-shapes of.
5102                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5103                 theAxis Vector (or line, or linear edge), specifying
5104                         axis of the cylinder to find shapes on.
5105                 theRadius Radius of the cylinder to find shapes on.
5106                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5107
5108             Returns:
5109                 List of all found sub-shapes indices.
5110             """
5111             # Example: see GEOM_TestOthers.py
5112             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
5113             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
5114             return aList
5115
5116         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5117         #  the specified cylinder by the certain way, defined through \a theState parameter.
5118         #  @param theShape Shape to find sub-shapes of.
5119         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5120         #  @param theAxis Vector (or line, or linear edge), specifying
5121         #                 axis of the cylinder to find shapes on.
5122         #  @param thePnt Point specifying location of the bottom of the cylinder.
5123         #  @param theRadius Radius of the cylinder to find shapes on.
5124         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5125         #  @param theName Object name; when specified, this parameter is used
5126         #         for result publication in the study. Otherwise, if automatic
5127         #         publication is switched on, default value is used for result name.
5128         #
5129         #  @return List of all found sub-shapes.
5130         #
5131         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
5132         @ManageTransactions("ShapesOp")
5133         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
5134             """
5135             Find in theShape all sub-shapes of type theShapeType, situated relatively
5136             the specified cylinder by the certain way, defined through theState parameter.
5137
5138             Parameters:
5139                 theShape Shape to find sub-shapes of.
5140                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5141                 theAxis Vector (or line, or linear edge), specifying
5142                         axis of the cylinder to find shapes on.
5143                 theRadius Radius of the cylinder to find shapes on.
5144                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5145                 theName Object name; when specified, this parameter is used
5146                         for result publication in the study. Otherwise, if automatic
5147                         publication is switched on, default value is used for result name.
5148
5149             Returns:
5150                 List of all found sub-shapes.
5151             """
5152             # Example: see GEOM_TestOthers.py
5153             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5154             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5155             self._autoPublish(aList, theName, "shapeOnCylinder")
5156             return aList
5157
5158         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5159         #  the specified cylinder by the certain way, defined through \a theState parameter.
5160         #  @param theShape Shape to find sub-shapes of.
5161         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5162         #  @param theAxis Vector (or line, or linear edge), specifying
5163         #                 axis of the cylinder to find shapes on.
5164         #  @param thePnt Point specifying location of the bottom of the cylinder.
5165         #  @param theRadius Radius of the cylinder to find shapes on.
5166         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5167         #
5168         #  @return List of all found sub-shapes indices
5169         #
5170         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5171         @ManageTransactions("ShapesOp")
5172         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5173             """
5174             Find in theShape all sub-shapes of type theShapeType, situated relatively
5175             the specified cylinder by the certain way, defined through theState parameter.
5176
5177             Parameters:
5178                 theShape Shape to find sub-shapes of.
5179                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5180                 theAxis Vector (or line, or linear edge), specifying
5181                         axis of the cylinder to find shapes on.
5182                 theRadius Radius of the cylinder to find shapes on.
5183                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5184
5185             Returns:
5186                 List of all found sub-shapes indices.
5187             """
5188             # Example: see GEOM_TestOthers.py
5189             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5190             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5191             return aList
5192
5193         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5194         #  the specified sphere by the certain way, defined through \a theState parameter.
5195         #  @param theShape Shape to find sub-shapes of.
5196         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5197         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5198         #  @param theRadius Radius of the sphere to find shapes on.
5199         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5200         #  @param theName Object name; when specified, this parameter is used
5201         #         for result publication in the study. Otherwise, if automatic
5202         #         publication is switched on, default value is used for result name.
5203         #
5204         #  @return List of all found sub-shapes.
5205         #
5206         #  @ref swig_GetShapesOnSphere "Example"
5207         @ManageTransactions("ShapesOp")
5208         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5209             """
5210             Find in theShape all sub-shapes of type theShapeType, situated relatively
5211             the specified sphere by the certain way, defined through theState parameter.
5212
5213             Parameters:
5214                 theShape Shape to find sub-shapes of.
5215                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5216                 theCenter Point, specifying center of the sphere to find shapes on.
5217                 theRadius Radius of the sphere to find shapes on.
5218                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5219                 theName Object name; when specified, this parameter is used
5220                         for result publication in the study. Otherwise, if automatic
5221                         publication is switched on, default value is used for result name.
5222
5223             Returns:
5224                 List of all found sub-shapes.
5225             """
5226             # Example: see GEOM_TestOthers.py
5227             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5228             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5229             self._autoPublish(aList, theName, "shapeOnSphere")
5230             return aList
5231
5232         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5233         #  the specified sphere by the certain way, defined through \a theState parameter.
5234         #  @param theShape Shape to find sub-shapes of.
5235         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5236         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5237         #  @param theRadius Radius of the sphere to find shapes on.
5238         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5239         #
5240         #  @return List of all found sub-shapes indices.
5241         #
5242         #  @ref swig_GetShapesOnSphereIDs "Example"
5243         @ManageTransactions("ShapesOp")
5244         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5245             """
5246             Find in theShape all sub-shapes of type theShapeType, situated relatively
5247             the specified sphere by the certain way, defined through theState parameter.
5248
5249             Parameters:
5250                 theShape Shape to find sub-shapes of.
5251                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5252                 theCenter Point, specifying center of the sphere to find shapes on.
5253                 theRadius Radius of the sphere to find shapes on.
5254                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5255
5256             Returns:
5257                 List of all found sub-shapes indices.
5258             """
5259             # Example: see GEOM_TestOthers.py
5260             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5261             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5262             return aList
5263
5264         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5265         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5266         #  @param theShape Shape to find sub-shapes of.
5267         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5268         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5269         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5270         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5271         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5272         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5273         #  @param theName Object name; when specified, this parameter is used
5274         #         for result publication in the study. Otherwise, if automatic
5275         #         publication is switched on, default value is used for result name.
5276         #
5277         #  @return List of all found sub-shapes.
5278         #
5279         #  @ref swig_GetShapesOnQuadrangle "Example"
5280         @ManageTransactions("ShapesOp")
5281         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5282                                   theTopLeftPoint, theTopRigthPoint,
5283                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
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                 theName Object name; when specified, this parameter is used
5297                         for result publication in the study. Otherwise, if automatic
5298                         publication is switched on, default value is used for result name.
5299
5300             Returns:
5301                 List of all found sub-shapes.
5302             """
5303             # Example: see GEOM_TestOthers.py
5304             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5305                                                         theTopLeftPoint, theTopRigthPoint,
5306                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5307             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5308             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5309             return aList
5310
5311         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5312         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5313         #  @param theShape Shape to find sub-shapes of.
5314         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5315         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5316         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5317         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5318         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5319         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5320         #
5321         #  @return List of all found sub-shapes indices.
5322         #
5323         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5324         @ManageTransactions("ShapesOp")
5325         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5326                                      theTopLeftPoint, theTopRigthPoint,
5327                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5328             """
5329             Find in theShape all sub-shapes of type theShapeType, situated relatively
5330             the specified quadrangle by the certain way, defined through theState parameter.
5331
5332             Parameters:
5333                 theShape Shape to find sub-shapes of.
5334                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5335                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5336                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5337                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5338                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5339                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5340
5341             Returns:
5342                 List of all found sub-shapes indices.
5343             """
5344
5345             # Example: see GEOM_TestOthers.py
5346             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5347                                                            theTopLeftPoint, theTopRigthPoint,
5348                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5349             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5350             return aList
5351
5352         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5353         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5354         #  @param theBox Shape for relative comparing.
5355         #  @param theShape Shape to find sub-shapes of.
5356         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5357         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5358         #  @param theName Object name; when specified, this parameter is used
5359         #         for result publication in the study. Otherwise, if automatic
5360         #         publication is switched on, default value is used for result name.
5361         #
5362         #  @return List of all found sub-shapes.
5363         #
5364         #  @ref swig_GetShapesOnBox "Example"
5365         @ManageTransactions("ShapesOp")
5366         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5367             """
5368             Find in theShape all sub-shapes of type theShapeType, situated relatively
5369             the specified theBox by the certain way, defined through theState parameter.
5370
5371             Parameters:
5372                 theBox Shape for relative comparing.
5373                 theShape Shape to find sub-shapes of.
5374                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5375                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5376                 theName Object name; when specified, this parameter is used
5377                         for result publication in the study. Otherwise, if automatic
5378                         publication is switched on, default value is used for result name.
5379
5380             Returns:
5381                 List of all found sub-shapes.
5382             """
5383             # Example: see GEOM_TestOthers.py
5384             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5385             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5386             self._autoPublish(aList, theName, "shapeOnBox")
5387             return aList
5388
5389         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5390         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5391         #  @param theBox Shape for relative comparing.
5392         #  @param theShape Shape to find sub-shapes of.
5393         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5394         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5395         #
5396         #  @return List of all found sub-shapes indices.
5397         #
5398         #  @ref swig_GetShapesOnBoxIDs "Example"
5399         @ManageTransactions("ShapesOp")
5400         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5401             """
5402             Find in theShape all sub-shapes of type theShapeType, situated relatively
5403             the specified theBox by the certain way, defined through theState parameter.
5404
5405             Parameters:
5406                 theBox Shape for relative comparing.
5407                 theShape Shape to find sub-shapes of.
5408                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5409                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5410
5411             Returns:
5412                 List of all found sub-shapes indices.
5413             """
5414             # Example: see GEOM_TestOthers.py
5415             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5416             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5417             return aList
5418
5419         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5420         #  situated relatively the specified \a theCheckShape by the
5421         #  certain way, defined through \a theState parameter.
5422         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5423         #  @param theShape Shape to find sub-shapes of.
5424         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5425         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5426         #  @param theName Object name; when specified, this parameter is used
5427         #         for result publication in the study. Otherwise, if automatic
5428         #         publication is switched on, default value is used for result name.
5429         #
5430         #  @return List of all found sub-shapes.
5431         #
5432         #  @ref swig_GetShapesOnShape "Example"
5433         @ManageTransactions("ShapesOp")
5434         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5435             """
5436             Find in theShape all sub-shapes of type theShapeType,
5437             situated relatively the specified theCheckShape by the
5438             certain way, defined through theState parameter.
5439
5440             Parameters:
5441                 theCheckShape Shape for relative comparing. It must be a solid.
5442                 theShape Shape to find sub-shapes of.
5443                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5444                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5445                 theName Object name; when specified, this parameter is used
5446                         for result publication in the study. Otherwise, if automatic
5447                         publication is switched on, default value is used for result name.
5448
5449             Returns:
5450                 List of all found sub-shapes.
5451             """
5452             # Example: see GEOM_TestOthers.py
5453             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5454                                                    theShapeType, theState)
5455             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5456             self._autoPublish(aList, theName, "shapeOnShape")
5457             return aList
5458
5459         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5460         #  situated relatively the specified \a theCheckShape by the
5461         #  certain way, defined through \a theState parameter.
5462         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5463         #  @param theShape Shape to find sub-shapes of.
5464         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5465         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5466         #  @param theName Object name; when specified, this parameter is used
5467         #         for result publication in the study. Otherwise, if automatic
5468         #         publication is switched on, default value is used for result name.
5469         #
5470         #  @return All found sub-shapes as compound.
5471         #
5472         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5473         @ManageTransactions("ShapesOp")
5474         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5475             """
5476             Find in theShape all sub-shapes of type theShapeType,
5477             situated relatively the specified theCheckShape by the
5478             certain way, defined through theState parameter.
5479
5480             Parameters:
5481                 theCheckShape Shape for relative comparing. It must be a solid.
5482                 theShape Shape to find sub-shapes of.
5483                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5484                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5485                 theName Object name; when specified, this parameter is used
5486                         for result publication in the study. Otherwise, if automatic
5487                         publication is switched on, default value is used for result name.
5488
5489             Returns:
5490                 All found sub-shapes as compound.
5491             """
5492             # Example: see GEOM_TestOthers.py
5493             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5494                                                              theShapeType, theState)
5495             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5496             self._autoPublish(anObj, theName, "shapeOnShape")
5497             return anObj
5498
5499         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5500         #  situated relatively the specified \a theCheckShape by the
5501         #  certain way, defined through \a theState parameter.
5502         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5503         #  @param theShape Shape to find sub-shapes of.
5504         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5505         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5506         #
5507         #  @return List of all found sub-shapes indices.
5508         #
5509         #  @ref swig_GetShapesOnShapeIDs "Example"
5510         @ManageTransactions("ShapesOp")
5511         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5512             """
5513             Find in theShape all sub-shapes of type theShapeType,
5514             situated relatively the specified theCheckShape by the
5515             certain way, defined through theState parameter.
5516
5517             Parameters:
5518                 theCheckShape Shape for relative comparing. It must be a solid.
5519                 theShape Shape to find sub-shapes of.
5520                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5521                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5522
5523             Returns:
5524                 List of all found sub-shapes indices.
5525             """
5526             # Example: see GEOM_TestOthers.py
5527             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5528                                                       theShapeType, theState)
5529             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5530             return aList
5531
5532         ## Get sub-shape(s) of theShapeWhere, which are
5533         #  coincident with \a theShapeWhat or could be a part of it.
5534         #  @param theShapeWhere Shape to find sub-shapes of.
5535         #  @param theShapeWhat Shape, specifying what to find.
5536         #  @param isNewImplementation implementation of GetInPlace functionality
5537         #             (default = False, old alghorithm based on shape properties)
5538         #  @param theName Object name; when specified, this parameter is used
5539         #         for result publication in the study. Otherwise, if automatic
5540         #         publication is switched on, default value is used for result name.
5541         #
5542         #  @return Group of all found sub-shapes or a single found sub-shape.
5543         #
5544         #  @note This function has a restriction on argument shapes.
5545         #        If \a theShapeWhere has curved parts with significantly
5546         #        outstanding centres (i.e. the mass centre of a part is closer to
5547         #        \a theShapeWhat than to the part), such parts will not be found.
5548         #        @image html get_in_place_lost_part.png
5549         #
5550         #  @ref swig_GetInPlace "Example"
5551         @ManageTransactions("ShapesOp")
5552         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5553             """
5554             Get sub-shape(s) of theShapeWhere, which are
5555             coincident with  theShapeWhat or could be a part of it.
5556
5557             Parameters:
5558                 theShapeWhere Shape to find sub-shapes of.
5559                 theShapeWhat Shape, specifying what to find.
5560                 isNewImplementation Implementation of GetInPlace functionality
5561                                     (default = False, old alghorithm based on shape properties)
5562                 theName Object name; when specified, this parameter is used
5563                         for result publication in the study. Otherwise, if automatic
5564                         publication is switched on, default value is used for result name.
5565
5566             Returns:
5567                 Group of all found sub-shapes or a single found sub-shape.
5568
5569
5570             Note:
5571                 This function has a restriction on argument shapes.
5572                 If theShapeWhere has curved parts with significantly
5573                 outstanding centres (i.e. the mass centre of a part is closer to
5574                 theShapeWhat than to the part), such parts will not be found.
5575             """
5576             # Example: see GEOM_TestOthers.py
5577             anObj = None
5578             if isNewImplementation:
5579                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5580             else:
5581                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5582                 pass
5583             RaiseIfFailed("GetInPlace", self.ShapesOp)
5584             self._autoPublish(anObj, theName, "inplace")
5585             return anObj
5586
5587         ## Get sub-shape(s) of \a theShapeWhere, which are
5588         #  coincident with \a theShapeWhat or could be a part of it.
5589         #
5590         #  Implementation of this method is based on a saved history of an operation,
5591         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5592         #  arguments (an argument shape or a sub-shape of an argument shape).
5593         #  The operation could be the Partition or one of boolean operations,
5594         #  performed on simple shapes (not on compounds).
5595         #
5596         #  @param theShapeWhere Shape to find sub-shapes of.
5597         #  @param theShapeWhat Shape, specifying what to find (must be in the
5598         #                      building history of the ShapeWhere).
5599         #  @param theName Object name; when specified, this parameter is used
5600         #         for result publication in the study. Otherwise, if automatic
5601         #         publication is switched on, default value is used for result name.
5602         #
5603         #  @return Group of all found sub-shapes or a single found sub-shape.
5604         #
5605         #  @ref swig_GetInPlace "Example"
5606         @ManageTransactions("ShapesOp")
5607         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5608             """
5609             Implementation of this method is based on a saved history of an operation,
5610             produced theShapeWhere. The theShapeWhat must be among this operation's
5611             arguments (an argument shape or a sub-shape of an argument shape).
5612             The operation could be the Partition or one of boolean operations,
5613             performed on simple shapes (not on compounds).
5614
5615             Parameters:
5616                 theShapeWhere Shape to find sub-shapes of.
5617                 theShapeWhat Shape, specifying what to find (must be in the
5618                                 building history of the ShapeWhere).
5619                 theName Object name; when specified, this parameter is used
5620                         for result publication in the study. Otherwise, if automatic
5621                         publication is switched on, default value is used for result name.
5622
5623             Returns:
5624                 Group of all found sub-shapes or a single found sub-shape.
5625             """
5626             # Example: see GEOM_TestOthers.py
5627             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5628             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5629             self._autoPublish(anObj, theName, "inplace")
5630             return anObj
5631
5632         ## Get sub-shape of theShapeWhere, which is
5633         #  equal to \a theShapeWhat.
5634         #  @param theShapeWhere Shape to find sub-shape of.
5635         #  @param theShapeWhat Shape, specifying what to find.
5636         #  @param theName Object name; when specified, this parameter is used
5637         #         for result publication in the study. Otherwise, if automatic
5638         #         publication is switched on, default value is used for result name.
5639         #
5640         #  @return New GEOM.GEOM_Object for found sub-shape.
5641         #
5642         #  @ref swig_GetSame "Example"
5643         @ManageTransactions("ShapesOp")
5644         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5645             """
5646             Get sub-shape of theShapeWhere, which is
5647             equal to theShapeWhat.
5648
5649             Parameters:
5650                 theShapeWhere Shape to find sub-shape of.
5651                 theShapeWhat Shape, specifying what to find.
5652                 theName Object name; when specified, this parameter is used
5653                         for result publication in the study. Otherwise, if automatic
5654                         publication is switched on, default value is used for result name.
5655
5656             Returns:
5657                 New GEOM.GEOM_Object for found sub-shape.
5658             """
5659             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5660             RaiseIfFailed("GetSame", self.ShapesOp)
5661             self._autoPublish(anObj, theName, "sameShape")
5662             return anObj
5663
5664
5665         ## Get sub-shape indices of theShapeWhere, which is
5666         #  equal to \a theShapeWhat.
5667         #  @param theShapeWhere Shape to find sub-shape of.
5668         #  @param theShapeWhat Shape, specifying what to find.
5669         #  @return List of all found sub-shapes indices.
5670         #
5671         #  @ref swig_GetSame "Example"
5672         @ManageTransactions("ShapesOp")
5673         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5674             """
5675             Get sub-shape indices of theShapeWhere, which is
5676             equal to theShapeWhat.
5677
5678             Parameters:
5679                 theShapeWhere Shape to find sub-shape of.
5680                 theShapeWhat Shape, specifying what to find.
5681
5682             Returns:
5683                 List of all found sub-shapes indices.
5684             """
5685             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5686             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5687             return anObj
5688
5689
5690         # end of l4_obtain
5691         ## @}
5692
5693         ## @addtogroup l4_access
5694         ## @{
5695
5696         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5697         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5698         #  @param aShape Shape to get sub-shape of.
5699         #  @param ListOfID List of sub-shapes indices.
5700         #  @param theName Object name; when specified, this parameter is used
5701         #         for result publication in the study. Otherwise, if automatic
5702         #         publication is switched on, default value is used for result name.
5703         #
5704         #  @return Found sub-shape.
5705         #
5706         #  @ref swig_all_decompose "Example"
5707         def GetSubShape(self, aShape, ListOfID, theName=None):
5708             """
5709             Obtain a composite sub-shape of aShape, composed from sub-shapes
5710             of aShape, selected by their unique IDs inside aShape
5711
5712             Parameters:
5713                 aShape Shape to get sub-shape of.
5714                 ListOfID List of sub-shapes indices.
5715                 theName Object name; when specified, this parameter is used
5716                         for result publication in the study. Otherwise, if automatic
5717                         publication is switched on, default value is used for result name.
5718
5719             Returns:
5720                 Found sub-shape.
5721             """
5722             # Example: see GEOM_TestAll.py
5723             anObj = self.AddSubShape(aShape,ListOfID)
5724             self._autoPublish(anObj, theName, "subshape")
5725             return anObj
5726
5727         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5728         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5729         #  @param aShape Shape to get sub-shape of.
5730         #  @param aSubShape Sub-shapes of aShape.
5731         #  @return ID of found sub-shape.
5732         #
5733         #  @ref swig_all_decompose "Example"
5734         @ManageTransactions("LocalOp")
5735         def GetSubShapeID(self, aShape, aSubShape):
5736             """
5737             Obtain unique ID of sub-shape aSubShape inside aShape
5738             of aShape, selected by their unique IDs inside aShape
5739
5740             Parameters:
5741                aShape Shape to get sub-shape of.
5742                aSubShape Sub-shapes of aShape.
5743
5744             Returns:
5745                ID of found sub-shape.
5746             """
5747             # Example: see GEOM_TestAll.py
5748             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5749             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5750             return anID
5751
5752         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5753         #  This function is provided for performance purpose. The complexity is O(n) with n
5754         #  the number of subobjects of aShape
5755         #  @param aShape Shape to get sub-shape of.
5756         #  @param aSubShapes Sub-shapes of aShape.
5757         #  @return list of IDs of found sub-shapes.
5758         #
5759         #  @ref swig_all_decompose "Example"
5760         @ManageTransactions("ShapesOp")
5761         def GetSubShapesIDs(self, aShape, aSubShapes):
5762             """
5763             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5764             This function is provided for performance purpose. The complexity is O(n) with n
5765             the number of subobjects of aShape
5766
5767             Parameters:
5768                aShape Shape to get sub-shape of.
5769                aSubShapes Sub-shapes of aShape.
5770
5771             Returns:
5772                List of IDs of found sub-shape.
5773             """
5774             # Example: see GEOM_TestAll.py
5775             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5776             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5777             return anIDs
5778
5779         # end of l4_access
5780         ## @}
5781
5782         ## @addtogroup l4_decompose
5783         ## @{
5784
5785         ## Get all sub-shapes and groups of \a theShape,
5786         #  that were created already by any other methods.
5787         #  @param theShape Any shape.
5788         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5789         #                       returned, else all found sub-shapes and groups.
5790         #  @return List of existing sub-objects of \a theShape.
5791         #
5792         #  @ref swig_all_decompose "Example"
5793         @ManageTransactions("ShapesOp")
5794         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5795             """
5796             Get all sub-shapes and groups of theShape,
5797             that were created already by any other methods.
5798
5799             Parameters:
5800                 theShape Any shape.
5801                 theGroupsOnly If this parameter is TRUE, only groups will be
5802                                  returned, else all found sub-shapes and groups.
5803
5804             Returns:
5805                 List of existing sub-objects of theShape.
5806             """
5807             # Example: see GEOM_TestAll.py
5808             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5809             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5810             return ListObj
5811
5812         ## Get all groups of \a theShape,
5813         #  that were created already by any other methods.
5814         #  @param theShape Any shape.
5815         #  @return List of existing groups of \a theShape.
5816         #
5817         #  @ref swig_all_decompose "Example"
5818         @ManageTransactions("ShapesOp")
5819         def GetGroups(self, theShape):
5820             """
5821             Get all groups of theShape,
5822             that were created already by any other methods.
5823
5824             Parameters:
5825                 theShape Any shape.
5826
5827             Returns:
5828                 List of existing groups of theShape.
5829             """
5830             # Example: see GEOM_TestAll.py
5831             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5832             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5833             return ListObj
5834
5835         ## Explode a shape on sub-shapes of a given type.
5836         #  If the shape itself matches the type, it is also returned.
5837         #  @param aShape Shape to be exploded.
5838         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5839         #  @param theName Object name; when specified, this parameter is used
5840         #         for result publication in the study. Otherwise, if automatic
5841         #         publication is switched on, default value is used for result name.
5842         #
5843         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5844         #
5845         #  @ref swig_all_decompose "Example"
5846         @ManageTransactions("ShapesOp")
5847         def SubShapeAll(self, aShape, aType, theName=None):
5848             """
5849             Explode a shape on sub-shapes of a given type.
5850             If the shape itself matches the type, it is also returned.
5851
5852             Parameters:
5853                 aShape Shape to be exploded.
5854                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5855                 theName Object name; when specified, this parameter is used
5856                         for result publication in the study. Otherwise, if automatic
5857                         publication is switched on, default value is used for result name.
5858
5859             Returns:
5860                 List of sub-shapes of type theShapeType, contained in theShape.
5861             """
5862             # Example: see GEOM_TestAll.py
5863             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5864             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5865             self._autoPublish(ListObj, theName, "subshape")
5866             return ListObj
5867
5868         ## Explode a shape on sub-shapes of a given type.
5869         #  @param aShape Shape to be exploded.
5870         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5871         #  @return List of IDs of sub-shapes.
5872         #
5873         #  @ref swig_all_decompose "Example"
5874         @ManageTransactions("ShapesOp")
5875         def SubShapeAllIDs(self, aShape, aType):
5876             """
5877             Explode a shape on sub-shapes of a given type.
5878
5879             Parameters:
5880                 aShape Shape to be exploded (see geompy.ShapeType)
5881                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5882
5883             Returns:
5884                 List of IDs of sub-shapes.
5885             """
5886             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5887             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5888             return ListObj
5889
5890         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5891         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5892         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5893         #  @param aShape Shape to get sub-shape of.
5894         #  @param ListOfInd List of sub-shapes indices.
5895         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5896         #  @param theName Object name; when specified, this parameter is used
5897         #         for result publication in the study. Otherwise, if automatic
5898         #         publication is switched on, default value is used for result name.
5899         #
5900         #  @return A compound of sub-shapes of aShape.
5901         #
5902         #  @ref swig_all_decompose "Example"
5903         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5904             """
5905             Obtain a compound of sub-shapes of aShape,
5906             selected by their indices in list of all sub-shapes of type aType.
5907             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5908
5909             Parameters:
5910                 aShape Shape to get sub-shape of.
5911                 ListOfID List of sub-shapes indices.
5912                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5913                 theName Object name; when specified, this parameter is used
5914                         for result publication in the study. Otherwise, if automatic
5915                         publication is switched on, default value is used for result name.
5916
5917             Returns:
5918                 A compound of sub-shapes of aShape.
5919             """
5920             # Example: see GEOM_TestAll.py
5921             ListOfIDs = []
5922             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5923             for ind in ListOfInd:
5924                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5925             # note: auto-publishing is done in self.GetSubShape()
5926             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5927             return anObj
5928
5929         ## Explode a shape on sub-shapes of a given type.
5930         #  Sub-shapes will be sorted taking into account their gravity centers,
5931         #  to provide stable order of sub-shapes.
5932         #  If the shape itself matches the type, it is also returned.
5933         #  @param aShape Shape to be exploded.
5934         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5935         #  @param theName Object name; when specified, this parameter is used
5936         #         for result publication in the study. Otherwise, if automatic
5937         #         publication is switched on, default value is used for result name.
5938         #
5939         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5940         #
5941         #  @ref swig_SubShapeAllSorted "Example"
5942         @ManageTransactions("ShapesOp")
5943         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5944             """
5945             Explode a shape on sub-shapes of a given type.
5946             Sub-shapes will be sorted taking into account their gravity centers,
5947             to provide stable order of sub-shapes.
5948             If the shape itself matches the type, it is also returned.
5949
5950             Parameters:
5951                 aShape Shape to be exploded.
5952                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5953                 theName Object name; when specified, this parameter is used
5954                         for result publication in the study. Otherwise, if automatic
5955                         publication is switched on, default value is used for result name.
5956
5957             Returns:
5958                 List of sub-shapes of type theShapeType, contained in theShape.
5959             """
5960             # Example: see GEOM_TestAll.py
5961             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5962             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5963             self._autoPublish(ListObj, theName, "subshape")
5964             return ListObj
5965
5966         ## Explode a shape on sub-shapes of a given type.
5967         #  Sub-shapes will be sorted taking into account their gravity centers,
5968         #  to provide stable order of sub-shapes.
5969         #  @param aShape Shape to be exploded.
5970         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5971         #  @return List of IDs of sub-shapes.
5972         #
5973         #  @ref swig_all_decompose "Example"
5974         @ManageTransactions("ShapesOp")
5975         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5976             """
5977             Explode a shape on sub-shapes of a given type.
5978             Sub-shapes will be sorted taking into account their gravity centers,
5979             to provide stable order of sub-shapes.
5980
5981             Parameters:
5982                 aShape Shape to be exploded.
5983                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5984
5985             Returns:
5986                 List of IDs of sub-shapes.
5987             """
5988             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5989             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5990             return ListIDs
5991
5992         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5993         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5994         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5995         #  @param aShape Shape to get sub-shape of.
5996         #  @param ListOfInd List of sub-shapes indices.
5997         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5998         #  @param theName Object name; when specified, this parameter is used
5999         #         for result publication in the study. Otherwise, if automatic
6000         #         publication is switched on, default value is used for result name.
6001         #
6002         #  @return A compound of sub-shapes of aShape.
6003         #
6004         #  @ref swig_all_decompose "Example"
6005         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
6006             """
6007             Obtain a compound of sub-shapes of aShape,
6008             selected by they indices in sorted list of all sub-shapes of type aType.
6009             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
6010
6011             Parameters:
6012                 aShape Shape to get sub-shape of.
6013                 ListOfID List of sub-shapes indices.
6014                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
6015                 theName Object name; when specified, this parameter is used
6016                         for result publication in the study. Otherwise, if automatic
6017                         publication is switched on, default value is used for result name.
6018
6019             Returns:
6020                 A compound of sub-shapes of aShape.
6021             """
6022             # Example: see GEOM_TestAll.py
6023             ListOfIDs = []
6024             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
6025             for ind in ListOfInd:
6026                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6027             # note: auto-publishing is done in self.GetSubShape()
6028             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6029             return anObj
6030
6031         ## Extract shapes (excluding the main shape) of given type.
6032         #  @param aShape The shape.
6033         #  @param aType  The shape type (see ShapeType())
6034         #  @param isSorted Boolean flag to switch sorting on/off.
6035         #  @param theName Object name; when specified, this parameter is used
6036         #         for result publication in the study. Otherwise, if automatic
6037         #         publication is switched on, default value is used for result name.
6038         #
6039         #  @return List of sub-shapes of type aType, contained in aShape.
6040         #
6041         #  @ref swig_FilletChamfer "Example"
6042         @ManageTransactions("ShapesOp")
6043         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
6044             """
6045             Extract shapes (excluding the main shape) of given type.
6046
6047             Parameters:
6048                 aShape The shape.
6049                 aType  The shape type (see geompy.ShapeType)
6050                 isSorted Boolean flag to switch sorting on/off.
6051                 theName Object name; when specified, this parameter is used
6052                         for result publication in the study. Otherwise, if automatic
6053                         publication is switched on, default value is used for result name.
6054
6055             Returns:
6056                 List of sub-shapes of type aType, contained in aShape.
6057             """
6058             # Example: see GEOM_TestAll.py
6059             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
6060             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
6061             self._autoPublish(ListObj, theName, "subshape")
6062             return ListObj
6063
6064         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
6065         #  @param aShape Main shape.
6066         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
6067         #  @param theName Object name; when specified, this parameter is used
6068         #         for result publication in the study. Otherwise, if automatic
6069         #         publication is switched on, default value is used for result name.
6070         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6071         #
6072         #  @ref swig_all_decompose "Example"
6073         @ManageTransactions("ShapesOp")
6074         def SubShapes(self, aShape, anIDs, theName=None):
6075             """
6076             Get a set of sub-shapes defined by their unique IDs inside theMainShape
6077
6078             Parameters:
6079                 aShape Main shape.
6080                 anIDs List of unique IDs of sub-shapes inside theMainShape.
6081                 theName Object name; when specified, this parameter is used
6082                         for result publication in the study. Otherwise, if automatic
6083                         publication is switched on, default value is used for result name.
6084
6085             Returns:
6086                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
6087             """
6088             # Example: see GEOM_TestAll.py
6089             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
6090             RaiseIfFailed("SubShapes", self.ShapesOp)
6091             self._autoPublish(ListObj, theName, "subshape")
6092             return ListObj
6093
6094         # end of l4_decompose
6095         ## @}
6096
6097         ## @addtogroup l4_decompose_d
6098         ## @{
6099
6100         ## Deprecated method
6101         #  It works like SubShapeAllSortedCentres(), but wrongly
6102         #  defines centres of faces, shells and solids.
6103         @ManageTransactions("ShapesOp")
6104         def SubShapeAllSorted(self, aShape, aType, theName=None):
6105             """
6106             Deprecated method
6107             It works like geompy.SubShapeAllSortedCentres, but wrongly
6108             defines centres of faces, shells and solids.
6109             """
6110             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
6111             RaiseIfFailed("MakeExplode", self.ShapesOp)
6112             self._autoPublish(ListObj, theName, "subshape")
6113             return ListObj
6114
6115         ## Deprecated method
6116         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
6117         #  defines centres of faces, shells and solids.
6118         @ManageTransactions("ShapesOp")
6119         def SubShapeAllSortedIDs(self, aShape, aType):
6120             """
6121             Deprecated method
6122             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
6123             defines centres of faces, shells and solids.
6124             """
6125             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
6126             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
6127             return ListIDs
6128
6129         ## Deprecated method
6130         #  It works like SubShapeSortedCentres(), but has a bug
6131         #  (wrongly defines centres of faces, shells and solids).
6132         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
6133             """
6134             Deprecated method
6135             It works like geompy.SubShapeSortedCentres, but has a bug
6136             (wrongly defines centres of faces, shells and solids).
6137             """
6138             ListOfIDs = []
6139             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
6140             for ind in ListOfInd:
6141                 ListOfIDs.append(AllShapeIDsList[ind - 1])
6142             # note: auto-publishing is done in self.GetSubShape()
6143             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6144             return anObj
6145
6146         # end of l4_decompose_d
6147         ## @}
6148
6149         ## @addtogroup l3_healing
6150         ## @{
6151
6152         ## Apply a sequence of Shape Healing operators to the given object.
6153         #  @param theShape Shape to be processed.
6154         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6155         #  @param theParameters List of names of parameters
6156         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6157         #  @param theValues List of values of parameters, in the same order
6158         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6159         #  @param theName Object name; when specified, this parameter is used
6160         #         for result publication in the study. Otherwise, if automatic
6161         #         publication is switched on, default value is used for result name.
6162         #
6163         #  <b> Operators and Parameters: </b> \n
6164         #
6165         #  * \b FixShape - corrects invalid shapes. \n
6166         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6167         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6168         #
6169         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6170         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6171         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6172         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6173         #
6174         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6175         #    surfaces in segments using a certain angle. \n
6176         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6177         #    if Angle=180, four if Angle=90, etc). \n
6178         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6179         #
6180         #  * \b SplitClosedFaces - splits closed faces in segments.
6181         #    The number of segments depends on the number of splitting points.\n
6182         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6183         #
6184         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6185         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6186         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6187         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6188         #   This and the previous parameters can take the following values:\n
6189         #   \b Parametric \b Continuity \n
6190         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6191         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6192         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6193         #    ruling out sharp edges).\n
6194         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6195         #       are of the same magnitude).\n
6196         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6197         #    or surfaces (d/du C(u)) are the same at junction. \n
6198         #   \b Geometric \b Continuity \n
6199         #   \b G1: first derivatives are proportional at junction.\n
6200         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6201         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6202         #   \b G2: first and second derivatives are proportional at junction.
6203         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6204         #    continuity requires that the underlying parameterization was continuous as well.
6205         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6206         #
6207         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6208         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6209         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6210         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6211         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6212         #       with the specified parameters.\n
6213         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6214         #       with the specified parameters.\n
6215         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6216         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6217         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6218         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6219         #
6220         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6221         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6222         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6223         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6224         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6225         #
6226         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6227         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6228         #
6229         #
6230         #  @return New GEOM.GEOM_Object, containing processed shape.
6231         #
6232         #  \n @ref tui_shape_processing "Example"
6233         @ManageTransactions("HealOp")
6234         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6235             """
6236             Apply a sequence of Shape Healing operators to the given object.
6237
6238             Parameters:
6239                 theShape Shape to be processed.
6240                 theValues List of values of parameters, in the same order
6241                           as parameters are listed in theParameters list.
6242                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6243                 theParameters List of names of parameters
6244                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6245                 theName Object name; when specified, this parameter is used
6246                         for result publication in the study. Otherwise, if automatic
6247                         publication is switched on, default value is used for result name.
6248
6249                 Operators and Parameters:
6250
6251                  * FixShape - corrects invalid shapes.
6252                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6253                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6254                  * FixFaceSize - removes small faces, such as spots and strips.
6255                      * FixFaceSize.Tolerance - defines minimum possible face size.
6256                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
6257                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6258                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6259                                 in segments using a certain angle.
6260                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6261                                           if Angle=180, four if Angle=90, etc).
6262                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6263                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6264                                       splitting points.
6265                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6266                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6267                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6268                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6269                      * SplitContinuity.CurveContinuity - required continuity for curves.
6270                        This and the previous parameters can take the following values:
6271
6272                        Parametric Continuity:
6273                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6274                                                    coincidental. The curves or surfaces may still meet at an angle,
6275                                                    giving rise to a sharp corner or edge).
6276                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6277                                                    are parallel, ruling out sharp edges).
6278                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6279                                                   or surfaces are of the same magnitude).
6280                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6281                           curves or surfaces (d/du C(u)) are the same at junction.
6282
6283                        Geometric Continuity:
6284                        G1: first derivatives are proportional at junction.
6285                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6286                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6287                        G2: first and second derivatives are proportional at junction. As the names imply,
6288                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6289                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6290                            geometric continuity of order n, but not vice-versa.
6291                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6292                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6293                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6294                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6295                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6296                                                         the specified parameters.
6297                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6298                                                         the specified parameters.
6299                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6300                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6301                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6302                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6303                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6304                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6305                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6306                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6307                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6308                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6309                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6310
6311             Returns:
6312                 New GEOM.GEOM_Object, containing processed shape.
6313
6314             Note: For more information look through SALOME Geometry User's Guide->
6315                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6316             """
6317             # Example: see GEOM_TestHealing.py
6318             theValues,Parameters = ParseList(theValues)
6319             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6320             # To avoid script failure in case of good argument shape
6321             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6322                 return theShape
6323             RaiseIfFailed("ProcessShape", self.HealOp)
6324             for string in (theOperators + theParameters):
6325                 Parameters = ":" + Parameters
6326                 pass
6327             anObj.SetParameters(Parameters)
6328             self._autoPublish(anObj, theName, "healed")
6329             return anObj
6330
6331         ## Remove faces from the given object (shape).
6332         #  @param theObject Shape to be processed.
6333         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6334         #                  removes ALL faces of the given object.
6335         #  @param theName Object name; when specified, this parameter is used
6336         #         for result publication in the study. Otherwise, if automatic
6337         #         publication is switched on, default value is used for result name.
6338         #
6339         #  @return New GEOM.GEOM_Object, containing processed shape.
6340         #
6341         #  @ref tui_suppress_faces "Example"
6342         @ManageTransactions("HealOp")
6343         def SuppressFaces(self, theObject, theFaces, theName=None):
6344             """
6345             Remove faces from the given object (shape).
6346
6347             Parameters:
6348                 theObject Shape to be processed.
6349                 theFaces Indices of faces to be removed, if EMPTY then the method
6350                          removes ALL faces of the given object.
6351                 theName Object name; when specified, this parameter is used
6352                         for result publication in the study. Otherwise, if automatic
6353                         publication is switched on, default value is used for result name.
6354
6355             Returns:
6356                 New GEOM.GEOM_Object, containing processed shape.
6357             """
6358             # Example: see GEOM_TestHealing.py
6359             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6360             RaiseIfFailed("SuppressFaces", self.HealOp)
6361             self._autoPublish(anObj, theName, "suppressFaces")
6362             return anObj
6363
6364         ## Sewing of faces into a single shell.
6365         #  @param ListShape Shapes to be processed.
6366         #  @param theTolerance Required tolerance value.
6367         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6368         #  @param theName Object name; when specified, this parameter is used
6369         #         for result publication in the study. Otherwise, if automatic
6370         #         publication is switched on, default value is used for result name.
6371         #
6372         #  @return New GEOM.GEOM_Object, containing a result shell.
6373         #
6374         #  @ref tui_sewing "Example"
6375         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6376             """
6377             Sewing of faces into a single shell.
6378
6379             Parameters:
6380                 ListShape Shapes to be processed.
6381                 theTolerance Required tolerance value.
6382                 AllowNonManifold Flag that allows non-manifold sewing.
6383                 theName Object name; when specified, this parameter is used
6384                         for result publication in the study. Otherwise, if automatic
6385                         publication is switched on, default value is used for result name.
6386
6387             Returns:
6388                 New GEOM.GEOM_Object, containing containing a result shell.
6389             """
6390             # Example: see GEOM_TestHealing.py
6391             # note: auto-publishing is done in self.Sew()
6392             anObj = self.Sew(ListShape, theTolerance, AllowNonManifold, theName)
6393             return anObj
6394
6395         ## Sewing of faces into a single shell.
6396         #  @param ListShape Shapes to be processed.
6397         #  @param theTolerance Required tolerance value.
6398         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6399         #  @param theName Object name; when specified, this parameter is used
6400         #         for result publication in the study. Otherwise, if automatic
6401         #         publication is switched on, default value is used for result name.
6402         #
6403         #  @return New GEOM.GEOM_Object, containing a result shell.
6404         @ManageTransactions("HealOp")
6405         def Sew(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6406             """
6407             Sewing of faces into a single shell.
6408
6409             Parameters:
6410                 ListShape Shapes to be processed.
6411                 theTolerance Required tolerance value.
6412                 AllowNonManifold Flag that allows non-manifold sewing.
6413                 theName Object name; when specified, this parameter is used
6414                         for result publication in the study. Otherwise, if automatic
6415                         publication is switched on, default value is used for result name.
6416
6417             Returns:
6418                 New GEOM.GEOM_Object, containing a result shell.
6419             """
6420             # Example: see MakeSewing() above
6421             theTolerance,Parameters = ParseParameters(theTolerance)
6422             if AllowNonManifold:
6423                 anObj = self.HealOp.SewAllowNonManifold( ToList( ListShape ), theTolerance)
6424             else:
6425                 anObj = self.HealOp.Sew( ToList( ListShape ), theTolerance)
6426             # To avoid script failure in case of good argument shape
6427             # (Fix of test cases geom/bugs11/L7,L8)
6428             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6429                 return anObj
6430             RaiseIfFailed("Sew", self.HealOp)
6431             anObj.SetParameters(Parameters)
6432             self._autoPublish(anObj, theName, "sewed")
6433             return anObj
6434
6435         ## Rebuild the topology of theSolids by removing
6436         #  the faces that are shared by several solids.
6437         #  @param theSolids A compound or a list of solids to be processed.
6438         #  @param theName Object name; when specified, this parameter is used
6439         #         for result publication in the study. Otherwise, if automatic
6440         #         publication is switched on, default value is used for result name.
6441         #
6442         #  @return New GEOM.GEOM_Object, containing processed shape.
6443         #
6444         #  @ref tui_remove_webs "Example"
6445         @ManageTransactions("HealOp")
6446         def RemoveInternalFaces (self, theSolids, theName=None):
6447             """
6448             Rebuild the topology of theSolids by removing
6449             the faces that are shared by several solids.
6450
6451             Parameters:
6452                 theSolids A compound or a list of solids to be processed.
6453                 theName Object name; when specified, this parameter is used
6454                         for result publication in the study. Otherwise, if automatic
6455                         publication is switched on, default value is used for result name.
6456
6457             Returns:
6458                 New GEOM.GEOM_Object, containing processed shape.
6459             """
6460             # Example: see GEOM_TestHealing.py
6461             anObj = self.HealOp.RemoveInternalFaces(ToList(theSolids))
6462             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6463             self._autoPublish(anObj, theName, "removeWebs")
6464             return anObj
6465
6466         ## Remove internal wires and edges from the given object (face).
6467         #  @param theObject Shape to be processed.
6468         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6469         #                  removes ALL internal wires of the given object.
6470         #  @param theName Object name; when specified, this parameter is used
6471         #         for result publication in the study. Otherwise, if automatic
6472         #         publication is switched on, default value is used for result name.
6473         #
6474         #  @return New GEOM.GEOM_Object, containing processed shape.
6475         #
6476         #  @ref tui_suppress_internal_wires "Example"
6477         @ManageTransactions("HealOp")
6478         def SuppressInternalWires(self, theObject, theWires, theName=None):
6479             """
6480             Remove internal wires and edges from the given object (face).
6481
6482             Parameters:
6483                 theObject Shape to be processed.
6484                 theWires Indices of wires to be removed, if EMPTY then the method
6485                          removes ALL internal wires of the given object.
6486                 theName Object name; when specified, this parameter is used
6487                         for result publication in the study. Otherwise, if automatic
6488                         publication is switched on, default value is used for result name.
6489
6490             Returns:
6491                 New GEOM.GEOM_Object, containing processed shape.
6492             """
6493             # Example: see GEOM_TestHealing.py
6494             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6495             RaiseIfFailed("RemoveIntWires", self.HealOp)
6496             self._autoPublish(anObj, theName, "suppressWires")
6497             return anObj
6498
6499         ## Remove internal closed contours (holes) from the given object.
6500         #  @param theObject Shape to be processed.
6501         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6502         #                  removes ALL internal holes of the given object
6503         #  @param theName Object name; when specified, this parameter is used
6504         #         for result publication in the study. Otherwise, if automatic
6505         #         publication is switched on, default value is used for result name.
6506         #
6507         #  @return New GEOM.GEOM_Object, containing processed shape.
6508         #
6509         #  @ref tui_suppress_holes "Example"
6510         @ManageTransactions("HealOp")
6511         def SuppressHoles(self, theObject, theWires, theName=None):
6512             """
6513             Remove internal closed contours (holes) from the given object.
6514
6515             Parameters:
6516                 theObject Shape to be processed.
6517                 theWires Indices of wires to be removed, if EMPTY then the method
6518                          removes ALL internal holes of the given object
6519                 theName Object name; when specified, this parameter is used
6520                         for result publication in the study. Otherwise, if automatic
6521                         publication is switched on, default value is used for result name.
6522
6523             Returns:
6524                 New GEOM.GEOM_Object, containing processed shape.
6525             """
6526             # Example: see GEOM_TestHealing.py
6527             anObj = self.HealOp.FillHoles(theObject, theWires)
6528             RaiseIfFailed("FillHoles", self.HealOp)
6529             self._autoPublish(anObj, theName, "suppressHoles")
6530             return anObj
6531
6532         ## Close an open wire.
6533         #  @param theObject Shape to be processed.
6534         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6535         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6536         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6537         #                        If False : closure by creation of an edge between ends.
6538         #  @param theName Object name; when specified, this parameter is used
6539         #         for result publication in the study. Otherwise, if automatic
6540         #         publication is switched on, default value is used for result name.
6541         #
6542         #  @return New GEOM.GEOM_Object, containing processed shape.
6543         #
6544         #  @ref tui_close_contour "Example"
6545         @ManageTransactions("HealOp")
6546         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6547             """
6548             Close an open wire.
6549
6550             Parameters:
6551                 theObject Shape to be processed.
6552                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6553                          if [ ], then theObject itself is a wire.
6554                 isCommonVertex If True  : closure by creation of a common vertex,
6555                                If False : closure by creation of an edge between ends.
6556                 theName Object name; when specified, this parameter is used
6557                         for result publication in the study. Otherwise, if automatic
6558                         publication is switched on, default value is used for result name.
6559
6560             Returns:
6561                 New GEOM.GEOM_Object, containing processed shape.
6562             """
6563             # Example: see GEOM_TestHealing.py
6564             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6565             RaiseIfFailed("CloseContour", self.HealOp)
6566             self._autoPublish(anObj, theName, "closeContour")
6567             return anObj
6568
6569         ## Addition of a point to a given edge object.
6570         #  @param theObject Shape to be processed.
6571         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6572         #                      if -1, then theObject itself is the edge.
6573         #  @param theValue Value of parameter on edge or length parameter,
6574         #                  depending on \a isByParameter.
6575         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6576         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6577         #  @param theName Object name; when specified, this parameter is used
6578         #         for result publication in the study. Otherwise, if automatic
6579         #         publication is switched on, default value is used for result name.
6580         #
6581         #  @return New GEOM.GEOM_Object, containing processed shape.
6582         #
6583         #  @ref tui_add_point_on_edge "Example"
6584         @ManageTransactions("HealOp")
6585         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6586             """
6587             Addition of a point to a given edge object.
6588
6589             Parameters:
6590                 theObject Shape to be processed.
6591                 theEdgeIndex Index of edge to be divided within theObject's shape,
6592                              if -1, then theObject itself is the edge.
6593                 theValue Value of parameter on edge or length parameter,
6594                          depending on isByParameter.
6595                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6596                               if FALSE : theValue is treated as a length parameter [0..1]
6597                 theName Object name; when specified, this parameter is used
6598                         for result publication in the study. Otherwise, if automatic
6599                         publication is switched on, default value is used for result name.
6600
6601             Returns:
6602                 New GEOM.GEOM_Object, containing processed shape.
6603             """
6604             # Example: see GEOM_TestHealing.py
6605             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6606             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6607             RaiseIfFailed("DivideEdge", self.HealOp)
6608             anObj.SetParameters(Parameters)
6609             self._autoPublish(anObj, theName, "divideEdge")
6610             return anObj
6611
6612         ## Addition of a point to a given edge of \a theObject by projecting
6613         #  another point to the given edge.
6614         #  @param theObject Shape to be processed.
6615         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6616         #                      if -1, then theObject itself is the edge.
6617         #  @param thePoint Point to project to theEdgeIndex-th edge.
6618         #  @param theName Object name; when specified, this parameter is used
6619         #         for result publication in the study. Otherwise, if automatic
6620         #         publication is switched on, default value is used for result name.
6621         #
6622         #  @return New GEOM.GEOM_Object, containing processed shape.
6623         #
6624         #  @ref tui_add_point_on_edge "Example"
6625         @ManageTransactions("HealOp")
6626         def DivideEdgeByPoint(self, theObject, theEdgeIndex, thePoint, theName=None):
6627             """
6628             Addition of a point to a given edge of \a theObject by projecting
6629             another point to the given edge.
6630
6631             Parameters:
6632                 theObject Shape to be processed.
6633                 theEdgeIndex The edge or its index to be divided within theObject's shape,
6634                              if -1, then theObject itself is the edge.
6635                 thePoint Point to project to theEdgeIndex-th edge.
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             # Example: see GEOM_TestHealing.py
6644             if isinstance( theEdgeIndex, GEOM._objref_GEOM_Object ):
6645                 theEdgeIndex = self.GetSubShapeID( theObject, theEdgeIndex )
6646             anObj = self.HealOp.DivideEdgeByPoint(theObject, theEdgeIndex, thePoint)
6647             RaiseIfFailed("DivideEdgeByPoint", self.HealOp)
6648             self._autoPublish(anObj, theName, "divideEdge")
6649             return anObj
6650
6651         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6652         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6653         #  @param theVertices A list of vertices to suppress. If the list
6654         #                     is empty, all vertices in a wire will be assumed.
6655         #  @param theName Object name; when specified, this parameter is used
6656         #         for result publication in the study. Otherwise, if automatic
6657         #         publication is switched on, default value is used for result name.
6658         #
6659         #  @return New GEOM.GEOM_Object with modified wire.
6660         #
6661         #  @ref tui_fuse_collinear_edges "Example"
6662         @ManageTransactions("HealOp")
6663         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6664             """
6665             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6666
6667             Parameters:
6668                 theWire Wire to minimize the number of C1 continuous edges in.
6669                 theVertices A list of vertices to suppress. If the list
6670                             is empty, all vertices in a wire will be assumed.
6671                 theName Object name; when specified, this parameter is used
6672                         for result publication in the study. Otherwise, if automatic
6673                         publication is switched on, default value is used for result name.
6674
6675             Returns:
6676                 New GEOM.GEOM_Object with modified wire.
6677             """
6678             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6679             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6680             self._autoPublish(anObj, theName, "fuseEdges")
6681             return anObj
6682
6683         ## Change orientation of the given object. Updates given shape.
6684         #  @param theObject Shape to be processed.
6685         #  @return Updated <var>theObject</var>
6686         #
6687         #  @ref swig_todo "Example"
6688         @ManageTransactions("HealOp")
6689         def ChangeOrientationShell(self,theObject):
6690             """
6691             Change orientation of the given object. Updates given shape.
6692
6693             Parameters:
6694                 theObject Shape to be processed.
6695
6696             Returns:
6697                 Updated theObject
6698             """
6699             theObject = self.HealOp.ChangeOrientation(theObject)
6700             RaiseIfFailed("ChangeOrientation", self.HealOp)
6701             pass
6702
6703         ## Change orientation of the given object.
6704         #  @param theObject Shape to be processed.
6705         #  @param theName Object name; when specified, this parameter is used
6706         #         for result publication in the study. Otherwise, if automatic
6707         #         publication is switched on, default value is used for result name.
6708         #
6709         #  @return New GEOM.GEOM_Object, containing processed shape.
6710         #
6711         #  @ref swig_todo "Example"
6712         @ManageTransactions("HealOp")
6713         def ChangeOrientationShellCopy(self, theObject, theName=None):
6714             """
6715             Change orientation of the given object.
6716
6717             Parameters:
6718                 theObject Shape to be processed.
6719                 theName Object name; when specified, this parameter is used
6720                         for result publication in the study. Otherwise, if automatic
6721                         publication is switched on, default value is used for result name.
6722
6723             Returns:
6724                 New GEOM.GEOM_Object, containing processed shape.
6725             """
6726             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6727             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6728             self._autoPublish(anObj, theName, "reversed")
6729             return anObj
6730
6731         ## Try to limit tolerance of the given object by value \a theTolerance.
6732         #  @param theObject Shape to be processed.
6733         #  @param theTolerance Required tolerance value.
6734         #  @param theName Object name; when specified, this parameter is used
6735         #         for result publication in the study. Otherwise, if automatic
6736         #         publication is switched on, default value is used for result name.
6737         #
6738         #  @return New GEOM.GEOM_Object, containing processed shape.
6739         #
6740         #  @ref tui_limit_tolerance "Example"
6741         @ManageTransactions("HealOp")
6742         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6743             """
6744             Try to limit tolerance of the given object by value theTolerance.
6745
6746             Parameters:
6747                 theObject Shape to be processed.
6748                 theTolerance Required tolerance value.
6749                 theName Object name; when specified, this parameter is used
6750                         for result publication in the study. Otherwise, if automatic
6751                         publication is switched on, default value is used for result name.
6752
6753             Returns:
6754                 New GEOM.GEOM_Object, containing processed shape.
6755             """
6756             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6757             RaiseIfFailed("LimitTolerance", self.HealOp)
6758             self._autoPublish(anObj, theName, "limitTolerance")
6759             return anObj
6760
6761         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6762         #  that constitute a free boundary of the given shape.
6763         #  @param theObject Shape to get free boundary of.
6764         #  @param theName Object name; when specified, this parameter is used
6765         #         for result publication in the study. Otherwise, if automatic
6766         #         publication is switched on, default value is used for result name.
6767         #
6768         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6769         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6770         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6771         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6772         #
6773         #  @ref tui_measurement_tools_page "Example"
6774         @ManageTransactions("HealOp")
6775         def GetFreeBoundary(self, theObject, theName=None):
6776             """
6777             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6778             that constitute a free boundary of the given shape.
6779
6780             Parameters:
6781                 theObject Shape to get free boundary of.
6782                 theName Object name; when specified, this parameter is used
6783                         for result publication in the study. Otherwise, if automatic
6784                         publication is switched on, default value is used for result name.
6785
6786             Returns:
6787                 [status, theClosedWires, theOpenWires]
6788                  status: FALSE, if an error(s) occured during the method execution.
6789                  theClosedWires: Closed wires on the free boundary of the given shape.
6790                  theOpenWires: Open wires on the free boundary of the given shape.
6791             """
6792             # Example: see GEOM_TestHealing.py
6793             anObj = self.HealOp.GetFreeBoundary( ToList( theObject ))
6794             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6795             self._autoPublish(anObj[1], theName, "closedWire")
6796             self._autoPublish(anObj[2], theName, "openWire")
6797             return anObj
6798
6799         ## Replace coincident faces in \a theShapes by one face.
6800         #  @param theShapes Initial shapes, either a list or compound of shapes.
6801         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6802         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6803         #                         otherwise all initial shapes.
6804         #  @param theName Object name; when specified, this parameter is used
6805         #         for result publication in the study. Otherwise, if automatic
6806         #         publication is switched on, default value is used for result name.
6807         #
6808         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6809         #
6810         #  @ref tui_glue_faces "Example"
6811         @ManageTransactions("ShapesOp")
6812         def MakeGlueFaces(self, theShapes, theTolerance, doKeepNonSolids=True, theName=None):
6813             """
6814             Replace coincident faces in theShapes by one face.
6815
6816             Parameters:
6817                 theShapes Initial shapes, either a list or compound of shapes.
6818                 theTolerance Maximum distance between faces, which can be considered as coincident.
6819                 doKeepNonSolids If FALSE, only solids will present in the result,
6820                                 otherwise all initial shapes.
6821                 theName Object name; when specified, this parameter is used
6822                         for result publication in the study. Otherwise, if automatic
6823                         publication is switched on, default value is used for result name.
6824
6825             Returns:
6826                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6827             """
6828             # Example: see GEOM_Spanner.py
6829             theTolerance,Parameters = ParseParameters(theTolerance)
6830             anObj = self.ShapesOp.MakeGlueFaces(ToList(theShapes), theTolerance, doKeepNonSolids)
6831             if anObj is None:
6832                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6833             anObj.SetParameters(Parameters)
6834             self._autoPublish(anObj, theName, "glueFaces")
6835             return anObj
6836
6837         ## Find coincident faces in \a theShapes for possible gluing.
6838         #  @param theShapes Initial shapes, either a list or compound of shapes.
6839         #  @param theTolerance Maximum distance between faces,
6840         #                      which can be considered as coincident.
6841         #  @param theName Object name; when specified, this parameter is used
6842         #         for result publication in the study. Otherwise, if automatic
6843         #         publication is switched on, default value is used for result name.
6844         #
6845         #  @return GEOM.ListOfGO
6846         #
6847         #  @ref tui_glue_faces "Example"
6848         @ManageTransactions("ShapesOp")
6849         def GetGlueFaces(self, theShapes, theTolerance, theName=None):
6850             """
6851             Find coincident faces in theShapes for possible gluing.
6852
6853             Parameters:
6854                 theShapes Initial shapes, either a list or compound of shapes.
6855                 theTolerance Maximum distance between faces,
6856                              which can be considered as coincident.
6857                 theName Object name; when specified, this parameter is used
6858                         for result publication in the study. Otherwise, if automatic
6859                         publication is switched on, default value is used for result name.
6860
6861             Returns:
6862                 GEOM.ListOfGO
6863             """
6864             anObj = self.ShapesOp.GetGlueFaces(ToList(theShapes), theTolerance)
6865             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6866             self._autoPublish(anObj, theName, "facesToGlue")
6867             return anObj
6868
6869         ## Replace coincident faces in \a theShapes by one face
6870         #  in compliance with given list of faces
6871         #  @param theShapes Initial shapes, either a list or compound of shapes.
6872         #  @param theTolerance Maximum distance between faces,
6873         #                      which can be considered as coincident.
6874         #  @param theFaces List of faces for gluing.
6875         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6876         #                         otherwise all initial shapes.
6877         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6878         #                        will be glued, otherwise only the edges,
6879         #                        belonging to <VAR>theFaces</VAR>.
6880         #  @param theName Object name; when specified, this parameter is used
6881         #         for result publication in the study. Otherwise, if automatic
6882         #         publication is switched on, default value is used for result name.
6883         #
6884         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6885         #
6886         #  @ref tui_glue_faces "Example"
6887         @ManageTransactions("ShapesOp")
6888         def MakeGlueFacesByList(self, theShapes, theTolerance, theFaces,
6889                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6890             """
6891             Replace coincident faces in theShapes by one face
6892             in compliance with given list of faces
6893
6894             Parameters:
6895                 theShapes theShapes Initial shapes, either a list or compound of shapes.
6896                 theTolerance Maximum distance between faces,
6897                              which can be considered as coincident.
6898                 theFaces List of faces for gluing.
6899                 doKeepNonSolids If FALSE, only solids will present in the result,
6900                                 otherwise all initial shapes.
6901                 doGlueAllEdges If TRUE, all coincident edges of theShape
6902                                will be glued, otherwise only the edges,
6903                                belonging to theFaces.
6904                 theName Object name; when specified, this parameter is used
6905                         for result publication in the study. Otherwise, if automatic
6906                         publication is switched on, default value is used for result name.
6907
6908             Returns:
6909                 New GEOM.GEOM_Object, containing copies of theShapes without coincident faces.
6910             """
6911             anObj = self.ShapesOp.MakeGlueFacesByList(ToList(theShapes), theTolerance, theFaces,
6912                                                       doKeepNonSolids, doGlueAllEdges)
6913             if anObj is None:
6914                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6915             self._autoPublish(anObj, theName, "glueFaces")
6916             return anObj
6917
6918         ## Replace coincident edges in \a theShapes by one edge.
6919         #  @param theShapes Initial shapes, either a list or compound of shapes.
6920         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6921         #  @param theName Object name; when specified, this parameter is used
6922         #         for result publication in the study. Otherwise, if automatic
6923         #         publication is switched on, default value is used for result name.
6924         #
6925         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
6926         #
6927         #  @ref tui_glue_edges "Example"
6928         @ManageTransactions("ShapesOp")
6929         def MakeGlueEdges(self, theShapes, theTolerance, theName=None):
6930             """
6931             Replace coincident edges in theShapes by one edge.
6932
6933             Parameters:
6934                 theShapes Initial shapes, either a list or compound of shapes.
6935                 theTolerance Maximum distance between edges, which can be considered as coincident.
6936                 theName Object name; when specified, this parameter is used
6937                         for result publication in the study. Otherwise, if automatic
6938                         publication is switched on, default value is used for result name.
6939
6940             Returns:
6941                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
6942             """
6943             theTolerance,Parameters = ParseParameters(theTolerance)
6944             anObj = self.ShapesOp.MakeGlueEdges(ToList(theShapes), theTolerance)
6945             if anObj is None:
6946                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6947             anObj.SetParameters(Parameters)
6948             self._autoPublish(anObj, theName, "glueEdges")
6949             return anObj
6950
6951         ## Find coincident edges in \a theShapes for possible gluing.
6952         #  @param theShapes Initial shapes, either a list or compound of shapes.
6953         #  @param theTolerance Maximum distance between edges,
6954         #                      which can be considered as coincident.
6955         #  @param theName Object name; when specified, this parameter is used
6956         #         for result publication in the study. Otherwise, if automatic
6957         #         publication is switched on, default value is used for result name.
6958         #
6959         #  @return GEOM.ListOfGO
6960         #
6961         #  @ref tui_glue_edges "Example"
6962         @ManageTransactions("ShapesOp")
6963         def GetGlueEdges(self, theShapes, theTolerance, theName=None):
6964             """
6965             Find coincident edges in theShapes for possible gluing.
6966
6967             Parameters:
6968                 theShapes Initial shapes, either a list or compound of shapes.
6969                 theTolerance Maximum distance between edges,
6970                              which can be considered as coincident.
6971                 theName Object name; when specified, this parameter is used
6972                         for result publication in the study. Otherwise, if automatic
6973                         publication is switched on, default value is used for result name.
6974
6975             Returns:
6976                 GEOM.ListOfGO
6977             """
6978             anObj = self.ShapesOp.GetGlueEdges(ToList(theShapes), theTolerance)
6979             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6980             self._autoPublish(anObj, theName, "edgesToGlue")
6981             return anObj
6982
6983         ## Replace coincident edges in theShapes by one edge
6984         #  in compliance with given list of edges.
6985         #  @param theShapes Initial shapes, either a list or compound of shapes.
6986         #  @param theTolerance Maximum distance between edges,
6987         #                      which can be considered as coincident.
6988         #  @param theEdges List of edges for gluing.
6989         #  @param theName Object name; when specified, this parameter is used
6990         #         for result publication in the study. Otherwise, if automatic
6991         #         publication is switched on, default value is used for result name.
6992         #
6993         #  @return New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
6994         #
6995         #  @ref tui_glue_edges "Example"
6996         @ManageTransactions("ShapesOp")
6997         def MakeGlueEdgesByList(self, theShapes, theTolerance, theEdges, theName=None):
6998             """
6999             Replace coincident edges in theShapes by one edge
7000             in compliance with given list of edges.
7001
7002             Parameters:
7003                 theShapes Initial shapes, either a list or compound of shapes.
7004                 theTolerance Maximum distance between edges,
7005                              which can be considered as coincident.
7006                 theEdges List of edges for gluing.
7007                 theName Object name; when specified, this parameter is used
7008                         for result publication in the study. Otherwise, if automatic
7009                         publication is switched on, default value is used for result name.
7010
7011             Returns:
7012                 New GEOM.GEOM_Object, containing copies of theShapes without coincident edges.
7013             """
7014             anObj = self.ShapesOp.MakeGlueEdgesByList(ToList(theShapes), theTolerance, theEdges)
7015             if anObj is None:
7016                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
7017             self._autoPublish(anObj, theName, "glueEdges")
7018             return anObj
7019
7020         # end of l3_healing
7021         ## @}
7022
7023         ## @addtogroup l3_boolean Boolean Operations
7024         ## @{
7025
7026         # -----------------------------------------------------------------------------
7027         # Boolean (Common, Cut, Fuse, Section)
7028         # -----------------------------------------------------------------------------
7029
7030         ## Perform one of boolean operations on two given shapes.
7031         #  @param theShape1 First argument for boolean operation.
7032         #  @param theShape2 Second argument for boolean operation.
7033         #  @param theOperation Indicates the operation to be done:\n
7034         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7035         #  @param checkSelfInte The flag that tells if the arguments should
7036         #         be checked for self-intersection prior to the operation.
7037         #  @param theName Object name; when specified, this parameter is used
7038         #         for result publication in the study. Otherwise, if automatic
7039         #         publication is switched on, default value is used for result name.
7040         #
7041         #  @note This algorithm doesn't find all types of self-intersections.
7042         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7043         #        vertex/face and edge/face intersections. Face/face
7044         #        intersections detection is switched off as it is a
7045         #        time-consuming operation that gives an impact on performance.
7046         #        To find all self-intersections please use
7047         #        CheckSelfIntersections() method.
7048         #
7049         #  @return New GEOM.GEOM_Object, containing the result shape.
7050         #
7051         #  @ref tui_fuse "Example"
7052         @ManageTransactions("BoolOp")
7053         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
7054             """
7055             Perform one of boolean operations on two given shapes.
7056
7057             Parameters:
7058                 theShape1 First argument for boolean operation.
7059                 theShape2 Second argument for boolean operation.
7060                 theOperation Indicates the operation to be done:
7061                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
7062                 checkSelfInte The flag that tells if the arguments should
7063                               be checked for self-intersection prior to
7064                               the operation.
7065                 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:
7070                     This algorithm doesn't find all types of self-intersections.
7071                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7072                     vertex/face and edge/face intersections. Face/face
7073                     intersections detection is switched off as it is a
7074                     time-consuming operation that gives an impact on performance.
7075                     To find all self-intersections please use
7076                     CheckSelfIntersections() method.
7077
7078             Returns:
7079                 New GEOM.GEOM_Object, containing the result shape.
7080             """
7081             # Example: see GEOM_TestAll.py
7082             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
7083             RaiseIfFailed("MakeBoolean", self.BoolOp)
7084             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
7085             self._autoPublish(anObj, theName, def_names[theOperation])
7086             return anObj
7087
7088         ## Perform Common boolean operation on two given shapes.
7089         #  @param theShape1 First argument for boolean operation.
7090         #  @param theShape2 Second argument for boolean operation.
7091         #  @param checkSelfInte The flag that tells if the arguments should
7092         #         be checked for self-intersection prior to the operation.
7093         #  @param theName Object name; when specified, this parameter is used
7094         #         for result publication in the study. Otherwise, if automatic
7095         #         publication is switched on, default value is used for result name.
7096         #
7097         #  @note This algorithm doesn't find all types of self-intersections.
7098         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7099         #        vertex/face and edge/face intersections. Face/face
7100         #        intersections detection is switched off as it is a
7101         #        time-consuming operation that gives an impact on performance.
7102         #        To find all self-intersections please use
7103         #        CheckSelfIntersections() method.
7104         #
7105         #  @return New GEOM.GEOM_Object, containing the result shape.
7106         #
7107         #  @ref tui_common "Example 1"
7108         #  \n @ref swig_MakeCommon "Example 2"
7109         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7110             """
7111             Perform Common boolean operation on two given shapes.
7112
7113             Parameters:
7114                 theShape1 First argument for boolean operation.
7115                 theShape2 Second argument for boolean operation.
7116                 checkSelfInte The flag that tells if the arguments should
7117                               be checked for self-intersection prior to
7118                               the operation.
7119                 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:
7124                     This algorithm doesn't find all types of self-intersections.
7125                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7126                     vertex/face and edge/face intersections. Face/face
7127                     intersections detection is switched off as it is a
7128                     time-consuming operation that gives an impact on performance.
7129                     To find all self-intersections please use
7130                     CheckSelfIntersections() method.
7131
7132             Returns:
7133                 New GEOM.GEOM_Object, containing the result shape.
7134             """
7135             # Example: see GEOM_TestOthers.py
7136             # note: auto-publishing is done in self.MakeBoolean()
7137             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
7138
7139         ## Perform Cut boolean operation on two given shapes.
7140         #  @param theShape1 First argument for boolean operation.
7141         #  @param theShape2 Second argument for boolean operation.
7142         #  @param checkSelfInte The flag that tells if the arguments should
7143         #         be checked for self-intersection prior to the operation.
7144         #  @param theName Object name; when specified, this parameter is used
7145         #         for result publication in the study. Otherwise, if automatic
7146         #         publication is switched on, default value is used for result name.
7147         #
7148         #  @note This algorithm doesn't find all types of self-intersections.
7149         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7150         #        vertex/face and edge/face intersections. Face/face
7151         #        intersections detection is switched off as it is a
7152         #        time-consuming operation that gives an impact on performance.
7153         #        To find all self-intersections please use
7154         #        CheckSelfIntersections() method.
7155         #
7156         #  @return New GEOM.GEOM_Object, containing the result shape.
7157         #
7158         #  @ref tui_cut "Example 1"
7159         #  \n @ref swig_MakeCommon "Example 2"
7160         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7161             """
7162             Perform Cut boolean operation on two given shapes.
7163
7164             Parameters:
7165                 theShape1 First argument for boolean operation.
7166                 theShape2 Second argument for boolean operation.
7167                 checkSelfInte The flag that tells if the arguments should
7168                               be checked for self-intersection prior to
7169                               the operation.
7170                 theName Object name; when specified, this parameter is used
7171                         for result publication in the study. Otherwise, if automatic
7172                         publication is switched on, default value is used for result name.
7173
7174             Note:
7175                     This algorithm doesn't find all types of self-intersections.
7176                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7177                     vertex/face and edge/face intersections. Face/face
7178                     intersections detection is switched off as it is a
7179                     time-consuming operation that gives an impact on performance.
7180                     To find all self-intersections please use
7181                     CheckSelfIntersections() method.
7182
7183             Returns:
7184                 New GEOM.GEOM_Object, containing the result shape.
7185
7186             """
7187             # Example: see GEOM_TestOthers.py
7188             # note: auto-publishing is done in self.MakeBoolean()
7189             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7190
7191         ## Perform Fuse boolean operation on two given shapes.
7192         #  @param theShape1 First argument for boolean operation.
7193         #  @param theShape2 Second argument for boolean operation.
7194         #  @param checkSelfInte The flag that tells if the arguments should
7195         #         be checked for self-intersection prior to the operation.
7196         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7197         #         operation should be performed during the operation.
7198         #  @param theName Object name; when specified, this parameter is used
7199         #         for result publication in the study. Otherwise, if automatic
7200         #         publication is switched on, default value is used for result name.
7201         #
7202         #  @note This algorithm doesn't find all types of self-intersections.
7203         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7204         #        vertex/face and edge/face intersections. Face/face
7205         #        intersections detection is switched off as it is a
7206         #        time-consuming operation that gives an impact on performance.
7207         #        To find all self-intersections please use
7208         #        CheckSelfIntersections() method.
7209         #
7210         #  @return New GEOM.GEOM_Object, containing the result shape.
7211         #
7212         #  @ref tui_fuse "Example 1"
7213         #  \n @ref swig_MakeCommon "Example 2"
7214         @ManageTransactions("BoolOp")
7215         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7216                      rmExtraEdges=False, theName=None):
7217             """
7218             Perform Fuse boolean operation on two given shapes.
7219
7220             Parameters:
7221                 theShape1 First argument for boolean operation.
7222                 theShape2 Second argument for boolean operation.
7223                 checkSelfInte The flag that tells if the arguments should
7224                               be checked for self-intersection prior to
7225                               the operation.
7226                 rmExtraEdges The flag that tells if Remove Extra Edges
7227                              operation should be performed during the operation.
7228                 theName Object name; when specified, this parameter is used
7229                         for result publication in the study. Otherwise, if automatic
7230                         publication is switched on, default value is used for result name.
7231
7232             Note:
7233                     This algorithm doesn't find all types of self-intersections.
7234                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7235                     vertex/face and edge/face intersections. Face/face
7236                     intersections detection is switched off as it is a
7237                     time-consuming operation that gives an impact on performance.
7238                     To find all self-intersections please use
7239                     CheckSelfIntersections() method.
7240
7241             Returns:
7242                 New GEOM.GEOM_Object, containing the result shape.
7243
7244             """
7245             # Example: see GEOM_TestOthers.py
7246             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7247                                          checkSelfInte, rmExtraEdges)
7248             RaiseIfFailed("MakeFuse", self.BoolOp)
7249             self._autoPublish(anObj, theName, "fuse")
7250             return anObj
7251
7252         ## Perform Section boolean operation on two given shapes.
7253         #  @param theShape1 First argument for boolean operation.
7254         #  @param theShape2 Second argument for boolean operation.
7255         #  @param checkSelfInte The flag that tells if the arguments should
7256         #         be checked for self-intersection prior to the operation.
7257         #  @param theName Object name; when specified, this parameter is used
7258         #         for result publication in the study. Otherwise, if automatic
7259         #         publication is switched on, default value is used for result name.
7260         #
7261         #  @note This algorithm doesn't find all types of self-intersections.
7262         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7263         #        vertex/face and edge/face intersections. Face/face
7264         #        intersections detection is switched off as it is a
7265         #        time-consuming operation that gives an impact on performance.
7266         #        To find all self-intersections please use
7267         #        CheckSelfIntersections() method.
7268         #
7269         #  @return New GEOM.GEOM_Object, containing the result shape.
7270         #
7271         #  @ref tui_section "Example 1"
7272         #  \n @ref swig_MakeCommon "Example 2"
7273         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7274             """
7275             Perform Section boolean operation on two given shapes.
7276
7277             Parameters:
7278                 theShape1 First argument for boolean operation.
7279                 theShape2 Second argument for boolean operation.
7280                 checkSelfInte The flag that tells if the arguments should
7281                               be checked for self-intersection prior to
7282                               the operation.
7283                 theName Object name; when specified, this parameter is used
7284                         for result publication in the study. Otherwise, if automatic
7285                         publication is switched on, default value is used for result name.
7286
7287             Note:
7288                     This algorithm doesn't find all types of self-intersections.
7289                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7290                     vertex/face and edge/face intersections. Face/face
7291                     intersections detection is switched off as it is a
7292                     time-consuming operation that gives an impact on performance.
7293                     To find all self-intersections please use
7294                     CheckSelfIntersections() method.
7295
7296             Returns:
7297                 New GEOM.GEOM_Object, containing the result shape.
7298
7299             """
7300             # Example: see GEOM_TestOthers.py
7301             # note: auto-publishing is done in self.MakeBoolean()
7302             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7303
7304         ## Perform Fuse boolean operation on the list of shapes.
7305         #  @param theShapesList Shapes to be fused.
7306         #  @param checkSelfInte The flag that tells if the arguments should
7307         #         be checked for self-intersection prior to the operation.
7308         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7309         #         operation should be performed during the operation.
7310         #  @param theName Object name; when specified, this parameter is used
7311         #         for result publication in the study. Otherwise, if automatic
7312         #         publication is switched on, default value is used for result name.
7313         #
7314         #  @note This algorithm doesn't find all types of self-intersections.
7315         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7316         #        vertex/face and edge/face intersections. Face/face
7317         #        intersections detection is switched off as it is a
7318         #        time-consuming operation that gives an impact on performance.
7319         #        To find all self-intersections please use
7320         #        CheckSelfIntersections() method.
7321         #
7322         #  @return New GEOM.GEOM_Object, containing the result shape.
7323         #
7324         #  @ref tui_fuse "Example 1"
7325         #  \n @ref swig_MakeCommon "Example 2"
7326         @ManageTransactions("BoolOp")
7327         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7328                          rmExtraEdges=False, theName=None):
7329             """
7330             Perform Fuse boolean operation on the list of shapes.
7331
7332             Parameters:
7333                 theShapesList Shapes to be fused.
7334                 checkSelfInte The flag that tells if the arguments should
7335                               be checked for self-intersection prior to
7336                               the operation.
7337                 rmExtraEdges The flag that tells if Remove Extra Edges
7338                              operation should be performed during the operation.
7339                 theName Object name; when specified, this parameter is used
7340                         for result publication in the study. Otherwise, if automatic
7341                         publication is switched on, default value is used for result name.
7342
7343             Note:
7344                     This algorithm doesn't find all types of self-intersections.
7345                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7346                     vertex/face and edge/face intersections. Face/face
7347                     intersections detection is switched off as it is a
7348                     time-consuming operation that gives an impact on performance.
7349                     To find all self-intersections please use
7350                     CheckSelfIntersections() method.
7351
7352             Returns:
7353                 New GEOM.GEOM_Object, containing the result shape.
7354
7355             """
7356             # Example: see GEOM_TestOthers.py
7357             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7358                                              rmExtraEdges)
7359             RaiseIfFailed("MakeFuseList", self.BoolOp)
7360             self._autoPublish(anObj, theName, "fuse")
7361             return anObj
7362
7363         ## Perform Common boolean operation on the list of shapes.
7364         #  @param theShapesList Shapes for Common operation.
7365         #  @param checkSelfInte The flag that tells if the arguments should
7366         #         be checked for self-intersection prior to the operation.
7367         #  @param theName Object name; when specified, this parameter is used
7368         #         for result publication in the study. Otherwise, if automatic
7369         #         publication is switched on, default value is used for result name.
7370         #
7371         #  @note This algorithm doesn't find all types of self-intersections.
7372         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7373         #        vertex/face and edge/face intersections. Face/face
7374         #        intersections detection is switched off as it is a
7375         #        time-consuming operation that gives an impact on performance.
7376         #        To find all self-intersections please use
7377         #        CheckSelfIntersections() method.
7378         #
7379         #  @return New GEOM.GEOM_Object, containing the result shape.
7380         #
7381         #  @ref tui_common "Example 1"
7382         #  \n @ref swig_MakeCommon "Example 2"
7383         @ManageTransactions("BoolOp")
7384         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7385             """
7386             Perform Common boolean operation on the list of shapes.
7387
7388             Parameters:
7389                 theShapesList Shapes for Common operation.
7390                 checkSelfInte The flag that tells if the arguments should
7391                               be checked for self-intersection prior to
7392                               the operation.
7393                 theName Object name; when specified, this parameter is used
7394                         for result publication in the study. Otherwise, if automatic
7395                         publication is switched on, default value is used for result name.
7396
7397             Note:
7398                     This algorithm doesn't find all types of self-intersections.
7399                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7400                     vertex/face and edge/face intersections. Face/face
7401                     intersections detection is switched off as it is a
7402                     time-consuming operation that gives an impact on performance.
7403                     To find all self-intersections please use
7404                     CheckSelfIntersections() method.
7405
7406             Returns:
7407                 New GEOM.GEOM_Object, containing the result shape.
7408
7409             """
7410             # Example: see GEOM_TestOthers.py
7411             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7412             RaiseIfFailed("MakeCommonList", self.BoolOp)
7413             self._autoPublish(anObj, theName, "common")
7414             return anObj
7415
7416         ## Perform Cut boolean operation on one object and the list of tools.
7417         #  @param theMainShape The object of the operation.
7418         #  @param theShapesList The list of tools of the operation.
7419         #  @param checkSelfInte The flag that tells if the arguments should
7420         #         be checked for self-intersection prior to the operation.
7421         #  @param theName Object name; when specified, this parameter is used
7422         #         for result publication in the study. Otherwise, if automatic
7423         #         publication is switched on, default value is used for result name.
7424         #
7425         #  @note This algorithm doesn't find all types of self-intersections.
7426         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7427         #        vertex/face and edge/face intersections. Face/face
7428         #        intersections detection is switched off as it is a
7429         #        time-consuming operation that gives an impact on performance.
7430         #        To find all self-intersections please use
7431         #        CheckSelfIntersections() method.
7432         #
7433         #  @return New GEOM.GEOM_Object, containing the result shape.
7434         #
7435         #  @ref tui_cut "Example 1"
7436         #  \n @ref swig_MakeCommon "Example 2"
7437         @ManageTransactions("BoolOp")
7438         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7439             """
7440             Perform Cut boolean operation on one object and the list of tools.
7441
7442             Parameters:
7443                 theMainShape The object of the operation.
7444                 theShapesList The list of tools of the operation.
7445                 checkSelfInte The flag that tells if the arguments should
7446                               be checked for self-intersection prior to
7447                               the operation.
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
7452             Note:
7453                     This algorithm doesn't find all types of self-intersections.
7454                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7455                     vertex/face and edge/face intersections. Face/face
7456                     intersections detection is switched off as it is a
7457                     time-consuming operation that gives an impact on performance.
7458                     To find all self-intersections please use
7459                     CheckSelfIntersections() method.
7460
7461             Returns:
7462                 New GEOM.GEOM_Object, containing the result shape.
7463
7464             """
7465             # Example: see GEOM_TestOthers.py
7466             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7467             RaiseIfFailed("MakeCutList", self.BoolOp)
7468             self._autoPublish(anObj, theName, "cut")
7469             return anObj
7470
7471         # end of l3_boolean
7472         ## @}
7473
7474         ## @addtogroup l3_basic_op
7475         ## @{
7476
7477         ## Perform partition operation.
7478         #  @param ListShapes Shapes to be intersected.
7479         #  @param ListTools Shapes to intersect theShapes.
7480         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7481         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7482         #         type will be detected automatically.
7483         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7484         #                             target type (equal to Limit) are kept in the result,
7485         #                             else standalone shapes of lower dimension
7486         #                             are kept also (if they exist).
7487         #
7488         #  @param theName Object name; when specified, this parameter is used
7489         #         for result publication in the study. Otherwise, if automatic
7490         #         publication is switched on, default value is used for result name.
7491         #
7492         #  @note Each compound from ListShapes and ListTools will be exploded
7493         #        in order to avoid possible intersection between shapes from this compound.
7494         #
7495         #  After implementation new version of PartitionAlgo (October 2006)
7496         #  other parameters are ignored by current functionality. They are kept
7497         #  in this function only for support old versions.
7498         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7499         #         Each shape from theKeepInside must belong to theShapes also.
7500         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7501         #         Each shape from theRemoveInside must belong to theShapes also.
7502         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7503         #      @param ListMaterials Material indices for each shape. Make sence,
7504         #         only if theRemoveWebs is TRUE.
7505         #
7506         #  @return New GEOM.GEOM_Object, containing the result shapes.
7507         #
7508         #  @ref tui_partition "Example"
7509         @ManageTransactions("BoolOp")
7510         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7511                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7512                           KeepNonlimitShapes=0, theName=None):
7513             """
7514             Perform partition operation.
7515
7516             Parameters:
7517                 ListShapes Shapes to be intersected.
7518                 ListTools Shapes to intersect theShapes.
7519                 Limit Type of resulting shapes (see geompy.ShapeType)
7520                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7521                       type will be detected automatically.
7522                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7523                                     target type (equal to Limit) are kept in the result,
7524                                     else standalone shapes of lower dimension
7525                                     are kept also (if they exist).
7526
7527                 theName Object name; when specified, this parameter is used
7528                         for result publication in the study. Otherwise, if automatic
7529                         publication is switched on, default value is used for result name.
7530             Note:
7531                     Each compound from ListShapes and ListTools will be exploded
7532                     in order to avoid possible intersection between shapes from
7533                     this compound.
7534
7535             After implementation new version of PartitionAlgo (October 2006) other
7536             parameters are ignored by current functionality. They are kept in this
7537             function only for support old versions.
7538
7539             Ignored parameters:
7540                 ListKeepInside Shapes, outside which the results will be deleted.
7541                                Each shape from theKeepInside must belong to theShapes also.
7542                 ListRemoveInside Shapes, inside which the results will be deleted.
7543                                  Each shape from theRemoveInside must belong to theShapes also.
7544                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7545                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7546
7547             Returns:
7548                 New GEOM.GEOM_Object, containing the result shapes.
7549             """
7550             # Example: see GEOM_TestAll.py
7551             if Limit == self.ShapeType["AUTO"]:
7552                 # automatic detection of the most appropriate shape limit type
7553                 lim = GEOM.SHAPE
7554                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7555                 Limit = EnumToLong(lim)
7556                 pass
7557             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7558                                               ListKeepInside, ListRemoveInside,
7559                                               Limit, RemoveWebs, ListMaterials,
7560                                               KeepNonlimitShapes);
7561             RaiseIfFailed("MakePartition", self.BoolOp)
7562             self._autoPublish(anObj, theName, "partition")
7563             return anObj
7564
7565         ## Perform partition operation.
7566         #  This method may be useful if it is needed to make a partition for
7567         #  compound contains nonintersected shapes. Performance will be better
7568         #  since intersection between shapes from compound is not performed.
7569         #
7570         #  Description of all parameters as in previous method MakePartition().
7571         #  One additional parameter is provided:
7572         #  @param checkSelfInte The flag that tells if the arguments should
7573         #         be checked for self-intersection prior to the operation.
7574         #
7575         #  @note This algorithm doesn't find all types of self-intersections.
7576         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7577         #        vertex/face and edge/face intersections. Face/face
7578         #        intersections detection is switched off as it is a
7579         #        time-consuming operation that gives an impact on performance.
7580         #        To find all self-intersections please use
7581         #        CheckSelfIntersections() method.
7582         #
7583         #  @note Passed compounds (via ListShapes or via ListTools)
7584         #           have to consist of nonintersecting shapes.
7585         #
7586         #  @return New GEOM.GEOM_Object, containing the result shapes.
7587         #
7588         #  @ref swig_todo "Example"
7589         @ManageTransactions("BoolOp")
7590         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7591                                                  ListKeepInside=[], ListRemoveInside=[],
7592                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7593                                                  ListMaterials=[], KeepNonlimitShapes=0,
7594                                                  checkSelfInte=False, theName=None):
7595             """
7596             Perform partition operation.
7597             This method may be useful if it is needed to make a partition for
7598             compound contains nonintersected shapes. Performance will be better
7599             since intersection between shapes from compound is not performed.
7600
7601             Parameters:
7602                 Description of all parameters as in method geompy.MakePartition.
7603                 One additional parameter is provided:
7604                 checkSelfInte The flag that tells if the arguments should
7605                               be checked for self-intersection prior to
7606                               the operation.
7607
7608             Note:
7609                     This algorithm doesn't find all types of self-intersections.
7610                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7611                     vertex/face and edge/face intersections. Face/face
7612                     intersections detection is switched off as it is a
7613                     time-consuming operation that gives an impact on performance.
7614                     To find all self-intersections please use
7615                     CheckSelfIntersections() method.
7616
7617             NOTE:
7618                 Passed compounds (via ListShapes or via ListTools)
7619                 have to consist of nonintersecting shapes.
7620
7621             Returns:
7622                 New GEOM.GEOM_Object, containing the result shapes.
7623             """
7624             if Limit == self.ShapeType["AUTO"]:
7625                 # automatic detection of the most appropriate shape limit type
7626                 lim = GEOM.SHAPE
7627                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7628                 Limit = EnumToLong(lim)
7629                 pass
7630             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7631                                                                      ListKeepInside, ListRemoveInside,
7632                                                                      Limit, RemoveWebs, ListMaterials,
7633                                                                      KeepNonlimitShapes, checkSelfInte);
7634             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7635             self._autoPublish(anObj, theName, "partition")
7636             return anObj
7637
7638         ## See method MakePartition() for more information.
7639         #
7640         #  @ref tui_partition "Example 1"
7641         #  \n @ref swig_Partition "Example 2"
7642         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7643                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7644                       KeepNonlimitShapes=0, theName=None):
7645             """
7646             See method geompy.MakePartition for more information.
7647             """
7648             # Example: see GEOM_TestOthers.py
7649             # note: auto-publishing is done in self.MakePartition()
7650             anObj = self.MakePartition(ListShapes, ListTools,
7651                                        ListKeepInside, ListRemoveInside,
7652                                        Limit, RemoveWebs, ListMaterials,
7653                                        KeepNonlimitShapes, theName);
7654             return anObj
7655
7656         ## Perform partition of the Shape with the Plane
7657         #  @param theShape Shape to be intersected.
7658         #  @param thePlane Tool shape, to intersect theShape.
7659         #  @param theName Object name; when specified, this parameter is used
7660         #         for result publication in the study. Otherwise, if automatic
7661         #         publication is switched on, default value is used for result name.
7662         #
7663         #  @return New GEOM.GEOM_Object, containing the result shape.
7664         #
7665         #  @ref tui_partition "Example"
7666         @ManageTransactions("BoolOp")
7667         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7668             """
7669             Perform partition of the Shape with the Plane
7670
7671             Parameters:
7672                 theShape Shape to be intersected.
7673                 thePlane Tool shape, to intersect theShape.
7674                 theName Object name; when specified, this parameter is used
7675                         for result publication in the study. Otherwise, if automatic
7676                         publication is switched on, default value is used for result name.
7677
7678             Returns:
7679                 New GEOM.GEOM_Object, containing the result shape.
7680             """
7681             # Example: see GEOM_TestAll.py
7682             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7683             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7684             self._autoPublish(anObj, theName, "partition")
7685             return anObj
7686
7687         # end of l3_basic_op
7688         ## @}
7689
7690         ## @addtogroup l3_transform
7691         ## @{
7692
7693         ## Translate the given object along the vector, specified
7694         #  by its end points.
7695         #  @param theObject The object to be translated.
7696         #  @param thePoint1 Start point of translation vector.
7697         #  @param thePoint2 End point of translation vector.
7698         #  @param theCopy Flag used to translate object itself or create a copy.
7699         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7700         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7701         @ManageTransactions("TrsfOp")
7702         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7703             """
7704             Translate the given object along the vector, specified by its end points.
7705
7706             Parameters:
7707                 theObject The object to be translated.
7708                 thePoint1 Start point of translation vector.
7709                 thePoint2 End point of translation vector.
7710                 theCopy Flag used to translate object itself or create a copy.
7711
7712             Returns:
7713                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7714                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7715             """
7716             if theCopy:
7717                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7718             else:
7719                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7720             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7721             return anObj
7722
7723         ## Translate the given object along the vector, specified
7724         #  by its end points, creating its copy before the translation.
7725         #  @param theObject The object to be translated.
7726         #  @param thePoint1 Start point of translation vector.
7727         #  @param thePoint2 End point of translation vector.
7728         #  @param theName Object name; when specified, this parameter is used
7729         #         for result publication in the study. Otherwise, if automatic
7730         #         publication is switched on, default value is used for result name.
7731         #
7732         #  @return New GEOM.GEOM_Object, containing the translated object.
7733         #
7734         #  @ref tui_translation "Example 1"
7735         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7736         @ManageTransactions("TrsfOp")
7737         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7738             """
7739             Translate the given object along the vector, specified
7740             by its end points, creating its copy before the translation.
7741
7742             Parameters:
7743                 theObject The object to be translated.
7744                 thePoint1 Start point of translation vector.
7745                 thePoint2 End point of translation vector.
7746                 theName Object name; when specified, this parameter is used
7747                         for result publication in the study. Otherwise, if automatic
7748                         publication is switched on, default value is used for result name.
7749
7750             Returns:
7751                 New GEOM.GEOM_Object, containing the translated object.
7752             """
7753             # Example: see GEOM_TestAll.py
7754             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7755             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7756             self._autoPublish(anObj, theName, "translated")
7757             return anObj
7758
7759         ## Translate the given object along the vector, specified by its components.
7760         #  @param theObject The object to be translated.
7761         #  @param theDX,theDY,theDZ Components of translation vector.
7762         #  @param theCopy Flag used to translate object itself or create a copy.
7763         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7764         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7765         #
7766         #  @ref tui_translation "Example"
7767         @ManageTransactions("TrsfOp")
7768         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7769             """
7770             Translate the given object along the vector, specified by its components.
7771
7772             Parameters:
7773                 theObject The object to be translated.
7774                 theDX,theDY,theDZ Components of translation vector.
7775                 theCopy Flag used to translate object itself or create a copy.
7776
7777             Returns:
7778                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7779                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7780             """
7781             # Example: see GEOM_TestAll.py
7782             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7783             if theCopy:
7784                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7785             else:
7786                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7787             anObj.SetParameters(Parameters)
7788             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7789             return anObj
7790
7791         ## Translate the given object along the vector, specified
7792         #  by its components, creating its copy before the translation.
7793         #  @param theObject The object to be translated.
7794         #  @param theDX,theDY,theDZ Components of translation vector.
7795         #  @param theName Object name; when specified, this parameter is used
7796         #         for result publication in the study. Otherwise, if automatic
7797         #         publication is switched on, default value is used for result name.
7798         #
7799         #  @return New GEOM.GEOM_Object, containing the translated object.
7800         #
7801         #  @ref tui_translation "Example"
7802         @ManageTransactions("TrsfOp")
7803         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7804             """
7805             Translate the given object along the vector, specified
7806             by its components, creating its copy before the translation.
7807
7808             Parameters:
7809                 theObject The object to be translated.
7810                 theDX,theDY,theDZ Components of translation vector.
7811                 theName Object name; when specified, this parameter is used
7812                         for result publication in the study. Otherwise, if automatic
7813                         publication is switched on, default value is used for result name.
7814
7815             Returns:
7816                 New GEOM.GEOM_Object, containing the translated object.
7817             """
7818             # Example: see GEOM_TestAll.py
7819             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7820             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7821             anObj.SetParameters(Parameters)
7822             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7823             self._autoPublish(anObj, theName, "translated")
7824             return anObj
7825
7826         ## Translate the given object along the given vector.
7827         #  @param theObject The object to be translated.
7828         #  @param theVector The translation vector.
7829         #  @param theCopy Flag used to translate object itself or create a copy.
7830         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7831         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7832         @ManageTransactions("TrsfOp")
7833         def TranslateVector(self, theObject, theVector, theCopy=False):
7834             """
7835             Translate the given object along the given vector.
7836
7837             Parameters:
7838                 theObject The object to be translated.
7839                 theVector The translation vector.
7840                 theCopy Flag used to translate object itself or create a copy.
7841
7842             Returns:
7843                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7844                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7845             """
7846             if theCopy:
7847                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7848             else:
7849                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7850             RaiseIfFailed("TranslateVector", self.TrsfOp)
7851             return anObj
7852
7853         ## Translate the given object along the given vector,
7854         #  creating its copy before the translation.
7855         #  @param theObject The object to be translated.
7856         #  @param theVector The translation vector.
7857         #  @param theName Object name; when specified, this parameter is used
7858         #         for result publication in the study. Otherwise, if automatic
7859         #         publication is switched on, default value is used for result name.
7860         #
7861         #  @return New GEOM.GEOM_Object, containing the translated object.
7862         #
7863         #  @ref tui_translation "Example"
7864         @ManageTransactions("TrsfOp")
7865         def MakeTranslationVector(self, theObject, theVector, theName=None):
7866             """
7867             Translate the given object along the given vector,
7868             creating its copy before the translation.
7869
7870             Parameters:
7871                 theObject The object to be translated.
7872                 theVector The translation vector.
7873                 theName Object name; when specified, this parameter is used
7874                         for result publication in the study. Otherwise, if automatic
7875                         publication is switched on, default value is used for result name.
7876
7877             Returns:
7878                 New GEOM.GEOM_Object, containing the translated object.
7879             """
7880             # Example: see GEOM_TestAll.py
7881             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7882             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7883             self._autoPublish(anObj, theName, "translated")
7884             return anObj
7885
7886         ## Translate the given object along the given vector on given distance.
7887         #  @param theObject The object to be translated.
7888         #  @param theVector The translation vector.
7889         #  @param theDistance The translation distance.
7890         #  @param theCopy Flag used to translate object itself or create a copy.
7891         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7892         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7893         #
7894         #  @ref tui_translation "Example"
7895         @ManageTransactions("TrsfOp")
7896         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7897             """
7898             Translate the given object along the given vector on given distance.
7899
7900             Parameters:
7901                 theObject The object to be translated.
7902                 theVector The translation vector.
7903                 theDistance The translation distance.
7904                 theCopy Flag used to translate object itself or create a copy.
7905
7906             Returns:
7907                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7908                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7909             """
7910             # Example: see GEOM_TestAll.py
7911             theDistance,Parameters = ParseParameters(theDistance)
7912             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7913             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7914             anObj.SetParameters(Parameters)
7915             return anObj
7916
7917         ## Translate the given object along the given vector on given distance,
7918         #  creating its copy before the translation.
7919         #  @param theObject The object to be translated.
7920         #  @param theVector The translation vector.
7921         #  @param theDistance The translation distance.
7922         #  @param theName Object name; when specified, this parameter is used
7923         #         for result publication in the study. Otherwise, if automatic
7924         #         publication is switched on, default value is used for result name.
7925         #
7926         #  @return New GEOM.GEOM_Object, containing the translated object.
7927         #
7928         #  @ref tui_translation "Example"
7929         @ManageTransactions("TrsfOp")
7930         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7931             """
7932             Translate the given object along the given vector on given distance,
7933             creating its copy before the translation.
7934
7935             Parameters:
7936                 theObject The object to be translated.
7937                 theVector The translation vector.
7938                 theDistance The translation distance.
7939                 theName Object name; when specified, this parameter is used
7940                         for result publication in the study. Otherwise, if automatic
7941                         publication is switched on, default value is used for result name.
7942
7943             Returns:
7944                 New GEOM.GEOM_Object, containing the translated object.
7945             """
7946             # Example: see GEOM_TestAll.py
7947             theDistance,Parameters = ParseParameters(theDistance)
7948             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7949             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7950             anObj.SetParameters(Parameters)
7951             self._autoPublish(anObj, theName, "translated")
7952             return anObj
7953
7954         ## Rotate the given object around the given axis on the given angle.
7955         #  @param theObject The object to be rotated.
7956         #  @param theAxis Rotation axis.
7957         #  @param theAngle Rotation angle in radians.
7958         #  @param theCopy Flag used to rotate object itself or create a copy.
7959         #
7960         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7961         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7962         #
7963         #  @ref tui_rotation "Example"
7964         @ManageTransactions("TrsfOp")
7965         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7966             """
7967             Rotate the given object around the given axis on the given angle.
7968
7969             Parameters:
7970                 theObject The object to be rotated.
7971                 theAxis Rotation axis.
7972                 theAngle Rotation angle in radians.
7973                 theCopy Flag used to rotate object itself or create a copy.
7974
7975             Returns:
7976                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7977                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7978             """
7979             # Example: see GEOM_TestAll.py
7980             flag = False
7981             if isinstance(theAngle,str):
7982                 flag = True
7983             theAngle, Parameters = ParseParameters(theAngle)
7984             if flag:
7985                 theAngle = theAngle*math.pi/180.0
7986             if theCopy:
7987                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7988             else:
7989                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7990             RaiseIfFailed("Rotate", self.TrsfOp)
7991             anObj.SetParameters(Parameters)
7992             return anObj
7993
7994         ## Rotate the given object around the given axis
7995         #  on the given angle, creating its copy before the rotation.
7996         #  @param theObject The object to be rotated.
7997         #  @param theAxis Rotation axis.
7998         #  @param theAngle Rotation angle in radians.
7999         #  @param theName Object name; when specified, this parameter is used
8000         #         for result publication in the study. Otherwise, if automatic
8001         #         publication is switched on, default value is used for result name.
8002         #
8003         #  @return New GEOM.GEOM_Object, containing the rotated object.
8004         #
8005         #  @ref tui_rotation "Example"
8006         @ManageTransactions("TrsfOp")
8007         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
8008             """
8009             Rotate the given object around the given axis
8010             on the given angle, creating its copy before the rotatation.
8011
8012             Parameters:
8013                 theObject The object to be rotated.
8014                 theAxis Rotation axis.
8015                 theAngle Rotation angle in radians.
8016                 theName Object name; when specified, this parameter is used
8017                         for result publication in the study. Otherwise, if automatic
8018                         publication is switched on, default value is used for result name.
8019
8020             Returns:
8021                 New GEOM.GEOM_Object, containing the rotated object.
8022             """
8023             # Example: see GEOM_TestAll.py
8024             flag = False
8025             if isinstance(theAngle,str):
8026                 flag = True
8027             theAngle, Parameters = ParseParameters(theAngle)
8028             if flag:
8029                 theAngle = theAngle*math.pi/180.0
8030             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
8031             RaiseIfFailed("RotateCopy", self.TrsfOp)
8032             anObj.SetParameters(Parameters)
8033             self._autoPublish(anObj, theName, "rotated")
8034             return anObj
8035
8036         ## Rotate given object around vector perpendicular to plane
8037         #  containing three points.
8038         #  @param theObject The object to be rotated.
8039         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8040         #  containing the three points.
8041         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
8042         #  @param theCopy Flag used to rotate object itself or create a copy.
8043         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8044         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
8045         @ManageTransactions("TrsfOp")
8046         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
8047             """
8048             Rotate given object around vector perpendicular to plane
8049             containing three points.
8050
8051             Parameters:
8052                 theObject The object to be rotated.
8053                 theCentPoint central point  the axis is the vector perpendicular to the plane
8054                              containing the three points.
8055                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
8056                 theCopy Flag used to rotate object itself or create a copy.
8057
8058             Returns:
8059                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8060                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
8061             """
8062             if theCopy:
8063                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8064             else:
8065                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
8066             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
8067             return anObj
8068
8069         ## Rotate given object around vector perpendicular to plane
8070         #  containing three points, creating its copy before the rotatation.
8071         #  @param theObject The object to be rotated.
8072         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
8073         #  containing the three points.
8074         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
8075         #  @param theName Object name; when specified, this parameter is used
8076         #         for result publication in the study. Otherwise, if automatic
8077         #         publication is switched on, default value is used for result name.
8078         #
8079         #  @return New GEOM.GEOM_Object, containing the rotated object.
8080         #
8081         #  @ref tui_rotation "Example"
8082         @ManageTransactions("TrsfOp")
8083         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
8084             """
8085             Rotate given object around vector perpendicular to plane
8086             containing three points, creating its copy before the rotatation.
8087
8088             Parameters:
8089                 theObject The object to be rotated.
8090                 theCentPoint central point  the axis is the vector perpendicular to the plane
8091                              containing the three points.
8092                 thePoint1,thePoint2  in a perpendicular plane of the axis.
8093                 theName Object name; when specified, this parameter is used
8094                         for result publication in the study. Otherwise, if automatic
8095                         publication is switched on, default value is used for result name.
8096
8097             Returns:
8098                 New GEOM.GEOM_Object, containing the rotated object.
8099             """
8100             # Example: see GEOM_TestAll.py
8101             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
8102             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
8103             self._autoPublish(anObj, theName, "rotated")
8104             return anObj
8105
8106         ## Scale the given object by the specified factor.
8107         #  @param theObject The object to be scaled.
8108         #  @param thePoint Center point for scaling.
8109         #                  Passing None for it means scaling relatively the origin of global CS.
8110         #  @param theFactor Scaling factor value.
8111         #  @param theCopy Flag used to scale object itself or create a copy.
8112         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8113         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8114         @ManageTransactions("TrsfOp")
8115         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
8116             """
8117             Scale the given object by the specified factor.
8118
8119             Parameters:
8120                 theObject The object to be scaled.
8121                 thePoint Center point for scaling.
8122                          Passing None for it means scaling relatively the origin of global CS.
8123                 theFactor Scaling factor value.
8124                 theCopy Flag used to scale object itself or create a copy.
8125
8126             Returns:
8127                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8128                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8129             """
8130             # Example: see GEOM_TestAll.py
8131             theFactor, Parameters = ParseParameters(theFactor)
8132             if theCopy:
8133                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8134             else:
8135                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
8136             RaiseIfFailed("Scale", self.TrsfOp)
8137             anObj.SetParameters(Parameters)
8138             return anObj
8139
8140         ## Scale the given object by the factor, creating its copy before the scaling.
8141         #  @param theObject The object to be scaled.
8142         #  @param thePoint Center point for scaling.
8143         #                  Passing None for it means scaling relatively the origin of global CS.
8144         #  @param theFactor Scaling factor value.
8145         #  @param theName Object name; when specified, this parameter is used
8146         #         for result publication in the study. Otherwise, if automatic
8147         #         publication is switched on, default value is used for result name.
8148         #
8149         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8150         #
8151         #  @ref tui_scale "Example"
8152         @ManageTransactions("TrsfOp")
8153         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
8154             """
8155             Scale the given object by the factor, creating its copy before the scaling.
8156
8157             Parameters:
8158                 theObject The object to be scaled.
8159                 thePoint Center point for scaling.
8160                          Passing None for it means scaling relatively the origin of global CS.
8161                 theFactor Scaling factor value.
8162                 theName Object name; when specified, this parameter is used
8163                         for result publication in the study. Otherwise, if automatic
8164                         publication is switched on, default value is used for result name.
8165
8166             Returns:
8167                 New GEOM.GEOM_Object, containing the scaled shape.
8168             """
8169             # Example: see GEOM_TestAll.py
8170             theFactor, Parameters = ParseParameters(theFactor)
8171             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
8172             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
8173             anObj.SetParameters(Parameters)
8174             self._autoPublish(anObj, theName, "scaled")
8175             return anObj
8176
8177         ## Scale the given object by different factors along coordinate axes.
8178         #  @param theObject The object to be scaled.
8179         #  @param thePoint Center point for scaling.
8180         #                  Passing None for it means scaling relatively the origin of global CS.
8181         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8182         #  @param theCopy Flag used to scale object itself or create a copy.
8183         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8184         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8185         @ManageTransactions("TrsfOp")
8186         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8187             """
8188             Scale the given object by different factors along coordinate axes.
8189
8190             Parameters:
8191                 theObject The object to be scaled.
8192                 thePoint Center point for scaling.
8193                             Passing None for it means scaling relatively the origin of global CS.
8194                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8195                 theCopy Flag used to scale object itself or create a copy.
8196
8197             Returns:
8198                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8199                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8200             """
8201             # Example: see GEOM_TestAll.py
8202             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8203             if theCopy:
8204                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8205                                                             theFactorX, theFactorY, theFactorZ)
8206             else:
8207                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8208                                                         theFactorX, theFactorY, theFactorZ)
8209             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8210             anObj.SetParameters(Parameters)
8211             return anObj
8212
8213         ## Scale the given object by different factors along coordinate axes,
8214         #  creating its copy before the scaling.
8215         #  @param theObject The object to be scaled.
8216         #  @param thePoint Center point for scaling.
8217         #                  Passing None for it means scaling relatively the origin of global CS.
8218         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8219         #  @param theName Object name; when specified, this parameter is used
8220         #         for result publication in the study. Otherwise, if automatic
8221         #         publication is switched on, default value is used for result name.
8222         #
8223         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8224         #
8225         #  @ref swig_scale "Example"
8226         @ManageTransactions("TrsfOp")
8227         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8228             """
8229             Scale the given object by different factors along coordinate axes,
8230             creating its copy before the scaling.
8231
8232             Parameters:
8233                 theObject The object to be scaled.
8234                 thePoint Center point for scaling.
8235                             Passing None for it means scaling relatively the origin of global CS.
8236                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8237                 theName Object name; when specified, this parameter is used
8238                         for result publication in the study. Otherwise, if automatic
8239                         publication is switched on, default value is used for result name.
8240
8241             Returns:
8242                 New GEOM.GEOM_Object, containing the scaled shape.
8243             """
8244             # Example: see GEOM_TestAll.py
8245             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8246             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8247                                                         theFactorX, theFactorY, theFactorZ)
8248             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8249             anObj.SetParameters(Parameters)
8250             self._autoPublish(anObj, theName, "scaled")
8251             return anObj
8252
8253         ## Mirror an object relatively the given plane.
8254         #  @param theObject The object to be mirrored.
8255         #  @param thePlane Plane of symmetry.
8256         #  @param theCopy Flag used to mirror object itself or create a copy.
8257         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8258         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8259         @ManageTransactions("TrsfOp")
8260         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8261             """
8262             Mirror an object relatively the given plane.
8263
8264             Parameters:
8265                 theObject The object to be mirrored.
8266                 thePlane Plane of symmetry.
8267                 theCopy Flag used to mirror object itself or create a copy.
8268
8269             Returns:
8270                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8271                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8272             """
8273             if theCopy:
8274                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8275             else:
8276                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8277             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8278             return anObj
8279
8280         ## Create an object, symmetrical
8281         #  to the given one relatively the given plane.
8282         #  @param theObject The object to be mirrored.
8283         #  @param thePlane Plane of symmetry.
8284         #  @param theName Object name; when specified, this parameter is used
8285         #         for result publication in the study. Otherwise, if automatic
8286         #         publication is switched on, default value is used for result name.
8287         #
8288         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8289         #
8290         #  @ref tui_mirror "Example"
8291         @ManageTransactions("TrsfOp")
8292         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8293             """
8294             Create an object, symmetrical to the given one relatively the given plane.
8295
8296             Parameters:
8297                 theObject The object to be mirrored.
8298                 thePlane Plane of symmetry.
8299                 theName Object name; when specified, this parameter is used
8300                         for result publication in the study. Otherwise, if automatic
8301                         publication is switched on, default value is used for result name.
8302
8303             Returns:
8304                 New GEOM.GEOM_Object, containing the mirrored shape.
8305             """
8306             # Example: see GEOM_TestAll.py
8307             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8308             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8309             self._autoPublish(anObj, theName, "mirrored")
8310             return anObj
8311
8312         ## Mirror an object relatively the given axis.
8313         #  @param theObject The object to be mirrored.
8314         #  @param theAxis Axis of symmetry.
8315         #  @param theCopy Flag used to mirror object itself or create a copy.
8316         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8317         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8318         @ManageTransactions("TrsfOp")
8319         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8320             """
8321             Mirror an object relatively the given axis.
8322
8323             Parameters:
8324                 theObject The object to be mirrored.
8325                 theAxis Axis of symmetry.
8326                 theCopy Flag used to mirror object itself or create a copy.
8327
8328             Returns:
8329                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8330                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8331             """
8332             if theCopy:
8333                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8334             else:
8335                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8336             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8337             return anObj
8338
8339         ## Create an object, symmetrical
8340         #  to the given one relatively the given axis.
8341         #  @param theObject The object to be mirrored.
8342         #  @param theAxis Axis of symmetry.
8343         #  @param theName Object name; when specified, this parameter is used
8344         #         for result publication in the study. Otherwise, if automatic
8345         #         publication is switched on, default value is used for result name.
8346         #
8347         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8348         #
8349         #  @ref tui_mirror "Example"
8350         @ManageTransactions("TrsfOp")
8351         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8352             """
8353             Create an object, symmetrical to the given one relatively the given axis.
8354
8355             Parameters:
8356                 theObject The object to be mirrored.
8357                 theAxis Axis of symmetry.
8358                 theName Object name; when specified, this parameter is used
8359                         for result publication in the study. Otherwise, if automatic
8360                         publication is switched on, default value is used for result name.
8361
8362             Returns:
8363                 New GEOM.GEOM_Object, containing the mirrored shape.
8364             """
8365             # Example: see GEOM_TestAll.py
8366             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8367             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8368             self._autoPublish(anObj, theName, "mirrored")
8369             return anObj
8370
8371         ## Mirror an object relatively the given point.
8372         #  @param theObject The object to be mirrored.
8373         #  @param thePoint Point of symmetry.
8374         #  @param theCopy Flag used to mirror object itself or create a copy.
8375         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8376         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8377         @ManageTransactions("TrsfOp")
8378         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8379             """
8380             Mirror an object relatively the given point.
8381
8382             Parameters:
8383                 theObject The object to be mirrored.
8384                 thePoint Point of symmetry.
8385                 theCopy Flag used to mirror object itself or create a copy.
8386
8387             Returns:
8388                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8389                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8390             """
8391             # Example: see GEOM_TestAll.py
8392             if theCopy:
8393                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8394             else:
8395                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8396             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8397             return anObj
8398
8399         ## Create an object, symmetrical
8400         #  to the given one relatively the given point.
8401         #  @param theObject The object to be mirrored.
8402         #  @param thePoint Point of symmetry.
8403         #  @param theName Object name; when specified, this parameter is used
8404         #         for result publication in the study. Otherwise, if automatic
8405         #         publication is switched on, default value is used for result name.
8406         #
8407         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8408         #
8409         #  @ref tui_mirror "Example"
8410         @ManageTransactions("TrsfOp")
8411         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8412             """
8413             Create an object, symmetrical
8414             to the given one relatively the given point.
8415
8416             Parameters:
8417                 theObject The object to be mirrored.
8418                 thePoint Point of symmetry.
8419                 theName Object name; when specified, this parameter is used
8420                         for result publication in the study. Otherwise, if automatic
8421                         publication is switched on, default value is used for result name.
8422
8423             Returns:
8424                 New GEOM.GEOM_Object, containing the mirrored shape.
8425             """
8426             # Example: see GEOM_TestAll.py
8427             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8428             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8429             self._autoPublish(anObj, theName, "mirrored")
8430             return anObj
8431
8432         ## Modify the location of the given object.
8433         #  @param theObject The object to be displaced.
8434         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8435         #                     If \a theStartLCS is NULL, displacement
8436         #                     will be performed from global CS.\n
8437         #                     If \a theObject itself is used as \a theStartLCS,
8438         #                     its location will be changed to \a theEndLCS.
8439         #  @param theEndLCS Coordinate system to perform displacement to it.
8440         #  @param theCopy Flag used to displace object itself or create a copy.
8441         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8442         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8443         @ManageTransactions("TrsfOp")
8444         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8445             """
8446             Modify the Location of the given object by LCS, creating its copy before the setting.
8447
8448             Parameters:
8449                 theObject The object to be displaced.
8450                 theStartLCS Coordinate system to perform displacement from it.
8451                             If theStartLCS is NULL, displacement
8452                             will be performed from global CS.
8453                             If theObject itself is used as theStartLCS,
8454                             its location will be changed to theEndLCS.
8455                 theEndLCS Coordinate system to perform displacement to it.
8456                 theCopy Flag used to displace object itself or create a copy.
8457
8458             Returns:
8459                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8460                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8461             """
8462             # Example: see GEOM_TestAll.py
8463             if theCopy:
8464                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8465             else:
8466                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8467             RaiseIfFailed("Displace", self.TrsfOp)
8468             return anObj
8469
8470         ## Modify the Location of the given object by LCS,
8471         #  creating its copy before the setting.
8472         #  @param theObject The object to be displaced.
8473         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8474         #                     If \a theStartLCS is NULL, displacement
8475         #                     will be performed from global CS.\n
8476         #                     If \a theObject itself is used as \a theStartLCS,
8477         #                     its location will be changed to \a theEndLCS.
8478         #  @param theEndLCS Coordinate system to perform displacement to it.
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         #
8485         #  @ref tui_modify_location "Example"
8486         @ManageTransactions("TrsfOp")
8487         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8488             """
8489             Modify the Location of the given object by LCS, creating its copy before the setting.
8490
8491             Parameters:
8492                 theObject The object to be displaced.
8493                 theStartLCS Coordinate system to perform displacement from it.
8494                             If theStartLCS is NULL, displacement
8495                             will be performed from global CS.
8496                             If theObject itself is used as theStartLCS,
8497                             its location will be changed to theEndLCS.
8498                 theEndLCS Coordinate system to perform displacement to it.
8499                 theName Object name; when specified, this parameter is used
8500                         for result publication in the study. Otherwise, if automatic
8501                         publication is switched on, default value is used for result name.
8502
8503             Returns:
8504                 New GEOM.GEOM_Object, containing the displaced shape.
8505
8506             Example of usage:
8507                 # create local coordinate systems
8508                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8509                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8510                 # modify the location of the given object
8511                 position = geompy.MakePosition(cylinder, cs1, cs2)
8512             """
8513             # Example: see GEOM_TestAll.py
8514             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8515             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8516             self._autoPublish(anObj, theName, "displaced")
8517             return anObj
8518
8519         ## Modify the Location of the given object by Path.
8520         #  @param  theObject The object to be displaced.
8521         #  @param  thePath Wire or Edge along that the object will be translated.
8522         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8523         #  @param  theCopy is to create a copy objects if true.
8524         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8525         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8526         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8527         #
8528         #  @ref tui_modify_location "Example"
8529         @ManageTransactions("TrsfOp")
8530         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8531             """
8532             Modify the Location of the given object by Path.
8533
8534             Parameters:
8535                  theObject The object to be displaced.
8536                  thePath Wire or Edge along that the object will be translated.
8537                  theDistance progress of Path (0 = start location, 1 = end of path location).
8538                  theCopy is to create a copy objects if true.
8539                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8540
8541             Returns:
8542                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8543                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8544
8545             Example of usage:
8546                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8547             """
8548             # Example: see GEOM_TestAll.py
8549             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8550             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8551             return anObj
8552
8553         ## Modify the Location of the given object by Path, creating its copy before the operation.
8554         #  @param theObject The object to be displaced.
8555         #  @param thePath Wire or Edge along that the object will be translated.
8556         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8557         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8558         #  @param theName Object name; when specified, this parameter is used
8559         #         for result publication in the study. Otherwise, if automatic
8560         #         publication is switched on, default value is used for result name.
8561         #
8562         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8563         @ManageTransactions("TrsfOp")
8564         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8565             """
8566             Modify the Location of the given object by Path, creating its copy before the operation.
8567
8568             Parameters:
8569                  theObject The object to be displaced.
8570                  thePath Wire or Edge along that the object will be translated.
8571                  theDistance progress of Path (0 = start location, 1 = end of path location).
8572                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8573                  theName Object name; when specified, this parameter is used
8574                          for result publication in the study. Otherwise, if automatic
8575                          publication is switched on, default value is used for result name.
8576
8577             Returns:
8578                 New GEOM.GEOM_Object, containing the displaced shape.
8579             """
8580             # Example: see GEOM_TestAll.py
8581             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8582             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8583             self._autoPublish(anObj, theName, "displaced")
8584             return anObj
8585
8586         ## Offset given shape.
8587         #  @param theObject The base object for the offset.
8588         #  @param theOffset Offset value.
8589         #  @param theCopy Flag used to offset object itself or create a copy.
8590         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8591         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8592         @ManageTransactions("TrsfOp")
8593         def Offset(self, theObject, theOffset, theCopy=False):
8594             """
8595             Offset given shape.
8596
8597             Parameters:
8598                 theObject The base object for the offset.
8599                 theOffset Offset value.
8600                 theCopy Flag used to offset object itself or create a copy.
8601
8602             Returns:
8603                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8604                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8605             """
8606             theOffset, Parameters = ParseParameters(theOffset)
8607             if theCopy:
8608                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8609             else:
8610                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8611             RaiseIfFailed("Offset", self.TrsfOp)
8612             anObj.SetParameters(Parameters)
8613             return anObj
8614
8615         ## Create new object as offset of the given one.
8616         #  @param theObject The base object for the offset.
8617         #  @param theOffset Offset value.
8618         #  @param theName Object name; when specified, this parameter is used
8619         #         for result publication in the study. Otherwise, if automatic
8620         #         publication is switched on, default value is used for result name.
8621         #
8622         #  @return New GEOM.GEOM_Object, containing the offset object.
8623         #
8624         #  @ref tui_offset "Example"
8625         @ManageTransactions("TrsfOp")
8626         def MakeOffset(self, theObject, theOffset, theName=None):
8627             """
8628             Create new object as offset of the given one.
8629
8630             Parameters:
8631                 theObject The base object for the offset.
8632                 theOffset Offset value.
8633                 theName Object name; when specified, this parameter is used
8634                         for result publication in the study. Otherwise, if automatic
8635                         publication is switched on, default value is used for result name.
8636
8637             Returns:
8638                 New GEOM.GEOM_Object, containing the offset object.
8639
8640             Example of usage:
8641                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8642                  # create a new object as offset of the given object
8643                  offset = geompy.MakeOffset(box, 70.)
8644             """
8645             # Example: see GEOM_TestAll.py
8646             theOffset, Parameters = ParseParameters(theOffset)
8647             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8648             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8649             anObj.SetParameters(Parameters)
8650             self._autoPublish(anObj, theName, "offset")
8651             return anObj
8652
8653         ## Create new object as projection of the given one on a 2D surface.
8654         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8655         #  @param theTarget The target object. It can be planar or cylindrical face.
8656         #  @param theName Object name; when specified, this parameter is used
8657         #         for result publication in the study. Otherwise, if automatic
8658         #         publication is switched on, default value is used for result name.
8659         #
8660         #  @return New GEOM.GEOM_Object, containing the projection.
8661         #
8662         #  @ref tui_projection "Example"
8663         @ManageTransactions("TrsfOp")
8664         def MakeProjection(self, theSource, theTarget, theName=None):
8665             """
8666             Create new object as projection of the given one on a 2D surface.
8667
8668             Parameters:
8669                 theSource The source object for the projection. It can be a point, edge or wire.
8670                 theTarget The target object. It can be planar or cylindrical face.
8671                 theName Object name; when specified, this parameter is used
8672                         for result publication in the study. Otherwise, if automatic
8673                         publication is switched on, default value is used for result name.
8674
8675             Returns:
8676                 New GEOM.GEOM_Object, containing the projection.
8677             """
8678             # Example: see GEOM_TestAll.py
8679             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8680             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8681             self._autoPublish(anObj, theName, "projection")
8682             return anObj
8683
8684         ## Create a projection projection of the given point on a wire or an edge.
8685         #  If there are no solutions or there are 2 or more solutions It throws an
8686         #  exception.
8687         #  @param thePoint the point to be projected.
8688         #  @param theWire the wire. The edge is accepted as well.
8689         #  @param theName Object name; when specified, this parameter is used
8690         #         for result publication in the study. Otherwise, if automatic
8691         #         publication is switched on, default value is used for result name.
8692         #
8693         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8694         #  \n \a u: The parameter of projection point on edge.
8695         #  \n \a PointOnEdge: The projection point.
8696         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8697         #
8698         #  @ref tui_projection "Example"
8699         @ManageTransactions("TrsfOp")
8700         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8701             """
8702             Create a projection projection of the given point on a wire or an edge.
8703             If there are no solutions or there are 2 or more solutions It throws an
8704             exception.
8705
8706             Parameters:
8707                 thePoint the point to be projected.
8708                 theWire the wire. The edge is accepted as well.
8709                 theName Object name; when specified, this parameter is used
8710                         for result publication in the study. Otherwise, if automatic
8711                         publication is switched on, default value is used for result name.
8712
8713             Returns:
8714                 [u, PointOnEdge, EdgeInWireIndex]
8715                  u: The parameter of projection point on edge.
8716                  PointOnEdge: The projection point.
8717                  EdgeInWireIndex: The index of an edge in a wire.
8718             """
8719             # Example: see GEOM_TestAll.py
8720             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8721             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8722             self._autoPublish(anObj[1], theName, "projection")
8723             return anObj
8724
8725         # -----------------------------------------------------------------------------
8726         # Patterns
8727         # -----------------------------------------------------------------------------
8728
8729         ## Translate the given object along the given vector a given number times
8730         #  @param theObject The object to be translated.
8731         #  @param theVector Direction of the translation. DX if None.
8732         #  @param theStep Distance to translate on.
8733         #  @param theNbTimes Quantity of translations to be done.
8734         #  @param theName Object name; when specified, this parameter is used
8735         #         for result publication in the study. Otherwise, if automatic
8736         #         publication is switched on, default value is used for result name.
8737         #
8738         #  @return New GEOM.GEOM_Object, containing compound of all
8739         #          the shapes, obtained after each translation.
8740         #
8741         #  @ref tui_multi_translation "Example"
8742         @ManageTransactions("TrsfOp")
8743         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8744             """
8745             Translate the given object along the given vector a given number times
8746
8747             Parameters:
8748                 theObject The object to be translated.
8749                 theVector Direction of the translation. DX if None.
8750                 theStep Distance to translate on.
8751                 theNbTimes Quantity of translations to be done.
8752                 theName Object name; when specified, this parameter is used
8753                         for result publication in the study. Otherwise, if automatic
8754                         publication is switched on, default value is used for result name.
8755
8756             Returns:
8757                 New GEOM.GEOM_Object, containing compound of all
8758                 the shapes, obtained after each translation.
8759
8760             Example of usage:
8761                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8762             """
8763             # Example: see GEOM_TestAll.py
8764             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8765             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8766             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8767             anObj.SetParameters(Parameters)
8768             self._autoPublish(anObj, theName, "multitranslation")
8769             return anObj
8770
8771         ## Conseqently apply two specified translations to theObject specified number of times.
8772         #  @param theObject The object to be translated.
8773         #  @param theVector1 Direction of the first translation. DX if None.
8774         #  @param theStep1 Step of the first translation.
8775         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8776         #  @param theVector2 Direction of the second translation. DY if None.
8777         #  @param theStep2 Step of the second translation.
8778         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8779         #  @param theName Object name; when specified, this parameter is used
8780         #         for result publication in the study. Otherwise, if automatic
8781         #         publication is switched on, default value is used for result name.
8782         #
8783         #  @return New GEOM.GEOM_Object, containing compound of all
8784         #          the shapes, obtained after each translation.
8785         #
8786         #  @ref tui_multi_translation "Example"
8787         @ManageTransactions("TrsfOp")
8788         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8789                                    theVector2, theStep2, theNbTimes2, theName=None):
8790             """
8791             Conseqently apply two specified translations to theObject specified number of times.
8792
8793             Parameters:
8794                 theObject The object to be translated.
8795                 theVector1 Direction of the first translation. DX if None.
8796                 theStep1 Step of the first translation.
8797                 theNbTimes1 Quantity of translations to be done along theVector1.
8798                 theVector2 Direction of the second translation. DY if None.
8799                 theStep2 Step of the second translation.
8800                 theNbTimes2 Quantity of translations to be done along theVector2.
8801                 theName Object name; when specified, this parameter is used
8802                         for result publication in the study. Otherwise, if automatic
8803                         publication is switched on, default value is used for result name.
8804
8805             Returns:
8806                 New GEOM.GEOM_Object, containing compound of all
8807                 the shapes, obtained after each translation.
8808
8809             Example of usage:
8810                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8811             """
8812             # Example: see GEOM_TestAll.py
8813             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8814             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8815                                                  theVector2, theStep2, theNbTimes2)
8816             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8817             anObj.SetParameters(Parameters)
8818             self._autoPublish(anObj, theName, "multitranslation")
8819             return anObj
8820
8821         ## Rotate the given object around the given axis a given number times.
8822         #  Rotation angle will be 2*PI/theNbTimes.
8823         #  @param theObject The object to be rotated.
8824         #  @param theAxis The rotation axis. DZ if None.
8825         #  @param theNbTimes Quantity of rotations to be done.
8826         #  @param theName Object name; when specified, this parameter is used
8827         #         for result publication in the study. Otherwise, if automatic
8828         #         publication is switched on, default value is used for result name.
8829         #
8830         #  @return New GEOM.GEOM_Object, containing compound of all the
8831         #          shapes, obtained after each rotation.
8832         #
8833         #  @ref tui_multi_rotation "Example"
8834         @ManageTransactions("TrsfOp")
8835         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8836             """
8837             Rotate the given object around the given axis a given number times.
8838             Rotation angle will be 2*PI/theNbTimes.
8839
8840             Parameters:
8841                 theObject The object to be rotated.
8842                 theAxis The rotation axis. DZ if None.
8843                 theNbTimes Quantity of rotations to be done.
8844                 theName Object name; when specified, this parameter is used
8845                         for result publication in the study. Otherwise, if automatic
8846                         publication is switched on, default value is used for result name.
8847
8848             Returns:
8849                 New GEOM.GEOM_Object, containing compound of all the
8850                 shapes, obtained after each rotation.
8851
8852             Example of usage:
8853                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8854             """
8855             # Example: see GEOM_TestAll.py
8856             theNbTimes, Parameters = ParseParameters(theNbTimes)
8857             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8858             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8859             anObj.SetParameters(Parameters)
8860             self._autoPublish(anObj, theName, "multirotation")
8861             return anObj
8862
8863         ## Rotate the given object around the given axis
8864         #  a given number times on the given angle.
8865         #  @param theObject The object to be rotated.
8866         #  @param theAxis The rotation axis. DZ if None.
8867         #  @param theAngleStep Rotation angle in radians.
8868         #  @param theNbTimes Quantity of rotations to be done.
8869         #  @param theName Object name; when specified, this parameter is used
8870         #         for result publication in the study. Otherwise, if automatic
8871         #         publication is switched on, default value is used for result name.
8872         #
8873         #  @return New GEOM.GEOM_Object, containing compound of all the
8874         #          shapes, obtained after each rotation.
8875         #
8876         #  @ref tui_multi_rotation "Example"
8877         @ManageTransactions("TrsfOp")
8878         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8879             """
8880             Rotate the given object around the given axis
8881             a given number times on the given angle.
8882
8883             Parameters:
8884                 theObject The object to be rotated.
8885                 theAxis The rotation axis. DZ if None.
8886                 theAngleStep Rotation angle in radians.
8887                 theNbTimes Quantity of rotations to be done.
8888                 theName Object name; when specified, this parameter is used
8889                         for result publication in the study. Otherwise, if automatic
8890                         publication is switched on, default value is used for result name.
8891
8892             Returns:
8893                 New GEOM.GEOM_Object, containing compound of all the
8894                 shapes, obtained after each rotation.
8895
8896             Example of usage:
8897                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8898             """
8899             # Example: see GEOM_TestAll.py
8900             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8901             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8902             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8903             anObj.SetParameters(Parameters)
8904             self._autoPublish(anObj, theName, "multirotation")
8905             return anObj
8906
8907         ## Rotate the given object around the given axis a given
8908         #  number times and multi-translate each rotation result.
8909         #  Rotation angle will be 2*PI/theNbTimes1.
8910         #  Translation direction passes through center of gravity
8911         #  of rotated shape and its projection on the rotation axis.
8912         #  @param theObject The object to be rotated.
8913         #  @param theAxis Rotation axis. DZ if None.
8914         #  @param theNbTimes1 Quantity of rotations to be done.
8915         #  @param theRadialStep Translation distance.
8916         #  @param theNbTimes2 Quantity of translations to be done.
8917         #  @param theName Object name; when specified, this parameter is used
8918         #         for result publication in the study. Otherwise, if automatic
8919         #         publication is switched on, default value is used for result name.
8920         #
8921         #  @return New GEOM.GEOM_Object, containing compound of all the
8922         #          shapes, obtained after each transformation.
8923         #
8924         #  @ref tui_multi_rotation "Example"
8925         @ManageTransactions("TrsfOp")
8926         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8927             """
8928             Rotate the given object around the
8929             given axis on the given angle a given number
8930             times and multi-translate each rotation result.
8931             Translation direction passes through center of gravity
8932             of rotated shape and its projection on the rotation axis.
8933
8934             Parameters:
8935                 theObject The object to be rotated.
8936                 theAxis Rotation axis. DZ if None.
8937                 theNbTimes1 Quantity of rotations to be done.
8938                 theRadialStep Translation distance.
8939                 theNbTimes2 Quantity of translations to be done.
8940                 theName Object name; when specified, this parameter is used
8941                         for result publication in the study. Otherwise, if automatic
8942                         publication is switched on, default value is used for result name.
8943
8944             Returns:
8945                 New GEOM.GEOM_Object, containing compound of all the
8946                 shapes, obtained after each transformation.
8947
8948             Example of usage:
8949                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8950             """
8951             # Example: see GEOM_TestAll.py
8952             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8953             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8954             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8955             anObj.SetParameters(Parameters)
8956             self._autoPublish(anObj, theName, "multirotation")
8957             return anObj
8958
8959         ## Rotate the given object around the
8960         #  given axis on the given angle a given number
8961         #  times and multi-translate each rotation result.
8962         #  Translation direction passes through center of gravity
8963         #  of rotated shape and its projection on the rotation axis.
8964         #  @param theObject The object to be rotated.
8965         #  @param theAxis Rotation axis. DZ if None.
8966         #  @param theAngleStep Rotation angle in radians.
8967         #  @param theNbTimes1 Quantity of rotations to be done.
8968         #  @param theRadialStep Translation distance.
8969         #  @param theNbTimes2 Quantity of translations to be done.
8970         #  @param theName Object name; when specified, this parameter is used
8971         #         for result publication in the study. Otherwise, if automatic
8972         #         publication is switched on, default value is used for result name.
8973         #
8974         #  @return New GEOM.GEOM_Object, containing compound of all the
8975         #          shapes, obtained after each transformation.
8976         #
8977         #  @ref tui_multi_rotation "Example"
8978         @ManageTransactions("TrsfOp")
8979         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8980             """
8981             Rotate the given object around the
8982             given axis on the given angle a given number
8983             times and multi-translate each rotation result.
8984             Translation direction passes through center of gravity
8985             of rotated shape and its projection on the rotation axis.
8986
8987             Parameters:
8988                 theObject The object to be rotated.
8989                 theAxis Rotation axis. DZ if None.
8990                 theAngleStep Rotation angle in radians.
8991                 theNbTimes1 Quantity of rotations to be done.
8992                 theRadialStep Translation distance.
8993                 theNbTimes2 Quantity of translations to be done.
8994                 theName Object name; when specified, this parameter is used
8995                         for result publication in the study. Otherwise, if automatic
8996                         publication is switched on, default value is used for result name.
8997
8998             Returns:
8999                 New GEOM.GEOM_Object, containing compound of all the
9000                 shapes, obtained after each transformation.
9001
9002             Example of usage:
9003                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
9004             """
9005             # Example: see GEOM_TestAll.py
9006             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9007             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
9008             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
9009             anObj.SetParameters(Parameters)
9010             self._autoPublish(anObj, theName, "multirotation")
9011             return anObj
9012
9013         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
9014         #
9015         #  @ref swig_MakeMultiRotation "Example"
9016         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9017             """
9018             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
9019
9020             Example of usage:
9021                 pz = geompy.MakeVertex(0, 0, 100)
9022                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9023                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
9024             """
9025             # Example: see GEOM_TestOthers.py
9026             aVec = self.MakeLine(aPoint,aDir)
9027             # note: auto-publishing is done in self.MultiRotate1D()
9028             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
9029             return anObj
9030
9031         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
9032         #
9033         #  @ref swig_MakeMultiRotation "Example"
9034         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
9035             """
9036             The same, as geompy.MultiRotate1D, but axis is given by direction and point
9037
9038             Example of usage:
9039                 pz = geompy.MakeVertex(0, 0, 100)
9040                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9041                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
9042             """
9043             # Example: see GEOM_TestOthers.py
9044             aVec = self.MakeLine(aPoint,aDir)
9045             # note: auto-publishing is done in self.MultiRotate1D()
9046             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
9047             return anObj
9048
9049         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9050         #
9051         #  @ref swig_MakeMultiRotation "Example"
9052         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
9053             """
9054             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
9055
9056             Example of usage:
9057                 pz = geompy.MakeVertex(0, 0, 100)
9058                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9059                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
9060             """
9061             # Example: see GEOM_TestOthers.py
9062             aVec = self.MakeLine(aPoint,aDir)
9063             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
9064             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
9065             return anObj
9066
9067         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
9068         #
9069         #  @ref swig_MakeMultiRotation "Example"
9070         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9071             """
9072             The same, as MultiRotate2DByStep(), but axis is given by direction and point
9073
9074             Example of usage:
9075                 pz = geompy.MakeVertex(0, 0, 100)
9076                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9077                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
9078             """
9079             # Example: see GEOM_TestOthers.py
9080             aVec = self.MakeLine(aPoint,aDir)
9081             # note: auto-publishing is done in self.MultiRotate2D()
9082             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9083             return anObj
9084
9085         # end of l3_transform
9086         ## @}
9087
9088         ## @addtogroup l3_transform_d
9089         ## @{
9090
9091         ## Deprecated method. Use MultiRotate1DNbTimes instead.
9092         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
9093             """
9094             Deprecated method. Use MultiRotate1DNbTimes instead.
9095             """
9096             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
9097             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
9098
9099         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9100         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9101         @ManageTransactions("TrsfOp")
9102         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
9103             """
9104             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
9105             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
9106
9107             Example of usage:
9108                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
9109             """
9110             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
9111             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
9112             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
9113             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
9114             anObj.SetParameters(Parameters)
9115             self._autoPublish(anObj, theName, "multirotation")
9116             return anObj
9117
9118         ## The same, as MultiRotate1D(), but axis is given by direction and point
9119         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9120         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
9121             """
9122             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
9123             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
9124
9125             Example of usage:
9126                 pz = geompy.MakeVertex(0, 0, 100)
9127                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9128                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
9129             """
9130             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
9131             aVec = self.MakeLine(aPoint,aDir)
9132             # note: auto-publishing is done in self.MultiRotate1D()
9133             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
9134             return anObj
9135
9136         ## The same, as MultiRotate2D(), but axis is given by direction and point
9137         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9138         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
9139             """
9140             The same, as MultiRotate2D(), but axis is given by direction and point
9141             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
9142
9143             Example of usage:
9144                 pz = geompy.MakeVertex(0, 0, 100)
9145                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
9146                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
9147             """
9148             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
9149             aVec = self.MakeLine(aPoint,aDir)
9150             # note: auto-publishing is done in self.MultiRotate2D()
9151             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
9152             return anObj
9153
9154         # end of l3_transform_d
9155         ## @}
9156
9157         ## @addtogroup l3_local
9158         ## @{
9159
9160         ## Perform a fillet on all edges of the given shape.
9161         #  @param theShape Shape, to perform fillet on.
9162         #  @param theR Fillet radius.
9163         #  @param theName Object name; when specified, this parameter is used
9164         #         for result publication in the study. Otherwise, if automatic
9165         #         publication is switched on, default value is used for result name.
9166         #
9167         #  @return New GEOM.GEOM_Object, containing the result shape.
9168         #
9169         #  @ref tui_fillet "Example 1"
9170         #  \n @ref swig_MakeFilletAll "Example 2"
9171         @ManageTransactions("LocalOp")
9172         def MakeFilletAll(self, theShape, theR, theName=None):
9173             """
9174             Perform a fillet on all edges of the given shape.
9175
9176             Parameters:
9177                 theShape Shape, to perform fillet on.
9178                 theR Fillet radius.
9179                 theName Object name; when specified, this parameter is used
9180                         for result publication in the study. Otherwise, if automatic
9181                         publication is switched on, default value is used for result name.
9182
9183             Returns:
9184                 New GEOM.GEOM_Object, containing the result shape.
9185
9186             Example of usage:
9187                filletall = geompy.MakeFilletAll(prism, 10.)
9188             """
9189             # Example: see GEOM_TestOthers.py
9190             theR,Parameters = ParseParameters(theR)
9191             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9192             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9193             anObj.SetParameters(Parameters)
9194             self._autoPublish(anObj, theName, "fillet")
9195             return anObj
9196
9197         ## Perform a fillet on the specified edges/faces of the given shape
9198         #  @param theShape Shape, to perform fillet on.
9199         #  @param theR Fillet radius.
9200         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9201         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9202         #  @param theName Object name; when specified, this parameter is used
9203         #         for result publication in the study. Otherwise, if automatic
9204         #         publication is switched on, default value is used for result name.
9205         #
9206         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9207         #
9208         #  @return New GEOM.GEOM_Object, containing the result shape.
9209         #
9210         #  @ref tui_fillet "Example"
9211         @ManageTransactions("LocalOp")
9212         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9213             """
9214             Perform a fillet on the specified edges/faces of the given shape
9215
9216             Parameters:
9217                 theShape Shape, to perform fillet on.
9218                 theR Fillet radius.
9219                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9220                 theListShapes Global indices of edges/faces to perform fillet on.
9221                 theName Object name; when specified, this parameter is used
9222                         for result publication in the study. Otherwise, if automatic
9223                         publication is switched on, default value is used for result name.
9224
9225             Note:
9226                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9227
9228             Returns:
9229                 New GEOM.GEOM_Object, containing the result shape.
9230
9231             Example of usage:
9232                 # get the list of IDs (IDList) for the fillet
9233                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9234                 IDlist_e = []
9235                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9236                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9237                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9238                 # make a fillet on the specified edges of the given shape
9239                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9240             """
9241             # Example: see GEOM_TestAll.py
9242             theR,Parameters = ParseParameters(theR)
9243             anObj = None
9244             if theShapeType == self.ShapeType["EDGE"]:
9245                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9246                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9247             else:
9248                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9249                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9250             anObj.SetParameters(Parameters)
9251             self._autoPublish(anObj, theName, "fillet")
9252             return anObj
9253
9254         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9255         @ManageTransactions("LocalOp")
9256         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9257             """
9258             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9259
9260             Example of usage:
9261                 # get the list of IDs (IDList) for the fillet
9262                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9263                 IDlist_e = []
9264                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9265                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9266                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9267                 # make a fillet on the specified edges of the given shape
9268                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9269             """
9270             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9271             anObj = None
9272             if theShapeType == self.ShapeType["EDGE"]:
9273                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9274                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9275             else:
9276                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9277                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9278             anObj.SetParameters(Parameters)
9279             self._autoPublish(anObj, theName, "fillet")
9280             return anObj
9281
9282         ## Perform a fillet on the specified edges of the given shape
9283         #  @param theShape  Wire Shape to perform fillet on.
9284         #  @param theR  Fillet radius.
9285         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9286         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9287         #    \note The list of vertices could be empty,
9288         #          in this case fillet will done done at all vertices in wire
9289         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9290         #         by the length of the edges, nearest to the fillet vertex.
9291         #         But sometimes the next edge is C1 continuous with the one, nearest to
9292         #         the fillet point, and such two (or more) edges can be united to allow
9293         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9294         #         thus ignoring the secant vertex (vertices).
9295         #  @param theName Object name; when specified, this parameter is used
9296         #         for result publication in the study. Otherwise, if automatic
9297         #         publication is switched on, default value is used for result name.
9298         #
9299         #  @return New GEOM.GEOM_Object, containing the result shape.
9300         #
9301         #  @ref tui_fillet2d "Example"
9302         @ManageTransactions("LocalOp")
9303         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9304             """
9305             Perform a fillet on the specified edges of the given shape
9306
9307             Parameters:
9308                 theShape  Wire Shape to perform fillet on.
9309                 theR  Fillet radius.
9310                 theListOfVertexes Global indices of vertexes to perform fillet on.
9311                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9312                     by the length of the edges, nearest to the fillet vertex.
9313                     But sometimes the next edge is C1 continuous with the one, nearest to
9314                     the fillet point, and such two (or more) edges can be united to allow
9315                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9316                     thus ignoring the secant vertex (vertices).
9317                 theName Object name; when specified, this parameter is used
9318                         for result publication in the study. Otherwise, if automatic
9319                         publication is switched on, default value is used for result name.
9320             Note:
9321                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9322
9323                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9324
9325             Returns:
9326                 New GEOM.GEOM_Object, containing the result shape.
9327
9328             Example of usage:
9329                 # create wire
9330                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9331                 # make fillet at given wire vertices with giver radius
9332                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9333             """
9334             # Example: see GEOM_TestAll.py
9335             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9336             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9337             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9338             anObj.SetParameters(Parameters)
9339             self._autoPublish(anObj, theName, "fillet")
9340             return anObj
9341
9342         ## Perform a fillet at the specified vertices of the given face/shell.
9343         #  @param theShape Face or Shell shape to perform fillet on.
9344         #  @param theR Fillet radius.
9345         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9346         #  @param theName Object name; when specified, this parameter is used
9347         #         for result publication in the study. Otherwise, if automatic
9348         #         publication is switched on, default value is used for result name.
9349         #
9350         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9351         #
9352         #  @return New GEOM.GEOM_Object, containing the result shape.
9353         #
9354         #  @ref tui_fillet2d "Example"
9355         @ManageTransactions("LocalOp")
9356         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9357             """
9358             Perform a fillet at the specified vertices of the given face/shell.
9359
9360             Parameters:
9361                 theShape  Face or Shell shape to perform fillet on.
9362                 theR  Fillet radius.
9363                 theListOfVertexes Global indices of vertexes to perform fillet on.
9364                 theName Object name; when specified, this parameter is used
9365                         for result publication in the study. Otherwise, if automatic
9366                         publication is switched on, default value is used for result name.
9367             Note:
9368                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9369
9370             Returns:
9371                 New GEOM.GEOM_Object, containing the result shape.
9372
9373             Example of usage:
9374                 face = geompy.MakeFaceHW(100, 100, 1)
9375                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9376             """
9377             # Example: see GEOM_TestAll.py
9378             theR,Parameters = ParseParameters(theR)
9379             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9380             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9381             anObj.SetParameters(Parameters)
9382             self._autoPublish(anObj, theName, "fillet")
9383             return anObj
9384
9385         ## Perform a symmetric chamfer on all edges of the given shape.
9386         #  @param theShape Shape, to perform chamfer on.
9387         #  @param theD Chamfer size along each face.
9388         #  @param theName Object name; when specified, this parameter is used
9389         #         for result publication in the study. Otherwise, if automatic
9390         #         publication is switched on, default value is used for result name.
9391         #
9392         #  @return New GEOM.GEOM_Object, containing the result shape.
9393         #
9394         #  @ref tui_chamfer "Example 1"
9395         #  \n @ref swig_MakeChamferAll "Example 2"
9396         @ManageTransactions("LocalOp")
9397         def MakeChamferAll(self, theShape, theD, theName=None):
9398             """
9399             Perform a symmetric chamfer on all edges of the given shape.
9400
9401             Parameters:
9402                 theShape Shape, to perform chamfer on.
9403                 theD Chamfer size along each face.
9404                 theName Object name; when specified, this parameter is used
9405                         for result publication in the study. Otherwise, if automatic
9406                         publication is switched on, default value is used for result name.
9407
9408             Returns:
9409                 New GEOM.GEOM_Object, containing the result shape.
9410
9411             Example of usage:
9412                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9413             """
9414             # Example: see GEOM_TestOthers.py
9415             theD,Parameters = ParseParameters(theD)
9416             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9417             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9418             anObj.SetParameters(Parameters)
9419             self._autoPublish(anObj, theName, "chamfer")
9420             return anObj
9421
9422         ## Perform a chamfer on edges, common to the specified faces,
9423         #  with distance D1 on the Face1
9424         #  @param theShape Shape, to perform chamfer on.
9425         #  @param theD1 Chamfer size along \a theFace1.
9426         #  @param theD2 Chamfer size along \a theFace2.
9427         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9428         #  @param theName Object name; when specified, this parameter is used
9429         #         for result publication in the study. Otherwise, if automatic
9430         #         publication is switched on, default value is used for result name.
9431         #
9432         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9433         #
9434         #  @return New GEOM.GEOM_Object, containing the result shape.
9435         #
9436         #  @ref tui_chamfer "Example"
9437         @ManageTransactions("LocalOp")
9438         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9439             """
9440             Perform a chamfer on edges, common to the specified faces,
9441             with distance D1 on the Face1
9442
9443             Parameters:
9444                 theShape Shape, to perform chamfer on.
9445                 theD1 Chamfer size along theFace1.
9446                 theD2 Chamfer size along theFace2.
9447                 theFace1,theFace2 Global indices of two faces of theShape.
9448                 theName Object name; when specified, this parameter is used
9449                         for result publication in the study. Otherwise, if automatic
9450                         publication is switched on, default value is used for result name.
9451
9452             Note:
9453                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9454
9455             Returns:
9456                 New GEOM.GEOM_Object, containing the result shape.
9457
9458             Example of usage:
9459                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9460                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9461                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9462                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9463             """
9464             # Example: see GEOM_TestAll.py
9465             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9466             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9467             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9468             anObj.SetParameters(Parameters)
9469             self._autoPublish(anObj, theName, "chamfer")
9470             return anObj
9471
9472         ## Perform a chamfer on edges
9473         #  @param theShape Shape, to perform chamfer on.
9474         #  @param theD Chamfer length
9475         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9476         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9477         #  @param theName Object name; when specified, this parameter is used
9478         #         for result publication in the study. Otherwise, if automatic
9479         #         publication is switched on, default value is used for result name.
9480         #
9481         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9482         #
9483         #  @return New GEOM.GEOM_Object, containing the result shape.
9484         @ManageTransactions("LocalOp")
9485         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9486             """
9487             Perform a chamfer on edges
9488
9489             Parameters:
9490                 theShape Shape, to perform chamfer on.
9491                 theD1 Chamfer size along theFace1.
9492                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9493                 theFace1,theFace2 Global indices of two faces of theShape.
9494                 theName Object name; when specified, this parameter is used
9495                         for result publication in the study. Otherwise, if automatic
9496                         publication is switched on, default value is used for result name.
9497
9498             Note:
9499                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9500
9501             Returns:
9502                 New GEOM.GEOM_Object, containing the result shape.
9503
9504             Example of usage:
9505                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9506                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9507                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9508                 ang = 30
9509                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9510             """
9511             flag = False
9512             if isinstance(theAngle,str):
9513                 flag = True
9514             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9515             if flag:
9516                 theAngle = theAngle*math.pi/180.0
9517             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9518             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9519             anObj.SetParameters(Parameters)
9520             self._autoPublish(anObj, theName, "chamfer")
9521             return anObj
9522
9523         ## Perform a chamfer on all edges of the specified faces,
9524         #  with distance D1 on the first specified face (if several for one edge)
9525         #  @param theShape Shape, to perform chamfer on.
9526         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9527         #               connected to the edge, are in \a theFaces, \a theD1
9528         #               will be get along face, which is nearer to \a theFaces beginning.
9529         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9530         #  @param theFaces Sequence of global indices of faces of \a theShape.
9531         #  @param theName Object name; when specified, this parameter is used
9532         #         for result publication in the study. Otherwise, if automatic
9533         #         publication is switched on, default value is used for result name.
9534         #
9535         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9536         #
9537         #  @return New GEOM.GEOM_Object, containing the result shape.
9538         #
9539         #  @ref tui_chamfer "Example"
9540         @ManageTransactions("LocalOp")
9541         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9542             """
9543             Perform a chamfer on all edges of the specified faces,
9544             with distance D1 on the first specified face (if several for one edge)
9545
9546             Parameters:
9547                 theShape Shape, to perform chamfer on.
9548                 theD1 Chamfer size along face from  theFaces. If both faces,
9549                       connected to the edge, are in theFaces, theD1
9550                       will be get along face, which is nearer to theFaces beginning.
9551                 theD2 Chamfer size along another of two faces, connected to the edge.
9552                 theFaces Sequence of global indices of faces of theShape.
9553                 theName Object name; when specified, this parameter is used
9554                         for result publication in the study. Otherwise, if automatic
9555                         publication is switched on, default value is used for result name.
9556
9557             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9558
9559             Returns:
9560                 New GEOM.GEOM_Object, containing the result shape.
9561             """
9562             # Example: see GEOM_TestAll.py
9563             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9564             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9565             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9566             anObj.SetParameters(Parameters)
9567             self._autoPublish(anObj, theName, "chamfer")
9568             return anObj
9569
9570         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9571         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9572         #
9573         #  @ref swig_FilletChamfer "Example"
9574         @ManageTransactions("LocalOp")
9575         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9576             """
9577             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9578             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9579             """
9580             flag = False
9581             if isinstance(theAngle,str):
9582                 flag = True
9583             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9584             if flag:
9585                 theAngle = theAngle*math.pi/180.0
9586             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9587             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9588             anObj.SetParameters(Parameters)
9589             self._autoPublish(anObj, theName, "chamfer")
9590             return anObj
9591
9592         ## Perform a chamfer on edges,
9593         #  with distance D1 on the first specified face (if several for one edge)
9594         #  @param theShape Shape, to perform chamfer on.
9595         #  @param theD1,theD2 Chamfer size
9596         #  @param theEdges Sequence of edges of \a theShape.
9597         #  @param theName Object name; when specified, this parameter is used
9598         #         for result publication in the study. Otherwise, if automatic
9599         #         publication is switched on, default value is used for result name.
9600         #
9601         #  @return New GEOM.GEOM_Object, containing the result shape.
9602         #
9603         #  @ref swig_FilletChamfer "Example"
9604         @ManageTransactions("LocalOp")
9605         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9606             """
9607             Perform a chamfer on edges,
9608             with distance D1 on the first specified face (if several for one edge)
9609
9610             Parameters:
9611                 theShape Shape, to perform chamfer on.
9612                 theD1,theD2 Chamfer size
9613                 theEdges Sequence of edges of theShape.
9614                 theName Object name; when specified, this parameter is used
9615                         for result publication in the study. Otherwise, if automatic
9616                         publication is switched on, default value is used for result name.
9617
9618             Returns:
9619                 New GEOM.GEOM_Object, containing the result shape.
9620             """
9621             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9622             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9623             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9624             anObj.SetParameters(Parameters)
9625             self._autoPublish(anObj, theName, "chamfer")
9626             return anObj
9627
9628         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9629         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9630         @ManageTransactions("LocalOp")
9631         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9632             """
9633             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9634             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9635             """
9636             flag = False
9637             if isinstance(theAngle,str):
9638                 flag = True
9639             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9640             if flag:
9641                 theAngle = theAngle*math.pi/180.0
9642             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9643             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9644             anObj.SetParameters(Parameters)
9645             self._autoPublish(anObj, theName, "chamfer")
9646             return anObj
9647
9648         ## @sa MakeChamferEdge(), MakeChamferFaces()
9649         #
9650         #  @ref swig_MakeChamfer "Example"
9651         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9652             """
9653             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9654             """
9655             # Example: see GEOM_TestOthers.py
9656             anObj = None
9657             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9658             if aShapeType == self.ShapeType["EDGE"]:
9659                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9660             else:
9661                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9662             return anObj
9663
9664         ## Remove material from a solid by extrusion of the base shape on the given distance.
9665         #  @param theInit Shape to remove material from. It must be a solid or
9666         #  a compound made of a single solid.
9667         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9668         #  @param theH Prism dimension along the normal to theBase
9669         #  @param theAngle Draft angle in degrees.
9670         #  @param theName Object name; when specified, this parameter is used
9671         #         for result publication in the study. Otherwise, if automatic
9672         #         publication is switched on, default value is used for result name.
9673         #
9674         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9675         #
9676         #  @ref tui_creation_prism "Example"
9677         @ManageTransactions("PrimOp")
9678         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9679             """
9680             Add material to a solid by extrusion of the base shape on the given distance.
9681
9682             Parameters:
9683                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9684                 theBase Closed edge or wire defining the base shape to be extruded.
9685                 theH Prism dimension along the normal  to theBase
9686                 theAngle Draft angle in degrees.
9687                 theName Object name; when specified, this parameter is used
9688                         for result publication in the study. Otherwise, if automatic
9689                         publication is switched on, default value is used for result name.
9690
9691             Returns:
9692                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9693             """
9694             # Example: see GEOM_TestAll.py
9695             #theH,Parameters = ParseParameters(theH)
9696             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9697             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9698             #anObj.SetParameters(Parameters)
9699             self._autoPublish(anObj, theName, "extrudedCut")
9700             return anObj
9701
9702         ## Add material to a solid by extrusion of the base shape on the given distance.
9703         #  @param theInit Shape to add material to. It must be a solid or
9704         #  a compound made of a single solid.
9705         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9706         #  @param theH Prism dimension along the normal to theBase
9707         #  @param theAngle Draft angle in degrees.
9708         #  @param theName Object name; when specified, this parameter is used
9709         #         for result publication in the study. Otherwise, if automatic
9710         #         publication is switched on, default value is used for result name.
9711         #
9712         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9713         #
9714         #  @ref tui_creation_prism "Example"
9715         @ManageTransactions("PrimOp")
9716         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9717             """
9718             Add material to a solid by extrusion of the base shape on the given distance.
9719
9720             Parameters:
9721                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9722                 theBase Closed edge or wire defining the base shape to be extruded.
9723                 theH Prism dimension along the normal  to theBase
9724                 theAngle Draft angle in degrees.
9725                 theName Object name; when specified, this parameter is used
9726                         for result publication in the study. Otherwise, if automatic
9727                         publication is switched on, default value is used for result name.
9728
9729             Returns:
9730                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9731             """
9732             # Example: see GEOM_TestAll.py
9733             #theH,Parameters = ParseParameters(theH)
9734             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9735             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9736             #anObj.SetParameters(Parameters)
9737             self._autoPublish(anObj, theName, "extrudedBoss")
9738             return anObj
9739
9740         # end of l3_local
9741         ## @}
9742
9743         ## @addtogroup l3_basic_op
9744         ## @{
9745
9746         ## Perform an Archimde operation on the given shape with given parameters.
9747         #  The object presenting the resulting face is returned.
9748         #  @param theShape Shape to be put in water.
9749         #  @param theWeight Weight of the shape.
9750         #  @param theWaterDensity Density of the water.
9751         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9752         #  @param theName Object name; when specified, this parameter is used
9753         #         for result publication in the study. Otherwise, if automatic
9754         #         publication is switched on, default value is used for result name.
9755         #
9756         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9757         #          by a plane, corresponding to water level.
9758         #
9759         #  @ref tui_archimede "Example"
9760         @ManageTransactions("LocalOp")
9761         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9762             """
9763             Perform an Archimde operation on the given shape with given parameters.
9764             The object presenting the resulting face is returned.
9765
9766             Parameters:
9767                 theShape Shape to be put in water.
9768                 theWeight Weight of the shape.
9769                 theWaterDensity Density of the water.
9770                 theMeshDeflection Deflection of the mesh, using to compute the section.
9771                 theName Object name; when specified, this parameter is used
9772                         for result publication in the study. Otherwise, if automatic
9773                         publication is switched on, default value is used for result name.
9774
9775             Returns:
9776                 New GEOM.GEOM_Object, containing a section of theShape
9777                 by a plane, corresponding to water level.
9778             """
9779             # Example: see GEOM_TestAll.py
9780             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9781               theWeight,theWaterDensity,theMeshDeflection)
9782             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9783             RaiseIfFailed("MakeArchimede", self.LocalOp)
9784             anObj.SetParameters(Parameters)
9785             self._autoPublish(anObj, theName, "archimede")
9786             return anObj
9787
9788         # end of l3_basic_op
9789         ## @}
9790
9791         ## @addtogroup l2_measure
9792         ## @{
9793
9794         ## Get point coordinates
9795         #  @return [x, y, z]
9796         #
9797         #  @ref tui_measurement_tools_page "Example"
9798         @ManageTransactions("MeasuOp")
9799         def PointCoordinates(self,Point):
9800             """
9801             Get point coordinates
9802
9803             Returns:
9804                 [x, y, z]
9805             """
9806             # Example: see GEOM_TestMeasures.py
9807             aTuple = self.MeasuOp.PointCoordinates(Point)
9808             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9809             return aTuple
9810
9811         ## Get vector coordinates
9812         #  @return [x, y, z]
9813         #
9814         #  @ref tui_measurement_tools_page "Example"
9815         def VectorCoordinates(self,Vector):
9816             """
9817             Get vector coordinates
9818
9819             Returns:
9820                 [x, y, z]
9821             """
9822
9823             p1=self.GetFirstVertex(Vector)
9824             p2=self.GetLastVertex(Vector)
9825
9826             X1=self.PointCoordinates(p1)
9827             X2=self.PointCoordinates(p2)
9828
9829             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9830
9831
9832         ## Compute cross product
9833         #  @return vector w=u^v
9834         #
9835         #  @ref tui_measurement_tools_page "Example"
9836         def CrossProduct(self, Vector1, Vector2):
9837             """
9838             Compute cross product
9839
9840             Returns: vector w=u^v
9841             """
9842             u=self.VectorCoordinates(Vector1)
9843             v=self.VectorCoordinates(Vector2)
9844             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])
9845
9846             return w
9847
9848         ## Compute cross product
9849         #  @return dot product  p=u.v
9850         #
9851         #  @ref tui_measurement_tools_page "Example"
9852         def DotProduct(self, Vector1, Vector2):
9853             """
9854             Compute cross product
9855
9856             Returns: dot product  p=u.v
9857             """
9858             u=self.VectorCoordinates(Vector1)
9859             v=self.VectorCoordinates(Vector2)
9860             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9861
9862             return p
9863
9864
9865         ## Get summarized length of all wires,
9866         #  area of surface and volume of the given shape.
9867         #  @param theShape Shape to define properties of.
9868         #  @return [theLength, theSurfArea, theVolume]\n
9869         #  theLength:   Summarized length of all wires of the given shape.\n
9870         #  theSurfArea: Area of surface of the given shape.\n
9871         #  theVolume:   Volume of the given shape.
9872         #
9873         #  @ref tui_measurement_tools_page "Example"
9874         @ManageTransactions("MeasuOp")
9875         def BasicProperties(self,theShape):
9876             """
9877             Get summarized length of all wires,
9878             area of surface and volume of the given shape.
9879
9880             Parameters:
9881                 theShape Shape to define properties of.
9882
9883             Returns:
9884                 [theLength, theSurfArea, theVolume]
9885                  theLength:   Summarized length of all wires of the given shape.
9886                  theSurfArea: Area of surface of the given shape.
9887                  theVolume:   Volume of the given shape.
9888             """
9889             # Example: see GEOM_TestMeasures.py
9890             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9891             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9892             return aTuple
9893
9894         ## Get parameters of bounding box of the given shape
9895         #  @param theShape Shape to obtain bounding box of.
9896         #  @param precise TRUE for precise computation; FALSE for fast one.
9897         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9898         #  Xmin,Xmax: Limits of shape along OX axis.
9899         #  Ymin,Ymax: Limits of shape along OY axis.
9900         #  Zmin,Zmax: Limits of shape along OZ axis.
9901         #
9902         #  @ref tui_measurement_tools_page "Example"
9903         @ManageTransactions("MeasuOp")
9904         def BoundingBox (self, theShape, precise=False):
9905             """
9906             Get parameters of bounding box of the given shape
9907
9908             Parameters:
9909                 theShape Shape to obtain bounding box of.
9910                 precise TRUE for precise computation; FALSE for fast one.
9911
9912             Returns:
9913                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9914                  Xmin,Xmax: Limits of shape along OX axis.
9915                  Ymin,Ymax: Limits of shape along OY axis.
9916                  Zmin,Zmax: Limits of shape along OZ axis.
9917             """
9918             # Example: see GEOM_TestMeasures.py
9919             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9920             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9921             return aTuple
9922
9923         ## Get bounding box of the given shape
9924         #  @param theShape Shape to obtain bounding box of.
9925         #  @param precise TRUE for precise computation; FALSE for fast one.
9926         #  @param theName Object name; when specified, this parameter is used
9927         #         for result publication in the study. Otherwise, if automatic
9928         #         publication is switched on, default value is used for result name.
9929         #
9930         #  @return New GEOM.GEOM_Object, containing the created box.
9931         #
9932         #  @ref tui_measurement_tools_page "Example"
9933         @ManageTransactions("MeasuOp")
9934         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9935             """
9936             Get bounding box of the given shape
9937
9938             Parameters:
9939                 theShape Shape to obtain bounding box of.
9940                 precise TRUE for precise computation; FALSE for fast one.
9941                 theName Object name; when specified, this parameter is used
9942                         for result publication in the study. Otherwise, if automatic
9943                         publication is switched on, default value is used for result name.
9944
9945             Returns:
9946                 New GEOM.GEOM_Object, containing the created box.
9947             """
9948             # Example: see GEOM_TestMeasures.py
9949             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9950             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9951             self._autoPublish(anObj, theName, "bndbox")
9952             return anObj
9953
9954         ## Get inertia matrix and moments of inertia of theShape.
9955         #  @param theShape Shape to calculate inertia of.
9956         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9957         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9958         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9959         #
9960         #  @ref tui_measurement_tools_page "Example"
9961         @ManageTransactions("MeasuOp")
9962         def Inertia(self,theShape):
9963             """
9964             Get inertia matrix and moments of inertia of theShape.
9965
9966             Parameters:
9967                 theShape Shape to calculate inertia of.
9968
9969             Returns:
9970                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9971                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9972                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9973             """
9974             # Example: see GEOM_TestMeasures.py
9975             aTuple = self.MeasuOp.GetInertia(theShape)
9976             RaiseIfFailed("GetInertia", self.MeasuOp)
9977             return aTuple
9978
9979         ## Get if coords are included in the shape (ST_IN or ST_ON)
9980         #  @param theShape Shape
9981         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9982         #  @param tolerance to be used (default is 1.0e-7)
9983         #  @return list_of_boolean = [res1, res2, ...]
9984         @ManageTransactions("MeasuOp")
9985         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9986             """
9987             Get if coords are included in the shape (ST_IN or ST_ON)
9988
9989             Parameters:
9990                 theShape Shape
9991                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9992                 tolerance to be used (default is 1.0e-7)
9993
9994             Returns:
9995                 list_of_boolean = [res1, res2, ...]
9996             """
9997             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9998
9999         ## Get minimal distance between the given shapes.
10000         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10001         #  @return Value of the minimal distance between the given shapes.
10002         #
10003         #  @ref tui_measurement_tools_page "Example"
10004         @ManageTransactions("MeasuOp")
10005         def MinDistance(self, theShape1, theShape2):
10006             """
10007             Get minimal distance between the given shapes.
10008
10009             Parameters:
10010                 theShape1,theShape2 Shapes to find minimal distance between.
10011
10012             Returns:
10013                 Value of the minimal distance between the given shapes.
10014             """
10015             # Example: see GEOM_TestMeasures.py
10016             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10017             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10018             return aTuple[0]
10019
10020         ## Get minimal distance between the given shapes.
10021         #  @param theShape1,theShape2 Shapes to find minimal distance between.
10022         #  @return Value of the minimal distance between the given shapes, in form of list
10023         #          [Distance, DX, DY, DZ].
10024         #
10025         #  @ref swig_all_measure "Example"
10026         @ManageTransactions("MeasuOp")
10027         def MinDistanceComponents(self, theShape1, theShape2):
10028             """
10029             Get minimal distance between the given shapes.
10030
10031             Parameters:
10032                 theShape1,theShape2 Shapes to find minimal distance between.
10033
10034             Returns:
10035                 Value of the minimal distance between the given shapes, in form of list
10036                 [Distance, DX, DY, DZ]
10037             """
10038             # Example: see GEOM_TestMeasures.py
10039             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
10040             RaiseIfFailed("GetMinDistance", self.MeasuOp)
10041             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
10042             return aRes
10043
10044         ## Get closest points of the given shapes.
10045         #  @param theShape1,theShape2 Shapes to find closest points of.
10046         #  @return The number of found solutions (-1 in case of infinite number of
10047         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10048         #
10049         #  @ref tui_measurement_tools_page "Example"
10050         @ManageTransactions("MeasuOp")
10051         def ClosestPoints (self, theShape1, theShape2):
10052             """
10053             Get closest points of the given shapes.
10054
10055             Parameters:
10056                 theShape1,theShape2 Shapes to find closest points of.
10057
10058             Returns:
10059                 The number of found solutions (-1 in case of infinite number of
10060                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
10061             """
10062             # Example: see GEOM_TestMeasures.py
10063             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
10064             RaiseIfFailed("ClosestPoints", self.MeasuOp)
10065             return aTuple
10066
10067         ## Get angle between the given shapes in degrees.
10068         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10069         #  @note If both arguments are vectors, the angle is computed in accordance
10070         #        with their orientations, otherwise the minimum angle is computed.
10071         #  @return Value of the angle between the given shapes in degrees.
10072         #
10073         #  @ref tui_measurement_tools_page "Example"
10074         @ManageTransactions("MeasuOp")
10075         def GetAngle(self, theShape1, theShape2):
10076             """
10077             Get angle between the given shapes in degrees.
10078
10079             Parameters:
10080                 theShape1,theShape2 Lines or linear edges to find angle between.
10081
10082             Note:
10083                 If both arguments are vectors, the angle is computed in accordance
10084                 with their orientations, otherwise the minimum angle is computed.
10085
10086             Returns:
10087                 Value of the angle between the given shapes in degrees.
10088             """
10089             # Example: see GEOM_TestMeasures.py
10090             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
10091             RaiseIfFailed("GetAngle", self.MeasuOp)
10092             return anAngle
10093
10094         ## Get angle between the given shapes in radians.
10095         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
10096         #  @note If both arguments are vectors, the angle is computed in accordance
10097         #        with their orientations, otherwise the minimum angle is computed.
10098         #  @return Value of the angle between the given shapes in radians.
10099         #
10100         #  @ref tui_measurement_tools_page "Example"
10101         @ManageTransactions("MeasuOp")
10102         def GetAngleRadians(self, theShape1, theShape2):
10103             """
10104             Get angle between the given shapes in radians.
10105
10106             Parameters:
10107                 theShape1,theShape2 Lines or linear edges to find angle between.
10108
10109
10110             Note:
10111                 If both arguments are vectors, the angle is computed in accordance
10112                 with their orientations, otherwise the minimum angle is computed.
10113
10114             Returns:
10115                 Value of the angle between the given shapes in radians.
10116             """
10117             # Example: see GEOM_TestMeasures.py
10118             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
10119             RaiseIfFailed("GetAngle", self.MeasuOp)
10120             return anAngle
10121
10122         ## Get angle between the given vectors in degrees.
10123         #  @param theShape1,theShape2 Vectors to find angle between.
10124         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
10125         #                 if False, the opposite vector to the normal vector is used.
10126         #  @return Value of the angle between the given vectors in degrees.
10127         #
10128         #  @ref tui_measurement_tools_page "Example"
10129         @ManageTransactions("MeasuOp")
10130         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
10131             """
10132             Get angle between the given vectors in degrees.
10133
10134             Parameters:
10135                 theShape1,theShape2 Vectors to find angle between.
10136                 theFlag If True, the normal vector is defined by the two vectors cross,
10137                         if False, the opposite vector to the normal vector is used.
10138
10139             Returns:
10140                 Value of the angle between the given vectors in degrees.
10141             """
10142             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
10143             if not theFlag:
10144                 anAngle = 360. - anAngle
10145             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
10146             return anAngle
10147
10148         ## The same as GetAngleVectors, but the result is in radians.
10149         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
10150             """
10151             Get angle between the given vectors in radians.
10152
10153             Parameters:
10154                 theShape1,theShape2 Vectors to find angle between.
10155                 theFlag If True, the normal vector is defined by the two vectors cross,
10156                         if False, the opposite vector to the normal vector is used.
10157
10158             Returns:
10159                 Value of the angle between the given vectors in radians.
10160             """
10161             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
10162             return anAngle
10163
10164         ## @name Curve Curvature Measurement
10165         #  Methods for receiving radius of curvature of curves
10166         #  in the given point
10167         ## @{
10168
10169         ## Measure curvature of a curve at a point, set by parameter.
10170         #  @param theCurve a curve.
10171         #  @param theParam parameter.
10172         #  @return radius of curvature of \a theCurve.
10173         #
10174         #  @ref swig_todo "Example"
10175         @ManageTransactions("MeasuOp")
10176         def CurveCurvatureByParam(self, theCurve, theParam):
10177             """
10178             Measure curvature of a curve at a point, set by parameter.
10179
10180             Parameters:
10181                 theCurve a curve.
10182                 theParam parameter.
10183
10184             Returns:
10185                 radius of curvature of theCurve.
10186             """
10187             # Example: see GEOM_TestMeasures.py
10188             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10189             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10190             return aCurv
10191
10192         ## Measure curvature of a curve at a point.
10193         #  @param theCurve a curve.
10194         #  @param thePoint given point.
10195         #  @return radius of curvature of \a theCurve.
10196         #
10197         #  @ref swig_todo "Example"
10198         @ManageTransactions("MeasuOp")
10199         def CurveCurvatureByPoint(self, theCurve, thePoint):
10200             """
10201             Measure curvature of a curve at a point.
10202
10203             Parameters:
10204                 theCurve a curve.
10205                 thePoint given point.
10206
10207             Returns:
10208                 radius of curvature of theCurve.
10209             """
10210             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10211             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10212             return aCurv
10213         ## @}
10214
10215         ## @name Surface Curvature Measurement
10216         #  Methods for receiving max and min radius of curvature of surfaces
10217         #  in the given point
10218         ## @{
10219
10220         ## Measure max radius of curvature of surface.
10221         #  @param theSurf the given surface.
10222         #  @param theUParam Value of U-parameter on the referenced surface.
10223         #  @param theVParam Value of V-parameter on the referenced surface.
10224         #  @return max radius of curvature of theSurf.
10225         #
10226         ## @ref swig_todo "Example"
10227         @ManageTransactions("MeasuOp")
10228         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10229             """
10230             Measure max radius of curvature of surface.
10231
10232             Parameters:
10233                 theSurf the given surface.
10234                 theUParam Value of U-parameter on the referenced surface.
10235                 theVParam Value of V-parameter on the referenced surface.
10236
10237             Returns:
10238                 max radius of curvature of theSurf.
10239             """
10240             # Example: see GEOM_TestMeasures.py
10241             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10242             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10243             return aSurf
10244
10245         ## Measure max radius of curvature of surface in the given point
10246         #  @param theSurf the given surface.
10247         #  @param thePoint given point.
10248         #  @return max radius of curvature of theSurf.
10249         #
10250         ## @ref swig_todo "Example"
10251         @ManageTransactions("MeasuOp")
10252         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10253             """
10254             Measure max radius of curvature of surface in the given point.
10255
10256             Parameters:
10257                 theSurf the given surface.
10258                 thePoint given point.
10259
10260             Returns:
10261                 max radius of curvature of theSurf.
10262             """
10263             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10264             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10265             return aSurf
10266
10267         ## Measure min radius of curvature of surface.
10268         #  @param theSurf the given surface.
10269         #  @param theUParam Value of U-parameter on the referenced surface.
10270         #  @param theVParam Value of V-parameter on the referenced surface.
10271         #  @return min radius of curvature of theSurf.
10272         #
10273         ## @ref swig_todo "Example"
10274         @ManageTransactions("MeasuOp")
10275         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10276             """
10277             Measure min radius of curvature of surface.
10278
10279             Parameters:
10280                 theSurf the given surface.
10281                 theUParam Value of U-parameter on the referenced surface.
10282                 theVParam Value of V-parameter on the referenced surface.
10283
10284             Returns:
10285                 Min radius of curvature of theSurf.
10286             """
10287             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10288             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10289             return aSurf
10290
10291         ## Measure min radius of curvature of surface in the given point
10292         #  @param theSurf the given surface.
10293         #  @param thePoint given point.
10294         #  @return min radius of curvature of theSurf.
10295         #
10296         ## @ref swig_todo "Example"
10297         @ManageTransactions("MeasuOp")
10298         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10299             """
10300             Measure min radius of curvature of surface in the given point.
10301
10302             Parameters:
10303                 theSurf the given surface.
10304                 thePoint given point.
10305
10306             Returns:
10307                 Min radius of curvature of theSurf.
10308             """
10309             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10310             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10311             return aSurf
10312         ## @}
10313
10314         ## Get min and max tolerances of sub-shapes of theShape
10315         #  @param theShape Shape, to get tolerances of.
10316         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10317         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10318         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10319         #  VertMin,VertMax: Min and max tolerances of the vertices.
10320         #
10321         #  @ref tui_measurement_tools_page "Example"
10322         @ManageTransactions("MeasuOp")
10323         def Tolerance(self,theShape):
10324             """
10325             Get min and max tolerances of sub-shapes of theShape
10326
10327             Parameters:
10328                 theShape Shape, to get tolerances of.
10329
10330             Returns:
10331                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10332                  FaceMin,FaceMax: Min and max tolerances of the faces.
10333                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10334                  VertMin,VertMax: Min and max tolerances of the vertices.
10335             """
10336             # Example: see GEOM_TestMeasures.py
10337             aTuple = self.MeasuOp.GetTolerance(theShape)
10338             RaiseIfFailed("GetTolerance", self.MeasuOp)
10339             return aTuple
10340
10341         ## Obtain description of the given shape (number of sub-shapes of each type)
10342         #  @param theShape Shape to be described.
10343         #  @return Description of the given shape.
10344         #
10345         #  @ref tui_measurement_tools_page "Example"
10346         @ManageTransactions("MeasuOp")
10347         def WhatIs(self,theShape):
10348             """
10349             Obtain description of the given shape (number of sub-shapes of each type)
10350
10351             Parameters:
10352                 theShape Shape to be described.
10353
10354             Returns:
10355                 Description of the given shape.
10356             """
10357             # Example: see GEOM_TestMeasures.py
10358             aDescr = self.MeasuOp.WhatIs(theShape)
10359             RaiseIfFailed("WhatIs", self.MeasuOp)
10360             return aDescr
10361
10362         ## Obtain quantity of shapes of the given type in \a theShape.
10363         #  If \a theShape is of type \a theType, it is also counted.
10364         #  @param theShape Shape to be described.
10365         #  @param theType the given ShapeType().
10366         #  @return Quantity of shapes of type \a theType in \a theShape.
10367         #
10368         #  @ref tui_measurement_tools_page "Example"
10369         def NbShapes (self, theShape, theType):
10370             """
10371             Obtain quantity of shapes of the given type in theShape.
10372             If theShape is of type theType, it is also counted.
10373
10374             Parameters:
10375                 theShape Shape to be described.
10376                 theType the given geompy.ShapeType
10377
10378             Returns:
10379                 Quantity of shapes of type theType in theShape.
10380             """
10381             # Example: see GEOM_TestMeasures.py
10382             listSh = self.SubShapeAllIDs(theShape, theType)
10383             Nb = len(listSh)
10384             return Nb
10385
10386         ## Obtain quantity of shapes of each type in \a theShape.
10387         #  The \a theShape is also counted.
10388         #  @param theShape Shape to be described.
10389         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10390         #
10391         #  @ref tui_measurement_tools_page "Example"
10392         def ShapeInfo (self, theShape):
10393             """
10394             Obtain quantity of shapes of each type in theShape.
10395             The theShape is also counted.
10396
10397             Parameters:
10398                 theShape Shape to be described.
10399
10400             Returns:
10401                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10402             """
10403             # Example: see GEOM_TestMeasures.py
10404             aDict = {}
10405             for typeSh in self.ShapeType:
10406                 if typeSh in ( "AUTO", "SHAPE" ): continue
10407                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10408                 Nb = len(listSh)
10409                 aDict[typeSh] = Nb
10410                 pass
10411             return aDict
10412
10413         def GetCreationInformation(self, theShape):
10414             info = theShape.GetCreationInformation()
10415             # operationName
10416             opName = info.operationName
10417             if not opName: opName = "no info available"
10418             res = "Operation: " + opName
10419             # parameters
10420             for parVal in info.params:
10421                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10422             return res
10423
10424         ## Get a point, situated at the centre of mass of theShape.
10425         #  @param theShape Shape to define centre of mass of.
10426         #  @param theName Object name; when specified, this parameter is used
10427         #         for result publication in the study. Otherwise, if automatic
10428         #         publication is switched on, default value is used for result name.
10429         #
10430         #  @return New GEOM.GEOM_Object, containing the created point.
10431         #
10432         #  @ref tui_measurement_tools_page "Example"
10433         @ManageTransactions("MeasuOp")
10434         def MakeCDG(self, theShape, theName=None):
10435             """
10436             Get a point, situated at the centre of mass of theShape.
10437
10438             Parameters:
10439                 theShape Shape to define centre of mass of.
10440                 theName Object name; when specified, this parameter is used
10441                         for result publication in the study. Otherwise, if automatic
10442                         publication is switched on, default value is used for result name.
10443
10444             Returns:
10445                 New GEOM.GEOM_Object, containing the created point.
10446             """
10447             # Example: see GEOM_TestMeasures.py
10448             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10449             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10450             self._autoPublish(anObj, theName, "centerOfMass")
10451             return anObj
10452
10453         ## Get a vertex sub-shape by index depended with orientation.
10454         #  @param theShape Shape to find sub-shape.
10455         #  @param theIndex Index to find vertex by this index (starting from zero)
10456         #  @param theName Object name; when specified, this parameter is used
10457         #         for result publication in the study. Otherwise, if automatic
10458         #         publication is switched on, default value is used for result name.
10459         #
10460         #  @return New GEOM.GEOM_Object, containing the created vertex.
10461         #
10462         #  @ref tui_measurement_tools_page "Example"
10463         @ManageTransactions("MeasuOp")
10464         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10465             """
10466             Get a vertex sub-shape by index depended with orientation.
10467
10468             Parameters:
10469                 theShape Shape to find sub-shape.
10470                 theIndex Index to find vertex by this index (starting from zero)
10471                 theName Object name; when specified, this parameter is used
10472                         for result publication in the study. Otherwise, if automatic
10473                         publication is switched on, default value is used for result name.
10474
10475             Returns:
10476                 New GEOM.GEOM_Object, containing the created vertex.
10477             """
10478             # Example: see GEOM_TestMeasures.py
10479             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10480             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10481             self._autoPublish(anObj, theName, "vertex")
10482             return anObj
10483
10484         ## Get the first vertex of wire/edge depended orientation.
10485         #  @param theShape Shape to find first vertex.
10486         #  @param theName Object name; when specified, this parameter is used
10487         #         for result publication in the study. Otherwise, if automatic
10488         #         publication is switched on, default value is used for result name.
10489         #
10490         #  @return New GEOM.GEOM_Object, containing the created vertex.
10491         #
10492         #  @ref tui_measurement_tools_page "Example"
10493         def GetFirstVertex(self, theShape, theName=None):
10494             """
10495             Get the first vertex of wire/edge depended orientation.
10496
10497             Parameters:
10498                 theShape Shape to find first vertex.
10499                 theName Object name; when specified, this parameter is used
10500                         for result publication in the study. Otherwise, if automatic
10501                         publication is switched on, default value is used for result name.
10502
10503             Returns:
10504                 New GEOM.GEOM_Object, containing the created vertex.
10505             """
10506             # Example: see GEOM_TestMeasures.py
10507             # note: auto-publishing is done in self.GetVertexByIndex()
10508             return self.GetVertexByIndex(theShape, 0, theName)
10509
10510         ## Get the last vertex of wire/edge depended orientation.
10511         #  @param theShape Shape to find last vertex.
10512         #  @param theName Object name; when specified, this parameter is used
10513         #         for result publication in the study. Otherwise, if automatic
10514         #         publication is switched on, default value is used for result name.
10515         #
10516         #  @return New GEOM.GEOM_Object, containing the created vertex.
10517         #
10518         #  @ref tui_measurement_tools_page "Example"
10519         def GetLastVertex(self, theShape, theName=None):
10520             """
10521             Get the last vertex of wire/edge depended orientation.
10522
10523             Parameters:
10524                 theShape Shape to find last vertex.
10525                 theName Object name; when specified, this parameter is used
10526                         for result publication in the study. Otherwise, if automatic
10527                         publication is switched on, default value is used for result name.
10528
10529             Returns:
10530                 New GEOM.GEOM_Object, containing the created vertex.
10531             """
10532             # Example: see GEOM_TestMeasures.py
10533             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10534             # note: auto-publishing is done in self.GetVertexByIndex()
10535             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10536
10537         ## Get a normale to the given face. If the point is not given,
10538         #  the normale is calculated at the center of mass.
10539         #  @param theFace Face to define normale of.
10540         #  @param theOptionalPoint Point to compute the normale at.
10541         #  @param theName Object name; when specified, this parameter is used
10542         #         for result publication in the study. Otherwise, if automatic
10543         #         publication is switched on, default value is used for result name.
10544         #
10545         #  @return New GEOM.GEOM_Object, containing the created vector.
10546         #
10547         #  @ref swig_todo "Example"
10548         @ManageTransactions("MeasuOp")
10549         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10550             """
10551             Get a normale to the given face. If the point is not given,
10552             the normale is calculated at the center of mass.
10553
10554             Parameters:
10555                 theFace Face to define normale of.
10556                 theOptionalPoint Point to compute the normale at.
10557                 theName Object name; when specified, this parameter is used
10558                         for result publication in the study. Otherwise, if automatic
10559                         publication is switched on, default value is used for result name.
10560
10561             Returns:
10562                 New GEOM.GEOM_Object, containing the created vector.
10563             """
10564             # Example: see GEOM_TestMeasures.py
10565             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10566             RaiseIfFailed("GetNormal", self.MeasuOp)
10567             self._autoPublish(anObj, theName, "normal")
10568             return anObj
10569
10570         ## Print shape errors obtained from CheckShape.
10571         #  @param theShape Shape that was checked.
10572         #  @param theShapeErrors the shape errors obtained by CheckShape.
10573         #  @param theReturnStatus If 0 the description of problem is printed.
10574         #                         If 1 the description of problem is returned.
10575         #  @return If theReturnStatus is equal to 1 the description is returned.
10576         #          Otherwise doesn't return anything.
10577         #
10578         #  @ref tui_measurement_tools_page "Example"
10579         @ManageTransactions("MeasuOp")
10580         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10581             """
10582             Print shape errors obtained from CheckShape.
10583
10584             Parameters:
10585                 theShape Shape that was checked.
10586                 theShapeErrors the shape errors obtained by CheckShape.
10587                 theReturnStatus If 0 the description of problem is printed.
10588                                 If 1 the description of problem is returned.
10589
10590             Returns:
10591                 If theReturnStatus is equal to 1 the description is returned.
10592                   Otherwise doesn't return anything.
10593             """
10594             # Example: see GEOM_TestMeasures.py
10595             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10596             if theReturnStatus == 1:
10597                 return Descr
10598             print Descr
10599             pass
10600
10601         ## Check a topology of the given shape.
10602         #  @param theShape Shape to check validity of.
10603         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10604         #                        if TRUE, the shape's geometry will be checked also.
10605         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10606         #                         of problem is printed.
10607         #                         If 1 isValid flag and the description of
10608         #                         problem is returned.
10609         #                         If 2 isValid flag and the list of error data
10610         #                         is returned.
10611         #  @return TRUE, if the shape "seems to be valid".
10612         #          If theShape is invalid, prints a description of problem.
10613         #          If theReturnStatus is equal to 1 the description is returned
10614         #          along with IsValid flag.
10615         #          If theReturnStatus is equal to 2 the list of error data is
10616         #          returned along with IsValid flag.
10617         #
10618         #  @ref tui_measurement_tools_page "Example"
10619         @ManageTransactions("MeasuOp")
10620         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10621             """
10622             Check a topology of the given shape.
10623
10624             Parameters:
10625                 theShape Shape to check validity of.
10626                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10627                                if TRUE, the shape's geometry will be checked also.
10628                 theReturnStatus If 0 and if theShape is invalid, a description
10629                                 of problem is printed.
10630                                 If 1 IsValid flag and the description of
10631                                 problem is returned.
10632                                 If 2 IsValid flag and the list of error data
10633                                 is returned.
10634
10635             Returns:
10636                 TRUE, if the shape "seems to be valid".
10637                 If theShape is invalid, prints a description of problem.
10638                 If theReturnStatus is equal to 1 the description is returned
10639                 along with IsValid flag.
10640                 If theReturnStatus is equal to 2 the list of error data is
10641                 returned along with IsValid flag.
10642             """
10643             # Example: see GEOM_TestMeasures.py
10644             if theIsCheckGeom:
10645                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10646                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10647             else:
10648                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10649                 RaiseIfFailed("CheckShape", self.MeasuOp)
10650             if IsValid == 0:
10651                 if theReturnStatus == 0:
10652                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10653                     print Descr
10654             if theReturnStatus == 1:
10655               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10656               return (IsValid, Descr)
10657             elif theReturnStatus == 2:
10658               return (IsValid, ShapeErrors)
10659             return IsValid
10660
10661         ## Detect self-intersections in the given shape.
10662         #  @param theShape Shape to check.
10663         #  @param theCheckLevel is the level of self-intersection check.
10664         #         Possible input values are:
10665         #         - GEOM.SI_V_V(0) - only V/V interferences
10666         #         - GEOM.SI_V_E(1) - V/V and V/E interferences
10667         #         - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10668         #         - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10669         #         - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10670         #         - GEOM.SI_ALL(5) - all interferences.
10671         #  @return TRUE, if the shape contains no self-intersections.
10672         #
10673         #  @ref tui_measurement_tools_page "Example"
10674         @ManageTransactions("MeasuOp")
10675         def CheckSelfIntersections(self, theShape, theCheckLevel = GEOM.SI_ALL):
10676             """
10677             Detect self-intersections in the given shape.
10678
10679             Parameters:
10680                 theShape Shape to check.
10681                 theCheckLevel is the level of self-intersection check.
10682                   Possible input values are:
10683                    - GEOM.SI_V_V(0) - only V/V interferences
10684                    - GEOM.SI_V_E(1) - V/V and V/E interferences
10685                    - GEOM.SI_E_E(2) - V/V, V/E and E/E interferences
10686                    - GEOM.SI_V_F(3) - V/V, V/E, E/E and V/F interferences
10687                    - GEOM.SI_E_F(4) - V/V, V/E, E/E, V/F and E/F interferences
10688                    - GEOM.SI_ALL(5) - all interferences.
10689  
10690             Returns:
10691                 TRUE, if the shape contains no self-intersections.
10692             """
10693             # Example: see GEOM_TestMeasures.py
10694             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape, EnumToLong(theCheckLevel))
10695             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10696             return IsValid
10697
10698         ## Get position (LCS) of theShape.
10699         #
10700         #  Origin of the LCS is situated at the shape's center of mass.
10701         #  Axes of the LCS are obtained from shape's location or,
10702         #  if the shape is a planar face, from position of its plane.
10703         #
10704         #  @param theShape Shape to calculate position of.
10705         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10706         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10707         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10708         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10709         #
10710         #  @ref swig_todo "Example"
10711         @ManageTransactions("MeasuOp")
10712         def GetPosition(self,theShape):
10713             """
10714             Get position (LCS) of theShape.
10715             Origin of the LCS is situated at the shape's center of mass.
10716             Axes of the LCS are obtained from shape's location or,
10717             if the shape is a planar face, from position of its plane.
10718
10719             Parameters:
10720                 theShape Shape to calculate position of.
10721
10722             Returns:
10723                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10724                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10725                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10726                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10727             """
10728             # Example: see GEOM_TestMeasures.py
10729             aTuple = self.MeasuOp.GetPosition(theShape)
10730             RaiseIfFailed("GetPosition", self.MeasuOp)
10731             return aTuple
10732
10733         ## Get kind of theShape.
10734         #
10735         #  @param theShape Shape to get a kind of.
10736         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10737         #          and a list of parameters, describing the shape.
10738         #  @note  Concrete meaning of each value, returned via \a theIntegers
10739         #         or \a theDoubles list depends on the kind() of the shape.
10740         #
10741         #  @ref swig_todo "Example"
10742         @ManageTransactions("MeasuOp")
10743         def KindOfShape(self,theShape):
10744             """
10745             Get kind of theShape.
10746
10747             Parameters:
10748                 theShape Shape to get a kind of.
10749
10750             Returns:
10751                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10752                     and a list of parameters, describing the shape.
10753             Note:
10754                 Concrete meaning of each value, returned via theIntegers
10755                 or theDoubles list depends on the geompy.kind of the shape
10756             """
10757             # Example: see GEOM_TestMeasures.py
10758             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10759             RaiseIfFailed("KindOfShape", self.MeasuOp)
10760
10761             aKind  = aRoughTuple[0]
10762             anInts = aRoughTuple[1]
10763             aDbls  = aRoughTuple[2]
10764
10765             # Now there is no exception from this rule:
10766             aKindTuple = [aKind] + aDbls + anInts
10767
10768             # If they are we will regroup parameters for such kind of shape.
10769             # For example:
10770             #if aKind == kind.SOME_KIND:
10771             #    #  SOME_KIND     int int double int double double
10772             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10773
10774             return aKindTuple
10775
10776         ## Returns the string that describes if the shell is good for solid.
10777         #  This is a support method for MakeSolid.
10778         #
10779         #  @param theShell the shell to be checked.
10780         #  @return Returns a string that describes the shell validity for
10781         #          solid construction.
10782         @ManageTransactions("MeasuOp")
10783         def _IsGoodForSolid(self, theShell):
10784             """
10785             Returns the string that describes if the shell is good for solid.
10786             This is a support method for MakeSolid.
10787
10788             Parameter:
10789                 theShell the shell to be checked.
10790
10791             Returns:
10792                 Returns a string that describes the shell validity for
10793                 solid construction.
10794             """
10795             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
10796             return aDescr
10797
10798         # end of l2_measure
10799         ## @}
10800
10801         ## @addtogroup l2_import_export
10802         ## @{
10803
10804         ## Import a shape from the BREP, IGES, STEP or other file
10805         #  (depends on given format) with given name.
10806         #
10807         #  Note: this function is deprecated, it is kept for backward compatibility only
10808         #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10809         #
10810         #  @param theFileName The file, containing the shape.
10811         #  @param theFormatName Specify format for the file reading.
10812         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10813         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10814         #            format 'STEP_SCALE' is used instead of 'STEP',
10815         #            length unit will be set to 'meter' and result model will be scaled.
10816         #  @param theName Object name; when specified, this parameter is used
10817         #         for result publication in the study. Otherwise, if automatic
10818         #         publication is switched on, default value is used for result name.
10819         #
10820         #  @return New GEOM.GEOM_Object, containing the imported shape.
10821         #          If material names are imported it returns the list of
10822         #          objects. The first one is the imported object followed by
10823         #          material groups.
10824         #  @note Auto publishing is allowed for the shape itself. Imported
10825         #        material groups are not automatically published.
10826         #
10827         #  @ref swig_Import_Export "Example"
10828         @ManageTransactions("InsertOp")
10829         def ImportFile(self, theFileName, theFormatName, theName=None):
10830             """
10831             Import a shape from the BREP, IGES, STEP or other file
10832             (depends on given format) with given name.
10833
10834             Note: this function is deprecated, it is kept for backward compatibility only
10835             Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
10836
10837             Parameters: 
10838                 theFileName The file, containing the shape.
10839                 theFormatName Specify format for the file reading.
10840                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10841                     If format 'IGES_SCALE' is used instead of 'IGES' or
10842                        format 'STEP_SCALE' is used instead of 'STEP',
10843                        length unit will be set to 'meter' and result model will be scaled.
10844                 theName Object name; when specified, this parameter is used
10845                         for result publication in the study. Otherwise, if automatic
10846                         publication is switched on, default value is used for result name.
10847
10848             Returns:
10849                 New GEOM.GEOM_Object, containing the imported shape.
10850                 If material names are imported it returns the list of
10851                 objects. The first one is the imported object followed by
10852                 material groups.
10853             Note:
10854                 Auto publishing is allowed for the shape itself. Imported
10855                 material groups are not automatically published.
10856             """
10857             # Example: see GEOM_TestOthers.py
10858             print """
10859             WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
10860             where <FormatName> is a name of desirable format for importing.
10861             """
10862             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10863             RaiseIfFailed("ImportFile", self.InsertOp)
10864             aNbObj = len(aListObj)
10865             if aNbObj > 0:
10866                 self._autoPublish(aListObj[0], theName, "imported")
10867             if aNbObj == 1:
10868                 return aListObj[0]
10869             return aListObj
10870
10871         ## Deprecated analog of ImportFile()
10872         def Import(self, theFileName, theFormatName, theName=None):
10873             """
10874             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10875             """
10876             # note: auto-publishing is done in self.ImportFile()
10877             return self.ImportFile(theFileName, theFormatName, theName)
10878
10879         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10880         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10881         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10882         #  @param theStream The BRep binary stream.
10883         #  @param theName Object name; when specified, this parameter is used
10884         #         for result publication in the study. Otherwise, if automatic
10885         #         publication is switched on, default value is used for result name.
10886         #
10887         #  @return New GEOM_Object, containing the shape, read from theStream.
10888         #
10889         #  @ref swig_Import_Export "Example"
10890         @ManageTransactions("InsertOp")
10891         def RestoreShape (self, theStream, theName=None):
10892             """
10893             Read a shape from the binary stream, containing its bounding representation (BRep).
10894
10895             Note:
10896                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10897
10898             Parameters:
10899                 theStream The BRep binary stream.
10900                 theName Object name; when specified, this parameter is used
10901                         for result publication in the study. Otherwise, if automatic
10902                         publication is switched on, default value is used for result name.
10903
10904             Returns:
10905                 New GEOM_Object, containing the shape, read from theStream.
10906             """
10907             # Example: see GEOM_TestOthers.py
10908             anObj = self.InsertOp.RestoreShape(theStream)
10909             RaiseIfFailed("RestoreShape", self.InsertOp)
10910             self._autoPublish(anObj, theName, "restored")
10911             return anObj
10912
10913         ## Export the given shape into a file with given name.
10914         #
10915         #  Note: this function is deprecated, it is kept for backward compatibility only
10916         #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
10917         #
10918         #  @param theObject Shape to be stored in the file.
10919         #  @param theFileName Name of the file to store the given shape in.
10920         #  @param theFormatName Specify format for the shape storage.
10921         #         Available formats can be obtained with
10922         #         geompy.InsertOp.ExportTranslators()[0] method.
10923         #
10924         #  @ref swig_Import_Export "Example"
10925         @ManageTransactions("InsertOp")
10926         def Export(self, theObject, theFileName, theFormatName):
10927             """
10928             Export the given shape into a file with given name.
10929
10930             Note: this function is deprecated, it is kept for backward compatibility only
10931             Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
10932             
10933             Parameters: 
10934                 theObject Shape to be stored in the file.
10935                 theFileName Name of the file to store the given shape in.
10936                 theFormatName Specify format for the shape storage.
10937                               Available formats can be obtained with
10938                               geompy.InsertOp.ExportTranslators()[0] method.
10939             """
10940             # Example: see GEOM_TestOthers.py
10941             print """
10942             WARNING: Function Export is deprecated, use Export<FormatName> instead,
10943             where <FormatName> is a name of desirable format for exporting.
10944             """
10945             self.InsertOp.Export(theObject, theFileName, theFormatName)
10946             if self.InsertOp.IsDone() == 0:
10947                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10948                 pass
10949             pass
10950
10951         # end of l2_import_export
10952         ## @}
10953
10954         ## @addtogroup l3_blocks
10955         ## @{
10956
10957         ## Create a quadrangle face from four edges. Order of Edges is not
10958         #  important. It is  not necessary that edges share the same vertex.
10959         #  @param E1,E2,E3,E4 Edges for the face bound.
10960         #  @param theName Object name; when specified, this parameter is used
10961         #         for result publication in the study. Otherwise, if automatic
10962         #         publication is switched on, default value is used for result name.
10963         #
10964         #  @return New GEOM.GEOM_Object, containing the created face.
10965         #
10966         #  @ref tui_building_by_blocks_page "Example"
10967         @ManageTransactions("BlocksOp")
10968         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10969             """
10970             Create a quadrangle face from four edges. Order of Edges is not
10971             important. It is  not necessary that edges share the same vertex.
10972
10973             Parameters:
10974                 E1,E2,E3,E4 Edges for the face bound.
10975                 theName Object name; when specified, this parameter is used
10976                         for result publication in the study. Otherwise, if automatic
10977                         publication is switched on, default value is used for result name.
10978
10979             Returns:
10980                 New GEOM.GEOM_Object, containing the created face.
10981
10982             Example of usage:
10983                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10984             """
10985             # Example: see GEOM_Spanner.py
10986             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10987             RaiseIfFailed("MakeQuad", self.BlocksOp)
10988             self._autoPublish(anObj, theName, "quad")
10989             return anObj
10990
10991         ## Create a quadrangle face on two edges.
10992         #  The missing edges will be built by creating the shortest ones.
10993         #  @param E1,E2 Two opposite edges for the face.
10994         #  @param theName Object name; when specified, this parameter is used
10995         #         for result publication in the study. Otherwise, if automatic
10996         #         publication is switched on, default value is used for result name.
10997         #
10998         #  @return New GEOM.GEOM_Object, containing the created face.
10999         #
11000         #  @ref tui_building_by_blocks_page "Example"
11001         @ManageTransactions("BlocksOp")
11002         def MakeQuad2Edges(self, E1, E2, theName=None):
11003             """
11004             Create a quadrangle face on two edges.
11005             The missing edges will be built by creating the shortest ones.
11006
11007             Parameters:
11008                 E1,E2 Two opposite edges for the face.
11009                 theName Object name; when specified, this parameter is used
11010                         for result publication in the study. Otherwise, if automatic
11011                         publication is switched on, default value is used for result name.
11012
11013             Returns:
11014                 New GEOM.GEOM_Object, containing the created face.
11015
11016             Example of usage:
11017                 # create vertices
11018                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11019                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11020                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11021                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11022                 # create edges
11023                 edge1 = geompy.MakeEdge(p1, p2)
11024                 edge2 = geompy.MakeEdge(p3, p4)
11025                 # create a quadrangle face from two edges
11026                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
11027             """
11028             # Example: see GEOM_Spanner.py
11029             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
11030             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
11031             self._autoPublish(anObj, theName, "quad")
11032             return anObj
11033
11034         ## Create a quadrangle face with specified corners.
11035         #  The missing edges will be built by creating the shortest ones.
11036         #  @param V1,V2,V3,V4 Corner vertices for the face.
11037         #  @param theName Object name; when specified, this parameter is used
11038         #         for result publication in the study. Otherwise, if automatic
11039         #         publication is switched on, default value is used for result name.
11040         #
11041         #  @return New GEOM.GEOM_Object, containing the created face.
11042         #
11043         #  @ref tui_building_by_blocks_page "Example 1"
11044         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11045         @ManageTransactions("BlocksOp")
11046         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11047             """
11048             Create a quadrangle face with specified corners.
11049             The missing edges will be built by creating the shortest ones.
11050
11051             Parameters:
11052                 V1,V2,V3,V4 Corner vertices for the face.
11053                 theName Object name; when specified, this parameter is used
11054                         for result publication in the study. Otherwise, if automatic
11055                         publication is switched on, default value is used for result name.
11056
11057             Returns:
11058                 New GEOM.GEOM_Object, containing the created face.
11059
11060             Example of usage:
11061                 # create vertices
11062                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11063                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11064                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11065                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11066                 # create a quadrangle from four points in its corners
11067                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11068             """
11069             # Example: see GEOM_Spanner.py
11070             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11071             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11072             self._autoPublish(anObj, theName, "quad")
11073             return anObj
11074
11075         ## Create a hexahedral solid, bounded by the six given faces. Order of
11076         #  faces is not important. It is  not necessary that Faces share the same edge.
11077         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11078         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created solid.
11083         #
11084         #  @ref tui_building_by_blocks_page "Example 1"
11085         #  \n @ref swig_MakeHexa "Example 2"
11086         @ManageTransactions("BlocksOp")
11087         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11088             """
11089             Create a hexahedral solid, bounded by the six given faces. Order of
11090             faces is not important. It is  not necessary that Faces share the same edge.
11091
11092             Parameters:
11093                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11094                 theName Object name; when specified, this parameter is used
11095                         for result publication in the study. Otherwise, if automatic
11096                         publication is switched on, default value is used for result name.
11097
11098             Returns:
11099                 New GEOM.GEOM_Object, containing the created solid.
11100
11101             Example of usage:
11102                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11103             """
11104             # Example: see GEOM_Spanner.py
11105             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11106             RaiseIfFailed("MakeHexa", self.BlocksOp)
11107             self._autoPublish(anObj, theName, "hexa")
11108             return anObj
11109
11110         ## Create a hexahedral solid between two given faces.
11111         #  The missing faces will be built by creating the smallest ones.
11112         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11113         #  @param theName Object name; when specified, this parameter is used
11114         #         for result publication in the study. Otherwise, if automatic
11115         #         publication is switched on, default value is used for result name.
11116         #
11117         #  @return New GEOM.GEOM_Object, containing the created solid.
11118         #
11119         #  @ref tui_building_by_blocks_page "Example 1"
11120         #  \n @ref swig_MakeHexa2Faces "Example 2"
11121         @ManageTransactions("BlocksOp")
11122         def MakeHexa2Faces(self, F1, F2, theName=None):
11123             """
11124             Create a hexahedral solid between two given faces.
11125             The missing faces will be built by creating the smallest ones.
11126
11127             Parameters:
11128                 F1,F2 Two opposite faces for the hexahedral solid.
11129                 theName Object name; when specified, this parameter is used
11130                         for result publication in the study. Otherwise, if automatic
11131                         publication is switched on, default value is used for result name.
11132
11133             Returns:
11134                 New GEOM.GEOM_Object, containing the created solid.
11135
11136             Example of usage:
11137                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11138             """
11139             # Example: see GEOM_Spanner.py
11140             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11141             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11142             self._autoPublish(anObj, theName, "hexa")
11143             return anObj
11144
11145         # end of l3_blocks
11146         ## @}
11147
11148         ## @addtogroup l3_blocks_op
11149         ## @{
11150
11151         ## Get a vertex, found in the given shape by its coordinates.
11152         #  @param theShape Block or a compound of blocks.
11153         #  @param theX,theY,theZ Coordinates of the sought vertex.
11154         #  @param theEpsilon Maximum allowed distance between the resulting
11155         #                    vertex and point with the given coordinates.
11156         #  @param theName Object name; when specified, this parameter is used
11157         #         for result publication in the study. Otherwise, if automatic
11158         #         publication is switched on, default value is used for result name.
11159         #
11160         #  @return New GEOM.GEOM_Object, containing the found vertex.
11161         #
11162         #  @ref swig_GetPoint "Example"
11163         @ManageTransactions("BlocksOp")
11164         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11165             """
11166             Get a vertex, found in the given shape by its coordinates.
11167
11168             Parameters:
11169                 theShape Block or a compound of blocks.
11170                 theX,theY,theZ Coordinates of the sought vertex.
11171                 theEpsilon Maximum allowed distance between the resulting
11172                            vertex and point with the given coordinates.
11173                 theName Object name; when specified, this parameter is used
11174                         for result publication in the study. Otherwise, if automatic
11175                         publication is switched on, default value is used for result name.
11176
11177             Returns:
11178                 New GEOM.GEOM_Object, containing the found vertex.
11179
11180             Example of usage:
11181                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11182             """
11183             # Example: see GEOM_TestOthers.py
11184             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11185             RaiseIfFailed("GetPoint", self.BlocksOp)
11186             self._autoPublish(anObj, theName, "vertex")
11187             return anObj
11188
11189         ## Find a vertex of the given shape, which has minimal distance to the given point.
11190         #  @param theShape Any shape.
11191         #  @param thePoint Point, close to the desired vertex.
11192         #  @param theName Object name; when specified, this parameter is used
11193         #         for result publication in the study. Otherwise, if automatic
11194         #         publication is switched on, default value is used for result name.
11195         #
11196         #  @return New GEOM.GEOM_Object, containing the found vertex.
11197         #
11198         #  @ref swig_GetVertexNearPoint "Example"
11199         @ManageTransactions("BlocksOp")
11200         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11201             """
11202             Find a vertex of the given shape, which has minimal distance to the given point.
11203
11204             Parameters:
11205                 theShape Any shape.
11206                 thePoint Point, close to the desired vertex.
11207                 theName Object name; when specified, this parameter is used
11208                         for result publication in the study. Otherwise, if automatic
11209                         publication is switched on, default value is used for result name.
11210
11211             Returns:
11212                 New GEOM.GEOM_Object, containing the found vertex.
11213
11214             Example of usage:
11215                 pmidle = geompy.MakeVertex(50, 0, 50)
11216                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11217             """
11218             # Example: see GEOM_TestOthers.py
11219             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11220             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11221             self._autoPublish(anObj, theName, "vertex")
11222             return anObj
11223
11224         ## Get an edge, found in the given shape by two given vertices.
11225         #  @param theShape Block or a compound of blocks.
11226         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11227         #  @param theName Object name; when specified, this parameter is used
11228         #         for result publication in the study. Otherwise, if automatic
11229         #         publication is switched on, default value is used for result name.
11230         #
11231         #  @return New GEOM.GEOM_Object, containing the found edge.
11232         #
11233         #  @ref swig_GetEdge "Example"
11234         @ManageTransactions("BlocksOp")
11235         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11236             """
11237             Get an edge, found in the given shape by two given vertices.
11238
11239             Parameters:
11240                 theShape Block or a compound of blocks.
11241                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11242                 theName Object name; when specified, this parameter is used
11243                         for result publication in the study. Otherwise, if automatic
11244                         publication is switched on, default value is used for result name.
11245
11246             Returns:
11247                 New GEOM.GEOM_Object, containing the found edge.
11248             """
11249             # Example: see GEOM_Spanner.py
11250             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11251             RaiseIfFailed("GetEdge", self.BlocksOp)
11252             self._autoPublish(anObj, theName, "edge")
11253             return anObj
11254
11255         ## Find an edge of the given shape, which has minimal distance to the given point.
11256         #  @param theShape Block or a compound of blocks.
11257         #  @param thePoint Point, close to the desired edge.
11258         #  @param theName Object name; when specified, this parameter is used
11259         #         for result publication in the study. Otherwise, if automatic
11260         #         publication is switched on, default value is used for result name.
11261         #
11262         #  @return New GEOM.GEOM_Object, containing the found edge.
11263         #
11264         #  @ref swig_GetEdgeNearPoint "Example"
11265         @ManageTransactions("BlocksOp")
11266         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11267             """
11268             Find an edge of the given shape, which has minimal distance to the given point.
11269
11270             Parameters:
11271                 theShape Block or a compound of blocks.
11272                 thePoint Point, close to the desired edge.
11273                 theName Object name; when specified, this parameter is used
11274                         for result publication in the study. Otherwise, if automatic
11275                         publication is switched on, default value is used for result name.
11276
11277             Returns:
11278                 New GEOM.GEOM_Object, containing the found edge.
11279             """
11280             # Example: see GEOM_TestOthers.py
11281             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11282             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11283             self._autoPublish(anObj, theName, "edge")
11284             return anObj
11285
11286         ## Returns a face, found in the given shape by four given corner vertices.
11287         #  @param theShape Block or a compound of blocks.
11288         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11289         #  @param theName Object name; when specified, this parameter is used
11290         #         for result publication in the study. Otherwise, if automatic
11291         #         publication is switched on, default value is used for result name.
11292         #
11293         #  @return New GEOM.GEOM_Object, containing the found face.
11294         #
11295         #  @ref swig_todo "Example"
11296         @ManageTransactions("BlocksOp")
11297         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11298             """
11299             Returns a face, found in the given shape by four given corner vertices.
11300
11301             Parameters:
11302                 theShape Block or a compound of blocks.
11303                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11304                 theName Object name; when specified, this parameter is used
11305                         for result publication in the study. Otherwise, if automatic
11306                         publication is switched on, default value is used for result name.
11307
11308             Returns:
11309                 New GEOM.GEOM_Object, containing the found face.
11310             """
11311             # Example: see GEOM_Spanner.py
11312             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11313             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11314             self._autoPublish(anObj, theName, "face")
11315             return anObj
11316
11317         ## Get a face of block, found in the given shape by two given edges.
11318         #  @param theShape Block or a compound of blocks.
11319         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11320         #  @param theName Object name; when specified, this parameter is used
11321         #         for result publication in the study. Otherwise, if automatic
11322         #         publication is switched on, default value is used for result name.
11323         #
11324         #  @return New GEOM.GEOM_Object, containing the found face.
11325         #
11326         #  @ref swig_todo "Example"
11327         @ManageTransactions("BlocksOp")
11328         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11329             """
11330             Get a face of block, found in the given shape by two given edges.
11331
11332             Parameters:
11333                 theShape Block or a compound of blocks.
11334                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11335                 theName Object name; when specified, this parameter is used
11336                         for result publication in the study. Otherwise, if automatic
11337                         publication is switched on, default value is used for result name.
11338
11339             Returns:
11340                 New GEOM.GEOM_Object, containing the found face.
11341             """
11342             # Example: see GEOM_Spanner.py
11343             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11344             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11345             self._autoPublish(anObj, theName, "face")
11346             return anObj
11347
11348         ## Find a face, opposite to the given one in the given block.
11349         #  @param theBlock Must be a hexahedral solid.
11350         #  @param theFace Face of \a theBlock, opposite to the desired face.
11351         #  @param theName Object name; when specified, this parameter is used
11352         #         for result publication in the study. Otherwise, if automatic
11353         #         publication is switched on, default value is used for result name.
11354         #
11355         #  @return New GEOM.GEOM_Object, containing the found face.
11356         #
11357         #  @ref swig_GetOppositeFace "Example"
11358         @ManageTransactions("BlocksOp")
11359         def GetOppositeFace(self, theBlock, theFace, theName=None):
11360             """
11361             Find a face, opposite to the given one in the given block.
11362
11363             Parameters:
11364                 theBlock Must be a hexahedral solid.
11365                 theFace Face of theBlock, opposite to the desired face.
11366                 theName Object name; when specified, this parameter is used
11367                         for result publication in the study. Otherwise, if automatic
11368                         publication is switched on, default value is used for result name.
11369
11370             Returns:
11371                 New GEOM.GEOM_Object, containing the found face.
11372             """
11373             # Example: see GEOM_Spanner.py
11374             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11375             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11376             self._autoPublish(anObj, theName, "face")
11377             return anObj
11378
11379         ## Find a face of the given shape, which has minimal distance to the given point.
11380         #  @param theShape Block or a compound of blocks.
11381         #  @param thePoint Point, close to the desired face.
11382         #  @param theName Object name; when specified, this parameter is used
11383         #         for result publication in the study. Otherwise, if automatic
11384         #         publication is switched on, default value is used for result name.
11385         #
11386         #  @return New GEOM.GEOM_Object, containing the found face.
11387         #
11388         #  @ref swig_GetFaceNearPoint "Example"
11389         @ManageTransactions("BlocksOp")
11390         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11391             """
11392             Find a face of the given shape, which has minimal distance to the given point.
11393
11394             Parameters:
11395                 theShape Block or a compound of blocks.
11396                 thePoint Point, close to the desired face.
11397                 theName Object name; when specified, this parameter is used
11398                         for result publication in the study. Otherwise, if automatic
11399                         publication is switched on, default value is used for result name.
11400
11401             Returns:
11402                 New GEOM.GEOM_Object, containing the found face.
11403             """
11404             # Example: see GEOM_Spanner.py
11405             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11406             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11407             self._autoPublish(anObj, theName, "face")
11408             return anObj
11409
11410         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11411         #  @param theBlock Block or a compound of blocks.
11412         #  @param theVector Vector, close to the normale of the desired face.
11413         #  @param theName Object name; when specified, this parameter is used
11414         #         for result publication in the study. Otherwise, if automatic
11415         #         publication is switched on, default value is used for result name.
11416         #
11417         #  @return New GEOM.GEOM_Object, containing the found face.
11418         #
11419         #  @ref swig_todo "Example"
11420         @ManageTransactions("BlocksOp")
11421         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11422             """
11423             Find a face of block, whose outside normale has minimal angle with the given vector.
11424
11425             Parameters:
11426                 theBlock Block or a compound of blocks.
11427                 theVector Vector, close to the normale of the desired face.
11428                 theName Object name; when specified, this parameter is used
11429                         for result publication in the study. Otherwise, if automatic
11430                         publication is switched on, default value is used for result name.
11431
11432             Returns:
11433                 New GEOM.GEOM_Object, containing the found face.
11434             """
11435             # Example: see GEOM_Spanner.py
11436             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11437             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11438             self._autoPublish(anObj, theName, "face")
11439             return anObj
11440
11441         ## Find all sub-shapes of type \a theShapeType of the given shape,
11442         #  which have minimal distance to the given point.
11443         #  @param theShape Any shape.
11444         #  @param thePoint Point, close to the desired shape.
11445         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11446         #  @param theTolerance The tolerance for distances comparison. All shapes
11447         #                      with distances to the given point in interval
11448         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11449         #  @param theName Object name; when specified, this parameter is used
11450         #         for result publication in the study. Otherwise, if automatic
11451         #         publication is switched on, default value is used for result name.
11452         #
11453         #  @return New GEOM_Object, containing a group of all found shapes.
11454         #
11455         #  @ref swig_GetShapesNearPoint "Example"
11456         @ManageTransactions("BlocksOp")
11457         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11458             """
11459             Find all sub-shapes of type theShapeType of the given shape,
11460             which have minimal distance to the given point.
11461
11462             Parameters:
11463                 theShape Any shape.
11464                 thePoint Point, close to the desired shape.
11465                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11466                 theTolerance The tolerance for distances comparison. All shapes
11467                                 with distances to the given point in interval
11468                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11469                 theName Object name; when specified, this parameter is used
11470                         for result publication in the study. Otherwise, if automatic
11471                         publication is switched on, default value is used for result name.
11472
11473             Returns:
11474                 New GEOM_Object, containing a group of all found shapes.
11475             """
11476             # Example: see GEOM_TestOthers.py
11477             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11478             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11479             self._autoPublish(anObj, theName, "group")
11480             return anObj
11481
11482         # end of l3_blocks_op
11483         ## @}
11484
11485         ## @addtogroup l4_blocks_measure
11486         ## @{
11487
11488         ## Check, if the compound of blocks is given.
11489         #  To be considered as a compound of blocks, the
11490         #  given shape must satisfy the following conditions:
11491         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11492         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11493         #  - The compound should be connexe.
11494         #  - The glue between two quadrangle faces should be applied.
11495         #  @param theCompound The compound to check.
11496         #  @return TRUE, if the given shape is a compound of blocks.
11497         #  If theCompound is not valid, prints all discovered errors.
11498         #
11499         #  @ref tui_measurement_tools_page "Example 1"
11500         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11501         @ManageTransactions("BlocksOp")
11502         def CheckCompoundOfBlocks(self,theCompound):
11503             """
11504             Check, if the compound of blocks is given.
11505             To be considered as a compound of blocks, the
11506             given shape must satisfy the following conditions:
11507             - Each element of the compound should be a Block (6 faces and 12 edges).
11508             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11509             - The compound should be connexe.
11510             - The glue between two quadrangle faces should be applied.
11511
11512             Parameters:
11513                 theCompound The compound to check.
11514
11515             Returns:
11516                 TRUE, if the given shape is a compound of blocks.
11517                 If theCompound is not valid, prints all discovered errors.
11518             """
11519             # Example: see GEOM_Spanner.py
11520             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11521             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11522             if IsValid == 0:
11523                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11524                 print Descr
11525             return IsValid
11526
11527         ## Retrieve all non blocks solids and faces from \a theShape.
11528         #  @param theShape The shape to explore.
11529         #  @param theName Object name; when specified, this parameter is used
11530         #         for result publication in the study. Otherwise, if automatic
11531         #         publication is switched on, default value is used for result name.
11532         #
11533         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11534         #          non block solids (= not 6 faces, or with 6 faces, but with the
11535         #          presence of non-quadrangular faces). The second object is a
11536         #          group of all non quadrangular faces.
11537         #
11538         #  @ref tui_measurement_tools_page "Example 1"
11539         #  \n @ref swig_GetNonBlocks "Example 2"
11540         @ManageTransactions("BlocksOp")
11541         def GetNonBlocks (self, theShape, theName=None):
11542             """
11543             Retrieve all non blocks solids and faces from theShape.
11544
11545             Parameters:
11546                 theShape The shape to explore.
11547                 theName Object name; when specified, this parameter is used
11548                         for result publication in the study. Otherwise, if automatic
11549                         publication is switched on, default value is used for result name.
11550
11551             Returns:
11552                 A tuple of two GEOM_Objects. The first object is a group of all
11553                 non block solids (= not 6 faces, or with 6 faces, but with the
11554                 presence of non-quadrangular faces). The second object is a
11555                 group of all non quadrangular faces.
11556
11557             Usage:
11558                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11559             """
11560             # Example: see GEOM_Spanner.py
11561             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11562             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11563             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11564             return aTuple
11565
11566         ## Remove all seam and degenerated edges from \a theShape.
11567         #  Unite faces and edges, sharing one surface. It means that
11568         #  this faces must have references to one C++ surface object (handle).
11569         #  @param theShape The compound or single solid to remove irregular edges from.
11570         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11571         #         do not unite faces.
11572         #  @param theName Object name; when specified, this parameter is used
11573         #         for result publication in the study. Otherwise, if automatic
11574         #         publication is switched on, default value is used for result name.
11575         #
11576         #  @return Improved shape.
11577         #
11578         #  @ref swig_RemoveExtraEdges "Example"
11579         @ManageTransactions("BlocksOp")
11580         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11581             """
11582             Remove all seam and degenerated edges from theShape.
11583             Unite faces and edges, sharing one surface. It means that
11584             this faces must have references to one C++ surface object (handle).
11585
11586             Parameters:
11587                 theShape The compound or single solid to remove irregular edges from.
11588                 doUnionFaces If True, then unite faces. If False (the default value),
11589                              do not unite faces.
11590                 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             Returns:
11595                 Improved shape.
11596             """
11597             # Example: see GEOM_TestOthers.py
11598             nbFacesOptimum = -1 # -1 means do not unite faces
11599             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11600             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11601             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11602             self._autoPublish(anObj, theName, "removeExtraEdges")
11603             return anObj
11604
11605         ## Performs union faces of \a theShape
11606         #  Unite faces sharing one surface. It means that
11607         #  these faces must have references to one C++ surface object (handle).
11608         #  @param theShape The compound or single solid that contains faces
11609         #         to perform union.
11610         #  @param theName Object name; when specified, this parameter is used
11611         #         for result publication in the study. Otherwise, if automatic
11612         #         publication is switched on, default value is used for result name.
11613         #
11614         #  @return Improved shape.
11615         #
11616         #  @ref swig_UnionFaces "Example"
11617         @ManageTransactions("BlocksOp")
11618         def UnionFaces(self, theShape, theName=None):
11619             """
11620             Performs union faces of theShape.
11621             Unite faces sharing one surface. It means that
11622             these faces must have references to one C++ surface object (handle).
11623
11624             Parameters:
11625                 theShape The compound or single solid that contains faces
11626                          to perform union.
11627                 theName Object name; when specified, this parameter is used
11628                         for result publication in the study. Otherwise, if automatic
11629                         publication is switched on, default value is used for result name.
11630
11631             Returns:
11632                 Improved shape.
11633             """
11634             # Example: see GEOM_TestOthers.py
11635             anObj = self.BlocksOp.UnionFaces(theShape)
11636             RaiseIfFailed("UnionFaces", self.BlocksOp)
11637             self._autoPublish(anObj, theName, "unionFaces")
11638             return anObj
11639
11640         ## Check, if the given shape is a blocks compound.
11641         #  Fix all detected errors.
11642         #    \note Single block can be also fixed by this method.
11643         #  @param theShape The compound to check and improve.
11644         #  @param theName Object name; when specified, this parameter is used
11645         #         for result publication in the study. Otherwise, if automatic
11646         #         publication is switched on, default value is used for result name.
11647         #
11648         #  @return Improved compound.
11649         #
11650         #  @ref swig_CheckAndImprove "Example"
11651         @ManageTransactions("BlocksOp")
11652         def CheckAndImprove(self, theShape, theName=None):
11653             """
11654             Check, if the given shape is a blocks compound.
11655             Fix all detected errors.
11656
11657             Note:
11658                 Single block can be also fixed by this method.
11659
11660             Parameters:
11661                 theShape The compound to check and improve.
11662                 theName Object name; when specified, this parameter is used
11663                         for result publication in the study. Otherwise, if automatic
11664                         publication is switched on, default value is used for result name.
11665
11666             Returns:
11667                 Improved compound.
11668             """
11669             # Example: see GEOM_TestOthers.py
11670             anObj = self.BlocksOp.CheckAndImprove(theShape)
11671             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11672             self._autoPublish(anObj, theName, "improved")
11673             return anObj
11674
11675         # end of l4_blocks_measure
11676         ## @}
11677
11678         ## @addtogroup l3_blocks_op
11679         ## @{
11680
11681         ## Get all the blocks, contained in the given compound.
11682         #  @param theCompound The compound to explode.
11683         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11684         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11685         #  @param theName Object name; when specified, this parameter is used
11686         #         for result publication in the study. Otherwise, if automatic
11687         #         publication is switched on, default value is used for result name.
11688         #
11689         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11690         #
11691         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11692         #
11693         #  @ref tui_explode_on_blocks "Example 1"
11694         #  \n @ref swig_MakeBlockExplode "Example 2"
11695         @ManageTransactions("BlocksOp")
11696         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11697             """
11698             Get all the blocks, contained in the given compound.
11699
11700             Parameters:
11701                 theCompound The compound to explode.
11702                 theMinNbFaces If solid has lower number of faces, it is not a block.
11703                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11704                 theName Object name; when specified, this parameter is used
11705                         for result publication in the study. Otherwise, if automatic
11706                         publication is switched on, default value is used for result name.
11707
11708             Note:
11709                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11710
11711             Returns:
11712                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11713             """
11714             # Example: see GEOM_TestOthers.py
11715             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11716             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11717             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11718             for anObj in aList:
11719                 anObj.SetParameters(Parameters)
11720                 pass
11721             self._autoPublish(aList, theName, "block")
11722             return aList
11723
11724         ## Find block, containing the given point inside its volume or on boundary.
11725         #  @param theCompound Compound, to find block in.
11726         #  @param thePoint Point, close to the desired block. If the point lays on
11727         #         boundary between some blocks, we return block with nearest center.
11728         #  @param theName Object name; when specified, this parameter is used
11729         #         for result publication in the study. Otherwise, if automatic
11730         #         publication is switched on, default value is used for result name.
11731         #
11732         #  @return New GEOM.GEOM_Object, containing the found block.
11733         #
11734         #  @ref swig_todo "Example"
11735         @ManageTransactions("BlocksOp")
11736         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11737             """
11738             Find block, containing the given point inside its volume or on boundary.
11739
11740             Parameters:
11741                 theCompound Compound, to find block in.
11742                 thePoint Point, close to the desired block. If the point lays on
11743                          boundary between some blocks, we return block with nearest center.
11744                 theName Object name; when specified, this parameter is used
11745                         for result publication in the study. Otherwise, if automatic
11746                         publication is switched on, default value is used for result name.
11747
11748             Returns:
11749                 New GEOM.GEOM_Object, containing the found block.
11750             """
11751             # Example: see GEOM_Spanner.py
11752             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11753             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11754             self._autoPublish(anObj, theName, "block")
11755             return anObj
11756
11757         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11758         #  @param theCompound Compound, to find block in.
11759         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11760         #  @param theName Object name; when specified, this parameter is used
11761         #         for result publication in the study. Otherwise, if automatic
11762         #         publication is switched on, default value is used for result name.
11763         #
11764         #  @return New GEOM.GEOM_Object, containing the found block.
11765         #
11766         #  @ref swig_GetBlockByParts "Example"
11767         @ManageTransactions("BlocksOp")
11768         def GetBlockByParts(self, theCompound, theParts, theName=None):
11769             """
11770              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11771
11772              Parameters:
11773                 theCompound Compound, to find block in.
11774                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11775                 theName Object name; when specified, this parameter is used
11776                         for result publication in the study. Otherwise, if automatic
11777                         publication is switched on, default value is used for result name.
11778
11779             Returns:
11780                 New GEOM_Object, containing the found block.
11781             """
11782             # Example: see GEOM_TestOthers.py
11783             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11784             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11785             self._autoPublish(anObj, theName, "block")
11786             return anObj
11787
11788         ## Return all blocks, containing all the elements, passed as the parts.
11789         #  @param theCompound Compound, to find blocks in.
11790         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11791         #  @param 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         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11796         #
11797         #  @ref swig_todo "Example"
11798         @ManageTransactions("BlocksOp")
11799         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11800             """
11801             Return all blocks, containing all the elements, passed as the parts.
11802
11803             Parameters:
11804                 theCompound Compound, to find blocks in.
11805                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11806                 theName Object name; when specified, this parameter is used
11807                         for result publication in the study. Otherwise, if automatic
11808                         publication is switched on, default value is used for result name.
11809
11810             Returns:
11811                 List of GEOM.GEOM_Object, containing the found blocks.
11812             """
11813             # Example: see GEOM_Spanner.py
11814             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11815             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11816             self._autoPublish(aList, theName, "block")
11817             return aList
11818
11819         ## Multi-transformate block and glue the result.
11820         #  Transformation is defined so, as to superpose direction faces.
11821         #  @param Block Hexahedral solid to be multi-transformed.
11822         #  @param DirFace1 ID of First direction face.
11823         #  @param DirFace2 ID of Second direction face.
11824         #  @param NbTimes Quantity of transformations to be done.
11825         #  @param theName Object name; when specified, this parameter is used
11826         #         for result publication in the study. Otherwise, if automatic
11827         #         publication is switched on, default value is used for result name.
11828         #
11829         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11830         #
11831         #  @return New GEOM.GEOM_Object, containing the result shape.
11832         #
11833         #  @ref tui_multi_transformation "Example"
11834         @ManageTransactions("BlocksOp")
11835         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11836             """
11837             Multi-transformate block and glue the result.
11838             Transformation is defined so, as to superpose direction faces.
11839
11840             Parameters:
11841                 Block Hexahedral solid to be multi-transformed.
11842                 DirFace1 ID of First direction face.
11843                 DirFace2 ID of Second direction face.
11844                 NbTimes Quantity of transformations to be done.
11845                 theName Object name; when specified, this parameter is used
11846                         for result publication in the study. Otherwise, if automatic
11847                         publication is switched on, default value is used for result name.
11848
11849             Note:
11850                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11851
11852             Returns:
11853                 New GEOM.GEOM_Object, containing the result shape.
11854             """
11855             # Example: see GEOM_Spanner.py
11856             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11857             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11858             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11859             anObj.SetParameters(Parameters)
11860             self._autoPublish(anObj, theName, "transformed")
11861             return anObj
11862
11863         ## Multi-transformate block and glue the result.
11864         #  @param Block Hexahedral solid to be multi-transformed.
11865         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11866         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11867         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11868         #  @param theName Object name; when specified, this parameter is used
11869         #         for result publication in the study. Otherwise, if automatic
11870         #         publication is switched on, default value is used for result name.
11871         #
11872         #  @return New GEOM.GEOM_Object, containing the result shape.
11873         #
11874         #  @ref tui_multi_transformation "Example"
11875         @ManageTransactions("BlocksOp")
11876         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11877                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11878             """
11879             Multi-transformate block and glue the result.
11880
11881             Parameters:
11882                 Block Hexahedral solid to be multi-transformed.
11883                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11884                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11885                 NbTimesU,NbTimesV Quantity of transformations to be done.
11886                 theName Object name; when specified, this parameter is used
11887                         for result publication in the study. Otherwise, if automatic
11888                         publication is switched on, default value is used for result name.
11889
11890             Returns:
11891                 New GEOM.GEOM_Object, containing the result shape.
11892             """
11893             # Example: see GEOM_Spanner.py
11894             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11895               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11896             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11897                                                             DirFace1V, DirFace2V, NbTimesV)
11898             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11899             anObj.SetParameters(Parameters)
11900             self._autoPublish(anObj, theName, "transformed")
11901             return anObj
11902
11903         ## Build all possible propagation groups.
11904         #  Propagation group is a set of all edges, opposite to one (main)
11905         #  edge of this group directly or through other opposite edges.
11906         #  Notion of Opposite Edge make sence only on quadrangle face.
11907         #  @param theShape Shape to build propagation groups on.
11908         #  @param theName Object name; when specified, this parameter is used
11909         #         for result publication in the study. Otherwise, if automatic
11910         #         publication is switched on, default value is used for result name.
11911         #
11912         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11913         #
11914         #  @ref swig_Propagate "Example"
11915         @ManageTransactions("BlocksOp")
11916         def Propagate(self, theShape, theName=None):
11917             """
11918             Build all possible propagation groups.
11919             Propagation group is a set of all edges, opposite to one (main)
11920             edge of this group directly or through other opposite edges.
11921             Notion of Opposite Edge make sence only on quadrangle face.
11922
11923             Parameters:
11924                 theShape Shape to build propagation groups on.
11925                 theName Object name; when specified, this parameter is used
11926                         for result publication in the study. Otherwise, if automatic
11927                         publication is switched on, default value is used for result name.
11928
11929             Returns:
11930                 List of GEOM.GEOM_Object, each of them is a propagation group.
11931             """
11932             # Example: see GEOM_TestOthers.py
11933             listChains = self.BlocksOp.Propagate(theShape)
11934             RaiseIfFailed("Propagate", self.BlocksOp)
11935             self._autoPublish(listChains, theName, "propagate")
11936             return listChains
11937
11938         # end of l3_blocks_op
11939         ## @}
11940
11941         ## @addtogroup l3_groups
11942         ## @{
11943
11944         ## Creates a new group which will store sub-shapes of theMainShape
11945         #  @param theMainShape is a GEOM object on which the group is selected
11946         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11947         #  @param theName Object name; when specified, this parameter is used
11948         #         for result publication in the study. Otherwise, if automatic
11949         #         publication is switched on, default value is used for result name.
11950         #
11951         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11952         #
11953         #  @ref tui_working_with_groups_page "Example 1"
11954         #  \n @ref swig_CreateGroup "Example 2"
11955         @ManageTransactions("GroupOp")
11956         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11957             """
11958             Creates a new group which will store sub-shapes of theMainShape
11959
11960             Parameters:
11961                theMainShape is a GEOM object on which the group is selected
11962                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11963                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11964                 theName Object name; when specified, this parameter is used
11965                         for result publication in the study. Otherwise, if automatic
11966                         publication is switched on, default value is used for result name.
11967
11968             Returns:
11969                a newly created GEOM group
11970
11971             Example of usage:
11972                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11973
11974             """
11975             # Example: see GEOM_TestOthers.py
11976             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11977             RaiseIfFailed("CreateGroup", self.GroupOp)
11978             self._autoPublish(anObj, theName, "group")
11979             return anObj
11980
11981         ## Adds a sub-object with ID theSubShapeId to the group
11982         #  @param theGroup is a GEOM group to which the new sub-shape is added
11983         #  @param theSubShapeID is a sub-shape ID in the main object.
11984         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11985         #
11986         #  @ref tui_working_with_groups_page "Example"
11987         @ManageTransactions("GroupOp")
11988         def AddObject(self,theGroup, theSubShapeID):
11989             """
11990             Adds a sub-object with ID theSubShapeId to the group
11991
11992             Parameters:
11993                 theGroup       is a GEOM group to which the new sub-shape is added
11994                 theSubShapeID  is a sub-shape ID in the main object.
11995
11996             Note:
11997                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11998             """
11999             # Example: see GEOM_TestOthers.py
12000             self.GroupOp.AddObject(theGroup, theSubShapeID)
12001             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
12002                 RaiseIfFailed("AddObject", self.GroupOp)
12003                 pass
12004             pass
12005
12006         ## Removes a sub-object with ID \a theSubShapeId from the group
12007         #  @param theGroup is a GEOM group from which the new sub-shape is removed
12008         #  @param theSubShapeID is a sub-shape ID in the main object.
12009         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
12010         #
12011         #  @ref tui_working_with_groups_page "Example"
12012         @ManageTransactions("GroupOp")
12013         def RemoveObject(self,theGroup, theSubShapeID):
12014             """
12015             Removes a sub-object with ID theSubShapeId from the group
12016
12017             Parameters:
12018                 theGroup is a GEOM group from which the new sub-shape is removed
12019                 theSubShapeID is a sub-shape ID in the main object.
12020
12021             Note:
12022                 Use method GetSubShapeID() to get an unique ID of the sub-shape
12023             """
12024             # Example: see GEOM_TestOthers.py
12025             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
12026             RaiseIfFailed("RemoveObject", self.GroupOp)
12027             pass
12028
12029         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12030         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12031         #  @param theSubShapes is a list of sub-shapes to be added.
12032         #
12033         #  @ref tui_working_with_groups_page "Example"
12034         @ManageTransactions("GroupOp")
12035         def UnionList (self,theGroup, theSubShapes):
12036             """
12037             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12038
12039             Parameters:
12040                 theGroup is a GEOM group to which the new sub-shapes are added.
12041                 theSubShapes is a list of sub-shapes to be added.
12042             """
12043             # Example: see GEOM_TestOthers.py
12044             self.GroupOp.UnionList(theGroup, theSubShapes)
12045             RaiseIfFailed("UnionList", self.GroupOp)
12046             pass
12047
12048         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12049         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12050         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12051         #
12052         #  @ref swig_UnionIDs "Example"
12053         @ManageTransactions("GroupOp")
12054         def UnionIDs(self,theGroup, theSubShapes):
12055             """
12056             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12057
12058             Parameters:
12059                 theGroup is a GEOM group to which the new sub-shapes are added.
12060                 theSubShapes is a list of indices of sub-shapes to be added.
12061             """
12062             # Example: see GEOM_TestOthers.py
12063             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12064             RaiseIfFailed("UnionIDs", self.GroupOp)
12065             pass
12066
12067         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12068         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12069         #  @param theSubShapes is a list of sub-shapes to be removed.
12070         #
12071         #  @ref tui_working_with_groups_page "Example"
12072         @ManageTransactions("GroupOp")
12073         def DifferenceList (self,theGroup, theSubShapes):
12074             """
12075             Removes from the group all the given shapes. No errors, if some shapes are not included.
12076
12077             Parameters:
12078                 theGroup is a GEOM group from which the sub-shapes are removed.
12079                 theSubShapes is a list of sub-shapes to be removed.
12080             """
12081             # Example: see GEOM_TestOthers.py
12082             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12083             RaiseIfFailed("DifferenceList", self.GroupOp)
12084             pass
12085
12086         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12087         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12088         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12089         #
12090         #  @ref swig_DifferenceIDs "Example"
12091         @ManageTransactions("GroupOp")
12092         def DifferenceIDs(self,theGroup, theSubShapes):
12093             """
12094             Removes from the group all the given shapes. No errors, if some shapes are not included.
12095
12096             Parameters:
12097                 theGroup is a GEOM group from which the sub-shapes are removed.
12098                 theSubShapes is a list of indices of sub-shapes to be removed.
12099             """
12100             # Example: see GEOM_TestOthers.py
12101             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12102             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12103             pass
12104
12105         ## Union of two groups.
12106         #  New group is created. It will contain all entities
12107         #  which are present in groups theGroup1 and theGroup2.
12108         #  @param theGroup1, theGroup2 are the initial GEOM groups
12109         #                              to create the united group from.
12110         #  @param theName Object name; when specified, this parameter is used
12111         #         for result publication in the study. Otherwise, if automatic
12112         #         publication is switched on, default value is used for result name.
12113         #
12114         #  @return a newly created GEOM group.
12115         #
12116         #  @ref tui_union_groups_anchor "Example"
12117         @ManageTransactions("GroupOp")
12118         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12119             """
12120             Union of two groups.
12121             New group is created. It will contain all entities
12122             which are present in groups theGroup1 and theGroup2.
12123
12124             Parameters:
12125                 theGroup1, theGroup2 are the initial GEOM groups
12126                                      to create the united group from.
12127                 theName Object name; when specified, this parameter is used
12128                         for result publication in the study. Otherwise, if automatic
12129                         publication is switched on, default value is used for result name.
12130
12131             Returns:
12132                 a newly created GEOM group.
12133             """
12134             # Example: see GEOM_TestOthers.py
12135             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12136             RaiseIfFailed("UnionGroups", self.GroupOp)
12137             self._autoPublish(aGroup, theName, "group")
12138             return aGroup
12139
12140         ## Intersection of two groups.
12141         #  New group is created. It will contain only those entities
12142         #  which are present in both groups theGroup1 and theGroup2.
12143         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12144         #  @param theName Object name; when specified, this parameter is used
12145         #         for result publication in the study. Otherwise, if automatic
12146         #         publication is switched on, default value is used for result name.
12147         #
12148         #  @return a newly created GEOM group.
12149         #
12150         #  @ref tui_intersect_groups_anchor "Example"
12151         @ManageTransactions("GroupOp")
12152         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12153             """
12154             Intersection of two groups.
12155             New group is created. It will contain only those entities
12156             which are present in both groups theGroup1 and theGroup2.
12157
12158             Parameters:
12159                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12160                 theName Object name; when specified, this parameter is used
12161                         for result publication in the study. Otherwise, if automatic
12162                         publication is switched on, default value is used for result name.
12163
12164             Returns:
12165                 a newly created GEOM group.
12166             """
12167             # Example: see GEOM_TestOthers.py
12168             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12169             RaiseIfFailed("IntersectGroups", self.GroupOp)
12170             self._autoPublish(aGroup, theName, "group")
12171             return aGroup
12172
12173         ## Cut of two groups.
12174         #  New group is created. It will contain entities which are
12175         #  present in group theGroup1 but are not present in group theGroup2.
12176         #  @param theGroup1 is a GEOM group to include elements of.
12177         #  @param theGroup2 is a GEOM group to exclude elements of.
12178         #  @param theName Object name; when specified, this parameter is used
12179         #         for result publication in the study. Otherwise, if automatic
12180         #         publication is switched on, default value is used for result name.
12181         #
12182         #  @return a newly created GEOM group.
12183         #
12184         #  @ref tui_cut_groups_anchor "Example"
12185         @ManageTransactions("GroupOp")
12186         def CutGroups (self, theGroup1, theGroup2, theName=None):
12187             """
12188             Cut of two groups.
12189             New group is created. It will contain entities which are
12190             present in group theGroup1 but are not present in group theGroup2.
12191
12192             Parameters:
12193                 theGroup1 is a GEOM group to include elements of.
12194                 theGroup2 is a GEOM group to exclude elements of.
12195                 theName Object name; when specified, this parameter is used
12196                         for result publication in the study. Otherwise, if automatic
12197                         publication is switched on, default value is used for result name.
12198
12199             Returns:
12200                 a newly created GEOM group.
12201             """
12202             # Example: see GEOM_TestOthers.py
12203             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12204             RaiseIfFailed("CutGroups", self.GroupOp)
12205             self._autoPublish(aGroup, theName, "group")
12206             return aGroup
12207
12208         ## Union of list of groups.
12209         #  New group is created. It will contain all entities that are
12210         #  present in groups listed in theGList.
12211         #  @param theGList is a list of GEOM groups to create the united group from.
12212         #  @param theName Object name; when specified, this parameter is used
12213         #         for result publication in the study. Otherwise, if automatic
12214         #         publication is switched on, default value is used for result name.
12215         #
12216         #  @return a newly created GEOM group.
12217         #
12218         #  @ref tui_union_groups_anchor "Example"
12219         @ManageTransactions("GroupOp")
12220         def UnionListOfGroups (self, theGList, theName=None):
12221             """
12222             Union of list of groups.
12223             New group is created. It will contain all entities that are
12224             present in groups listed in theGList.
12225
12226             Parameters:
12227                 theGList is a list of GEOM groups to create the united group from.
12228                 theName Object name; when specified, this parameter is used
12229                         for result publication in the study. Otherwise, if automatic
12230                         publication is switched on, default value is used for result name.
12231
12232             Returns:
12233                 a newly created GEOM group.
12234             """
12235             # Example: see GEOM_TestOthers.py
12236             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12237             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12238             self._autoPublish(aGroup, theName, "group")
12239             return aGroup
12240
12241         ## Cut of lists of groups.
12242         #  New group is created. It will contain only entities
12243         #  which are present in groups listed in theGList.
12244         #  @param theGList is a list of GEOM groups to include elements of.
12245         #  @param theName Object name; when specified, this parameter is used
12246         #         for result publication in the study. Otherwise, if automatic
12247         #         publication is switched on, default value is used for result name.
12248         #
12249         #  @return a newly created GEOM group.
12250         #
12251         #  @ref tui_intersect_groups_anchor "Example"
12252         @ManageTransactions("GroupOp")
12253         def IntersectListOfGroups (self, theGList, theName=None):
12254             """
12255             Cut of lists of groups.
12256             New group is created. It will contain only entities
12257             which are present in groups listed in theGList.
12258
12259             Parameters:
12260                 theGList is a list of GEOM groups to include elements of.
12261                 theName Object name; when specified, this parameter is used
12262                         for result publication in the study. Otherwise, if automatic
12263                         publication is switched on, default value is used for result name.
12264
12265             Returns:
12266                 a newly created GEOM group.
12267             """
12268             # Example: see GEOM_TestOthers.py
12269             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12270             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12271             self._autoPublish(aGroup, theName, "group")
12272             return aGroup
12273
12274         ## Cut of lists of groups.
12275         #  New group is created. It will contain only entities
12276         #  which are present in groups listed in theGList1 but
12277         #  are not present in groups from theGList2.
12278         #  @param theGList1 is a list of GEOM groups to include elements of.
12279         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12280         #  @param theName Object name; when specified, this parameter is used
12281         #         for result publication in the study. Otherwise, if automatic
12282         #         publication is switched on, default value is used for result name.
12283         #
12284         #  @return a newly created GEOM group.
12285         #
12286         #  @ref tui_cut_groups_anchor "Example"
12287         @ManageTransactions("GroupOp")
12288         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12289             """
12290             Cut of lists of groups.
12291             New group is created. It will contain only entities
12292             which are present in groups listed in theGList1 but
12293             are not present in groups from theGList2.
12294
12295             Parameters:
12296                 theGList1 is a list of GEOM groups to include elements of.
12297                 theGList2 is a list of GEOM groups to exclude elements of.
12298                 theName Object name; when specified, this parameter is used
12299                         for result publication in the study. Otherwise, if automatic
12300                         publication is switched on, default value is used for result name.
12301
12302             Returns:
12303                 a newly created GEOM group.
12304             """
12305             # Example: see GEOM_TestOthers.py
12306             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12307             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12308             self._autoPublish(aGroup, theName, "group")
12309             return aGroup
12310
12311         ## Returns a list of sub-objects ID stored in the group
12312         #  @param theGroup is a GEOM group for which a list of IDs is requested
12313         #
12314         #  @ref swig_GetObjectIDs "Example"
12315         @ManageTransactions("GroupOp")
12316         def GetObjectIDs(self,theGroup):
12317             """
12318             Returns a list of sub-objects ID stored in the group
12319
12320             Parameters:
12321                 theGroup is a GEOM group for which a list of IDs is requested
12322             """
12323             # Example: see GEOM_TestOthers.py
12324             ListIDs = self.GroupOp.GetObjects(theGroup)
12325             RaiseIfFailed("GetObjects", self.GroupOp)
12326             return ListIDs
12327
12328         ## Returns a type of sub-objects stored in the group
12329         #  @param theGroup is a GEOM group which type is returned.
12330         #
12331         #  @ref swig_GetType "Example"
12332         @ManageTransactions("GroupOp")
12333         def GetType(self,theGroup):
12334             """
12335             Returns a type of sub-objects stored in the group
12336
12337             Parameters:
12338                 theGroup is a GEOM group which type is returned.
12339             """
12340             # Example: see GEOM_TestOthers.py
12341             aType = self.GroupOp.GetType(theGroup)
12342             RaiseIfFailed("GetType", self.GroupOp)
12343             return aType
12344
12345         ## Convert a type of geom object from id to string value
12346         #  @param theId is a GEOM obect type id.
12347         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12348         #  @ref swig_GetType "Example"
12349         def ShapeIdToType(self, theId):
12350             """
12351             Convert a type of geom object from id to string value
12352
12353             Parameters:
12354                 theId is a GEOM obect type id.
12355
12356             Returns:
12357                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12358             """
12359             if theId == 0:
12360                 return "COPY"
12361             if theId == 1:
12362                 return "IMPORT"
12363             if theId == 2:
12364                 return "POINT"
12365             if theId == 3:
12366                 return "VECTOR"
12367             if theId == 4:
12368                 return "PLANE"
12369             if theId == 5:
12370                 return "LINE"
12371             if theId == 6:
12372                 return "TORUS"
12373             if theId == 7:
12374                 return "BOX"
12375             if theId == 8:
12376                 return "CYLINDER"
12377             if theId == 9:
12378                 return "CONE"
12379             if theId == 10:
12380                 return "SPHERE"
12381             if theId == 11:
12382                 return "PRISM"
12383             if theId == 12:
12384                 return "REVOLUTION"
12385             if theId == 13:
12386                 return "BOOLEAN"
12387             if theId == 14:
12388                 return "PARTITION"
12389             if theId == 15:
12390                 return "POLYLINE"
12391             if theId == 16:
12392                 return "CIRCLE"
12393             if theId == 17:
12394                 return "SPLINE"
12395             if theId == 18:
12396                 return "ELLIPSE"
12397             if theId == 19:
12398                 return "CIRC_ARC"
12399             if theId == 20:
12400                 return "FILLET"
12401             if theId == 21:
12402                 return "CHAMFER"
12403             if theId == 22:
12404                 return "EDGE"
12405             if theId == 23:
12406                 return "WIRE"
12407             if theId == 24:
12408                 return "FACE"
12409             if theId == 25:
12410                 return "SHELL"
12411             if theId == 26:
12412                 return "SOLID"
12413             if theId == 27:
12414                 return "COMPOUND"
12415             if theId == 28:
12416                 return "SUBSHAPE"
12417             if theId == 29:
12418                 return "PIPE"
12419             if theId == 30:
12420                 return "ARCHIMEDE"
12421             if theId == 31:
12422                 return "FILLING"
12423             if theId == 32:
12424                 return "EXPLODE"
12425             if theId == 33:
12426                 return "GLUED"
12427             if theId == 34:
12428                 return "SKETCHER"
12429             if theId == 35:
12430                 return "CDG"
12431             if theId == 36:
12432                 return "FREE_BOUNDS"
12433             if theId == 37:
12434                 return "GROUP"
12435             if theId == 38:
12436                 return "BLOCK"
12437             if theId == 39:
12438                 return "MARKER"
12439             if theId == 40:
12440                 return "THRUSECTIONS"
12441             if theId == 41:
12442                 return "COMPOUNDFILTER"
12443             if theId == 42:
12444                 return "SHAPES_ON_SHAPE"
12445             if theId == 43:
12446                 return "ELLIPSE_ARC"
12447             if theId == 44:
12448                 return "3DSKETCHER"
12449             if theId == 45:
12450                 return "FILLET_2D"
12451             if theId == 46:
12452                 return "FILLET_1D"
12453             if theId == 201:
12454                 return "PIPETSHAPE"
12455             return "Shape Id not exist."
12456
12457         ## Returns a main shape associated with the group
12458         #  @param theGroup is a GEOM group for which a main shape object is requested
12459         #  @return a GEOM object which is a main shape for theGroup
12460         #
12461         #  @ref swig_GetMainShape "Example"
12462         @ManageTransactions("GroupOp")
12463         def GetMainShape(self,theGroup):
12464             """
12465             Returns a main shape associated with the group
12466
12467             Parameters:
12468                 theGroup is a GEOM group for which a main shape object is requested
12469
12470             Returns:
12471                 a GEOM object which is a main shape for theGroup
12472
12473             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12474             """
12475             # Example: see GEOM_TestOthers.py
12476             anObj = self.GroupOp.GetMainShape(theGroup)
12477             RaiseIfFailed("GetMainShape", self.GroupOp)
12478             return anObj
12479
12480         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12481         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12482         #  @param theShape given shape (see GEOM.GEOM_Object)
12483         #  @param min_length minimum length of edges of theShape
12484         #  @param max_length maximum length of edges of theShape
12485         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12486         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12487         #  @param theName Object name; when specified, this parameter is used
12488         #         for result publication in the study. Otherwise, if automatic
12489         #         publication is switched on, default value is used for result name.
12490         #
12491         #  @return a newly created GEOM group of edges
12492         #
12493         #  @@ref swig_todo "Example"
12494         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12495             """
12496             Create group of edges of theShape, whose length is in range [min_length, max_length].
12497             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12498
12499             Parameters:
12500                 theShape given shape
12501                 min_length minimum length of edges of theShape
12502                 max_length maximum length of edges of theShape
12503                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12504                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12505                 theName Object name; when specified, this parameter is used
12506                         for result publication in the study. Otherwise, if automatic
12507                         publication is switched on, default value is used for result name.
12508
12509              Returns:
12510                 a newly created GEOM group of edges.
12511             """
12512             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12513             edges_in_range = []
12514             for edge in edges:
12515                 Props = self.BasicProperties(edge)
12516                 if min_length <= Props[0] and Props[0] <= max_length:
12517                     if (not include_min) and (min_length == Props[0]):
12518                         skip = 1
12519                     else:
12520                         if (not include_max) and (Props[0] == max_length):
12521                             skip = 1
12522                         else:
12523                             edges_in_range.append(edge)
12524
12525             if len(edges_in_range) <= 0:
12526                 print "No edges found by given criteria"
12527                 return None
12528
12529             # note: auto-publishing is done in self.CreateGroup()
12530             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12531             self.UnionList(group_edges, edges_in_range)
12532
12533             return group_edges
12534
12535         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12536         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12537         #  @param min_length minimum length of edges of selected shape
12538         #  @param max_length maximum length of edges of selected shape
12539         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12540         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12541         #  @return a newly created GEOM group of edges
12542         #  @ref swig_todo "Example"
12543         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12544             """
12545             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12546             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12547
12548             Parameters:
12549                 min_length minimum length of edges of selected shape
12550                 max_length maximum length of edges of selected shape
12551                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12552                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12553
12554              Returns:
12555                 a newly created GEOM group of edges.
12556             """
12557             nb_selected = sg.SelectedCount()
12558             if nb_selected < 1:
12559                 print "Select a shape before calling this function, please."
12560                 return 0
12561             if nb_selected > 1:
12562                 print "Only one shape must be selected"
12563                 return 0
12564
12565             id_shape = sg.getSelected(0)
12566             shape = IDToObject( id_shape )
12567
12568             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12569
12570             left_str  = " < "
12571             right_str = " < "
12572             if include_min: left_str  = " <= "
12573             if include_max: right_str  = " <= "
12574
12575             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12576                                     + left_str + "length" + right_str + `max_length`)
12577
12578             sg.updateObjBrowser(1)
12579
12580             return group_edges
12581
12582         # end of l3_groups
12583         ## @}
12584
12585         #@@ insert new functions before this line @@ do not remove this line @@#
12586
12587         ## Create a copy of the given object
12588         #
12589         #  @param theOriginal geometry object for copy
12590         #  @param theName Object name; when specified, this parameter is used
12591         #         for result publication in the study. Otherwise, if automatic
12592         #         publication is switched on, default value is used for result name.
12593         #
12594         #  @return New GEOM_Object, containing the copied shape.
12595         #
12596         #  @ingroup l1_geomBuilder_auxiliary
12597         #  @ref swig_MakeCopy "Example"
12598         @ManageTransactions("InsertOp")
12599         def MakeCopy(self, theOriginal, theName=None):
12600             """
12601             Create a copy of the given object
12602
12603             Parameters:
12604                 theOriginal geometry object for copy
12605                 theName Object name; when specified, this parameter is used
12606                         for result publication in the study. Otherwise, if automatic
12607                         publication is switched on, default value is used for result name.
12608
12609             Returns:
12610                 New GEOM_Object, containing the copied shape.
12611
12612             Example of usage: Copy = geompy.MakeCopy(Box)
12613             """
12614             # Example: see GEOM_TestAll.py
12615             anObj = self.InsertOp.MakeCopy(theOriginal)
12616             RaiseIfFailed("MakeCopy", self.InsertOp)
12617             self._autoPublish(anObj, theName, "copy")
12618             return anObj
12619
12620         ## Add Path to load python scripts from
12621         #  @param Path a path to load python scripts from
12622         #  @ingroup l1_geomBuilder_auxiliary
12623         def addPath(self,Path):
12624             """
12625             Add Path to load python scripts from
12626
12627             Parameters:
12628                 Path a path to load python scripts from
12629             """
12630             if (sys.path.count(Path) < 1):
12631                 sys.path.append(Path)
12632                 pass
12633             pass
12634
12635         ## Load marker texture from the file
12636         #  @param Path a path to the texture file
12637         #  @return unique texture identifier
12638         #  @ingroup l1_geomBuilder_auxiliary
12639         @ManageTransactions("InsertOp")
12640         def LoadTexture(self, Path):
12641             """
12642             Load marker texture from the file
12643
12644             Parameters:
12645                 Path a path to the texture file
12646
12647             Returns:
12648                 unique texture identifier
12649             """
12650             # Example: see GEOM_TestAll.py
12651             ID = self.InsertOp.LoadTexture(Path)
12652             RaiseIfFailed("LoadTexture", self.InsertOp)
12653             return ID
12654
12655         ## Get internal name of the object based on its study entry
12656         #  @note This method does not provide an unique identifier of the geometry object.
12657         #  @note This is internal function of GEOM component, though it can be used outside it for
12658         #  appropriate reason (e.g. for identification of geometry object).
12659         #  @param obj geometry object
12660         #  @return unique object identifier
12661         #  @ingroup l1_geomBuilder_auxiliary
12662         def getObjectID(self, obj):
12663             """
12664             Get internal name of the object based on its study entry.
12665             Note: this method does not provide an unique identifier of the geometry object.
12666             It is an internal function of GEOM component, though it can be used outside GEOM for
12667             appropriate reason (e.g. for identification of geometry object).
12668
12669             Parameters:
12670                 obj geometry object
12671
12672             Returns:
12673                 unique object identifier
12674             """
12675             ID = ""
12676             entry = salome.ObjectToID(obj)
12677             if entry is not None:
12678                 lst = entry.split(":")
12679                 if len(lst) > 0:
12680                     ID = lst[-1] # -1 means last item in the list
12681                     return "GEOM_" + ID
12682             return ID
12683
12684
12685
12686         ## Add marker texture. @a Width and @a Height parameters
12687         #  specify width and height of the texture in pixels.
12688         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12689         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12690         #  parameter should be unpacked string, in which '1' symbols represent opaque
12691         #  pixels and '0' represent transparent pixels of the texture bitmap.
12692         #
12693         #  @param Width texture width in pixels
12694         #  @param Height texture height in pixels
12695         #  @param Texture texture data
12696         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12697         #  @return unique texture identifier
12698         #  @ingroup l1_geomBuilder_auxiliary
12699         @ManageTransactions("InsertOp")
12700         def AddTexture(self, Width, Height, Texture, RowData=False):
12701             """
12702             Add marker texture. Width and Height parameters
12703             specify width and height of the texture in pixels.
12704             If RowData is True, Texture parameter should represent texture data
12705             packed into the byte array. If RowData is False (default), Texture
12706             parameter should be unpacked string, in which '1' symbols represent opaque
12707             pixels and '0' represent transparent pixels of the texture bitmap.
12708
12709             Parameters:
12710                 Width texture width in pixels
12711                 Height texture height in pixels
12712                 Texture texture data
12713                 RowData if True, Texture data are packed in the byte stream
12714
12715             Returns:
12716                 return unique texture identifier
12717             """
12718             if not RowData: Texture = PackData(Texture)
12719             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12720             RaiseIfFailed("AddTexture", self.InsertOp)
12721             return ID
12722
12723         ## Creates a new folder object. It is a container for any GEOM objects.
12724         #  @param Name name of the container
12725         #  @param Father parent object. If None,
12726         #         folder under 'Geometry' root object will be created.
12727         #  @return a new created folder
12728         #  @ingroup l1_publish_data
12729         def NewFolder(self, Name, Father=None):
12730             """
12731             Create a new folder object. It is an auxiliary container for any GEOM objects.
12732
12733             Parameters:
12734                 Name name of the container
12735                 Father parent object. If None,
12736                 folder under 'Geometry' root object will be created.
12737
12738             Returns:
12739                 a new created folder
12740             """
12741             if not Father: Father = self.father
12742             return self.CreateFolder(Name, Father)
12743
12744         ## Move object to the specified folder
12745         #  @param Object object to move
12746         #  @param Folder target folder
12747         #  @ingroup l1_publish_data
12748         def PutToFolder(self, Object, Folder):
12749             """
12750             Move object to the specified folder
12751
12752             Parameters:
12753                 Object object to move
12754                 Folder target folder
12755             """
12756             self.MoveToFolder(Object, Folder)
12757             pass
12758
12759         ## Move list of objects to the specified folder
12760         #  @param ListOfSO list of objects to move
12761         #  @param Folder target folder
12762         #  @ingroup l1_publish_data
12763         def PutListToFolder(self, ListOfSO, Folder):
12764             """
12765             Move list of objects to the specified folder
12766
12767             Parameters:
12768                 ListOfSO list of objects to move
12769                 Folder target folder
12770             """
12771             self.MoveListToFolder(ListOfSO, Folder)
12772             pass
12773
12774         ## @addtogroup l2_field
12775         ## @{
12776
12777         ## Creates a field
12778         #  @param shape the shape the field lies on
12779         #  @param name the field name
12780         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
12781         #  @param dimension dimension of the shape the field lies on
12782         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12783         #  @param componentNames names of components
12784         #  @return a created field
12785         @ManageTransactions("FieldOp")
12786         def CreateField(self, shape, name, type, dimension, componentNames):
12787             """
12788             Creates a field
12789
12790             Parameters:
12791                 shape the shape the field lies on
12792                 name  the field name
12793                 type  type of field data
12794                 dimension dimension of the shape the field lies on
12795                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12796                 componentNames names of components
12797
12798             Returns:
12799                 a created field
12800             """
12801             if isinstance( type, int ):
12802                 if type < 0 or type > 3:
12803                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
12804                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
12805
12806             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
12807             RaiseIfFailed("CreateField", self.FieldOp)
12808             global geom
12809             geom._autoPublish( f, "", name)
12810             return f
12811
12812         ## Removes a field from the GEOM component
12813         #  @param field the field to remove
12814         def RemoveField(self, field):
12815             "Removes a field from the GEOM component"
12816             global geom
12817             if isinstance( field, GEOM._objref_GEOM_Field ):
12818                 geom.RemoveObject( field )
12819             elif isinstance( field, geomField ):
12820                 geom.RemoveObject( field.field )
12821             else:
12822                 raise RuntimeError, "RemoveField() : the object is not a field"
12823             return
12824
12825         ## Returns number of fields on a shape
12826         @ManageTransactions("FieldOp")
12827         def CountFields(self, shape):
12828             "Returns number of fields on a shape"
12829             nb = self.FieldOp.CountFields( shape )
12830             RaiseIfFailed("CountFields", self.FieldOp)
12831             return nb
12832
12833         ## Returns all fields on a shape
12834         @ManageTransactions("FieldOp")
12835         def GetFields(self, shape):
12836             "Returns all fields on a shape"
12837             ff = self.FieldOp.GetFields( shape )
12838             RaiseIfFailed("GetFields", self.FieldOp)
12839             return ff
12840
12841         ## Returns a field on a shape by its name
12842         @ManageTransactions("FieldOp")
12843         def GetField(self, shape, name):
12844             "Returns a field on a shape by its name"
12845             f = self.FieldOp.GetField( shape, name )
12846             RaiseIfFailed("GetField", self.FieldOp)
12847             return f
12848
12849         # end of l2_field
12850         ## @}
12851
12852
12853 import omniORB
12854 # Register the new proxy for GEOM_Gen
12855 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12856
12857
12858 ## Field on Geometry
12859 #  @ingroup l2_field
12860 class geomField( GEOM._objref_GEOM_Field ):
12861
12862     def __init__(self):
12863         GEOM._objref_GEOM_Field.__init__(self)
12864         self.field = GEOM._objref_GEOM_Field
12865         return
12866
12867     ## Returns the shape the field lies on
12868     def getShape(self):
12869         "Returns the shape the field lies on"
12870         return self.field.GetShape(self)
12871
12872     ## Returns the field name
12873     def getName(self):
12874         "Returns the field name"
12875         return self.field.GetName(self)
12876
12877     ## Returns type of field data as integer [0-3]
12878     def getType(self):
12879         "Returns type of field data"
12880         return self.field.GetDataType(self)._v
12881
12882     ## Returns type of field data:
12883     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
12884     def getTypeEnum(self):
12885         "Returns type of field data"
12886         return self.field.GetDataType(self)
12887
12888     ## Returns dimension of the shape the field lies on:
12889     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
12890     def getDimension(self):
12891         """Returns dimension of the shape the field lies on:
12892         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
12893         return self.field.GetDimension(self)
12894
12895     ## Returns names of components
12896     def getComponents(self):
12897         "Returns names of components"
12898         return self.field.GetComponents(self)
12899
12900     ## Adds a time step to the field
12901     #  @param step the time step number further used as the step identifier
12902     #  @param stamp the time step time
12903     #  @param values the values of the time step
12904     def addStep(self, step, stamp, values):
12905         "Adds a time step to the field"
12906         stp = self.field.AddStep( self, step, stamp )
12907         if not stp:
12908             raise RuntimeError, \
12909                   "Field.addStep() : Error: step %s already exists in this field"%step
12910         global geom
12911         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
12912         self.setValues( step, values )
12913         return stp
12914
12915     ## Remove a time step from the field
12916     def removeStep(self,step):
12917         "Remove a time step from the field"
12918         stepSO = None
12919         try:
12920             stepObj = self.field.GetStep( self, step )
12921             if stepObj:
12922                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
12923         except:
12924             #import traceback
12925             #traceback.print_exc()
12926             pass
12927         self.field.RemoveStep( self, step )
12928         if stepSO:
12929             geom.myBuilder.RemoveObjectWithChildren( stepSO )
12930         return
12931
12932     ## Returns number of time steps in the field
12933     def countSteps(self):
12934         "Returns number of time steps in the field"
12935         return self.field.CountSteps(self)
12936
12937     ## Returns a list of time step IDs in the field
12938     def getSteps(self):
12939         "Returns a list of time step IDs in the field"
12940         return self.field.GetSteps(self)
12941
12942     ## Returns a time step by its ID
12943     def getStep(self,step):
12944         "Returns a time step by its ID"
12945         stp = self.field.GetStep(self, step)
12946         if not stp:
12947             raise RuntimeError, "Step %s is missing from this field"%step
12948         return stp
12949
12950     ## Returns the time of the field step
12951     def getStamp(self,step):
12952         "Returns the time of the field step"
12953         return self.getStep(step).GetStamp()
12954
12955     ## Changes the time of the field step
12956     def setStamp(self, step, stamp):
12957         "Changes the time of the field step"
12958         return self.getStep(step).SetStamp(stamp)
12959
12960     ## Returns values of the field step
12961     def getValues(self, step):
12962         "Returns values of the field step"
12963         return self.getStep(step).GetValues()
12964
12965     ## Changes values of the field step
12966     def setValues(self, step, values):
12967         "Changes values of the field step"
12968         stp = self.getStep(step)
12969         errBeg = "Field.setValues(values) : Error: "
12970         try:
12971             ok = stp.SetValues( values )
12972         except Exception, e:
12973             excStr = str(e)
12974             if excStr.find("WrongPythonType") > 0:
12975                 raise RuntimeError, errBeg +\
12976                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
12977             raise RuntimeError, errBeg + str(e)
12978         if not ok:
12979             nbOK = self.field.GetArraySize(self)
12980             nbKO = len(values)
12981             if nbOK != nbKO:
12982                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
12983             else:
12984                 raise RuntimeError, errBeg + "failed"
12985         return
12986
12987     pass # end of class geomField
12988
12989 # Register the new proxy for GEOM_Field
12990 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
12991
12992
12993 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12994 #  interface to GEOM operations.
12995 #
12996 #  Typical use is:
12997 #  \code
12998 #    import salome
12999 #    salome.salome_init()
13000 #    from salome.geom import geomBuilder
13001 #    geompy = geomBuilder.New(salome.myStudy)
13002 #  \endcode
13003 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13004 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13005 #  @return geomBuilder instance
13006 def New( study, instance=None):
13007     """
13008     Create a new geomBuilder instance.The geomBuilder class provides the Python
13009     interface to GEOM operations.
13010
13011     Typical use is:
13012         import salome
13013         salome.salome_init()
13014         from salome.geom import geomBuilder
13015         geompy = geomBuilder.New(salome.myStudy)
13016
13017     Parameters:
13018         study     SALOME study, generally obtained by salome.myStudy.
13019         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13020     Returns:
13021         geomBuilder instance
13022     """
13023     #print "New geomBuilder ", study, instance
13024     global engine
13025     global geom
13026     global doLcc
13027     engine = instance
13028     if engine is None:
13029       doLcc = True
13030     geom = geomBuilder()
13031     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13032     geom.init_geom(study)
13033     return geom
13034
13035
13036 # Register methods from the plug-ins in the geomBuilder class 
13037 plugins_var = os.environ.get( "GEOM_PluginsList" )
13038
13039 plugins = None
13040 if plugins_var is not None:
13041     plugins = plugins_var.split( ":" )
13042     plugins=filter(lambda x: len(x)>0, plugins)
13043 if plugins is not None:
13044     for pluginName in plugins:
13045         pluginBuilderName = pluginName + "Builder"
13046         try:
13047             exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
13048         except Exception, e:
13049             from salome_utils import verbose
13050             print "Exception while loading %s: %s" % ( pluginBuilderName, e )
13051             continue
13052         exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
13053         plugin = eval( pluginBuilderName )
13054         
13055         # add methods from plugin module to the geomBuilder class
13056         for k in dir( plugin ):
13057             if k[0] == '_': continue
13058             method = getattr( plugin, k )
13059             if type( method ).__name__ == 'function':
13060                 if not hasattr( geomBuilder, k ):
13061                     setattr( geomBuilder, k, method )
13062                 pass
13063             pass
13064         del pluginName
13065         pass
13066     pass