Salome HOME
Merge from V6_main 01/04/2013
[modules/geom.git] / src / GEOM_SWIG / geompyDC.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  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.
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 #  File   : geompy.py
21 #  Author : Paul RASCLE, EDF
22 #  Module : GEOM
23
24 """
25     \namespace geompy
26     \brief Module geompy
27 """
28
29 ##
30 ## @defgroup l1_publish_data Publishing results in SALOME study
31 ## @{
32 ##
33 ## @details
34 ##
35 ## By default, all functions of geompy.py Python interface do not publish
36 ## resulting geometrical objects. This can be done in the Python script
37 ## by means of geompy.addToStudy() or geompy.addToStudyInFather()
38 ## functions.
39 ## 
40 ## However, it is possible to publish result data in the study
41 ## automatically. For this, almost each function of geompy.py module has
42 ## an additional @a theName parameter (@c None by default).
43 ## As soon as non-empty string value is passed to this parameter,
44 ## the result object is published in the study automatically.
45 ## 
46 ## For example,
47 ## 
48 ## @code
49 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
50 ## geompy.addToStudy(box, "box")             # explicit publishing
51 ## @endcode
52 ## 
53 ## can be replaced by one-line instruction
54 ## 
55 ## @code
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
57 ## @endcode
58 ## 
59 ## ... or simply
60 ## 
61 ## @code
62 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
63 ## @endcode
64 ##
65 ## Note, that some functions produce more than one geometrical objects. For example,
66 ## geompy.GetNonBlocks() function returns two objects: group of all non-hexa solids and group of
67 ## all non-quad faces. For such functions it is possible to specify separate names for results.
68 ##
69 ## For example
70 ##
71 ## @code
72 ## # create and publish cylinder
73 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
74 ## # get non blocks from cylinder
75 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
76 ## @endcode
77 ##
78 ## Above example will publish both result compounds (first with non-hexa solids and
79 ## second with non-quad faces) as two items, both named "nonblock".
80 ## However, if second command is invoked as
81 ##
82 ## @code
83 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
84 ## @endcode
85 ##
86 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
87 ##
88 ## Automatic publication of all results can be also enabled/disabled by means of the function
89 ## geompy.addToStudyAuto(). The automatic publishing is managed by the numeric parameter passed
90 ## to this function:
91 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
92 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
93 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
94 ##   value passed as parameter has the same effect.
95 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
96 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
97 ## 
98 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
99 ## to the functions creating objects, instead default names will be used. However, you
100 ## can always change the behavior, by passing explicit name to the @a theName parameter
101 ## and it will be used instead default one.
102 ## The publishing of the collections of objects will be done according to the above
103 ## mentioned rules (maximum allowed number of sub-shapes).
104 ##
105 ## For example:
106 ##
107 ## @code
108 ## geompy.addToStudyAuto() # enable automatic publication
109 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
110 ## # the box is created and published in the study with default name
111 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
112 ## vertices = geompy.SubShapeAll(box, geompy.ShapeType['VERTEX'])
113 ## # only 5 first vertices will be published, with default names
114 ## print len(vertices)
115 ## # note, that result value still containes all 8 vertices
116 ## geompy.addToStudyAuto(-1) # disable automatic publication
117 ## @endcode
118 ##
119 ## This feature can be used, for example, for debugging purposes.
120 ##
121 ## @note
122 ## - Use automatic publication feature with caution. When it is enabled, any function of geompy.py module
123 ##   publishes the results in the study, that can lead to the huge size of the study data tree.
124 ##   For example, repeating call of geompy.SubShapeAll() command on the same main shape each time will
125 ##   publish all child objects, that will lead to a lot of duplicated items in the study.
126 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
127 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
128 ## - Not that some functions of geompy.py module do not have @theName parameter (and, thus, do not support
129 ##   automatic publication). For example, some transformation operations like geompy.TranslateDXDYDZ().
130 ##   Refer to the documentation to check if some function has such possibility.
131 ##
132 ## @}
133
134
135 ## @defgroup l1_geompy_auxiliary Auxiliary data structures and methods
136
137 ## @defgroup l1_geompy_purpose   All package methods, grouped by their purpose
138 ## @{
139 ##   @defgroup l2_import_export Importing/exporting geometrical objects
140 ##   @defgroup l2_creating      Creating geometrical objects
141 ##   @{
142 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
143 ##     @{
144 ##       @defgroup l4_curves        Creating Curves
145
146 ##     @}
147 ##     @defgroup l3_3d_primitives Creating 3D Primitives
148 ##     @defgroup l3_complex       Creating Complex Objects
149 ##     @defgroup l3_groups        Working with groups
150 ##     @defgroup l3_blocks        Building by blocks
151 ##     @{
152 ##       @defgroup l4_blocks_measure Check and Improve
153
154 ##     @}
155 ##     @defgroup l3_sketcher      Sketcher
156 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
157 ##     @{
158 ##       @defgroup l4_decompose     Decompose objects
159 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
160 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
161 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
162 ##       @defgroup l4_advanced      Advanced objects creation functions
163
164 ##     @}
165
166 ##   @}
167 ##   @defgroup l2_transforming  Transforming geometrical objects
168 ##   @{
169 ##     @defgroup l3_basic_op      Basic Operations
170 ##     @defgroup l3_boolean       Boolean Operations
171 ##     @defgroup l3_transform     Transformation Operations
172 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
173 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
174 ##     @defgroup l3_blocks_op     Blocks Operations
175 ##     @defgroup l3_healing       Repairing Operations
176 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
177
178 ##   @}
179 ##   @defgroup l2_measure       Using measurement tools
180
181 ## @}
182
183 # initialize SALOME session in try/except block
184 # to avoid problems in some cases, e.g. when generating documentation
185 try:
186     import salome
187     salome.salome_init()
188     from salome import *
189 except:
190     pass
191
192 from salome_notebook import *
193
194 import GEOM
195 import math
196 import os
197
198 from gsketcher import Sketcher3D
199
200 ## Enumeration ShapeType as a dictionary. \n
201 ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
202 #  @ingroup l1_geompy_auxiliary
203 ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
204
205 # service function
206 def _toListOfNames(_names, _size=-1):
207     l = []
208     import types
209     if type(_names) in [types.ListType, types.TupleType]:
210         for i in _names: l.append(i)
211     elif _names:
212         l.append(_names)
213     if l and len(l) < _size:
214         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
215     return l
216
217 ## Raise an Error, containing the Method_name, if Operation is Failed
218 ## @ingroup l1_geompy_auxiliary
219 def RaiseIfFailed (Method_name, Operation):
220     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
221         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
222
223 ## Return list of variables value from salome notebook
224 ## @ingroup l1_geompy_auxiliary
225 def ParseParameters(*parameters):
226     Result = []
227     StringResult = []
228     for parameter in parameters:
229         if isinstance(parameter, list):
230             lResults = ParseParameters(*parameter)
231             if len(lResults) > 0:
232                 Result.append(lResults[:-1])
233                 StringResult += lResults[-1].split(":")
234                 pass
235             pass
236         else:
237             if isinstance(parameter,str):
238                 if notebook.isVariable(parameter):
239                     Result.append(notebook.get(parameter))
240                 else:
241                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
242                 pass
243             else:
244                 Result.append(parameter)
245                 pass
246             StringResult.append(str(parameter))
247             pass
248         pass
249     if Result:
250         Result.append(":".join(StringResult))
251     else:
252         Result = ":".join(StringResult)
253     return Result
254
255 ## Return list of variables value from salome notebook
256 ## @ingroup l1_geompy_auxiliary
257 def ParseList(list):
258     Result = []
259     StringResult = ""
260     for parameter in list:
261         if isinstance(parameter,str) and notebook.isVariable(parameter):
262             Result.append(str(notebook.get(parameter)))
263             pass
264         else:
265             Result.append(str(parameter))
266             pass
267
268         StringResult = StringResult + str(parameter)
269         StringResult = StringResult + ":"
270         pass
271     StringResult = StringResult[:len(StringResult)-1]
272     return Result, StringResult
273
274 ## Return list of variables value from salome notebook
275 ## @ingroup l1_geompy_auxiliary
276 def ParseSketcherCommand(command):
277     Result = ""
278     StringResult = ""
279     sections = command.split(":")
280     for section in sections:
281         parameters = section.split(" ")
282         paramIndex = 1
283         for parameter in parameters:
284             if paramIndex > 1 and parameter.find("'") != -1:
285                 parameter = parameter.replace("'","")
286                 if notebook.isVariable(parameter):
287                     Result = Result + str(notebook.get(parameter)) + " "
288                     pass
289                 else:
290                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
291                     pass
292                 pass
293             else:
294                 Result = Result + str(parameter) + " "
295                 pass
296             if paramIndex > 1:
297                 StringResult = StringResult + parameter
298                 StringResult = StringResult + ":"
299                 pass
300             paramIndex = paramIndex + 1
301             pass
302         Result = Result[:len(Result)-1] + ":"
303         pass
304     Result = Result[:len(Result)-1]
305     return Result, StringResult
306
307 ## Helper function which can be used to pack the passed string to the byte data.
308 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
309 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
310 ## For example,
311 ## \code
312 ## val = PackData("10001110") # val = 0xAE
313 ## val = PackData("1")        # val = 0x80
314 ## \endcode
315 ## @param data unpacked data - a string containing '1' and '0' symbols
316 ## @return data packed to the byte stream
317 ## @ingroup l1_geompy_auxiliary
318 def PackData(data):
319     """
320     Helper function which can be used to pack the passed string to the byte data.
321     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
322     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
323
324     Parameters:
325         data unpacked data - a string containing '1' and '0' symbols
326
327     Returns:
328         data packed to the byte stream
329         
330     Example of usage:
331         val = PackData("10001110") # val = 0xAE
332         val = PackData("1")        # val = 0x80
333     """
334     bytes = len(data)/8
335     if len(data)%8: bytes += 1
336     res = ""
337     for b in range(bytes):
338         d = data[b*8:(b+1)*8]
339         val = 0
340         for i in range(8):
341             val *= 2
342             if i < len(d):
343                 if d[i] == "1": val += 1
344                 elif d[i] != "0":
345                     raise "Invalid symbol %s" % d[i]
346                 pass
347             pass
348         res += chr(val)
349         pass
350     return res
351
352 ## Read bitmap texture from the text file.
353 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
354 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
355 ## The function returns width and height of the pixmap in pixels and byte stream representing
356 ## texture bitmap itself.
357 ##
358 ## This function can be used to read the texture to the byte stream in order to pass it to
359 ## the AddTexture() function of geompy class.
360 ## For example,
361 ## \code
362 ## import geompy
363 ## geompy.init_geom(salome.myStudy)
364 ## texture = geompy.readtexture('mytexture.dat')
365 ## texture = geompy.AddTexture(*texture)
366 ## obj.SetMarkerTexture(texture)
367 ## \endcode
368 ## @param fname texture file name
369 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
370 ## @ingroup l1_geompy_auxiliary
371 def ReadTexture(fname):
372     """
373     Read bitmap texture from the text file.
374     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
375     A zero symbol ('0') represents transparent pixel of the texture bitmap.
376     The function returns width and height of the pixmap in pixels and byte stream representing
377     texture bitmap itself.
378     This function can be used to read the texture to the byte stream in order to pass it to
379     the AddTexture() function of geompy class.
380     
381     Parameters:
382         fname texture file name
383
384     Returns:
385         sequence of tree values: texture's width, height in pixels and its byte stream
386     
387     Example of usage:
388         import geompy
389         geompy.init_geom(salome.myStudy)
390         texture = geompy.readtexture('mytexture.dat')
391         texture = geompy.AddTexture(*texture)
392         obj.SetMarkerTexture(texture)
393     """
394     try:
395         f = open(fname)
396         lines = [ l.strip() for l in f.readlines()]
397         f.close()
398         maxlen = 0
399         if lines: maxlen = max([len(x) for x in lines])
400         lenbytes = maxlen/8
401         if maxlen%8: lenbytes += 1
402         bytedata=""
403         for line in lines:
404             if len(line)%8:
405                 lenline = (len(line)/8+1)*8
406                 pass
407             else:
408                 lenline = (len(line)/8)*8
409                 pass
410             for i in range(lenline/8):
411                 byte=""
412                 for j in range(8):
413                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
414                     else: byte += "0"
415                     pass
416                 bytedata += PackData(byte)
417                 pass
418             for i in range(lenline/8, lenbytes):
419                 bytedata += PackData("0")
420             pass
421         return lenbytes*8, len(lines), bytedata
422     except:
423         pass
424     return 0, 0, ""
425
426 ## Returns a long value from enumeration type
427 #  Can be used for CORBA enumerator types like GEOM.shape_type
428 #  @param theItem enumeration type
429 #  @ingroup l1_geompy_auxiliary
430 def EnumToLong(theItem):
431     """
432     Returns a long value from enumeration type
433     Can be used for CORBA enumerator types like geompy.ShapeType
434
435     Parameters:
436         theItem enumeration type
437     """
438     ret = theItem
439     if hasattr(theItem, "_v"): ret = theItem._v
440     return ret
441
442 ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
443 #  and a list of parameters, describing the shape.
444 #  List of parameters, describing the shape:
445 #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
446 #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
447 #
448 #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
449 #
450 #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
451 #
452 #  - SPHERE:       [xc yc zc            R]
453 #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
454 #  - BOX:          [xc yc zc                      ax ay az]
455 #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
456 #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
457 #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
458 #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
459 #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
460 #
461 #  - SPHERE2D:     [xc yc zc            R]
462 #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
463 #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
464 #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
465 #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
466 #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
467 #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
468 #  - PLANE:        [xo yo zo  dx dy dz]
469 #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
470 #  - FACE:                                       [nb_edges  nb_vertices]
471 #
472 #  - CIRCLE:       [xc yc zc  dx dy dz  R]
473 #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
474 #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
475 #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
476 #  - LINE:         [xo yo zo  dx dy dz]
477 #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
478 #  - EDGE:                                                 [nb_vertices]
479 #
480 #  - VERTEX:       [x  y  z]
481 #  @ingroup l1_geompy_auxiliary
482 kind = GEOM.GEOM_IKindOfShape
483
484 ## Information about closed/unclosed state of shell or wire
485 #  @ingroup l1_geompy_auxiliary
486 class info:
487     """
488     Information about closed/unclosed state of shell or wire
489     """
490     UNKNOWN  = 0
491     CLOSED   = 1
492     UNCLOSED = 2
493
494 class geompyDC(GEOM._objref_GEOM_Gen):
495
496         def __init__(self):
497             GEOM._objref_GEOM_Gen.__init__(self)
498             self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
499             self.myBuilder = None
500             self.myStudyId = 0
501             self.father    = None
502
503             self.BasicOp  = None
504             self.CurvesOp = None
505             self.PrimOp   = None
506             self.ShapesOp = None
507             self.HealOp   = None
508             self.InsertOp = None
509             self.BoolOp   = None
510             self.TrsfOp   = None
511             self.LocalOp  = None
512             self.MeasuOp  = None
513             self.BlocksOp = None
514             self.GroupOp  = None
515             self.AdvOp    = None
516             pass
517
518         ## Process object publication in the study, as follows:
519         #  - if @a theName is specified (not None), the object is published in the study
520         #    with this name, not taking into account "auto-publishing" option;
521         #  - if @a theName is NOT specified, the object is published in the study
522         #    (using default name, which can be customized using @a theDefaultName parameter)
523         #    only if auto-publishing is switched on.
524         #
525         #  @param theObj  object, a subject for publishing
526         #  @param theName object name for study
527         #  @param theDefaultName default name for the auto-publishing
528         #
529         #  @sa addToStudyAuto()
530         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
531             # ---
532             def _item_name(_names, _defname, _idx=-1):
533                 if not _names: _names = _defname
534                 if type(_names) in [types.ListType, types.TupleType]:
535                     if _idx >= 0:
536                         if _idx >= len(_names) or not _names[_idx]:
537                             if type(_defname) not in [types.ListType, types.TupleType]:
538                                 _name = "%s_%d"%(_defname, _idx+1)
539                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
540                                 _name = _defname[_idx]
541                             else:
542                                 _name = "%noname_%d"%(dn, _idx+1)
543                             pass
544                         else:
545                             _name = _names[_idx]
546                         pass
547                     else:
548                         # must be wrong  usage
549                         _name = _names[0]
550                     pass
551                 else:
552                     if _idx >= 0:
553                         _name = "%s_%d"%(_names, _idx+1)
554                     else:
555                         _name = _names
556                     pass
557                 return _name
558             # ---
559             if not theObj:
560                 return # null object
561             if not theName and not self.myMaxNbSubShapesAllowed:
562                 return # nothing to do: auto-publishing is disabled
563             if not theName and not theDefaultName:
564                 return # neither theName nor theDefaultName is given
565             import types
566             if type(theObj) in [types.ListType, types.TupleType]:
567                 # list of objects is being published
568                 idx = 0
569                 for obj in theObj:
570                     if not obj: continue # bad object
571                     ###if obj.GetStudyEntry(): continue # already published
572                     name = _item_name(theName, theDefaultName, idx)
573                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
574                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
575                     else:
576                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
577                         pass
578                     idx = idx+1
579                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
580                     pass
581                 pass
582             else:
583                 # single object is published
584                 ###if theObj.GetStudyEntry(): return # already published
585                 name = _item_name(theName, theDefaultName)
586                 if theObj.IsMainShape():
587                     self.addToStudy(theObj, name)
588                 else:
589                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
590                     pass
591                 pass
592             pass
593
594         ## @addtogroup l1_geompy_auxiliary
595         ## @{
596         def init_geom(self,theStudy):
597             self.myStudy = theStudy
598             self.myStudyId = self.myStudy._get_StudyId()
599             self.myBuilder = self.myStudy.NewBuilder()
600             self.father = self.myStudy.FindComponent("GEOM")
601             if self.father is None:
602                 self.father = self.myBuilder.NewComponent("GEOM")
603                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
604                 FName = A1._narrow(SALOMEDS.AttributeName)
605                 FName.SetValue("Geometry")
606                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
607                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
608                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
609                 self.myBuilder.DefineComponentInstance(self.father,self)
610                 pass
611             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
612             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
613             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
614             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
615             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
616             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
617             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
618             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
619             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
620             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
621             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
622             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
623             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
624             pass
625
626         ## Enable / disable results auto-publishing
627         # 
628         #  The automatic publishing is managed in the following way:
629         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
630         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
631         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
632         #  value passed as parameter has the same effect.
633         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
634         #  maximum number of sub-shapes allowed for publishing is set to specified value.
635         #
636         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
637         #  @ingroup l1_publish_data
638         def addToStudyAuto(self, maxNbSubShapes=-1):
639             """
640             Enable / disable results auto-publishing
641
642             The automatic publishing is managed in the following way:
643             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
644             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
645             maximum number of sub-shapes allowed for publishing is unlimited; any negative
646             value passed as parameter has the same effect.
647             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
648             maximum number of sub-shapes allowed for publishing is set to this value.
649
650             Parameters:
651                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
652
653             Example of usage:
654                 geompy.addToStudyAuto()   # enable auto-publishing
655                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
656                 geompy.addToStudyAuto(0)  # disable auto-publishing
657             """
658             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
659             pass
660
661         ## Dump component to the Python script
662         #  This method overrides IDL function to allow default values for the parameters.
663         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
664             """
665             Dump component to the Python script
666             This method overrides IDL function to allow default values for the parameters.
667             """
668             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
669
670         ## Get name for sub-shape aSubObj of shape aMainObj
671         #
672         # @ref swig_SubShapeName "Example"
673         def SubShapeName(self,aSubObj, aMainObj):
674             """
675             Get name for sub-shape aSubObj of shape aMainObj
676             """
677             # Example: see GEOM_TestAll.py
678
679             #aSubId  = orb.object_to_string(aSubObj)
680             #aMainId = orb.object_to_string(aMainObj)
681             #index = gg.getIndexTopology(aSubId, aMainId)
682             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
683             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
684             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
685             return name
686
687         ## Publish in study aShape with name aName
688         #
689         #  \param aShape the shape to be published
690         #  \param aName  the name for the shape
691         #  \param doRestoreSubShapes if True, finds and publishes also
692         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
693         #         and published sub-shapes of arguments
694         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
695         #                                                  these arguments description
696         #  \return study entry of the published shape in form of string
697         #
698         #  @ingroup l1_publish_data
699         #  @ref swig_all_addtostudy "Example"
700         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
701                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
702             """
703             Publish in study aShape with name aName
704
705             Parameters:
706                 aShape the shape to be published
707                 aName  the name for the shape
708                 doRestoreSubShapes if True, finds and publishes also
709                                    sub-shapes of aShape, corresponding to its arguments
710                                    and published sub-shapes of arguments
711                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
712                                                          these arguments description
713
714             Returns:
715                 study entry of the published shape in form of string
716
717             Example of usage:
718                 id_block1 = geompy.addToStudy(Block1, "Block 1")
719             """
720             # Example: see GEOM_TestAll.py
721             try:
722                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
723                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
724                 if doRestoreSubShapes:
725                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
726                                             theFindMethod, theInheritFirstArg, True )
727             except:
728                 print "addToStudy() failed"
729                 return ""
730             return aShape.GetStudyEntry()
731
732         ## Publish in study aShape with name aName as sub-object of previously published aFather
733         #  \param aFather previously published object
734         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
735         #  \param aName  the name for the shape
736         #
737         #  \return study entry of the published shape in form of string
738         #
739         #  @ingroup l1_publish_data
740         #  @ref swig_all_addtostudyInFather "Example"
741         def addToStudyInFather(self, aFather, aShape, aName):
742             """
743             Publish in study aShape with name aName as sub-object of previously published aFather
744
745             Parameters:
746                 aFather previously published object
747                 aShape the shape to be published as sub-object of aFather
748                 aName  the name for the shape
749
750             Returns:
751                 study entry of the published shape in form of string
752             """
753             # Example: see GEOM_TestAll.py
754             try:
755                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
756                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
757             except:
758                 print "addToStudyInFather() failed"
759                 return ""
760             return aShape.GetStudyEntry()
761
762         ## Unpublish object in study
763         #
764         #  \param obj the object to be unpublished
765         def hideInStudy(self, obj):
766             """
767             Unpublish object in study
768
769             Parameters:
770                 obj the object to be unpublished
771             """
772             ior = salome.orb.object_to_string(obj)
773             aSObject = self.myStudy.FindObjectIOR(ior)
774             if aSObject is not None:
775                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
776                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
777                 drwAttribute.SetDrawable(False)
778                 pass
779
780         # end of l1_geompy_auxiliary
781         ## @}
782
783         ## @addtogroup l3_restore_ss
784         ## @{
785
786         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
787         #  To be used from python scripts out of addToStudy() (non-default usage)
788         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
789         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
790         #                   If this list is empty, all operation arguments will be published
791         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
792         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
793         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
794         #                            Do not publish sub-shapes in place of arguments, but only
795         #                            in place of sub-shapes of the first argument,
796         #                            because the whole shape corresponds to the first argument.
797         #                            Mainly to be used after transformations, but it also can be
798         #                            usefull after partition with one object shape, and some other
799         #                            operations, where only the first argument has to be considered.
800         #                            If theObject has only one argument shape, this flag is automatically
801         #                            considered as True, not regarding really passed value.
802         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
803         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
804         #  \return list of published sub-shapes
805         #
806         #  @ref tui_restore_prs_params "Example"
807         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
808                               theInheritFirstArg=False, theAddPrefix=True):
809             """
810             Publish sub-shapes, standing for arguments and sub-shapes of arguments
811             To be used from python scripts out of geompy.addToStudy (non-default usage)
812
813             Parameters:
814                 theObject published GEOM.GEOM_Object, arguments of which will be published
815                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
816                           If this list is empty, all operation arguments will be published
817                 theFindMethod method to search sub-shapes, corresponding to arguments and
818                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
819                 theInheritFirstArg set properties of the first argument for theObject.
820                                    Do not publish sub-shapes in place of arguments, but only
821                                    in place of sub-shapes of the first argument,
822                                    because the whole shape corresponds to the first argument.
823                                    Mainly to be used after transformations, but it also can be
824                                    usefull after partition with one object shape, and some other
825                                    operations, where only the first argument has to be considered.
826                                    If theObject has only one argument shape, this flag is automatically
827                                    considered as True, not regarding really passed value.
828                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
829                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
830             Returns:
831                 list of published sub-shapes
832             """
833             # Example: see GEOM_TestAll.py
834             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
835                                           theFindMethod, theInheritFirstArg, theAddPrefix)
836
837         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
838         #  To be used from python scripts out of addToStudy() (non-default usage)
839         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
840         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
841         #                   If this list is empty, all operation arguments will be published
842         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
843         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
844         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
845         #                            Do not publish sub-shapes in place of arguments, but only
846         #                            in place of sub-shapes of the first argument,
847         #                            because the whole shape corresponds to the first argument.
848         #                            Mainly to be used after transformations, but it also can be
849         #                            usefull after partition with one object shape, and some other
850         #                            operations, where only the first argument has to be considered.
851         #                            If theObject has only one argument shape, this flag is automatically
852         #                            considered as True, not regarding really passed value.
853         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
854         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
855         #  \return list of published sub-shapes
856         #
857         #  @ref tui_restore_prs_params "Example"
858         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
859                                    theInheritFirstArg=False, theAddPrefix=True):
860             """
861             Publish sub-shapes, standing for arguments and sub-shapes of arguments
862             To be used from python scripts out of geompy.addToStudy() (non-default usage)
863
864             Parameters:
865                 theObject published GEOM.GEOM_Object, arguments of which will be published
866                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
867                           If this list is empty, all operation arguments will be published
868                 theFindMethod method to search sub-shapes, corresponding to arguments and
869                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
870                 theInheritFirstArg set properties of the first argument for theObject.
871                                    Do not publish sub-shapes in place of arguments, but only
872                                    in place of sub-shapes of the first argument,
873                                    because the whole shape corresponds to the first argument.
874                                    Mainly to be used after transformations, but it also can be
875                                    usefull after partition with one object shape, and some other
876                                    operations, where only the first argument has to be considered.
877                                    If theObject has only one argument shape, this flag is automatically
878                                    considered as True, not regarding really passed value.
879                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
880                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
881
882             Returns: 
883                 list of published sub-shapes
884             """
885             # Example: see GEOM_TestAll.py
886             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
887                                                theFindMethod, theInheritFirstArg, theAddPrefix)
888
889         # end of l3_restore_ss
890         ## @}
891
892         ## @addtogroup l3_basic_go
893         ## @{
894
895         ## Create point by three coordinates.
896         #  @param theX The X coordinate of the point.
897         #  @param theY The Y coordinate of the point.
898         #  @param theZ The Z coordinate of the point.
899         #  @param theName Object name; when specified, this parameter is used
900         #         for result publication in the study. Otherwise, if automatic
901         #         publication is switched on, default value is used for result name.
902         #
903         #  @return New GEOM.GEOM_Object, containing the created point.
904         #
905         #  @ref tui_creation_point "Example"
906         def MakeVertex(self, theX, theY, theZ, theName=None):
907             """
908             Create point by three coordinates.
909
910             Parameters:
911                 theX The X coordinate of the point.
912                 theY The Y coordinate of the point.
913                 theZ The Z coordinate of the point.
914                 theName Object name; when specified, this parameter is used
915                         for result publication in the study. Otherwise, if automatic
916                         publication is switched on, default value is used for result name.
917                 
918             Returns: 
919                 New GEOM.GEOM_Object, containing the created point.
920             """
921             # Example: see GEOM_TestAll.py
922             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
923             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
924             RaiseIfFailed("MakePointXYZ", self.BasicOp)
925             anObj.SetParameters(Parameters)
926             self._autoPublish(anObj, theName, "vertex")
927             return anObj
928
929         ## Create a point, distant from the referenced point
930         #  on the given distances along the coordinate axes.
931         #  @param theReference The referenced point.
932         #  @param theX Displacement from the referenced point along OX axis.
933         #  @param theY Displacement from the referenced point along OY axis.
934         #  @param theZ Displacement from the referenced point along OZ axis.
935         #  @param theName Object name; when specified, this parameter is used
936         #         for result publication in the study. Otherwise, if automatic
937         #         publication is switched on, default value is used for result name.
938         #
939         #  @return New GEOM.GEOM_Object, containing the created point.
940         #
941         #  @ref tui_creation_point "Example"
942         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
943             """
944             Create a point, distant from the referenced point
945             on the given distances along the coordinate axes.
946
947             Parameters:
948                 theReference The referenced point.
949                 theX Displacement from the referenced point along OX axis.
950                 theY Displacement from the referenced point along OY axis.
951                 theZ Displacement from the referenced point along OZ axis.
952                 theName Object name; when specified, this parameter is used
953                         for result publication in the study. Otherwise, if automatic
954                         publication is switched on, default value is used for result name.
955
956             Returns:
957                 New GEOM.GEOM_Object, containing the created point.
958             """
959             # Example: see GEOM_TestAll.py
960             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
961             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
962             RaiseIfFailed("MakePointWithReference", self.BasicOp)
963             anObj.SetParameters(Parameters)
964             self._autoPublish(anObj, theName, "vertex")
965             return anObj
966
967         ## Create a point, corresponding to the given parameter on the given curve.
968         #  @param theRefCurve The referenced curve.
969         #  @param theParameter Value of parameter on the referenced curve.
970         #  @param theName Object name; when specified, this parameter is used
971         #         for result publication in the study. Otherwise, if automatic
972         #         publication is switched on, default value is used for result name.
973         #
974         #  @return New GEOM.GEOM_Object, containing the created point.
975         #
976         #  @ref tui_creation_point "Example"
977         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
978             """
979             Create a point, corresponding to the given parameter on the given curve.
980
981             Parameters:
982                 theRefCurve The referenced curve.
983                 theParameter Value of parameter on the referenced curve.
984                 theName Object name; when specified, this parameter is used
985                         for result publication in the study. Otherwise, if automatic
986                         publication is switched on, default value is used for result name.
987
988             Returns:
989                 New GEOM.GEOM_Object, containing the created point.
990
991             Example of usage:
992                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
993             """
994             # Example: see GEOM_TestAll.py
995             theParameter, Parameters = ParseParameters(theParameter)
996             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
997             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
998             anObj.SetParameters(Parameters)
999             self._autoPublish(anObj, theName, "vertex")
1000             return anObj
1001
1002         ## Create a point by projection give coordinates on the given curve
1003         #  @param theRefCurve The referenced curve.
1004         #  @param theX X-coordinate in 3D space
1005         #  @param theY Y-coordinate in 3D space
1006         #  @param theZ Z-coordinate in 3D space
1007         #  @param theName Object name; when specified, this parameter is used
1008         #         for result publication in the study. Otherwise, if automatic
1009         #         publication is switched on, default value is used for result name.
1010         #
1011         #  @return New GEOM.GEOM_Object, containing the created point.
1012         #
1013         #  @ref tui_creation_point "Example"
1014         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1015             """
1016             Create a point by projection give coordinates on the given curve
1017             
1018             Parameters:
1019                 theRefCurve The referenced curve.
1020                 theX X-coordinate in 3D space
1021                 theY Y-coordinate in 3D space
1022                 theZ Z-coordinate in 3D space
1023                 theName Object name; when specified, this parameter is used
1024                         for result publication in the study. Otherwise, if automatic
1025                         publication is switched on, default value is used for result name.
1026
1027             Returns:
1028                 New GEOM.GEOM_Object, containing the created point.
1029
1030             Example of usage:
1031                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1032             """
1033             # Example: see GEOM_TestAll.py
1034             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1035             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1036             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1037             anObj.SetParameters(Parameters)
1038             self._autoPublish(anObj, theName, "vertex")
1039             return anObj
1040
1041         ## Create a point, corresponding to the given length on the given curve.
1042         #  @param theRefCurve The referenced curve.
1043         #  @param theLength Length on the referenced curve. It can be negative.
1044         #  @param theStartPoint Point allowing to choose the direction for the calculation
1045         #                       of the length. If None, start from the first point of theRefCurve.
1046         #  @param theName Object name; when specified, this parameter is used
1047         #         for result publication in the study. Otherwise, if automatic
1048         #         publication is switched on, default value is used for result name.
1049         #
1050         #  @return New GEOM.GEOM_Object, containing the created point.
1051         #
1052         #  @ref tui_creation_point "Example"
1053         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1054             """
1055             Create a point, corresponding to the given length on the given curve.
1056
1057             Parameters:
1058                 theRefCurve The referenced curve.
1059                 theLength Length on the referenced curve. It can be negative.
1060                 theStartPoint Point allowing to choose the direction for the calculation
1061                               of the length. If None, start from the first point of theRefCurve.
1062                 theName Object name; when specified, this parameter is used
1063                         for result publication in the study. Otherwise, if automatic
1064                         publication is switched on, default value is used for result name.
1065
1066             Returns:
1067                 New GEOM.GEOM_Object, containing the created point.
1068             """
1069             # Example: see GEOM_TestAll.py
1070             theLength, Parameters = ParseParameters(theLength)
1071             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1072             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1073             anObj.SetParameters(Parameters)
1074             self._autoPublish(anObj, theName, "vertex")
1075             return anObj
1076
1077         ## Create a point, corresponding to the given parameters on the
1078         #    given surface.
1079         #  @param theRefSurf The referenced surface.
1080         #  @param theUParameter Value of U-parameter on the referenced surface.
1081         #  @param theVParameter Value of V-parameter on the referenced surface.
1082         #  @param theName Object name; when specified, this parameter is used
1083         #         for result publication in the study. Otherwise, if automatic
1084         #         publication is switched on, default value is used for result name.
1085         #
1086         #  @return New GEOM.GEOM_Object, containing the created point.
1087         #
1088         #  @ref swig_MakeVertexOnSurface "Example"
1089         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1090             """
1091             Create a point, corresponding to the given parameters on the
1092             given surface.
1093
1094             Parameters:
1095                 theRefSurf The referenced surface.
1096                 theUParameter Value of U-parameter on the referenced surface.
1097                 theVParameter Value of V-parameter on the referenced surface.
1098                 theName Object name; when specified, this parameter is used
1099                         for result publication in the study. Otherwise, if automatic
1100                         publication is switched on, default value is used for result name.
1101
1102             Returns:
1103                 New GEOM.GEOM_Object, containing the created point.
1104
1105             Example of usage:
1106                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1107             """
1108             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1109             # Example: see GEOM_TestAll.py
1110             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1111             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1112             anObj.SetParameters(Parameters);
1113             self._autoPublish(anObj, theName, "vertex")
1114             return anObj
1115
1116         ## Create a point by projection give coordinates on the given surface
1117         #  @param theRefSurf The referenced surface.
1118         #  @param theX X-coordinate in 3D space
1119         #  @param theY Y-coordinate in 3D space
1120         #  @param theZ Z-coordinate in 3D space
1121         #  @param theName Object name; when specified, this parameter is used
1122         #         for result publication in the study. Otherwise, if automatic
1123         #         publication is switched on, default value is used for result name.
1124         #
1125         #  @return New GEOM.GEOM_Object, containing the created point.
1126         #
1127         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1128         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1129             """
1130             Create a point by projection give coordinates on the given surface
1131
1132             Parameters:
1133                 theRefSurf The referenced surface.
1134                 theX X-coordinate in 3D space
1135                 theY Y-coordinate in 3D space
1136                 theZ Z-coordinate in 3D space
1137                 theName Object name; when specified, this parameter is used
1138                         for result publication in the study. Otherwise, if automatic
1139                         publication is switched on, default value is used for result name.
1140
1141             Returns:
1142                 New GEOM.GEOM_Object, containing the created point.
1143
1144             Example of usage:
1145                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1146             """
1147             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1148             # Example: see GEOM_TestAll.py
1149             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1150             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1151             anObj.SetParameters(Parameters);
1152             self._autoPublish(anObj, theName, "vertex")
1153             return anObj
1154
1155         ## Create a point, which lays on the given face.
1156         #  The point will lay in arbitrary place of the face.
1157         #  The only condition on it is a non-zero distance to the face boundary.
1158         #  Such point can be used to uniquely identify the face inside any
1159         #  shape in case, when the shape does not contain overlapped faces.
1160         #  @param theFace The referenced face.
1161         #  @param theName Object name; when specified, this parameter is used
1162         #         for result publication in the study. Otherwise, if automatic
1163         #         publication is switched on, default value is used for result name.
1164         #
1165         #  @return New GEOM.GEOM_Object, containing the created point.
1166         #
1167         #  @ref swig_MakeVertexInsideFace "Example"
1168         def MakeVertexInsideFace (self, theFace, theName=None):
1169             """
1170             Create a point, which lays on the given face.
1171             The point will lay in arbitrary place of the face.
1172             The only condition on it is a non-zero distance to the face boundary.
1173             Such point can be used to uniquely identify the face inside any
1174             shape in case, when the shape does not contain overlapped faces.
1175
1176             Parameters:
1177                 theFace The referenced face.
1178                 theName Object name; when specified, this parameter is used
1179                         for result publication in the study. Otherwise, if automatic
1180                         publication is switched on, default value is used for result name.
1181
1182             Returns:
1183                 New GEOM.GEOM_Object, containing the created point.
1184
1185             Example of usage:
1186                 p_on_face = geompy.MakeVertexInsideFace(Face)
1187             """
1188             # Example: see GEOM_TestAll.py
1189             anObj = self.BasicOp.MakePointOnFace(theFace)
1190             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1191             self._autoPublish(anObj, theName, "vertex")
1192             return anObj
1193
1194         ## Create a point on intersection of two lines.
1195         #  @param theRefLine1, theRefLine2 The referenced lines.
1196         #  @param theName Object name; when specified, this parameter is used
1197         #         for result publication in the study. Otherwise, if automatic
1198         #         publication is switched on, default value is used for result name.
1199         #
1200         #  @return New GEOM.GEOM_Object, containing the created point.
1201         #
1202         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1203         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1204             """
1205             Create a point on intersection of two lines.
1206
1207             Parameters:
1208                 theRefLine1, theRefLine2 The referenced lines.
1209                 theName Object name; when specified, this parameter is used
1210                         for result publication in the study. Otherwise, if automatic
1211                         publication is switched on, default value is used for result name.
1212
1213             Returns:
1214                 New GEOM.GEOM_Object, containing the created point.
1215             """
1216             # Example: see GEOM_TestAll.py
1217             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1218             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1219             self._autoPublish(anObj, theName, "vertex")
1220             return anObj
1221
1222         ## Create a tangent, corresponding to the given parameter on the given curve.
1223         #  @param theRefCurve The referenced curve.
1224         #  @param theParameter Value of parameter on the referenced curve.
1225         #  @param theName Object name; when specified, this parameter is used
1226         #         for result publication in the study. Otherwise, if automatic
1227         #         publication is switched on, default value is used for result name.
1228         #
1229         #  @return New GEOM.GEOM_Object, containing the created tangent.
1230         #
1231         #  @ref swig_MakeTangentOnCurve "Example"
1232         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1233             """
1234             Create a tangent, corresponding to the given parameter on the given curve.
1235
1236             Parameters:
1237                 theRefCurve The referenced curve.
1238                 theParameter Value of parameter on the referenced curve.
1239                 theName Object name; when specified, this parameter is used
1240                         for result publication in the study. Otherwise, if automatic
1241                         publication is switched on, default value is used for result name.
1242
1243             Returns:
1244                 New GEOM.GEOM_Object, containing the created tangent.
1245
1246             Example of usage:
1247                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1248             """
1249             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1250             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1251             self._autoPublish(anObj, theName, "tangent")
1252             return anObj
1253
1254         ## Create a tangent plane, corresponding to the given parameter on the given face.
1255         #  @param theFace The face for which tangent plane should be built.
1256         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1257         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1258         #  @param theTrimSize the size of plane.
1259         #  @param theName Object name; when specified, this parameter is used
1260         #         for result publication in the study. Otherwise, if automatic
1261         #         publication is switched on, default value is used for result name.
1262         #
1263         #  @return New GEOM.GEOM_Object, containing the created tangent.
1264         #
1265         #  @ref swig_MakeTangentPlaneOnFace "Example"
1266         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1267             """
1268             Create a tangent plane, corresponding to the given parameter on the given face.
1269
1270             Parameters:
1271                 theFace The face for which tangent plane should be built.
1272                 theParameterV vertical value of the center point (0.0 - 1.0).
1273                 theParameterU horisontal value of the center point (0.0 - 1.0).
1274                 theTrimSize the size of plane.
1275                 theName Object name; when specified, this parameter is used
1276                         for result publication in the study. Otherwise, if automatic
1277                         publication is switched on, default value is used for result name.
1278
1279            Returns: 
1280                 New GEOM.GEOM_Object, containing the created tangent.
1281
1282            Example of usage:
1283                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1284             """
1285             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1286             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1287             self._autoPublish(anObj, theName, "tangent")
1288             return anObj
1289
1290         ## Create a vector with the given components.
1291         #  @param theDX X component of the vector.
1292         #  @param theDY Y component of the vector.
1293         #  @param theDZ Z component of the vector.
1294         #  @param theName Object name; when specified, this parameter is used
1295         #         for result publication in the study. Otherwise, if automatic
1296         #         publication is switched on, default value is used for result name.
1297         #
1298         #  @return New GEOM.GEOM_Object, containing the created vector.
1299         #
1300         #  @ref tui_creation_vector "Example"
1301         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1302             """
1303             Create a vector with the given components.
1304
1305             Parameters:
1306                 theDX X component of the vector.
1307                 theDY Y component of the vector.
1308                 theDZ Z component of the vector.
1309                 theName Object name; when specified, this parameter is used
1310                         for result publication in the study. Otherwise, if automatic
1311                         publication is switched on, default value is used for result name.
1312
1313             Returns:     
1314                 New GEOM.GEOM_Object, containing the created vector.
1315             """
1316             # Example: see GEOM_TestAll.py
1317             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1318             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1319             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1320             anObj.SetParameters(Parameters)
1321             self._autoPublish(anObj, theName, "vector")
1322             return anObj
1323
1324         ## Create a vector between two points.
1325         #  @param thePnt1 Start point for the vector.
1326         #  @param thePnt2 End point for the vector.
1327         #  @param theName Object name; when specified, this parameter is used
1328         #         for result publication in the study. Otherwise, if automatic
1329         #         publication is switched on, default value is used for result name.
1330         #
1331         #  @return New GEOM.GEOM_Object, containing the created vector.
1332         #
1333         #  @ref tui_creation_vector "Example"
1334         def MakeVector(self, thePnt1, thePnt2, theName=None):
1335             """
1336             Create a vector between two points.
1337
1338             Parameters:
1339                 thePnt1 Start point for the vector.
1340                 thePnt2 End point for the vector.
1341                 theName Object name; when specified, this parameter is used
1342                         for result publication in the study. Otherwise, if automatic
1343                         publication is switched on, default value is used for result name.
1344
1345             Returns:        
1346                 New GEOM.GEOM_Object, containing the created vector.
1347             """
1348             # Example: see GEOM_TestAll.py
1349             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1350             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1351             self._autoPublish(anObj, theName, "vector")
1352             return anObj
1353
1354         ## Create a line, passing through the given point
1355         #  and parrallel to the given direction
1356         #  @param thePnt Point. The resulting line will pass through it.
1357         #  @param theDir Direction. The resulting line will be parallel to it.
1358         #  @param theName Object name; when specified, this parameter is used
1359         #         for result publication in the study. Otherwise, if automatic
1360         #         publication is switched on, default value is used for result name.
1361         #
1362         #  @return New GEOM.GEOM_Object, containing the created line.
1363         #
1364         #  @ref tui_creation_line "Example"
1365         def MakeLine(self, thePnt, theDir, theName=None):
1366             """
1367             Create a line, passing through the given point
1368             and parrallel to the given direction
1369
1370             Parameters:
1371                 thePnt Point. The resulting line will pass through it.
1372                 theDir Direction. The resulting line will be parallel to it.
1373                 theName Object name; when specified, this parameter is used
1374                         for result publication in the study. Otherwise, if automatic
1375                         publication is switched on, default value is used for result name.
1376
1377             Returns:
1378                 New GEOM.GEOM_Object, containing the created line.
1379             """
1380             # Example: see GEOM_TestAll.py
1381             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1382             RaiseIfFailed("MakeLine", self.BasicOp)
1383             self._autoPublish(anObj, theName, "line")
1384             return anObj
1385
1386         ## Create a line, passing through the given points
1387         #  @param thePnt1 First of two points, defining the line.
1388         #  @param thePnt2 Second of two points, defining the line.
1389         #  @param theName Object name; when specified, this parameter is used
1390         #         for result publication in the study. Otherwise, if automatic
1391         #         publication is switched on, default value is used for result name.
1392         #
1393         #  @return New GEOM.GEOM_Object, containing the created line.
1394         #
1395         #  @ref tui_creation_line "Example"
1396         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1397             """
1398             Create a line, passing through the given points
1399
1400             Parameters:
1401                 thePnt1 First of two points, defining the line.
1402                 thePnt2 Second of two points, defining the line.
1403                 theName Object name; when specified, this parameter is used
1404                         for result publication in the study. Otherwise, if automatic
1405                         publication is switched on, default value is used for result name.
1406
1407             Returns:
1408                 New GEOM.GEOM_Object, containing the created line.
1409             """
1410             # Example: see GEOM_TestAll.py
1411             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1412             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1413             self._autoPublish(anObj, theName, "line")
1414             return anObj
1415
1416         ## Create a line on two faces intersection.
1417         #  @param theFace1 First of two faces, defining the line.
1418         #  @param theFace2 Second of two faces, defining the line.
1419         #  @param theName Object name; when specified, this parameter is used
1420         #         for result publication in the study. Otherwise, if automatic
1421         #         publication is switched on, default value is used for result name.
1422         #
1423         #  @return New GEOM.GEOM_Object, containing the created line.
1424         #
1425         #  @ref swig_MakeLineTwoFaces "Example"
1426         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1427             """
1428             Create a line on two faces intersection.
1429
1430             Parameters:
1431                 theFace1 First of two faces, defining the line.
1432                 theFace2 Second of two faces, defining the line.
1433                 theName Object name; when specified, this parameter is used
1434                         for result publication in the study. Otherwise, if automatic
1435                         publication is switched on, default value is used for result name.
1436
1437             Returns:
1438                 New GEOM.GEOM_Object, containing the created line.
1439             """
1440             # Example: see GEOM_TestAll.py
1441             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1442             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1443             self._autoPublish(anObj, theName, "line")
1444             return anObj
1445
1446         ## Create a plane, passing through the given point
1447         #  and normal to the given vector.
1448         #  @param thePnt Point, the plane has to pass through.
1449         #  @param theVec Vector, defining the plane normal direction.
1450         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1451         #  @param theName Object name; when specified, this parameter is used
1452         #         for result publication in the study. Otherwise, if automatic
1453         #         publication is switched on, default value is used for result name.
1454         #
1455         #  @return New GEOM.GEOM_Object, containing the created plane.
1456         #
1457         #  @ref tui_creation_plane "Example"
1458         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1459             """
1460             Create a plane, passing through the given point
1461             and normal to the given vector.
1462
1463             Parameters:
1464                 thePnt Point, the plane has to pass through.
1465                 theVec Vector, defining the plane normal direction.
1466                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1467                 theName Object name; when specified, this parameter is used
1468                         for result publication in the study. Otherwise, if automatic
1469                         publication is switched on, default value is used for result name.
1470
1471             Returns:    
1472                 New GEOM.GEOM_Object, containing the created plane.
1473             """
1474             # Example: see GEOM_TestAll.py
1475             theTrimSize, Parameters = ParseParameters(theTrimSize);
1476             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1477             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1478             anObj.SetParameters(Parameters)
1479             self._autoPublish(anObj, theName, "plane")
1480             return anObj
1481
1482         ## Create a plane, passing through the three given points
1483         #  @param thePnt1 First of three points, defining the plane.
1484         #  @param thePnt2 Second of three points, defining the plane.
1485         #  @param thePnt3 Fird of three points, defining the plane.
1486         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1487         #  @param theName Object name; when specified, this parameter is used
1488         #         for result publication in the study. Otherwise, if automatic
1489         #         publication is switched on, default value is used for result name.
1490         #
1491         #  @return New GEOM.GEOM_Object, containing the created plane.
1492         #
1493         #  @ref tui_creation_plane "Example"
1494         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1495             """
1496             Create a plane, passing through the three given points
1497
1498             Parameters:
1499                 thePnt1 First of three points, defining the plane.
1500                 thePnt2 Second of three points, defining the plane.
1501                 thePnt3 Fird of three points, defining the plane.
1502                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1503                 theName Object name; when specified, this parameter is used
1504                         for result publication in the study. Otherwise, if automatic
1505                         publication is switched on, default value is used for result name.
1506
1507             Returns:
1508                 New GEOM.GEOM_Object, containing the created plane.
1509             """
1510             # Example: see GEOM_TestAll.py
1511             theTrimSize, Parameters = ParseParameters(theTrimSize);
1512             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1513             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1514             anObj.SetParameters(Parameters)
1515             self._autoPublish(anObj, theName, "plane")
1516             return anObj
1517
1518         ## Create a plane, similar to the existing one, but with another size of representing face.
1519         #  @param theFace Referenced plane or LCS(Marker).
1520         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1521         #  @param theName Object name; when specified, this parameter is used
1522         #         for result publication in the study. Otherwise, if automatic
1523         #         publication is switched on, default value is used for result name.
1524         #
1525         #  @return New GEOM.GEOM_Object, containing the created plane.
1526         #
1527         #  @ref tui_creation_plane "Example"
1528         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1529             """
1530             Create a plane, similar to the existing one, but with another size of representing face.
1531
1532             Parameters:
1533                 theFace Referenced plane or LCS(Marker).
1534                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1535                 theName Object name; when specified, this parameter is used
1536                         for result publication in the study. Otherwise, if automatic
1537                         publication is switched on, default value is used for result name.
1538
1539             Returns:
1540                 New GEOM.GEOM_Object, containing the created plane.
1541             """
1542             # Example: see GEOM_TestAll.py
1543             theTrimSize, Parameters = ParseParameters(theTrimSize);
1544             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1545             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1546             anObj.SetParameters(Parameters)
1547             self._autoPublish(anObj, theName, "plane")
1548             return anObj
1549
1550         ## Create a plane, passing through the 2 vectors
1551         #  with center in a start point of the first vector.
1552         #  @param theVec1 Vector, defining center point and plane direction.
1553         #  @param theVec2 Vector, defining the plane normal direction.
1554         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1555         #  @param theName Object name; when specified, this parameter is used
1556         #         for result publication in the study. Otherwise, if automatic
1557         #         publication is switched on, default value is used for result name.
1558         #
1559         #  @return New GEOM.GEOM_Object, containing the created plane.
1560         #
1561         #  @ref tui_creation_plane "Example"
1562         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1563             """
1564             Create a plane, passing through the 2 vectors
1565             with center in a start point of the first vector.
1566
1567             Parameters:
1568                 theVec1 Vector, defining center point and plane direction.
1569                 theVec2 Vector, defining the plane normal direction.
1570                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1571                 theName Object name; when specified, this parameter is used
1572                         for result publication in the study. Otherwise, if automatic
1573                         publication is switched on, default value is used for result name.
1574
1575             Returns: 
1576                 New GEOM.GEOM_Object, containing the created plane.
1577             """
1578             # Example: see GEOM_TestAll.py
1579             theTrimSize, Parameters = ParseParameters(theTrimSize);
1580             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1581             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1582             anObj.SetParameters(Parameters)
1583             self._autoPublish(anObj, theName, "plane")
1584             return anObj
1585
1586         ## Create a plane, based on a Local coordinate system.
1587         #  @param theLCS  coordinate system, defining plane.
1588         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1589         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1590         #  @param theName Object name; when specified, this parameter is used
1591         #         for result publication in the study. Otherwise, if automatic
1592         #         publication is switched on, default value is used for result name.
1593         #
1594         #  @return New GEOM.GEOM_Object, containing the created plane.
1595         #
1596         #  @ref tui_creation_plane "Example"
1597         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1598             """
1599             Create a plane, based on a Local coordinate system.
1600
1601            Parameters: 
1602                 theLCS  coordinate system, defining plane.
1603                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1604                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1605                 theName Object name; when specified, this parameter is used
1606                         for result publication in the study. Otherwise, if automatic
1607                         publication is switched on, default value is used for result name.
1608
1609             Returns: 
1610                 New GEOM.GEOM_Object, containing the created plane.
1611             """
1612             # Example: see GEOM_TestAll.py
1613             theTrimSize, Parameters = ParseParameters(theTrimSize);
1614             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1615             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1616             anObj.SetParameters(Parameters)
1617             self._autoPublish(anObj, theName, "plane")
1618             return anObj
1619
1620         ## Create a local coordinate system.
1621         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1622         #  @param XDX,XDY,XDZ Three components of OX direction
1623         #  @param YDX,YDY,YDZ Three components of OY direction
1624         #  @param theName Object name; when specified, this parameter is used
1625         #         for result publication in the study. Otherwise, if automatic
1626         #         publication is switched on, default value is used for result name.
1627         #
1628         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1629         #
1630         #  @ref swig_MakeMarker "Example"
1631         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1632             """
1633             Create a local coordinate system.
1634
1635             Parameters: 
1636                 OX,OY,OZ Three coordinates of coordinate system origin.
1637                 XDX,XDY,XDZ Three components of OX direction
1638                 YDX,YDY,YDZ Three components of OY direction
1639                 theName Object name; when specified, this parameter is used
1640                         for result publication in the study. Otherwise, if automatic
1641                         publication is switched on, default value is used for result name.
1642
1643             Returns: 
1644                 New GEOM.GEOM_Object, containing the created coordinate system.
1645             """
1646             # Example: see GEOM_TestAll.py
1647             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1648             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1649             RaiseIfFailed("MakeMarker", self.BasicOp)
1650             anObj.SetParameters(Parameters)
1651             self._autoPublish(anObj, theName, "lcs")
1652             return anObj
1653
1654         ## Create a local coordinate system from shape.
1655         #  @param theShape The initial shape to detect the coordinate system.
1656         #  @param theName Object name; when specified, this parameter is used
1657         #         for result publication in the study. Otherwise, if automatic
1658         #         publication is switched on, default value is used for result name.
1659         #
1660         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1661         #
1662         #  @ref tui_creation_lcs "Example"
1663         def MakeMarkerFromShape(self, theShape, theName=None):
1664             """
1665             Create a local coordinate system from shape.
1666
1667             Parameters:
1668                 theShape The initial shape to detect the coordinate system.
1669                 theName Object name; when specified, this parameter is used
1670                         for result publication in the study. Otherwise, if automatic
1671                         publication is switched on, default value is used for result name.
1672                 
1673             Returns: 
1674                 New GEOM.GEOM_Object, containing the created coordinate system.
1675             """
1676             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1677             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1678             self._autoPublish(anObj, theName, "lcs")
1679             return anObj
1680
1681         ## Create a local coordinate system from point and two vectors.
1682         #  @param theOrigin Point of coordinate system origin.
1683         #  @param theXVec Vector of X direction
1684         #  @param theYVec Vector of Y direction
1685         #  @param theName Object name; when specified, this parameter is used
1686         #         for result publication in the study. Otherwise, if automatic
1687         #         publication is switched on, default value is used for result name.
1688         #
1689         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1690         #
1691         #  @ref tui_creation_lcs "Example"
1692         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1693             """
1694             Create a local coordinate system from point and two vectors.
1695
1696             Parameters:
1697                 theOrigin Point of coordinate system origin.
1698                 theXVec Vector of X direction
1699                 theYVec Vector of Y direction
1700                 theName Object name; when specified, this parameter is used
1701                         for result publication in the study. Otherwise, if automatic
1702                         publication is switched on, default value is used for result name.
1703
1704             Returns: 
1705                 New GEOM.GEOM_Object, containing the created coordinate system.
1706
1707             """
1708             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1709             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1710             self._autoPublish(anObj, theName, "lcs")
1711             return anObj
1712
1713         # end of l3_basic_go
1714         ## @}
1715
1716         ## @addtogroup l4_curves
1717         ## @{
1718
1719         ##  Create an arc of circle, passing through three given points.
1720         #  @param thePnt1 Start point of the arc.
1721         #  @param thePnt2 Middle point of the arc.
1722         #  @param thePnt3 End point of the arc.
1723         #  @param theName Object name; when specified, this parameter is used
1724         #         for result publication in the study. Otherwise, if automatic
1725         #         publication is switched on, default value is used for result name.
1726         #
1727         #  @return New GEOM.GEOM_Object, containing the created arc.
1728         #
1729         #  @ref swig_MakeArc "Example"
1730         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1731             """
1732             Create an arc of circle, passing through three given points.
1733
1734             Parameters:
1735                 thePnt1 Start point of the arc.
1736                 thePnt2 Middle point of the arc.
1737                 thePnt3 End point of the arc.
1738                 theName Object name; when specified, this parameter is used
1739                         for result publication in the study. Otherwise, if automatic
1740                         publication is switched on, default value is used for result name.
1741
1742             Returns: 
1743                 New GEOM.GEOM_Object, containing the created arc.
1744             """
1745             # Example: see GEOM_TestAll.py
1746             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1747             RaiseIfFailed("MakeArc", self.CurvesOp)
1748             self._autoPublish(anObj, theName, "arc")
1749             return anObj
1750
1751         ##  Create an arc of circle from a center and 2 points.
1752         #  @param thePnt1 Center of the arc
1753         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1754         #  @param thePnt3 End point of the arc (Gives also a direction)
1755         #  @param theSense Orientation of the arc
1756         #  @param theName Object name; when specified, this parameter is used
1757         #         for result publication in the study. Otherwise, if automatic
1758         #         publication is switched on, default value is used for result name.
1759         #
1760         #  @return New GEOM.GEOM_Object, containing the created arc.
1761         #
1762         #  @ref swig_MakeArc "Example"
1763         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1764             """
1765             Create an arc of circle from a center and 2 points.
1766
1767             Parameters:
1768                 thePnt1 Center of the arc
1769                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1770                 thePnt3 End point of the arc (Gives also a direction)
1771                 theSense Orientation of the arc
1772                 theName Object name; when specified, this parameter is used
1773                         for result publication in the study. Otherwise, if automatic
1774                         publication is switched on, default value is used for result name.
1775
1776             Returns:
1777                 New GEOM.GEOM_Object, containing the created arc.
1778             """
1779             # Example: see GEOM_TestAll.py
1780             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1781             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1782             self._autoPublish(anObj, theName, "arc")
1783             return anObj
1784
1785         ##  Create an arc of ellipse, of center and two points.
1786         #  @param theCenter Center of the arc.
1787         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1788         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1789         #  @param theName Object name; when specified, this parameter is used
1790         #         for result publication in the study. Otherwise, if automatic
1791         #         publication is switched on, default value is used for result name.
1792         #
1793         #  @return New GEOM.GEOM_Object, containing the created arc.
1794         #
1795         #  @ref swig_MakeArc "Example"
1796         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1797             """
1798             Create an arc of ellipse, of center and two points.
1799
1800             Parameters:
1801                 theCenter Center of the arc.
1802                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1803                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1804                 theName Object name; when specified, this parameter is used
1805                         for result publication in the study. Otherwise, if automatic
1806                         publication is switched on, default value is used for result name.
1807
1808             Returns:
1809                 New GEOM.GEOM_Object, containing the created arc.
1810             """
1811             # Example: see GEOM_TestAll.py
1812             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1813             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1814             self._autoPublish(anObj, theName, "arc")
1815             return anObj
1816
1817         ## Create a circle with given center, normal vector and radius.
1818         #  @param thePnt Circle center.
1819         #  @param theVec Vector, normal to the plane of the circle.
1820         #  @param theR Circle radius.
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 circle.
1826         #
1827         #  @ref tui_creation_circle "Example"
1828         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1829             """
1830             Create a circle with given center, normal vector and radius.
1831
1832             Parameters:
1833                 thePnt Circle center.
1834                 theVec Vector, normal to the plane of the circle.
1835                 theR Circle radius.
1836                 theName Object name; when specified, this parameter is used
1837                         for result publication in the study. Otherwise, if automatic
1838                         publication is switched on, default value is used for result name.
1839
1840             Returns:
1841                 New GEOM.GEOM_Object, containing the created circle.
1842             """
1843             # Example: see GEOM_TestAll.py
1844             theR, Parameters = ParseParameters(theR)
1845             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1846             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1847             anObj.SetParameters(Parameters)
1848             self._autoPublish(anObj, theName, "circle")
1849             return anObj
1850
1851         ## Create a circle with given radius.
1852         #  Center of the circle will be in the origin of global
1853         #  coordinate system and normal vector will be codirected with Z axis
1854         #  @param theR Circle radius.
1855         #  @param theName Object name; when specified, this parameter is used
1856         #         for result publication in the study. Otherwise, if automatic
1857         #         publication is switched on, default value is used for result name.
1858         #
1859         #  @return New GEOM.GEOM_Object, containing the created circle.
1860         def MakeCircleR(self, theR, theName=None):
1861             """
1862             Create a circle with given radius.
1863             Center of the circle will be in the origin of global
1864             coordinate system and normal vector will be codirected with Z axis
1865
1866             Parameters:
1867                 theR Circle radius.
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 circle.
1874             """
1875             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1876             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1877             self._autoPublish(anObj, theName, "circle")
1878             return anObj
1879
1880         ## Create a circle, passing through three given points
1881         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1882         #  @param theName Object name; when specified, this parameter is used
1883         #         for result publication in the study. Otherwise, if automatic
1884         #         publication is switched on, default value is used for result name.
1885         #
1886         #  @return New GEOM.GEOM_Object, containing the created circle.
1887         #
1888         #  @ref tui_creation_circle "Example"
1889         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1890             """
1891             Create a circle, passing through three given points
1892
1893             Parameters:
1894                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1895                 theName Object name; when specified, this parameter is used
1896                         for result publication in the study. Otherwise, if automatic
1897                         publication is switched on, default value is used for result name.
1898
1899             Returns:
1900                 New GEOM.GEOM_Object, containing the created circle.
1901             """
1902             # Example: see GEOM_TestAll.py
1903             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1904             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1905             self._autoPublish(anObj, theName, "circle")
1906             return anObj
1907
1908         ## Create a circle, with given point1 as center,
1909         #  passing through the point2 as radius and laying in the plane,
1910         #  defined by all three given points.
1911         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1912         #  @param theName Object name; when specified, this parameter is used
1913         #         for result publication in the study. Otherwise, if automatic
1914         #         publication is switched on, default value is used for result name.
1915         #
1916         #  @return New GEOM.GEOM_Object, containing the created circle.
1917         #
1918         #  @ref swig_MakeCircle "Example"
1919         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1920             """
1921             Create a circle, with given point1 as center,
1922             passing through the point2 as radius and laying in the plane,
1923             defined by all three given points.
1924
1925             Parameters:
1926                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1927                 theName Object name; when specified, this parameter is used
1928                         for result publication in the study. Otherwise, if automatic
1929                         publication is switched on, default value is used for result name.
1930
1931             Returns:
1932                 New GEOM.GEOM_Object, containing the created circle.
1933             """
1934             # Example: see GEOM_example6.py
1935             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
1936             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
1937             self._autoPublish(anObj, theName, "circle")
1938             return anObj
1939
1940         ## Create an ellipse with given center, normal vector and radiuses.
1941         #  @param thePnt Ellipse center.
1942         #  @param theVec Vector, normal to the plane of the ellipse.
1943         #  @param theRMajor Major ellipse radius.
1944         #  @param theRMinor Minor ellipse radius.
1945         #  @param theVecMaj Vector, direction of the ellipse's main axis.
1946         #  @param theName Object name; when specified, this parameter is used
1947         #         for result publication in the study. Otherwise, if automatic
1948         #         publication is switched on, default value is used for result name.
1949         #
1950         #  @return New GEOM.GEOM_Object, containing the created ellipse.
1951         #
1952         #  @ref tui_creation_ellipse "Example"
1953         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
1954             """
1955             Create an ellipse with given center, normal vector and radiuses.
1956
1957             Parameters:
1958                 thePnt Ellipse center.
1959                 theVec Vector, normal to the plane of the ellipse.
1960                 theRMajor Major ellipse radius.
1961                 theRMinor Minor ellipse radius.
1962                 theVecMaj Vector, direction of the ellipse's main axis.
1963                 theName Object name; when specified, this parameter is used
1964                         for result publication in the study. Otherwise, if automatic
1965                         publication is switched on, default value is used for result name.
1966
1967             Returns:    
1968                 New GEOM.GEOM_Object, containing the created ellipse.
1969             """
1970             # Example: see GEOM_TestAll.py
1971             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
1972             if theVecMaj is not None:
1973                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
1974             else:
1975                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
1976                 pass
1977             RaiseIfFailed("MakeEllipse", self.CurvesOp)
1978             anObj.SetParameters(Parameters)
1979             self._autoPublish(anObj, theName, "ellipse")
1980             return anObj
1981
1982         ## Create an ellipse with given radiuses.
1983         #  Center of the ellipse will be in the origin of global
1984         #  coordinate system and normal vector will be codirected with Z axis
1985         #  @param theRMajor Major ellipse radius.
1986         #  @param theRMinor Minor ellipse radius.
1987         #  @param theName Object name; when specified, this parameter is used
1988         #         for result publication in the study. Otherwise, if automatic
1989         #         publication is switched on, default value is used for result name.
1990         #
1991         #  @return New GEOM.GEOM_Object, containing the created ellipse.
1992         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
1993             """
1994             Create an ellipse with given radiuses.
1995             Center of the ellipse will be in the origin of global
1996             coordinate system and normal vector will be codirected with Z axis
1997
1998             Parameters:
1999                 theRMajor Major ellipse radius.
2000                 theRMinor Minor ellipse radius.
2001                 theName Object name; when specified, this parameter is used
2002                         for result publication in the study. Otherwise, if automatic
2003                         publication is switched on, default value is used for result name.
2004
2005             Returns:
2006             New GEOM.GEOM_Object, containing the created ellipse.
2007             """
2008             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2009             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2010             self._autoPublish(anObj, theName, "ellipse")
2011             return anObj
2012
2013         ## Create a polyline on the set of points.
2014         #  @param thePoints Sequence of points for the polyline.
2015         #  @param theIsClosed If True, build a closed wire.
2016         #  @param theName Object name; when specified, this parameter is used
2017         #         for result publication in the study. Otherwise, if automatic
2018         #         publication is switched on, default value is used for result name.
2019         #
2020         #  @return New GEOM.GEOM_Object, containing the created polyline.
2021         #
2022         #  @ref tui_creation_curve "Example"
2023         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2024             """
2025             Create a polyline on the set of points.
2026
2027             Parameters:
2028                 thePoints Sequence of points for the polyline.
2029                 theIsClosed If True, build a closed wire.
2030                 theName Object name; when specified, this parameter is used
2031                         for result publication in the study. Otherwise, if automatic
2032                         publication is switched on, default value is used for result name.
2033
2034             Returns:
2035                 New GEOM.GEOM_Object, containing the created polyline.
2036             """
2037             # Example: see GEOM_TestAll.py
2038             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2039             RaiseIfFailed("MakePolyline", self.CurvesOp)
2040             self._autoPublish(anObj, theName, "polyline")
2041             return anObj
2042
2043         ## Create bezier curve on the set of points.
2044         #  @param thePoints Sequence of points for the bezier curve.
2045         #  @param theIsClosed If True, build a closed curve.
2046         #  @param theName Object name; when specified, this parameter is used
2047         #         for result publication in the study. Otherwise, if automatic
2048         #         publication is switched on, default value is used for result name.
2049         #
2050         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2051         #
2052         #  @ref tui_creation_curve "Example"
2053         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2054             """
2055             Create bezier curve on the set of points.
2056
2057             Parameters:
2058                 thePoints Sequence of points for the bezier curve.
2059                 theIsClosed If True, build a closed curve.
2060                 theName Object name; when specified, this parameter is used
2061                         for result publication in the study. Otherwise, if automatic
2062                         publication is switched on, default value is used for result name.
2063
2064             Returns:
2065                 New GEOM.GEOM_Object, containing the created bezier curve.
2066             """
2067             # Example: see GEOM_TestAll.py
2068             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2069             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2070             self._autoPublish(anObj, theName, "bezier")
2071             return anObj
2072
2073         ## Create B-Spline curve on the set of points.
2074         #  @param thePoints Sequence of points for the B-Spline curve.
2075         #  @param theIsClosed If True, build a closed curve.
2076         #  @param theDoReordering If TRUE, the algo does not follow the order of
2077         #                         \a thePoints but searches for the closest vertex.
2078         #  @param theName Object name; when specified, this parameter is used
2079         #         for result publication in the study. Otherwise, if automatic
2080         #         publication is switched on, default value is used for result name.
2081         #
2082         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2083         #
2084         #  @ref tui_creation_curve "Example"
2085         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2086             """
2087             Create B-Spline curve on the set of points.
2088
2089             Parameters:
2090                 thePoints Sequence of points for the B-Spline curve.
2091                 theIsClosed If True, build a closed curve.
2092                 theDoReordering If True, the algo does not follow the order of
2093                                 thePoints but searches for the closest vertex.
2094                 theName Object name; when specified, this parameter is used
2095                         for result publication in the study. Otherwise, if automatic
2096                         publication is switched on, default value is used for result name.
2097
2098             Returns:                     
2099                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2100             """
2101             # Example: see GEOM_TestAll.py
2102             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2103             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2104             self._autoPublish(anObj, theName, "bspline")
2105             return anObj
2106
2107         ## Create B-Spline curve on the set of points.
2108         #  @param thePoints Sequence of points for the B-Spline curve.
2109         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2110         #  @param theLastVec Vector object, defining the curve direction at its last point.
2111         #  @param theName Object name; when specified, this parameter is used
2112         #         for result publication in the study. Otherwise, if automatic
2113         #         publication is switched on, default value is used for result name.
2114         #
2115         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2116         #
2117         #  @ref tui_creation_curve "Example"
2118         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2119             """
2120             Create B-Spline curve on the set of points.
2121
2122             Parameters:
2123                 thePoints Sequence of points for the B-Spline curve.
2124                 theFirstVec Vector object, defining the curve direction at its first point.
2125                 theLastVec Vector object, defining the curve direction at its last point.
2126                 theName Object name; when specified, this parameter is used
2127                         for result publication in the study. Otherwise, if automatic
2128                         publication is switched on, default value is used for result name.
2129
2130             Returns:                     
2131                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2132             """
2133             # Example: see GEOM_TestAll.py
2134             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2135             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2136             self._autoPublish(anObj, theName, "bspline")
2137             return anObj
2138
2139         ## Creates a curve using the parametric definition of the basic points.
2140         #  @param thexExpr parametric equation of the coordinates X.
2141         #  @param theyExpr parametric equation of the coordinates Y.
2142         #  @param thezExpr parametric equation of the coordinates Z.
2143         #  @param theParamMin the minimal value of the parameter.
2144         #  @param theParamMax the maximum value of the parameter.
2145         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2146         #  @param theCurveType the type of the curve.
2147         #  @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.
2148         #  @param theName Object name; when specified, this parameter is used
2149         #         for result publication in the study. Otherwise, if automatic
2150         #         publication is switched on, default value is used for result name.
2151         #
2152         #  @return New GEOM.GEOM_Object, containing the created curve.
2153         #
2154         #  @ref tui_creation_curve "Example"
2155         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2156                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2157             """
2158             Creates a curve using the parametric definition of the basic points.
2159
2160             Parameters:
2161                 thexExpr parametric equation of the coordinates X.
2162                 theyExpr parametric equation of the coordinates Y.
2163                 thezExpr parametric equation of the coordinates Z.
2164                 theParamMin the minimal value of the parameter.
2165                 theParamMax the maximum value of the parameter.
2166                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2167                 theCurveType the type of the curve.
2168                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2169                              method is used which can lead to a bug.
2170                 theName Object name; when specified, this parameter is used
2171                         for result publication in the study. Otherwise, if automatic
2172                         publication is switched on, default value is used for result name.
2173
2174             Returns:
2175                 New GEOM.GEOM_Object, containing the created curve.
2176             """
2177             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2178             if theNewMethod:
2179               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2180             else:
2181               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2182             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2183             anObj.SetParameters(Parameters)
2184             self._autoPublish(anObj, theName, "curve")
2185             return anObj
2186
2187         # end of l4_curves
2188         ## @}
2189
2190         ## @addtogroup l3_sketcher
2191         ## @{
2192
2193         ## Create a sketcher (wire or face), following the textual description,
2194         #  passed through <VAR>theCommand</VAR> argument. \n
2195         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2196         #  Format of the description string have to be the following:
2197         #
2198         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2199         #
2200         #  Where:
2201         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2202         #  - CMD is one of
2203         #     - "R angle" : Set the direction by angle
2204         #     - "D dx dy" : Set the direction by DX & DY
2205         #     .
2206         #       \n
2207         #     - "TT x y" : Create segment by point at X & Y
2208         #     - "T dx dy" : Create segment by point with DX & DY
2209         #     - "L length" : Create segment by direction & Length
2210         #     - "IX x" : Create segment by direction & Intersect. X
2211         #     - "IY y" : Create segment by direction & Intersect. Y
2212         #     .
2213         #       \n
2214         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2215         #     - "AA x y": Create arc by point at X & Y
2216         #     - "A dx dy" : Create arc by point with DX & DY
2217         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2218         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2219         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2220         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2221         #     .
2222         #       \n
2223         #     - "WW" : Close Wire (to finish)
2224         #     - "WF" : Close Wire and build face (to finish)
2225         #     .
2226         #        \n
2227         #  - Flag1 (= reverse) is 0 or 2 ...
2228         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2229         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2230         #     .
2231         #        \n
2232         #  - Flag2 (= control tolerance) is 0 or 1 ...
2233         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2234         #     - if 1 the wire is built only if the end point is on the arc
2235         #       with a tolerance of 10^-7 on the distance else the creation fails
2236         #
2237         #  @param theCommand String, defining the sketcher in local
2238         #                    coordinates of the working plane.
2239         #  @param theWorkingPlane Nine double values, defining origin,
2240         #                         OZ and OX directions of the working plane.
2241         #  @param theName Object name; when specified, this parameter is used
2242         #         for result publication in the study. Otherwise, if automatic
2243         #         publication is switched on, default value is used for result name.
2244         #
2245         #  @return New GEOM.GEOM_Object, containing the created wire.
2246         #
2247         #  @ref tui_sketcher_page "Example"
2248         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2249             """
2250             Create a sketcher (wire or face), following the textual description, passed
2251             through theCommand argument.
2252             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2253             Format of the description string have to be the following:
2254                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2255             Where:
2256             - x1, y1 are coordinates of the first sketcher point (zero by default),
2257             - CMD is one of
2258                - "R angle" : Set the direction by angle
2259                - "D dx dy" : Set the direction by DX & DY
2260                
2261                - "TT x y" : Create segment by point at X & Y
2262                - "T dx dy" : Create segment by point with DX & DY
2263                - "L length" : Create segment by direction & Length
2264                - "IX x" : Create segment by direction & Intersect. X
2265                - "IY y" : Create segment by direction & Intersect. Y
2266
2267                - "C radius length" : Create arc by direction, radius and length(in degree)
2268                - "AA x y": Create arc by point at X & Y
2269                - "A dx dy" : Create arc by point with DX & DY
2270                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2271                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2272                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2273                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2274
2275                - "WW" : Close Wire (to finish)
2276                - "WF" : Close Wire and build face (to finish)
2277             
2278             - Flag1 (= reverse) is 0 or 2 ...
2279                - if 0 the drawn arc is the one of lower angle (< Pi)
2280                - if 2 the drawn arc ius the one of greater angle (> Pi)
2281         
2282             - Flag2 (= control tolerance) is 0 or 1 ...
2283                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2284                - if 1 the wire is built only if the end point is on the arc
2285                  with a tolerance of 10^-7 on the distance else the creation fails
2286
2287             Parameters:
2288                 theCommand String, defining the sketcher in local
2289                            coordinates of the working plane.
2290                 theWorkingPlane Nine double values, defining origin,
2291                                 OZ and OX directions of the working plane.
2292                 theName Object name; when specified, this parameter is used
2293                         for result publication in the study. Otherwise, if automatic
2294                         publication is switched on, default value is used for result name.
2295
2296             Returns:
2297                 New GEOM.GEOM_Object, containing the created wire.
2298             """
2299             # Example: see GEOM_TestAll.py
2300             theCommand,Parameters = ParseSketcherCommand(theCommand)
2301             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2302             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2303             anObj.SetParameters(Parameters)
2304             self._autoPublish(anObj, theName, "wire")
2305             return anObj
2306
2307         ## Create a sketcher (wire or face), following the textual description,
2308         #  passed through <VAR>theCommand</VAR> argument. \n
2309         #  For format of the description string see MakeSketcher() method.\n
2310         #  @param theCommand String, defining the sketcher in local
2311         #                    coordinates of the working plane.
2312         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2313         #  @param theName Object name; when specified, this parameter is used
2314         #         for result publication in the study. Otherwise, if automatic
2315         #         publication is switched on, default value is used for result name.
2316         #
2317         #  @return New GEOM.GEOM_Object, containing the created wire.
2318         #
2319         #  @ref tui_sketcher_page "Example"
2320         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2321             """
2322             Create a sketcher (wire or face), following the textual description,
2323             passed through theCommand argument.
2324             For format of the description string see geompy.MakeSketcher() method.
2325
2326             Parameters:
2327                 theCommand String, defining the sketcher in local
2328                            coordinates of the working plane.
2329                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2330                 theName Object name; when specified, this parameter is used
2331                         for result publication in the study. Otherwise, if automatic
2332                         publication is switched on, default value is used for result name.
2333
2334             Returns:
2335                 New GEOM.GEOM_Object, containing the created wire.
2336             """
2337             theCommand,Parameters = ParseSketcherCommand(theCommand)
2338             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2339             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2340             anObj.SetParameters(Parameters)
2341             self._autoPublish(anObj, theName, "wire")
2342             return anObj
2343
2344         ## Create a sketcher wire, following the numerical description,
2345         #  passed through <VAR>theCoordinates</VAR> argument. \n
2346         #  @param theCoordinates double values, defining points to create a wire,
2347         #                                                      passing from it.
2348         #  @param theName Object name; when specified, this parameter is used
2349         #         for result publication in the study. Otherwise, if automatic
2350         #         publication is switched on, default value is used for result name.
2351         #
2352         #  @return New GEOM.GEOM_Object, containing the created wire.
2353         #
2354         #  @ref tui_3dsketcher_page "Example"
2355         def Make3DSketcher(self, theCoordinates, theName=None):
2356             """
2357             Create a sketcher wire, following the numerical description,
2358             passed through theCoordinates argument.
2359
2360             Parameters:
2361                 theCoordinates double values, defining points to create a wire,
2362                                passing from it.
2363                 theName Object name; when specified, this parameter is used
2364                         for result publication in the study. Otherwise, if automatic
2365                         publication is switched on, default value is used for result name.
2366
2367             Returns:
2368                 New GEOM_Object, containing the created wire.
2369             """
2370             theCoordinates,Parameters = ParseParameters(theCoordinates)
2371             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2372             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2373             anObj.SetParameters(Parameters)
2374             self._autoPublish(anObj, theName, "wire")
2375             return anObj
2376
2377         ## Obtain a 3D sketcher interface
2378         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2379         #
2380         #  @ref tui_3dsketcher_page "Example"
2381         def Sketcher3D (self):
2382             """
2383             Obtain a 3D sketcher interface.
2384
2385             Example of usage:
2386                 sk = geompy.Sketcher3D()
2387                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2388                 sk.addPointsRelative(0, 0, 130)
2389                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2390                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2391                 sk.close()
2392                 a3D_Sketcher_1 = sk.wire()
2393             """
2394             sk = Sketcher3D (self)
2395             return sk
2396
2397         # end of l3_sketcher
2398         ## @}
2399
2400         ## @addtogroup l3_3d_primitives
2401         ## @{
2402
2403         ## Create a box by coordinates of two opposite vertices.
2404         #
2405         #  @param x1,y1,z1 double values, defining first point it.
2406         #  @param x2,y2,z2 double values, defining first point it.
2407         #  @param theName Object name; when specified, this parameter is used
2408         #         for result publication in the study. Otherwise, if automatic
2409         #         publication is switched on, default value is used for result name.
2410         #
2411         #  @return New GEOM.GEOM_Object, containing the created box.
2412         #
2413         #  @ref tui_creation_box "Example"
2414         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2415             """
2416             Create a box by coordinates of two opposite vertices.
2417             
2418             Parameters:
2419                 x1,y1,z1 double values, defining first point.
2420                 x2,y2,z2 double values, defining second point.
2421                 theName Object name; when specified, this parameter is used
2422                         for result publication in the study. Otherwise, if automatic
2423                         publication is switched on, default value is used for result name.
2424                 
2425             Returns:
2426                 New GEOM.GEOM_Object, containing the created box.
2427             """
2428             # Example: see GEOM_TestAll.py
2429             pnt1 = self.MakeVertex(x1,y1,z1)
2430             pnt2 = self.MakeVertex(x2,y2,z2)
2431             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2432             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2433
2434         ## Create a box with specified dimensions along the coordinate axes
2435         #  and with edges, parallel to the coordinate axes.
2436         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2437         #  @param theDX Length of Box edges, parallel to OX axis.
2438         #  @param theDY Length of Box edges, parallel to OY axis.
2439         #  @param theDZ Length of Box edges, parallel to OZ axis.
2440         #  @param theName Object name; when specified, this parameter is used
2441         #         for result publication in the study. Otherwise, if automatic
2442         #         publication is switched on, default value is used for result name.
2443         #
2444         #  @return New GEOM.GEOM_Object, containing the created box.
2445         #
2446         #  @ref tui_creation_box "Example"
2447         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2448             """
2449             Create a box with specified dimensions along the coordinate axes
2450             and with edges, parallel to the coordinate axes.
2451             Center of the box will be at point (DX/2, DY/2, DZ/2).
2452
2453             Parameters:
2454                 theDX Length of Box edges, parallel to OX axis.
2455                 theDY Length of Box edges, parallel to OY axis.
2456                 theDZ Length of Box edges, parallel to OZ axis.
2457                 theName Object name; when specified, this parameter is used
2458                         for result publication in the study. Otherwise, if automatic
2459                         publication is switched on, default value is used for result name.
2460
2461             Returns:   
2462                 New GEOM.GEOM_Object, containing the created box.
2463             """
2464             # Example: see GEOM_TestAll.py
2465             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2466             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2467             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2468             anObj.SetParameters(Parameters)
2469             self._autoPublish(anObj, theName, "box")
2470             return anObj
2471
2472         ## Create a box with two specified opposite vertices,
2473         #  and with edges, parallel to the coordinate axes
2474         #  @param thePnt1 First of two opposite vertices.
2475         #  @param thePnt2 Second of two opposite vertices.
2476         #  @param theName Object name; when specified, this parameter is used
2477         #         for result publication in the study. Otherwise, if automatic
2478         #         publication is switched on, default value is used for result name.
2479         #
2480         #  @return New GEOM.GEOM_Object, containing the created box.
2481         #
2482         #  @ref tui_creation_box "Example"
2483         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2484             """
2485             Create a box with two specified opposite vertices,
2486             and with edges, parallel to the coordinate axes
2487
2488             Parameters:
2489                 thePnt1 First of two opposite vertices.
2490                 thePnt2 Second of two opposite vertices.
2491                 theName Object name; when specified, this parameter is used
2492                         for result publication in the study. Otherwise, if automatic
2493                         publication is switched on, default value is used for result name.
2494
2495             Returns:
2496                 New GEOM.GEOM_Object, containing the created box.
2497             """
2498             # Example: see GEOM_TestAll.py
2499             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2500             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2501             self._autoPublish(anObj, theName, "box")
2502             return anObj
2503
2504         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2505         #  @param theH height of Face.
2506         #  @param theW width of Face.
2507         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2508         #  @param theName Object name; when specified, this parameter is used
2509         #         for result publication in the study. Otherwise, if automatic
2510         #         publication is switched on, default value is used for result name.
2511         #
2512         #  @return New GEOM.GEOM_Object, containing the created face.
2513         #
2514         #  @ref tui_creation_face "Example"
2515         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2516             """
2517             Create a face with specified dimensions with edges parallel to coordinate axes.
2518
2519             Parameters:
2520                 theH height of Face.
2521                 theW width of Face.
2522                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2523                 theName Object name; when specified, this parameter is used
2524                         for result publication in the study. Otherwise, if automatic
2525                         publication is switched on, default value is used for result name.
2526
2527             Returns:
2528                 New GEOM.GEOM_Object, containing the created face.
2529             """
2530             # Example: see GEOM_TestAll.py
2531             theH,theW,Parameters = ParseParameters(theH, theW)
2532             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2533             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2534             anObj.SetParameters(Parameters)
2535             self._autoPublish(anObj, theName, "rectangle")
2536             return anObj
2537
2538         ## Create a face from another plane and two sizes,
2539         #  vertical size and horisontal size.
2540         #  @param theObj   Normale vector to the creating face or
2541         #  the face object.
2542         #  @param theH     Height (vertical size).
2543         #  @param theW     Width (horisontal size).
2544         #  @param theName Object name; when specified, this parameter is used
2545         #         for result publication in the study. Otherwise, if automatic
2546         #         publication is switched on, default value is used for result name.
2547         #
2548         #  @return New GEOM.GEOM_Object, containing the created face.
2549         #
2550         #  @ref tui_creation_face "Example"
2551         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2552             """
2553             Create a face from another plane and two sizes,
2554             vertical size and horisontal size.
2555
2556             Parameters:
2557                 theObj   Normale vector to the creating face or
2558                          the face object.
2559                 theH     Height (vertical size).
2560                 theW     Width (horisontal size).
2561                 theName Object name; when specified, this parameter is used
2562                         for result publication in the study. Otherwise, if automatic
2563                         publication is switched on, default value is used for result name.
2564
2565             Returns:
2566                 New GEOM_Object, containing the created face.
2567             """
2568             # Example: see GEOM_TestAll.py
2569             theH,theW,Parameters = ParseParameters(theH, theW)
2570             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2571             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2572             anObj.SetParameters(Parameters)
2573             self._autoPublish(anObj, theName, "rectangle")
2574             return anObj
2575
2576         ## Create a disk with given center, normal vector and radius.
2577         #  @param thePnt Disk center.
2578         #  @param theVec Vector, normal to the plane of the disk.
2579         #  @param theR Disk radius.
2580         #  @param theName Object name; when specified, this parameter is used
2581         #         for result publication in the study. Otherwise, if automatic
2582         #         publication is switched on, default value is used for result name.
2583         #
2584         #  @return New GEOM.GEOM_Object, containing the created disk.
2585         #
2586         #  @ref tui_creation_disk "Example"
2587         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2588             """
2589             Create a disk with given center, normal vector and radius.
2590
2591             Parameters:
2592                 thePnt Disk center.
2593                 theVec Vector, normal to the plane of the disk.
2594                 theR Disk radius.
2595                 theName Object name; when specified, this parameter is used
2596                         for result publication in the study. Otherwise, if automatic
2597                         publication is switched on, default value is used for result name.
2598
2599             Returns:    
2600                 New GEOM.GEOM_Object, containing the created disk.
2601             """
2602             # Example: see GEOM_TestAll.py
2603             theR,Parameters = ParseParameters(theR)
2604             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2605             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2606             anObj.SetParameters(Parameters)
2607             self._autoPublish(anObj, theName, "disk")
2608             return anObj
2609
2610         ## Create a disk, passing through three given points
2611         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2612         #  @param theName Object name; when specified, this parameter is used
2613         #         for result publication in the study. Otherwise, if automatic
2614         #         publication is switched on, default value is used for result name.
2615         #
2616         #  @return New GEOM.GEOM_Object, containing the created disk.
2617         #
2618         #  @ref tui_creation_disk "Example"
2619         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2620             """
2621             Create a disk, passing through three given points
2622
2623             Parameters:
2624                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2625                 theName Object name; when specified, this parameter is used
2626                         for result publication in the study. Otherwise, if automatic
2627                         publication is switched on, default value is used for result name.
2628
2629             Returns:    
2630                 New GEOM.GEOM_Object, containing the created disk.
2631             """
2632             # Example: see GEOM_TestAll.py
2633             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2634             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2635             self._autoPublish(anObj, theName, "disk")
2636             return anObj
2637
2638         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2639         #  @param theR Radius of Face.
2640         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2641         #  @param theName Object name; when specified, this parameter is used
2642         #         for result publication in the study. Otherwise, if automatic
2643         #         publication is switched on, default value is used for result name.
2644         #
2645         #  @return New GEOM.GEOM_Object, containing the created disk.
2646         #
2647         #  @ref tui_creation_face "Example"
2648         def MakeDiskR(self, theR, theOrientation, theName=None):
2649             """
2650             Create a disk with specified dimensions along OX-OY coordinate axes.
2651
2652             Parameters:
2653                 theR Radius of Face.
2654                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2655                 theName Object name; when specified, this parameter is used
2656                         for result publication in the study. Otherwise, if automatic
2657                         publication is switched on, default value is used for result name.
2658
2659             Returns: 
2660                 New GEOM.GEOM_Object, containing the created disk.
2661
2662             Example of usage:
2663                 Disk3 = geompy.MakeDiskR(100., 1)
2664             """
2665             # Example: see GEOM_TestAll.py
2666             theR,Parameters = ParseParameters(theR)
2667             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2668             RaiseIfFailed("MakeDiskR", self.PrimOp)
2669             anObj.SetParameters(Parameters)
2670             self._autoPublish(anObj, theName, "disk")
2671             return anObj
2672
2673         ## Create a cylinder with given base point, axis, radius and height.
2674         #  @param thePnt Central point of cylinder base.
2675         #  @param theAxis Cylinder axis.
2676         #  @param theR Cylinder radius.
2677         #  @param theH Cylinder height.
2678         #  @param theName Object name; when specified, this parameter is used
2679         #         for result publication in the study. Otherwise, if automatic
2680         #         publication is switched on, default value is used for result name.
2681         #
2682         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2683         #
2684         #  @ref tui_creation_cylinder "Example"
2685         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2686             """
2687             Create a cylinder with given base point, axis, radius and height.
2688
2689             Parameters:
2690                 thePnt Central point of cylinder base.
2691                 theAxis Cylinder axis.
2692                 theR Cylinder radius.
2693                 theH Cylinder height.
2694                 theName Object name; when specified, this parameter is used
2695                         for result publication in the study. Otherwise, if automatic
2696                         publication is switched on, default value is used for result name.
2697
2698             Returns: 
2699                 New GEOM.GEOM_Object, containing the created cylinder.
2700             """
2701             # Example: see GEOM_TestAll.py
2702             theR,theH,Parameters = ParseParameters(theR, theH)
2703             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2704             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2705             anObj.SetParameters(Parameters)
2706             self._autoPublish(anObj, theName, "cylinder")
2707             return anObj
2708
2709         ## Create a cylinder with given radius and height at
2710         #  the origin of coordinate system. Axis of the cylinder
2711         #  will be collinear to the OZ axis of the coordinate system.
2712         #  @param theR Cylinder radius.
2713         #  @param theH Cylinder height.
2714         #  @param theName Object name; when specified, this parameter is used
2715         #         for result publication in the study. Otherwise, if automatic
2716         #         publication is switched on, default value is used for result name.
2717         #
2718         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2719         #
2720         #  @ref tui_creation_cylinder "Example"
2721         def MakeCylinderRH(self, theR, theH, theName=None):
2722             """
2723             Create a cylinder with given radius and height at
2724             the origin of coordinate system. Axis of the cylinder
2725             will be collinear to the OZ axis of the coordinate system.
2726
2727             Parameters:
2728                 theR Cylinder radius.
2729                 theH Cylinder height.
2730                 theName Object name; when specified, this parameter is used
2731                         for result publication in the study. Otherwise, if automatic
2732                         publication is switched on, default value is used for result name.
2733
2734             Returns:    
2735                 New GEOM.GEOM_Object, containing the created cylinder.
2736             """
2737             # Example: see GEOM_TestAll.py
2738             theR,theH,Parameters = ParseParameters(theR, theH)
2739             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2740             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2741             anObj.SetParameters(Parameters)
2742             self._autoPublish(anObj, theName, "cylinder")
2743             return anObj
2744
2745         ## Create a sphere with given center and radius.
2746         #  @param thePnt Sphere center.
2747         #  @param theR Sphere radius.
2748         #  @param theName Object name; when specified, this parameter is used
2749         #         for result publication in the study. Otherwise, if automatic
2750         #         publication is switched on, default value is used for result name.
2751         #
2752         #  @return New GEOM.GEOM_Object, containing the created sphere.
2753         #
2754         #  @ref tui_creation_sphere "Example"
2755         def MakeSpherePntR(self, thePnt, theR, theName=None):
2756             """
2757             Create a sphere with given center and radius.
2758
2759             Parameters:
2760                 thePnt Sphere center.
2761                 theR Sphere radius.
2762                 theName Object name; when specified, this parameter is used
2763                         for result publication in the study. Otherwise, if automatic
2764                         publication is switched on, default value is used for result name.
2765
2766             Returns:    
2767                 New GEOM.GEOM_Object, containing the created sphere.            
2768             """
2769             # Example: see GEOM_TestAll.py
2770             theR,Parameters = ParseParameters(theR)
2771             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2772             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2773             anObj.SetParameters(Parameters)
2774             self._autoPublish(anObj, theName, "sphere")
2775             return anObj
2776
2777         ## Create a sphere with given center and radius.
2778         #  @param x,y,z Coordinates of sphere center.
2779         #  @param theR Sphere radius.
2780         #  @param theName Object name; when specified, this parameter is used
2781         #         for result publication in the study. Otherwise, if automatic
2782         #         publication is switched on, default value is used for result name.
2783         #
2784         #  @return New GEOM.GEOM_Object, containing the created sphere.
2785         #
2786         #  @ref tui_creation_sphere "Example"
2787         def MakeSphere(self, x, y, z, theR, theName=None):
2788             """
2789             Create a sphere with given center and radius.
2790
2791             Parameters: 
2792                 x,y,z Coordinates of sphere center.
2793                 theR Sphere radius.
2794                 theName Object name; when specified, this parameter is used
2795                         for result publication in the study. Otherwise, if automatic
2796                         publication is switched on, default value is used for result name.
2797
2798             Returns:
2799                 New GEOM.GEOM_Object, containing the created sphere.
2800             """
2801             # Example: see GEOM_TestAll.py
2802             point = self.MakeVertex(x, y, z)
2803             # note: auto-publishing is done in self.MakeSpherePntR()
2804             anObj = self.MakeSpherePntR(point, theR, theName)
2805             return anObj
2806
2807         ## Create a sphere with given radius at the origin of coordinate system.
2808         #  @param theR Sphere radius.
2809         #  @param theName Object name; when specified, this parameter is used
2810         #         for result publication in the study. Otherwise, if automatic
2811         #         publication is switched on, default value is used for result name.
2812         #
2813         #  @return New GEOM.GEOM_Object, containing the created sphere.
2814         #
2815         #  @ref tui_creation_sphere "Example"
2816         def MakeSphereR(self, theR, theName=None):
2817             """
2818             Create a sphere with given radius at the origin of coordinate system.
2819
2820             Parameters: 
2821                 theR Sphere radius.
2822                 theName Object name; when specified, this parameter is used
2823                         for result publication in the study. Otherwise, if automatic
2824                         publication is switched on, default value is used for result name.
2825
2826             Returns:
2827                 New GEOM.GEOM_Object, containing the created sphere.            
2828             """
2829             # Example: see GEOM_TestAll.py
2830             theR,Parameters = ParseParameters(theR)
2831             anObj = self.PrimOp.MakeSphereR(theR)
2832             RaiseIfFailed("MakeSphereR", self.PrimOp)
2833             anObj.SetParameters(Parameters)
2834             self._autoPublish(anObj, theName, "sphere")
2835             return anObj
2836
2837         ## Create a cone with given base point, axis, height and radiuses.
2838         #  @param thePnt Central point of the first cone base.
2839         #  @param theAxis Cone axis.
2840         #  @param theR1 Radius of the first cone base.
2841         #  @param theR2 Radius of the second cone base.
2842         #    \note If both radiuses are non-zero, the cone will be truncated.
2843         #    \note If the radiuses are equal, a cylinder will be created instead.
2844         #  @param theH Cone height.
2845         #  @param theName Object name; when specified, this parameter is used
2846         #         for result publication in the study. Otherwise, if automatic
2847         #         publication is switched on, default value is used for result name.
2848         #
2849         #  @return New GEOM.GEOM_Object, containing the created cone.
2850         #
2851         #  @ref tui_creation_cone "Example"
2852         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2853             """
2854             Create a cone with given base point, axis, height and radiuses.
2855
2856             Parameters: 
2857                 thePnt Central point of the first cone base.
2858                 theAxis Cone axis.
2859                 theR1 Radius of the first cone base.
2860                 theR2 Radius of the second cone base.
2861                 theH Cone height.
2862                 theName Object name; when specified, this parameter is used
2863                         for result publication in the study. Otherwise, if automatic
2864                         publication is switched on, default value is used for result name.
2865
2866             Note:
2867                 If both radiuses are non-zero, the cone will be truncated.
2868                 If the radiuses are equal, a cylinder will be created instead.
2869
2870             Returns:
2871                 New GEOM.GEOM_Object, containing the created cone.
2872             """
2873             # Example: see GEOM_TestAll.py
2874             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2875             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2876             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2877             anObj.SetParameters(Parameters)
2878             self._autoPublish(anObj, theName, "cone")
2879             return anObj
2880
2881         ## Create a cone with given height and radiuses at
2882         #  the origin of coordinate system. Axis of the cone will
2883         #  be collinear to the OZ axis of the coordinate system.
2884         #  @param theR1 Radius of the first cone base.
2885         #  @param theR2 Radius of the second cone base.
2886         #    \note If both radiuses are non-zero, the cone will be truncated.
2887         #    \note If the radiuses are equal, a cylinder will be created instead.
2888         #  @param theH Cone height.
2889         #  @param theName Object name; when specified, this parameter is used
2890         #         for result publication in the study. Otherwise, if automatic
2891         #         publication is switched on, default value is used for result name.
2892         #
2893         #  @return New GEOM.GEOM_Object, containing the created cone.
2894         #
2895         #  @ref tui_creation_cone "Example"
2896         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
2897             """
2898             Create a cone with given height and radiuses at
2899             the origin of coordinate system. Axis of the cone will
2900             be collinear to the OZ axis of the coordinate system.
2901
2902             Parameters: 
2903                 theR1 Radius of the first cone base.
2904                 theR2 Radius of the second cone base.
2905                 theH Cone height.
2906                 theName Object name; when specified, this parameter is used
2907                         for result publication in the study. Otherwise, if automatic
2908                         publication is switched on, default value is used for result name.
2909
2910             Note:
2911                 If both radiuses are non-zero, the cone will be truncated.
2912                 If the radiuses are equal, a cylinder will be created instead.
2913
2914             Returns:
2915                 New GEOM.GEOM_Object, containing the created cone.
2916             """
2917             # Example: see GEOM_TestAll.py
2918             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2919             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
2920             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
2921             anObj.SetParameters(Parameters)
2922             self._autoPublish(anObj, theName, "cone")
2923             return anObj
2924
2925         ## Create a torus with given center, normal vector and radiuses.
2926         #  @param thePnt Torus central point.
2927         #  @param theVec Torus axis of symmetry.
2928         #  @param theRMajor Torus major radius.
2929         #  @param theRMinor Torus minor radius.
2930         #  @param theName Object name; when specified, this parameter is used
2931         #         for result publication in the study. Otherwise, if automatic
2932         #         publication is switched on, default value is used for result name.
2933         #
2934         #  @return New GEOM.GEOM_Object, containing the created torus.
2935         #
2936         #  @ref tui_creation_torus "Example"
2937         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
2938             """
2939             Create a torus with given center, normal vector and radiuses.
2940
2941             Parameters: 
2942                 thePnt Torus central point.
2943                 theVec Torus axis of symmetry.
2944                 theRMajor Torus major radius.
2945                 theRMinor Torus minor radius.
2946                 theName Object name; when specified, this parameter is used
2947                         for result publication in the study. Otherwise, if automatic
2948                         publication is switched on, default value is used for result name.
2949
2950            Returns:
2951                 New GEOM.GEOM_Object, containing the created torus.
2952             """
2953             # Example: see GEOM_TestAll.py
2954             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
2955             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
2956             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
2957             anObj.SetParameters(Parameters)
2958             self._autoPublish(anObj, theName, "torus")
2959             return anObj
2960
2961         ## Create a torus with given radiuses at the origin of coordinate system.
2962         #  @param theRMajor Torus major radius.
2963         #  @param theRMinor Torus minor radius.
2964         #  @param theName Object name; when specified, this parameter is used
2965         #         for result publication in the study. Otherwise, if automatic
2966         #         publication is switched on, default value is used for result name.
2967         #
2968         #  @return New GEOM.GEOM_Object, containing the created torus.
2969         #
2970         #  @ref tui_creation_torus "Example"
2971         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
2972             """
2973            Create a torus with given radiuses at the origin of coordinate system.
2974
2975            Parameters: 
2976                 theRMajor Torus major radius.
2977                 theRMinor Torus minor radius.
2978                 theName Object name; when specified, this parameter is used
2979                         for result publication in the study. Otherwise, if automatic
2980                         publication is switched on, default value is used for result name.
2981
2982            Returns:
2983                 New GEOM.GEOM_Object, containing the created torus.            
2984             """
2985             # Example: see GEOM_TestAll.py
2986             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
2987             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
2988             RaiseIfFailed("MakeTorusRR", self.PrimOp)
2989             anObj.SetParameters(Parameters)
2990             self._autoPublish(anObj, theName, "torus")
2991             return anObj
2992
2993         # end of l3_3d_primitives
2994         ## @}
2995
2996         ## @addtogroup l3_complex
2997         ## @{
2998
2999         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3000         #  @param theBase Base shape to be extruded.
3001         #  @param thePoint1 First end of extrusion vector.
3002         #  @param thePoint2 Second end of extrusion vector.
3003         #  @param theScaleFactor Use it to make prism with scaled second base.
3004         #                        Nagative value means not scaled second base.
3005         #  @param theName Object name; when specified, this parameter is used
3006         #         for result publication in the study. Otherwise, if automatic
3007         #         publication is switched on, default value is used for result name.
3008         #
3009         #  @return New GEOM.GEOM_Object, containing the created prism.
3010         #
3011         #  @ref tui_creation_prism "Example"
3012         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3013             """
3014             Create a shape by extrusion of the base shape along a vector, defined by two points.
3015
3016             Parameters: 
3017                 theBase Base shape to be extruded.
3018                 thePoint1 First end of extrusion vector.
3019                 thePoint2 Second end of extrusion vector.
3020                 theScaleFactor Use it to make prism with scaled second base.
3021                                Nagative value means not scaled second base.
3022                 theName Object name; when specified, this parameter is used
3023                         for result publication in the study. Otherwise, if automatic
3024                         publication is switched on, default value is used for result name.
3025
3026             Returns:
3027                 New GEOM.GEOM_Object, containing the created prism.
3028             """
3029             # Example: see GEOM_TestAll.py
3030             anObj = None
3031             Parameters = ""
3032             if theScaleFactor > 0:
3033                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3034                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3035             else:
3036                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3037             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3038             anObj.SetParameters(Parameters)
3039             self._autoPublish(anObj, theName, "prism")
3040             return anObj
3041
3042         ## Create a shape by extrusion of the base shape along a
3043         #  vector, defined by two points, in 2 Ways (forward/backward).
3044         #  @param theBase Base shape to be extruded.
3045         #  @param thePoint1 First end of extrusion vector.
3046         #  @param thePoint2 Second end of extrusion vector.
3047         #  @param theName Object name; when specified, this parameter is used
3048         #         for result publication in the study. Otherwise, if automatic
3049         #         publication is switched on, default value is used for result name.
3050         #
3051         #  @return New GEOM.GEOM_Object, containing the created prism.
3052         #
3053         #  @ref tui_creation_prism "Example"
3054         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3055             """
3056             Create a shape by extrusion of the base shape along a
3057             vector, defined by two points, in 2 Ways (forward/backward).
3058
3059             Parameters: 
3060                 theBase Base shape to be extruded.
3061                 thePoint1 First end of extrusion vector.
3062                 thePoint2 Second end of extrusion vector.
3063                 theName Object name; when specified, this parameter is used
3064                         for result publication in the study. Otherwise, if automatic
3065                         publication is switched on, default value is used for result name.
3066
3067             Returns:
3068                 New GEOM.GEOM_Object, containing the created prism.
3069             """
3070             # Example: see GEOM_TestAll.py
3071             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3072             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3073             self._autoPublish(anObj, theName, "prism")
3074             return anObj
3075
3076         ## Create a shape by extrusion of the base shape along the vector,
3077         #  i.e. all the space, transfixed by the base shape during its translation
3078         #  along the vector on the given distance.
3079         #  @param theBase Base shape to be extruded.
3080         #  @param theVec Direction of extrusion.
3081         #  @param theH Prism dimension along theVec.
3082         #  @param theScaleFactor Use it to make prism with scaled second base.
3083         #                        Negative value means not scaled second base.
3084         #  @param theName Object name; when specified, this parameter is used
3085         #         for result publication in the study. Otherwise, if automatic
3086         #         publication is switched on, default value is used for result name.
3087         #
3088         #  @return New GEOM.GEOM_Object, containing the created prism.
3089         #
3090         #  @ref tui_creation_prism "Example"
3091         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3092             """
3093             Create a shape by extrusion of the base shape along the vector,
3094             i.e. all the space, transfixed by the base shape during its translation
3095             along the vector on the given distance.
3096
3097             Parameters: 
3098                 theBase Base shape to be extruded.
3099                 theVec Direction of extrusion.
3100                 theH Prism dimension along theVec.
3101                 theScaleFactor Use it to make prism with scaled second base.
3102                                Negative value means not scaled second base.
3103                 theName Object name; when specified, this parameter is used
3104                         for result publication in the study. Otherwise, if automatic
3105                         publication is switched on, default value is used for result name.
3106
3107             Returns:
3108                 New GEOM.GEOM_Object, containing the created prism.
3109             """
3110             # Example: see GEOM_TestAll.py
3111             anObj = None
3112             Parameters = ""
3113             if theScaleFactor > 0:
3114                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3115                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3116             else:
3117                 theH,Parameters = ParseParameters(theH)
3118                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3119             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3120             anObj.SetParameters(Parameters)
3121             self._autoPublish(anObj, theName, "prism")
3122             return anObj
3123
3124         ## Create a shape by extrusion of the base shape along the vector,
3125         #  i.e. all the space, transfixed by the base shape during its translation
3126         #  along the vector on the given distance in 2 Ways (forward/backward).
3127         #  @param theBase Base shape to be extruded.
3128         #  @param theVec Direction of extrusion.
3129         #  @param theH Prism dimension along theVec in forward direction.
3130         #  @param theName Object name; when specified, this parameter is used
3131         #         for result publication in the study. Otherwise, if automatic
3132         #         publication is switched on, default value is used for result name.
3133         #
3134         #  @return New GEOM.GEOM_Object, containing the created prism.
3135         #
3136         #  @ref tui_creation_prism "Example"
3137         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3138             """
3139             Create a shape by extrusion of the base shape along the vector,
3140             i.e. all the space, transfixed by the base shape during its translation
3141             along the vector on the given distance in 2 Ways (forward/backward).
3142
3143             Parameters:
3144                 theBase Base shape to be extruded.
3145                 theVec Direction of extrusion.
3146                 theH Prism dimension along theVec in forward direction.
3147                 theName Object name; when specified, this parameter is used
3148                         for result publication in the study. Otherwise, if automatic
3149                         publication is switched on, default value is used for result name.
3150
3151             Returns:
3152                 New GEOM.GEOM_Object, containing the created prism.
3153             """
3154             # Example: see GEOM_TestAll.py
3155             theH,Parameters = ParseParameters(theH)
3156             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3157             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3158             anObj.SetParameters(Parameters)
3159             self._autoPublish(anObj, theName, "prism")
3160             return anObj
3161
3162         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3163         #  @param theBase Base shape to be extruded.
3164         #  @param theDX, theDY, theDZ Directions of extrusion.
3165         #  @param theScaleFactor Use it to make prism with scaled second base.
3166         #                        Nagative value means not scaled second base.
3167         #  @param theName Object name; when specified, this parameter is used
3168         #         for result publication in the study. Otherwise, if automatic
3169         #         publication is switched on, default value is used for result name.
3170         #
3171         #  @return New GEOM.GEOM_Object, containing the created prism.
3172         #
3173         #  @ref tui_creation_prism "Example"
3174         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3175             """
3176             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3177
3178             Parameters:
3179                 theBase Base shape to be extruded.
3180                 theDX, theDY, theDZ Directions of extrusion.
3181                 theScaleFactor Use it to make prism with scaled second base.
3182                                Nagative value means not scaled second base.
3183                 theName Object name; when specified, this parameter is used
3184                         for result publication in the study. Otherwise, if automatic
3185                         publication is switched on, default value is used for result name.
3186
3187             Returns: 
3188                 New GEOM.GEOM_Object, containing the created prism.
3189             """
3190             # Example: see GEOM_TestAll.py
3191             anObj = None
3192             Parameters = ""
3193             if theScaleFactor > 0:
3194                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3195                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3196             else:
3197                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3198                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3199             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3200             anObj.SetParameters(Parameters)
3201             self._autoPublish(anObj, theName, "prism")
3202             return anObj
3203
3204         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3205         #  i.e. all the space, transfixed by the base shape during its translation
3206         #  along the vector on the given distance in 2 Ways (forward/backward).
3207         #  @param theBase Base shape to be extruded.
3208         #  @param theDX, theDY, theDZ Directions of extrusion.
3209         #  @param theName Object name; when specified, this parameter is used
3210         #         for result publication in the study. Otherwise, if automatic
3211         #         publication is switched on, default value is used for result name.
3212         #
3213         #  @return New GEOM.GEOM_Object, containing the created prism.
3214         #
3215         #  @ref tui_creation_prism "Example"
3216         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3217             """
3218             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3219             i.e. all the space, transfixed by the base shape during its translation
3220             along the vector on the given distance in 2 Ways (forward/backward).
3221
3222             Parameters:
3223                 theBase Base shape to be extruded.
3224                 theDX, theDY, theDZ Directions of extrusion.
3225                 theName Object name; when specified, this parameter is used
3226                         for result publication in the study. Otherwise, if automatic
3227                         publication is switched on, default value is used for result name.
3228
3229             Returns:
3230                 New GEOM.GEOM_Object, containing the created prism.
3231             """
3232             # Example: see GEOM_TestAll.py
3233             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3234             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3235             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3236             anObj.SetParameters(Parameters)
3237             self._autoPublish(anObj, theName, "prism")
3238             return anObj
3239
3240         ## Create a shape by revolution of the base shape around the axis
3241         #  on the given angle, i.e. all the space, transfixed by the base
3242         #  shape during its rotation around the axis on the given angle.
3243         #  @param theBase Base shape to be rotated.
3244         #  @param theAxis Rotation axis.
3245         #  @param theAngle Rotation angle in radians.
3246         #  @param theName Object name; when specified, this parameter is used
3247         #         for result publication in the study. Otherwise, if automatic
3248         #         publication is switched on, default value is used for result name.
3249         #
3250         #  @return New GEOM.GEOM_Object, containing the created revolution.
3251         #
3252         #  @ref tui_creation_revolution "Example"
3253         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3254             """
3255             Create a shape by revolution of the base shape around the axis
3256             on the given angle, i.e. all the space, transfixed by the base
3257             shape during its rotation around the axis on the given angle.
3258
3259             Parameters:
3260                 theBase Base shape to be rotated.
3261                 theAxis Rotation axis.
3262                 theAngle Rotation angle in radians.
3263                 theName Object name; when specified, this parameter is used
3264                         for result publication in the study. Otherwise, if automatic
3265                         publication is switched on, default value is used for result name.
3266
3267             Returns: 
3268                 New GEOM.GEOM_Object, containing the created revolution.
3269             """
3270             # Example: see GEOM_TestAll.py
3271             theAngle,Parameters = ParseParameters(theAngle)
3272             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3273             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3274             anObj.SetParameters(Parameters)
3275             self._autoPublish(anObj, theName, "revolution")
3276             return anObj
3277
3278         ## Create a shape by revolution of the base shape around the axis
3279         #  on the given angle, i.e. all the space, transfixed by the base
3280         #  shape during its rotation around the axis on the given angle in
3281         #  both directions (forward/backward)
3282         #  @param theBase Base shape to be rotated.
3283         #  @param theAxis Rotation axis.
3284         #  @param theAngle Rotation angle in radians.
3285         #  @param theName Object name; when specified, this parameter is used
3286         #         for result publication in the study. Otherwise, if automatic
3287         #         publication is switched on, default value is used for result name.
3288         #
3289         #  @return New GEOM.GEOM_Object, containing the created revolution.
3290         #
3291         #  @ref tui_creation_revolution "Example"
3292         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3293             """
3294             Create a shape by revolution of the base shape around the axis
3295             on the given angle, i.e. all the space, transfixed by the base
3296             shape during its rotation around the axis on the given angle in
3297             both directions (forward/backward).
3298
3299             Parameters:
3300                 theBase Base shape to be rotated.
3301                 theAxis Rotation axis.
3302                 theAngle Rotation angle in radians.
3303                 theName Object name; when specified, this parameter is used
3304                         for result publication in the study. Otherwise, if automatic
3305                         publication is switched on, default value is used for result name.
3306
3307             Returns: 
3308                 New GEOM.GEOM_Object, containing the created revolution.
3309             """
3310             theAngle,Parameters = ParseParameters(theAngle)
3311             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3312             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3313             anObj.SetParameters(Parameters)
3314             self._autoPublish(anObj, theName, "revolution")
3315             return anObj
3316
3317         ## Create a filling from the given compound of contours.
3318         #  @param theShape the compound of contours
3319         #  @param theMinDeg a minimal degree of BSpline surface to create
3320         #  @param theMaxDeg a maximal degree of BSpline surface to create
3321         #  @param theTol2D a 2d tolerance to be reached
3322         #  @param theTol3D a 3d tolerance to be reached
3323         #  @param theNbIter a number of iteration of approximation algorithm
3324         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3325         #  @param isApprox if True, BSpline curves are generated in the process
3326         #                  of surface construction. By default it is False, that means
3327         #                  the surface is created using given curves. The usage of
3328         #                  Approximation makes the algorithm work slower, but allows
3329         #                  building the surface for rather complex cases.
3330         #  @param theName Object name; when specified, this parameter is used
3331         #         for result publication in the study. Otherwise, if automatic
3332         #         publication is switched on, default value is used for result name.
3333         #
3334         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3335         #
3336         #  @ref tui_creation_filling "Example"
3337         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3338                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3339             """
3340             Create a filling from the given compound of contours.
3341
3342             Parameters:
3343                 theShape the compound of contours
3344                 theMinDeg a minimal degree of BSpline surface to create
3345                 theMaxDeg a maximal degree of BSpline surface to create
3346                 theTol2D a 2d tolerance to be reached
3347                 theTol3D a 3d tolerance to be reached
3348                 theNbIter a number of iteration of approximation algorithm
3349                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3350                 isApprox if True, BSpline curves are generated in the process
3351                          of surface construction. By default it is False, that means
3352                          the surface is created using given curves. The usage of
3353                          Approximation makes the algorithm work slower, but allows
3354                          building the surface for rather complex cases
3355                 theName Object name; when specified, this parameter is used
3356                         for result publication in the study. Otherwise, if automatic
3357                         publication is switched on, default value is used for result name.
3358
3359             Returns: 
3360                 New GEOM.GEOM_Object, containing the created filling surface.
3361
3362             Example of usage:
3363                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3364             """
3365             # Example: see GEOM_TestAll.py
3366             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3367             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3368                                             theTol2D, theTol3D, theNbIter,
3369                                             theMethod, isApprox)
3370             RaiseIfFailed("MakeFilling", self.PrimOp)
3371             anObj.SetParameters(Parameters)
3372             self._autoPublish(anObj, theName, "filling")
3373             return anObj
3374
3375
3376         ## Create a filling from the given compound of contours.
3377         #  This method corresponds to MakeFilling with isApprox=True
3378         #  @param theShape the compound of contours
3379         #  @param theMinDeg a minimal degree of BSpline surface to create
3380         #  @param theMaxDeg a maximal degree of BSpline surface to create
3381         #  @param theTol3D a 3d tolerance to be reached
3382         #  @param theName Object name; when specified, this parameter is used
3383         #         for result publication in the study. Otherwise, if automatic
3384         #         publication is switched on, default value is used for result name.
3385         #
3386         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3387         #
3388         #  @ref tui_creation_filling "Example"
3389         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3390             """
3391             Create a filling from the given compound of contours.
3392             This method corresponds to MakeFilling with isApprox=True
3393
3394             Parameters:
3395                 theShape the compound of contours
3396                 theMinDeg a minimal degree of BSpline surface to create
3397                 theMaxDeg a maximal degree of BSpline surface to create
3398                 theTol3D a 3d tolerance to be reached
3399                 theName Object name; when specified, this parameter is used
3400                         for result publication in the study. Otherwise, if automatic
3401                         publication is switched on, default value is used for result name.
3402
3403             Returns: 
3404                 New GEOM.GEOM_Object, containing the created filling surface.
3405
3406             Example of usage:
3407                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3408             """
3409             # Example: see GEOM_TestAll.py
3410             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3411             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3412                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3413             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3414             anObj.SetParameters(Parameters)
3415             self._autoPublish(anObj, theName, "filling")
3416             return anObj
3417
3418         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3419         #  @param theSeqSections - set of specified sections.
3420         #  @param theModeSolid - mode defining building solid or shell
3421         #  @param thePreci - precision 3D used for smoothing
3422         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3423         #  @param theName Object name; when specified, this parameter is used
3424         #         for result publication in the study. Otherwise, if automatic
3425         #         publication is switched on, default value is used for result name.
3426         #
3427         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3428         #
3429         #  @ref swig_todo "Example"
3430         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3431             """
3432             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3433
3434             Parameters:
3435                 theSeqSections - set of specified sections.
3436                 theModeSolid - mode defining building solid or shell
3437                 thePreci - precision 3D used for smoothing
3438                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3439                 theName Object name; when specified, this parameter is used
3440                         for result publication in the study. Otherwise, if automatic
3441                         publication is switched on, default value is used for result name.
3442
3443             Returns:
3444                 New GEOM.GEOM_Object, containing the created shell or solid.
3445             """
3446             # Example: see GEOM_TestAll.py
3447             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3448             RaiseIfFailed("MakeThruSections", self.PrimOp)
3449             self._autoPublish(anObj, theName, "filling")
3450             return anObj
3451
3452         ## Create a shape by extrusion of the base shape along
3453         #  the path shape. The path shape can be a wire or an edge.
3454         #  @param theBase Base shape to be extruded.
3455         #  @param thePath Path shape to extrude the base shape along it.
3456         #  @param theName Object name; when specified, this parameter is used
3457         #         for result publication in the study. Otherwise, if automatic
3458         #         publication is switched on, default value is used for result name.
3459         #
3460         #  @return New GEOM.GEOM_Object, containing the created pipe.
3461         #
3462         #  @ref tui_creation_pipe "Example"
3463         def MakePipe(self, theBase, thePath, theName=None):
3464             """
3465             Create a shape by extrusion of the base shape along
3466             the path shape. The path shape can be a wire or an edge.
3467
3468             Parameters:
3469                 theBase Base shape to be extruded.
3470                 thePath Path shape to extrude the base shape along it.
3471                 theName Object name; when specified, this parameter is used
3472                         for result publication in the study. Otherwise, if automatic
3473                         publication is switched on, default value is used for result name.
3474
3475             Returns:
3476                 New GEOM.GEOM_Object, containing the created pipe.
3477             """
3478             # Example: see GEOM_TestAll.py
3479             anObj = self.PrimOp.MakePipe(theBase, thePath)
3480             RaiseIfFailed("MakePipe", self.PrimOp)
3481             self._autoPublish(anObj, theName, "pipe")
3482             return anObj
3483
3484         ## Create a shape by extrusion of the profile shape along
3485         #  the path shape. The path shape can be a wire or an edge.
3486         #  the several profiles can be specified in the several locations of path.
3487         #  @param theSeqBases - list of  Bases shape to be extruded.
3488         #  @param theLocations - list of locations on the path corresponding
3489         #                        specified list of the Bases shapes. Number of locations
3490         #                        should be equal to number of bases or list of locations can be empty.
3491         #  @param thePath - Path shape to extrude the base shape along it.
3492         #  @param theWithContact - the mode defining that the section is translated to be in
3493         #                          contact with the spine.
3494         #  @param theWithCorrection - defining that the section is rotated to be
3495         #                             orthogonal to the spine tangent in the correspondent point
3496         #  @param theName Object name; when specified, this parameter is used
3497         #         for result publication in the study. Otherwise, if automatic
3498         #         publication is switched on, default value is used for result name.
3499         #
3500         #  @return New GEOM.GEOM_Object, containing the created pipe.
3501         #
3502         #  @ref tui_creation_pipe_with_diff_sec "Example"
3503         def MakePipeWithDifferentSections(self, theSeqBases,
3504                                           theLocations, thePath,
3505                                           theWithContact, theWithCorrection, theName=None):
3506             """
3507             Create a shape by extrusion of the profile shape along
3508             the path shape. The path shape can be a wire or an edge.
3509             the several profiles can be specified in the several locations of path.
3510
3511             Parameters:
3512                 theSeqBases - list of  Bases shape to be extruded.
3513                 theLocations - list of locations on the path corresponding
3514                                specified list of the Bases shapes. Number of locations
3515                                should be equal to number of bases or list of locations can be empty.
3516                 thePath - Path shape to extrude the base shape along it.
3517                 theWithContact - the mode defining that the section is translated to be in
3518                                  contact with the spine(0/1)
3519                 theWithCorrection - defining that the section is rotated to be
3520                                     orthogonal to the spine tangent in the correspondent point (0/1)
3521                 theName Object name; when specified, this parameter is used
3522                         for result publication in the study. Otherwise, if automatic
3523                         publication is switched on, default value is used for result name.
3524
3525             Returns:
3526                 New GEOM.GEOM_Object, containing the created pipe.
3527             """
3528             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3529                                                               theLocations, thePath,
3530                                                               theWithContact, theWithCorrection)
3531             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3532             self._autoPublish(anObj, theName, "pipe")
3533             return anObj
3534
3535         ## Create a shape by extrusion of the profile shape along
3536         #  the path shape. The path shape can be a wire or a edge.
3537         #  the several profiles can be specified in the several locations of path.
3538         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3539         #                       shell or face. If number of faces in neighbour sections
3540         #                       aren't coincided result solid between such sections will
3541         #                       be created using external boundaries of this shells.
3542         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3543         #                          This list is used for searching correspondences between
3544         #                          faces in the sections. Size of this list must be equal
3545         #                          to size of list of base shapes.
3546         #  @param theLocations - list of locations on the path corresponding
3547         #                        specified list of the Bases shapes. Number of locations
3548         #                        should be equal to number of bases. First and last
3549         #                        locations must be coincided with first and last vertexes
3550         #                        of path correspondingly.
3551         #  @param thePath - Path shape to extrude the base shape along it.
3552         #  @param theWithContact - the mode defining that the section is translated to be in
3553         #                          contact with the spine.
3554         #  @param theWithCorrection - defining that the section is rotated to be
3555         #                             orthogonal to the spine tangent in the correspondent point
3556         #  @param theName Object name; when specified, this parameter is used
3557         #         for result publication in the study. Otherwise, if automatic
3558         #         publication is switched on, default value is used for result name.
3559         #
3560         #  @return New GEOM.GEOM_Object, containing the created solids.
3561         #
3562         #  @ref tui_creation_pipe_with_shell_sec "Example"
3563         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3564                                       theLocations, thePath,
3565                                       theWithContact, theWithCorrection, theName=None):
3566             """
3567             Create a shape by extrusion of the profile shape along
3568             the path shape. The path shape can be a wire or a edge.
3569             the several profiles can be specified in the several locations of path.
3570
3571             Parameters:
3572                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3573                               shell or face. If number of faces in neighbour sections
3574                               aren't coincided result solid between such sections will
3575                               be created using external boundaries of this shells.
3576                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3577                                  This list is used for searching correspondences between
3578                                  faces in the sections. Size of this list must be equal
3579                                  to size of list of base shapes.
3580                 theLocations - list of locations on the path corresponding
3581                                specified list of the Bases shapes. Number of locations
3582                                should be equal to number of bases. First and last
3583                                locations must be coincided with first and last vertexes
3584                                of path correspondingly.
3585                 thePath - Path shape to extrude the base shape along it.
3586                 theWithContact - the mode defining that the section is translated to be in
3587                                  contact with the spine (0/1)
3588                 theWithCorrection - defining that the section is rotated to be
3589                                     orthogonal to the spine tangent in the correspondent point (0/1)
3590                 theName Object name; when specified, this parameter is used
3591                         for result publication in the study. Otherwise, if automatic
3592                         publication is switched on, default value is used for result name.
3593
3594             Returns:                           
3595                 New GEOM.GEOM_Object, containing the created solids.
3596             """
3597             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3598                                                           theLocations, thePath,
3599                                                           theWithContact, theWithCorrection)
3600             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3601             self._autoPublish(anObj, theName, "pipe")
3602             return anObj
3603
3604         ## Create a shape by extrusion of the profile shape along
3605         #  the path shape. This function is used only for debug pipe
3606         #  functionality - it is a version of function MakePipeWithShellSections()
3607         #  which give a possibility to recieve information about
3608         #  creating pipe between each pair of sections step by step.
3609         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3610                                              theLocations, thePath,
3611                                              theWithContact, theWithCorrection, theName=None):
3612             """
3613             Create a shape by extrusion of the profile shape along
3614             the path shape. This function is used only for debug pipe
3615             functionality - it is a version of previous function
3616             geompy.MakePipeWithShellSections() which give a possibility to
3617             recieve information about creating pipe between each pair of
3618             sections step by step.
3619             """
3620             res = []
3621             nbsect = len(theSeqBases)
3622             nbsubsect = len(theSeqSubBases)
3623             #print "nbsect = ",nbsect
3624             for i in range(1,nbsect):
3625                 #print "  i = ",i
3626                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3627                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3628                 tmpSeqSubBases = []
3629                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3630                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3631                                                               tmpLocations, thePath,
3632                                                               theWithContact, theWithCorrection)
3633                 if self.PrimOp.IsDone() == 0:
3634                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3635                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3636                     break
3637                 else:
3638                     print "Pipe between ",i," and ",i+1," sections is OK"
3639                     res.append(anObj)
3640                     pass
3641                 pass
3642
3643             resc = self.MakeCompound(res)
3644             #resc = self.MakeSewing(res, 0.001)
3645             #print "resc: ",resc
3646             self._autoPublish(resc, theName, "pipe")
3647             return resc
3648
3649         ## Create solids between given sections
3650         #  @param theSeqBases - list of sections (shell or face).
3651         #  @param theLocations - list of corresponding vertexes
3652         #  @param theName Object name; when specified, this parameter is used
3653         #         for result publication in the study. Otherwise, if automatic
3654         #         publication is switched on, default value is used for result name.
3655         #
3656         #  @return New GEOM.GEOM_Object, containing the created solids.
3657         #
3658         #  @ref tui_creation_pipe_without_path "Example"
3659         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3660             """
3661             Create solids between given sections
3662
3663             Parameters:
3664                 theSeqBases - list of sections (shell or face).
3665                 theLocations - list of corresponding vertexes
3666                 theName Object name; when specified, this parameter is used
3667                         for result publication in the study. Otherwise, if automatic
3668                         publication is switched on, default value is used for result name.
3669
3670             Returns:
3671                 New GEOM.GEOM_Object, containing the created solids.
3672             """
3673             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3674             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3675             self._autoPublish(anObj, theName, "pipe")
3676             return anObj
3677
3678         ## Create a shape by extrusion of the base shape along
3679         #  the path shape with constant bi-normal direction along the given vector.
3680         #  The path shape can be a wire or an edge.
3681         #  @param theBase Base shape to be extruded.
3682         #  @param thePath Path shape to extrude the base shape along it.
3683         #  @param theVec Vector defines a constant binormal direction to keep the
3684         #                same angle beetween the direction and the sections
3685         #                along the sweep surface.
3686         #  @param theName Object name; when specified, this parameter is used
3687         #         for result publication in the study. Otherwise, if automatic
3688         #         publication is switched on, default value is used for result name.
3689         #
3690         #  @return New GEOM.GEOM_Object, containing the created pipe.
3691         #
3692         #  @ref tui_creation_pipe "Example"
3693         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3694             """
3695             Create a shape by extrusion of the base shape along
3696             the path shape with constant bi-normal direction along the given vector.
3697             The path shape can be a wire or an edge.
3698
3699             Parameters:
3700                 theBase Base shape to be extruded.
3701                 thePath Path shape to extrude the base shape along it.
3702                 theVec Vector defines a constant binormal direction to keep the
3703                        same angle beetween the direction and the sections
3704                        along the sweep surface.
3705                 theName Object name; when specified, this parameter is used
3706                         for result publication in the study. Otherwise, if automatic
3707                         publication is switched on, default value is used for result name.
3708
3709             Returns:              
3710                 New GEOM.GEOM_Object, containing the created pipe.
3711             """
3712             # Example: see GEOM_TestAll.py
3713             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3714             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3715             self._autoPublish(anObj, theName, "pipe")
3716             return anObj
3717               
3718         ## Makes a thick solid from a face or a shell
3719         #  @param theShape Face or Shell to be thicken
3720         #  @param theThickness Thickness of the resulting solid
3721         #  @param theName Object name; when specified, this parameter is used
3722         #         for result publication in the study. Otherwise, if automatic
3723         #         publication is switched on, default value is used for result name.
3724         #
3725         #  @return New GEOM.GEOM_Object, containing the created solid
3726         #
3727         def MakeThickSolid(self, theShape, theThickness, theName=None):
3728             """
3729             Make a thick solid from a face or a shell
3730
3731             Parameters:
3732                  theShape Face or Shell to be thicken
3733                  theThickness Thickness of the resulting solid
3734                  theName Object name; when specified, this parameter is used
3735                  for result publication in the study. Otherwise, if automatic
3736                  publication is switched on, default value is used for result name.
3737                  
3738             Returns:
3739                 New GEOM.GEOM_Object, containing the created solid
3740             """
3741             # Example: see GEOM_TestAll.py
3742             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3743             RaiseIfFailed("MakeThickening", self.PrimOp)
3744             self._autoPublish(anObj, theName, "pipe")
3745             return anObj
3746             
3747
3748         ## Modifies a face or a shell to make it a thick solid
3749         #  @param theShape Face or Shell to be thicken
3750         #  @param theThickness Thickness of the resulting solid
3751         #
3752         #  @return The modified shape
3753         #
3754         def Thicken(self, theShape, theThickness):
3755             """
3756             Modifies a face or a shell to make it a thick solid
3757
3758             Parameters:
3759                 theBase Base shape to be extruded.
3760                 thePath Path shape to extrude the base shape along it.
3761                 theName Object name; when specified, this parameter is used
3762                         for result publication in the study. Otherwise, if automatic
3763                         publication is switched on, default value is used for result name.
3764
3765             Returns:
3766                 The modified shape
3767             """
3768             # Example: see GEOM_TestAll.py
3769             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3770             RaiseIfFailed("MakeThickening", self.PrimOp)
3771             return anObj
3772
3773         ## Build a middle path of a pipe-like shape.
3774         #  The path shape can be a wire or an edge.
3775         #  @param theShape It can be closed or unclosed pipe-like shell
3776         #                  or a pipe-like solid.
3777         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3778         #                            should be wires or faces of theShape.
3779         #  @param theName Object name; when specified, this parameter is used
3780         #         for result publication in the study. Otherwise, if automatic
3781         #         publication is switched on, default value is used for result name.
3782         #
3783         #  @note It is not assumed that exact or approximate copy of theShape
3784         #        can be obtained by applying existing Pipe operation on the
3785         #        resulting "Path" wire taking theBase1 as the base - it is not
3786         #        always possible; though in some particular cases it might work
3787         #        it is not guaranteed. Thus, RestorePath function should not be
3788         #        considered as an exact reverse operation of the Pipe.
3789         #
3790         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3791         #                                source pipe's "path".
3792         #
3793         #  @ref tui_creation_pipe_path "Example"
3794         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3795             """
3796             Build a middle path of a pipe-like shape.
3797             The path shape can be a wire or an edge.
3798
3799             Parameters:
3800                 theShape It can be closed or unclosed pipe-like shell
3801                          or a pipe-like solid.
3802                 theBase1, theBase2 Two bases of the supposed pipe. This
3803                                    should be wires or faces of theShape.
3804                 theName Object name; when specified, this parameter is used
3805                         for result publication in the study. Otherwise, if automatic
3806                         publication is switched on, default value is used for result name.
3807
3808             Returns:
3809                 New GEOM_Object, containing an edge or wire that represent
3810                                  source pipe's path.
3811             """
3812             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3813             RaiseIfFailed("RestorePath", self.PrimOp)
3814             self._autoPublish(anObj, theName, "path")
3815             return anObj
3816
3817         ## Build a middle path of a pipe-like shape.
3818         #  The path shape can be a wire or an edge.
3819         #  @param theShape It can be closed or unclosed pipe-like shell
3820         #                  or a pipe-like solid.
3821         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3822         #                                should be lists of edges of theShape.
3823         #  @param theName Object name; when specified, this parameter is used
3824         #         for result publication in the study. Otherwise, if automatic
3825         #         publication is switched on, default value is used for result name.
3826         #
3827         #  @note It is not assumed that exact or approximate copy of theShape
3828         #        can be obtained by applying existing Pipe operation on the
3829         #        resulting "Path" wire taking theBase1 as the base - it is not
3830         #        always possible; though in some particular cases it might work
3831         #        it is not guaranteed. Thus, RestorePath function should not be
3832         #        considered as an exact reverse operation of the Pipe.
3833         #
3834         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3835         #                                source pipe's "path".
3836         #
3837         #  @ref tui_creation_pipe_path "Example"
3838         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3839             """
3840             Build a middle path of a pipe-like shape.
3841             The path shape can be a wire or an edge.
3842
3843             Parameters:
3844                 theShape It can be closed or unclosed pipe-like shell
3845                          or a pipe-like solid.
3846                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3847                                        should be lists of edges of theShape.
3848                 theName Object name; when specified, this parameter is used
3849                         for result publication in the study. Otherwise, if automatic
3850                         publication is switched on, default value is used for result name.
3851
3852             Returns:
3853                 New GEOM_Object, containing an edge or wire that represent
3854                                  source pipe's path.
3855             """
3856             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3857             RaiseIfFailed("RestorePath", self.PrimOp)
3858             self._autoPublish(anObj, theName, "path")
3859             return anObj
3860
3861         # end of l3_complex
3862         ## @}
3863
3864         ## @addtogroup l3_advanced
3865         ## @{
3866
3867         ## Create a linear edge with specified ends.
3868         #  @param thePnt1 Point for the first end of edge.
3869         #  @param thePnt2 Point for the second end of edge.
3870         #  @param theName Object name; when specified, this parameter is used
3871         #         for result publication in the study. Otherwise, if automatic
3872         #         publication is switched on, default value is used for result name.
3873         #
3874         #  @return New GEOM.GEOM_Object, containing the created edge.
3875         #
3876         #  @ref tui_creation_edge "Example"
3877         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3878             """
3879             Create a linear edge with specified ends.
3880
3881             Parameters:
3882                 thePnt1 Point for the first end of edge.
3883                 thePnt2 Point for the second end of edge.
3884                 theName Object name; when specified, this parameter is used
3885                         for result publication in the study. Otherwise, if automatic
3886                         publication is switched on, default value is used for result name.
3887
3888             Returns:           
3889                 New GEOM.GEOM_Object, containing the created edge.
3890             """
3891             # Example: see GEOM_TestAll.py
3892             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
3893             RaiseIfFailed("MakeEdge", self.ShapesOp)
3894             self._autoPublish(anObj, theName, "edge")
3895             return anObj
3896
3897         ## Create a new edge, corresponding to the given length on the given curve.
3898         #  @param theRefCurve The referenced curve (edge).
3899         #  @param theLength Length on the referenced curve. It can be negative.
3900         #  @param theStartPoint Any point can be selected for it, the new edge will begin
3901         #                       at the end of \a theRefCurve, close to the selected point.
3902         #                       If None, start from the first point of \a theRefCurve.
3903         #  @param theName Object name; when specified, this parameter is used
3904         #         for result publication in the study. Otherwise, if automatic
3905         #         publication is switched on, default value is used for result name.
3906         #
3907         #  @return New GEOM.GEOM_Object, containing the created edge.
3908         #
3909         #  @ref tui_creation_edge "Example"
3910         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
3911             """
3912             Create a new edge, corresponding to the given length on the given curve.
3913
3914             Parameters:
3915                 theRefCurve The referenced curve (edge).
3916                 theLength Length on the referenced curve. It can be negative.
3917                 theStartPoint Any point can be selected for it, the new edge will begin
3918                               at the end of theRefCurve, close to the selected point.
3919                               If None, start from the first point of theRefCurve.
3920                 theName Object name; when specified, this parameter is used
3921                         for result publication in the study. Otherwise, if automatic
3922                         publication is switched on, default value is used for result name.
3923
3924             Returns:              
3925                 New GEOM.GEOM_Object, containing the created edge.
3926             """
3927             # Example: see GEOM_TestAll.py
3928             theLength, Parameters = ParseParameters(theLength)
3929             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
3930             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
3931             anObj.SetParameters(Parameters)
3932             self._autoPublish(anObj, theName, "edge")
3933             return anObj
3934
3935         ## Create an edge from specified wire.
3936         #  @param theWire source Wire
3937         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
3938         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
3939         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created edge.
3944         #
3945         #  @ref tui_creation_edge "Example"
3946         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
3947             """
3948             Create an edge from specified wire.
3949
3950             Parameters:
3951                 theWire source Wire
3952                 theLinearTolerance linear tolerance value (default = 1e-07)
3953                 theAngularTolerance angular tolerance value (default = 1e-12)
3954                 theName Object name; when specified, this parameter is used
3955                         for result publication in the study. Otherwise, if automatic
3956                         publication is switched on, default value is used for result name.
3957
3958             Returns:
3959                 New GEOM.GEOM_Object, containing the created edge.
3960             """
3961             # Example: see GEOM_TestAll.py
3962             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
3963             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
3964             self._autoPublish(anObj, theName, "edge")
3965             return anObj
3966
3967         ## Create a wire from the set of edges and wires.
3968         #  @param theEdgesAndWires List of edges and/or wires.
3969         #  @param theTolerance Maximum distance between vertices, that will be merged.
3970         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
3971         #  @param theName Object name; when specified, this parameter is used
3972         #         for result publication in the study. Otherwise, if automatic
3973         #         publication is switched on, default value is used for result name.
3974         #
3975         #  @return New GEOM.GEOM_Object, containing the created wire.
3976         #
3977         #  @ref tui_creation_wire "Example"
3978         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
3979             """
3980             Create a wire from the set of edges and wires.
3981
3982             Parameters:
3983                 theEdgesAndWires List of edges and/or wires.
3984                 theTolerance Maximum distance between vertices, that will be merged.
3985                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
3986                 theName Object name; when specified, this parameter is used
3987                         for result publication in the study. Otherwise, if automatic
3988                         publication is switched on, default value is used for result name.
3989
3990             Returns:                    
3991                 New GEOM.GEOM_Object, containing the created wire.
3992             """
3993             # Example: see GEOM_TestAll.py
3994             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
3995             RaiseIfFailed("MakeWire", self.ShapesOp)
3996             self._autoPublish(anObj, theName, "wire")
3997             return anObj
3998
3999         ## Create a face on the given wire.
4000         #  @param theWire closed Wire or Edge to build the face on.
4001         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4002         #                        If the tolerance of the obtained planar face is less
4003         #                        than 1e-06, this face will be returned, otherwise the
4004         #                        algorithm tries to build any suitable face on the given
4005         #                        wire and prints a warning message.
4006         #  @param theName Object name; when specified, this parameter is used
4007         #         for result publication in the study. Otherwise, if automatic
4008         #         publication is switched on, default value is used for result name.
4009         #
4010         #  @return New GEOM.GEOM_Object, containing the created face.
4011         #
4012         #  @ref tui_creation_face "Example"
4013         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4014             """
4015             Create a face on the given wire.
4016
4017             Parameters:
4018                 theWire closed Wire or Edge to build the face on.
4019                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4020                                If the tolerance of the obtained planar face is less
4021                                than 1e-06, this face will be returned, otherwise the
4022                                algorithm tries to build any suitable face on the given
4023                                wire and prints a warning message.
4024                 theName Object name; when specified, this parameter is used
4025                         for result publication in the study. Otherwise, if automatic
4026                         publication is switched on, default value is used for result name.
4027
4028             Returns:
4029                 New GEOM.GEOM_Object, containing the created face.
4030             """
4031             # Example: see GEOM_TestAll.py
4032             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4033             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4034                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4035             else:
4036                 RaiseIfFailed("MakeFace", self.ShapesOp)
4037             self._autoPublish(anObj, theName, "face")
4038             return anObj
4039
4040         ## Create a face on the given wires set.
4041         #  @param theWires List of closed wires or edges to build the face on.
4042         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4043         #                        If the tolerance of the obtained planar face is less
4044         #                        than 1e-06, this face will be returned, otherwise the
4045         #                        algorithm tries to build any suitable face on the given
4046         #                        wire and prints a warning message.
4047         #  @param theName Object name; when specified, this parameter is used
4048         #         for result publication in the study. Otherwise, if automatic
4049         #         publication is switched on, default value is used for result name.
4050         #
4051         #  @return New GEOM.GEOM_Object, containing the created face.
4052         #
4053         #  @ref tui_creation_face "Example"
4054         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4055             """
4056             Create a face on the given wires set.
4057
4058             Parameters:
4059                 theWires List of closed wires or edges to build the face on.
4060                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4061                                If the tolerance of the obtained planar face is less
4062                                than 1e-06, this face will be returned, otherwise the
4063                                algorithm tries to build any suitable face on the given
4064                                wire and prints a warning message.
4065                 theName Object name; when specified, this parameter is used
4066                         for result publication in the study. Otherwise, if automatic
4067                         publication is switched on, default value is used for result name.
4068
4069             Returns: 
4070                 New GEOM.GEOM_Object, containing the created face.
4071             """
4072             # Example: see GEOM_TestAll.py
4073             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4074             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4075                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4076             else:
4077                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4078             self._autoPublish(anObj, theName, "face")
4079             return anObj
4080
4081         ## See MakeFaceWires() method for details.
4082         #
4083         #  @ref tui_creation_face "Example 1"
4084         #  \n @ref swig_MakeFaces  "Example 2"
4085         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4086             """
4087             See geompy.MakeFaceWires() method for details.
4088             """
4089             # Example: see GEOM_TestOthers.py
4090             # note: auto-publishing is done in self.MakeFaceWires()
4091             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4092             return anObj
4093
4094         ## Create a shell from the set of faces and shells.
4095         #  @param theFacesAndShells List of faces and/or shells.
4096         #  @param theName Object name; when specified, this parameter is used
4097         #         for result publication in the study. Otherwise, if automatic
4098         #         publication is switched on, default value is used for result name.
4099         #
4100         #  @return New GEOM.GEOM_Object, containing the created shell.
4101         #
4102         #  @ref tui_creation_shell "Example"
4103         def MakeShell(self, theFacesAndShells, theName=None):
4104             """
4105             Create a shell from the set of faces and shells.
4106
4107             Parameters:
4108                 theFacesAndShells List of faces and/or shells.
4109                 theName Object name; when specified, this parameter is used
4110                         for result publication in the study. Otherwise, if automatic
4111                         publication is switched on, default value is used for result name.
4112
4113             Returns:
4114                 New GEOM.GEOM_Object, containing the created shell.
4115             """
4116             # Example: see GEOM_TestAll.py
4117             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4118             RaiseIfFailed("MakeShell", self.ShapesOp)
4119             self._autoPublish(anObj, theName, "shell")
4120             return anObj
4121
4122         ## Create a solid, bounded by the given shells.
4123         #  @param theShells Sequence of bounding shells.
4124         #  @param theName Object name; when specified, this parameter is used
4125         #         for result publication in the study. Otherwise, if automatic
4126         #         publication is switched on, default value is used for result name.
4127         #
4128         #  @return New GEOM.GEOM_Object, containing the created solid.
4129         #
4130         #  @ref tui_creation_solid "Example"
4131         def MakeSolid(self, theShells, theName=None):
4132             """
4133             Create a solid, bounded by the given shells.
4134
4135             Parameters:
4136                 theShells Sequence of bounding shells.
4137                 theName Object name; when specified, this parameter is used
4138                         for result publication in the study. Otherwise, if automatic
4139                         publication is switched on, default value is used for result name.
4140
4141             Returns:
4142                 New GEOM.GEOM_Object, containing the created solid.
4143             """
4144             # Example: see GEOM_TestAll.py
4145             if len(theShells) == 1:
4146                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4147                 #if len(descr) > 0:
4148                 #    raise RuntimeError, "MakeSolidShells : " + descr
4149                 if descr == "WRN_SHAPE_UNCLOSED":
4150                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4151             anObj = self.ShapesOp.MakeSolidShells(theShells)
4152             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4153             self._autoPublish(anObj, theName, "solid")
4154             return anObj
4155
4156         ## Create a compound of the given shapes.
4157         #  @param theShapes List of shapes to put in compound.
4158         #  @param theName Object name; when specified, this parameter is used
4159         #         for result publication in the study. Otherwise, if automatic
4160         #         publication is switched on, default value is used for result name.
4161         #
4162         #  @return New GEOM.GEOM_Object, containing the created compound.
4163         #
4164         #  @ref tui_creation_compound "Example"
4165         def MakeCompound(self, theShapes, theName=None):
4166             """
4167             Create a compound of the given shapes.
4168
4169             Parameters:
4170                 theShapes List of shapes to put in compound.
4171                 theName Object name; when specified, this parameter is used
4172                         for result publication in the study. Otherwise, if automatic
4173                         publication is switched on, default value is used for result name.
4174
4175             Returns:
4176                 New GEOM.GEOM_Object, containing the created compound.
4177             """
4178             # Example: see GEOM_TestAll.py
4179             anObj = self.ShapesOp.MakeCompound(theShapes)
4180             RaiseIfFailed("MakeCompound", self.ShapesOp)
4181             self._autoPublish(anObj, theName, "compound")
4182             return anObj
4183
4184         # end of l3_advanced
4185         ## @}
4186
4187         ## @addtogroup l2_measure
4188         ## @{
4189
4190         ## Gives quantity of faces in the given shape.
4191         #  @param theShape Shape to count faces of.
4192         #  @return Quantity of faces.
4193         #
4194         #  @ref swig_NumberOf "Example"
4195         def NumberOfFaces(self, theShape):
4196             """
4197             Gives quantity of faces in the given shape.
4198
4199             Parameters:
4200                 theShape Shape to count faces of.
4201
4202             Returns:    
4203                 Quantity of faces.
4204             """
4205             # Example: see GEOM_TestOthers.py
4206             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4207             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4208             return nb_faces
4209
4210         ## Gives quantity of edges in the given shape.
4211         #  @param theShape Shape to count edges of.
4212         #  @return Quantity of edges.
4213         #
4214         #  @ref swig_NumberOf "Example"
4215         def NumberOfEdges(self, theShape):
4216             """
4217             Gives quantity of edges in the given shape.
4218
4219             Parameters:
4220                 theShape Shape to count edges of.
4221
4222             Returns:    
4223                 Quantity of edges.
4224             """
4225             # Example: see GEOM_TestOthers.py
4226             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4227             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4228             return nb_edges
4229
4230         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4231         #  @param theShape Shape to count sub-shapes of.
4232         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4233         #  @return Quantity of sub-shapes of given type.
4234         #
4235         #  @ref swig_NumberOf "Example"
4236         def NumberOfSubShapes(self, theShape, theShapeType):
4237             """
4238             Gives quantity of sub-shapes of type theShapeType in the given shape.
4239
4240             Parameters:
4241                 theShape Shape to count sub-shapes of.
4242                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4243
4244             Returns:
4245                 Quantity of sub-shapes of given type.
4246             """
4247             # Example: see GEOM_TestOthers.py
4248             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4249             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4250             return nb_ss
4251
4252         ## Gives quantity of solids in the given shape.
4253         #  @param theShape Shape to count solids in.
4254         #  @return Quantity of solids.
4255         #
4256         #  @ref swig_NumberOf "Example"
4257         def NumberOfSolids(self, theShape):
4258             """
4259             Gives quantity of solids in the given shape.
4260
4261             Parameters:
4262                 theShape Shape to count solids in.
4263
4264             Returns:
4265                 Quantity of solids.
4266             """
4267             # Example: see GEOM_TestOthers.py
4268             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"])
4269             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4270             return nb_solids
4271
4272         # end of l2_measure
4273         ## @}
4274
4275         ## @addtogroup l3_healing
4276         ## @{
4277
4278         ## Reverses an orientation the given shape.
4279         #  @param theShape Shape to be reversed.
4280         #  @param theName Object name; when specified, this parameter is used
4281         #         for result publication in the study. Otherwise, if automatic
4282         #         publication is switched on, default value is used for result name.
4283         #
4284         #  @return The reversed copy of theShape.
4285         #
4286         #  @ref swig_ChangeOrientation "Example"
4287         def ChangeOrientation(self, theShape, theName=None):
4288             """
4289             Reverses an orientation the given shape.
4290
4291             Parameters:
4292                 theShape Shape to be reversed.
4293                 theName Object name; when specified, this parameter is used
4294                         for result publication in the study. Otherwise, if automatic
4295                         publication is switched on, default value is used for result name.
4296
4297             Returns:   
4298                 The reversed copy of theShape.
4299             """
4300             # Example: see GEOM_TestAll.py
4301             anObj = self.ShapesOp.ChangeOrientation(theShape)
4302             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4303             self._autoPublish(anObj, theName, "reversed")
4304             return anObj
4305
4306         ## See ChangeOrientation() method for details.
4307         #
4308         #  @ref swig_OrientationChange "Example"
4309         def OrientationChange(self, theShape, theName=None):
4310             """
4311             See geompy.ChangeOrientation method for details.
4312             """
4313             # Example: see GEOM_TestOthers.py
4314             # note: auto-publishing is done in self.ChangeOrientation()
4315             anObj = self.ChangeOrientation(theShape, theName)
4316             return anObj
4317
4318         # end of l3_healing
4319         ## @}
4320
4321         ## @addtogroup l4_obtain
4322         ## @{
4323
4324         ## Retrieve all free faces from the given shape.
4325         #  Free face is a face, which is not shared between two shells of the shape.
4326         #  @param theShape Shape to find free faces in.
4327         #  @return List of IDs of all free faces, contained in theShape.
4328         #
4329         #  @ref tui_measurement_tools_page "Example"
4330         def GetFreeFacesIDs(self,theShape):
4331             """
4332             Retrieve all free faces from the given shape.
4333             Free face is a face, which is not shared between two shells of the shape.
4334
4335             Parameters:
4336                 theShape Shape to find free faces in.
4337
4338             Returns:
4339                 List of IDs of all free faces, contained in theShape.
4340             """
4341             # Example: see GEOM_TestOthers.py
4342             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4343             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4344             return anIDs
4345
4346         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4347         #  @param theShape1 Shape to find sub-shapes in.
4348         #  @param theShape2 Shape to find shared sub-shapes with.
4349         #  @param theShapeType Type of sub-shapes to be retrieved.
4350         #  @param theName Object name; when specified, this parameter is used
4351         #         for result publication in the study. Otherwise, if automatic
4352         #         publication is switched on, default value is used for result name.
4353         #
4354         #  @return List of sub-shapes of theShape1, shared with theShape2.
4355         #
4356         #  @ref swig_GetSharedShapes "Example"
4357         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4358             """
4359             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4360
4361             Parameters:
4362                 theShape1 Shape to find sub-shapes in.
4363                 theShape2 Shape to find shared sub-shapes with.
4364                 theShapeType Type of sub-shapes to be retrieved.
4365                 theName Object name; when specified, this parameter is used
4366                         for result publication in the study. Otherwise, if automatic
4367                         publication is switched on, default value is used for result name.
4368
4369             Returns:
4370                 List of sub-shapes of theShape1, shared with theShape2.
4371             """
4372             # Example: see GEOM_TestOthers.py
4373             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4374             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4375             self._autoPublish(aList, theName, "shared")
4376             return aList
4377
4378         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4379         #  @param theShapes Shapes to find common sub-shapes of.
4380         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4381         #  @param theName Object name; when specified, this parameter is used
4382         #         for result publication in the study. Otherwise, if automatic
4383         #         publication is switched on, default value is used for result name.
4384         #
4385         #  @return List of objects, that are sub-shapes of all given shapes.
4386         #
4387         #  @ref swig_GetSharedShapes "Example"
4388         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4389             """
4390             Get all sub-shapes, shared by all shapes in the list theShapes.
4391
4392             Parameters:
4393                 theShapes Shapes to find common sub-shapes of.
4394                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4395                 theName Object name; when specified, this parameter is used
4396                         for result publication in the study. Otherwise, if automatic
4397                         publication is switched on, default value is used for result name.
4398
4399             Returns:    
4400                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4401             """
4402             # Example: see GEOM_TestOthers.py
4403             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4404             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4405             self._autoPublish(aList, theName, "shared")
4406             return aList
4407
4408         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4409         #  situated relatively the specified plane by the certain way,
4410         #  defined through <VAR>theState</VAR> parameter.
4411         #  @param theShape Shape to find sub-shapes of.
4412         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4413         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4414         #                direction and location of the plane to find shapes on.
4415         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4416         #  @param 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         #  @return List of all found sub-shapes.
4421         #
4422         #  @ref swig_GetShapesOnPlane "Example"
4423         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4424             """
4425             Find in theShape all sub-shapes of type theShapeType,
4426             situated relatively the specified plane by the certain way,
4427             defined through theState parameter.
4428
4429             Parameters:
4430                 theShape Shape to find sub-shapes of.
4431                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4432                 theAx1 Vector (or line, or linear edge), specifying normal
4433                        direction and location of the plane to find shapes on.
4434                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4435                 theName Object name; when specified, this parameter is used
4436                         for result publication in the study. Otherwise, if automatic
4437                         publication is switched on, default value is used for result name.
4438
4439             Returns:
4440                 List of all found sub-shapes.
4441             """
4442             # Example: see GEOM_TestOthers.py
4443             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4444             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4445             self._autoPublish(aList, theName, "shapeOnPlane")
4446             return aList
4447
4448         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4449         #  situated relatively the specified plane by the certain way,
4450         #  defined through <VAR>theState</VAR> parameter.
4451         #  @param theShape Shape to find sub-shapes of.
4452         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4453         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4454         #                direction and location of the plane to find shapes on.
4455         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4456         #
4457         #  @return List of all found sub-shapes indices.
4458         #
4459         #  @ref swig_GetShapesOnPlaneIDs "Example"
4460         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4461             """
4462             Find in theShape all sub-shapes of type theShapeType,
4463             situated relatively the specified plane by the certain way,
4464             defined through theState parameter.
4465
4466             Parameters:
4467                 theShape Shape to find sub-shapes of.
4468                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4469                 theAx1 Vector (or line, or linear edge), specifying normal
4470                        direction and location of the plane to find shapes on.
4471                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4472
4473             Returns:
4474                 List of all found sub-shapes indices.
4475             """
4476             # Example: see GEOM_TestOthers.py
4477             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4478             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4479             return aList
4480
4481         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4482         #  situated relatively the specified plane by the certain way,
4483         #  defined through <VAR>theState</VAR> parameter.
4484         #  @param theShape Shape to find sub-shapes of.
4485         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4486         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4487         #                direction of the plane to find shapes on.
4488         #  @param thePnt Point specifying location of the plane to find shapes on.
4489         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4490         #  @param theName Object name; when specified, this parameter is used
4491         #         for result publication in the study. Otherwise, if automatic
4492         #         publication is switched on, default value is used for result name.
4493         #
4494         #  @return List of all found sub-shapes.
4495         #
4496         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4497         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4498             """
4499             Find in theShape all sub-shapes of type theShapeType,
4500             situated relatively the specified plane by the certain way,
4501             defined through theState parameter.
4502
4503             Parameters:
4504                 theShape Shape to find sub-shapes of.
4505                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4506                 theAx1 Vector (or line, or linear edge), specifying normal
4507                        direction and location of the plane to find shapes on.
4508                 thePnt Point specifying location of the plane to find shapes on.
4509                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4510                 theName Object name; when specified, this parameter is used
4511                         for result publication in the study. Otherwise, if automatic
4512                         publication is switched on, default value is used for result name.
4513
4514             Returns:
4515                 List of all found sub-shapes.
4516             """
4517             # Example: see GEOM_TestOthers.py
4518             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4519                                                                theAx1, thePnt, theState)
4520             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4521             self._autoPublish(aList, theName, "shapeOnPlane")
4522             return aList
4523
4524         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4525         #  situated relatively the specified plane by the certain way,
4526         #  defined through <VAR>theState</VAR> parameter.
4527         #  @param theShape Shape to find sub-shapes of.
4528         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4529         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4530         #                direction of the plane to find shapes on.
4531         #  @param thePnt Point specifying location of the plane to find shapes on.
4532         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4533         #
4534         #  @return List of all found sub-shapes indices.
4535         #
4536         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4537         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4538             """
4539             Find in theShape all sub-shapes of type theShapeType,
4540             situated relatively the specified plane by the certain way,
4541             defined through theState parameter.
4542
4543             Parameters:
4544                 theShape Shape to find sub-shapes of.
4545                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4546                 theAx1 Vector (or line, or linear edge), specifying normal
4547                        direction and location of the plane to find shapes on.
4548                 thePnt Point specifying location of the plane to find shapes on.
4549                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4550
4551             Returns:
4552                 List of all found sub-shapes indices.
4553             """
4554             # Example: see GEOM_TestOthers.py
4555             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4556                                                                   theAx1, thePnt, theState)
4557             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4558             return aList
4559
4560         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4561         #  the specified cylinder by the certain way, defined through \a theState parameter.
4562         #  @param theShape Shape to find sub-shapes of.
4563         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4564         #  @param theAxis Vector (or line, or linear edge), specifying
4565         #                 axis of the cylinder to find shapes on.
4566         #  @param theRadius Radius of the cylinder to find shapes on.
4567         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4568         #  @param theName Object name; when specified, this parameter is used
4569         #         for result publication in the study. Otherwise, if automatic
4570         #         publication is switched on, default value is used for result name.
4571         #
4572         #  @return List of all found sub-shapes.
4573         #
4574         #  @ref swig_GetShapesOnCylinder "Example"
4575         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4576             """
4577             Find in theShape all sub-shapes of type theShapeType, situated relatively
4578             the specified cylinder by the certain way, defined through theState parameter.
4579
4580             Parameters:
4581                 theShape Shape to find sub-shapes of.
4582                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4583                 theAxis Vector (or line, or linear edge), specifying
4584                         axis of the cylinder to find shapes on.
4585                 theRadius Radius of the cylinder to find shapes on.
4586                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4587                 theName Object name; when specified, this parameter is used
4588                         for result publication in the study. Otherwise, if automatic
4589                         publication is switched on, default value is used for result name.
4590
4591             Returns:
4592                 List of all found sub-shapes.
4593             """
4594             # Example: see GEOM_TestOthers.py
4595             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4596             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4597             self._autoPublish(aList, theName, "shapeOnCylinder")
4598             return aList
4599
4600         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4601         #  the specified cylinder by the certain way, defined through \a theState parameter.
4602         #  @param theShape Shape to find sub-shapes of.
4603         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4604         #  @param theAxis Vector (or line, or linear edge), specifying
4605         #                 axis of the cylinder to find shapes on.
4606         #  @param theRadius Radius of the cylinder to find shapes on.
4607         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4608         #
4609         #  @return List of all found sub-shapes indices.
4610         #
4611         #  @ref swig_GetShapesOnCylinderIDs "Example"
4612         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4613             """
4614             Find in theShape all sub-shapes of type theShapeType, situated relatively
4615             the specified cylinder by the certain way, defined through theState parameter.
4616
4617             Parameters:
4618                 theShape Shape to find sub-shapes of.
4619                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4620                 theAxis Vector (or line, or linear edge), specifying
4621                         axis of the cylinder to find shapes on.
4622                 theRadius Radius of the cylinder to find shapes on.
4623                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4624
4625             Returns:
4626                 List of all found sub-shapes indices.
4627             """
4628             # Example: see GEOM_TestOthers.py
4629             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4630             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4631             return aList
4632
4633         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4634         #  the specified cylinder by the certain way, defined through \a theState parameter.
4635         #  @param theShape Shape to find sub-shapes of.
4636         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4637         #  @param theAxis Vector (or line, or linear edge), specifying
4638         #                 axis of the cylinder to find shapes on.
4639         #  @param thePnt Point specifying location of the bottom of the cylinder.
4640         #  @param theRadius Radius of the cylinder to find shapes on.
4641         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4642         #  @param theName Object name; when specified, this parameter is used
4643         #         for result publication in the study. Otherwise, if automatic
4644         #         publication is switched on, default value is used for result name.
4645         #
4646         #  @return List of all found sub-shapes.
4647         #
4648         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4649         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4650             """
4651             Find in theShape all sub-shapes of type theShapeType, situated relatively
4652             the specified cylinder by the certain way, defined through theState parameter.
4653
4654             Parameters:
4655                 theShape Shape to find sub-shapes of.
4656                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4657                 theAxis Vector (or line, or linear edge), specifying
4658                         axis of the cylinder to find shapes on.
4659                 theRadius Radius of the cylinder to find shapes on.
4660                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4661                 theName Object name; when specified, this parameter is used
4662                         for result publication in the study. Otherwise, if automatic
4663                         publication is switched on, default value is used for result name.
4664
4665             Returns:
4666                 List of all found sub-shapes.
4667             """
4668             # Example: see GEOM_TestOthers.py
4669             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4670             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4671             self._autoPublish(aList, theName, "shapeOnCylinder")
4672             return aList
4673
4674         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4675         #  the specified cylinder by the certain way, defined through \a theState parameter.
4676         #  @param theShape Shape to find sub-shapes of.
4677         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4678         #  @param theAxis Vector (or line, or linear edge), specifying
4679         #                 axis of the cylinder to find shapes on.
4680         #  @param thePnt Point specifying location of the bottom of the cylinder.
4681         #  @param theRadius Radius of the cylinder to find shapes on.
4682         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4683         #
4684         #  @return List of all found sub-shapes indices
4685         #
4686         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4687         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4688             """
4689             Find in theShape all sub-shapes of type theShapeType, situated relatively
4690             the specified cylinder by the certain way, defined through theState parameter.
4691
4692             Parameters:
4693                 theShape Shape to find sub-shapes of.
4694                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4695                 theAxis Vector (or line, or linear edge), specifying
4696                         axis of the cylinder to find shapes on.
4697                 theRadius Radius of the cylinder to find shapes on.
4698                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4699
4700             Returns:
4701                 List of all found sub-shapes indices.            
4702             """
4703             # Example: see GEOM_TestOthers.py
4704             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4705             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4706             return aList
4707
4708         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4709         #  the specified sphere by the certain way, defined through \a theState parameter.
4710         #  @param theShape Shape to find sub-shapes of.
4711         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4712         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4713         #  @param theRadius Radius of the sphere to find shapes on.
4714         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4715         #  @param theName Object name; when specified, this parameter is used
4716         #         for result publication in the study. Otherwise, if automatic
4717         #         publication is switched on, default value is used for result name.
4718         #
4719         #  @return List of all found sub-shapes.
4720         #
4721         #  @ref swig_GetShapesOnSphere "Example"
4722         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4723             """
4724             Find in theShape all sub-shapes of type theShapeType, situated relatively
4725             the specified sphere by the certain way, defined through theState parameter.
4726
4727             Parameters:
4728                 theShape Shape to find sub-shapes of.
4729                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4730                 theCenter Point, specifying center of the sphere to find shapes on.
4731                 theRadius Radius of the sphere to find shapes on.
4732                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4733                 theName Object name; when specified, this parameter is used
4734                         for result publication in the study. Otherwise, if automatic
4735                         publication is switched on, default value is used for result name.
4736
4737             Returns:
4738                 List of all found sub-shapes.
4739             """
4740             # Example: see GEOM_TestOthers.py
4741             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4742             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4743             self._autoPublish(aList, theName, "shapeOnSphere")
4744             return aList
4745
4746         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4747         #  the specified sphere by the certain way, defined through \a theState parameter.
4748         #  @param theShape Shape to find sub-shapes of.
4749         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4750         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4751         #  @param theRadius Radius of the sphere to find shapes on.
4752         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4753         #
4754         #  @return List of all found sub-shapes indices.
4755         #
4756         #  @ref swig_GetShapesOnSphereIDs "Example"
4757         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4758             """
4759             Find in theShape all sub-shapes of type theShapeType, situated relatively
4760             the specified sphere by the certain way, defined through theState parameter.
4761
4762             Parameters:
4763                 theShape Shape to find sub-shapes of.
4764                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4765                 theCenter Point, specifying center of the sphere to find shapes on.
4766                 theRadius Radius of the sphere to find shapes on.
4767                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4768
4769             Returns:
4770                 List of all found sub-shapes indices.
4771             """
4772             # Example: see GEOM_TestOthers.py
4773             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4774             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4775             return aList
4776
4777         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4778         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4779         #  @param theShape Shape to find sub-shapes of.
4780         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4781         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4782         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4783         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4784         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4785         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4786         #  @param theName Object name; when specified, this parameter is used
4787         #         for result publication in the study. Otherwise, if automatic
4788         #         publication is switched on, default value is used for result name.
4789         #
4790         #  @return List of all found sub-shapes.
4791         #
4792         #  @ref swig_GetShapesOnQuadrangle "Example"
4793         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4794                                   theTopLeftPoint, theTopRigthPoint,
4795                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4796             """
4797             Find in theShape all sub-shapes of type theShapeType, situated relatively
4798             the specified quadrangle by the certain way, defined through theState parameter.
4799
4800             Parameters:
4801                 theShape Shape to find sub-shapes of.
4802                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4803                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4804                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4805                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4806                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4807                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4808                 theName Object name; when specified, this parameter is used
4809                         for result publication in the study. Otherwise, if automatic
4810                         publication is switched on, default value is used for result name.
4811
4812             Returns:
4813                 List of all found sub-shapes.
4814             """
4815             # Example: see GEOM_TestOthers.py
4816             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4817                                                         theTopLeftPoint, theTopRigthPoint,
4818                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4819             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4820             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4821             return aList
4822
4823         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4824         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4825         #  @param theShape Shape to find sub-shapes of.
4826         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4827         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4828         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4829         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4830         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4831         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4832         #
4833         #  @return List of all found sub-shapes indices.
4834         #
4835         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4836         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4837                                      theTopLeftPoint, theTopRigthPoint,
4838                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4839             """
4840             Find in theShape all sub-shapes of type theShapeType, situated relatively
4841             the specified quadrangle by the certain way, defined through theState parameter.
4842
4843             Parameters:
4844                 theShape Shape to find sub-shapes of.
4845                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4846                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4847                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4848                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4849                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4850                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4851
4852             Returns:
4853                 List of all found sub-shapes indices.
4854             """
4855
4856             # Example: see GEOM_TestOthers.py
4857             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4858                                                            theTopLeftPoint, theTopRigthPoint,
4859                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4860             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4861             return aList
4862
4863         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4864         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4865         #  @param theBox Shape for relative comparing.
4866         #  @param theShape Shape to find sub-shapes of.
4867         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4868         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4869         #  @param theName Object name; when specified, this parameter is used
4870         #         for result publication in the study. Otherwise, if automatic
4871         #         publication is switched on, default value is used for result name.
4872         #
4873         #  @return List of all found sub-shapes.
4874         #
4875         #  @ref swig_GetShapesOnBox "Example"
4876         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4877             """
4878             Find in theShape all sub-shapes of type theShapeType, situated relatively
4879             the specified theBox by the certain way, defined through theState parameter.
4880
4881             Parameters:
4882                 theBox Shape for relative comparing.
4883                 theShape Shape to find sub-shapes of.
4884                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4885                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4886                 theName Object name; when specified, this parameter is used
4887                         for result publication in the study. Otherwise, if automatic
4888                         publication is switched on, default value is used for result name.
4889
4890             Returns:
4891                 List of all found sub-shapes.
4892             """
4893             # Example: see GEOM_TestOthers.py
4894             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
4895             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
4896             self._autoPublish(aList, theName, "shapeOnBox")
4897             return aList
4898
4899         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4900         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4901         #  @param theBox Shape for relative comparing.
4902         #  @param theShape Shape to find sub-shapes of.
4903         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4904         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4905         #
4906         #  @return List of all found sub-shapes indices.
4907         #
4908         #  @ref swig_GetShapesOnBoxIDs "Example"
4909         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
4910             """
4911             Find in theShape all sub-shapes of type theShapeType, situated relatively
4912             the specified theBox by the certain way, defined through theState parameter.
4913
4914             Parameters:
4915                 theBox Shape for relative comparing.
4916                 theShape Shape to find sub-shapes of.
4917                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4918                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4919
4920             Returns:
4921                 List of all found sub-shapes indices.
4922             """
4923             # Example: see GEOM_TestOthers.py
4924             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
4925             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
4926             return aList
4927
4928         ## Find in \a theShape all sub-shapes of type \a theShapeType,
4929         #  situated relatively the specified \a theCheckShape by the
4930         #  certain way, defined through \a theState parameter.
4931         #  @param theCheckShape Shape for relative comparing. It must be a solid.
4932         #  @param theShape Shape to find sub-shapes of.
4933         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
4934         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4935         #  @param theName Object name; when specified, this parameter is used
4936         #         for result publication in the study. Otherwise, if automatic
4937         #         publication is switched on, default value is used for result name.
4938         #
4939         #  @return List of all found sub-shapes.
4940         #
4941         #  @ref swig_GetShapesOnShape "Example"
4942         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
4943             """
4944             Find in theShape all sub-shapes of type theShapeType,
4945             situated relatively the specified theCheckShape by the
4946             certain way, defined through theState parameter.
4947
4948             Parameters:
4949                 theCheckShape Shape for relative comparing. It must be a solid.
4950                 theShape Shape to find sub-shapes of.
4951                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4952                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4953                 theName Object name; when specified, this parameter is used
4954                         for result publication in the study. Otherwise, if automatic
4955                         publication is switched on, default value is used for result name.
4956
4957             Returns:
4958                 List of all found sub-shapes.
4959             """
4960             # Example: see GEOM_TestOthers.py
4961             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
4962                                                    theShapeType, theState)
4963             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
4964             self._autoPublish(aList, theName, "shapeOnShape")
4965             return aList
4966
4967         ## Find in \a theShape all sub-shapes of type \a theShapeType,
4968         #  situated relatively the specified \a theCheckShape by the
4969         #  certain way, defined through \a theState parameter.
4970         #  @param theCheckShape Shape for relative comparing. It must be a solid.
4971         #  @param theShape Shape to find sub-shapes of.
4972         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4973         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4974         #  @param theName Object name; when specified, this parameter is used
4975         #         for result publication in the study. Otherwise, if automatic
4976         #         publication is switched on, default value is used for result name.
4977         #
4978         #  @return All found sub-shapes as compound.
4979         #
4980         #  @ref swig_GetShapesOnShapeAsCompound "Example"
4981         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
4982             """
4983             Find in theShape all sub-shapes of type theShapeType,
4984             situated relatively the specified theCheckShape by the
4985             certain way, defined through theState parameter.
4986
4987             Parameters:
4988                 theCheckShape Shape for relative comparing. It must be a solid.
4989                 theShape Shape to find sub-shapes of.
4990                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4991                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4992                 theName Object name; when specified, this parameter is used
4993                         for result publication in the study. Otherwise, if automatic
4994                         publication is switched on, default value is used for result name.
4995
4996             Returns:
4997                 All found sub-shapes as compound.
4998             """
4999             # Example: see GEOM_TestOthers.py
5000             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5001                                                              theShapeType, theState)
5002             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5003             self._autoPublish(anObj, theName, "shapeOnShape")
5004             return anObj
5005
5006         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5007         #  situated relatively the specified \a theCheckShape by the
5008         #  certain way, defined through \a theState parameter.
5009         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5010         #  @param theShape Shape to find sub-shapes of.
5011         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
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_GetShapesOnShapeIDs "Example"
5017         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5018             """
5019             Find in theShape all sub-shapes of type theShapeType,
5020             situated relatively the specified theCheckShape by the
5021             certain way, defined through theState parameter.
5022
5023             Parameters:
5024                 theCheckShape Shape for relative comparing. It must be a solid.
5025                 theShape Shape to find sub-shapes of.
5026                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5027                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5028
5029             Returns:
5030                 List of all found sub-shapes indices.
5031             """
5032             # Example: see GEOM_TestOthers.py
5033             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5034                                                       theShapeType, theState)
5035             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5036             return aList
5037
5038         ## Get sub-shape(s) of theShapeWhere, which are
5039         #  coincident with \a theShapeWhat or could be a part of it.
5040         #  @param theShapeWhere Shape to find sub-shapes of.
5041         #  @param theShapeWhat Shape, specifying what to find.
5042         #  @param isNewImplementation implementation of GetInPlace functionality
5043         #             (default = False, old alghorithm based on shape properties)
5044         #  @param theName Object name; when specified, this parameter is used
5045         #         for result publication in the study. Otherwise, if automatic
5046         #         publication is switched on, default value is used for result name.
5047         #
5048         #  @return Group of all found sub-shapes or a single found sub-shape.
5049         #
5050         #  @note This function has a restriction on argument shapes.
5051         #        If \a theShapeWhere has curved parts with significantly
5052         #        outstanding centres (i.e. the mass centre of a part is closer to
5053         #        \a theShapeWhat than to the part), such parts will not be found.
5054         #        @image html get_in_place_lost_part.png
5055         #
5056         #  @ref swig_GetInPlace "Example"
5057         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5058             """
5059             Get sub-shape(s) of theShapeWhere, which are
5060             coincident with  theShapeWhat or could be a part of it.
5061
5062             Parameters:
5063                 theShapeWhere Shape to find sub-shapes of.
5064                 theShapeWhat Shape, specifying what to find.
5065                 isNewImplementation Implementation of GetInPlace functionality
5066                                     (default = False, old alghorithm based on shape properties)
5067                 theName Object name; when specified, this parameter is used
5068                         for result publication in the study. Otherwise, if automatic
5069                         publication is switched on, default value is used for result name.
5070
5071             Returns:
5072                 Group of all found sub-shapes or a single found sub-shape.
5073
5074                 
5075             Note:
5076                 This function has a restriction on argument shapes.
5077                 If theShapeWhere has curved parts with significantly
5078                 outstanding centres (i.e. the mass centre of a part is closer to
5079                 theShapeWhat than to the part), such parts will not be found.
5080             """
5081             # Example: see GEOM_TestOthers.py
5082             anObj = None
5083             if isNewImplementation:
5084                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5085             else:
5086                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5087                 pass
5088             RaiseIfFailed("GetInPlace", self.ShapesOp)
5089             self._autoPublish(anObj, theName, "inplace")
5090             return anObj
5091
5092         ## Get sub-shape(s) of \a theShapeWhere, which are
5093         #  coincident with \a theShapeWhat or could be a part of it.
5094         #
5095         #  Implementation of this method is based on a saved history of an operation,
5096         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5097         #  arguments (an argument shape or a sub-shape of an argument shape).
5098         #  The operation could be the Partition or one of boolean operations,
5099         #  performed on simple shapes (not on compounds).
5100         #
5101         #  @param theShapeWhere Shape to find sub-shapes of.
5102         #  @param theShapeWhat Shape, specifying what to find (must be in the
5103         #                      building history of the ShapeWhere).
5104         #  @param theName Object name; when specified, this parameter is used
5105         #         for result publication in the study. Otherwise, if automatic
5106         #         publication is switched on, default value is used for result name.
5107         #
5108         #  @return Group of all found sub-shapes or a single found sub-shape.
5109         #
5110         #  @ref swig_GetInPlace "Example"
5111         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5112             """
5113             Implementation of this method is based on a saved history of an operation,
5114             produced theShapeWhere. The theShapeWhat must be among this operation's
5115             arguments (an argument shape or a sub-shape of an argument shape).
5116             The operation could be the Partition or one of boolean operations,
5117             performed on simple shapes (not on compounds).
5118
5119             Parameters:
5120                 theShapeWhere Shape to find sub-shapes of.
5121                 theShapeWhat Shape, specifying what to find (must be in the
5122                                 building history of the ShapeWhere).
5123                 theName Object name; when specified, this parameter is used
5124                         for result publication in the study. Otherwise, if automatic
5125                         publication is switched on, default value is used for result name.
5126
5127             Returns:
5128                 Group of all found sub-shapes or a single found sub-shape.
5129             """
5130             # Example: see GEOM_TestOthers.py
5131             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5132             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5133             self._autoPublish(anObj, theName, "inplace")
5134             return anObj
5135
5136         ## Get sub-shape of theShapeWhere, which is
5137         #  equal to \a theShapeWhat.
5138         #  @param theShapeWhere Shape to find sub-shape of.
5139         #  @param theShapeWhat Shape, specifying what to find.
5140         #  @param theName Object name; when specified, this parameter is used
5141         #         for result publication in the study. Otherwise, if automatic
5142         #         publication is switched on, default value is used for result name.
5143         #
5144         #  @return New GEOM.GEOM_Object for found sub-shape.
5145         #
5146         #  @ref swig_GetSame "Example"
5147         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5148             """
5149             Get sub-shape of theShapeWhere, which is
5150             equal to theShapeWhat.
5151
5152             Parameters:
5153                 theShapeWhere Shape to find sub-shape of.
5154                 theShapeWhat Shape, specifying what to find.
5155                 theName Object name; when specified, this parameter is used
5156                         for result publication in the study. Otherwise, if automatic
5157                         publication is switched on, default value is used for result name.
5158
5159             Returns:
5160                 New GEOM.GEOM_Object for found sub-shape.
5161             """
5162             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5163             RaiseIfFailed("GetSame", self.ShapesOp)
5164             self._autoPublish(anObj, theName, "sameShape")
5165             return anObj
5166
5167
5168         ## Get sub-shape indices of theShapeWhere, which is
5169         #  equal to \a theShapeWhat.
5170         #  @param theShapeWhere Shape to find sub-shape of.
5171         #  @param theShapeWhat Shape, specifying what to find.
5172         #  @return List of all found sub-shapes indices. 
5173         #
5174         #  @ref swig_GetSame "Example"
5175         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5176             """
5177             Get sub-shape indices of theShapeWhere, which is
5178             equal to theShapeWhat.
5179
5180             Parameters:
5181                 theShapeWhere Shape to find sub-shape of.
5182                 theShapeWhat Shape, specifying what to find.
5183
5184             Returns:
5185                 List of all found sub-shapes indices.
5186             """
5187             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5188             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5189             return anObj
5190
5191
5192         # end of l4_obtain
5193         ## @}
5194
5195         ## @addtogroup l4_access
5196         ## @{
5197
5198         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5199         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5200         #  @param aShape Shape to get sub-shape of.
5201         #  @param ListOfID List of sub-shapes indices.
5202         #  @param theName Object name; when specified, this parameter is used
5203         #         for result publication in the study. Otherwise, if automatic
5204         #         publication is switched on, default value is used for result name.
5205         #
5206         #  @return Found sub-shape.
5207         #
5208         #  @ref swig_all_decompose "Example"
5209         def GetSubShape(self, aShape, ListOfID, theName=None):
5210             """
5211             Obtain a composite sub-shape of aShape, composed from sub-shapes
5212             of aShape, selected by their unique IDs inside aShape
5213
5214             Parameters:
5215                 aShape Shape to get sub-shape of.
5216                 ListOfID List of sub-shapes indices.
5217                 theName Object name; when specified, this parameter is used
5218                         for result publication in the study. Otherwise, if automatic
5219                         publication is switched on, default value is used for result name.
5220
5221             Returns:
5222                 Found sub-shape.
5223             """
5224             # Example: see GEOM_TestAll.py
5225             anObj = self.AddSubShape(aShape,ListOfID)
5226             self._autoPublish(anObj, theName, "subshape")
5227             return anObj
5228
5229         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5230         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5231         #  @param aShape Shape to get sub-shape of.
5232         #  @param aSubShape Sub-shapes of aShape.
5233         #  @return ID of found sub-shape.
5234         #
5235         #  @ref swig_all_decompose "Example"
5236         def GetSubShapeID(self, aShape, aSubShape):
5237             """
5238             Obtain unique ID of sub-shape aSubShape inside aShape
5239             of aShape, selected by their unique IDs inside aShape
5240
5241             Parameters:
5242                aShape Shape to get sub-shape of.
5243                aSubShape Sub-shapes of aShape.
5244
5245             Returns:
5246                ID of found sub-shape.
5247             """
5248             # Example: see GEOM_TestAll.py
5249             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5250             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5251             return anID
5252             
5253         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5254         #  This function is provided for performance purpose. The complexity is O(n) with n
5255         #  the number of subobjects of aShape
5256         #  @param aShape Shape to get sub-shape of.
5257         #  @param aSubShapes Sub-shapes of aShape.
5258         #  @return list of IDs of found sub-shapes.
5259         #
5260         #  @ref swig_all_decompose "Example"
5261         def GetSubShapesIDs(self, aShape, aSubShapes):
5262             """
5263             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5264             This function is provided for performance purpose. The complexity is O(n) with n
5265             the number of subobjects of aShape
5266
5267             Parameters:
5268                aShape Shape to get sub-shape of.
5269                aSubShapes Sub-shapes of aShape.
5270
5271             Returns:
5272                List of IDs of found sub-shape.
5273             """
5274             # Example: see GEOM_TestAll.py
5275             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5276             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5277             return anIDs
5278
5279         # end of l4_access
5280         ## @}
5281
5282         ## @addtogroup l4_decompose
5283         ## @{
5284
5285         ## Get all sub-shapes and groups of \a theShape,
5286         #  that were created already by any other methods.
5287         #  @param theShape Any shape.
5288         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5289         #                       returned, else all found sub-shapes and groups.
5290         #  @return List of existing sub-objects of \a theShape.
5291         #
5292         #  @ref swig_all_decompose "Example"
5293         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5294             """
5295             Get all sub-shapes and groups of theShape,
5296             that were created already by any other methods.
5297
5298             Parameters:
5299                 theShape Any shape.
5300                 theGroupsOnly If this parameter is TRUE, only groups will be
5301                                  returned, else all found sub-shapes and groups.
5302
5303             Returns:
5304                 List of existing sub-objects of theShape.
5305             """
5306             # Example: see GEOM_TestAll.py
5307             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5308             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5309             return ListObj
5310
5311         ## Get all groups of \a theShape,
5312         #  that were created already by any other methods.
5313         #  @param theShape Any shape.
5314         #  @return List of existing groups of \a theShape.
5315         #
5316         #  @ref swig_all_decompose "Example"
5317         def GetGroups(self, theShape):
5318             """
5319             Get all groups of theShape,
5320             that were created already by any other methods.
5321
5322             Parameters:
5323                 theShape Any shape.
5324
5325             Returns:
5326                 List of existing groups of theShape.
5327             """
5328             # Example: see GEOM_TestAll.py
5329             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5330             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5331             return ListObj
5332
5333         ## Explode a shape on sub-shapes of a given type.
5334         #  If the shape itself matches the type, it is also returned.
5335         #  @param aShape Shape to be exploded.
5336         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5337         #  @param theName Object name; when specified, this parameter is used
5338         #         for result publication in the study. Otherwise, if automatic
5339         #         publication is switched on, default value is used for result name.
5340         #
5341         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5342         #
5343         #  @ref swig_all_decompose "Example"
5344         def SubShapeAll(self, aShape, aType, theName=None):
5345             """
5346             Explode a shape on sub-shapes of a given type.
5347             If the shape itself matches the type, it is also returned.
5348
5349             Parameters:
5350                 aShape Shape to be exploded.
5351                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5352                 theName Object name; when specified, this parameter is used
5353                         for result publication in the study. Otherwise, if automatic
5354                         publication is switched on, default value is used for result name.
5355
5356             Returns:
5357                 List of sub-shapes of type theShapeType, contained in theShape.
5358             """
5359             # Example: see GEOM_TestAll.py
5360             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5361             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5362             self._autoPublish(ListObj, theName, "subshape")
5363             return ListObj
5364
5365         ## Explode a shape on sub-shapes of a given type.
5366         #  @param aShape Shape to be exploded.
5367         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5368         #  @return List of IDs of sub-shapes.
5369         #
5370         #  @ref swig_all_decompose "Example"
5371         def SubShapeAllIDs(self, aShape, aType):
5372             """
5373             Explode a shape on sub-shapes of a given type.
5374
5375             Parameters:
5376                 aShape Shape to be exploded (see geompy.ShapeType) 
5377                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5378
5379             Returns:
5380                 List of IDs of sub-shapes.
5381             """
5382             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5383             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5384             return ListObj
5385
5386         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5387         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
5388         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5389         #  @param aShape Shape to get sub-shape of.
5390         #  @param ListOfInd List of sub-shapes indices.
5391         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5392         #  @param theName Object name; when specified, this parameter is used
5393         #         for result publication in the study. Otherwise, if automatic
5394         #         publication is switched on, default value is used for result name.
5395         #
5396         #  @return A compound of sub-shapes of aShape.
5397         #
5398         #  @ref swig_all_decompose "Example"
5399         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5400             """
5401             Obtain a compound of sub-shapes of aShape,
5402             selected by they indices in list of all sub-shapes of type aType.
5403             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5404             
5405             Parameters:
5406                 aShape Shape to get sub-shape of.
5407                 ListOfID List of sub-shapes indices.
5408                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5409                 theName Object name; when specified, this parameter is used
5410                         for result publication in the study. Otherwise, if automatic
5411                         publication is switched on, default value is used for result name.
5412
5413             Returns:
5414                 A compound of sub-shapes of aShape.
5415             """
5416             # Example: see GEOM_TestAll.py
5417             ListOfIDs = []
5418             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5419             for ind in ListOfInd:
5420                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5421             # note: auto-publishing is done in self.GetSubShape()
5422             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5423             return anObj
5424
5425         ## Explode a shape on sub-shapes of a given type.
5426         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5427         #  If the shape itself matches the type, it is also returned.
5428         #  @param aShape Shape to be exploded.
5429         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5430         #  @param theName Object name; when specified, this parameter is used
5431         #         for result publication in the study. Otherwise, if automatic
5432         #         publication is switched on, default value is used for result name.
5433         #
5434         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5435         #
5436         #  @ref swig_SubShapeAllSorted "Example"
5437         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5438             """
5439             Explode a shape on sub-shapes of a given type.
5440             Sub-shapes will be sorted by coordinates of their gravity centers.
5441             If the shape itself matches the type, it is also returned.
5442
5443             Parameters: 
5444                 aShape Shape to be exploded.
5445                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5446                 theName Object name; when specified, this parameter is used
5447                         for result publication in the study. Otherwise, if automatic
5448                         publication is switched on, default value is used for result name.
5449
5450             Returns: 
5451                 List of sub-shapes of type theShapeType, contained in theShape.
5452             """
5453             # Example: see GEOM_TestAll.py
5454             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5455             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5456             self._autoPublish(ListObj, theName, "subshape")
5457             return ListObj
5458
5459         ## Explode a shape on sub-shapes of a given type.
5460         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5461         #  @param aShape Shape to be exploded.
5462         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5463         #  @return List of IDs of sub-shapes.
5464         #
5465         #  @ref swig_all_decompose "Example"
5466         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5467             """
5468             Explode a shape on sub-shapes of a given type.
5469             Sub-shapes will be sorted by coordinates of their gravity centers.
5470
5471             Parameters: 
5472                 aShape Shape to be exploded.
5473                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5474
5475             Returns: 
5476                 List of IDs of sub-shapes.
5477             """
5478             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5479             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5480             return ListIDs
5481
5482         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5483         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5484         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5485         #  @param aShape Shape to get sub-shape of.
5486         #  @param ListOfInd List of sub-shapes indices.
5487         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5488         #  @param theName Object name; when specified, this parameter is used
5489         #         for result publication in the study. Otherwise, if automatic
5490         #         publication is switched on, default value is used for result name.
5491         #
5492         #  @return A compound of sub-shapes of aShape.
5493         #
5494         #  @ref swig_all_decompose "Example"
5495         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5496             """
5497             Obtain a compound of sub-shapes of aShape,
5498             selected by they indices in sorted list of all sub-shapes of type aType.
5499             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5500
5501             Parameters:
5502                 aShape Shape to get sub-shape of.
5503                 ListOfID List of sub-shapes indices.
5504                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5505                 theName Object name; when specified, this parameter is used
5506                         for result publication in the study. Otherwise, if automatic
5507                         publication is switched on, default value is used for result name.
5508
5509             Returns:
5510                 A compound of sub-shapes of aShape.
5511             """
5512             # Example: see GEOM_TestAll.py
5513             ListOfIDs = []
5514             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5515             for ind in ListOfInd:
5516                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5517             # note: auto-publishing is done in self.GetSubShape()
5518             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5519             return anObj
5520
5521         ## Extract shapes (excluding the main shape) of given type.
5522         #  @param aShape The shape.
5523         #  @param aType  The shape type (see ShapeType())
5524         #  @param isSorted Boolean flag to switch sorting on/off.
5525         #  @param theName Object name; when specified, this parameter is used
5526         #         for result publication in the study. Otherwise, if automatic
5527         #         publication is switched on, default value is used for result name.
5528         #
5529         #  @return List of sub-shapes of type aType, contained in aShape.
5530         #
5531         #  @ref swig_FilletChamfer "Example"
5532         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5533             """
5534             Extract shapes (excluding the main shape) of given type.
5535
5536             Parameters:
5537                 aShape The shape.
5538                 aType  The shape type (see geompy.ShapeType)
5539                 isSorted Boolean flag to switch sorting on/off.
5540                 theName Object name; when specified, this parameter is used
5541                         for result publication in the study. Otherwise, if automatic
5542                         publication is switched on, default value is used for result name.
5543
5544             Returns:     
5545                 List of sub-shapes of type aType, contained in aShape.
5546             """
5547             # Example: see GEOM_TestAll.py
5548             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5549             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5550             self._autoPublish(ListObj, theName, "subshape")
5551             return ListObj
5552
5553         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5554         #  @param aShape Main shape.
5555         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5556         #  @param theName Object name; when specified, this parameter is used
5557         #         for result publication in the study. Otherwise, if automatic
5558         #         publication is switched on, default value is used for result name.
5559         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5560         #
5561         #  @ref swig_all_decompose "Example"
5562         def SubShapes(self, aShape, anIDs, theName=None):
5563             """
5564             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5565
5566             Parameters:
5567                 aShape Main shape.
5568                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5569                 theName Object name; when specified, this parameter is used
5570                         for result publication in the study. Otherwise, if automatic
5571                         publication is switched on, default value is used for result name.
5572
5573             Returns:      
5574                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5575             """
5576             # Example: see GEOM_TestAll.py
5577             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5578             RaiseIfFailed("SubShapes", self.ShapesOp)
5579             self._autoPublish(ListObj, theName, "subshape")
5580             return ListObj
5581
5582         # end of l4_decompose
5583         ## @}
5584
5585         ## @addtogroup l4_decompose_d
5586         ## @{
5587
5588         ## Deprecated method
5589         #  It works like SubShapeAllSortedCentres(), but wrongly
5590         #  defines centres of faces, shells and solids.
5591         def SubShapeAllSorted(self, aShape, aType, theName=None):
5592             """
5593             Deprecated method
5594             It works like geompy.SubShapeAllSortedCentres, but wrongly
5595             defines centres of faces, shells and solids.
5596             """
5597             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5598             RaiseIfFailed("MakeExplode", self.ShapesOp)
5599             self._autoPublish(ListObj, theName, "subshape")
5600             return ListObj
5601
5602         ## Deprecated method
5603         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5604         #  defines centres of faces, shells and solids.
5605         def SubShapeAllSortedIDs(self, aShape, aType):
5606             """
5607             Deprecated method
5608             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5609             defines centres of faces, shells and solids.
5610             """
5611             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5612             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5613             return ListIDs
5614
5615         ## Deprecated method
5616         #  It works like SubShapeSortedCentres(), but has a bug
5617         #  (wrongly defines centres of faces, shells and solids).
5618         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5619             """
5620             Deprecated method
5621             It works like geompy.SubShapeSortedCentres, but has a bug
5622             (wrongly defines centres of faces, shells and solids).
5623             """
5624             ListOfIDs = []
5625             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5626             for ind in ListOfInd:
5627                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5628             # note: auto-publishing is done in self.GetSubShape()
5629             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5630             return anObj
5631
5632         # end of l4_decompose_d
5633         ## @}
5634
5635         ## @addtogroup l3_healing
5636         ## @{
5637
5638         ## Apply a sequence of Shape Healing operators to the given object.
5639         #  @param theShape Shape to be processed.
5640         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5641         #  @param theParameters List of names of parameters
5642         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5643         #  @param theValues List of values of parameters, in the same order
5644         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5645         #  @param theName Object name; when specified, this parameter is used
5646         #         for result publication in the study. Otherwise, if automatic
5647         #         publication is switched on, default value is used for result name.
5648         #
5649         #  <b> Operators and Parameters: </b> \n
5650         #
5651         #  * \b FixShape - corrects invalid shapes. \n
5652         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5653         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5654         #
5655         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5656         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5657         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5658         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5659         #
5660         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5661         #    surfaces in segments using a certain angle. \n
5662         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5663         #    if Angle=180, four if Angle=90, etc). \n
5664         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5665         #
5666         #  * \b SplitClosedFaces - splits closed faces in segments.
5667         #    The number of segments depends on the number of splitting points.\n
5668         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5669         #
5670         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5671         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5672         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5673         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5674         #   This and the previous parameters can take the following values:\n
5675         #   \b Parametric \b Continuity \n
5676         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5677         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5678         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5679         #    ruling out sharp edges).\n
5680         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5681         #       are of the same magnitude).\n
5682         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5683         #    or surfaces (d/du C(u)) are the same at junction. \n
5684         #   \b Geometric \b Continuity \n
5685         #   \b G1: first derivatives are proportional at junction.\n
5686         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5687         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5688         #   \b G2: first and second derivatives are proportional at junction.
5689         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5690         #    continuity requires that the underlying parameterization was continuous as well.
5691         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5692         #
5693         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5694         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5695         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5696         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5697         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5698         #       with the specified parameters.\n
5699         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5700         #       with the specified parameters.\n
5701         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5702         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5703         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5704         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5705         #
5706         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5707         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5708         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5709         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5710         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5711         #
5712         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5713         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5714         #
5715         #
5716         #  @return New GEOM.GEOM_Object, containing processed shape.
5717         #
5718         #  \n @ref tui_shape_processing "Example"
5719         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5720             """
5721             Apply a sequence of Shape Healing operators to the given object.
5722
5723             Parameters:
5724                 theShape Shape to be processed.
5725                 theValues List of values of parameters, in the same order
5726                           as parameters are listed in theParameters list.
5727                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5728                 theParameters List of names of parameters
5729                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5730                 theName Object name; when specified, this parameter is used
5731                         for result publication in the study. Otherwise, if automatic
5732                         publication is switched on, default value is used for result name.
5733
5734                 Operators and Parameters:
5735
5736                  * FixShape - corrects invalid shapes.
5737                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5738                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5739                  * FixFaceSize - removes small faces, such as spots and strips.
5740                      * FixFaceSize.Tolerance - defines minimum possible face size.
5741                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5742                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5743                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5744                                 in segments using a certain angle.
5745                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5746                                           if Angle=180, four if Angle=90, etc).
5747                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5748                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5749                                       splitting points.
5750                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5751                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5752                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5753                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5754                      * SplitContinuity.CurveContinuity - required continuity for curves.
5755                        This and the previous parameters can take the following values:
5756                        
5757                        Parametric Continuity:
5758                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5759                                                    coincidental. The curves or surfaces may still meet at an angle,
5760                                                    giving rise to a sharp corner or edge).
5761                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5762                                                    are parallel, ruling out sharp edges).
5763                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5764                                                   or surfaces are of the same magnitude).
5765                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5766                           curves or surfaces (d/du C(u)) are the same at junction.
5767                           
5768                        Geometric Continuity:
5769                        G1: first derivatives are proportional at junction.
5770                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5771                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5772                        G2: first and second derivatives are proportional at junction. As the names imply,
5773                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5774                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5775                            geometric continuity of order n, but not vice-versa.
5776                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5777                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5778                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5779                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5780                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5781                                                         the specified parameters.
5782                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5783                                                         the specified parameters.
5784                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5785                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5786                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5787                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5788                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5789                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5790                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5791                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5792                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5793                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5794                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5795
5796             Returns:
5797                 New GEOM.GEOM_Object, containing processed shape.
5798
5799             Note: For more information look through SALOME Geometry User's Guide->
5800                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5801             """
5802             # Example: see GEOM_TestHealing.py
5803             theValues,Parameters = ParseList(theValues)
5804             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5805             # To avoid script failure in case of good argument shape
5806             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5807                 return theShape
5808             RaiseIfFailed("ProcessShape", self.HealOp)
5809             for string in (theOperators + theParameters):
5810                 Parameters = ":" + Parameters
5811                 pass
5812             anObj.SetParameters(Parameters)
5813             self._autoPublish(anObj, theName, "healed")
5814             return anObj
5815
5816         ## Remove faces from the given object (shape).
5817         #  @param theObject Shape to be processed.
5818         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5819         #                  removes ALL faces of the given object.
5820         #  @param theName Object name; when specified, this parameter is used
5821         #         for result publication in the study. Otherwise, if automatic
5822         #         publication is switched on, default value is used for result name.
5823         #
5824         #  @return New GEOM.GEOM_Object, containing processed shape.
5825         #
5826         #  @ref tui_suppress_faces "Example"
5827         def SuppressFaces(self, theObject, theFaces, theName=None):
5828             """
5829             Remove faces from the given object (shape).
5830
5831             Parameters:
5832                 theObject Shape to be processed.
5833                 theFaces Indices of faces to be removed, if EMPTY then the method
5834                          removes ALL faces of the given object.
5835                 theName Object name; when specified, this parameter is used
5836                         for result publication in the study. Otherwise, if automatic
5837                         publication is switched on, default value is used for result name.
5838
5839             Returns:
5840                 New GEOM.GEOM_Object, containing processed shape.
5841             """
5842             # Example: see GEOM_TestHealing.py
5843             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5844             RaiseIfFailed("SuppressFaces", self.HealOp)
5845             self._autoPublish(anObj, theName, "suppressFaces")
5846             return anObj
5847
5848         ## Sewing of some shapes into single shape.
5849         #  @param ListShape Shapes to be processed.
5850         #  @param theTolerance Required tolerance value.
5851         #  @param theName Object name; when specified, this parameter is used
5852         #         for result publication in the study. Otherwise, if automatic
5853         #         publication is switched on, default value is used for result name.
5854         #
5855         #  @return New GEOM.GEOM_Object, containing processed shape.
5856         #
5857         #  @ref tui_sewing "Example"
5858         def MakeSewing(self, ListShape, theTolerance, theName=None):
5859             """
5860             Sewing of some shapes into single shape.
5861
5862             Parameters:
5863                 ListShape Shapes to be processed.
5864                 theTolerance Required tolerance value.
5865                 theName Object name; when specified, this parameter is used
5866                         for result publication in the study. Otherwise, if automatic
5867                         publication is switched on, default value is used for result name.
5868
5869             Returns:
5870                 New GEOM.GEOM_Object, containing processed shape.
5871             """
5872             # Example: see GEOM_TestHealing.py
5873             comp = self.MakeCompound(ListShape)
5874             # note: auto-publishing is done in self.Sew()
5875             anObj = self.Sew(comp, theTolerance, theName)
5876             return anObj
5877
5878         ## Sewing of the given object.
5879         #  @param theObject Shape to be processed.
5880         #  @param theTolerance Required tolerance value.
5881         #  @param theName Object name; when specified, this parameter is used
5882         #         for result publication in the study. Otherwise, if automatic
5883         #         publication is switched on, default value is used for result name.
5884         #
5885         #  @return New GEOM.GEOM_Object, containing processed shape.
5886         def Sew(self, theObject, theTolerance, theName=None):
5887             """
5888             Sewing of the given object.
5889
5890             Parameters:
5891                 theObject Shape to be processed.
5892                 theTolerance Required tolerance value.
5893                 theName Object name; when specified, this parameter is used
5894                         for result publication in the study. Otherwise, if automatic
5895                         publication is switched on, default value is used for result name.
5896
5897             Returns:
5898                 New GEOM.GEOM_Object, containing processed shape.
5899             """
5900             # Example: see MakeSewing() above
5901             theTolerance,Parameters = ParseParameters(theTolerance)
5902             anObj = self.HealOp.Sew(theObject, theTolerance)
5903             RaiseIfFailed("Sew", self.HealOp)
5904             anObj.SetParameters(Parameters)
5905             self._autoPublish(anObj, theName, "sewed")
5906             return anObj
5907
5908         ## Remove internal wires and edges from the given object (face).
5909         #  @param theObject Shape to be processed.
5910         #  @param theWires Indices of wires to be removed, if EMPTY then the method
5911         #                  removes ALL internal wires of the given object.
5912         #  @param theName Object name; when specified, this parameter is used
5913         #         for result publication in the study. Otherwise, if automatic
5914         #         publication is switched on, default value is used for result name.
5915         #
5916         #  @return New GEOM.GEOM_Object, containing processed shape.
5917         #
5918         #  @ref tui_suppress_internal_wires "Example"
5919         def SuppressInternalWires(self, theObject, theWires, theName=None):
5920             """
5921             Remove internal wires and edges from the given object (face).
5922
5923             Parameters:
5924                 theObject Shape to be processed.
5925                 theWires Indices of wires to be removed, if EMPTY then the method
5926                          removes ALL internal wires of the given object.
5927                 theName Object name; when specified, this parameter is used
5928                         for result publication in the study. Otherwise, if automatic
5929                         publication is switched on, default value is used for result name.
5930
5931             Returns:                
5932                 New GEOM.GEOM_Object, containing processed shape.
5933             """
5934             # Example: see GEOM_TestHealing.py
5935             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
5936             RaiseIfFailed("RemoveIntWires", self.HealOp)
5937             self._autoPublish(anObj, theName, "suppressWires")
5938             return anObj
5939
5940         ## Remove internal closed contours (holes) from the given object.
5941         #  @param theObject Shape to be processed.
5942         #  @param theWires Indices of wires to be removed, if EMPTY then the method
5943         #                  removes ALL internal holes of the given object
5944         #  @param theName Object name; when specified, this parameter is used
5945         #         for result publication in the study. Otherwise, if automatic
5946         #         publication is switched on, default value is used for result name.
5947         #
5948         #  @return New GEOM.GEOM_Object, containing processed shape.
5949         #
5950         #  @ref tui_suppress_holes "Example"
5951         def SuppressHoles(self, theObject, theWires, theName=None):
5952             """
5953             Remove internal closed contours (holes) from the given object.
5954
5955             Parameters:
5956                 theObject Shape to be processed.
5957                 theWires Indices of wires to be removed, if EMPTY then the method
5958                          removes ALL internal holes of the given object
5959                 theName Object name; when specified, this parameter is used
5960                         for result publication in the study. Otherwise, if automatic
5961                         publication is switched on, default value is used for result name.
5962
5963             Returns:    
5964                 New GEOM.GEOM_Object, containing processed shape.
5965             """
5966             # Example: see GEOM_TestHealing.py
5967             anObj = self.HealOp.FillHoles(theObject, theWires)
5968             RaiseIfFailed("FillHoles", self.HealOp)
5969             self._autoPublish(anObj, theName, "suppressHoles")
5970             return anObj
5971
5972         ## Close an open wire.
5973         #  @param theObject Shape to be processed.
5974         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
5975         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
5976         #  @param isCommonVertex If True  : closure by creation of a common vertex,
5977         #                        If False : closure by creation of an edge between ends.
5978         #  @param theName Object name; when specified, this parameter is used
5979         #         for result publication in the study. Otherwise, if automatic
5980         #         publication is switched on, default value is used for result name.
5981         #
5982         #  @return New GEOM.GEOM_Object, containing processed shape.
5983         #
5984         #  @ref tui_close_contour "Example"
5985         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
5986             """
5987             Close an open wire.
5988
5989             Parameters: 
5990                 theObject Shape to be processed.
5991                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
5992                          if [ ], then theObject itself is a wire.
5993                 isCommonVertex If True  : closure by creation of a common vertex,
5994                                If False : closure by creation of an edge between ends.
5995                 theName Object name; when specified, this parameter is used
5996                         for result publication in the study. Otherwise, if automatic
5997                         publication is switched on, default value is used for result name.
5998
5999             Returns:                      
6000                 New GEOM.GEOM_Object, containing processed shape. 
6001             """
6002             # Example: see GEOM_TestHealing.py
6003             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6004             RaiseIfFailed("CloseContour", self.HealOp)
6005             self._autoPublish(anObj, theName, "closeContour")
6006             return anObj
6007
6008         ## Addition of a point to a given edge object.
6009         #  @param theObject Shape to be processed.
6010         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6011         #                      if -1, then theObject itself is the edge.
6012         #  @param theValue Value of parameter on edge or length parameter,
6013         #                  depending on \a isByParameter.
6014         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6015         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6016         #  @param theName Object name; when specified, this parameter is used
6017         #         for result publication in the study. Otherwise, if automatic
6018         #         publication is switched on, default value is used for result name.
6019         #
6020         #  @return New GEOM.GEOM_Object, containing processed shape.
6021         #
6022         #  @ref tui_add_point_on_edge "Example"
6023         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6024             """
6025             Addition of a point to a given edge object.
6026
6027             Parameters: 
6028                 theObject Shape to be processed.
6029                 theEdgeIndex Index of edge to be divided within theObject's shape,
6030                              if -1, then theObject itself is the edge.
6031                 theValue Value of parameter on edge or length parameter,
6032                          depending on isByParameter.
6033                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6034                               if FALSE : theValue is treated as a length parameter [0..1]
6035                 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             Returns:  
6040                 New GEOM.GEOM_Object, containing processed shape.
6041             """
6042             # Example: see GEOM_TestHealing.py
6043             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6044             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6045             RaiseIfFailed("DivideEdge", self.HealOp)
6046             anObj.SetParameters(Parameters)
6047             self._autoPublish(anObj, theName, "divideEdge")
6048             return anObj
6049
6050         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6051         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6052         #  @param theVertices A list of vertices to suppress. If the list
6053         #                     is empty, all vertices in a wire will be assumed.
6054         #  @param theName Object name; when specified, this parameter is used
6055         #         for result publication in the study. Otherwise, if automatic
6056         #         publication is switched on, default value is used for result name.
6057         #
6058         #  @return New GEOM.GEOM_Object with modified wire.
6059         #
6060         #  @ref tui_fuse_collinear_edges "Example"
6061         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6062             """
6063             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6064
6065             Parameters: 
6066                 theWire Wire to minimize the number of C1 continuous edges in.
6067                 theVertices A list of vertices to suppress. If the list
6068                             is empty, all vertices in a wire will be assumed.
6069                 theName Object name; when specified, this parameter is used
6070                         for result publication in the study. Otherwise, if automatic
6071                         publication is switched on, default value is used for result name.
6072
6073             Returns:  
6074                 New GEOM.GEOM_Object with modified wire.
6075             """
6076             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6077             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6078             self._autoPublish(anObj, theName, "fuseEdges")
6079             return anObj
6080
6081         ## Change orientation of the given object. Updates given shape.
6082         #  @param theObject Shape to be processed.
6083         #  @return Updated <var>theObject</var>
6084         #
6085         #  @ref swig_todo "Example"
6086         def ChangeOrientationShell(self,theObject):
6087             """
6088             Change orientation of the given object. Updates given shape.
6089
6090             Parameters: 
6091                 theObject Shape to be processed.
6092
6093             Returns:  
6094                 Updated theObject
6095             """
6096             theObject = self.HealOp.ChangeOrientation(theObject)
6097             RaiseIfFailed("ChangeOrientation", self.HealOp)
6098             pass
6099
6100         ## Change orientation of the given object.
6101         #  @param theObject Shape to be processed.
6102         #  @param theName Object name; when specified, this parameter is used
6103         #         for result publication in the study. Otherwise, if automatic
6104         #         publication is switched on, default value is used for result name.
6105         #
6106         #  @return New GEOM.GEOM_Object, containing processed shape.
6107         #
6108         #  @ref swig_todo "Example"
6109         def ChangeOrientationShellCopy(self, theObject, theName=None):
6110             """
6111             Change orientation of the given object.
6112
6113             Parameters:
6114                 theObject Shape to be processed.
6115                 theName Object name; when specified, this parameter is used
6116                         for result publication in the study. Otherwise, if automatic
6117                         publication is switched on, default value is used for result name.
6118
6119             Returns:   
6120                 New GEOM.GEOM_Object, containing processed shape.
6121             """
6122             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6123             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6124             self._autoPublish(anObj, theName, "reversed")
6125             return anObj
6126
6127         ## Try to limit tolerance of the given object by value \a theTolerance.
6128         #  @param theObject Shape to be processed.
6129         #  @param theTolerance Required tolerance value.
6130         #  @param theName Object name; when specified, this parameter is used
6131         #         for result publication in the study. Otherwise, if automatic
6132         #         publication is switched on, default value is used for result name.
6133         #
6134         #  @return New GEOM.GEOM_Object, containing processed shape.
6135         #
6136         #  @ref tui_limit_tolerance "Example"
6137         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6138             """
6139             Try to limit tolerance of the given object by value theTolerance.
6140
6141             Parameters:
6142                 theObject Shape to be processed.
6143                 theTolerance Required tolerance value.
6144                 theName Object name; when specified, this parameter is used
6145                         for result publication in the study. Otherwise, if automatic
6146                         publication is switched on, default value is used for result name.
6147
6148             Returns:   
6149                 New GEOM.GEOM_Object, containing processed shape.
6150             """
6151             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6152             RaiseIfFailed("LimitTolerance", self.HealOp)
6153             self._autoPublish(anObj, theName, "limitTolerance")
6154             return anObj
6155
6156         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6157         #  that constitute a free boundary of the given shape.
6158         #  @param theObject Shape to get free boundary of.
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         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6164         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6165         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6166         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6167         #
6168         #  @ref tui_measurement_tools_page "Example"
6169         def GetFreeBoundary(self, theObject, theName=None):
6170             """
6171             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6172             that constitute a free boundary of the given shape.
6173
6174             Parameters:
6175                 theObject Shape to get free boundary of.
6176                 theName Object name; when specified, this parameter is used
6177                         for result publication in the study. Otherwise, if automatic
6178                         publication is switched on, default value is used for result name.
6179
6180             Returns: 
6181                 [status, theClosedWires, theOpenWires]
6182                  status: FALSE, if an error(s) occured during the method execution.
6183                  theClosedWires: Closed wires on the free boundary of the given shape.
6184                  theOpenWires: Open wires on the free boundary of the given shape.
6185             """
6186             # Example: see GEOM_TestHealing.py
6187             anObj = self.HealOp.GetFreeBoundary(theObject)
6188             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6189             self._autoPublish(anObj[1], theName, "closedWire")
6190             self._autoPublish(anObj[2], theName, "openWire")
6191             return anObj
6192
6193         ## Replace coincident faces in theShape by one face.
6194         #  @param theShape Initial shape.
6195         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6196         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6197         #                         otherwise all initial shapes.
6198         #  @param theName Object name; when specified, this parameter is used
6199         #         for result publication in the study. Otherwise, if automatic
6200         #         publication is switched on, default value is used for result name.
6201         #
6202         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6203         #
6204         #  @ref tui_glue_faces "Example"
6205         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6206             """
6207             Replace coincident faces in theShape by one face.
6208
6209             Parameters:
6210                 theShape Initial shape.
6211                 theTolerance Maximum distance between faces, which can be considered as coincident.
6212                 doKeepNonSolids If FALSE, only solids will present in the result,
6213                                 otherwise all initial shapes.
6214                 theName Object name; when specified, this parameter is used
6215                         for result publication in the study. Otherwise, if automatic
6216                         publication is switched on, default value is used for result name.
6217
6218             Returns:
6219                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6220             """
6221             # Example: see GEOM_Spanner.py
6222             theTolerance,Parameters = ParseParameters(theTolerance)
6223             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6224             if anObj is None:
6225                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6226             anObj.SetParameters(Parameters)
6227             self._autoPublish(anObj, theName, "glueFaces")
6228             return anObj
6229
6230         ## Find coincident faces in theShape for possible gluing.
6231         #  @param theShape Initial shape.
6232         #  @param theTolerance Maximum distance between faces,
6233         #                      which can be considered as coincident.
6234         #  @param theName Object name; when specified, this parameter is used
6235         #         for result publication in the study. Otherwise, if automatic
6236         #         publication is switched on, default value is used for result name.
6237         #
6238         #  @return GEOM.ListOfGO
6239         #
6240         #  @ref tui_glue_faces "Example"
6241         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6242             """
6243             Find coincident faces in theShape for possible gluing.
6244
6245             Parameters:
6246                 theShape Initial shape.
6247                 theTolerance Maximum distance between faces,
6248                              which can be considered as coincident.
6249                 theName Object name; when specified, this parameter is used
6250                         for result publication in the study. Otherwise, if automatic
6251                         publication is switched on, default value is used for result name.
6252
6253             Returns:                    
6254                 GEOM.ListOfGO
6255             """
6256             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6257             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6258             self._autoPublish(anObj, theName, "facesToGlue")
6259             return anObj
6260
6261         ## Replace coincident faces in theShape by one face
6262         #  in compliance with given list of faces
6263         #  @param theShape Initial shape.
6264         #  @param theTolerance Maximum distance between faces,
6265         #                      which can be considered as coincident.
6266         #  @param theFaces List of faces for gluing.
6267         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6268         #                         otherwise all initial shapes.
6269         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6270         #                        will be glued, otherwise only the edges,
6271         #                        belonging to <VAR>theFaces</VAR>.
6272         #  @param theName Object name; when specified, this parameter is used
6273         #         for result publication in the study. Otherwise, if automatic
6274         #         publication is switched on, default value is used for result name.
6275         #
6276         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6277         #          without some faces.
6278         #
6279         #  @ref tui_glue_faces "Example"
6280         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6281                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6282             """
6283             Replace coincident faces in theShape by one face
6284             in compliance with given list of faces
6285
6286             Parameters:
6287                 theShape Initial shape.
6288                 theTolerance Maximum distance between faces,
6289                              which can be considered as coincident.
6290                 theFaces List of faces for gluing.
6291                 doKeepNonSolids If FALSE, only solids will present in the result,
6292                                 otherwise all initial shapes.
6293                 doGlueAllEdges If TRUE, all coincident edges of theShape
6294                                will be glued, otherwise only the edges,
6295                                belonging to theFaces.
6296                 theName Object name; when specified, this parameter is used
6297                         for result publication in the study. Otherwise, if automatic
6298                         publication is switched on, default value is used for result name.
6299
6300             Returns:
6301                 New GEOM.GEOM_Object, containing a copy of theShape
6302                     without some faces.
6303             """
6304             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6305                                                       doKeepNonSolids, doGlueAllEdges)
6306             if anObj is None:
6307                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6308             self._autoPublish(anObj, theName, "glueFaces")
6309             return anObj
6310
6311         ## Replace coincident edges in theShape by one edge.
6312         #  @param theShape Initial shape.
6313         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6314         #  @param theName Object name; when specified, this parameter is used
6315         #         for result publication in the study. Otherwise, if automatic
6316         #         publication is switched on, default value is used for result name.
6317         #
6318         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6319         #
6320         #  @ref tui_glue_edges "Example"
6321         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6322             """
6323             Replace coincident edges in theShape by one edge.
6324
6325             Parameters:
6326                 theShape Initial shape.
6327                 theTolerance Maximum distance between edges, which can be considered as coincident.
6328                 theName Object name; when specified, this parameter is used
6329                         for result publication in the study. Otherwise, if automatic
6330                         publication is switched on, default value is used for result name.
6331
6332             Returns:    
6333                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6334             """
6335             theTolerance,Parameters = ParseParameters(theTolerance)
6336             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6337             if anObj is None:
6338                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6339             anObj.SetParameters(Parameters)
6340             self._autoPublish(anObj, theName, "glueEdges")
6341             return anObj
6342
6343         ## Find coincident edges in theShape for possible gluing.
6344         #  @param theShape Initial shape.
6345         #  @param theTolerance Maximum distance between edges,
6346         #                      which can be considered as coincident.
6347         #  @param theName Object name; when specified, this parameter is used
6348         #         for result publication in the study. Otherwise, if automatic
6349         #         publication is switched on, default value is used for result name.
6350         #
6351         #  @return GEOM.ListOfGO
6352         #
6353         #  @ref tui_glue_edges "Example"
6354         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6355             """
6356             Find coincident edges in theShape for possible gluing.
6357
6358             Parameters:
6359                 theShape Initial shape.
6360                 theTolerance Maximum distance between edges,
6361                              which can be considered as coincident.
6362                 theName Object name; when specified, this parameter is used
6363                         for result publication in the study. Otherwise, if automatic
6364                         publication is switched on, default value is used for result name.
6365
6366             Returns:                         
6367                 GEOM.ListOfGO
6368             """
6369             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6370             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6371             self._autoPublish(anObj, theName, "edgesToGlue")
6372             return anObj
6373
6374         ## Replace coincident edges in theShape by one edge
6375         #  in compliance with given list of edges.
6376         #  @param theShape Initial shape.
6377         #  @param theTolerance Maximum distance between edges,
6378         #                      which can be considered as coincident.
6379         #  @param theEdges List of edges for gluing.
6380         #  @param theName Object name; when specified, this parameter is used
6381         #         for result publication in the study. Otherwise, if automatic
6382         #         publication is switched on, default value is used for result name.
6383         #
6384         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6385         #          without some edges.
6386         #
6387         #  @ref tui_glue_edges "Example"
6388         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6389             """
6390             Replace coincident edges in theShape by one edge
6391             in compliance with given list of edges.
6392
6393             Parameters:
6394                 theShape Initial shape.
6395                 theTolerance Maximum distance between edges,
6396                              which can be considered as coincident.
6397                 theEdges List of edges for gluing.
6398                 theName Object name; when specified, this parameter is used
6399                         for result publication in the study. Otherwise, if automatic
6400                         publication is switched on, default value is used for result name.
6401
6402             Returns:  
6403                 New GEOM.GEOM_Object, containing a copy of theShape
6404                 without some edges.
6405             """
6406             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6407             if anObj is None:
6408                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6409             self._autoPublish(anObj, theName, "glueEdges")
6410             return anObj
6411
6412         # end of l3_healing
6413         ## @}
6414
6415         ## @addtogroup l3_boolean Boolean Operations
6416         ## @{
6417
6418         # -----------------------------------------------------------------------------
6419         # Boolean (Common, Cut, Fuse, Section)
6420         # -----------------------------------------------------------------------------
6421
6422         ## Perform one of boolean operations on two given shapes.
6423         #  @param theShape1 First argument for boolean operation.
6424         #  @param theShape2 Second argument for boolean operation.
6425         #  @param theOperation Indicates the operation to be done:\n
6426         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6427         #  @param theName Object name; when specified, this parameter is used
6428         #         for result publication in the study. Otherwise, if automatic
6429         #         publication is switched on, default value is used for result name.
6430         #
6431         #  @return New GEOM.GEOM_Object, containing the result shape.
6432         #
6433         #  @ref tui_fuse "Example"
6434         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6435             """
6436             Perform one of boolean operations on two given shapes.
6437
6438             Parameters: 
6439                 theShape1 First argument for boolean operation.
6440                 theShape2 Second argument for boolean operation.
6441                 theOperation Indicates the operation to be done:
6442                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6443                 theName Object name; when specified, this parameter is used
6444                         for result publication in the study. Otherwise, if automatic
6445                         publication is switched on, default value is used for result name.
6446
6447             Returns:   
6448                 New GEOM.GEOM_Object, containing the result shape.
6449             """
6450             # Example: see GEOM_TestAll.py
6451             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6452             RaiseIfFailed("MakeBoolean", self.BoolOp)
6453             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6454             self._autoPublish(anObj, theName, def_names[theOperation])
6455             return anObj
6456
6457         ## Perform Common boolean operation on two given shapes.
6458         #  @param theShape1 First argument for boolean operation.
6459         #  @param theShape2 Second argument for boolean operation.
6460         #  @param theName Object name; when specified, this parameter is used
6461         #         for result publication in the study. Otherwise, if automatic
6462         #         publication is switched on, default value is used for result name.
6463         #
6464         #  @return New GEOM.GEOM_Object, containing the result shape.
6465         #
6466         #  @ref tui_common "Example 1"
6467         #  \n @ref swig_MakeCommon "Example 2"
6468         def MakeCommon(self, theShape1, theShape2, theName=None):
6469             """
6470             Perform Common boolean operation on two given shapes.
6471
6472             Parameters: 
6473                 theShape1 First argument for boolean operation.
6474                 theShape2 Second argument for boolean operation.
6475                 theName Object name; when specified, this parameter is used
6476                         for result publication in the study. Otherwise, if automatic
6477                         publication is switched on, default value is used for result name.
6478
6479             Returns:   
6480                 New GEOM.GEOM_Object, containing the result shape.
6481             """
6482             # Example: see GEOM_TestOthers.py
6483             # note: auto-publishing is done in self.MakeBoolean()
6484             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6485
6486         ## Perform Cut boolean operation on two given shapes.
6487         #  @param theShape1 First argument for boolean operation.
6488         #  @param theShape2 Second argument for boolean operation.
6489         #  @param theName Object name; when specified, this parameter is used
6490         #         for result publication in the study. Otherwise, if automatic
6491         #         publication is switched on, default value is used for result name.
6492         #
6493         #  @return New GEOM.GEOM_Object, containing the result shape.
6494         #
6495         #  @ref tui_cut "Example 1"
6496         #  \n @ref swig_MakeCommon "Example 2"
6497         def MakeCut(self, theShape1, theShape2, theName=None):
6498             """
6499             Perform Cut boolean operation on two given shapes.
6500
6501             Parameters: 
6502                 theShape1 First argument for boolean operation.
6503                 theShape2 Second argument for boolean operation.
6504                 theName Object name; when specified, this parameter is used
6505                         for result publication in the study. Otherwise, if automatic
6506                         publication is switched on, default value is used for result name.
6507
6508             Returns:   
6509                 New GEOM.GEOM_Object, containing the result shape.
6510             
6511             """
6512             # Example: see GEOM_TestOthers.py
6513             # note: auto-publishing is done in self.MakeBoolean()
6514             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6515
6516         ## Perform Fuse boolean operation on two given shapes.
6517         #  @param theShape1 First argument for boolean operation.
6518         #  @param theShape2 Second argument for boolean operation.
6519         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
6524         #
6525         #  @ref tui_fuse "Example 1"
6526         #  \n @ref swig_MakeCommon "Example 2"
6527         def MakeFuse(self, theShape1, theShape2, theName=None):
6528             """
6529             Perform Fuse boolean operation on two given shapes.
6530
6531             Parameters: 
6532                 theShape1 First argument for boolean operation.
6533                 theShape2 Second argument for boolean operation.
6534                 theName Object name; when specified, this parameter is used
6535                         for result publication in the study. Otherwise, if automatic
6536                         publication is switched on, default value is used for result name.
6537
6538             Returns:   
6539                 New GEOM.GEOM_Object, containing the result shape.
6540             
6541             """
6542             # Example: see GEOM_TestOthers.py
6543             # note: auto-publishing is done in self.MakeBoolean()
6544             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6545
6546         ## Perform Section boolean operation on two given shapes.
6547         #  @param theShape1 First argument for boolean operation.
6548         #  @param theShape2 Second argument for boolean operation.
6549         #  @param theName Object name; when specified, this parameter is used
6550         #         for result publication in the study. Otherwise, if automatic
6551         #         publication is switched on, default value is used for result name.
6552         #
6553         #  @return New GEOM.GEOM_Object, containing the result shape.
6554         #
6555         #  @ref tui_section "Example 1"
6556         #  \n @ref swig_MakeCommon "Example 2"
6557         def MakeSection(self, theShape1, theShape2, theName=None):
6558             """
6559             Perform Section boolean operation on two given shapes.
6560
6561             Parameters: 
6562                 theShape1 First argument for boolean operation.
6563                 theShape2 Second argument for boolean operation.
6564                 theName Object name; when specified, this parameter is used
6565                         for result publication in the study. Otherwise, if automatic
6566                         publication is switched on, default value is used for result name.
6567
6568             Returns:   
6569                 New GEOM.GEOM_Object, containing the result shape.
6570             
6571             """
6572             # Example: see GEOM_TestOthers.py
6573             # note: auto-publishing is done in self.MakeBoolean()
6574             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6575
6576         # end of l3_boolean
6577         ## @}
6578
6579         ## @addtogroup l3_basic_op
6580         ## @{
6581
6582         ## Perform partition operation.
6583         #  @param ListShapes Shapes to be intersected.
6584         #  @param ListTools Shapes to intersect theShapes.
6585         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6586         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6587         #         type will be detected automatically.
6588         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6589         #                             target type (equal to Limit) are kept in the result,
6590         #                             else standalone shapes of lower dimension
6591         #                             are kept also (if they exist).
6592         #  @param theName Object name; when specified, this parameter is used
6593         #         for result publication in the study. Otherwise, if automatic
6594         #         publication is switched on, default value is used for result name.
6595         #
6596         #  @note Each compound from ListShapes and ListTools will be exploded
6597         #        in order to avoid possible intersection between shapes from this compound.
6598         #
6599         #  After implementation new version of PartitionAlgo (October 2006)
6600         #  other parameters are ignored by current functionality. They are kept
6601         #  in this function only for support old versions.
6602         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6603         #         Each shape from theKeepInside must belong to theShapes also.
6604         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6605         #         Each shape from theRemoveInside must belong to theShapes also.
6606         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6607         #      @param ListMaterials Material indices for each shape. Make sence,
6608         #         only if theRemoveWebs is TRUE.
6609         #
6610         #  @return New GEOM.GEOM_Object, containing the result shapes.
6611         #
6612         #  @ref tui_partition "Example"
6613         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6614                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6615                           KeepNonlimitShapes=0, theName=None):
6616             """
6617             Perform partition operation.
6618
6619             Parameters: 
6620                 ListShapes Shapes to be intersected.
6621                 ListTools Shapes to intersect theShapes.
6622                 Limit Type of resulting shapes (see geompy.ShapeType)
6623                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6624                       type will be detected automatically.
6625                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6626                                     target type (equal to Limit) are kept in the result,
6627                                     else standalone shapes of lower dimension
6628                                     are kept also (if they exist).
6629                 theName Object name; when specified, this parameter is used
6630                         for result publication in the study. Otherwise, if automatic
6631                         publication is switched on, default value is used for result name.
6632             Note:
6633                     Each compound from ListShapes and ListTools will be exploded
6634                     in order to avoid possible intersection between shapes from
6635                     this compound.
6636                     
6637             After implementation new version of PartitionAlgo (October 2006) other
6638             parameters are ignored by current functionality. They are kept in this
6639             function only for support old versions.
6640             
6641             Ignored parameters:
6642                 ListKeepInside Shapes, outside which the results will be deleted.
6643                                Each shape from theKeepInside must belong to theShapes also.
6644                 ListRemoveInside Shapes, inside which the results will be deleted.
6645                                  Each shape from theRemoveInside must belong to theShapes also.
6646                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6647                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6648
6649             Returns:   
6650                 New GEOM.GEOM_Object, containing the result shapes.
6651             """
6652             # Example: see GEOM_TestAll.py
6653             if Limit == ShapeType["AUTO"]:
6654                 # automatic detection of the most appropriate shape limit type
6655                 lim = GEOM.SHAPE
6656                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6657                 Limit = EnumToLong(lim)
6658                 pass
6659             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6660                                               ListKeepInside, ListRemoveInside,
6661                                               Limit, RemoveWebs, ListMaterials,
6662                                               KeepNonlimitShapes);
6663             RaiseIfFailed("MakePartition", self.BoolOp)
6664             self._autoPublish(anObj, theName, "partition")
6665             return anObj
6666
6667         ## Perform partition operation.
6668         #  This method may be useful if it is needed to make a partition for
6669         #  compound contains nonintersected shapes. Performance will be better
6670         #  since intersection between shapes from compound is not performed.
6671         #
6672         #  Description of all parameters as in previous method MakePartition()
6673         #
6674         #  @note Passed compounds (via ListShapes or via ListTools)
6675         #           have to consist of nonintersecting shapes.
6676         #
6677         #  @return New GEOM.GEOM_Object, containing the result shapes.
6678         #
6679         #  @ref swig_todo "Example"
6680         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6681                                                  ListKeepInside=[], ListRemoveInside=[],
6682                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6683                                                  ListMaterials=[], KeepNonlimitShapes=0,
6684                                                  theName=None):
6685             """
6686             Perform partition operation.
6687             This method may be useful if it is needed to make a partition for
6688             compound contains nonintersected shapes. Performance will be better
6689             since intersection between shapes from compound is not performed.
6690
6691             Parameters: 
6692                 Description of all parameters as in method geompy.MakePartition
6693         
6694             NOTE:
6695                 Passed compounds (via ListShapes or via ListTools)
6696                 have to consist of nonintersecting shapes.
6697
6698             Returns:   
6699                 New GEOM.GEOM_Object, containing the result shapes.
6700             """
6701             if Limit == ShapeType["AUTO"]:
6702                 # automatic detection of the most appropriate shape limit type
6703                 lim = GEOM.SHAPE
6704                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6705                 Limit = EnumToLong(lim)
6706                 pass
6707             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6708                                                                      ListKeepInside, ListRemoveInside,
6709                                                                      Limit, RemoveWebs, ListMaterials,
6710                                                                      KeepNonlimitShapes);
6711             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6712             self._autoPublish(anObj, theName, "partition")
6713             return anObj
6714
6715         ## See method MakePartition() for more information.
6716         #
6717         #  @ref tui_partition "Example 1"
6718         #  \n @ref swig_Partition "Example 2"
6719         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6720                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6721                       KeepNonlimitShapes=0, theName=None):
6722             """
6723             See method geompy.MakePartition for more information.
6724             """
6725             # Example: see GEOM_TestOthers.py
6726             # note: auto-publishing is done in self.MakePartition()
6727             anObj = self.MakePartition(ListShapes, ListTools,
6728                                        ListKeepInside, ListRemoveInside,
6729                                        Limit, RemoveWebs, ListMaterials,
6730                                        KeepNonlimitShapes, theName);
6731             return anObj
6732
6733         ## Perform partition of the Shape with the Plane
6734         #  @param theShape Shape to be intersected.
6735         #  @param thePlane Tool shape, to intersect theShape.
6736         #  @param theName Object name; when specified, this parameter is used
6737         #         for result publication in the study. Otherwise, if automatic
6738         #         publication is switched on, default value is used for result name.
6739         #
6740         #  @return New GEOM.GEOM_Object, containing the result shape.
6741         #
6742         #  @ref tui_partition "Example"
6743         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6744             """
6745             Perform partition of the Shape with the Plane
6746
6747             Parameters: 
6748                 theShape Shape to be intersected.
6749                 thePlane Tool shape, to intersect theShape.
6750                 theName Object name; when specified, this parameter is used
6751                         for result publication in the study. Otherwise, if automatic
6752                         publication is switched on, default value is used for result name.
6753
6754             Returns:  
6755                 New GEOM.GEOM_Object, containing the result shape.
6756             """
6757             # Example: see GEOM_TestAll.py
6758             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
6759             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
6760             self._autoPublish(anObj, theName, "partition")
6761             return anObj
6762
6763         # end of l3_basic_op
6764         ## @}
6765
6766         ## @addtogroup l3_transform
6767         ## @{
6768
6769         ## Translate the given object along the vector, specified
6770         #  by its end points.
6771         #  @param theObject The object to be translated.
6772         #  @param thePoint1 Start point of translation vector.
6773         #  @param thePoint2 End point of translation vector.
6774         #  @param theCopy Flag used to translate object itself or create a copy.
6775         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6776         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6777         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
6778             """
6779             Translate the given object along the vector, specified by its end points.
6780
6781             Parameters: 
6782                 theObject The object to be translated.
6783                 thePoint1 Start point of translation vector.
6784                 thePoint2 End point of translation vector.
6785                 theCopy Flag used to translate object itself or create a copy.
6786
6787             Returns: 
6788                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6789                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6790             """
6791             if theCopy:
6792                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6793             else:
6794                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
6795             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
6796             return anObj
6797
6798         ## Translate the given object along the vector, specified
6799         #  by its end points, creating its copy before the translation.
6800         #  @param theObject The object to be translated.
6801         #  @param thePoint1 Start point of translation vector.
6802         #  @param thePoint2 End point of translation vector.
6803         #  @param theName Object name; when specified, this parameter is used
6804         #         for result publication in the study. Otherwise, if automatic
6805         #         publication is switched on, default value is used for result name.
6806         #
6807         #  @return New GEOM.GEOM_Object, containing the translated object.
6808         #
6809         #  @ref tui_translation "Example 1"
6810         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
6811         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
6812             """
6813             Translate the given object along the vector, specified
6814             by its end points, creating its copy before the translation.
6815
6816             Parameters: 
6817                 theObject The object to be translated.
6818                 thePoint1 Start point of translation vector.
6819                 thePoint2 End point of translation vector.
6820                 theName Object name; when specified, this parameter is used
6821                         for result publication in the study. Otherwise, if automatic
6822                         publication is switched on, default value is used for result name.
6823
6824             Returns:  
6825                 New GEOM.GEOM_Object, containing the translated object.
6826             """
6827             # Example: see GEOM_TestAll.py
6828             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6829             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
6830             self._autoPublish(anObj, theName, "translated")
6831             return anObj
6832
6833         ## Translate the given object along the vector, specified by its components.
6834         #  @param theObject The object to be translated.
6835         #  @param theDX,theDY,theDZ Components of translation vector.
6836         #  @param theCopy Flag used to translate object itself or create a copy.
6837         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6838         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6839         #
6840         #  @ref tui_translation "Example"
6841         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
6842             """
6843             Translate the given object along the vector, specified by its components.
6844
6845             Parameters: 
6846                 theObject The object to be translated.
6847                 theDX,theDY,theDZ Components of translation vector.
6848                 theCopy Flag used to translate object itself or create a copy.
6849
6850             Returns: 
6851                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6852                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6853             """
6854             # Example: see GEOM_TestAll.py
6855             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
6856             if theCopy:
6857                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
6858             else:
6859                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
6860             anObj.SetParameters(Parameters)
6861             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
6862             return anObj
6863
6864         ## Translate the given object along the vector, specified
6865         #  by its components, creating its copy before the translation.
6866         #  @param theObject The object to be translated.
6867         #  @param theDX,theDY,theDZ Components of translation vector.
6868         #  @param theName Object name; when specified, this parameter is used
6869         #         for result publication in the study. Otherwise, if automatic
6870         #         publication is switched on, default value is used for result name.
6871         #
6872         #  @return New GEOM.GEOM_Object, containing the translated object.
6873         #
6874         #  @ref tui_translation "Example"
6875         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
6876             """
6877             Translate the given object along the vector, specified
6878             by its components, creating its copy before the translation.
6879
6880             Parameters: 
6881                 theObject The object to be translated.
6882                 theDX,theDY,theDZ Components of translation vector.
6883                 theName Object name; when specified, this parameter is used
6884                         for result publication in the study. Otherwise, if automatic
6885                         publication is switched on, default value is used for result name.
6886
6887             Returns: 
6888                 New GEOM.GEOM_Object, containing the translated object.
6889             """
6890             # Example: see GEOM_TestAll.py
6891             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
6892             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
6893             anObj.SetParameters(Parameters)
6894             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
6895             self._autoPublish(anObj, theName, "translated")
6896             return anObj
6897
6898         ## Translate the given object along the given vector.
6899         #  @param theObject The object to be translated.
6900         #  @param theVector The translation vector.
6901         #  @param theCopy Flag used to translate object itself or create a copy.
6902         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6903         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6904         def TranslateVector(self, theObject, theVector, theCopy=False):
6905             """
6906             Translate the given object along the given vector.
6907
6908             Parameters: 
6909                 theObject The object to be translated.
6910                 theVector The translation vector.
6911                 theCopy Flag used to translate object itself or create a copy.
6912
6913             Returns: 
6914                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6915                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6916             """
6917             if theCopy:
6918                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
6919             else:
6920                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
6921             RaiseIfFailed("TranslateVector", self.TrsfOp)
6922             return anObj
6923
6924         ## Translate the given object along the given vector,
6925         #  creating its copy before the translation.
6926         #  @param theObject The object to be translated.
6927         #  @param theVector The translation vector.
6928         #  @param theName Object name; when specified, this parameter is used
6929         #         for result publication in the study. Otherwise, if automatic
6930         #         publication is switched on, default value is used for result name.
6931         #
6932         #  @return New GEOM.GEOM_Object, containing the translated object.
6933         #
6934         #  @ref tui_translation "Example"
6935         def MakeTranslationVector(self, theObject, theVector, theName=None):
6936             """
6937             Translate the given object along the given vector,
6938             creating its copy before the translation.
6939
6940             Parameters: 
6941                 theObject The object to be translated.
6942                 theVector The translation vector.
6943                 theName Object name; when specified, this parameter is used
6944                         for result publication in the study. Otherwise, if automatic
6945                         publication is switched on, default value is used for result name.
6946
6947             Returns: 
6948                 New GEOM.GEOM_Object, containing the translated object.
6949             """
6950             # Example: see GEOM_TestAll.py
6951             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
6952             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
6953             self._autoPublish(anObj, theName, "translated")
6954             return anObj
6955
6956         ## Translate the given object along the given vector on given distance.
6957         #  @param theObject The object to be translated.
6958         #  @param theVector The translation vector.
6959         #  @param theDistance The translation distance.
6960         #  @param theCopy Flag used to translate object itself or create a copy.
6961         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6962         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6963         #
6964         #  @ref tui_translation "Example"
6965         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
6966             """
6967             Translate the given object along the given vector on given distance.
6968
6969             Parameters: 
6970                 theObject The object to be translated.
6971                 theVector The translation vector.
6972                 theDistance The translation distance.
6973                 theCopy Flag used to translate object itself or create a copy.
6974
6975             Returns: 
6976                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6977                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6978             """
6979             # Example: see GEOM_TestAll.py
6980             theDistance,Parameters = ParseParameters(theDistance)
6981             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
6982             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
6983             anObj.SetParameters(Parameters)
6984             return anObj
6985
6986         ## Translate the given object along the given vector on given distance,
6987         #  creating its copy before the translation.
6988         #  @param theObject The object to be translated.
6989         #  @param theVector The translation vector.
6990         #  @param theDistance The translation distance.
6991         #  @param theName Object name; when specified, this parameter is used
6992         #         for result publication in the study. Otherwise, if automatic
6993         #         publication is switched on, default value is used for result name.
6994         #
6995         #  @return New GEOM.GEOM_Object, containing the translated object.
6996         #
6997         #  @ref tui_translation "Example"
6998         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
6999             """
7000             Translate the given object along the given vector on given distance,
7001             creating its copy before the translation.
7002
7003             Parameters:
7004                 theObject The object to be translated.
7005                 theVector The translation vector.
7006                 theDistance The translation distance.
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 the translated object.
7013             """
7014             # Example: see GEOM_TestAll.py
7015             theDistance,Parameters = ParseParameters(theDistance)
7016             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7017             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7018             anObj.SetParameters(Parameters)
7019             self._autoPublish(anObj, theName, "translated")
7020             return anObj
7021
7022         ## Rotate the given object around the given axis on the given angle.
7023         #  @param theObject The object to be rotated.
7024         #  @param theAxis Rotation axis.
7025         #  @param theAngle Rotation angle in radians.
7026         #  @param theCopy Flag used to rotate object itself or create a copy.
7027         #
7028         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7029         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7030         #
7031         #  @ref tui_rotation "Example"
7032         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7033             """
7034             Rotate the given object around the given axis on the given angle.
7035
7036             Parameters:
7037                 theObject The object to be rotated.
7038                 theAxis Rotation axis.
7039                 theAngle Rotation angle in radians.
7040                 theCopy Flag used to rotate object itself or create a copy.
7041
7042             Returns:
7043                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7044                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7045             """
7046             # Example: see GEOM_TestAll.py
7047             flag = False
7048             if isinstance(theAngle,str):
7049                 flag = True
7050             theAngle, Parameters = ParseParameters(theAngle)
7051             if flag:
7052                 theAngle = theAngle*math.pi/180.0
7053             if theCopy:
7054                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7055             else:
7056                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7057             RaiseIfFailed("Rotate", self.TrsfOp)
7058             anObj.SetParameters(Parameters)
7059             return anObj
7060
7061         ## Rotate the given object around the given axis
7062         #  on the given angle, creating its copy before the rotatation.
7063         #  @param theObject The object to be rotated.
7064         #  @param theAxis Rotation axis.
7065         #  @param theAngle Rotation angle in radians.
7066         #  @param theName Object name; when specified, this parameter is used
7067         #         for result publication in the study. Otherwise, if automatic
7068         #         publication is switched on, default value is used for result name.
7069         #
7070         #  @return New GEOM.GEOM_Object, containing the rotated object.
7071         #
7072         #  @ref tui_rotation "Example"
7073         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7074             """
7075             Rotate the given object around the given axis
7076             on the given angle, creating its copy before the rotatation.
7077
7078             Parameters:
7079                 theObject The object to be rotated.
7080                 theAxis Rotation axis.
7081                 theAngle Rotation angle in radians.
7082                 theName Object name; when specified, this parameter is used
7083                         for result publication in the study. Otherwise, if automatic
7084                         publication is switched on, default value is used for result name.
7085
7086             Returns:
7087                 New GEOM.GEOM_Object, containing the rotated object.
7088             """
7089             # Example: see GEOM_TestAll.py
7090             flag = False
7091             if isinstance(theAngle,str):
7092                 flag = True
7093             theAngle, Parameters = ParseParameters(theAngle)
7094             if flag:
7095                 theAngle = theAngle*math.pi/180.0
7096             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7097             RaiseIfFailed("RotateCopy", self.TrsfOp)
7098             anObj.SetParameters(Parameters)
7099             self._autoPublish(anObj, theName, "rotated")
7100             return anObj
7101
7102         ## Rotate given object around vector perpendicular to plane
7103         #  containing three points.
7104         #  @param theObject The object to be rotated.
7105         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7106         #  containing the three points.
7107         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7108         #  @param theCopy Flag used to rotate object itself or create a copy.
7109         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7110         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7111         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7112             """
7113             Rotate given object around vector perpendicular to plane
7114             containing three points.
7115
7116             Parameters:
7117                 theObject The object to be rotated.
7118                 theCentPoint central point  the axis is the vector perpendicular to the plane
7119                              containing the three points.
7120                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7121                 theCopy Flag used to rotate object itself or create a copy.
7122
7123             Returns:
7124                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7125                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7126             """
7127             if theCopy:
7128                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7129             else:
7130                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7131             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7132             return anObj
7133
7134         ## Rotate given object around vector perpendicular to plane
7135         #  containing three points, creating its copy before the rotatation.
7136         #  @param theObject The object to be rotated.
7137         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7138         #  containing the three points.
7139         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7140         #  @param theName Object name; when specified, this parameter is used
7141         #         for result publication in the study. Otherwise, if automatic
7142         #         publication is switched on, default value is used for result name.
7143         #
7144         #  @return New GEOM.GEOM_Object, containing the rotated object.
7145         #
7146         #  @ref tui_rotation "Example"
7147         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7148             """
7149             Rotate given object around vector perpendicular to plane
7150             containing three points, creating its copy before the rotatation.
7151
7152             Parameters:
7153                 theObject The object to be rotated.
7154                 theCentPoint central point  the axis is the vector perpendicular to the plane
7155                              containing the three points.
7156                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7157                 theName Object name; when specified, this parameter is used
7158                         for result publication in the study. Otherwise, if automatic
7159                         publication is switched on, default value is used for result name.
7160
7161             Returns:
7162                 New GEOM.GEOM_Object, containing the rotated object.
7163             """
7164             # Example: see GEOM_TestAll.py
7165             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7166             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7167             self._autoPublish(anObj, theName, "rotated")
7168             return anObj
7169
7170         ## Scale the given object by the specified factor.
7171         #  @param theObject The object to be scaled.
7172         #  @param thePoint Center point for scaling.
7173         #                  Passing None for it means scaling relatively the origin of global CS.
7174         #  @param theFactor Scaling factor value.
7175         #  @param theCopy Flag used to scale object itself or create a copy.
7176         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7177         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7178         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7179             """
7180             Scale the given object by the specified factor.
7181
7182             Parameters:
7183                 theObject The object to be scaled.
7184                 thePoint Center point for scaling.
7185                          Passing None for it means scaling relatively the origin of global CS.
7186                 theFactor Scaling factor value.
7187                 theCopy Flag used to scale object itself or create a copy.
7188
7189             Returns:    
7190                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7191                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7192             """
7193             # Example: see GEOM_TestAll.py
7194             theFactor, Parameters = ParseParameters(theFactor)
7195             if theCopy:
7196                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7197             else:
7198                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7199             RaiseIfFailed("Scale", self.TrsfOp)
7200             anObj.SetParameters(Parameters)
7201             return anObj
7202
7203         ## Scale the given object by the factor, creating its copy before the scaling.
7204         #  @param theObject The object to be scaled.
7205         #  @param thePoint Center point for scaling.
7206         #                  Passing None for it means scaling relatively the origin of global CS.
7207         #  @param theFactor Scaling factor value.
7208         #  @param theName Object name; when specified, this parameter is used
7209         #         for result publication in the study. Otherwise, if automatic
7210         #         publication is switched on, default value is used for result name.
7211         #
7212         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7213         #
7214         #  @ref tui_scale "Example"
7215         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7216             """
7217             Scale the given object by the factor, creating its copy before the scaling.
7218
7219             Parameters:
7220                 theObject The object to be scaled.
7221                 thePoint Center point for scaling.
7222                          Passing None for it means scaling relatively the origin of global CS.
7223                 theFactor Scaling factor value.
7224                 theName Object name; when specified, this parameter is used
7225                         for result publication in the study. Otherwise, if automatic
7226                         publication is switched on, default value is used for result name.
7227
7228             Returns:    
7229                 New GEOM.GEOM_Object, containing the scaled shape.
7230             """
7231             # Example: see GEOM_TestAll.py
7232             theFactor, Parameters = ParseParameters(theFactor)
7233             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7234             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7235             anObj.SetParameters(Parameters)
7236             self._autoPublish(anObj, theName, "scaled")
7237             return anObj
7238
7239         ## Scale the given object by different factors along coordinate axes.
7240         #  @param theObject The object to be scaled.
7241         #  @param thePoint Center point for scaling.
7242         #                  Passing None for it means scaling relatively the origin of global CS.
7243         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7244         #  @param theCopy Flag used to scale object itself or create a copy.
7245         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7246         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7247         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7248             """
7249             Scale the given object by different factors along coordinate axes.
7250
7251             Parameters:
7252                 theObject The object to be scaled.
7253                 thePoint Center point for scaling.
7254                             Passing None for it means scaling relatively the origin of global CS.
7255                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7256                 theCopy Flag used to scale object itself or create a copy.
7257
7258             Returns:    
7259                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7260                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7261             """
7262             # Example: see GEOM_TestAll.py
7263             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7264             if theCopy:
7265                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7266                                                             theFactorX, theFactorY, theFactorZ)
7267             else:
7268                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7269                                                         theFactorX, theFactorY, theFactorZ)
7270             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7271             anObj.SetParameters(Parameters)
7272             return anObj
7273
7274         ## Scale the given object by different factors along coordinate axes,
7275         #  creating its copy before the scaling.
7276         #  @param theObject The object to be scaled.
7277         #  @param thePoint Center point for scaling.
7278         #                  Passing None for it means scaling relatively the origin of global CS.
7279         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7280         #  @param theName Object name; when specified, this parameter is used
7281         #         for result publication in the study. Otherwise, if automatic
7282         #         publication is switched on, default value is used for result name.
7283         #
7284         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7285         #
7286         #  @ref swig_scale "Example"
7287         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7288             """
7289             Scale the given object by different factors along coordinate axes,
7290             creating its copy before the scaling.
7291
7292             Parameters:
7293                 theObject The object to be scaled.
7294                 thePoint Center point for scaling.
7295                             Passing None for it means scaling relatively the origin of global CS.
7296                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7297                 theName Object name; when specified, this parameter is used
7298                         for result publication in the study. Otherwise, if automatic
7299                         publication is switched on, default value is used for result name.
7300
7301             Returns:
7302                 New GEOM.GEOM_Object, containing the scaled shape.
7303             """
7304             # Example: see GEOM_TestAll.py
7305             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7306             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7307                                                         theFactorX, theFactorY, theFactorZ)
7308             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7309             anObj.SetParameters(Parameters)
7310             self._autoPublish(anObj, theName, "scaled")
7311             return anObj
7312
7313         ## Mirror an object relatively the given plane.
7314         #  @param theObject The object to be mirrored.
7315         #  @param thePlane Plane of symmetry.
7316         #  @param theCopy Flag used to mirror object itself or create a copy.
7317         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7318         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7319         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7320             """
7321             Mirror an object relatively the given plane.
7322
7323             Parameters:
7324                 theObject The object to be mirrored.
7325                 thePlane Plane of symmetry.
7326                 theCopy Flag used to mirror object itself or create a copy.
7327
7328             Returns:
7329                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7330                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7331             """
7332             if theCopy:
7333                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7334             else:
7335                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7336             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7337             return anObj
7338
7339         ## Create an object, symmetrical
7340         #  to the given one relatively the given plane.
7341         #  @param theObject The object to be mirrored.
7342         #  @param thePlane Plane of symmetry.
7343         #  @param theName Object name; when specified, this parameter is used
7344         #         for result publication in the study. Otherwise, if automatic
7345         #         publication is switched on, default value is used for result name.
7346         #
7347         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7348         #
7349         #  @ref tui_mirror "Example"
7350         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7351             """
7352             Create an object, symmetrical to the given one relatively the given plane.
7353
7354             Parameters:
7355                 theObject The object to be mirrored.
7356                 thePlane Plane of symmetry.
7357                 theName Object name; when specified, this parameter is used
7358                         for result publication in the study. Otherwise, if automatic
7359                         publication is switched on, default value is used for result name.
7360
7361             Returns:
7362                 New GEOM.GEOM_Object, containing the mirrored shape.
7363             """
7364             # Example: see GEOM_TestAll.py
7365             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7366             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7367             self._autoPublish(anObj, theName, "mirrored")
7368             return anObj
7369
7370         ## Mirror an object relatively the given axis.
7371         #  @param theObject The object to be mirrored.
7372         #  @param theAxis Axis of symmetry.
7373         #  @param theCopy Flag used to mirror object itself or create a copy.
7374         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7375         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7376         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7377             """
7378             Mirror an object relatively the given axis.
7379
7380             Parameters:
7381                 theObject The object to be mirrored.
7382                 theAxis Axis of symmetry.
7383                 theCopy Flag used to mirror object itself or create a copy.
7384
7385             Returns:
7386                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7387                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7388             """
7389             if theCopy:
7390                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7391             else:
7392                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7393             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7394             return anObj
7395
7396         ## Create an object, symmetrical
7397         #  to the given one relatively the given axis.
7398         #  @param theObject The object to be mirrored.
7399         #  @param theAxis Axis of symmetry.
7400         #  @param theName Object name; when specified, this parameter is used
7401         #         for result publication in the study. Otherwise, if automatic
7402         #         publication is switched on, default value is used for result name.
7403         #
7404         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7405         #
7406         #  @ref tui_mirror "Example"
7407         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7408             """
7409             Create an object, symmetrical to the given one relatively the given axis.
7410
7411             Parameters:
7412                 theObject The object to be mirrored.
7413                 theAxis Axis of symmetry.
7414                 theName Object name; when specified, this parameter is used
7415                         for result publication in the study. Otherwise, if automatic
7416                         publication is switched on, default value is used for result name.
7417
7418             Returns: 
7419                 New GEOM.GEOM_Object, containing the mirrored shape.
7420             """
7421             # Example: see GEOM_TestAll.py
7422             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7423             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7424             self._autoPublish(anObj, theName, "mirrored")
7425             return anObj
7426
7427         ## Mirror an object relatively the given point.
7428         #  @param theObject The object to be mirrored.
7429         #  @param thePoint Point of symmetry.
7430         #  @param theCopy Flag used to mirror object itself or create a copy.
7431         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7432         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7433         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7434             """
7435             Mirror an object relatively the given point.
7436
7437             Parameters:
7438                 theObject The object to be mirrored.
7439                 thePoint Point of symmetry.
7440                 theCopy Flag used to mirror object itself or create a copy.
7441
7442             Returns:
7443                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7444                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7445             """
7446             # Example: see GEOM_TestAll.py
7447             if theCopy:
7448                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7449             else:
7450                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7451             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7452             return anObj
7453
7454         ## Create an object, symmetrical
7455         #  to the given one relatively the given point.
7456         #  @param theObject The object to be mirrored.
7457         #  @param thePoint Point of symmetry.
7458         #  @param theName Object name; when specified, this parameter is used
7459         #         for result publication in the study. Otherwise, if automatic
7460         #         publication is switched on, default value is used for result name.
7461         #
7462         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7463         #
7464         #  @ref tui_mirror "Example"
7465         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7466             """
7467             Create an object, symmetrical
7468             to the given one relatively the given point.
7469
7470             Parameters:
7471                 theObject The object to be mirrored.
7472                 thePoint Point of symmetry.
7473                 theName Object name; when specified, this parameter is used
7474                         for result publication in the study. Otherwise, if automatic
7475                         publication is switched on, default value is used for result name.
7476
7477             Returns:  
7478                 New GEOM.GEOM_Object, containing the mirrored shape.
7479             """
7480             # Example: see GEOM_TestAll.py
7481             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7482             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7483             self._autoPublish(anObj, theName, "mirrored")
7484             return anObj
7485
7486         ## Modify the location of the given object.
7487         #  @param theObject The object to be displaced.
7488         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7489         #                     If \a theStartLCS is NULL, displacement
7490         #                     will be performed from global CS.\n
7491         #                     If \a theObject itself is used as \a theStartLCS,
7492         #                     its location will be changed to \a theEndLCS.
7493         #  @param theEndLCS Coordinate system to perform displacement to it.
7494         #  @param theCopy Flag used to displace object itself or create a copy.
7495         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7496         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7497         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7498             """
7499             Modify the Location of the given object by LCS, creating its copy before the setting.
7500
7501             Parameters:
7502                 theObject The object to be displaced.
7503                 theStartLCS Coordinate system to perform displacement from it.
7504                             If theStartLCS is NULL, displacement
7505                             will be performed from global CS.
7506                             If theObject itself is used as theStartLCS,
7507                             its location will be changed to theEndLCS.
7508                 theEndLCS Coordinate system to perform displacement to it.
7509                 theCopy Flag used to displace object itself or create a copy.
7510
7511             Returns:
7512                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7513                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7514             """
7515             # Example: see GEOM_TestAll.py
7516             if theCopy:
7517                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7518             else:
7519                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7520             RaiseIfFailed("Displace", self.TrsfOp)
7521             return anObj
7522
7523         ## Modify the Location of the given object by LCS,
7524         #  creating its copy before the setting.
7525         #  @param theObject The object to be displaced.
7526         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7527         #                     If \a theStartLCS is NULL, displacement
7528         #                     will be performed from global CS.\n
7529         #                     If \a theObject itself is used as \a theStartLCS,
7530         #                     its location will be changed to \a theEndLCS.
7531         #  @param theEndLCS Coordinate system to perform displacement to it.
7532         #  @param theName Object name; when specified, this parameter is used
7533         #         for result publication in the study. Otherwise, if automatic
7534         #         publication is switched on, default value is used for result name.
7535         #
7536         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7537         #
7538         #  @ref tui_modify_location "Example"
7539         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7540             """
7541             Modify the Location of the given object by LCS, creating its copy before the setting.
7542
7543             Parameters:
7544                 theObject The object to be displaced.
7545                 theStartLCS Coordinate system to perform displacement from it.
7546                             If theStartLCS is NULL, displacement
7547                             will be performed from global CS.
7548                             If theObject itself is used as theStartLCS,
7549                             its location will be changed to theEndLCS.
7550                 theEndLCS Coordinate system to perform displacement to it.
7551                 theName Object name; when specified, this parameter is used
7552                         for result publication in the study. Otherwise, if automatic
7553                         publication is switched on, default value is used for result name.
7554
7555             Returns:  
7556                 New GEOM.GEOM_Object, containing the displaced shape.
7557
7558             Example of usage:
7559                 # create local coordinate systems
7560                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7561                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7562                 # modify the location of the given object
7563                 position = geompy.MakePosition(cylinder, cs1, cs2)
7564             """
7565             # Example: see GEOM_TestAll.py
7566             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7567             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7568             self._autoPublish(anObj, theName, "displaced")
7569             return anObj
7570
7571         ## Modify the Location of the given object by Path.
7572         #  @param  theObject The object to be displaced.
7573         #  @param  thePath Wire or Edge along that the object will be translated.
7574         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7575         #  @param  theCopy is to create a copy objects if true.
7576         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7577         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7578         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7579         #
7580         #  @ref tui_modify_location "Example"
7581         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7582             """
7583             Modify the Location of the given object by Path.
7584
7585             Parameters:
7586                  theObject The object to be displaced.
7587                  thePath Wire or Edge along that the object will be translated.
7588                  theDistance progress of Path (0 = start location, 1 = end of path location).
7589                  theCopy is to create a copy objects if true.
7590                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7591
7592             Returns:  
7593                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7594                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7595
7596             Example of usage:
7597                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7598             """
7599             # Example: see GEOM_TestAll.py
7600             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7601             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7602             return anObj
7603
7604         ## Modify the Location of the given object by Path, creating its copy before the operation.
7605         #  @param theObject The object to be displaced.
7606         #  @param thePath Wire or Edge along that the object will be translated.
7607         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7608         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7609         #  @param theName Object name; when specified, this parameter is used
7610         #         for result publication in the study. Otherwise, if automatic
7611         #         publication is switched on, default value is used for result name.
7612         #
7613         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7614         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7615             """
7616             Modify the Location of the given object by Path, creating its copy before the operation.
7617
7618             Parameters:
7619                  theObject The object to be displaced.
7620                  thePath Wire or Edge along that the object will be translated.
7621                  theDistance progress of Path (0 = start location, 1 = end of path location).
7622                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7623                  theName Object name; when specified, this parameter is used
7624                          for result publication in the study. Otherwise, if automatic
7625                          publication is switched on, default value is used for result name.
7626
7627             Returns:  
7628                 New GEOM.GEOM_Object, containing the displaced shape.
7629             """
7630             # Example: see GEOM_TestAll.py
7631             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7632             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7633             self._autoPublish(anObj, theName, "displaced")
7634             return anObj
7635
7636         ## Offset given shape.
7637         #  @param theObject The base object for the offset.
7638         #  @param theOffset Offset value.
7639         #  @param theCopy Flag used to offset object itself or create a copy.
7640         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7641         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7642         def Offset(self, theObject, theOffset, theCopy=False):
7643             """
7644             Offset given shape.
7645
7646             Parameters:
7647                 theObject The base object for the offset.
7648                 theOffset Offset value.
7649                 theCopy Flag used to offset object itself or create a copy.
7650
7651             Returns: 
7652                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7653                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7654             """
7655             theOffset, Parameters = ParseParameters(theOffset)
7656             if theCopy:
7657                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7658             else:
7659                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7660             RaiseIfFailed("Offset", self.TrsfOp)
7661             anObj.SetParameters(Parameters)
7662             return anObj
7663
7664         ## Create new object as offset of the given one.
7665         #  @param theObject The base object for the offset.
7666         #  @param theOffset Offset value.
7667         #  @param theName Object name; when specified, this parameter is used
7668         #         for result publication in the study. Otherwise, if automatic
7669         #         publication is switched on, default value is used for result name.
7670         #
7671         #  @return New GEOM.GEOM_Object, containing the offset object.
7672         #
7673         #  @ref tui_offset "Example"
7674         def MakeOffset(self, theObject, theOffset, theName=None):
7675             """
7676             Create new object as offset of the given one.
7677
7678             Parameters:
7679                 theObject The base object for the offset.
7680                 theOffset Offset value.
7681                 theName Object name; when specified, this parameter is used
7682                         for result publication in the study. Otherwise, if automatic
7683                         publication is switched on, default value is used for result name.
7684
7685             Returns:  
7686                 New GEOM.GEOM_Object, containing the offset object.
7687
7688             Example of usage:
7689                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7690                  # create a new object as offset of the given object
7691                  offset = geompy.MakeOffset(box, 70.)
7692             """
7693             # Example: see GEOM_TestAll.py
7694             theOffset, Parameters = ParseParameters(theOffset)
7695             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7696             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7697             anObj.SetParameters(Parameters)
7698             self._autoPublish(anObj, theName, "offset")
7699             return anObj
7700
7701         ## Create new object as projection of the given one on a 2D surface.
7702         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7703         #  @param theTarget The target object. It can be planar or cylindrical face.
7704         #  @param theName Object name; when specified, this parameter is used
7705         #         for result publication in the study. Otherwise, if automatic
7706         #         publication is switched on, default value is used for result name.
7707         #
7708         #  @return New GEOM.GEOM_Object, containing the projection.
7709         #
7710         #  @ref tui_projection "Example"
7711         def MakeProjection(self, theSource, theTarget, theName=None):
7712             """
7713             Create new object as projection of the given one on a 2D surface.
7714
7715             Parameters:
7716                 theSource The source object for the projection. It can be a point, edge or wire.
7717                 theTarget The target object. It can be planar or cylindrical face.
7718                 theName Object name; when specified, this parameter is used
7719                         for result publication in the study. Otherwise, if automatic
7720                         publication is switched on, default value is used for result name.
7721
7722             Returns:  
7723                 New GEOM.GEOM_Object, containing the projection.
7724             """
7725             # Example: see GEOM_TestAll.py
7726             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7727             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7728             self._autoPublish(anObj, theName, "projection")
7729             return anObj
7730
7731         # -----------------------------------------------------------------------------
7732         # Patterns
7733         # -----------------------------------------------------------------------------
7734
7735         ## Translate the given object along the given vector a given number times
7736         #  @param theObject The object to be translated.
7737         #  @param theVector Direction of the translation. DX if None.
7738         #  @param theStep Distance to translate on.
7739         #  @param theNbTimes Quantity of translations to be done.
7740         #  @param theName Object name; when specified, this parameter is used
7741         #         for result publication in the study. Otherwise, if automatic
7742         #         publication is switched on, default value is used for result name.
7743         #
7744         #  @return New GEOM.GEOM_Object, containing compound of all
7745         #          the shapes, obtained after each translation.
7746         #
7747         #  @ref tui_multi_translation "Example"
7748         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7749             """
7750             Translate the given object along the given vector a given number times
7751
7752             Parameters:
7753                 theObject The object to be translated.
7754                 theVector Direction of the translation. DX if None.
7755                 theStep Distance to translate on.
7756                 theNbTimes Quantity of translations to be done.
7757                 theName Object name; when specified, this parameter is used
7758                         for result publication in the study. Otherwise, if automatic
7759                         publication is switched on, default value is used for result name.
7760
7761             Returns:     
7762                 New GEOM.GEOM_Object, containing compound of all
7763                 the shapes, obtained after each translation.
7764
7765             Example of usage:
7766                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
7767             """
7768             # Example: see GEOM_TestAll.py
7769             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
7770             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
7771             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
7772             anObj.SetParameters(Parameters)
7773             self._autoPublish(anObj, theName, "multitranslation")
7774             return anObj
7775
7776         ## Conseqently apply two specified translations to theObject specified number of times.
7777         #  @param theObject The object to be translated.
7778         #  @param theVector1 Direction of the first translation. DX if None.
7779         #  @param theStep1 Step of the first translation.
7780         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
7781         #  @param theVector2 Direction of the second translation. DY if None.
7782         #  @param theStep2 Step of the second translation.
7783         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
7784         #  @param theName Object name; when specified, this parameter is used
7785         #         for result publication in the study. Otherwise, if automatic
7786         #         publication is switched on, default value is used for result name.
7787         #
7788         #  @return New GEOM.GEOM_Object, containing compound of all
7789         #          the shapes, obtained after each translation.
7790         #
7791         #  @ref tui_multi_translation "Example"
7792         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
7793                                    theVector2, theStep2, theNbTimes2, theName=None):
7794             """
7795             Conseqently apply two specified translations to theObject specified number of times.
7796
7797             Parameters:
7798                 theObject The object to be translated.
7799                 theVector1 Direction of the first translation. DX if None.
7800                 theStep1 Step of the first translation.
7801                 theNbTimes1 Quantity of translations to be done along theVector1.
7802                 theVector2 Direction of the second translation. DY if None.
7803                 theStep2 Step of the second translation.
7804                 theNbTimes2 Quantity of translations to be done along theVector2.
7805                 theName Object name; when specified, this parameter is used
7806                         for result publication in the study. Otherwise, if automatic
7807                         publication is switched on, default value is used for result name.
7808
7809             Returns:
7810                 New GEOM.GEOM_Object, containing compound of all
7811                 the shapes, obtained after each translation.
7812
7813             Example of usage:
7814                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
7815             """
7816             # Example: see GEOM_TestAll.py
7817             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
7818             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
7819                                                  theVector2, theStep2, theNbTimes2)
7820             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
7821             anObj.SetParameters(Parameters)
7822             self._autoPublish(anObj, theName, "multitranslation")
7823             return anObj
7824
7825         ## Rotate the given object around the given axis a given number times.
7826         #  Rotation angle will be 2*PI/theNbTimes.
7827         #  @param theObject The object to be rotated.
7828         #  @param theAxis The rotation axis. DZ if None.
7829         #  @param theNbTimes Quantity of rotations to be done.
7830         #  @param theName Object name; when specified, this parameter is used
7831         #         for result publication in the study. Otherwise, if automatic
7832         #         publication is switched on, default value is used for result name.
7833         #
7834         #  @return New GEOM.GEOM_Object, containing compound of all the
7835         #          shapes, obtained after each rotation.
7836         #
7837         #  @ref tui_multi_rotation "Example"
7838         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
7839             """
7840             Rotate the given object around the given axis a given number times.
7841             Rotation angle will be 2*PI/theNbTimes.
7842
7843             Parameters:
7844                 theObject The object to be rotated.
7845                 theAxis The rotation axis. DZ if None.
7846                 theNbTimes Quantity of rotations to be done.
7847                 theName Object name; when specified, this parameter is used
7848                         for result publication in the study. Otherwise, if automatic
7849                         publication is switched on, default value is used for result name.
7850
7851             Returns:     
7852                 New GEOM.GEOM_Object, containing compound of all the
7853                 shapes, obtained after each rotation.
7854
7855             Example of usage:
7856                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
7857             """
7858             # Example: see GEOM_TestAll.py
7859             theNbTimes, Parameters = ParseParameters(theNbTimes)
7860             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
7861             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
7862             anObj.SetParameters(Parameters)
7863             self._autoPublish(anObj, theName, "multirotation")
7864             return anObj
7865
7866         ## Rotate the given object around the given axis
7867         #  a given number times on the given angle.
7868         #  @param theObject The object to be rotated.
7869         #  @param theAxis The rotation axis. DZ if None.
7870         #  @param theAngleStep Rotation angle in radians.
7871         #  @param theNbTimes Quantity of rotations to be done.
7872         #  @param theName Object name; when specified, this parameter is used
7873         #         for result publication in the study. Otherwise, if automatic
7874         #         publication is switched on, default value is used for result name.
7875         #
7876         #  @return New GEOM.GEOM_Object, containing compound of all the
7877         #          shapes, obtained after each rotation.
7878         #
7879         #  @ref tui_multi_rotation "Example"
7880         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
7881             """
7882             Rotate the given object around the given axis
7883             a given number times on the given angle.
7884
7885             Parameters:
7886                 theObject The object to be rotated.
7887                 theAxis The rotation axis. DZ if None.
7888                 theAngleStep Rotation angle in radians.
7889                 theNbTimes Quantity of rotations to be done.
7890                 theName Object name; when specified, this parameter is used
7891                         for result publication in the study. Otherwise, if automatic
7892                         publication is switched on, default value is used for result name.
7893
7894             Returns:     
7895                 New GEOM.GEOM_Object, containing compound of all the
7896                 shapes, obtained after each rotation.
7897
7898             Example of usage:
7899                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
7900             """
7901             # Example: see GEOM_TestAll.py
7902             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
7903             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
7904             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
7905             anObj.SetParameters(Parameters)
7906             self._autoPublish(anObj, theName, "multirotation")
7907             return anObj
7908
7909         ## Rotate the given object around the given axis a given
7910         #  number times and multi-translate each rotation result.
7911         #  Rotation angle will be 2*PI/theNbTimes1.
7912         #  Translation direction passes through center of gravity
7913         #  of rotated shape and its projection on the rotation axis.
7914         #  @param theObject The object to be rotated.
7915         #  @param theAxis Rotation axis. DZ if None.
7916         #  @param theNbTimes1 Quantity of rotations to be done.
7917         #  @param theRadialStep Translation distance.
7918         #  @param theNbTimes2 Quantity of translations to be done.
7919         #  @param theName Object name; when specified, this parameter is used
7920         #         for result publication in the study. Otherwise, if automatic
7921         #         publication is switched on, default value is used for result name.
7922         #
7923         #  @return New GEOM.GEOM_Object, containing compound of all the
7924         #          shapes, obtained after each transformation.
7925         #
7926         #  @ref tui_multi_rotation "Example"
7927         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
7928             """
7929             Rotate the given object around the
7930             given axis on the given angle a given number
7931             times and multi-translate each rotation result.
7932             Translation direction passes through center of gravity
7933             of rotated shape and its projection on the rotation axis.
7934
7935             Parameters:
7936                 theObject The object to be rotated.
7937                 theAxis Rotation axis. DZ if None.
7938                 theNbTimes1 Quantity of rotations to be done.
7939                 theRadialStep Translation distance.
7940                 theNbTimes2 Quantity of translations to be done.
7941                 theName Object name; when specified, this parameter is used
7942                         for result publication in the study. Otherwise, if automatic
7943                         publication is switched on, default value is used for result name.
7944
7945             Returns:    
7946                 New GEOM.GEOM_Object, containing compound of all the
7947                 shapes, obtained after each transformation.
7948
7949             Example of usage:
7950                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
7951             """
7952             # Example: see GEOM_TestAll.py
7953             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
7954             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
7955             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
7956             anObj.SetParameters(Parameters)
7957             self._autoPublish(anObj, theName, "multirotation")
7958             return anObj
7959
7960         ## Rotate the given object around the
7961         #  given axis on the given angle a given number
7962         #  times and multi-translate each rotation result.
7963         #  Translation direction passes through center of gravity
7964         #  of rotated shape and its projection on the rotation axis.
7965         #  @param theObject The object to be rotated.
7966         #  @param theAxis Rotation axis. DZ if None.
7967         #  @param theAngleStep Rotation angle in radians.
7968         #  @param theNbTimes1 Quantity of rotations to be done.
7969         #  @param theRadialStep Translation distance.
7970         #  @param theNbTimes2 Quantity of translations to be done.
7971         #  @param theName Object name; when specified, this parameter is used
7972         #         for result publication in the study. Otherwise, if automatic
7973         #         publication is switched on, default value is used for result name.
7974         #
7975         #  @return New GEOM.GEOM_Object, containing compound of all the
7976         #          shapes, obtained after each transformation.
7977         #
7978         #  @ref tui_multi_rotation "Example"
7979         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
7980             """
7981             Rotate the given object around the
7982             given axis on the given angle a given number
7983             times and multi-translate each rotation result.
7984             Translation direction passes through center of gravity
7985             of rotated shape and its projection on the rotation axis.
7986
7987             Parameters:
7988                 theObject The object to be rotated.
7989                 theAxis Rotation axis. DZ if None.
7990                 theAngleStep Rotation angle in radians.
7991                 theNbTimes1 Quantity of rotations to be done.
7992                 theRadialStep Translation distance.
7993                 theNbTimes2 Quantity of translations to be done.
7994                 theName Object name; when specified, this parameter is used
7995                         for result publication in the study. Otherwise, if automatic
7996                         publication is switched on, default value is used for result name.
7997
7998             Returns:    
7999                 New GEOM.GEOM_Object, containing compound of all the
8000                 shapes, obtained after each transformation.
8001
8002             Example of usage:
8003                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8004             """
8005             # Example: see GEOM_TestAll.py
8006             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8007             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8008             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8009             anObj.SetParameters(Parameters)
8010             self._autoPublish(anObj, theName, "multirotation")
8011             return anObj
8012
8013         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8014         #
8015         #  @ref swig_MakeMultiRotation "Example"
8016         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8017             """
8018             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8019
8020             Example of usage:
8021                 pz = geompy.MakeVertex(0, 0, 100)
8022                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8023                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8024             """
8025             # Example: see GEOM_TestOthers.py
8026             aVec = self.MakeLine(aPoint,aDir)
8027             # note: auto-publishing is done in self.MultiRotate1D()
8028             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8029             return anObj
8030
8031         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8032         #
8033         #  @ref swig_MakeMultiRotation "Example"
8034         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8035             """
8036             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8037
8038             Example of usage:
8039                 pz = geompy.MakeVertex(0, 0, 100)
8040                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8041                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8042             """
8043             # Example: see GEOM_TestOthers.py
8044             aVec = self.MakeLine(aPoint,aDir)
8045             # note: auto-publishing is done in self.MultiRotate1D()
8046             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8047             return anObj
8048
8049         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8050         #
8051         #  @ref swig_MakeMultiRotation "Example"
8052         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8053             """
8054             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8055             
8056             Example of usage:
8057                 pz = geompy.MakeVertex(0, 0, 100)
8058                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8059                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8060             """
8061             # Example: see GEOM_TestOthers.py
8062             aVec = self.MakeLine(aPoint,aDir)
8063             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8064             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8065             return anObj
8066
8067         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8068         #
8069         #  @ref swig_MakeMultiRotation "Example"
8070         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8071             """
8072             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8073             
8074             Example of usage:
8075                 pz = geompy.MakeVertex(0, 0, 100)
8076                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8077                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8078             """
8079             # Example: see GEOM_TestOthers.py
8080             aVec = self.MakeLine(aPoint,aDir)
8081             # note: auto-publishing is done in self.MultiRotate2D()
8082             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8083             return anObj
8084
8085         # end of l3_transform
8086         ## @}
8087
8088         ## @addtogroup l3_transform_d
8089         ## @{
8090
8091         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8092         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8093             """
8094             Deprecated method. Use MultiRotate1DNbTimes instead.
8095             """
8096             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8097             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8098
8099         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8100         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8101         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8102             """
8103             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8104             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8105
8106             Example of usage:
8107                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8108             """
8109             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8110             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8111             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8112             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8113             anObj.SetParameters(Parameters)
8114             self._autoPublish(anObj, theName, "multirotation")
8115             return anObj
8116
8117         ## The same, as MultiRotate1D(), but axis is given by direction and point
8118         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8119         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8120             """
8121             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8122             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8123
8124             Example of usage:
8125                 pz = geompy.MakeVertex(0, 0, 100)
8126                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8127                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8128             """
8129             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8130             aVec = self.MakeLine(aPoint,aDir)
8131             # note: auto-publishing is done in self.MultiRotate1D()
8132             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8133             return anObj
8134
8135         ## The same, as MultiRotate2D(), but axis is given by direction and point
8136         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8137         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8138             """
8139             The same, as MultiRotate2D(), but axis is given by direction and point
8140             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8141             
8142             Example of usage:
8143                 pz = geompy.MakeVertex(0, 0, 100)
8144                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8145                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8146             """
8147             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8148             aVec = self.MakeLine(aPoint,aDir)
8149             # note: auto-publishing is done in self.MultiRotate2D()
8150             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8151             return anObj
8152
8153         # end of l3_transform_d
8154         ## @}
8155
8156         ## @addtogroup l3_local
8157         ## @{
8158
8159         ## Perform a fillet on all edges of the given shape.
8160         #  @param theShape Shape, to perform fillet on.
8161         #  @param theR Fillet radius.
8162         #  @param 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         #  @return New GEOM.GEOM_Object, containing the result shape.
8167         #
8168         #  @ref tui_fillet "Example 1"
8169         #  \n @ref swig_MakeFilletAll "Example 2"
8170         def MakeFilletAll(self, theShape, theR, theName=None):
8171             """
8172             Perform a fillet on all edges of the given shape.
8173
8174             Parameters:
8175                 theShape Shape, to perform fillet on.
8176                 theR Fillet radius.
8177                 theName Object name; when specified, this parameter is used
8178                         for result publication in the study. Otherwise, if automatic
8179                         publication is switched on, default value is used for result name.
8180
8181             Returns: 
8182                 New GEOM.GEOM_Object, containing the result shape.
8183
8184             Example of usage: 
8185                filletall = geompy.MakeFilletAll(prism, 10.) 
8186             """
8187             # Example: see GEOM_TestOthers.py
8188             theR,Parameters = ParseParameters(theR)
8189             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8190             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8191             anObj.SetParameters(Parameters)
8192             self._autoPublish(anObj, theName, "fillet")
8193             return anObj
8194
8195         ## Perform a fillet on the specified edges/faces of the given shape
8196         #  @param theShape Shape, to perform fillet on.
8197         #  @param theR Fillet radius.
8198         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8199         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8200         #  @param theName Object name; when specified, this parameter is used
8201         #         for result publication in the study. Otherwise, if automatic
8202         #         publication is switched on, default value is used for result name.
8203         #
8204         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8205         #
8206         #  @return New GEOM.GEOM_Object, containing the result shape.
8207         #
8208         #  @ref tui_fillet "Example"
8209         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8210             """
8211             Perform a fillet on the specified edges/faces of the given shape
8212
8213             Parameters:
8214                 theShape Shape, to perform fillet on.
8215                 theR Fillet radius.
8216                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8217                 theListShapes Global indices of edges/faces to perform fillet on.
8218                 theName Object name; when specified, this parameter is used
8219                         for result publication in the study. Otherwise, if automatic
8220                         publication is switched on, default value is used for result name.
8221
8222             Note:
8223                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8224
8225             Returns: 
8226                 New GEOM.GEOM_Object, containing the result shape.
8227
8228             Example of usage:
8229                 # get the list of IDs (IDList) for the fillet
8230                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8231                 IDlist_e = []
8232                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8233                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8234                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8235                 # make a fillet on the specified edges of the given shape
8236                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8237             """
8238             # Example: see GEOM_TestAll.py
8239             theR,Parameters = ParseParameters(theR)
8240             anObj = None
8241             if theShapeType == ShapeType["EDGE"]:
8242                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8243                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8244             else:
8245                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8246                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8247             anObj.SetParameters(Parameters)
8248             self._autoPublish(anObj, theName, "fillet")
8249             return anObj
8250
8251         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8252         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8253             """
8254             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8255
8256             Example of usage:
8257                 # get the list of IDs (IDList) for the fillet
8258                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8259                 IDlist_e = []
8260                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8261                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8262                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8263                 # make a fillet on the specified edges of the given shape
8264                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8265             """
8266             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8267             anObj = None
8268             if theShapeType == ShapeType["EDGE"]:
8269                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8270                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8271             else:
8272                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8273                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8274             anObj.SetParameters(Parameters)
8275             self._autoPublish(anObj, theName, "fillet")
8276             return anObj
8277
8278         ## Perform a fillet on the specified edges of the given shape
8279         #  @param theShape  Wire Shape to perform fillet on.
8280         #  @param theR  Fillet radius.
8281         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8282         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8283         #    \note The list of vertices could be empty,
8284         #          in this case fillet will done done at all vertices in wire
8285         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8286         #         by the length of the edges, nearest to the fillet vertex.
8287         #         But sometimes the next edge is C1 continuous with the one, nearest to
8288         #         the fillet point, and such two (or more) edges can be united to allow
8289         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8290         #         thus ignoring the secant vertex (vertices).
8291         #  @param theName Object name; when specified, this parameter is used
8292         #         for result publication in the study. Otherwise, if automatic
8293         #         publication is switched on, default value is used for result name.
8294         #
8295         #  @return New GEOM.GEOM_Object, containing the result shape.
8296         #
8297         #  @ref tui_fillet2d "Example"
8298         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8299             """
8300             Perform a fillet on the specified edges of the given shape
8301
8302             Parameters:
8303                 theShape  Wire Shape to perform fillet on.
8304                 theR  Fillet radius.
8305                 theListOfVertexes Global indices of vertexes to perform fillet on.
8306                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8307                     by the length of the edges, nearest to the fillet vertex.
8308                     But sometimes the next edge is C1 continuous with the one, nearest to
8309                     the fillet point, and such two (or more) edges can be united to allow
8310                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8311                     thus ignoring the secant vertex (vertices).
8312                 theName Object name; when specified, this parameter is used
8313                         for result publication in the study. Otherwise, if automatic
8314                         publication is switched on, default value is used for result name.
8315             Note:
8316                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8317
8318                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8319
8320             Returns: 
8321                 New GEOM.GEOM_Object, containing the result shape.
8322
8323             Example of usage:  
8324                 # create wire
8325                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8326                 # make fillet at given wire vertices with giver radius
8327                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8328             """
8329             # Example: see GEOM_TestAll.py
8330             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8331             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8332             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8333             anObj.SetParameters(Parameters)
8334             self._autoPublish(anObj, theName, "fillet")
8335             return anObj
8336
8337         ## Perform a fillet at the specified vertices of the given face/shell.
8338         #  @param theShape Face or Shell shape to perform fillet on.
8339         #  @param theR Fillet radius.
8340         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8341         #  @param theName Object name; when specified, this parameter is used
8342         #         for result publication in the study. Otherwise, if automatic
8343         #         publication is switched on, default value is used for result name.
8344         #
8345         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8346         #
8347         #  @return New GEOM.GEOM_Object, containing the result shape.
8348         #
8349         #  @ref tui_fillet2d "Example"
8350         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8351             """
8352             Perform a fillet at the specified vertices of the given face/shell.
8353
8354             Parameters:
8355                 theShape  Face or Shell shape to perform fillet on.
8356                 theR  Fillet radius.
8357                 theListOfVertexes Global indices of vertexes to perform fillet on.
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             Note:
8362                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8363
8364             Returns: 
8365                 New GEOM.GEOM_Object, containing the result shape.
8366
8367             Example of usage:
8368                 face = geompy.MakeFaceHW(100, 100, 1)
8369                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8370             """
8371             # Example: see GEOM_TestAll.py
8372             theR,Parameters = ParseParameters(theR)
8373             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8374             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8375             anObj.SetParameters(Parameters)
8376             self._autoPublish(anObj, theName, "fillet")
8377             return anObj
8378
8379         ## Perform a symmetric chamfer on all edges of the given shape.
8380         #  @param theShape Shape, to perform chamfer on.
8381         #  @param theD Chamfer size along each face.
8382         #  @param theName Object name; when specified, this parameter is used
8383         #         for result publication in the study. Otherwise, if automatic
8384         #         publication is switched on, default value is used for result name.
8385         #
8386         #  @return New GEOM.GEOM_Object, containing the result shape.
8387         #
8388         #  @ref tui_chamfer "Example 1"
8389         #  \n @ref swig_MakeChamferAll "Example 2"
8390         def MakeChamferAll(self, theShape, theD, theName=None):
8391             """
8392             Perform a symmetric chamfer on all edges of the given shape.
8393
8394             Parameters:
8395                 theShape Shape, to perform chamfer on.
8396                 theD Chamfer size along each face.
8397                 theName Object name; when specified, this parameter is used
8398                         for result publication in the study. Otherwise, if automatic
8399                         publication is switched on, default value is used for result name.
8400
8401             Returns:     
8402                 New GEOM.GEOM_Object, containing the result shape.
8403
8404             Example of usage:
8405                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8406             """
8407             # Example: see GEOM_TestOthers.py
8408             theD,Parameters = ParseParameters(theD)
8409             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8410             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8411             anObj.SetParameters(Parameters)
8412             self._autoPublish(anObj, theName, "chamfer")
8413             return anObj
8414
8415         ## Perform a chamfer on edges, common to the specified faces,
8416         #  with distance D1 on the Face1
8417         #  @param theShape Shape, to perform chamfer on.
8418         #  @param theD1 Chamfer size along \a theFace1.
8419         #  @param theD2 Chamfer size along \a theFace2.
8420         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8421         #  @param theName Object name; when specified, this parameter is used
8422         #         for result publication in the study. Otherwise, if automatic
8423         #         publication is switched on, default value is used for result name.
8424         #
8425         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8426         #
8427         #  @return New GEOM.GEOM_Object, containing the result shape.
8428         #
8429         #  @ref tui_chamfer "Example"
8430         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8431             """
8432             Perform a chamfer on edges, common to the specified faces,
8433             with distance D1 on the Face1
8434
8435             Parameters:
8436                 theShape Shape, to perform chamfer on.
8437                 theD1 Chamfer size along theFace1.
8438                 theD2 Chamfer size along theFace2.
8439                 theFace1,theFace2 Global indices of two faces of theShape.
8440                 theName Object name; when specified, this parameter is used
8441                         for result publication in the study. Otherwise, if automatic
8442                         publication is switched on, default value is used for result name.
8443
8444             Note:
8445                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8446
8447             Returns:      
8448                 New GEOM.GEOM_Object, containing the result shape.
8449
8450             Example of usage:
8451                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8452                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8453                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8454                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8455             """
8456             # Example: see GEOM_TestAll.py
8457             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8458             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8459             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8460             anObj.SetParameters(Parameters)
8461             self._autoPublish(anObj, theName, "chamfer")
8462             return anObj
8463
8464         ## Perform a chamfer on edges
8465         #  @param theShape Shape, to perform chamfer on.
8466         #  @param theD Chamfer length
8467         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8468         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8469         #  @param theName Object name; when specified, this parameter is used
8470         #         for result publication in the study. Otherwise, if automatic
8471         #         publication is switched on, default value is used for result name.
8472         #
8473         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8474         #
8475         #  @return New GEOM.GEOM_Object, containing the result shape.
8476         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8477             """
8478             Perform a chamfer on edges
8479
8480             Parameters:
8481                 theShape Shape, to perform chamfer on.
8482                 theD1 Chamfer size along theFace1.
8483                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8484                 theFace1,theFace2 Global indices of two faces of theShape.
8485                 theName Object name; when specified, this parameter is used
8486                         for result publication in the study. Otherwise, if automatic
8487                         publication is switched on, default value is used for result name.
8488
8489             Note:
8490                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8491
8492             Returns:      
8493                 New GEOM.GEOM_Object, containing the result shape.
8494
8495             Example of usage:
8496                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8497                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8498                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8499                 ang = 30
8500                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8501             """
8502             flag = False
8503             if isinstance(theAngle,str):
8504                 flag = True
8505             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8506             if flag:
8507                 theAngle = theAngle*math.pi/180.0
8508             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8509             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8510             anObj.SetParameters(Parameters)
8511             self._autoPublish(anObj, theName, "chamfer")
8512             return anObj
8513
8514         ## Perform a chamfer on all edges of the specified faces,
8515         #  with distance D1 on the first specified face (if several for one edge)
8516         #  @param theShape Shape, to perform chamfer on.
8517         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8518         #               connected to the edge, are in \a theFaces, \a theD1
8519         #               will be get along face, which is nearer to \a theFaces beginning.
8520         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8521         #  @param theFaces Sequence of global indices of faces of \a theShape.
8522         #  @param theName Object name; when specified, this parameter is used
8523         #         for result publication in the study. Otherwise, if automatic
8524         #         publication is switched on, default value is used for result name.
8525         #
8526         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8527         #
8528         #  @return New GEOM.GEOM_Object, containing the result shape.
8529         #
8530         #  @ref tui_chamfer "Example"
8531         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8532             """
8533             Perform a chamfer on all edges of the specified faces,
8534             with distance D1 on the first specified face (if several for one edge)
8535
8536             Parameters:
8537                 theShape Shape, to perform chamfer on.
8538                 theD1 Chamfer size along face from  theFaces. If both faces,
8539                       connected to the edge, are in theFaces, theD1
8540                       will be get along face, which is nearer to theFaces beginning.
8541                 theD2 Chamfer size along another of two faces, connected to the edge.
8542                 theFaces Sequence of global indices of faces of theShape.
8543                 theName Object name; when specified, this parameter is used
8544                         for result publication in the study. Otherwise, if automatic
8545                         publication is switched on, default value is used for result name.
8546                 
8547             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8548
8549             Returns:  
8550                 New GEOM.GEOM_Object, containing the result shape.
8551             """
8552             # Example: see GEOM_TestAll.py
8553             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8554             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8555             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8556             anObj.SetParameters(Parameters)
8557             self._autoPublish(anObj, theName, "chamfer")
8558             return anObj
8559
8560         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8561         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8562         #
8563         #  @ref swig_FilletChamfer "Example"
8564         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8565             """
8566             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8567             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8568             """
8569             flag = False
8570             if isinstance(theAngle,str):
8571                 flag = True
8572             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8573             if flag:
8574                 theAngle = theAngle*math.pi/180.0
8575             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8576             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8577             anObj.SetParameters(Parameters)
8578             self._autoPublish(anObj, theName, "chamfer")
8579             return anObj
8580
8581         ## Perform a chamfer on edges,
8582         #  with distance D1 on the first specified face (if several for one edge)
8583         #  @param theShape Shape, to perform chamfer on.
8584         #  @param theD1,theD2 Chamfer size
8585         #  @param theEdges Sequence of edges of \a theShape.
8586         #  @param theName Object name; when specified, this parameter is used
8587         #         for result publication in the study. Otherwise, if automatic
8588         #         publication is switched on, default value is used for result name.
8589         #
8590         #  @return New GEOM.GEOM_Object, containing the result shape.
8591         #
8592         #  @ref swig_FilletChamfer "Example"
8593         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8594             """
8595             Perform a chamfer on edges,
8596             with distance D1 on the first specified face (if several for one edge)
8597             
8598             Parameters:
8599                 theShape Shape, to perform chamfer on.
8600                 theD1,theD2 Chamfer size
8601                 theEdges Sequence of edges of theShape.
8602                 theName Object name; when specified, this parameter is used
8603                         for result publication in the study. Otherwise, if automatic
8604                         publication is switched on, default value is used for result name.
8605
8606             Returns:
8607                 New GEOM.GEOM_Object, containing the result shape.
8608             """
8609             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8610             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8611             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8612             anObj.SetParameters(Parameters)
8613             self._autoPublish(anObj, theName, "chamfer")
8614             return anObj
8615
8616         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8617         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8618         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8619             """
8620             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8621             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8622             """
8623             flag = False
8624             if isinstance(theAngle,str):
8625                 flag = True
8626             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8627             if flag:
8628                 theAngle = theAngle*math.pi/180.0
8629             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8630             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8631             anObj.SetParameters(Parameters)
8632             self._autoPublish(anObj, theName, "chamfer")
8633             return anObj
8634
8635         ## @sa MakeChamferEdge(), MakeChamferFaces()
8636         #
8637         #  @ref swig_MakeChamfer "Example"
8638         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8639             """
8640             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8641             """
8642             # Example: see GEOM_TestOthers.py
8643             anObj = None
8644             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8645             if aShapeType == ShapeType["EDGE"]:
8646                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8647             else:
8648                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8649             return anObj
8650             
8651         ## Remove material from a solid by extrusion of the base shape on the given distance.
8652         #  @param theInit Shape to remove material from. It must be a solid or 
8653         #  a compound made of a single solid.
8654         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8655         #  @param theH Prism dimension along the normal to theBase
8656         #  @param theAngle Draft angle in degrees.
8657         #  @param theName Object name; when specified, this parameter is used
8658         #         for result publication in the study. Otherwise, if automatic
8659         #         publication is switched on, default value is used for result name.
8660         #
8661         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8662         #
8663         #  @ref tui_creation_prism "Example"
8664         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8665             """
8666             Add material to a solid by extrusion of the base shape on the given distance.
8667
8668             Parameters:
8669                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8670                 theBase Closed edge or wire defining the base shape to be extruded.
8671                 theH Prism dimension along the normal  to theBase
8672                 theAngle Draft angle in degrees.
8673                 theName Object name; when specified, this parameter is used
8674                         for result publication in the study. Otherwise, if automatic
8675                         publication is switched on, default value is used for result name.
8676
8677             Returns:
8678                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8679             """
8680             # Example: see GEOM_TestAll.py
8681             #theH,Parameters = ParseParameters(theH)
8682             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8683             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8684             #anObj.SetParameters(Parameters)
8685             self._autoPublish(anObj, theName, "extrudedCut")
8686             return anObj   
8687             
8688         ## Add material to a solid by extrusion of the base shape on the given distance.
8689         #  @param theInit Shape to add material to. It must be a solid or 
8690         #  a compound made of a single solid.
8691         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8692         #  @param theH Prism dimension along the normal to theBase
8693         #  @param theAngle Draft angle in degrees.
8694         #  @param theName Object name; when specified, this parameter is used
8695         #         for result publication in the study. Otherwise, if automatic
8696         #         publication is switched on, default value is used for result name.
8697         #
8698         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8699         #
8700         #  @ref tui_creation_prism "Example"
8701         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8702             """
8703             Add material to a solid by extrusion of the base shape on the given distance.
8704
8705             Parameters:
8706                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8707                 theBase Closed edge or wire defining the base shape to be extruded.
8708                 theH Prism dimension along the normal  to theBase
8709                 theAngle Draft angle in degrees.
8710                 theName Object name; when specified, this parameter is used
8711                         for result publication in the study. Otherwise, if automatic
8712                         publication is switched on, default value is used for result name.
8713
8714             Returns:
8715                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8716             """
8717             # Example: see GEOM_TestAll.py
8718             #theH,Parameters = ParseParameters(theH)
8719             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8720             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8721             #anObj.SetParameters(Parameters)
8722             self._autoPublish(anObj, theName, "extrudedBoss")
8723             return anObj   
8724
8725         # end of l3_local
8726         ## @}
8727
8728         ## @addtogroup l3_basic_op
8729         ## @{
8730
8731         ## Perform an Archimde operation on the given shape with given parameters.
8732         #  The object presenting the resulting face is returned.
8733         #  @param theShape Shape to be put in water.
8734         #  @param theWeight Weight og the shape.
8735         #  @param theWaterDensity Density of the water.
8736         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8737         #  @param theName Object name; when specified, this parameter is used
8738         #         for result publication in the study. Otherwise, if automatic
8739         #         publication is switched on, default value is used for result name.
8740         #
8741         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8742         #          by a plane, corresponding to water level.
8743         #
8744         #  @ref tui_archimede "Example"
8745         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8746             """
8747             Perform an Archimde operation on the given shape with given parameters.
8748             The object presenting the resulting face is returned.
8749
8750             Parameters: 
8751                 theShape Shape to be put in water.
8752                 theWeight Weight og the shape.
8753                 theWaterDensity Density of the water.
8754                 theMeshDeflection Deflection of the mesh, using to compute the section.
8755                 theName Object name; when specified, this parameter is used
8756                         for result publication in the study. Otherwise, if automatic
8757                         publication is switched on, default value is used for result name.
8758
8759             Returns: 
8760                 New GEOM.GEOM_Object, containing a section of theShape
8761                 by a plane, corresponding to water level.
8762             """
8763             # Example: see GEOM_TestAll.py
8764             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
8765               theWeight,theWaterDensity,theMeshDeflection)
8766             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
8767             RaiseIfFailed("MakeArchimede", self.LocalOp)
8768             anObj.SetParameters(Parameters)
8769             self._autoPublish(anObj, theName, "archimede")
8770             return anObj
8771
8772         # end of l3_basic_op
8773         ## @}
8774
8775         ## @addtogroup l2_measure
8776         ## @{
8777
8778         ## Get point coordinates
8779         #  @return [x, y, z]
8780         #
8781         #  @ref tui_measurement_tools_page "Example"
8782         def PointCoordinates(self,Point):
8783             """
8784             Get point coordinates
8785
8786             Returns:
8787                 [x, y, z]
8788             """
8789             # Example: see GEOM_TestMeasures.py
8790             aTuple = self.MeasuOp.PointCoordinates(Point)
8791             RaiseIfFailed("PointCoordinates", self.MeasuOp)
8792             return aTuple 
8793         
8794         ## Get vector coordinates
8795         #  @return [x, y, z]
8796         #
8797         #  @ref tui_measurement_tools_page "Example"
8798         def VectorCoordinates(self,Vector):
8799             """
8800             Get vector coordinates
8801
8802             Returns:
8803                 [x, y, z]
8804             """
8805
8806             p1=self.GetFirstVertex(Vector)
8807             p2=self.GetLastVertex(Vector)
8808             
8809             X1=self.PointCoordinates(p1)
8810             X2=self.PointCoordinates(p2)
8811
8812             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
8813
8814
8815         ## Compute cross product
8816         #  @return vector w=u^v
8817         #
8818         #  @ref tui_measurement_tools_page "Example"
8819         def CrossProduct(self, Vector1, Vector2):
8820             """ 
8821             Compute cross product
8822             
8823             Returns: vector w=u^v
8824             """
8825             u=self.VectorCoordinates(Vector1)
8826             v=self.VectorCoordinates(Vector2)
8827             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])
8828             
8829             return w
8830         
8831         ## Compute cross product
8832         #  @return dot product  p=u.v
8833         #
8834         #  @ref tui_measurement_tools_page "Example"
8835         def DotProduct(self, Vector1, Vector2):
8836             """ 
8837             Compute cross product
8838             
8839             Returns: dot product  p=u.v
8840             """
8841             u=self.VectorCoordinates(Vector1)
8842             v=self.VectorCoordinates(Vector2)
8843             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
8844             
8845             return p
8846
8847
8848         ## Get summarized length of all wires,
8849         #  area of surface and volume of the given shape.
8850         #  @param theShape Shape to define properties of.
8851         #  @return [theLength, theSurfArea, theVolume]\n
8852         #  theLength:   Summarized length of all wires of the given shape.\n
8853         #  theSurfArea: Area of surface of the given shape.\n
8854         #  theVolume:   Volume of the given shape.
8855         #
8856         #  @ref tui_measurement_tools_page "Example"
8857         def BasicProperties(self,theShape):
8858             """
8859             Get summarized length of all wires,
8860             area of surface and volume of the given shape.
8861
8862             Parameters: 
8863                 theShape Shape to define properties of.
8864
8865             Returns:
8866                 [theLength, theSurfArea, theVolume]
8867                  theLength:   Summarized length of all wires of the given shape.
8868                  theSurfArea: Area of surface of the given shape.
8869                  theVolume:   Volume of the given shape.
8870             """
8871             # Example: see GEOM_TestMeasures.py
8872             aTuple = self.MeasuOp.GetBasicProperties(theShape)
8873             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
8874             return aTuple
8875
8876         ## Get parameters of bounding box of the given shape
8877         #  @param theShape Shape to obtain bounding box of.
8878         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
8879         #  Xmin,Xmax: Limits of shape along OX axis.
8880         #  Ymin,Ymax: Limits of shape along OY axis.
8881         #  Zmin,Zmax: Limits of shape along OZ axis.
8882         #
8883         #  @ref tui_measurement_tools_page "Example"
8884         def BoundingBox (self, theShape):
8885             """
8886             Get parameters of bounding box of the given shape
8887
8888             Parameters: 
8889                 theShape Shape to obtain bounding box of.
8890
8891             Returns:
8892                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
8893                  Xmin,Xmax: Limits of shape along OX axis.
8894                  Ymin,Ymax: Limits of shape along OY axis.
8895                  Zmin,Zmax: Limits of shape along OZ axis.
8896             """
8897             # Example: see GEOM_TestMeasures.py
8898             aTuple = self.MeasuOp.GetBoundingBox(theShape)
8899             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
8900             return aTuple
8901
8902         ## Get bounding box of the given shape
8903         #  @param theShape Shape to obtain bounding box of.
8904         #  @param theName Object name; when specified, this parameter is used
8905         #         for result publication in the study. Otherwise, if automatic
8906         #         publication is switched on, default value is used for result name.
8907         #
8908         #  @return New GEOM.GEOM_Object, containing the created box.
8909         #
8910         #  @ref tui_measurement_tools_page "Example"
8911         def MakeBoundingBox (self, theShape, theName=None):
8912             """
8913             Get bounding box of the given shape
8914
8915             Parameters: 
8916                 theShape Shape to obtain bounding box of.
8917                 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             Returns:
8922                 New GEOM.GEOM_Object, containing the created box.
8923             """
8924             # Example: see GEOM_TestMeasures.py
8925             anObj = self.MeasuOp.MakeBoundingBox(theShape)
8926             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
8927             self._autoPublish(anObj, theName, "bndbox")
8928             return anObj
8929
8930         ## Get inertia matrix and moments of inertia of theShape.
8931         #  @param theShape Shape to calculate inertia of.
8932         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
8933         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
8934         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
8935         #
8936         #  @ref tui_measurement_tools_page "Example"
8937         def Inertia(self,theShape):
8938             """
8939             Get inertia matrix and moments of inertia of theShape.
8940
8941             Parameters: 
8942                 theShape Shape to calculate inertia of.
8943
8944             Returns:
8945                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
8946                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
8947                  Ix,Iy,Iz:    Moments of inertia of the given shape.
8948             """
8949             # Example: see GEOM_TestMeasures.py
8950             aTuple = self.MeasuOp.GetInertia(theShape)
8951             RaiseIfFailed("GetInertia", self.MeasuOp)
8952             return aTuple
8953
8954         ## Get if coords are included in the shape (ST_IN or ST_ON)
8955         #  @param theShape Shape
8956         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
8957         #  @param tolerance to be used (default is 1.0e-7)
8958         #  @return list_of_boolean = [res1, res2, ...]
8959         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
8960             """
8961             Get if coords are included in the shape (ST_IN or ST_ON)
8962             
8963             Parameters: 
8964                 theShape Shape
8965                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
8966                 tolerance to be used (default is 1.0e-7)
8967
8968             Returns:
8969                 list_of_boolean = [res1, res2, ...]
8970             """
8971             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
8972
8973         ## Get minimal distance between the given shapes.
8974         #  @param theShape1,theShape2 Shapes to find minimal distance between.
8975         #  @return Value of the minimal distance between the given shapes.
8976         #
8977         #  @ref tui_measurement_tools_page "Example"
8978         def MinDistance(self, theShape1, theShape2):
8979             """
8980             Get minimal distance between the given shapes.
8981             
8982             Parameters: 
8983                 theShape1,theShape2 Shapes to find minimal distance between.
8984
8985             Returns:    
8986                 Value of the minimal distance between the given shapes.
8987             """
8988             # Example: see GEOM_TestMeasures.py
8989             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
8990             RaiseIfFailed("GetMinDistance", self.MeasuOp)
8991             return aTuple[0]
8992
8993         ## Get minimal distance between the given shapes.
8994         #  @param theShape1,theShape2 Shapes to find minimal distance between.
8995         #  @return Value of the minimal distance between the given shapes, in form of list
8996         #          [Distance, DX, DY, DZ].
8997         #
8998         #  @ref swig_all_measure "Example"
8999         def MinDistanceComponents(self, theShape1, theShape2):
9000             """
9001             Get minimal distance between the given shapes.
9002
9003             Parameters: 
9004                 theShape1,theShape2 Shapes to find minimal distance between.
9005
9006             Returns:  
9007                 Value of the minimal distance between the given shapes, in form of list
9008                 [Distance, DX, DY, DZ]
9009             """
9010             # Example: see GEOM_TestMeasures.py
9011             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9012             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9013             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9014             return aRes
9015
9016         ## Get closest points of the given shapes.
9017         #  @param theShape1,theShape2 Shapes to find closest points of.
9018         #  @return The number of found solutions (-1 in case of infinite number of
9019         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9020         #
9021         #  @ref tui_measurement_tools_page "Example"
9022         def ClosestPoints (self, theShape1, theShape2):
9023             """
9024             Get closest points of the given shapes.
9025
9026             Parameters: 
9027                 theShape1,theShape2 Shapes to find closest points of.
9028
9029             Returns:    
9030                 The number of found solutions (-1 in case of infinite number of
9031                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9032             """
9033             # Example: see GEOM_TestMeasures.py
9034             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9035             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9036             return aTuple
9037
9038         ## Get angle between the given shapes in degrees.
9039         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9040         #  @note If both arguments are vectors, the angle is computed in accordance
9041         #        with their orientations, otherwise the minimum angle is computed.
9042         #  @return Value of the angle between the given shapes in degrees.
9043         #
9044         #  @ref tui_measurement_tools_page "Example"
9045         def GetAngle(self, theShape1, theShape2):
9046             """
9047             Get angle between the given shapes in degrees.
9048
9049             Parameters: 
9050                 theShape1,theShape2 Lines or linear edges to find angle between.
9051
9052             Note:
9053                 If both arguments are vectors, the angle is computed in accordance
9054                 with their orientations, otherwise the minimum angle is computed.
9055
9056             Returns:  
9057                 Value of the angle between the given shapes in degrees.
9058             """
9059             # Example: see GEOM_TestMeasures.py
9060             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9061             RaiseIfFailed("GetAngle", self.MeasuOp)
9062             return anAngle
9063
9064         ## Get angle between the given shapes in radians.
9065         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9066         #  @note If both arguments are vectors, the angle is computed in accordance
9067         #        with their orientations, otherwise the minimum angle is computed.
9068         #  @return Value of the angle between the given shapes in radians.
9069         #
9070         #  @ref tui_measurement_tools_page "Example"
9071         def GetAngleRadians(self, theShape1, theShape2):
9072             """
9073             Get angle between the given shapes in radians.
9074
9075             Parameters: 
9076                 theShape1,theShape2 Lines or linear edges to find angle between.
9077
9078                 
9079             Note:
9080                 If both arguments are vectors, the angle is computed in accordance
9081                 with their orientations, otherwise the minimum angle is computed.
9082
9083             Returns:  
9084                 Value of the angle between the given shapes in radians.
9085             """
9086             # Example: see GEOM_TestMeasures.py
9087             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9088             RaiseIfFailed("GetAngle", self.MeasuOp)
9089             return anAngle
9090
9091         ## Get angle between the given vectors in degrees.
9092         #  @param theShape1,theShape2 Vectors to find angle between.
9093         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9094         #                 if False, the opposite vector to the normal vector is used.
9095         #  @return Value of the angle between the given vectors in degrees.
9096         #
9097         #  @ref tui_measurement_tools_page "Example"
9098         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9099             """
9100             Get angle between the given vectors in degrees.
9101
9102             Parameters: 
9103                 theShape1,theShape2 Vectors to find angle between.
9104                 theFlag If True, the normal vector is defined by the two vectors cross,
9105                         if False, the opposite vector to the normal vector is used.
9106
9107             Returns:  
9108                 Value of the angle between the given vectors in degrees.
9109             """
9110             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9111             if not theFlag:
9112                 anAngle = 360. - anAngle
9113             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9114             return anAngle
9115
9116         ## The same as GetAngleVectors, but the result is in radians.
9117         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9118             """
9119             Get angle between the given vectors in radians.
9120
9121             Parameters: 
9122                 theShape1,theShape2 Vectors to find angle between.
9123                 theFlag If True, the normal vector is defined by the two vectors cross,
9124                         if False, the opposite vector to the normal vector is used.
9125
9126             Returns:  
9127                 Value of the angle between the given vectors in radians.
9128             """
9129             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9130             return anAngle
9131
9132         ## @name Curve Curvature Measurement
9133         #  Methods for receiving radius of curvature of curves
9134         #  in the given point
9135         ## @{
9136
9137         ## Measure curvature of a curve at a point, set by parameter.
9138         #  @param theCurve a curve.
9139         #  @param theParam parameter.
9140         #  @return radius of curvature of \a theCurve.
9141         #
9142         #  @ref swig_todo "Example"
9143         def CurveCurvatureByParam(self, theCurve, theParam):
9144             """
9145             Measure curvature of a curve at a point, set by parameter.
9146
9147             Parameters: 
9148                 theCurve a curve.
9149                 theParam parameter.
9150
9151             Returns: 
9152                 radius of curvature of theCurve.
9153             """
9154             # Example: see GEOM_TestMeasures.py
9155             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9156             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9157             return aCurv
9158
9159         ## Measure curvature of a curve at a point.
9160         #  @param theCurve a curve.
9161         #  @param thePoint given point.
9162         #  @return radius of curvature of \a theCurve.
9163         #
9164         #  @ref swig_todo "Example"
9165         def CurveCurvatureByPoint(self, theCurve, thePoint):
9166             """
9167             Measure curvature of a curve at a point.
9168
9169             Parameters: 
9170                 theCurve a curve.
9171                 thePoint given point.
9172
9173             Returns: 
9174                 radius of curvature of theCurve.           
9175             """
9176             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9177             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9178             return aCurv
9179         ## @}
9180
9181         ## @name Surface Curvature Measurement
9182         #  Methods for receiving max and min radius of curvature of surfaces
9183         #  in the given point
9184         ## @{
9185
9186         ## Measure max radius of curvature of surface.
9187         #  @param theSurf the given surface.
9188         #  @param theUParam Value of U-parameter on the referenced surface.
9189         #  @param theVParam Value of V-parameter on the referenced surface.
9190         #  @return max radius of curvature of theSurf.
9191         #
9192         ## @ref swig_todo "Example"
9193         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9194             """
9195             Measure max radius of curvature of surface.
9196
9197             Parameters: 
9198                 theSurf the given surface.
9199                 theUParam Value of U-parameter on the referenced surface.
9200                 theVParam Value of V-parameter on the referenced surface.
9201                 
9202             Returns:     
9203                 max radius of curvature of theSurf.
9204             """
9205             # Example: see GEOM_TestMeasures.py
9206             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9207             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9208             return aSurf
9209
9210         ## Measure max radius of curvature of surface in the given point
9211         #  @param theSurf the given surface.
9212         #  @param thePoint given point.
9213         #  @return max radius of curvature of theSurf.
9214         #
9215         ## @ref swig_todo "Example"
9216         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9217             """
9218             Measure max radius of curvature of surface in the given point.
9219
9220             Parameters: 
9221                 theSurf the given surface.
9222                 thePoint given point.
9223                 
9224             Returns:     
9225                 max radius of curvature of theSurf.          
9226             """
9227             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9228             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9229             return aSurf
9230
9231         ## Measure min radius of curvature of surface.
9232         #  @param theSurf the given surface.
9233         #  @param theUParam Value of U-parameter on the referenced surface.
9234         #  @param theVParam Value of V-parameter on the referenced surface.
9235         #  @return min radius of curvature of theSurf.
9236         #   
9237         ## @ref swig_todo "Example"
9238         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9239             """
9240             Measure min radius of curvature of surface.
9241
9242             Parameters: 
9243                 theSurf the given surface.
9244                 theUParam Value of U-parameter on the referenced surface.
9245                 theVParam Value of V-parameter on the referenced surface.
9246                 
9247             Returns:     
9248                 Min radius of curvature of theSurf.
9249             """
9250             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9251             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9252             return aSurf
9253
9254         ## Measure min radius of curvature of surface in the given point
9255         #  @param theSurf the given surface.
9256         #  @param thePoint given point.
9257         #  @return min radius of curvature of theSurf.
9258         #
9259         ## @ref swig_todo "Example"
9260         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9261             """
9262             Measure min radius of curvature of surface in the given point.
9263
9264             Parameters: 
9265                 theSurf the given surface.
9266                 thePoint given point.
9267                 
9268             Returns:     
9269                 Min radius of curvature of theSurf.          
9270             """
9271             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9272             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9273             return aSurf
9274         ## @}
9275
9276         ## Get min and max tolerances of sub-shapes of theShape
9277         #  @param theShape Shape, to get tolerances of.
9278         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9279         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9280         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9281         #  VertMin,VertMax: Min and max tolerances of the vertices.
9282         #
9283         #  @ref tui_measurement_tools_page "Example"
9284         def Tolerance(self,theShape):
9285             """
9286             Get min and max tolerances of sub-shapes of theShape
9287
9288             Parameters: 
9289                 theShape Shape, to get tolerances of.
9290
9291             Returns:    
9292                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9293                  FaceMin,FaceMax: Min and max tolerances of the faces.
9294                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9295                  VertMin,VertMax: Min and max tolerances of the vertices.
9296             """
9297             # Example: see GEOM_TestMeasures.py
9298             aTuple = self.MeasuOp.GetTolerance(theShape)
9299             RaiseIfFailed("GetTolerance", self.MeasuOp)
9300             return aTuple
9301
9302         ## Obtain description of the given shape (number of sub-shapes of each type)
9303         #  @param theShape Shape to be described.
9304         #  @return Description of the given shape.
9305         #
9306         #  @ref tui_measurement_tools_page "Example"
9307         def WhatIs(self,theShape):
9308             """
9309             Obtain description of the given shape (number of sub-shapes of each type)
9310
9311             Parameters:
9312                 theShape Shape to be described.
9313
9314             Returns:
9315                 Description of the given shape.
9316             """
9317             # Example: see GEOM_TestMeasures.py
9318             aDescr = self.MeasuOp.WhatIs(theShape)
9319             RaiseIfFailed("WhatIs", self.MeasuOp)
9320             return aDescr
9321
9322         ## Obtain quantity of shapes of the given type in \a theShape.
9323         #  If \a theShape is of type \a theType, it is also counted.
9324         #  @param theShape Shape to be described.
9325         #  @param theType the given ShapeType().
9326         #  @return Quantity of shapes of type \a theType in \a theShape.
9327         #
9328         #  @ref tui_measurement_tools_page "Example"
9329         def NbShapes (self, theShape, theType):
9330             """
9331             Obtain quantity of shapes of the given type in theShape.
9332             If theShape is of type theType, it is also counted.
9333
9334             Parameters:
9335                 theShape Shape to be described.
9336                 theType the given geompy.ShapeType
9337
9338             Returns:
9339                 Quantity of shapes of type theType in theShape.
9340             """
9341             # Example: see GEOM_TestMeasures.py
9342             listSh = self.SubShapeAllIDs(theShape, theType)
9343             Nb = len(listSh)
9344             t       = EnumToLong(theShape.GetShapeType())
9345             theType = EnumToLong(theType)
9346             if t == theType:
9347                 Nb = Nb + 1
9348                 pass
9349             return Nb
9350
9351         ## Obtain quantity of shapes of each type in \a theShape.
9352         #  The \a theShape is also counted.
9353         #  @param theShape Shape to be described.
9354         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9355         #
9356         #  @ref tui_measurement_tools_page "Example"
9357         def ShapeInfo (self, theShape):
9358             """
9359             Obtain quantity of shapes of each type in theShape.
9360             The theShape is also counted.
9361
9362             Parameters:
9363                 theShape Shape to be described.
9364
9365             Returns:
9366                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9367             """
9368             # Example: see GEOM_TestMeasures.py
9369             aDict = {}
9370             for typeSh in ShapeType:
9371                 if typeSh in ( "AUTO", "SHAPE" ): continue
9372                 listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
9373                 Nb = len(listSh)
9374                 if EnumToLong(theShape.GetShapeType()) == ShapeType[typeSh]:
9375                     Nb = Nb + 1
9376                     pass
9377                 aDict[typeSh] = Nb
9378                 pass
9379             return aDict
9380
9381         ## Get a point, situated at the centre of mass of theShape.
9382         #  @param theShape Shape to define centre of mass of.
9383         #  @param theName Object name; when specified, this parameter is used
9384         #         for result publication in the study. Otherwise, if automatic
9385         #         publication is switched on, default value is used for result name.
9386         #
9387         #  @return New GEOM.GEOM_Object, containing the created point.
9388         #
9389         #  @ref tui_measurement_tools_page "Example"
9390         def MakeCDG(self, theShape, theName=None):
9391             """
9392             Get a point, situated at the centre of mass of theShape.
9393
9394             Parameters:
9395                 theShape Shape to define centre of mass of.
9396                 theName Object name; when specified, this parameter is used
9397                         for result publication in the study. Otherwise, if automatic
9398                         publication is switched on, default value is used for result name.
9399
9400             Returns:
9401                 New GEOM.GEOM_Object, containing the created point.
9402             """
9403             # Example: see GEOM_TestMeasures.py
9404             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9405             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9406             self._autoPublish(anObj, theName, "centerOfMass")
9407             return anObj
9408
9409         ## Get a vertex sub-shape by index depended with orientation.
9410         #  @param theShape Shape to find sub-shape.
9411         #  @param theIndex Index to find vertex by this index (starting from zero)
9412         #  @param theName Object name; when specified, this parameter is used
9413         #         for result publication in the study. Otherwise, if automatic
9414         #         publication is switched on, default value is used for result name.
9415         #
9416         #  @return New GEOM.GEOM_Object, containing the created vertex.
9417         #
9418         #  @ref tui_measurement_tools_page "Example"
9419         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9420             """
9421             Get a vertex sub-shape by index depended with orientation.
9422
9423             Parameters:
9424                 theShape Shape to find sub-shape.
9425                 theIndex Index to find vertex by this index (starting from zero)
9426                 theName Object name; when specified, this parameter is used
9427                         for result publication in the study. Otherwise, if automatic
9428                         publication is switched on, default value is used for result name.
9429
9430             Returns:
9431                 New GEOM.GEOM_Object, containing the created vertex.
9432             """
9433             # Example: see GEOM_TestMeasures.py
9434             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9435             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9436             self._autoPublish(anObj, theName, "vertex")
9437             return anObj
9438
9439         ## Get the first vertex of wire/edge depended orientation.
9440         #  @param theShape Shape to find first vertex.
9441         #  @param theName Object name; when specified, this parameter is used
9442         #         for result publication in the study. Otherwise, if automatic
9443         #         publication is switched on, default value is used for result name.
9444         #
9445         #  @return New GEOM.GEOM_Object, containing the created vertex.
9446         #
9447         #  @ref tui_measurement_tools_page "Example"
9448         def GetFirstVertex(self, theShape, theName=None):
9449             """
9450             Get the first vertex of wire/edge depended orientation.
9451
9452             Parameters:
9453                 theShape Shape to find first vertex.
9454                 theName Object name; when specified, this parameter is used
9455                         for result publication in the study. Otherwise, if automatic
9456                         publication is switched on, default value is used for result name.
9457
9458             Returns:    
9459                 New GEOM.GEOM_Object, containing the created vertex.
9460             """
9461             # Example: see GEOM_TestMeasures.py
9462             # note: auto-publishing is done in self.GetVertexByIndex()
9463             anObj = self.GetVertexByIndex(theShape, 0, theName)
9464             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9465             return anObj
9466
9467         ## Get the last vertex of wire/edge depended orientation.
9468         #  @param theShape Shape to find last vertex.
9469         #  @param theName Object name; when specified, this parameter is used
9470         #         for result publication in the study. Otherwise, if automatic
9471         #         publication is switched on, default value is used for result name.
9472         #
9473         #  @return New GEOM.GEOM_Object, containing the created vertex.
9474         #
9475         #  @ref tui_measurement_tools_page "Example"
9476         def GetLastVertex(self, theShape, theName=None):
9477             """
9478             Get the last vertex of wire/edge depended orientation.
9479
9480             Parameters: 
9481                 theShape Shape to find last vertex.
9482                 theName Object name; when specified, this parameter is used
9483                         for result publication in the study. Otherwise, if automatic
9484                         publication is switched on, default value is used for result name.
9485
9486             Returns:   
9487                 New GEOM.GEOM_Object, containing the created vertex.
9488             """
9489             # Example: see GEOM_TestMeasures.py
9490             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"])
9491             # note: auto-publishing is done in self.GetVertexByIndex()
9492             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9493             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9494             return anObj
9495
9496         ## Get a normale to the given face. If the point is not given,
9497         #  the normale is calculated at the center of mass.
9498         #  @param theFace Face to define normale of.
9499         #  @param theOptionalPoint Point to compute the normale at.
9500         #  @param theName Object name; when specified, this parameter is used
9501         #         for result publication in the study. Otherwise, if automatic
9502         #         publication is switched on, default value is used for result name.
9503         #
9504         #  @return New GEOM.GEOM_Object, containing the created vector.
9505         #
9506         #  @ref swig_todo "Example"
9507         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9508             """
9509             Get a normale to the given face. If the point is not given,
9510             the normale is calculated at the center of mass.
9511             
9512             Parameters: 
9513                 theFace Face to define normale of.
9514                 theOptionalPoint Point to compute the normale at.
9515                 theName Object name; when specified, this parameter is used
9516                         for result publication in the study. Otherwise, if automatic
9517                         publication is switched on, default value is used for result name.
9518
9519             Returns:   
9520                 New GEOM.GEOM_Object, containing the created vector.
9521             """
9522             # Example: see GEOM_TestMeasures.py
9523             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9524             RaiseIfFailed("GetNormal", self.MeasuOp)
9525             self._autoPublish(anObj, theName, "normal")
9526             return anObj
9527
9528         ## Check a topology of the given shape.
9529         #  @param theShape Shape to check validity of.
9530         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9531         #                        if TRUE, the shape's geometry will be checked also.
9532         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9533         #                        of problem is printed.
9534         #                        if TRUE and if theShape is invalid, the description 
9535         #                        of problem is also returned.
9536         #  @return TRUE, if the shape "seems to be valid".
9537         #
9538         #  @ref tui_measurement_tools_page "Example"
9539         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9540             """
9541             Check a topology of the given shape.
9542
9543             Parameters: 
9544                 theShape Shape to check validity of.
9545                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9546                                if TRUE, the shape's geometry will be checked also.
9547                 theReturnStatus If FALSE and if theShape is invalid, a description
9548                                 of problem is printed.
9549                                 if TRUE and if theShape is invalid, the description 
9550                                 of problem is returned.
9551
9552             Returns:   
9553                 TRUE, if the shape "seems to be valid".
9554                 If theShape is invalid, prints a description of problem.
9555                 This description can also be returned.
9556             """
9557             # Example: see GEOM_TestMeasures.py
9558             if theIsCheckGeom:
9559                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9560                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9561             else:
9562                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9563                 RaiseIfFailed("CheckShape", self.MeasuOp)
9564             if IsValid == 0:
9565                 if theReturnStatus == 0:
9566                     print Status
9567             if theReturnStatus == 1:
9568               return (IsValid, Status)
9569             return IsValid
9570
9571         ## Detect self-intersections in the given shape.
9572         #  @param theShape Shape to check.
9573         #  @return TRUE, if the shape contains no self-intersections.
9574         #
9575         #  @ref tui_measurement_tools_page "Example"
9576         def CheckSelfIntersections(self, theShape):
9577             """
9578             Detect self-intersections in the given shape.
9579
9580             Parameters: 
9581                 theShape Shape to check.
9582
9583             Returns:   
9584                 TRUE, if the shape contains no self-intersections.
9585             """
9586             # Example: see GEOM_TestMeasures.py
9587             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9588             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9589             return IsValid
9590
9591         ## Get position (LCS) of theShape.
9592         #
9593         #  Origin of the LCS is situated at the shape's center of mass.
9594         #  Axes of the LCS are obtained from shape's location or,
9595         #  if the shape is a planar face, from position of its plane.
9596         #
9597         #  @param theShape Shape to calculate position of.
9598         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9599         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9600         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9601         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9602         #
9603         #  @ref swig_todo "Example"
9604         def GetPosition(self,theShape):
9605             """
9606             Get position (LCS) of theShape.
9607             Origin of the LCS is situated at the shape's center of mass.
9608             Axes of the LCS are obtained from shape's location or,
9609             if the shape is a planar face, from position of its plane.
9610
9611             Parameters: 
9612                 theShape Shape to calculate position of.
9613
9614             Returns:  
9615                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9616                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9617                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9618                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9619             """
9620             # Example: see GEOM_TestMeasures.py
9621             aTuple = self.MeasuOp.GetPosition(theShape)
9622             RaiseIfFailed("GetPosition", self.MeasuOp)
9623             return aTuple
9624
9625         ## Get kind of theShape.
9626         #
9627         #  @param theShape Shape to get a kind of.
9628         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9629         #          and a list of parameters, describing the shape.
9630         #  @note  Concrete meaning of each value, returned via \a theIntegers
9631         #         or \a theDoubles list depends on the kind() of the shape.
9632         #
9633         #  @ref swig_todo "Example"
9634         def KindOfShape(self,theShape):
9635             """
9636             Get kind of theShape.
9637          
9638             Parameters: 
9639                 theShape Shape to get a kind of.
9640
9641             Returns:
9642                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9643                     and a list of parameters, describing the shape.
9644             Note:
9645                 Concrete meaning of each value, returned via theIntegers
9646                 or theDoubles list depends on the geompy.kind of the shape
9647             """
9648             # Example: see GEOM_TestMeasures.py
9649             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9650             RaiseIfFailed("KindOfShape", self.MeasuOp)
9651
9652             aKind  = aRoughTuple[0]
9653             anInts = aRoughTuple[1]
9654             aDbls  = aRoughTuple[2]
9655
9656             # Now there is no exception from this rule:
9657             aKindTuple = [aKind] + aDbls + anInts
9658
9659             # If they are we will regroup parameters for such kind of shape.
9660             # For example:
9661             #if aKind == kind.SOME_KIND:
9662             #    #  SOME_KIND     int int double int double double
9663             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9664
9665             return aKindTuple
9666
9667         # end of l2_measure
9668         ## @}
9669
9670         ## @addtogroup l2_import_export
9671         ## @{
9672
9673         ## Import a shape from the BREP or IGES or STEP file
9674         #  (depends on given format) with given name.
9675         #  @param theFileName The file, containing the shape.
9676         #  @param theFormatName Specify format for the file reading.
9677         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9678         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9679         #            format 'STEP_SCALE' is used instead of 'STEP',
9680         #            length unit will be set to 'meter' and result model will be scaled.
9681         #  @param theName Object name; when specified, this parameter is used
9682         #         for result publication in the study. Otherwise, if automatic
9683         #         publication is switched on, default value is used for result name.
9684         #
9685         #  @return New GEOM.GEOM_Object, containing the imported shape.
9686         #
9687         #  @ref swig_Import_Export "Example"
9688         def ImportFile(self, theFileName, theFormatName, theName=None):
9689             """
9690             Import a shape from the BREP or IGES or STEP file
9691             (depends on given format) with given name.
9692
9693             Parameters: 
9694                 theFileName The file, containing the shape.
9695                 theFormatName Specify format for the file reading.
9696                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9697                     If format 'IGES_SCALE' is used instead of 'IGES' or
9698                        format 'STEP_SCALE' is used instead of 'STEP',
9699                        length unit will be set to 'meter' and result model will be scaled.
9700                 theName Object name; when specified, this parameter is used
9701                         for result publication in the study. Otherwise, if automatic
9702                         publication is switched on, default value is used for result name.
9703
9704             Returns:
9705                 New GEOM.GEOM_Object, containing the imported shape.
9706             """
9707             # Example: see GEOM_TestOthers.py
9708             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9709             RaiseIfFailed("ImportFile", self.InsertOp)
9710             self._autoPublish(anObj, theName, "imported")
9711             return anObj
9712
9713         ## Deprecated analog of ImportFile()
9714         def Import(self, theFileName, theFormatName, theName=None):
9715             """
9716             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9717             """
9718             print "WARNING: Function Import is deprecated, use ImportFile instead"
9719             # note: auto-publishing is done in self.ImportFile()
9720             return self.ImportFile(theFileName, theFormatName, theName)
9721
9722         ## Shortcut to ImportFile() for BREP format.
9723         #  Import a shape from the BREP file with given name.
9724         #  @param theFileName The file, containing the shape.
9725         #  @param 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         #  @return New GEOM.GEOM_Object, containing the imported shape.
9730         #
9731         #  @ref swig_Import_Export "Example"
9732         def ImportBREP(self, theFileName, theName=None):
9733             """
9734             geompy.ImportFile(...) function for BREP format
9735             Import a shape from the BREP file with given name.
9736
9737             Parameters: 
9738                 theFileName The file, containing the shape.
9739                 theName Object name; when specified, this parameter is used
9740                         for result publication in the study. Otherwise, if automatic
9741                         publication is switched on, default value is used for result name.
9742
9743             Returns:
9744                 New GEOM.GEOM_Object, containing the imported shape.
9745             """
9746             # Example: see GEOM_TestOthers.py
9747             # note: auto-publishing is done in self.ImportFile()
9748             return self.ImportFile(theFileName, "BREP", theName)
9749
9750         ## Shortcut to ImportFile() for IGES format
9751         #  Import a shape from the IGES file with given name.
9752         #  @param theFileName The file, containing the shape.
9753         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9754         #                     and result model will be scaled, if its units are not meters.
9755         #                     If False (default), file length units will be taken into account.
9756         #  @param theName Object name; when specified, this parameter is used
9757         #         for result publication in the study. Otherwise, if automatic
9758         #         publication is switched on, default value is used for result name.
9759         #
9760         #  @return New GEOM.GEOM_Object, containing the imported shape.
9761         #
9762         #  @ref swig_Import_Export "Example"
9763         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
9764             """
9765             geompy.ImportFile(...) function for IGES format
9766
9767             Parameters:
9768                 theFileName The file, containing the shape.
9769                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9770                             and result model will be scaled, if its units are not meters.
9771                             If False (default), file length units will be taken into account.
9772                 theName Object name; when specified, this parameter is used
9773                         for result publication in the study. Otherwise, if automatic
9774                         publication is switched on, default value is used for result name.
9775
9776             Returns:
9777                 New GEOM.GEOM_Object, containing the imported shape.
9778             """
9779             # Example: see GEOM_TestOthers.py
9780             # note: auto-publishing is done in self.ImportFile()
9781             if ignoreUnits:
9782                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
9783             return self.ImportFile(theFileName, "IGES", theName)
9784
9785         ## Return length unit from given IGES file
9786         #  @param theFileName The file, containing the shape.
9787         #  @return String, containing the units name.
9788         #
9789         #  @ref swig_Import_Export "Example"
9790         def GetIGESUnit(self, theFileName):
9791             """
9792             Return length units from given IGES file
9793
9794             Parameters:
9795                 theFileName The file, containing the shape.
9796
9797             Returns:
9798                 String, containing the units name.
9799             """
9800             # Example: see GEOM_TestOthers.py
9801             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
9802             return aUnitName
9803
9804         ## Shortcut to ImportFile() for STEP format
9805         #  Import a shape from the STEP file with given name.
9806         #  @param theFileName The file, containing the shape.
9807         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9808         #                     and result model will be scaled, if its units are not meters.
9809         #                     If False (default), file length units will be taken into account.
9810         #  @param theName Object name; when specified, this parameter is used
9811         #         for result publication in the study. Otherwise, if automatic
9812         #         publication is switched on, default value is used for result name.
9813         #
9814         #  @return New GEOM.GEOM_Object, containing the imported shape.
9815         #
9816         #  @ref swig_Import_Export "Example"
9817         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
9818             """
9819             geompy.ImportFile(...) function for STEP format
9820
9821             Parameters:
9822                 theFileName The file, containing the shape.
9823                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9824                             and result model will be scaled, if its units are not meters.
9825                             If False (default), file length units will be taken into account.
9826                 theName Object name; when specified, this parameter is used
9827                         for result publication in the study. Otherwise, if automatic
9828                         publication is switched on, default value is used for result name.
9829
9830             Returns:
9831                 New GEOM.GEOM_Object, containing the imported shape.
9832             """
9833             # Example: see GEOM_TestOthers.py
9834             # note: auto-publishing is done in self.ImportFile()
9835             if ignoreUnits:
9836                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
9837             return self.ImportFile(theFileName, "STEP", theName)
9838
9839         ## Return length unit from given IGES or STEP file
9840         #  @param theFileName The file, containing the shape.
9841         #  @return String, containing the units name.
9842         #
9843         #  @ref swig_Import_Export "Example"
9844         def GetSTEPUnit(self, theFileName):
9845             """
9846             Return length units from given STEP file
9847
9848             Parameters:
9849                 theFileName The file, containing the shape.
9850
9851             Returns:
9852                 String, containing the units name.
9853             """
9854             # Example: see GEOM_TestOthers.py
9855             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
9856             return aUnitName
9857
9858         ## Read a shape from the binary stream, containing its bounding representation (BRep).
9859         #  @note This method will not be dumped to the python script by DumpStudy functionality.
9860         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
9861         #  @param theStream The BRep binary stream.
9862         #  @param theName Object name; when specified, this parameter is used
9863         #         for result publication in the study. Otherwise, if automatic
9864         #         publication is switched on, default value is used for result name.
9865         #
9866         #  @return New GEOM_Object, containing the shape, read from theStream.
9867         #
9868         #  @ref swig_Import_Export "Example"
9869         def RestoreShape (self, theStream, theName=None):
9870             """
9871             Read a shape from the binary stream, containing its bounding representation (BRep).
9872
9873             Note:
9874                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
9875
9876             Parameters: 
9877                 theStream The BRep binary stream.
9878                 theName Object name; when specified, this parameter is used
9879                         for result publication in the study. Otherwise, if automatic
9880                         publication is switched on, default value is used for result name.
9881
9882             Returns:
9883                 New GEOM_Object, containing the shape, read from theStream.
9884             """
9885             # Example: see GEOM_TestOthers.py
9886             anObj = self.InsertOp.RestoreShape(theStream)
9887             RaiseIfFailed("RestoreShape", self.InsertOp)
9888             self._autoPublish(anObj, theName, "restored")
9889             return anObj
9890
9891         ## Export the given shape into a file with given name.
9892         #  @param theObject Shape to be stored in the file.
9893         #  @param theFileName Name of the file to store the given shape in.
9894         #  @param theFormatName Specify format for the shape storage.
9895         #         Available formats can be obtained with
9896         #         geompy.InsertOp.ExportTranslators()[0] method.
9897         #
9898         #  @ref swig_Import_Export "Example"
9899         def Export(self, theObject, theFileName, theFormatName):
9900             """
9901             Export the given shape into a file with given name.
9902
9903             Parameters: 
9904                 theObject Shape to be stored in the file.
9905                 theFileName Name of the file to store the given shape in.
9906                 theFormatName Specify format for the shape storage.
9907                               Available formats can be obtained with
9908                               geompy.InsertOp.ExportTranslators()[0] method.
9909             """
9910             # Example: see GEOM_TestOthers.py
9911             self.InsertOp.Export(theObject, theFileName, theFormatName)
9912             if self.InsertOp.IsDone() == 0:
9913                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
9914                 pass
9915             pass
9916
9917         ## Shortcut to Export() for BREP format
9918         #
9919         #  @ref swig_Import_Export "Example"
9920         def ExportBREP(self,theObject, theFileName):
9921             """
9922             geompy.Export(...) function for BREP format
9923             """
9924             # Example: see GEOM_TestOthers.py
9925             return self.Export(theObject, theFileName, "BREP")
9926
9927         ## Shortcut to Export() for IGES format
9928         #
9929         #  @ref swig_Import_Export "Example"
9930         def ExportIGES(self,theObject, theFileName):
9931             """
9932             geompy.Export(...) function for IGES format
9933             """
9934             # Example: see GEOM_TestOthers.py
9935             return self.Export(theObject, theFileName, "IGES")
9936
9937         ## Shortcut to Export() for STEP format
9938         #
9939         #  @ref swig_Import_Export "Example"
9940         def ExportSTEP(self,theObject, theFileName):
9941             """
9942             geompy.Export(...) function for STEP format
9943             """
9944             # Example: see GEOM_TestOthers.py
9945             return self.Export(theObject, theFileName, "STEP")
9946
9947         # end of l2_import_export
9948         ## @}
9949
9950         ## @addtogroup l3_blocks
9951         ## @{
9952
9953         ## Create a quadrangle face from four edges. Order of Edges is not
9954         #  important. It is  not necessary that edges share the same vertex.
9955         #  @param E1,E2,E3,E4 Edges for the face bound.
9956         #  @param theName Object name; when specified, this parameter is used
9957         #         for result publication in the study. Otherwise, if automatic
9958         #         publication is switched on, default value is used for result name.
9959         #
9960         #  @return New GEOM.GEOM_Object, containing the created face.
9961         #
9962         #  @ref tui_building_by_blocks_page "Example"
9963         def MakeQuad(self, E1, E2, E3, E4, theName=None):
9964             """
9965             Create a quadrangle face from four edges. Order of Edges is not
9966             important. It is  not necessary that edges share the same vertex.
9967
9968             Parameters: 
9969                 E1,E2,E3,E4 Edges for the face bound.
9970                 theName Object name; when specified, this parameter is used
9971                         for result publication in the study. Otherwise, if automatic
9972                         publication is switched on, default value is used for result name.
9973
9974             Returns: 
9975                 New GEOM.GEOM_Object, containing the created face.
9976
9977             Example of usage:               
9978                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
9979             """
9980             # Example: see GEOM_Spanner.py
9981             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
9982             RaiseIfFailed("MakeQuad", self.BlocksOp)
9983             self._autoPublish(anObj, theName, "quad")
9984             return anObj
9985
9986         ## Create a quadrangle face on two edges.
9987         #  The missing edges will be built by creating the shortest ones.
9988         #  @param E1,E2 Two opposite edges for the face.
9989         #  @param theName Object name; when specified, this parameter is used
9990         #         for result publication in the study. Otherwise, if automatic
9991         #         publication is switched on, default value is used for result name.
9992         #
9993         #  @return New GEOM.GEOM_Object, containing the created face.
9994         #
9995         #  @ref tui_building_by_blocks_page "Example"
9996         def MakeQuad2Edges(self, E1, E2, theName=None):
9997             """
9998             Create a quadrangle face on two edges.
9999             The missing edges will be built by creating the shortest ones.
10000
10001             Parameters: 
10002                 E1,E2 Two opposite edges for the face.
10003                 theName Object name; when specified, this parameter is used
10004                         for result publication in the study. Otherwise, if automatic
10005                         publication is switched on, default value is used for result name.
10006
10007             Returns: 
10008                 New GEOM.GEOM_Object, containing the created face.
10009             
10010             Example of usage:
10011                 # create vertices
10012                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10013                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10014                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10015                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10016                 # create edges
10017                 edge1 = geompy.MakeEdge(p1, p2)
10018                 edge2 = geompy.MakeEdge(p3, p4)
10019                 # create a quadrangle face from two edges
10020                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10021             """
10022             # Example: see GEOM_Spanner.py
10023             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10024             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10025             self._autoPublish(anObj, theName, "quad")
10026             return anObj
10027
10028         ## Create a quadrangle face with specified corners.
10029         #  The missing edges will be built by creating the shortest ones.
10030         #  @param V1,V2,V3,V4 Corner vertices for the face.
10031         #  @param theName Object name; when specified, this parameter is used
10032         #         for result publication in the study. Otherwise, if automatic
10033         #         publication is switched on, default value is used for result name.
10034         #
10035         #  @return New GEOM.GEOM_Object, containing the created face.
10036         #
10037         #  @ref tui_building_by_blocks_page "Example 1"
10038         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10039         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10040             """
10041             Create a quadrangle face with specified corners.
10042             The missing edges will be built by creating the shortest ones.
10043
10044             Parameters: 
10045                 V1,V2,V3,V4 Corner vertices for the face.
10046                 theName Object name; when specified, this parameter is used
10047                         for result publication in the study. Otherwise, if automatic
10048                         publication is switched on, default value is used for result name.
10049
10050             Returns: 
10051                 New GEOM.GEOM_Object, containing the created face.
10052
10053             Example of usage:
10054                 # create vertices
10055                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10056                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10057                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10058                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10059                 # create a quadrangle from four points in its corners
10060                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10061             """
10062             # Example: see GEOM_Spanner.py
10063             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10064             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10065             self._autoPublish(anObj, theName, "quad")
10066             return anObj
10067
10068         ## Create a hexahedral solid, bounded by the six given faces. Order of
10069         #  faces is not important. It is  not necessary that Faces share the same edge.
10070         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10071         #  @param theName Object name; when specified, this parameter is used
10072         #         for result publication in the study. Otherwise, if automatic
10073         #         publication is switched on, default value is used for result name.
10074         #
10075         #  @return New GEOM.GEOM_Object, containing the created solid.
10076         #
10077         #  @ref tui_building_by_blocks_page "Example 1"
10078         #  \n @ref swig_MakeHexa "Example 2"
10079         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10080             """
10081             Create a hexahedral solid, bounded by the six given faces. Order of
10082             faces is not important. It is  not necessary that Faces share the same edge.
10083
10084             Parameters: 
10085                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10086                 theName Object name; when specified, this parameter is used
10087                         for result publication in the study. Otherwise, if automatic
10088                         publication is switched on, default value is used for result name.
10089
10090             Returns:    
10091                 New GEOM.GEOM_Object, containing the created solid.
10092
10093             Example of usage:
10094                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10095             """
10096             # Example: see GEOM_Spanner.py
10097             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10098             RaiseIfFailed("MakeHexa", self.BlocksOp)
10099             self._autoPublish(anObj, theName, "hexa")
10100             return anObj
10101
10102         ## Create a hexahedral solid between two given faces.
10103         #  The missing faces will be built by creating the smallest ones.
10104         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10105         #  @param theName Object name; when specified, this parameter is used
10106         #         for result publication in the study. Otherwise, if automatic
10107         #         publication is switched on, default value is used for result name.
10108         #
10109         #  @return New GEOM.GEOM_Object, containing the created solid.
10110         #
10111         #  @ref tui_building_by_blocks_page "Example 1"
10112         #  \n @ref swig_MakeHexa2Faces "Example 2"
10113         def MakeHexa2Faces(self, F1, F2, theName=None):
10114             """
10115             Create a hexahedral solid between two given faces.
10116             The missing faces will be built by creating the smallest ones.
10117
10118             Parameters: 
10119                 F1,F2 Two opposite faces for the hexahedral solid.
10120                 theName Object name; when specified, this parameter is used
10121                         for result publication in the study. Otherwise, if automatic
10122                         publication is switched on, default value is used for result name.
10123
10124             Returns:
10125                 New GEOM.GEOM_Object, containing the created solid.
10126
10127             Example of usage:
10128                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10129             """
10130             # Example: see GEOM_Spanner.py
10131             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10132             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10133             self._autoPublish(anObj, theName, "hexa")
10134             return anObj
10135
10136         # end of l3_blocks
10137         ## @}
10138
10139         ## @addtogroup l3_blocks_op
10140         ## @{
10141
10142         ## Get a vertex, found in the given shape by its coordinates.
10143         #  @param theShape Block or a compound of blocks.
10144         #  @param theX,theY,theZ Coordinates of the sought vertex.
10145         #  @param theEpsilon Maximum allowed distance between the resulting
10146         #                    vertex and point with the given coordinates.
10147         #  @param theName Object name; when specified, this parameter is used
10148         #         for result publication in the study. Otherwise, if automatic
10149         #         publication is switched on, default value is used for result name.
10150         #
10151         #  @return New GEOM.GEOM_Object, containing the found vertex.
10152         #
10153         #  @ref swig_GetPoint "Example"
10154         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10155             """
10156             Get a vertex, found in the given shape by its coordinates.
10157
10158             Parameters: 
10159                 theShape Block or a compound of blocks.
10160                 theX,theY,theZ Coordinates of the sought vertex.
10161                 theEpsilon Maximum allowed distance between the resulting
10162                            vertex and point with the given coordinates.
10163                 theName Object name; when specified, this parameter is used
10164                         for result publication in the study. Otherwise, if automatic
10165                         publication is switched on, default value is used for result name.
10166
10167             Returns:                  
10168                 New GEOM.GEOM_Object, containing the found vertex.
10169
10170             Example of usage:
10171                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10172             """
10173             # Example: see GEOM_TestOthers.py
10174             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10175             RaiseIfFailed("GetPoint", self.BlocksOp)
10176             self._autoPublish(anObj, theName, "vertex")
10177             return anObj
10178
10179         ## Find a vertex of the given shape, which has minimal distance to the given point.
10180         #  @param theShape Any shape.
10181         #  @param thePoint Point, close to the desired vertex.
10182         #  @param theName Object name; when specified, this parameter is used
10183         #         for result publication in the study. Otherwise, if automatic
10184         #         publication is switched on, default value is used for result name.
10185         #
10186         #  @return New GEOM.GEOM_Object, containing the found vertex.
10187         #
10188         #  @ref swig_GetVertexNearPoint "Example"
10189         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10190             """
10191             Find a vertex of the given shape, which has minimal distance to the given point.
10192
10193             Parameters: 
10194                 theShape Any shape.
10195                 thePoint Point, close to the desired vertex.
10196                 theName Object name; when specified, this parameter is used
10197                         for result publication in the study. Otherwise, if automatic
10198                         publication is switched on, default value is used for result name.
10199
10200             Returns:
10201                 New GEOM.GEOM_Object, containing the found vertex.
10202
10203             Example of usage:
10204                 pmidle = geompy.MakeVertex(50, 0, 50)
10205                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10206             """
10207             # Example: see GEOM_TestOthers.py
10208             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10209             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10210             self._autoPublish(anObj, theName, "vertex")
10211             return anObj
10212
10213         ## Get an edge, found in the given shape by two given vertices.
10214         #  @param theShape Block or a compound of blocks.
10215         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10216         #  @param theName Object name; when specified, this parameter is used
10217         #         for result publication in the study. Otherwise, if automatic
10218         #         publication is switched on, default value is used for result name.
10219         #
10220         #  @return New GEOM.GEOM_Object, containing the found edge.
10221         #
10222         #  @ref swig_GetEdge "Example"
10223         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10224             """
10225             Get an edge, found in the given shape by two given vertices.
10226
10227             Parameters: 
10228                 theShape Block or a compound of blocks.
10229                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10230                 theName Object name; when specified, this parameter is used
10231                         for result publication in the study. Otherwise, if automatic
10232                         publication is switched on, default value is used for result name.
10233
10234             Returns:
10235                 New GEOM.GEOM_Object, containing the found edge.
10236             """
10237             # Example: see GEOM_Spanner.py
10238             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10239             RaiseIfFailed("GetEdge", self.BlocksOp)
10240             self._autoPublish(anObj, theName, "edge")
10241             return anObj
10242
10243         ## Find an edge of the given shape, which has minimal distance to the given point.
10244         #  @param theShape Block or a compound of blocks.
10245         #  @param thePoint Point, close to the desired edge.
10246         #  @param theName Object name; when specified, this parameter is used
10247         #         for result publication in the study. Otherwise, if automatic
10248         #         publication is switched on, default value is used for result name.
10249         #
10250         #  @return New GEOM.GEOM_Object, containing the found edge.
10251         #
10252         #  @ref swig_GetEdgeNearPoint "Example"
10253         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10254             """
10255             Find an edge of the given shape, which has minimal distance to the given point.
10256
10257             Parameters: 
10258                 theShape Block or a compound of blocks.
10259                 thePoint Point, close to the desired edge.
10260                 theName Object name; when specified, this parameter is used
10261                         for result publication in the study. Otherwise, if automatic
10262                         publication is switched on, default value is used for result name.
10263
10264             Returns:
10265                 New GEOM.GEOM_Object, containing the found edge.
10266             """
10267             # Example: see GEOM_TestOthers.py
10268             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10269             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10270             self._autoPublish(anObj, theName, "edge")
10271             return anObj
10272
10273         ## Returns a face, found in the given shape by four given corner vertices.
10274         #  @param theShape Block or a compound of blocks.
10275         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10276         #  @param theName Object name; when specified, this parameter is used
10277         #         for result publication in the study. Otherwise, if automatic
10278         #         publication is switched on, default value is used for result name.
10279         #
10280         #  @return New GEOM.GEOM_Object, containing the found face.
10281         #
10282         #  @ref swig_todo "Example"
10283         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10284             """
10285             Returns a face, found in the given shape by four given corner vertices.
10286
10287             Parameters:
10288                 theShape Block or a compound of blocks.
10289                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10290                 theName Object name; when specified, this parameter is used
10291                         for result publication in the study. Otherwise, if automatic
10292                         publication is switched on, default value is used for result name.
10293
10294             Returns:
10295                 New GEOM.GEOM_Object, containing the found face.
10296             """
10297             # Example: see GEOM_Spanner.py
10298             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10299             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10300             self._autoPublish(anObj, theName, "face")
10301             return anObj
10302
10303         ## Get a face of block, found in the given shape by two given edges.
10304         #  @param theShape Block or a compound of blocks.
10305         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10306         #  @param theName Object name; when specified, this parameter is used
10307         #         for result publication in the study. Otherwise, if automatic
10308         #         publication is switched on, default value is used for result name.
10309         #
10310         #  @return New GEOM.GEOM_Object, containing the found face.
10311         #
10312         #  @ref swig_todo "Example"
10313         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10314             """
10315             Get a face of block, found in the given shape by two given edges.
10316
10317             Parameters:
10318                 theShape Block or a compound of blocks.
10319                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10320                 theName Object name; when specified, this parameter is used
10321                         for result publication in the study. Otherwise, if automatic
10322                         publication is switched on, default value is used for result name.
10323
10324             Returns:
10325                 New GEOM.GEOM_Object, containing the found face.
10326             """
10327             # Example: see GEOM_Spanner.py
10328             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10329             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10330             self._autoPublish(anObj, theName, "face")
10331             return anObj
10332
10333         ## Find a face, opposite to the given one in the given block.
10334         #  @param theBlock Must be a hexahedral solid.
10335         #  @param theFace Face of \a theBlock, opposite to the desired face.
10336         #  @param theName Object name; when specified, this parameter is used
10337         #         for result publication in the study. Otherwise, if automatic
10338         #         publication is switched on, default value is used for result name.
10339         #
10340         #  @return New GEOM.GEOM_Object, containing the found face.
10341         #
10342         #  @ref swig_GetOppositeFace "Example"
10343         def GetOppositeFace(self, theBlock, theFace, theName=None):
10344             """
10345             Find a face, opposite to the given one in the given block.
10346
10347             Parameters:
10348                 theBlock Must be a hexahedral solid.
10349                 theFace Face of theBlock, opposite to the desired face.
10350                 theName Object name; when specified, this parameter is used
10351                         for result publication in the study. Otherwise, if automatic
10352                         publication is switched on, default value is used for result name.
10353
10354             Returns: 
10355                 New GEOM.GEOM_Object, containing the found face.
10356             """
10357             # Example: see GEOM_Spanner.py
10358             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10359             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10360             self._autoPublish(anObj, theName, "face")
10361             return anObj
10362
10363         ## Find a face of the given shape, which has minimal distance to the given point.
10364         #  @param theShape Block or a compound of blocks.
10365         #  @param thePoint Point, close to the desired face.
10366         #  @param theName Object name; when specified, this parameter is used
10367         #         for result publication in the study. Otherwise, if automatic
10368         #         publication is switched on, default value is used for result name.
10369         #
10370         #  @return New GEOM.GEOM_Object, containing the found face.
10371         #
10372         #  @ref swig_GetFaceNearPoint "Example"
10373         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10374             """
10375             Find a face of the given shape, which has minimal distance to the given point.
10376
10377             Parameters:
10378                 theShape Block or a compound of blocks.
10379                 thePoint Point, close to the desired face.
10380                 theName Object name; when specified, this parameter is used
10381                         for result publication in the study. Otherwise, if automatic
10382                         publication is switched on, default value is used for result name.
10383
10384             Returns:
10385                 New GEOM.GEOM_Object, containing the found face.
10386             """
10387             # Example: see GEOM_Spanner.py
10388             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10389             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10390             self._autoPublish(anObj, theName, "face")
10391             return anObj
10392
10393         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10394         #  @param theBlock Block or a compound of blocks.
10395         #  @param theVector Vector, close to the normale of the desired face.
10396         #  @param theName Object name; when specified, this parameter is used
10397         #         for result publication in the study. Otherwise, if automatic
10398         #         publication is switched on, default value is used for result name.
10399         #
10400         #  @return New GEOM.GEOM_Object, containing the found face.
10401         #
10402         #  @ref swig_todo "Example"
10403         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10404             """
10405             Find a face of block, whose outside normale has minimal angle with the given vector.
10406
10407             Parameters:
10408                 theBlock Block or a compound of blocks.
10409                 theVector Vector, close to the normale of the desired face.
10410                 theName Object name; when specified, this parameter is used
10411                         for result publication in the study. Otherwise, if automatic
10412                         publication is switched on, default value is used for result name.
10413
10414             Returns:
10415                 New GEOM.GEOM_Object, containing the found face.
10416             """
10417             # Example: see GEOM_Spanner.py
10418             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10419             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10420             self._autoPublish(anObj, theName, "face")
10421             return anObj
10422
10423         ## Find all sub-shapes of type \a theShapeType of the given shape,
10424         #  which have minimal distance to the given point.
10425         #  @param theShape Any shape.
10426         #  @param thePoint Point, close to the desired shape.
10427         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10428         #  @param theTolerance The tolerance for distances comparison. All shapes
10429         #                      with distances to the given point in interval
10430         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10431         #  @param theName Object name; when specified, this parameter is used
10432         #         for result publication in the study. Otherwise, if automatic
10433         #         publication is switched on, default value is used for result name.
10434         #
10435         #  @return New GEOM_Object, containing a group of all found shapes.
10436         #
10437         #  @ref swig_GetShapesNearPoint "Example"
10438         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10439             """
10440             Find all sub-shapes of type theShapeType of the given shape,
10441             which have minimal distance to the given point.
10442
10443             Parameters:
10444                 theShape Any shape.
10445                 thePoint Point, close to the desired shape.
10446                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10447                 theTolerance The tolerance for distances comparison. All shapes
10448                                 with distances to the given point in interval
10449                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10450                 theName Object name; when specified, this parameter is used
10451                         for result publication in the study. Otherwise, if automatic
10452                         publication is switched on, default value is used for result name.
10453
10454             Returns:
10455                 New GEOM_Object, containing a group of all found shapes.
10456             """
10457             # Example: see GEOM_TestOthers.py
10458             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10459             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10460             self._autoPublish(anObj, theName, "group")
10461             return anObj
10462
10463         # end of l3_blocks_op
10464         ## @}
10465
10466         ## @addtogroup l4_blocks_measure
10467         ## @{
10468
10469         ## Check, if the compound of blocks is given.
10470         #  To be considered as a compound of blocks, the
10471         #  given shape must satisfy the following conditions:
10472         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10473         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10474         #  - The compound should be connexe.
10475         #  - The glue between two quadrangle faces should be applied.
10476         #  @param theCompound The compound to check.
10477         #  @return TRUE, if the given shape is a compound of blocks.
10478         #  If theCompound is not valid, prints all discovered errors.
10479         #
10480         #  @ref tui_measurement_tools_page "Example 1"
10481         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10482         def CheckCompoundOfBlocks(self,theCompound):
10483             """
10484             Check, if the compound of blocks is given.
10485             To be considered as a compound of blocks, the
10486             given shape must satisfy the following conditions:
10487             - Each element of the compound should be a Block (6 faces and 12 edges).
10488             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10489             - The compound should be connexe.
10490             - The glue between two quadrangle faces should be applied.
10491
10492             Parameters:
10493                 theCompound The compound to check.
10494
10495             Returns:
10496                 TRUE, if the given shape is a compound of blocks.
10497                 If theCompound is not valid, prints all discovered errors.            
10498             """
10499             # Example: see GEOM_Spanner.py
10500             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10501             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10502             if IsValid == 0:
10503                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10504                 print Descr
10505             return IsValid
10506
10507         ## Retrieve all non blocks solids and faces from \a theShape.
10508         #  @param theShape The shape to explore.
10509         #  @param theName Object name; when specified, this parameter is used
10510         #         for result publication in the study. Otherwise, if automatic
10511         #         publication is switched on, default value is used for result name.
10512         #
10513         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10514         #          non block solids (= not 6 faces, or with 6 faces, but with the
10515         #          presence of non-quadrangular faces). The second object is a
10516         #          group of all non quadrangular faces.
10517         #
10518         #  @ref tui_measurement_tools_page "Example 1"
10519         #  \n @ref swig_GetNonBlocks "Example 2"
10520         def GetNonBlocks (self, theShape, theName=None):
10521             """
10522             Retrieve all non blocks solids and faces from theShape.
10523
10524             Parameters:
10525                 theShape The shape to explore.
10526                 theName Object name; when specified, this parameter is used
10527                         for result publication in the study. Otherwise, if automatic
10528                         publication is switched on, default value is used for result name.
10529
10530             Returns:
10531                 A tuple of two GEOM_Objects. The first object is a group of all
10532                 non block solids (= not 6 faces, or with 6 faces, but with the
10533                 presence of non-quadrangular faces). The second object is a
10534                 group of all non quadrangular faces.
10535
10536             Usage:
10537                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10538             """
10539             # Example: see GEOM_Spanner.py
10540             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10541             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10542             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10543             return aTuple
10544
10545         ## Remove all seam and degenerated edges from \a theShape.
10546         #  Unite faces and edges, sharing one surface. It means that
10547         #  this faces must have references to one C++ surface object (handle).
10548         #  @param theShape The compound or single solid to remove irregular edges from.
10549         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10550         #         do not unite faces.
10551         #  @param theName Object name; when specified, this parameter is used
10552         #         for result publication in the study. Otherwise, if automatic
10553         #         publication is switched on, default value is used for result name.
10554         #
10555         #  @return Improved shape.
10556         #
10557         #  @ref swig_RemoveExtraEdges "Example"
10558         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10559             """
10560             Remove all seam and degenerated edges from theShape.
10561             Unite faces and edges, sharing one surface. It means that
10562             this faces must have references to one C++ surface object (handle).
10563
10564             Parameters:
10565                 theShape The compound or single solid to remove irregular edges from.
10566                 doUnionFaces If True, then unite faces. If False (the default value),
10567                              do not unite faces.
10568                 theName Object name; when specified, this parameter is used
10569                         for result publication in the study. Otherwise, if automatic
10570                         publication is switched on, default value is used for result name.
10571
10572             Returns: 
10573                 Improved shape.
10574             """
10575             # Example: see GEOM_TestOthers.py
10576             nbFacesOptimum = -1 # -1 means do not unite faces
10577             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10578             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10579             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10580             self._autoPublish(anObj, theName, "removeExtraEdges")
10581             return anObj
10582
10583         ## Check, if the given shape is a blocks compound.
10584         #  Fix all detected errors.
10585         #    \note Single block can be also fixed by this method.
10586         #  @param theShape The compound to check and improve.
10587         #  @param theName Object name; when specified, this parameter is used
10588         #         for result publication in the study. Otherwise, if automatic
10589         #         publication is switched on, default value is used for result name.
10590         #
10591         #  @return Improved compound.
10592         #
10593         #  @ref swig_CheckAndImprove "Example"
10594         def CheckAndImprove(self, theShape, theName=None):
10595             """
10596             Check, if the given shape is a blocks compound.
10597             Fix all detected errors.
10598
10599             Note:
10600                 Single block can be also fixed by this method.
10601
10602             Parameters:
10603                 theShape The compound to check and improve.
10604                 theName Object name; when specified, this parameter is used
10605                         for result publication in the study. Otherwise, if automatic
10606                         publication is switched on, default value is used for result name.
10607
10608             Returns: 
10609                 Improved compound.
10610             """
10611             # Example: see GEOM_TestOthers.py
10612             anObj = self.BlocksOp.CheckAndImprove(theShape)
10613             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10614             self._autoPublish(anObj, theName, "improved")
10615             return anObj
10616
10617         # end of l4_blocks_measure
10618         ## @}
10619
10620         ## @addtogroup l3_blocks_op
10621         ## @{
10622
10623         ## Get all the blocks, contained in the given compound.
10624         #  @param theCompound The compound to explode.
10625         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10626         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10627         #  @param theName Object name; when specified, this parameter is used
10628         #         for result publication in the study. Otherwise, if automatic
10629         #         publication is switched on, default value is used for result name.
10630         #
10631         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10632         #
10633         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10634         #
10635         #  @ref tui_explode_on_blocks "Example 1"
10636         #  \n @ref swig_MakeBlockExplode "Example 2"
10637         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10638             """
10639             Get all the blocks, contained in the given compound.
10640
10641             Parameters:
10642                 theCompound The compound to explode.
10643                 theMinNbFaces If solid has lower number of faces, it is not a block.
10644                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10645                 theName Object name; when specified, this parameter is used
10646                         for result publication in the study. Otherwise, if automatic
10647                         publication is switched on, default value is used for result name.
10648
10649             Note:
10650                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10651
10652             Returns:  
10653                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10654             """
10655             # Example: see GEOM_TestOthers.py
10656             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10657             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10658             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10659             for anObj in aList:
10660                 anObj.SetParameters(Parameters)
10661                 pass
10662             self._autoPublish(aList, theName, "block")
10663             return aList
10664
10665         ## Find block, containing the given point inside its volume or on boundary.
10666         #  @param theCompound Compound, to find block in.
10667         #  @param thePoint Point, close to the desired block. If the point lays on
10668         #         boundary between some blocks, we return block with nearest center.
10669         #  @param theName Object name; when specified, this parameter is used
10670         #         for result publication in the study. Otherwise, if automatic
10671         #         publication is switched on, default value is used for result name.
10672         #
10673         #  @return New GEOM.GEOM_Object, containing the found block.
10674         #
10675         #  @ref swig_todo "Example"
10676         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10677             """
10678             Find block, containing the given point inside its volume or on boundary.
10679
10680             Parameters:
10681                 theCompound Compound, to find block in.
10682                 thePoint Point, close to the desired block. If the point lays on
10683                          boundary between some blocks, we return block with nearest center.
10684                 theName Object name; when specified, this parameter is used
10685                         for result publication in the study. Otherwise, if automatic
10686                         publication is switched on, default value is used for result name.
10687
10688             Returns:
10689                 New GEOM.GEOM_Object, containing the found block.
10690             """
10691             # Example: see GEOM_Spanner.py
10692             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10693             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10694             self._autoPublish(anObj, theName, "block")
10695             return anObj
10696
10697         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10698         #  @param theCompound Compound, to find block in.
10699         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10700         #  @param theName Object name; when specified, this parameter is used
10701         #         for result publication in the study. Otherwise, if automatic
10702         #         publication is switched on, default value is used for result name.
10703         #
10704         #  @return New GEOM.GEOM_Object, containing the found block.
10705         #
10706         #  @ref swig_GetBlockByParts "Example"
10707         def GetBlockByParts(self, theCompound, theParts, theName=None):
10708             """
10709              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10710
10711              Parameters:
10712                 theCompound Compound, to find block in.
10713                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
10714                 theName Object name; when specified, this parameter is used
10715                         for result publication in the study. Otherwise, if automatic
10716                         publication is switched on, default value is used for result name.
10717
10718             Returns: 
10719                 New GEOM_Object, containing the found block.
10720             """
10721             # Example: see GEOM_TestOthers.py
10722             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
10723             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
10724             self._autoPublish(anObj, theName, "block")
10725             return anObj
10726
10727         ## Return all blocks, containing all the elements, passed as the parts.
10728         #  @param theCompound Compound, to find blocks in.
10729         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10730         #  @param theName Object name; when specified, this parameter is used
10731         #         for result publication in the study. Otherwise, if automatic
10732         #         publication is switched on, default value is used for result name.
10733         #
10734         #  @return List of GEOM.GEOM_Object, containing the found blocks.
10735         #
10736         #  @ref swig_todo "Example"
10737         def GetBlocksByParts(self, theCompound, theParts, theName=None):
10738             """
10739             Return all blocks, containing all the elements, passed as the parts.
10740
10741             Parameters:
10742                 theCompound Compound, to find blocks in.
10743                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10744                 theName Object name; when specified, this parameter is used
10745                         for result publication in the study. Otherwise, if automatic
10746                         publication is switched on, default value is used for result name.
10747
10748             Returns:
10749                 List of GEOM.GEOM_Object, containing the found blocks.
10750             """
10751             # Example: see GEOM_Spanner.py
10752             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
10753             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
10754             self._autoPublish(aList, theName, "block")
10755             return aList
10756
10757         ## Multi-transformate block and glue the result.
10758         #  Transformation is defined so, as to superpose direction faces.
10759         #  @param Block Hexahedral solid to be multi-transformed.
10760         #  @param DirFace1 ID of First direction face.
10761         #  @param DirFace2 ID of Second direction face.
10762         #  @param NbTimes Quantity of transformations to be done.
10763         #  @param theName Object name; when specified, this parameter is used
10764         #         for result publication in the study. Otherwise, if automatic
10765         #         publication is switched on, default value is used for result name.
10766         #
10767         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10768         #
10769         #  @return New GEOM.GEOM_Object, containing the result shape.
10770         #
10771         #  @ref tui_multi_transformation "Example"
10772         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
10773             """
10774             Multi-transformate block and glue the result.
10775             Transformation is defined so, as to superpose direction faces.
10776
10777             Parameters:
10778                 Block Hexahedral solid to be multi-transformed.
10779                 DirFace1 ID of First direction face.
10780                 DirFace2 ID of Second direction face.
10781                 NbTimes Quantity of transformations to be done.
10782                 theName Object name; when specified, this parameter is used
10783                         for result publication in the study. Otherwise, if automatic
10784                         publication is switched on, default value is used for result name.
10785
10786             Note:
10787                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10788
10789             Returns:
10790                 New GEOM.GEOM_Object, containing the result shape.
10791             """
10792             # Example: see GEOM_Spanner.py
10793             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
10794             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
10795             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
10796             anObj.SetParameters(Parameters)
10797             self._autoPublish(anObj, theName, "transformed")
10798             return anObj
10799
10800         ## Multi-transformate block and glue the result.
10801         #  @param Block Hexahedral solid to be multi-transformed.
10802         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
10803         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
10804         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
10805         #  @param theName Object name; when specified, this parameter is used
10806         #         for result publication in the study. Otherwise, if automatic
10807         #         publication is switched on, default value is used for result name.
10808         #
10809         #  @return New GEOM.GEOM_Object, containing the result shape.
10810         #
10811         #  @ref tui_multi_transformation "Example"
10812         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
10813                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
10814             """
10815             Multi-transformate block and glue the result.
10816
10817             Parameters:
10818                 Block Hexahedral solid to be multi-transformed.
10819                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
10820                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
10821                 NbTimesU,NbTimesV Quantity of transformations to be done.
10822                 theName Object name; when specified, this parameter is used
10823                         for result publication in the study. Otherwise, if automatic
10824                         publication is switched on, default value is used for result name.
10825
10826             Returns:
10827                 New GEOM.GEOM_Object, containing the result shape.
10828             """
10829             # Example: see GEOM_Spanner.py
10830             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
10831               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
10832             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
10833                                                             DirFace1V, DirFace2V, NbTimesV)
10834             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
10835             anObj.SetParameters(Parameters)
10836             self._autoPublish(anObj, theName, "transformed")
10837             return anObj
10838
10839         ## Build all possible propagation groups.
10840         #  Propagation group is a set of all edges, opposite to one (main)
10841         #  edge of this group directly or through other opposite edges.
10842         #  Notion of Opposite Edge make sence only on quadrangle face.
10843         #  @param theShape Shape to build propagation groups on.
10844         #  @param 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         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
10849         #
10850         #  @ref swig_Propagate "Example"
10851         def Propagate(self, theShape, theName=None):
10852             """
10853             Build all possible propagation groups.
10854             Propagation group is a set of all edges, opposite to one (main)
10855             edge of this group directly or through other opposite edges.
10856             Notion of Opposite Edge make sence only on quadrangle face.
10857
10858             Parameters:
10859                 theShape Shape to build propagation groups on.
10860                 theName Object name; when specified, this parameter is used
10861                         for result publication in the study. Otherwise, if automatic
10862                         publication is switched on, default value is used for result name.
10863
10864             Returns:
10865                 List of GEOM.GEOM_Object, each of them is a propagation group.
10866             """
10867             # Example: see GEOM_TestOthers.py
10868             listChains = self.BlocksOp.Propagate(theShape)
10869             RaiseIfFailed("Propagate", self.BlocksOp)
10870             self._autoPublish(listChains, theName, "propagate")
10871             return listChains
10872
10873         # end of l3_blocks_op
10874         ## @}
10875
10876         ## @addtogroup l3_groups
10877         ## @{
10878
10879         ## Creates a new group which will store sub-shapes of theMainShape
10880         #  @param theMainShape is a GEOM object on which the group is selected
10881         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
10882         #  @param theName Object name; when specified, this parameter is used
10883         #         for result publication in the study. Otherwise, if automatic
10884         #         publication is switched on, default value is used for result name.
10885         #
10886         #  @return a newly created GEOM group (GEOM.GEOM_Object)
10887         #
10888         #  @ref tui_working_with_groups_page "Example 1"
10889         #  \n @ref swig_CreateGroup "Example 2"
10890         def CreateGroup(self, theMainShape, theShapeType, theName=None):
10891             """
10892             Creates a new group which will store sub-shapes of theMainShape
10893
10894             Parameters:
10895                theMainShape is a GEOM object on which the group is selected
10896                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
10897                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
10898                 theName Object name; when specified, this parameter is used
10899                         for result publication in the study. Otherwise, if automatic
10900                         publication is switched on, default value is used for result name.
10901
10902             Returns:
10903                a newly created GEOM group
10904
10905             Example of usage:
10906                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
10907                 
10908             """
10909             # Example: see GEOM_TestOthers.py
10910             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
10911             RaiseIfFailed("CreateGroup", self.GroupOp)
10912             self._autoPublish(anObj, theName, "group")
10913             return anObj
10914
10915         ## Adds a sub-object with ID theSubShapeId to the group
10916         #  @param theGroup is a GEOM group to which the new sub-shape is added
10917         #  @param theSubShapeID is a sub-shape ID in the main object.
10918         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
10919         #
10920         #  @ref tui_working_with_groups_page "Example"
10921         def AddObject(self,theGroup, theSubShapeID):
10922             """
10923             Adds a sub-object with ID theSubShapeId to the group
10924
10925             Parameters:
10926                 theGroup       is a GEOM group to which the new sub-shape is added
10927                 theSubShapeID  is a sub-shape ID in the main object.
10928
10929             Note:
10930                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
10931             """
10932             # Example: see GEOM_TestOthers.py
10933             self.GroupOp.AddObject(theGroup, theSubShapeID)
10934             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
10935                 RaiseIfFailed("AddObject", self.GroupOp)
10936                 pass
10937             pass
10938
10939         ## Removes a sub-object with ID \a theSubShapeId from the group
10940         #  @param theGroup is a GEOM group from which the new sub-shape is removed
10941         #  @param theSubShapeID is a sub-shape ID in the main object.
10942         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
10943         #
10944         #  @ref tui_working_with_groups_page "Example"
10945         def RemoveObject(self,theGroup, theSubShapeID):
10946             """
10947             Removes a sub-object with ID theSubShapeId from the group
10948
10949             Parameters:
10950                 theGroup is a GEOM group from which the new sub-shape is removed
10951                 theSubShapeID is a sub-shape ID in the main object.
10952
10953             Note:
10954                 Use method GetSubShapeID() to get an unique ID of the sub-shape
10955             """
10956             # Example: see GEOM_TestOthers.py
10957             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
10958             RaiseIfFailed("RemoveObject", self.GroupOp)
10959             pass
10960
10961         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
10962         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
10963         #  @param theSubShapes is a list of sub-shapes to be added.
10964         #
10965         #  @ref tui_working_with_groups_page "Example"
10966         def UnionList (self,theGroup, theSubShapes):
10967             """
10968             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
10969
10970             Parameters:
10971                 theGroup is a GEOM group to which the new sub-shapes are added.
10972                 theSubShapes is a list of sub-shapes to be added.
10973             """
10974             # Example: see GEOM_TestOthers.py
10975             self.GroupOp.UnionList(theGroup, theSubShapes)
10976             RaiseIfFailed("UnionList", self.GroupOp)
10977             pass
10978
10979         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
10980         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
10981         #  @param theSubShapes is a list of indices of sub-shapes to be added.
10982         #
10983         #  @ref swig_UnionIDs "Example"
10984         def UnionIDs(self,theGroup, theSubShapes):
10985             """
10986             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
10987
10988             Parameters:
10989                 theGroup is a GEOM group to which the new sub-shapes are added.
10990                 theSubShapes is a list of indices of sub-shapes to be added.
10991             """
10992             # Example: see GEOM_TestOthers.py
10993             self.GroupOp.UnionIDs(theGroup, theSubShapes)
10994             RaiseIfFailed("UnionIDs", self.GroupOp)
10995             pass
10996
10997         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
10998         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
10999         #  @param theSubShapes is a list of sub-shapes to be removed.
11000         #
11001         #  @ref tui_working_with_groups_page "Example"
11002         def DifferenceList (self,theGroup, theSubShapes):
11003             """
11004             Removes from the group all the given shapes. No errors, if some shapes are not included.
11005
11006             Parameters:
11007                 theGroup is a GEOM group from which the sub-shapes are removed.
11008                 theSubShapes is a list of sub-shapes to be removed.
11009             """
11010             # Example: see GEOM_TestOthers.py
11011             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11012             RaiseIfFailed("DifferenceList", self.GroupOp)
11013             pass
11014
11015         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11016         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11017         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11018         #
11019         #  @ref swig_DifferenceIDs "Example"
11020         def DifferenceIDs(self,theGroup, theSubShapes):
11021             """
11022             Removes from the group all the given shapes. No errors, if some shapes are not included.
11023
11024             Parameters:
11025                 theGroup is a GEOM group from which the sub-shapes are removed.
11026                 theSubShapes is a list of indices of sub-shapes to be removed.
11027             """            
11028             # Example: see GEOM_TestOthers.py
11029             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11030             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11031             pass
11032
11033         ## Union of two groups.
11034         #  New group is created. It will contain all entities
11035         #  which are present in groups theGroup1 and theGroup2.
11036         #  @param theGroup1, theGroup2 are the initial GEOM groups
11037         #                              to create the united group from.
11038         #  @param theName Object name; when specified, this parameter is used
11039         #         for result publication in the study. Otherwise, if automatic
11040         #         publication is switched on, default value is used for result name.
11041         #
11042         #  @return a newly created GEOM group.
11043         #
11044         #  @ref tui_union_groups_anchor "Example"
11045         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11046             """
11047             Union of two groups.
11048             New group is created. It will contain all entities
11049             which are present in groups theGroup1 and theGroup2.
11050
11051             Parameters:
11052                 theGroup1, theGroup2 are the initial GEOM groups
11053                                      to create the united group from.
11054                 theName Object name; when specified, this parameter is used
11055                         for result publication in the study. Otherwise, if automatic
11056                         publication is switched on, default value is used for result name.
11057
11058             Returns:
11059                 a newly created GEOM group.
11060             """
11061             # Example: see GEOM_TestOthers.py
11062             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11063             RaiseIfFailed("UnionGroups", self.GroupOp)
11064             self._autoPublish(aGroup, theName, "group")
11065             return aGroup
11066
11067         ## Intersection of two groups.
11068         #  New group is created. It will contain only those entities
11069         #  which are present in both groups theGroup1 and theGroup2.
11070         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11071         #  @param theName Object name; when specified, this parameter is used
11072         #         for result publication in the study. Otherwise, if automatic
11073         #         publication is switched on, default value is used for result name.
11074         #
11075         #  @return a newly created GEOM group.
11076         #
11077         #  @ref tui_intersect_groups_anchor "Example"
11078         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11079             """
11080             Intersection of two groups.
11081             New group is created. It will contain only those entities
11082             which are present in both groups theGroup1 and theGroup2.
11083
11084             Parameters:
11085                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11086                 theName Object name; when specified, this parameter is used
11087                         for result publication in the study. Otherwise, if automatic
11088                         publication is switched on, default value is used for result name.
11089
11090             Returns:
11091                 a newly created GEOM group.
11092             """
11093             # Example: see GEOM_TestOthers.py
11094             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11095             RaiseIfFailed("IntersectGroups", self.GroupOp)
11096             self._autoPublish(aGroup, theName, "group")
11097             return aGroup
11098
11099         ## Cut of two groups.
11100         #  New group is created. It will contain entities which are
11101         #  present in group theGroup1 but are not present in group theGroup2.
11102         #  @param theGroup1 is a GEOM group to include elements of.
11103         #  @param theGroup2 is a GEOM group to exclude elements of.
11104         #  @param theName Object name; when specified, this parameter is used
11105         #         for result publication in the study. Otherwise, if automatic
11106         #         publication is switched on, default value is used for result name.
11107         #
11108         #  @return a newly created GEOM group.
11109         #
11110         #  @ref tui_cut_groups_anchor "Example"
11111         def CutGroups (self, theGroup1, theGroup2, theName=None):
11112             """
11113             Cut of two groups.
11114             New group is created. It will contain entities which are
11115             present in group theGroup1 but are not present in group theGroup2.
11116
11117             Parameters:
11118                 theGroup1 is a GEOM group to include elements of.
11119                 theGroup2 is a GEOM group to exclude elements of.
11120                 theName Object name; when specified, this parameter is used
11121                         for result publication in the study. Otherwise, if automatic
11122                         publication is switched on, default value is used for result name.
11123
11124             Returns:
11125                 a newly created GEOM group.
11126             """
11127             # Example: see GEOM_TestOthers.py
11128             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11129             RaiseIfFailed("CutGroups", self.GroupOp)
11130             self._autoPublish(aGroup, theName, "group")
11131             return aGroup
11132
11133         ## Union of list of groups.
11134         #  New group is created. It will contain all entities that are
11135         #  present in groups listed in theGList.
11136         #  @param theGList is a list of GEOM groups to create the united group from.
11137         #  @param theName Object name; when specified, this parameter is used
11138         #         for result publication in the study. Otherwise, if automatic
11139         #         publication is switched on, default value is used for result name.
11140         #
11141         #  @return a newly created GEOM group.
11142         #
11143         #  @ref tui_union_groups_anchor "Example"
11144         def UnionListOfGroups (self, theGList, theName=None):
11145             """
11146             Union of list of groups.
11147             New group is created. It will contain all entities that are
11148             present in groups listed in theGList.
11149
11150             Parameters:
11151                 theGList is a list of GEOM groups to create the united group from.
11152                 theName Object name; when specified, this parameter is used
11153                         for result publication in the study. Otherwise, if automatic
11154                         publication is switched on, default value is used for result name.
11155
11156             Returns:
11157                 a newly created GEOM group.
11158             """
11159             # Example: see GEOM_TestOthers.py
11160             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11161             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11162             self._autoPublish(aGroup, theName, "group")
11163             return aGroup
11164
11165         ## Cut of lists of groups.
11166         #  New group is created. It will contain only entities
11167         #  which are present in groups listed in theGList1 but 
11168         #  are not present in groups from theGList2.
11169         #  @param theGList1 is a list of GEOM groups to include elements of.
11170         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11171         #  @param theName Object name; when specified, this parameter is used
11172         #         for result publication in the study. Otherwise, if automatic
11173         #         publication is switched on, default value is used for result name.
11174         #
11175         #  @return a newly created GEOM group.
11176         #
11177         #  @ref tui_intersect_groups_anchor "Example"
11178         def IntersectListOfGroups (self, theGList, theName=None):
11179             """
11180             Cut of lists of groups.
11181             New group is created. It will contain only entities
11182             which are present in groups listed in theGList1 but 
11183             are not present in groups from theGList2.
11184
11185             Parameters:
11186                 theGList1 is a list of GEOM groups to include elements of.
11187                 theGList2 is a list of GEOM groups to exclude elements of.
11188                 theName Object name; when specified, this parameter is used
11189                         for result publication in the study. Otherwise, if automatic
11190                         publication is switched on, default value is used for result name.
11191
11192             Returns:
11193                 a newly created GEOM group.
11194             """
11195             # Example: see GEOM_TestOthers.py
11196             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11197             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11198             self._autoPublish(aGroup, theName, "group")
11199             return aGroup
11200
11201         ## Cut of lists of groups.
11202         #  New group is created. It will contain only entities
11203         #  which are present in groups listed in theGList1 but 
11204         #  are not present in groups from theGList2.
11205         #  @param theGList1 is a list of GEOM groups to include elements of.
11206         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11207         #  @param 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         #  @return a newly created GEOM group.
11212         #
11213         #  @ref tui_cut_groups_anchor "Example"
11214         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11215             """
11216             Cut of lists of groups.
11217             New group is created. It will contain only entities
11218             which are present in groups listed in theGList1 but 
11219             are not present in groups from theGList2.
11220
11221             Parameters:
11222                 theGList1 is a list of GEOM groups to include elements of.
11223                 theGList2 is a list of GEOM groups to exclude elements of.
11224                 theName Object name; when specified, this parameter is used
11225                         for result publication in the study. Otherwise, if automatic
11226                         publication is switched on, default value is used for result name.
11227
11228             Returns:
11229                 a newly created GEOM group.
11230             """
11231             # Example: see GEOM_TestOthers.py
11232             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11233             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11234             self._autoPublish(aGroup, theName, "group")
11235             return aGroup
11236
11237         ## Returns a list of sub-objects ID stored in the group
11238         #  @param theGroup is a GEOM group for which a list of IDs is requested
11239         #
11240         #  @ref swig_GetObjectIDs "Example"
11241         def GetObjectIDs(self,theGroup):
11242             """
11243             Returns a list of sub-objects ID stored in the group
11244
11245             Parameters:
11246                 theGroup is a GEOM group for which a list of IDs is requested
11247             """
11248             # Example: see GEOM_TestOthers.py
11249             ListIDs = self.GroupOp.GetObjects(theGroup)
11250             RaiseIfFailed("GetObjects", self.GroupOp)
11251             return ListIDs
11252
11253         ## Returns a type of sub-objects stored in the group
11254         #  @param theGroup is a GEOM group which type is returned.
11255         #
11256         #  @ref swig_GetType "Example"
11257         def GetType(self,theGroup):
11258             """
11259             Returns a type of sub-objects stored in the group
11260
11261             Parameters:
11262                 theGroup is a GEOM group which type is returned.
11263             """
11264             # Example: see GEOM_TestOthers.py
11265             aType = self.GroupOp.GetType(theGroup)
11266             RaiseIfFailed("GetType", self.GroupOp)
11267             return aType
11268
11269         ## Convert a type of geom object from id to string value
11270         #  @param theId is a GEOM obect type id.
11271         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11272         #  @ref swig_GetType "Example"
11273         def ShapeIdToType(self, theId):
11274             """
11275             Convert a type of geom object from id to string value
11276
11277             Parameters:
11278                 theId is a GEOM obect type id.
11279                 
11280             Returns:
11281                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11282             """
11283             if theId == 0:
11284                 return "COPY"
11285             if theId == 1:
11286                 return "IMPORT"
11287             if theId == 2:
11288                 return "POINT"
11289             if theId == 3:
11290                 return "VECTOR"
11291             if theId == 4:
11292                 return "PLANE"
11293             if theId == 5:
11294                 return "LINE"
11295             if theId == 6:
11296                 return "TORUS"
11297             if theId == 7:
11298                 return "BOX"
11299             if theId == 8:
11300                 return "CYLINDER"
11301             if theId == 9:
11302                 return "CONE"
11303             if theId == 10:
11304                 return "SPHERE"
11305             if theId == 11:
11306                 return "PRISM"
11307             if theId == 12:
11308                 return "REVOLUTION"
11309             if theId == 13:
11310                 return "BOOLEAN"
11311             if theId == 14:
11312                 return "PARTITION"
11313             if theId == 15:
11314                 return "POLYLINE"
11315             if theId == 16:
11316                 return "CIRCLE"
11317             if theId == 17:
11318                 return "SPLINE"
11319             if theId == 18:
11320                 return "ELLIPSE"
11321             if theId == 19:
11322                 return "CIRC_ARC"
11323             if theId == 20:
11324                 return "FILLET"
11325             if theId == 21:
11326                 return "CHAMFER"
11327             if theId == 22:
11328                 return "EDGE"
11329             if theId == 23:
11330                 return "WIRE"
11331             if theId == 24:
11332                 return "FACE"
11333             if theId == 25:
11334                 return "SHELL"
11335             if theId == 26:
11336                 return "SOLID"
11337             if theId == 27:
11338                 return "COMPOUND"
11339             if theId == 28:
11340                 return "SUBSHAPE"
11341             if theId == 29:
11342                 return "PIPE"
11343             if theId == 30:
11344                 return "ARCHIMEDE"
11345             if theId == 31:
11346                 return "FILLING"
11347             if theId == 32:
11348                 return "EXPLODE"
11349             if theId == 33:
11350                 return "GLUED"
11351             if theId == 34:
11352                 return "SKETCHER"
11353             if theId == 35:
11354                 return "CDG"
11355             if theId == 36:
11356                 return "FREE_BOUNDS"
11357             if theId == 37:
11358                 return "GROUP"
11359             if theId == 38:
11360                 return "BLOCK"
11361             if theId == 39:
11362                 return "MARKER"
11363             if theId == 40:
11364                 return "THRUSECTIONS"
11365             if theId == 41:
11366                 return "COMPOUNDFILTER"
11367             if theId == 42:
11368                 return "SHAPES_ON_SHAPE"
11369             if theId == 43:
11370                 return "ELLIPSE_ARC"
11371             if theId == 44:
11372                 return "3DSKETCHER"
11373             if theId == 45:
11374                 return "FILLET_2D"
11375             if theId == 46:
11376                 return "FILLET_1D"
11377             if theId == 201:
11378                 return "PIPETSHAPE"
11379             return "Shape Id not exist."
11380
11381         ## Returns a main shape associated with the group
11382         #  @param theGroup is a GEOM group for which a main shape object is requested
11383         #  @return a GEOM object which is a main shape for theGroup
11384         #
11385         #  @ref swig_GetMainShape "Example"
11386         def GetMainShape(self,theGroup):
11387             """
11388             Returns a main shape associated with the group
11389
11390             Parameters:
11391                 theGroup is a GEOM group for which a main shape object is requested
11392
11393             Returns:
11394                 a GEOM object which is a main shape for theGroup
11395
11396             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11397             """
11398             # Example: see GEOM_TestOthers.py
11399             anObj = self.GroupOp.GetMainShape(theGroup)
11400             RaiseIfFailed("GetMainShape", self.GroupOp)
11401             return anObj
11402
11403         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11404         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11405         #  @param theShape given shape (see GEOM.GEOM_Object)
11406         #  @param min_length minimum length of edges of theShape
11407         #  @param max_length maximum length of edges of theShape
11408         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11409         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11410         #  @param theName Object name; when specified, this parameter is used
11411         #         for result publication in the study. Otherwise, if automatic
11412         #         publication is switched on, default value is used for result name.
11413         #
11414         #  @return a newly created GEOM group of edges
11415         #
11416         #  @@ref swig_todo "Example"
11417         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11418             """
11419             Create group of edges of theShape, whose length is in range [min_length, max_length].
11420             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11421
11422             Parameters:
11423                 theShape given shape
11424                 min_length minimum length of edges of theShape
11425                 max_length maximum length of edges of theShape
11426                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11427                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
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                 a newly created GEOM group of edges.
11434             """
11435             edges = self.SubShapeAll(theShape, ShapeType["EDGE"])
11436             edges_in_range = []
11437             for edge in edges:
11438                 Props = self.BasicProperties(edge)
11439                 if min_length <= Props[0] and Props[0] <= max_length:
11440                     if (not include_min) and (min_length == Props[0]):
11441                         skip = 1
11442                     else:
11443                         if (not include_max) and (Props[0] == max_length):
11444                             skip = 1
11445                         else:
11446                             edges_in_range.append(edge)
11447
11448             if len(edges_in_range) <= 0:
11449                 print "No edges found by given criteria"
11450                 return None
11451
11452             # note: auto-publishing is done in self.CreateGroup()
11453             group_edges = self.CreateGroup(theShape, ShapeType["EDGE"], theName)
11454             self.UnionList(group_edges, edges_in_range)
11455
11456             return group_edges
11457
11458         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11459         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11460         #  @param min_length minimum length of edges of selected shape
11461         #  @param max_length maximum length of edges of selected shape
11462         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11463         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11464         #  @return a newly created GEOM group of edges
11465         #  @ref swig_todo "Example"
11466         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11467             """
11468             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11469             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11470
11471             Parameters:
11472                 min_length minimum length of edges of selected shape
11473                 max_length maximum length of edges of selected shape
11474                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11475                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11476
11477              Returns:
11478                 a newly created GEOM group of edges.
11479             """
11480             nb_selected = sg.SelectedCount()
11481             if nb_selected < 1:
11482                 print "Select a shape before calling this function, please."
11483                 return 0
11484             if nb_selected > 1:
11485                 print "Only one shape must be selected"
11486                 return 0
11487
11488             id_shape = sg.getSelected(0)
11489             shape = IDToObject( id_shape )
11490
11491             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11492
11493             left_str  = " < "
11494             right_str = " < "
11495             if include_min: left_str  = " <= "
11496             if include_max: right_str  = " <= "
11497
11498             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11499                                     + left_str + "length" + right_str + `max_length`)
11500
11501             sg.updateObjBrowser(1)
11502
11503             return group_edges
11504
11505         # end of l3_groups
11506         ## @}
11507
11508         ## @addtogroup l4_advanced
11509         ## @{
11510
11511         ## Create a T-shape object with specified caracteristics for the main
11512         #  and the incident pipes (radius, width, half-length).
11513         #  The extremities of the main pipe are located on junctions points P1 and P2.
11514         #  The extremity of the incident pipe is located on junction point P3.
11515         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11516         #  the main plane of the T-shape is XOY.
11517         #
11518         #  @param theR1 Internal radius of main pipe
11519         #  @param theW1 Width of main pipe
11520         #  @param theL1 Half-length of main pipe
11521         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11522         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11523         #  @param theL2 Half-length of incident pipe
11524         #
11525         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11526         #  @param theP1 1st junction point of main pipe
11527         #  @param theP2 2nd junction point of main pipe
11528         #  @param theP3 Junction point of incident pipe
11529         #
11530         #  @param theRL Internal radius of left thickness reduction
11531         #  @param theWL Width of left thickness reduction
11532         #  @param theLtransL Length of left transition part
11533         #  @param theLthinL Length of left thin part
11534         #
11535         #  @param theRR Internal radius of right thickness reduction
11536         #  @param theWR Width of right thickness reduction
11537         #  @param theLtransR Length of right transition part
11538         #  @param theLthinR Length of right thin part
11539         #
11540         #  @param theRI Internal radius of incident thickness reduction
11541         #  @param theWI Width of incident thickness reduction
11542         #  @param theLtransI Length of incident transition part
11543         #  @param theLthinI Length of incident thin part
11544         #
11545         #  @param theName Object name; when specified, this parameter is used
11546         #         for result publication in the study. Otherwise, if automatic
11547         #         publication is switched on, default value is used for result name.
11548         #
11549         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11550         #
11551         #  @ref tui_creation_pipetshape "Example"
11552         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11553                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11554                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11555                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11556                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11557                             theName=None):
11558             """
11559             Create a T-shape object with specified caracteristics for the main
11560             and the incident pipes (radius, width, half-length).
11561             The extremities of the main pipe are located on junctions points P1 and P2.
11562             The extremity of the incident pipe is located on junction point P3.
11563             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11564             the main plane of the T-shape is XOY.
11565
11566             Parameters:
11567                 theR1 Internal radius of main pipe
11568                 theW1 Width of main pipe
11569                 theL1 Half-length of main pipe
11570                 theR2 Internal radius of incident pipe (R2 < R1)
11571                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11572                 theL2 Half-length of incident pipe
11573                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11574                 theP1 1st junction point of main pipe
11575                 theP2 2nd junction point of main pipe
11576                 theP3 Junction point of incident pipe
11577
11578                 theRL Internal radius of left thickness reduction
11579                 theWL Width of left thickness reduction
11580                 theLtransL Length of left transition part
11581                 theLthinL Length of left thin part
11582
11583                 theRR Internal radius of right thickness reduction
11584                 theWR Width of right thickness reduction
11585                 theLtransR Length of right transition part
11586                 theLthinR Length of right thin part
11587
11588                 theRI Internal radius of incident thickness reduction
11589                 theWI Width of incident thickness reduction
11590                 theLtransI Length of incident transition part
11591                 theLthinI Length of incident thin part
11592
11593                 theName Object name; when specified, this parameter is used
11594                         for result publication in the study. Otherwise, if automatic
11595                         publication is switched on, default value is used for result name.
11596
11597             Returns:
11598                 List of GEOM_Object, containing the created shape and propagation groups.
11599
11600             Example of usage:
11601                 # create PipeTShape object
11602                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11603                 # create PipeTShape object with position
11604                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11605                 # create PipeTShape object with left thickness reduction
11606                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11607             """
11608             theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11609             if (theP1 and theP2 and theP3):
11610                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11611                                                                 theRL, theWL, theLtransL, theLthinL,
11612                                                                 theRR, theWR, theLtransR, theLthinR,
11613                                                                 theRI, theWI, theLtransI, theLthinI,
11614                                                                 theHexMesh, theP1, theP2, theP3)
11615             else:
11616                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11617                                                     theRL, theWL, theLtransL, theLthinL,
11618                                                     theRR, theWR, theLtransR, theLthinR,
11619                                                     theRI, theWI, theLtransI, theLthinI,
11620                                                     theHexMesh)
11621             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11622             if Parameters: anObj[0].SetParameters(Parameters)
11623             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11624             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11625             return anObj
11626
11627         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11628         #  and the incident pipes (radius, width, half-length). The chamfer is
11629         #  created on the junction of the pipes.
11630         #  The extremities of the main pipe are located on junctions points P1 and P2.
11631         #  The extremity of the incident pipe is located on junction point P3.
11632         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11633         #  the main plane of the T-shape is XOY.
11634         #  @param theR1 Internal radius of main pipe
11635         #  @param theW1 Width of main pipe
11636         #  @param theL1 Half-length of main pipe
11637         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11638         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11639         #  @param theL2 Half-length of incident pipe
11640         #  @param theH Height of the chamfer.
11641         #  @param theW Width of the chamfer.
11642         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11643         #  @param theP1 1st junction point of main pipe
11644         #  @param theP2 2nd junction point of main pipe
11645         #  @param theP3 Junction point of incident pipe
11646         #
11647         #  @param theRL Internal radius of left thickness reduction
11648         #  @param theWL Width of left thickness reduction
11649         #  @param theLtransL Length of left transition part
11650         #  @param theLthinL Length of left thin part
11651         #
11652         #  @param theRR Internal radius of right thickness reduction
11653         #  @param theWR Width of right thickness reduction
11654         #  @param theLtransR Length of right transition part
11655         #  @param theLthinR Length of right thin part
11656         #
11657         #  @param theRI Internal radius of incident thickness reduction
11658         #  @param theWI Width of incident thickness reduction
11659         #  @param theLtransI Length of incident transition part
11660         #  @param theLthinI Length of incident thin part
11661         #
11662         #  @param 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         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11667         #
11668         #  @ref tui_creation_pipetshape "Example"
11669         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11670                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11671                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11672                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11673                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11674                                    theName=None):
11675             """
11676             Create a T-shape object with chamfer and with specified caracteristics for the main
11677             and the incident pipes (radius, width, half-length). The chamfer is
11678             created on the junction of the pipes.
11679             The extremities of the main pipe are located on junctions points P1 and P2.
11680             The extremity of the incident pipe is located on junction point P3.
11681             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11682             the main plane of the T-shape is XOY.
11683
11684             Parameters:
11685                 theR1 Internal radius of main pipe
11686                 theW1 Width of main pipe
11687                 theL1 Half-length of main pipe
11688                 theR2 Internal radius of incident pipe (R2 < R1)
11689                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11690                 theL2 Half-length of incident pipe
11691                 theH Height of the chamfer.
11692                 theW Width of the chamfer.
11693                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11694                 theP1 1st junction point of main pipe
11695                 theP2 2nd junction point of main pipe
11696                 theP3 Junction point of incident pipe
11697
11698                 theRL Internal radius of left thickness reduction
11699                 theWL Width of left thickness reduction
11700                 theLtransL Length of left transition part
11701                 theLthinL Length of left thin part
11702
11703                 theRR Internal radius of right thickness reduction
11704                 theWR Width of right thickness reduction
11705                 theLtransR Length of right transition part
11706                 theLthinR Length of right thin part
11707
11708                 theRI Internal radius of incident thickness reduction
11709                 theWI Width of incident thickness reduction
11710                 theLtransI Length of incident transition part
11711                 theLthinI Length of incident thin part
11712
11713                 theName Object name; when specified, this parameter is used
11714                         for result publication in the study. Otherwise, if automatic
11715                         publication is switched on, default value is used for result name.
11716
11717             Returns:
11718                 List of GEOM_Object, containing the created shape and propagation groups.
11719
11720             Example of usage:
11721                 # create PipeTShape with chamfer object
11722                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
11723                 # create PipeTShape with chamfer object with position
11724                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
11725                 # create PipeTShape with chamfer object with left thickness reduction
11726                 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11727             """
11728             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11729             if (theP1 and theP2 and theP3):
11730               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11731                                                                      theRL, theWL, theLtransL, theLthinL,
11732                                                                      theRR, theWR, theLtransR, theLthinR,
11733                                                                      theRI, theWI, theLtransI, theLthinI,
11734                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
11735             else:
11736               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
11737                                                          theRL, theWL, theLtransL, theLthinL,
11738                                                          theRR, theWR, theLtransR, theLthinR,
11739                                                          theRI, theWI, theLtransI, theLthinI,
11740                                                          theH, theW, theHexMesh)
11741             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
11742             if Parameters: anObj[0].SetParameters(Parameters)
11743             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11744             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11745             return anObj
11746
11747         ## Create a T-shape object with fillet and with specified caracteristics for the main
11748         #  and the incident pipes (radius, width, half-length). The fillet is
11749         #  created on the junction of the pipes.
11750         #  The extremities of the main pipe are located on junctions points P1 and P2.
11751         #  The extremity of the incident pipe is located on junction point P3.
11752         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11753         #  the main plane of the T-shape is XOY.
11754         #  @param theR1 Internal radius of main pipe
11755         #  @param theW1 Width of main pipe
11756         #  @param theL1 Half-length of main pipe
11757         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11758         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11759         #  @param theL2 Half-length of incident pipe
11760         #  @param theRF Radius of curvature of fillet.
11761         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11762         #  @param theP1 1st junction point of main pipe
11763         #  @param theP2 2nd junction point of main pipe
11764         #  @param theP3 Junction point of incident pipe
11765         #
11766         #  @param theRL Internal radius of left thickness reduction
11767         #  @param theWL Width of left thickness reduction
11768         #  @param theLtransL Length of left transition part
11769         #  @param theLthinL Length of left thin part
11770         #
11771         #  @param theRR Internal radius of right thickness reduction
11772         #  @param theWR Width of right thickness reduction
11773         #  @param theLtransR Length of right transition part
11774         #  @param theLthinR Length of right thin part
11775         #
11776         #  @param theRI Internal radius of incident thickness reduction
11777         #  @param theWI Width of incident thickness reduction
11778         #  @param theLtransI Length of incident transition part
11779         #  @param theLthinI Length of incident thin part
11780         #
11781         #  @param theName Object name; when specified, this parameter is used
11782         #         for result publication in the study. Otherwise, if automatic
11783         #         publication is switched on, default value is used for result name.
11784         #
11785         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11786         #
11787         #  @ref tui_creation_pipetshape "Example"
11788         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
11789                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11790                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11791                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11792                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11793                                   theName=None):
11794             """
11795             Create a T-shape object with fillet and with specified caracteristics for the main
11796             and the incident pipes (radius, width, half-length). The fillet is
11797             created on the junction of the pipes.
11798             The extremities of the main pipe are located on junctions points P1 and P2.
11799             The extremity of the incident pipe is located on junction point P3.
11800
11801             Parameters:
11802                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11803                 the main plane of the T-shape is XOY.
11804                 theR1 Internal radius of main pipe
11805                 theW1 Width of main pipe
11806                 heL1 Half-length of main pipe
11807                 theR2 Internal radius of incident pipe (R2 < R1)
11808                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11809                 theL2 Half-length of incident pipe
11810                 theRF Radius of curvature of fillet.
11811                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11812                 theP1 1st junction point of main pipe
11813                 theP2 2nd junction point of main pipe
11814                 theP3 Junction point of incident pipe
11815
11816                 theRL Internal radius of left thickness reduction
11817                 theWL Width of left thickness reduction
11818                 theLtransL Length of left transition part
11819                 theLthinL Length of left thin part
11820
11821                 theRR Internal radius of right thickness reduction
11822                 theWR Width of right thickness reduction
11823                 theLtransR Length of right transition part
11824                 theLthinR Length of right thin part
11825
11826                 theRI Internal radius of incident thickness reduction
11827                 theWI Width of incident thickness reduction
11828                 theLtransI Length of incident transition part
11829                 theLthinI Length of incident thin part
11830
11831                 theName Object name; when specified, this parameter is used
11832                         for result publication in the study. Otherwise, if automatic
11833                         publication is switched on, default value is used for result name.
11834                 
11835             Returns:
11836                 List of GEOM_Object, containing the created shape and propagation groups.
11837                 
11838             Example of usage:
11839                 # create PipeTShape with fillet object
11840                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
11841                 # create PipeTShape with fillet object with position
11842                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
11843                 # create PipeTShape with fillet object with left thickness reduction
11844                 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11845             """
11846             theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11847             if (theP1 and theP2 and theP3):
11848               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11849                                                                     theRL, theWL, theLtransL, theLthinL,
11850                                                                     theRR, theWR, theLtransR, theLthinR,
11851                                                                     theRI, theWI, theLtransI, theLthinI,
11852                                                                     theRF, theHexMesh, theP1, theP2, theP3)
11853             else:
11854               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
11855                                                         theRL, theWL, theLtransL, theLthinL,
11856                                                         theRR, theWR, theLtransR, theLthinR,
11857                                                         theRI, theWI, theLtransI, theLthinI,
11858                                                         theRF, theHexMesh)
11859             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
11860             if Parameters: anObj[0].SetParameters(Parameters)
11861             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11862             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11863             return anObj
11864
11865         ## This function allows creating a disk already divided into blocks. It
11866         #  can be used to create divided pipes for later meshing in hexaedra.
11867         #  @param theR Radius of the disk
11868         #  @param theOrientation Orientation of the plane on which the disk will be built
11869         #         1 = XOY, 2 = OYZ, 3 = OZX
11870         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11871         #  @param theName Object name; when specified, this parameter is used
11872         #         for result publication in the study. Otherwise, if automatic
11873         #         publication is switched on, default value is used for result name.
11874         #
11875         #  @return New GEOM_Object, containing the created shape.
11876         #
11877         #  @ref tui_creation_divideddisk "Example"
11878         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
11879             """
11880             Creates a disk, divided into blocks. It can be used to create divided pipes
11881             for later meshing in hexaedra.
11882
11883             Parameters:
11884                 theR Radius of the disk
11885                 theOrientation Orientation of the plane on which the disk will be built:
11886                                1 = XOY, 2 = OYZ, 3 = OZX
11887                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11888                 theName Object name; when specified, this parameter is used
11889                         for result publication in the study. Otherwise, if automatic
11890                         publication is switched on, default value is used for result name.
11891
11892             Returns:
11893                 New GEOM_Object, containing the created shape.
11894             """
11895             theR, Parameters = ParseParameters(theR)
11896             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
11897             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
11898             if Parameters: anObj.SetParameters(Parameters)
11899             self._autoPublish(anObj, theName, "dividedDisk")
11900             return anObj
11901             
11902         ## This function allows creating a disk already divided into blocks. It
11903         #  can be used to create divided pipes for later meshing in hexaedra.
11904         #  @param theCenter Center of the disk
11905         #  @param theVector Normal vector to the plane of the created disk
11906         #  @param theRadius Radius of the disk
11907         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
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 New GEOM_Object, containing the created shape.
11913         #
11914         #  @ref tui_creation_divideddisk "Example"
11915         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
11916             """
11917             Creates a disk already divided into blocks. It can be used to create divided pipes
11918             for later meshing in hexaedra.
11919
11920             Parameters:
11921                 theCenter Center of the disk
11922                 theVector Normal vector to the plane of the created disk
11923                 theRadius Radius of the disk
11924                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
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                 New GEOM_Object, containing the created shape.
11931             """
11932             theRadius, Parameters = ParseParameters(theRadius)
11933             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
11934             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
11935             if Parameters: anObj.SetParameters(Parameters)
11936             self._autoPublish(anObj, theName, "dividedDisk")
11937             return anObj
11938
11939         ## Builds a cylinder prepared for hexa meshes
11940         #  @param theR Radius of the cylinder
11941         #  @param theH Height of the cylinder
11942         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11943         #  @param theName Object name; when specified, this parameter is used
11944         #         for result publication in the study. Otherwise, if automatic
11945         #         publication is switched on, default value is used for result name.
11946         #
11947         #  @return New GEOM_Object, containing the created shape.
11948         #
11949         #  @ref tui_creation_dividedcylinder "Example"
11950         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
11951             """
11952             Builds a cylinder prepared for hexa meshes
11953
11954             Parameters:
11955                 theR Radius of the cylinder
11956                 theH Height of the cylinder
11957                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
11958                 theName Object name; when specified, this parameter is used
11959                         for result publication in the study. Otherwise, if automatic
11960                         publication is switched on, default value is used for result name.
11961
11962             Returns:
11963                 New GEOM_Object, containing the created shape.
11964             """
11965             theR, theH, Parameters = ParseParameters(theR, theH)
11966             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
11967             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
11968             if Parameters: anObj.SetParameters(Parameters)
11969             self._autoPublish(anObj, theName, "dividedCylinder")
11970             return anObj
11971
11972         #@@ insert new functions before this line @@ do not remove this line @@#
11973
11974         # end of l4_advanced
11975         ## @}
11976
11977         ## Create a copy of the given object
11978         #
11979         #  @param theOriginal geometry object for copy
11980         #  @param theName Object name; when specified, this parameter is used
11981         #         for result publication in the study. Otherwise, if automatic
11982         #         publication is switched on, default value is used for result name.
11983         #
11984         #  @return New GEOM_Object, containing the copied shape.
11985         #
11986         #  @ingroup l1_geompy_auxiliary
11987         #  @ref swig_MakeCopy "Example"
11988         def MakeCopy(self, theOriginal, theName=None):
11989             """
11990             Create a copy of the given object
11991
11992             Parameters:
11993                 theOriginal geometry object for copy
11994                 theName Object name; when specified, this parameter is used
11995                         for result publication in the study. Otherwise, if automatic
11996                         publication is switched on, default value is used for result name.
11997
11998             Returns:
11999                 New GEOM_Object, containing the copied shape.
12000
12001             Example of usage: Copy = geompy.MakeCopy(Box)
12002             """
12003             # Example: see GEOM_TestAll.py
12004             anObj = self.InsertOp.MakeCopy(theOriginal)
12005             RaiseIfFailed("MakeCopy", self.InsertOp)
12006             self._autoPublish(anObj, theName, "copy")
12007             return anObj
12008
12009         ## Add Path to load python scripts from
12010         #  @param Path a path to load python scripts from
12011         #  @ingroup l1_geompy_auxiliary
12012         def addPath(self,Path):
12013             """
12014             Add Path to load python scripts from
12015
12016             Parameters:
12017                 Path a path to load python scripts from
12018             """
12019             if (sys.path.count(Path) < 1):
12020                 sys.path.append(Path)
12021                 pass
12022             pass
12023
12024         ## Load marker texture from the file
12025         #  @param Path a path to the texture file
12026         #  @return unique texture identifier
12027         #  @ingroup l1_geompy_auxiliary
12028         def LoadTexture(self, Path):
12029             """
12030             Load marker texture from the file
12031             
12032             Parameters:
12033                 Path a path to the texture file
12034                 
12035             Returns:
12036                 unique texture identifier
12037             """
12038             # Example: see GEOM_TestAll.py
12039             ID = self.InsertOp.LoadTexture(Path)
12040             RaiseIfFailed("LoadTexture", self.InsertOp)
12041             return ID
12042
12043         ## Get internal name of the object based on its study entry
12044         #  @note This method does not provide an unique identifier of the geometry object.
12045         #  @note This is internal function of GEOM component, though it can be used outside it for 
12046         #  appropriate reason (e.g. for identification of geometry object).
12047         #  @param obj geometry object
12048         #  @return unique object identifier
12049         #  @ingroup l1_geompy_auxiliary
12050         def getObjectID(self, obj):
12051             """
12052             Get internal name of the object based on its study entry.
12053             Note: this method does not provide an unique identifier of the geometry object.
12054             It is an internal function of GEOM component, though it can be used outside GEOM for 
12055             appropriate reason (e.g. for identification of geometry object).
12056
12057             Parameters:
12058                 obj geometry object
12059
12060             Returns:
12061                 unique object identifier
12062             """
12063             ID = ""
12064             entry = salome.ObjectToID(obj)
12065             if entry is not None:
12066                 lst = entry.split(":")
12067                 if len(lst) > 0:
12068                     ID = lst[-1] # -1 means last item in the list            
12069                     return "GEOM_" + ID
12070             return ID
12071                 
12072             
12073
12074         ## Add marker texture. @a Width and @a Height parameters
12075         #  specify width and height of the texture in pixels.
12076         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12077         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12078         #  parameter should be unpacked string, in which '1' symbols represent opaque
12079         #  pixels and '0' represent transparent pixels of the texture bitmap.
12080         #
12081         #  @param Width texture width in pixels
12082         #  @param Height texture height in pixels
12083         #  @param Texture texture data
12084         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12085         #  @return unique texture identifier
12086         #  @ingroup l1_geompy_auxiliary
12087         def AddTexture(self, Width, Height, Texture, RowData=False):
12088             """
12089             Add marker texture. Width and Height parameters
12090             specify width and height of the texture in pixels.
12091             If RowData is True, Texture parameter should represent texture data
12092             packed into the byte array. If RowData is False (default), Texture
12093             parameter should be unpacked string, in which '1' symbols represent opaque
12094             pixels and '0' represent transparent pixels of the texture bitmap.
12095
12096             Parameters:
12097                 Width texture width in pixels
12098                 Height texture height in pixels
12099                 Texture texture data
12100                 RowData if True, Texture data are packed in the byte stream
12101
12102             Returns:
12103                 return unique texture identifier
12104             """
12105             if not RowData: Texture = PackData(Texture)
12106             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12107             RaiseIfFailed("AddTexture", self.InsertOp)
12108             return ID
12109
12110 import omniORB
12111 #Register the new proxy for GEOM_Gen
12112 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geompyDC)