]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geompyDC.py
Salome HOME
0021672: [CEA 565] Dump Study from script
[modules/geom.git] / src / GEOM_SWIG / geompyDC.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2012  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 ## @defgroup l1_geompy_auxiliary Auxiliary data structures and methods
30
31 ## @defgroup l1_geompy_purpose   All package methods, grouped by their purpose
32 ## @{
33 ##   @defgroup l2_import_export Importing/exporting geometrical objects
34 ##   @defgroup l2_creating      Creating geometrical objects
35 ##   @{
36 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
37 ##     @{
38 ##       @defgroup l4_curves        Creating Curves
39
40 ##     @}
41 ##     @defgroup l3_3d_primitives Creating 3D Primitives
42 ##     @defgroup l3_complex       Creating Complex Objects
43 ##     @defgroup l3_groups        Working with groups
44 ##     @defgroup l3_blocks        Building by blocks
45 ##     @{
46 ##       @defgroup l4_blocks_measure Check and Improve
47
48 ##     @}
49 ##     @defgroup l3_sketcher      Sketcher
50 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
51 ##     @{
52 ##       @defgroup l4_decompose     Decompose objects
53 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
54 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
55 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
56 ##       @defgroup l4_advanced      Advanced objects creation functions
57
58 ##     @}
59
60 ##   @}
61 ##   @defgroup l2_transforming  Transforming geometrical objects
62 ##   @{
63 ##     @defgroup l3_basic_op      Basic Operations
64 ##     @defgroup l3_boolean       Boolean Operations
65 ##     @defgroup l3_transform     Transformation Operations
66 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
67 ##     @defgroup l3_blocks_op     Blocks Operations
68 ##     @defgroup l3_healing       Repairing Operations
69 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
70
71 ##   @}
72 ##   @defgroup l2_measure       Using measurement tools
73
74 ## @}
75
76 import salome
77 salome.salome_init()
78 from salome import *
79
80 from salome_notebook import *
81
82 import GEOM
83 import math
84 import os
85
86 ## Enumeration ShapeType as a dictionary. \n
87 ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
88 #  @ingroup l1_geompy_auxiliary
89 ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
90
91 ## Raise an Error, containing the Method_name, if Operation is Failed
92 ## @ingroup l1_geompy_auxiliary
93 def RaiseIfFailed (Method_name, Operation):
94     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
95         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
96
97 ## Return list of variables value from salome notebook
98 ## @ingroup l1_geompy_auxiliary
99 def ParseParameters(*parameters):
100     Result = []
101     StringResult = []
102     for parameter in parameters:
103         if isinstance(parameter, list):
104             lResults = ParseParameters(*parameter)
105             if len(lResults) > 0:
106                 Result.append(lResults[:-1])
107                 StringResult += lResults[-1].split(":")
108                 pass
109             pass
110         else:
111             if isinstance(parameter,str):
112                 if notebook.isVariable(parameter):
113                     Result.append(notebook.get(parameter))
114                 else:
115                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
116                 pass
117             else:
118                 Result.append(parameter)
119                 pass
120             StringResult.append(str(parameter))
121             pass
122         pass
123     if Result:
124         Result.append(":".join(StringResult))
125     else:
126         Result = ":".join(StringResult)
127     return Result
128
129 ## Return list of variables value from salome notebook
130 ## @ingroup l1_geompy_auxiliary
131 def ParseList(list):
132     Result = []
133     StringResult = ""
134     for parameter in list:
135         if isinstance(parameter,str) and notebook.isVariable(parameter):
136             Result.append(str(notebook.get(parameter)))
137             pass
138         else:
139             Result.append(str(parameter))
140             pass
141
142         StringResult = StringResult + str(parameter)
143         StringResult = StringResult + ":"
144         pass
145     StringResult = StringResult[:len(StringResult)-1]
146     return Result, StringResult
147
148 ## Return list of variables value from salome notebook
149 ## @ingroup l1_geompy_auxiliary
150 def ParseSketcherCommand(command):
151     Result = ""
152     StringResult = ""
153     sections = command.split(":")
154     for section in sections:
155         parameters = section.split(" ")
156         paramIndex = 1
157         for parameter in parameters:
158             if paramIndex > 1 and parameter.find("'") != -1:
159                 parameter = parameter.replace("'","")
160                 if notebook.isVariable(parameter):
161                     Result = Result + str(notebook.get(parameter)) + " "
162                     pass
163                 else:
164                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
165                     pass
166                 pass
167             else:
168                 Result = Result + str(parameter) + " "
169                 pass
170             if paramIndex > 1:
171                 StringResult = StringResult + parameter
172                 StringResult = StringResult + ":"
173                 pass
174             paramIndex = paramIndex + 1
175             pass
176         Result = Result[:len(Result)-1] + ":"
177         pass
178     Result = Result[:len(Result)-1]
179     return Result, StringResult
180
181 ## Helper function which can be used to pack the passed string to the byte data.
182 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
183 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
184 ## For example,
185 ## \code
186 ## val = PackData("10001110") # val = 0xAE
187 ## val = PackData("1")        # val = 0x80
188 ## \endcode
189 ## @param data unpacked data - a string containing '1' and '0' symbols
190 ## @return data packed to the byte stream
191 ## @ingroup l1_geompy_auxiliary
192 def PackData(data):
193     """
194     Helper function which can be used to pack the passed string to the byte data.
195     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
196     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
197
198     Parameters:
199         data unpacked data - a string containing '1' and '0' symbols
200
201     Returns:
202         data packed to the byte stream
203         
204     Example of usage:
205         val = PackData("10001110") # val = 0xAE
206         val = PackData("1")        # val = 0x80
207     """
208     bytes = len(data)/8
209     if len(data)%8: bytes += 1
210     res = ""
211     for b in range(bytes):
212         d = data[b*8:(b+1)*8]
213         val = 0
214         for i in range(8):
215             val *= 2
216             if i < len(d):
217                 if d[i] == "1": val += 1
218                 elif d[i] != "0":
219                     raise "Invalid symbol %s" % d[i]
220                 pass
221             pass
222         res += chr(val)
223         pass
224     return res
225
226 ## Read bitmap texture from the text file.
227 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
228 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
229 ## The function returns width and height of the pixmap in pixels and byte stream representing
230 ## texture bitmap itself.
231 ##
232 ## This function can be used to read the texture to the byte stream in order to pass it to
233 ## the AddTexture() function of geompy class.
234 ## For example,
235 ## \code
236 ## import geompy
237 ## geompy.init_geom(salome.myStudy)
238 ## texture = geompy.readtexture('mytexture.dat')
239 ## texture = geompy.AddTexture(*texture)
240 ## obj.SetMarkerTexture(texture)
241 ## \endcode
242 ## @param fname texture file name
243 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
244 ## @ingroup l1_geompy_auxiliary
245 def ReadTexture(fname):
246     """
247     Read bitmap texture from the text file.
248     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
249     A zero symbol ('0') represents transparent pixel of the texture bitmap.
250     The function returns width and height of the pixmap in pixels and byte stream representing
251     texture bitmap itself.
252     This function can be used to read the texture to the byte stream in order to pass it to
253     the AddTexture() function of geompy class.
254     
255     Parameters:
256         fname texture file name
257
258     Returns:
259         sequence of tree values: texture's width, height in pixels and its byte stream
260     
261     Example of usage:
262         import geompy
263         geompy.init_geom(salome.myStudy)
264         texture = geompy.readtexture('mytexture.dat')
265         texture = geompy.AddTexture(*texture)
266         obj.SetMarkerTexture(texture)
267     """
268     try:
269         f = open(fname)
270         lines = [ l.strip() for l in f.readlines()]
271         f.close()
272         maxlen = 0
273         if lines: maxlen = max([len(x) for x in lines])
274         lenbytes = maxlen/8
275         if maxlen%8: lenbytes += 1
276         bytedata=""
277         for line in lines:
278             if len(line)%8:
279                 lenline = (len(line)/8+1)*8
280                 pass
281             else:
282                 lenline = (len(line)/8)*8
283                 pass
284             for i in range(lenline/8):
285                 byte=""
286                 for j in range(8):
287                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
288                     else: byte += "0"
289                     pass
290                 bytedata += PackData(byte)
291                 pass
292             for i in range(lenline/8, lenbytes):
293                 bytedata += PackData("0")
294             pass
295         return lenbytes*8, len(lines), bytedata
296     except:
297         pass
298     return 0, 0, ""
299
300 ## Returns a long value from enumeration type
301 #  Can be used for CORBA enumerator types like GEOM.shape_type
302 #  @param theItem enumeration type
303 #  @ingroup l1_geompy_auxiliary
304 def EnumToLong(theItem):
305     """
306     Returns a long value from enumeration type
307     Can be used for CORBA enumerator types like geompy.ShapeType
308
309     Parameters:
310         theItem enumeration type
311     """
312     ret = theItem
313     if hasattr(theItem, "_v"): ret = theItem._v
314     return ret
315
316 ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
317 #  and a list of parameters, describing the shape.
318 #  List of parameters, describing the shape:
319 #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
320 #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
321 #
322 #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
323 #
324 #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
325 #
326 #  - SPHERE:       [xc yc zc            R]
327 #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
328 #  - BOX:          [xc yc zc                      ax ay az]
329 #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
330 #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
331 #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
332 #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
333 #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
334 #
335 #  - SPHERE2D:     [xc yc zc            R]
336 #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
337 #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
338 #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
339 #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
340 #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
341 #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
342 #  - PLANE:        [xo yo zo  dx dy dz]
343 #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
344 #  - FACE:                                       [nb_edges  nb_vertices]
345 #
346 #  - CIRCLE:       [xc yc zc  dx dy dz  R]
347 #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
348 #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
349 #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
350 #  - LINE:         [xo yo zo  dx dy dz]
351 #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
352 #  - EDGE:                                                 [nb_vertices]
353 #
354 #  - VERTEX:       [x  y  z]
355 #  @ingroup l1_geompy_auxiliary
356 kind = GEOM.GEOM_IKindOfShape
357
358 ## Information about closed/unclosed state of shell or wire
359 #  @ingroup l1_geompy_auxiliary
360 class info:
361     """
362     Information about closed/unclosed state of shell or wire
363     """
364     UNKNOWN  = 0
365     CLOSED   = 1
366     UNCLOSED = 2
367
368 class geompyDC(GEOM._objref_GEOM_Gen):
369
370         def __init__(self):
371             GEOM._objref_GEOM_Gen.__init__(self)
372             self.myBuilder = None
373             self.myStudyId = 0
374             self.father    = None
375
376             self.BasicOp  = None
377             self.CurvesOp = None
378             self.PrimOp   = None
379             self.ShapesOp = None
380             self.HealOp   = None
381             self.InsertOp = None
382             self.BoolOp   = None
383             self.TrsfOp   = None
384             self.LocalOp  = None
385             self.MeasuOp  = None
386             self.BlocksOp = None
387             self.GroupOp  = None
388             self.AdvOp    = None
389             pass
390
391         ## @addtogroup l1_geompy_auxiliary
392         ## @{
393         def init_geom(self,theStudy):
394             self.myStudy = theStudy
395             self.myStudyId = self.myStudy._get_StudyId()
396             self.myBuilder = self.myStudy.NewBuilder()
397             self.father = self.myStudy.FindComponent("GEOM")
398             if self.father is None:
399                 self.father = self.myBuilder.NewComponent("GEOM")
400                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
401                 FName = A1._narrow(SALOMEDS.AttributeName)
402                 FName.SetValue("Geometry")
403                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
404                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
405                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
406                 self.myBuilder.DefineComponentInstance(self.father,self)
407                 pass
408             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
409             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
410             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
411             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
412             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
413             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
414             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
415             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
416             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
417             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
418             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
419             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
420             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
421             pass
422
423         ## Dump component to the Python script
424         #  This method overrides IDL function to allow default values for the parameters.
425         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
426             """
427             Dump component to the Python script
428             This method overrides IDL function to allow default values for the parameters.
429             """
430             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
431
432         ## Get name for sub-shape aSubObj of shape aMainObj
433         #
434         # @ref swig_SubShapeName "Example"
435         def SubShapeName(self,aSubObj, aMainObj):
436             """
437             Get name for sub-shape aSubObj of shape aMainObj
438             """
439             # Example: see GEOM_TestAll.py
440
441             #aSubId  = orb.object_to_string(aSubObj)
442             #aMainId = orb.object_to_string(aMainObj)
443             #index = gg.getIndexTopology(aSubId, aMainId)
444             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
445             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
446             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
447             return name
448
449         ## Publish in study aShape with name aName
450         #
451         #  \param aShape the shape to be published
452         #  \param aName  the name for the shape
453         #  \param doRestoreSubShapes if True, finds and publishes also
454         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
455         #         and published sub-shapes of arguments
456         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
457         #                                                  these arguments description
458         #  \return study entry of the published shape in form of string
459         #
460         #  @ref swig_all_addtostudy "Example"
461         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
462                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
463             """
464             Publish in study aShape with name aName
465
466             Parameters:
467                 aShape the shape to be published
468                 aName  the name for the shape
469                 doRestoreSubShapes if True, finds and publishes also
470                                    sub-shapes of aShape, corresponding to its arguments
471                                    and published sub-shapes of arguments
472                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
473                                                          these arguments description
474
475             Returns:
476                 study entry of the published shape in form of string
477
478             Example of usage:
479                 id_block1 = geompy.addToStudy(Block1, "Block 1")
480             """
481             # Example: see GEOM_TestAll.py
482             try:
483                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
484                 if doRestoreSubShapes:
485                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
486                                             theFindMethod, theInheritFirstArg, True )
487             except:
488                 print "addToStudy() failed"
489                 return ""
490             return aShape.GetStudyEntry()
491
492         ## Publish in study aShape with name aName as sub-object of previously published aFather
493         #  \param aFather previously published object
494         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
495         #  \param aName  the name for the shape
496         #
497         #  \return study entry of the published shape in form of string
498         #  @ref swig_all_addtostudyInFather "Example"
499         def addToStudyInFather(self, aFather, aShape, aName):
500             """
501             Publish in study aShape with name aName as sub-object of previously published aFather
502
503             Parameters:
504                 aFather previously published object
505                 aShape the shape to be published as sub-object of aFather
506                 aName  the name for the shape
507
508             Returns:
509                 study entry of the published shape in form of string
510             """
511             # Example: see GEOM_TestAll.py
512             try:
513                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
514             except:
515                 print "addToStudyInFather() failed"
516                 return ""
517             return aShape.GetStudyEntry()
518
519         ## Unpublish object in study
520         #
521         #  \param obj the object to be unpublished
522         def hideInStudy(self, obj):
523             """
524             Unpublish object in study
525
526             Parameters:
527                 obj the object to be unpublished
528             """
529             ior = salome.orb.object_to_string(obj)
530             aSObject = self.myStudy.FindObjectIOR(ior)
531             if aSObject is not None:
532                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
533                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
534                 drwAttribute.SetDrawable(False)
535                 pass
536
537         # end of l1_geompy_auxiliary
538         ## @}
539
540         ## @addtogroup l3_restore_ss
541         ## @{
542
543         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
544         #  To be used from python scripts out of addToStudy() (non-default usage)
545         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
546         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
547         #                   If this list is empty, all operation arguments will be published
548         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
549         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
550         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
551         #                            Do not publish sub-shapes in place of arguments, but only
552         #                            in place of sub-shapes of the first argument,
553         #                            because the whole shape corresponds to the first argument.
554         #                            Mainly to be used after transformations, but it also can be
555         #                            usefull after partition with one object shape, and some other
556         #                            operations, where only the first argument has to be considered.
557         #                            If theObject has only one argument shape, this flag is automatically
558         #                            considered as True, not regarding really passed value.
559         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
560         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
561         #  \return list of published sub-shapes
562         #
563         #  @ref tui_restore_prs_params "Example"
564         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
565                               theInheritFirstArg=False, theAddPrefix=True):
566             """
567             Publish sub-shapes, standing for arguments and sub-shapes of arguments
568             To be used from python scripts out of geompy.addToStudy (non-default usage)
569
570             Parameters:
571                 theObject published GEOM.GEOM_Object, arguments of which will be published
572                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
573                           If this list is empty, all operation arguments will be published
574                 theFindMethod method to search sub-shapes, corresponding to arguments and
575                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
576                 theInheritFirstArg set properties of the first argument for theObject.
577                                    Do not publish sub-shapes in place of arguments, but only
578                                    in place of sub-shapes of the first argument,
579                                    because the whole shape corresponds to the first argument.
580                                    Mainly to be used after transformations, but it also can be
581                                    usefull after partition with one object shape, and some other
582                                    operations, where only the first argument has to be considered.
583                                    If theObject has only one argument shape, this flag is automatically
584                                    considered as True, not regarding really passed value.
585                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
586                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
587             Returns:
588                 list of published sub-shapes
589             """
590             # Example: see GEOM_TestAll.py
591             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
592                                           theFindMethod, theInheritFirstArg, theAddPrefix)
593
594         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
595         #  To be used from python scripts out of addToStudy() (non-default usage)
596         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
597         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
598         #                   If this list is empty, all operation arguments will be published
599         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
600         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
601         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
602         #                            Do not publish sub-shapes in place of arguments, but only
603         #                            in place of sub-shapes of the first argument,
604         #                            because the whole shape corresponds to the first argument.
605         #                            Mainly to be used after transformations, but it also can be
606         #                            usefull after partition with one object shape, and some other
607         #                            operations, where only the first argument has to be considered.
608         #                            If theObject has only one argument shape, this flag is automatically
609         #                            considered as True, not regarding really passed value.
610         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
611         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
612         #  \return list of published sub-shapes
613         #
614         #  @ref tui_restore_prs_params "Example"
615         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
616                                    theInheritFirstArg=False, theAddPrefix=True):
617             """
618             Publish sub-shapes, standing for arguments and sub-shapes of arguments
619             To be used from python scripts out of geompy.addToStudy() (non-default usage)
620
621             Parameters:
622                 theObject published GEOM.GEOM_Object, arguments of which will be published
623                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
624                           If this list is empty, all operation arguments will be published
625                 theFindMethod method to search sub-shapes, corresponding to arguments and
626                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
627                 theInheritFirstArg set properties of the first argument for theObject.
628                                    Do not publish sub-shapes in place of arguments, but only
629                                    in place of sub-shapes of the first argument,
630                                    because the whole shape corresponds to the first argument.
631                                    Mainly to be used after transformations, but it also can be
632                                    usefull after partition with one object shape, and some other
633                                    operations, where only the first argument has to be considered.
634                                    If theObject has only one argument shape, this flag is automatically
635                                    considered as True, not regarding really passed value.
636                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
637                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
638
639             Returns: 
640                 list of published sub-shapes
641             """
642             # Example: see GEOM_TestAll.py
643             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
644                                                theFindMethod, theInheritFirstArg, theAddPrefix)
645
646         # end of l3_restore_ss
647         ## @}
648
649         ## @addtogroup l3_basic_go
650         ## @{
651
652         ## Create point by three coordinates.
653         #  @param theX The X coordinate of the point.
654         #  @param theY The Y coordinate of the point.
655         #  @param theZ The Z coordinate of the point.
656         #  @return New GEOM.GEOM_Object, containing the created point.
657         #
658         #  @ref tui_creation_point "Example"
659         def MakeVertex(self, theX, theY, theZ):
660             """
661             Create point by three coordinates.
662
663             Parameters:
664                 theX The X coordinate of the point.
665                 theY The Y coordinate of the point.
666                 theZ The Z coordinate of the point.
667                 
668             Returns: 
669                 New GEOM.GEOM_Object, containing the created point.
670             """
671             # Example: see GEOM_TestAll.py
672             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
673             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
674             RaiseIfFailed("MakePointXYZ", self.BasicOp)
675             anObj.SetParameters(Parameters)
676             return anObj
677
678         ## Create a point, distant from the referenced point
679         #  on the given distances along the coordinate axes.
680         #  @param theReference The referenced point.
681         #  @param theX Displacement from the referenced point along OX axis.
682         #  @param theY Displacement from the referenced point along OY axis.
683         #  @param theZ Displacement from the referenced point along OZ axis.
684         #  @return New GEOM.GEOM_Object, containing the created point.
685         #
686         #  @ref tui_creation_point "Example"
687         def MakeVertexWithRef(self,theReference, theX, theY, theZ):
688             """
689             Create a point, distant from the referenced point
690             on the given distances along the coordinate axes.
691
692             Parameters:
693                 theReference The referenced point.
694                 theX Displacement from the referenced point along OX axis.
695                 theY Displacement from the referenced point along OY axis.
696                 theZ Displacement from the referenced point along OZ axis.
697
698             Returns:
699                 New GEOM.GEOM_Object, containing the created point.
700             """
701             # Example: see GEOM_TestAll.py
702             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
703             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
704             RaiseIfFailed("MakePointWithReference", self.BasicOp)
705             anObj.SetParameters(Parameters)
706             return anObj
707
708         ## Create a point, corresponding to the given parameter on the given curve.
709         #  @param theRefCurve The referenced curve.
710         #  @param theParameter Value of parameter on the referenced curve.
711         #  @return New GEOM.GEOM_Object, containing the created point.
712         #
713         #  @ref tui_creation_point "Example"
714         def MakeVertexOnCurve(self,theRefCurve, theParameter):
715             """
716             Create a point, corresponding to the given parameter on the given curve.
717
718             Parameters:
719                 theRefCurve The referenced curve.
720                 theParameter Value of parameter on the referenced curve.
721
722             Returns:
723                 New GEOM.GEOM_Object, containing the created point.
724
725             Example of usage:
726                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
727             """
728             # Example: see GEOM_TestAll.py
729             theParameter, Parameters = ParseParameters(theParameter)
730             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
731             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
732             anObj.SetParameters(Parameters)
733             return anObj
734
735         ## Create a point by projection give coordinates on the given curve
736         #  @param theRefCurve The referenced curve.
737         #  @param theX X-coordinate in 3D space
738         #  @param theY Y-coordinate in 3D space
739         #  @param theZ Z-coordinate in 3D space
740         #  @return New GEOM.GEOM_Object, containing the created point.
741         #
742         #  @ref tui_creation_point "Example"
743         def MakeVertexOnCurveByCoord(self,theRefCurve, theX, theY, theZ):
744             """
745             Create a point by projection give coordinates on the given curve
746             
747             Parameters:
748                 theRefCurve The referenced curve.
749                 theX X-coordinate in 3D space
750                 theY Y-coordinate in 3D space
751                 theZ Z-coordinate in 3D space
752
753             Returns:
754                 New GEOM.GEOM_Object, containing the created point.
755
756             Example of usage:
757                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
758             """
759             # Example: see GEOM_TestAll.py
760             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
761             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
762             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
763             anObj.SetParameters(Parameters)
764             return anObj
765
766         ## Create a point, corresponding to the given length on the given curve.
767         #  @param theRefCurve The referenced curve.
768         #  @param theLength Length on the referenced curve. It can be negative.
769         #  @param theStartPoint Point allowing to choose the direction for the calculation
770         #                       of the length. If None, start from the first point of theRefCurve.
771         #  @return New GEOM.GEOM_Object, containing the created point.
772         #
773         #  @ref tui_creation_point "Example"
774         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None):
775             """
776             Create a point, corresponding to the given length on the given curve.
777
778             Parameters:
779                 theRefCurve The referenced curve.
780                 theLength Length on the referenced curve. It can be negative.
781                 theStartPoint Point allowing to choose the direction for the calculation
782                               of the length. If None, start from the first point of theRefCurve.
783
784             Returns:
785                 New GEOM.GEOM_Object, containing the created point.
786             """
787             # Example: see GEOM_TestAll.py
788             theLength, Parameters = ParseParameters(theLength)
789             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
790             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
791             anObj.SetParameters(Parameters)
792             return anObj
793
794         ## Create a point, corresponding to the given parameters on the
795         #    given surface.
796         #  @param theRefSurf The referenced surface.
797         #  @param theUParameter Value of U-parameter on the referenced surface.
798         #  @param theVParameter Value of V-parameter on the referenced surface.
799         #  @return New GEOM.GEOM_Object, containing the created point.
800         #
801         #  @ref swig_MakeVertexOnSurface "Example"
802         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter):
803             """
804             Create a point, corresponding to the given parameters on the
805             given surface.
806
807             Parameters:
808                 theRefSurf The referenced surface.
809                 theUParameter Value of U-parameter on the referenced surface.
810                 theVParameter Value of V-parameter on the referenced surface.
811
812             Returns:
813                 New GEOM.GEOM_Object, containing the created point.
814
815             Example of usage:
816                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8) #(GEOM_Object, Double, Double)->GEOM_Object
817             """
818             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
819             # Example: see GEOM_TestAll.py
820             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
821             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
822             anObj.SetParameters(Parameters);
823             return anObj
824
825         ## Create a point by projection give coordinates on the given surface
826         #  @param theRefSurf The referenced surface.
827         #  @param theX X-coordinate in 3D space
828         #  @param theY Y-coordinate in 3D space
829         #  @param theZ Z-coordinate in 3D space
830         #  @return New GEOM.GEOM_Object, containing the created point.
831         #
832         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
833         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ):
834             """
835             Create a point by projection give coordinates on the given surface
836
837             Parameters:
838                 theRefSurf The referenced surface.
839                 theX X-coordinate in 3D space
840                 theY Y-coordinate in 3D space
841                 theZ Z-coordinate in 3D space
842
843             Returns:
844                 New GEOM.GEOM_Object, containing the created point.
845
846             Example of usage:
847                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.) #(GEOM_Object, Double, Double, Double)->GEOM_Object
848             """
849             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
850             # Example: see GEOM_TestAll.py
851             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
852             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
853             anObj.SetParameters(Parameters);
854             return anObj
855
856         ## Create a point on intersection of two lines.
857         #  @param theRefLine1, theRefLine2 The referenced lines.
858         #  @return New GEOM.GEOM_Object, containing the created point.
859         #
860         #  @ref swig_MakeVertexOnLinesIntersection "Example"
861         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2):
862             """
863             Create a point on intersection of two lines.
864
865             Parameters:
866                 theRefLine1, theRefLine2 The referenced lines.
867
868             Returns:
869                 New GEOM.GEOM_Object, containing the created point.
870             """
871             # Example: see GEOM_TestAll.py
872             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
873             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
874             return anObj
875
876         ## Create a tangent, corresponding to the given parameter on the given curve.
877         #  @param theRefCurve The referenced curve.
878         #  @param theParameter Value of parameter on the referenced curve.
879         #  @return New GEOM.GEOM_Object, containing the created tangent.
880         #
881         #  @ref swig_MakeTangentOnCurve "Example"
882         def MakeTangentOnCurve(self, theRefCurve, theParameter):
883             """
884             Create a tangent, corresponding to the given parameter on the given curve.
885
886             Parameters:
887                 theRefCurve The referenced curve.
888                 theParameter Value of parameter on the referenced curve.
889
890             Returns:
891                 New GEOM.GEOM_Object, containing the created tangent.
892
893             Example of usage:
894                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7) #(GEOM_Object, Double)->GEOM_Object
895             """
896             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
897             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
898             return anObj
899
900         ## Create a tangent plane, corresponding to the given parameter on the given face.
901         #  @param theFace The face for which tangent plane should be built.
902         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
903         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
904         #  @param theTrimSize the size of plane.
905         #  @return New GEOM.GEOM_Object, containing the created tangent.
906         #
907         #  @ref swig_MakeTangentPlaneOnFace "Example"
908         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize):
909             """
910             Create a tangent plane, corresponding to the given parameter on the given face.
911
912             Parameters:
913                 theFace The face for which tangent plane should be built.
914                 theParameterV vertical value of the center point (0.0 - 1.0).
915                 theParameterU horisontal value of the center point (0.0 - 1.0).
916                 theTrimSize the size of plane.
917
918            Returns: 
919                 New GEOM.GEOM_Object, containing the created tangent.
920
921            Example of usage:
922                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
923             """
924             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
925             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
926             return anObj
927
928         ## Create a vector with the given components.
929         #  @param theDX X component of the vector.
930         #  @param theDY Y component of the vector.
931         #  @param theDZ Z component of the vector.
932         #  @return New GEOM.GEOM_Object, containing the created vector.
933         #
934         #  @ref tui_creation_vector "Example"
935         def MakeVectorDXDYDZ(self,theDX, theDY, theDZ):
936             """
937             Create a vector with the given components.
938
939             Parameters:
940                 theDX X component of the vector.
941                 theDY Y component of the vector.
942                 theDZ Z component of the vector.
943
944             Returns:     
945                 New GEOM.GEOM_Object, containing the created vector.
946             """
947             # Example: see GEOM_TestAll.py
948             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
949             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
950             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
951             anObj.SetParameters(Parameters)
952             return anObj
953
954         ## Create a vector between two points.
955         #  @param thePnt1 Start point for the vector.
956         #  @param thePnt2 End point for the vector.
957         #  @return New GEOM.GEOM_Object, containing the created vector.
958         #
959         #  @ref tui_creation_vector "Example"
960         def MakeVector(self,thePnt1, thePnt2):
961             """
962             Create a vector between two points.
963
964             Parameters:
965                 thePnt1 Start point for the vector.
966                 thePnt2 End point for the vector.
967
968             Returns:        
969                 New GEOM.GEOM_Object, containing the created vector.
970             """
971             # Example: see GEOM_TestAll.py
972             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
973             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
974             return anObj
975
976         ## Create a line, passing through the given point
977         #  and parrallel to the given direction
978         #  @param thePnt Point. The resulting line will pass through it.
979         #  @param theDir Direction. The resulting line will be parallel to it.
980         #  @return New GEOM.GEOM_Object, containing the created line.
981         #
982         #  @ref tui_creation_line "Example"
983         def MakeLine(self,thePnt, theDir):
984             """
985             Create a line, passing through the given point
986             and parrallel to the given direction
987
988             Parameters:
989                 thePnt Point. The resulting line will pass through it.
990                 theDir Direction. The resulting line will be parallel to it.
991
992             Returns:
993                 New GEOM.GEOM_Object, containing the created line.
994             """
995             # Example: see GEOM_TestAll.py
996             anObj = self.BasicOp.MakeLine(thePnt, theDir)
997             RaiseIfFailed("MakeLine", self.BasicOp)
998             return anObj
999
1000         ## Create a line, passing through the given points
1001         #  @param thePnt1 First of two points, defining the line.
1002         #  @param thePnt2 Second of two points, defining the line.
1003         #  @return New GEOM.GEOM_Object, containing the created line.
1004         #
1005         #  @ref tui_creation_line "Example"
1006         def MakeLineTwoPnt(self,thePnt1, thePnt2):
1007             """
1008             Create a line, passing through the given points
1009
1010             Parameters:
1011                 thePnt1 First of two points, defining the line.
1012                 thePnt2 Second of two points, defining the line.
1013
1014             Returns:
1015                 New GEOM.GEOM_Object, containing the created line.
1016             """
1017             # Example: see GEOM_TestAll.py
1018             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1019             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1020             return anObj
1021
1022         ## Create a line on two faces intersection.
1023         #  @param theFace1 First of two faces, defining the line.
1024         #  @param theFace2 Second of two faces, defining the line.
1025         #  @return New GEOM.GEOM_Object, containing the created line.
1026         #
1027         #  @ref swig_MakeLineTwoFaces "Example"
1028         def MakeLineTwoFaces(self, theFace1, theFace2):
1029             """
1030             Create a line on two faces intersection.
1031
1032             Parameters:
1033                 theFace1 First of two faces, defining the line.
1034                 theFace2 Second of two faces, defining the line.
1035
1036             Returns:
1037                 New GEOM.GEOM_Object, containing the created line.
1038             """
1039             # Example: see GEOM_TestAll.py
1040             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1041             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1042             return anObj
1043
1044         ## Create a plane, passing through the given point
1045         #  and normal to the given vector.
1046         #  @param thePnt Point, the plane has to pass through.
1047         #  @param theVec Vector, defining the plane normal direction.
1048         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1049         #  @return New GEOM.GEOM_Object, containing the created plane.
1050         #
1051         #  @ref tui_creation_plane "Example"
1052         def MakePlane(self,thePnt, theVec, theTrimSize):
1053             """
1054             Create a plane, passing through the given point
1055             and normal to the given vector.
1056
1057             Parameters:
1058                 thePnt Point, the plane has to pass through.
1059                 theVec Vector, defining the plane normal direction.
1060                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1061
1062             Returns:    
1063                 New GEOM.GEOM_Object, containing the created plane.
1064             """
1065             # Example: see GEOM_TestAll.py
1066             theTrimSize, Parameters = ParseParameters(theTrimSize);
1067             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1068             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1069             anObj.SetParameters(Parameters)
1070             return anObj
1071
1072         ## Create a plane, passing through the three given points
1073         #  @param thePnt1 First of three points, defining the plane.
1074         #  @param thePnt2 Second of three points, defining the plane.
1075         #  @param thePnt3 Fird of three points, defining the plane.
1076         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1077         #  @return New GEOM.GEOM_Object, containing the created plane.
1078         #
1079         #  @ref tui_creation_plane "Example"
1080         def MakePlaneThreePnt(self,thePnt1, thePnt2, thePnt3, theTrimSize):
1081             """
1082             Create a plane, passing through the three given points
1083
1084             Parameters:
1085                 thePnt1 First of three points, defining the plane.
1086                 thePnt2 Second of three points, defining the plane.
1087                 thePnt3 Fird of three points, defining the plane.
1088                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1089
1090             Returns:
1091                 New GEOM.GEOM_Object, containing the created plane.
1092             """
1093             # Example: see GEOM_TestAll.py
1094             theTrimSize, Parameters = ParseParameters(theTrimSize);
1095             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1096             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1097             anObj.SetParameters(Parameters)
1098             return anObj
1099
1100         ## Create a plane, similar to the existing one, but with another size of representing face.
1101         #  @param theFace Referenced plane or LCS(Marker).
1102         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1103         #  @return New GEOM.GEOM_Object, containing the created plane.
1104         #
1105         #  @ref tui_creation_plane "Example"
1106         def MakePlaneFace(self,theFace, theTrimSize):
1107             """
1108             Create a plane, similar to the existing one, but with another size of representing face.
1109
1110             Parameters:
1111                 theFace Referenced plane or LCS(Marker).
1112                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1113
1114             Returns:
1115                 New GEOM.GEOM_Object, containing the created plane.
1116             """
1117             # Example: see GEOM_TestAll.py
1118             theTrimSize, Parameters = ParseParameters(theTrimSize);
1119             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1120             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1121             anObj.SetParameters(Parameters)
1122             return anObj
1123
1124         ## Create a plane, passing through the 2 vectors
1125         #  with center in a start point of the first vector.
1126         #  @param theVec1 Vector, defining center point and plane direction.
1127         #  @param theVec2 Vector, defining the plane normal direction.
1128         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1129         #  @return New GEOM.GEOM_Object, containing the created plane.
1130         #
1131         #  @ref tui_creation_plane "Example"
1132         def MakePlane2Vec(self,theVec1, theVec2, theTrimSize):
1133             """
1134             Create a plane, passing through the 2 vectors
1135             with center in a start point of the first vector.
1136
1137             Parameters:
1138                 theVec1 Vector, defining center point and plane direction.
1139                 theVec2 Vector, defining the plane normal direction.
1140                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1141
1142             Returns: 
1143                 New GEOM.GEOM_Object, containing the created plane.
1144             """
1145             # Example: see GEOM_TestAll.py
1146             theTrimSize, Parameters = ParseParameters(theTrimSize);
1147             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1148             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1149             anObj.SetParameters(Parameters)
1150             return anObj
1151
1152         ## Create a plane, based on a Local coordinate system.
1153         #  @param theLCS  coordinate system, defining plane.
1154         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1155         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1156         #  @return New GEOM.GEOM_Object, containing the created plane.
1157         #
1158         #  @ref tui_creation_plane "Example"
1159         def MakePlaneLCS(self,theLCS, theTrimSize, theOrientation):
1160             """
1161             Create a plane, based on a Local coordinate system.
1162
1163            Parameters: 
1164                 theLCS  coordinate system, defining plane.
1165                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1166                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1167
1168             Returns: 
1169                 New GEOM.GEOM_Object, containing the created plane.
1170             """
1171             # Example: see GEOM_TestAll.py
1172             theTrimSize, Parameters = ParseParameters(theTrimSize);
1173             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1174             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1175             anObj.SetParameters(Parameters)
1176             return anObj
1177
1178         ## Create a local coordinate system.
1179         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1180         #  @param XDX,XDY,XDZ Three components of OX direction
1181         #  @param YDX,YDY,YDZ Three components of OY direction
1182         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1183         #
1184         #  @ref swig_MakeMarker "Example"
1185         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ):
1186             """
1187             Create a local coordinate system.
1188
1189             Parameters: 
1190                 OX,OY,OZ Three coordinates of coordinate system origin.
1191                 XDX,XDY,XDZ Three components of OX direction
1192                 YDX,YDY,YDZ Three components of OY direction
1193
1194             Returns: 
1195                 New GEOM.GEOM_Object, containing the created coordinate system.
1196             """
1197             # Example: see GEOM_TestAll.py
1198             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1199             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1200             RaiseIfFailed("MakeMarker", self.BasicOp)
1201             anObj.SetParameters(Parameters)
1202             return anObj
1203
1204         ## Create a local coordinate system from shape.
1205         #  @param theShape The initial shape to detect the coordinate system.
1206         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1207         #
1208         #  @ref tui_creation_lcs "Example"
1209         def MakeMarkerFromShape(self, theShape):
1210             """
1211             Create a local coordinate system from shape.
1212
1213             Parameters:
1214                 theShape The initial shape to detect the coordinate system.
1215                 
1216             Returns: 
1217                 New GEOM.GEOM_Object, containing the created coordinate system.
1218             """
1219             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1220             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1221             return anObj
1222
1223         ## Create a local coordinate system from point and two vectors.
1224         #  @param theOrigin Point of coordinate system origin.
1225         #  @param theXVec Vector of X direction
1226         #  @param theYVec Vector of Y direction
1227         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1228         #
1229         #  @ref tui_creation_lcs "Example"
1230         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec):
1231             """
1232             Create a local coordinate system from point and two vectors.
1233
1234             Parameters:
1235                 theOrigin Point of coordinate system origin.
1236                 theXVec Vector of X direction
1237                 theYVec Vector of Y direction
1238
1239             Returns: 
1240                 New GEOM.GEOM_Object, containing the created coordinate system.
1241
1242             """
1243             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1244             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1245             return anObj
1246
1247         # end of l3_basic_go
1248         ## @}
1249
1250         ## @addtogroup l4_curves
1251         ## @{
1252
1253         ##  Create an arc of circle, passing through three given points.
1254         #  @param thePnt1 Start point of the arc.
1255         #  @param thePnt2 Middle point of the arc.
1256         #  @param thePnt3 End point of the arc.
1257         #  @return New GEOM.GEOM_Object, containing the created arc.
1258         #
1259         #  @ref swig_MakeArc "Example"
1260         def MakeArc(self,thePnt1, thePnt2, thePnt3):
1261             """
1262             Create an arc of circle, passing through three given points.
1263
1264             Parameters:
1265                 thePnt1 Start point of the arc.
1266                 thePnt2 Middle point of the arc.
1267                 thePnt3 End point of the arc.
1268
1269             Returns: 
1270                 New GEOM.GEOM_Object, containing the created arc.
1271             """
1272             # Example: see GEOM_TestAll.py
1273             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1274             RaiseIfFailed("MakeArc", self.CurvesOp)
1275             return anObj
1276
1277         ##  Create an arc of circle from a center and 2 points.
1278         #  @param thePnt1 Center of the arc
1279         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1280         #  @param thePnt3 End point of the arc (Gives also a direction)
1281         #  @param theSense Orientation of the arc
1282         #  @return New GEOM.GEOM_Object, containing the created arc.
1283         #
1284         #  @ref swig_MakeArc "Example"
1285         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False):
1286             """
1287             Create an arc of circle from a center and 2 points.
1288
1289             Parameters:
1290                 thePnt1 Center of the arc
1291                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1292                 thePnt3 End point of the arc (Gives also a direction)
1293                 theSense Orientation of the arc
1294
1295             Returns:
1296                 New GEOM.GEOM_Object, containing the created arc.
1297             """
1298             # Example: see GEOM_TestAll.py
1299             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1300             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1301             return anObj
1302
1303         ##  Create an arc of ellipse, of center and two points.
1304         #  @param theCenter Center of the arc.
1305         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1306         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1307         #  @return New GEOM.GEOM_Object, containing the created arc.
1308         #
1309         #  @ref swig_MakeArc "Example"
1310         def MakeArcOfEllipse(self,theCenter, thePnt1, thePnt2):
1311             """
1312             Create an arc of ellipse, of center and two points.
1313
1314             Parameters:
1315                 theCenter Center of the arc.
1316                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1317                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1318
1319             Returns:
1320                 New GEOM.GEOM_Object, containing the created arc.
1321             """
1322             # Example: see GEOM_TestAll.py
1323             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1324             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1325             return anObj
1326
1327         ## Create a circle with given center, normal vector and radius.
1328         #  @param thePnt Circle center.
1329         #  @param theVec Vector, normal to the plane of the circle.
1330         #  @param theR Circle radius.
1331         #  @return New GEOM.GEOM_Object, containing the created circle.
1332         #
1333         #  @ref tui_creation_circle "Example"
1334         def MakeCircle(self, thePnt, theVec, theR):
1335             """
1336             Create a circle with given center, normal vector and radius.
1337
1338             Parameters:
1339                 thePnt Circle center.
1340                 theVec Vector, normal to the plane of the circle.
1341                 theR Circle radius.
1342
1343             Returns:
1344                 New GEOM.GEOM_Object, containing the created circle.
1345             """
1346             # Example: see GEOM_TestAll.py
1347             theR, Parameters = ParseParameters(theR)
1348             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1349             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1350             anObj.SetParameters(Parameters)
1351             return anObj
1352
1353         ## Create a circle with given radius.
1354         #  Center of the circle will be in the origin of global
1355         #  coordinate system and normal vector will be codirected with Z axis
1356         #  @param theR Circle radius.
1357         #  @return New GEOM.GEOM_Object, containing the created circle.
1358         def MakeCircleR(self, theR):
1359             """
1360             Create a circle with given radius.
1361             Center of the circle will be in the origin of global
1362             coordinate system and normal vector will be codirected with Z axis
1363
1364             Parameters:
1365                 theR Circle radius.
1366
1367             Returns:
1368                 New GEOM.GEOM_Object, containing the created circle.
1369             """
1370             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1371             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1372             return anObj
1373
1374         ## Create a circle, passing through three given points
1375         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1376         #  @return New GEOM.GEOM_Object, containing the created circle.
1377         #
1378         #  @ref tui_creation_circle "Example"
1379         def MakeCircleThreePnt(self,thePnt1, thePnt2, thePnt3):
1380             """
1381             Create a circle, passing through three given points
1382
1383             Parameters:
1384                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1385
1386             Returns:
1387                 New GEOM.GEOM_Object, containing the created circle.
1388             """
1389             # Example: see GEOM_TestAll.py
1390             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1391             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1392             return anObj
1393
1394         ## Create a circle, with given point1 as center,
1395         #  passing through the point2 as radius and laying in the plane,
1396         #  defined by all three given points.
1397         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1398         #  @return New GEOM.GEOM_Object, containing the created circle.
1399         #
1400         #  @ref swig_MakeCircle "Example"
1401         def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3):
1402             """
1403             Create a circle, with given point1 as center,
1404             passing through the point2 as radius and laying in the plane,
1405             defined by all three given points.
1406
1407             Parameters:
1408                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1409
1410             Returns:
1411                 New GEOM.GEOM_Object, containing the created circle.
1412             """
1413             # Example: see GEOM_example6.py
1414             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
1415             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
1416             return anObj
1417
1418         ## Create an ellipse with given center, normal vector and radiuses.
1419         #  @param thePnt Ellipse center.
1420         #  @param theVec Vector, normal to the plane of the ellipse.
1421         #  @param theRMajor Major ellipse radius.
1422         #  @param theRMinor Minor ellipse radius.
1423         #  @param theVecMaj Vector, direction of the ellipse's main axis.
1424         #  @return New GEOM.GEOM_Object, containing the created ellipse.
1425         #
1426         #  @ref tui_creation_ellipse "Example"
1427         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None):
1428             """
1429             Create an ellipse with given center, normal vector and radiuses.
1430
1431             Parameters:
1432                 thePnt Ellipse center.
1433                 theVec Vector, normal to the plane of the ellipse.
1434                 theRMajor Major ellipse radius.
1435                 theRMinor Minor ellipse radius.
1436                 theVecMaj Vector, direction of the ellipse's main axis.
1437
1438             Returns:    
1439                 New GEOM.GEOM_Object, containing the created ellipse.
1440             """
1441             # Example: see GEOM_TestAll.py
1442             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
1443             if theVecMaj is not None:
1444                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
1445             else:
1446                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
1447                 pass
1448             RaiseIfFailed("MakeEllipse", self.CurvesOp)
1449             anObj.SetParameters(Parameters)
1450             return anObj
1451
1452         ## Create an ellipse with given radiuses.
1453         #  Center of the ellipse will be in the origin of global
1454         #  coordinate system and normal vector will be codirected with Z axis
1455         #  @param theRMajor Major ellipse radius.
1456         #  @param theRMinor Minor ellipse radius.
1457         #  @return New GEOM.GEOM_Object, containing the created ellipse.
1458         def MakeEllipseRR(self, theRMajor, theRMinor):
1459             """
1460             Create an ellipse with given radiuses.
1461             Center of the ellipse will be in the origin of global
1462             coordinate system and normal vector will be codirected with Z axis
1463
1464             Parameters:
1465                 theRMajor Major ellipse radius.
1466                 theRMinor Minor ellipse radius.
1467
1468             Returns:
1469                 New GEOM.GEOM_Object, containing the created ellipse.
1470             """
1471             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
1472             RaiseIfFailed("MakeEllipse", self.CurvesOp)
1473             return anObj
1474
1475         ## Create a polyline on the set of points.
1476         #  @param thePoints Sequence of points for the polyline.
1477         #  @param theIsClosed If True, build a closed wire.
1478         #  @return New GEOM.GEOM_Object, containing the created polyline.
1479         #
1480         #  @ref tui_creation_curve "Example"
1481         def MakePolyline(self, thePoints, theIsClosed=False):
1482             """
1483             Create a polyline on the set of points.
1484
1485             Parameters:
1486                 thePoints Sequence of points for the polyline.
1487                 theIsClosed If True, build a closed wire.
1488
1489             Returns:
1490                 New GEOM.GEOM_Object, containing the created polyline.
1491             """
1492             # Example: see GEOM_TestAll.py
1493             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
1494             RaiseIfFailed("MakePolyline", self.CurvesOp)
1495             return anObj
1496
1497         ## Create bezier curve on the set of points.
1498         #  @param thePoints Sequence of points for the bezier curve.
1499         #  @param theIsClosed If True, build a closed curve.
1500         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
1501         #
1502         #  @ref tui_creation_curve "Example"
1503         def MakeBezier(self, thePoints, theIsClosed=False):
1504             """
1505             Create bezier curve on the set of points.
1506
1507             Parameters:
1508                 thePoints Sequence of points for the bezier curve.
1509                 theIsClosed If True, build a closed curve.
1510
1511             Returns:
1512                 New GEOM.GEOM_Object, containing the created bezier curve.
1513             """
1514             # Example: see GEOM_TestAll.py
1515             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
1516             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
1517             return anObj
1518
1519         ## Create B-Spline curve on the set of points.
1520         #  @param thePoints Sequence of points for the B-Spline curve.
1521         #  @param theIsClosed If True, build a closed curve.
1522         #  @param theDoReordering If TRUE, the algo does not follow the order of
1523         #                         \a thePoints but searches for the closest vertex.
1524         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
1525         #
1526         #  @ref tui_creation_curve "Example"
1527         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False):
1528             """
1529             Create B-Spline curve on the set of points.
1530
1531             Parameters:
1532                 thePoints Sequence of points for the B-Spline curve.
1533                 theIsClosed If True, build a closed curve.
1534                 theDoReordering If True, the algo does not follow the order of
1535                                 thePoints but searches for the closest vertex.
1536
1537             Returns:                     
1538                 New GEOM.GEOM_Object, containing the created B-Spline curve.
1539             """
1540             # Example: see GEOM_TestAll.py
1541             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
1542             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
1543             return anObj
1544
1545
1546         ## Creates a curve using the parametric definition of the basic points.
1547         #  @param thexExpr parametric equation of the coordinates X.
1548         #  @param theyExpr parametric equation of the coordinates Y.
1549         #  @param thezExpr parametric equation of the coordinates Z.
1550         #  @param theParamMin the minimal value of the parameter.
1551         #  @param theParamMax the maximum value of the parameter.
1552         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
1553         #  @param theCurveType the type of the curve.
1554         #  @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.
1555         #  @return New GEOM.GEOM_Object, containing the created curve.
1556         #
1557         #  @ref tui_creation_curve "Example"
1558         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
1559                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False ):
1560             """
1561             Creates a curve using the parametric definition of the basic points.
1562
1563             Parameters:
1564                 thexExpr parametric equation of the coordinates X.
1565                 theyExpr parametric equation of the coordinates Y.
1566                 thezExpr parametric equation of the coordinates Z.
1567                 theParamMin the minimal value of the parameter.
1568                 theParamMax the maximum value of the parameter.
1569                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
1570                 theCurveType the type of the curve.
1571                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
1572                              method is used which can lead to a bug.
1573
1574             Returns:
1575                 New GEOM.GEOM_Object, containing the created curve.
1576             """
1577             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
1578             if theNewMethod:
1579               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
1580             else:
1581               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
1582             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
1583             anObj.SetParameters(Parameters)
1584             return anObj
1585             
1586
1587
1588         # end of l4_curves
1589         ## @}
1590
1591         ## @addtogroup l3_sketcher
1592         ## @{
1593
1594         ## Create a sketcher (wire or face), following the textual description,
1595         #  passed through <VAR>theCommand</VAR> argument. \n
1596         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
1597         #  Format of the description string have to be the following:
1598         #
1599         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
1600         #
1601         #  Where:
1602         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
1603         #  - CMD is one of
1604         #     - "R angle" : Set the direction by angle
1605         #     - "D dx dy" : Set the direction by DX & DY
1606         #     .
1607         #       \n
1608         #     - "TT x y" : Create segment by point at X & Y
1609         #     - "T dx dy" : Create segment by point with DX & DY
1610         #     - "L length" : Create segment by direction & Length
1611         #     - "IX x" : Create segment by direction & Intersect. X
1612         #     - "IY y" : Create segment by direction & Intersect. Y
1613         #     .
1614         #       \n
1615         #     - "C radius length" : Create arc by direction, radius and length(in degree)
1616         #     - "AA x y": Create arc by point at X & Y
1617         #     - "A dx dy" : Create arc by point with DX & DY
1618         #     - "A dx dy" : Create arc by point with DX & DY
1619         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
1620         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
1621         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
1622         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
1623         #     .
1624         #       \n
1625         #     - "WW" : Close Wire (to finish)
1626         #     - "WF" : Close Wire and build face (to finish)
1627         #     .
1628         #        \n
1629         #  - Flag1 (= reverse) is 0 or 2 ...
1630         #     - if 0 the drawn arc is the one of lower angle (< Pi)
1631         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
1632         #     .
1633         #        \n
1634         #  - Flag2 (= control tolerance) is 0 or 1 ...
1635         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
1636         #     - if 1 the wire is built only if the end point is on the arc
1637         #       with a tolerance of 10^-7 on the distance else the creation fails
1638         #
1639         #  @param theCommand String, defining the sketcher in local
1640         #                    coordinates of the working plane.
1641         #  @param theWorkingPlane Nine double values, defining origin,
1642         #                         OZ and OX directions of the working plane.
1643         #  @return New GEOM.GEOM_Object, containing the created wire.
1644         #
1645         #  @ref tui_sketcher_page "Example"
1646         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0]):
1647             """
1648             Create a sketcher (wire or face), following the textual description, passed
1649             through theCommand argument.
1650             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
1651             Format of the description string have to be the following:
1652                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
1653             Where:
1654             - x1, y1 are coordinates of the first sketcher point (zero by default),
1655             - CMD is one of
1656                - "R angle" : Set the direction by angle
1657                - "D dx dy" : Set the direction by DX & DY
1658                
1659                - "TT x y" : Create segment by point at X & Y
1660                - "T dx dy" : Create segment by point with DX & DY
1661                - "L length" : Create segment by direction & Length
1662                - "IX x" : Create segment by direction & Intersect. X
1663                - "IY y" : Create segment by direction & Intersect. Y
1664
1665                - "C radius length" : Create arc by direction, radius and length(in degree)
1666                - "AA x y": Create arc by point at X & Y
1667                - "A dx dy" : Create arc by point with DX & DY
1668                - "A dx dy" : Create arc by point with DX & DY
1669                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
1670                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
1671                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
1672                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
1673
1674                - "WW" : Close Wire (to finish)
1675                - "WF" : Close Wire and build face (to finish)
1676             
1677             - Flag1 (= reverse) is 0 or 2 ...
1678                - if 0 the drawn arc is the one of lower angle (< Pi)
1679                - if 2 the drawn arc ius the one of greater angle (> Pi)
1680         
1681             - Flag2 (= control tolerance) is 0 or 1 ...
1682                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
1683                - if 1 the wire is built only if the end point is on the arc
1684                  with a tolerance of 10^-7 on the distance else the creation fails
1685
1686             Parameters:
1687                 theCommand String, defining the sketcher in local
1688                            coordinates of the working plane.
1689                 theWorkingPlane Nine double values, defining origin,
1690                                 OZ and OX directions of the working plane.
1691
1692             Returns:
1693                 New GEOM.GEOM_Object, containing the created wire.
1694             """
1695             # Example: see GEOM_TestAll.py
1696             theCommand,Parameters = ParseSketcherCommand(theCommand)
1697             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
1698             RaiseIfFailed("MakeSketcher", self.CurvesOp)
1699             anObj.SetParameters(Parameters)
1700             return anObj
1701
1702         ## Create a sketcher (wire or face), following the textual description,
1703         #  passed through <VAR>theCommand</VAR> argument. \n
1704         #  For format of the description string see MakeSketcher() method.\n
1705         #  @param theCommand String, defining the sketcher in local
1706         #                    coordinates of the working plane.
1707         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
1708         #  @return New GEOM.GEOM_Object, containing the created wire.
1709         #
1710         #  @ref tui_sketcher_page "Example"
1711         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane):
1712             """
1713             Create a sketcher (wire or face), following the textual description,
1714             passed through theCommand argument.
1715             For format of the description string see geompy.MakeSketcher() method.
1716
1717             Parameters:
1718                 theCommand String, defining the sketcher in local
1719                            coordinates of the working plane.
1720                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
1721
1722             Returns:
1723                 New GEOM.GEOM_Object, containing the created wire.
1724             """
1725             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
1726             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
1727             return anObj
1728
1729         ## Create a sketcher wire, following the numerical description,
1730         #  passed through <VAR>theCoordinates</VAR> argument. \n
1731         #  @param theCoordinates double values, defining points to create a wire,
1732         #                                                      passing from it.
1733         #  @return New GEOM.GEOM_Object, containing the created wire.
1734         #
1735         #  @ref tui_sketcher_page "Example"
1736         def Make3DSketcher(self, theCoordinates):
1737             """
1738             Create a sketcher wire, following the numerical description,
1739             passed through theCoordinates argument.
1740
1741             Parameters:
1742                 theCoordinates double values, defining points to create a wire,
1743                                passing from it.
1744
1745             Returns:
1746                 New GEOM_Object, containing the created wire.
1747             """
1748             theCoordinates,Parameters = ParseParameters(theCoordinates)
1749             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
1750             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
1751             anObj.SetParameters(Parameters)
1752             return anObj
1753
1754         # end of l3_sketcher
1755         ## @}
1756
1757         ## @addtogroup l3_3d_primitives
1758         ## @{
1759
1760         ## Create a box by coordinates of two opposite vertices.
1761         #
1762         #  @param x1,y1,z1 double values, defining first point it.
1763         #  @param x2,y2,z2 double values, defining first point it.
1764         #
1765         #  @return New GEOM.GEOM_Object, containing the created box.
1766         #  @ref tui_creation_box "Example"
1767         def MakeBox(self,x1,y1,z1,x2,y2,z2):
1768             """
1769             Create a box by coordinates of two opposite vertices.
1770             
1771             Parameters:
1772                 x1,y1,z1 double values, defining first point.
1773                 x2,y2,z2 double values, defining second point.
1774                 
1775             Returns:
1776                 New GEOM.GEOM_Object, containing the created box.
1777             """
1778             # Example: see GEOM_TestAll.py
1779             pnt1 = self.MakeVertex(x1,y1,z1)
1780             pnt2 = self.MakeVertex(x2,y2,z2)
1781             return self.MakeBoxTwoPnt(pnt1,pnt2)
1782
1783         ## Create a box with specified dimensions along the coordinate axes
1784         #  and with edges, parallel to the coordinate axes.
1785         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
1786         #  @param theDX Length of Box edges, parallel to OX axis.
1787         #  @param theDY Length of Box edges, parallel to OY axis.
1788         #  @param theDZ Length of Box edges, parallel to OZ axis.
1789         #  @return New GEOM.GEOM_Object, containing the created box.
1790         #
1791         #  @ref tui_creation_box "Example"
1792         def MakeBoxDXDYDZ(self,theDX, theDY, theDZ):
1793             """
1794             Create a box with specified dimensions along the coordinate axes
1795             and with edges, parallel to the coordinate axes.
1796             Center of the box will be at point (DX/2, DY/2, DZ/2).
1797
1798             Parameters:
1799                 theDX Length of Box edges, parallel to OX axis.
1800                 theDY Length of Box edges, parallel to OY axis.
1801                 theDZ Length of Box edges, parallel to OZ axis.
1802
1803             Returns:   
1804                 New GEOM.GEOM_Object, containing the created box.
1805             """
1806             # Example: see GEOM_TestAll.py
1807             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1808             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
1809             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
1810             anObj.SetParameters(Parameters)
1811             return anObj
1812
1813         ## Create a box with two specified opposite vertices,
1814         #  and with edges, parallel to the coordinate axes
1815         #  @param thePnt1 First of two opposite vertices.
1816         #  @param thePnt2 Second of two opposite vertices.
1817         #  @return New GEOM.GEOM_Object, containing the created box.
1818         #
1819         #  @ref tui_creation_box "Example"
1820         def MakeBoxTwoPnt(self,thePnt1, thePnt2):
1821             """
1822             Create a box with two specified opposite vertices,
1823             and with edges, parallel to the coordinate axes
1824
1825             Parameters:
1826                 thePnt1 First of two opposite vertices.
1827                 thePnt2 Second of two opposite vertices.
1828
1829             Returns:
1830                 New GEOM.GEOM_Object, containing the created box.
1831             """
1832             # Example: see GEOM_TestAll.py
1833             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
1834             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
1835             return anObj
1836
1837         ## Create a face with specified dimensions with edges parallel to coordinate axes.
1838         #  @param theH height of Face.
1839         #  @param theW width of Face.
1840         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
1841         #  @return New GEOM.GEOM_Object, containing the created face.
1842         #
1843         #  @ref tui_creation_face "Example"
1844         def MakeFaceHW(self,theH, theW, theOrientation):
1845             """
1846             Create a face with specified dimensions with edges parallel to coordinate axes.
1847
1848             Parameters:
1849                 theH height of Face.
1850                 theW width of Face.
1851                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
1852
1853             Returns:
1854                 New GEOM.GEOM_Object, containing the created face.
1855             """
1856             # Example: see GEOM_TestAll.py
1857             theH,theW,Parameters = ParseParameters(theH, theW)
1858             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
1859             RaiseIfFailed("MakeFaceHW", self.PrimOp)
1860             anObj.SetParameters(Parameters)
1861             return anObj
1862
1863         ## Create a face from another plane and two sizes,
1864         #  vertical size and horisontal size.
1865         #  @param theObj   Normale vector to the creating face or
1866         #  the face object.
1867         #  @param theH     Height (vertical size).
1868         #  @param theW     Width (horisontal size).
1869         #  @return New GEOM.GEOM_Object, containing the created face.
1870         #
1871         #  @ref tui_creation_face "Example"
1872         def MakeFaceObjHW(self, theObj, theH, theW):
1873             """
1874             Create a face from another plane and two sizes,
1875             vertical size and horisontal size.
1876
1877             Parameters:
1878                 theObj   Normale vector to the creating face or
1879                          the face object.
1880                 theH     Height (vertical size).
1881                 theW     Width (horisontal size).
1882
1883             Returns:
1884                 New GEOM_Object, containing the created face.
1885             """
1886             # Example: see GEOM_TestAll.py
1887             theH,theW,Parameters = ParseParameters(theH, theW)
1888             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
1889             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
1890             anObj.SetParameters(Parameters)
1891             return anObj
1892
1893         ## Create a disk with given center, normal vector and radius.
1894         #  @param thePnt Disk center.
1895         #  @param theVec Vector, normal to the plane of the disk.
1896         #  @param theR Disk radius.
1897         #  @return New GEOM.GEOM_Object, containing the created disk.
1898         #
1899         #  @ref tui_creation_disk "Example"
1900         def MakeDiskPntVecR(self,thePnt, theVec, theR):
1901             """
1902             Create a disk with given center, normal vector and radius.
1903
1904             Parameters:
1905                 thePnt Disk center.
1906                 theVec Vector, normal to the plane of the disk.
1907                 theR Disk radius.
1908
1909             Returns:    
1910                 New GEOM.GEOM_Object, containing the created disk.
1911             """
1912             # Example: see GEOM_TestAll.py
1913             theR,Parameters = ParseParameters(theR)
1914             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
1915             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
1916             anObj.SetParameters(Parameters)
1917             return anObj
1918
1919         ## Create a disk, passing through three given points
1920         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
1921         #  @return New GEOM.GEOM_Object, containing the created disk.
1922         #
1923         #  @ref tui_creation_disk "Example"
1924         def MakeDiskThreePnt(self,thePnt1, thePnt2, thePnt3):
1925             """
1926             Create a disk, passing through three given points
1927
1928             Parameters:
1929                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
1930
1931             Returns:    
1932                 New GEOM.GEOM_Object, containing the created disk.
1933             """
1934             # Example: see GEOM_TestAll.py
1935             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
1936             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
1937             return anObj
1938
1939         ## Create a disk with specified dimensions along OX-OY coordinate axes.
1940         #  @param theR Radius of Face.
1941         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
1942         #  @return New GEOM.GEOM_Object, containing the created disk.
1943         #
1944         #  @ref tui_creation_face "Example"
1945         def MakeDiskR(self,theR, theOrientation):
1946             """
1947             Create a disk with specified dimensions along OX-OY coordinate axes.
1948
1949             Parameters:
1950                 theR Radius of Face.
1951                 theOrientation set the orientation belong axis OXY or OYZ or OZX
1952
1953             Returns: 
1954                 New GEOM.GEOM_Object, containing the created disk.
1955
1956             Example of usage:
1957                 Disk3 = geompy.MakeDiskR(100., 1)   #(1 Doubles, 1 Int)->GEOM_Object
1958             """
1959             # Example: see GEOM_TestAll.py
1960             theR,Parameters = ParseParameters(theR)
1961             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
1962             RaiseIfFailed("MakeDiskR", self.PrimOp)
1963             anObj.SetParameters(Parameters)
1964             return anObj
1965
1966         ## Create a cylinder with given base point, axis, radius and height.
1967         #  @param thePnt Central point of cylinder base.
1968         #  @param theAxis Cylinder axis.
1969         #  @param theR Cylinder radius.
1970         #  @param theH Cylinder height.
1971         #  @return New GEOM.GEOM_Object, containing the created cylinder.
1972         #
1973         #  @ref tui_creation_cylinder "Example"
1974         def MakeCylinder(self,thePnt, theAxis, theR, theH):
1975             """
1976             Create a cylinder with given base point, axis, radius and height.
1977
1978             Parameters:
1979                 thePnt Central point of cylinder base.
1980                 theAxis Cylinder axis.
1981                 theR Cylinder radius.
1982                 theH Cylinder height.
1983
1984             Returns: 
1985                 New GEOM.GEOM_Object, containing the created cylinder.
1986             """
1987             # Example: see GEOM_TestAll.py
1988             theR,theH,Parameters = ParseParameters(theR, theH)
1989             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
1990             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
1991             anObj.SetParameters(Parameters)
1992             return anObj
1993
1994         ## Create a cylinder with given radius and height at
1995         #  the origin of coordinate system. Axis of the cylinder
1996         #  will be collinear to the OZ axis of the coordinate system.
1997         #  @param theR Cylinder radius.
1998         #  @param theH Cylinder height.
1999         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2000         #
2001         #  @ref tui_creation_cylinder "Example"
2002         def MakeCylinderRH(self,theR, theH):
2003             """
2004             Create a cylinder with given radius and height at
2005             the origin of coordinate system. Axis of the cylinder
2006             will be collinear to the OZ axis of the coordinate system.
2007
2008             Parameters:
2009                 theR Cylinder radius.
2010                 theH Cylinder height.
2011
2012             Returns:    
2013                 New GEOM.GEOM_Object, containing the created cylinder.
2014             """
2015             # Example: see GEOM_TestAll.py
2016             theR,theH,Parameters = ParseParameters(theR, theH)
2017             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2018             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2019             anObj.SetParameters(Parameters)
2020             return anObj
2021
2022         ## Create a sphere with given center and radius.
2023         #  @param thePnt Sphere center.
2024         #  @param theR Sphere radius.
2025         #  @return New GEOM.GEOM_Object, containing the created sphere.
2026         #
2027         #  @ref tui_creation_sphere "Example"
2028         def MakeSpherePntR(self, thePnt, theR):
2029             """
2030             Create a sphere with given center and radius.
2031
2032             Parameters:
2033                 thePnt Sphere center.
2034                 theR Sphere radius.
2035
2036             Returns:    
2037                 New GEOM.GEOM_Object, containing the created sphere.            
2038             """
2039             # Example: see GEOM_TestAll.py
2040             theR,Parameters = ParseParameters(theR)
2041             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2042             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2043             anObj.SetParameters(Parameters)
2044             return anObj
2045
2046         ## Create a sphere with given center and radius.
2047         #  @param x,y,z Coordinates of sphere center.
2048         #  @param theR Sphere radius.
2049         #  @return New GEOM.GEOM_Object, containing the created sphere.
2050         #
2051         #  @ref tui_creation_sphere "Example"
2052         def MakeSphere(self, x, y, z, theR):
2053             """
2054             Create a sphere with given center and radius.
2055
2056             Parameters: 
2057                 x,y,z Coordinates of sphere center.
2058                 theR Sphere radius.
2059
2060             Returns:
2061                 New GEOM.GEOM_Object, containing the created sphere.
2062             """
2063             # Example: see GEOM_TestAll.py
2064             point = self.MakeVertex(x, y, z)
2065             anObj = self.MakeSpherePntR(point, theR)
2066             return anObj
2067
2068         ## Create a sphere with given radius at the origin of coordinate system.
2069         #  @param theR Sphere radius.
2070         #  @return New GEOM.GEOM_Object, containing the created sphere.
2071         #
2072         #  @ref tui_creation_sphere "Example"
2073         def MakeSphereR(self, theR):
2074             """
2075             Create a sphere with given radius at the origin of coordinate system.
2076
2077             Parameters: 
2078                 theR Sphere radius.
2079
2080             Returns:
2081                 New GEOM.GEOM_Object, containing the created sphere.            
2082             """
2083             # Example: see GEOM_TestAll.py
2084             theR,Parameters = ParseParameters(theR)
2085             anObj = self.PrimOp.MakeSphereR(theR)
2086             RaiseIfFailed("MakeSphereR", self.PrimOp)
2087             anObj.SetParameters(Parameters)
2088             return anObj
2089
2090         ## Create a cone with given base point, axis, height and radiuses.
2091         #  @param thePnt Central point of the first cone base.
2092         #  @param theAxis Cone axis.
2093         #  @param theR1 Radius of the first cone base.
2094         #  @param theR2 Radius of the second cone base.
2095         #    \note If both radiuses are non-zero, the cone will be truncated.
2096         #    \note If the radiuses are equal, a cylinder will be created instead.
2097         #  @param theH Cone height.
2098         #  @return New GEOM.GEOM_Object, containing the created cone.
2099         #
2100         #  @ref tui_creation_cone "Example"
2101         def MakeCone(self,thePnt, theAxis, theR1, theR2, theH):
2102             """
2103             Create a cone with given base point, axis, height and radiuses.
2104
2105             Parameters: 
2106                 thePnt Central point of the first cone base.
2107                 theAxis Cone axis.
2108                 theR1 Radius of the first cone base.
2109                 theR2 Radius of the second cone base.
2110                 theH Cone height.
2111
2112            Note:
2113                 If both radiuses are non-zero, the cone will be truncated.
2114                 If the radiuses are equal, a cylinder will be created instead.
2115
2116            Returns:
2117                 New GEOM.GEOM_Object, containing the created cone.
2118             """
2119             # Example: see GEOM_TestAll.py
2120             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2121             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2122             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2123             anObj.SetParameters(Parameters)
2124             return anObj
2125
2126         ## Create a cone with given height and radiuses at
2127         #  the origin of coordinate system. Axis of the cone will
2128         #  be collinear to the OZ axis of the coordinate system.
2129         #  @param theR1 Radius of the first cone base.
2130         #  @param theR2 Radius of the second cone base.
2131         #    \note If both radiuses are non-zero, the cone will be truncated.
2132         #    \note If the radiuses are equal, a cylinder will be created instead.
2133         #  @param theH Cone height.
2134         #  @return New GEOM.GEOM_Object, containing the created cone.
2135         #
2136         #  @ref tui_creation_cone "Example"
2137         def MakeConeR1R2H(self,theR1, theR2, theH):
2138             """
2139             Create a cone with given height and radiuses at
2140             the origin of coordinate system. Axis of the cone will
2141             be collinear to the OZ axis of the coordinate system.
2142
2143             Parameters: 
2144                 theR1 Radius of the first cone base.
2145                 theR2 Radius of the second cone base.
2146                 theH Cone height.
2147
2148             Note:
2149                 If both radiuses are non-zero, the cone will be truncated.
2150                 If the radiuses are equal, a cylinder will be created instead.
2151
2152            Returns:
2153                 New GEOM.GEOM_Object, containing the created cone.
2154             """
2155             # Example: see GEOM_TestAll.py
2156             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2157             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
2158             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
2159             anObj.SetParameters(Parameters)
2160             return anObj
2161
2162         ## Create a torus with given center, normal vector and radiuses.
2163         #  @param thePnt Torus central point.
2164         #  @param theVec Torus axis of symmetry.
2165         #  @param theRMajor Torus major radius.
2166         #  @param theRMinor Torus minor radius.
2167         #  @return New GEOM.GEOM_Object, containing the created torus.
2168         #
2169         #  @ref tui_creation_torus "Example"
2170         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor):
2171             """
2172             Create a torus with given center, normal vector and radiuses.
2173
2174             Parameters: 
2175                 thePnt Torus central point.
2176                 theVec Torus axis of symmetry.
2177                 theRMajor Torus major radius.
2178                 theRMinor Torus minor radius.
2179
2180            Returns:
2181                 New GEOM.GEOM_Object, containing the created torus.
2182             """
2183             # Example: see GEOM_TestAll.py
2184             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
2185             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
2186             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
2187             anObj.SetParameters(Parameters)
2188             return anObj
2189
2190         ## Create a torus with given radiuses at the origin of coordinate system.
2191         #  @param theRMajor Torus major radius.
2192         #  @param theRMinor Torus minor radius.
2193         #  @return New GEOM.GEOM_Object, containing the created torus.
2194         #
2195         #  @ref tui_creation_torus "Example"
2196         def MakeTorusRR(self, theRMajor, theRMinor):
2197             """
2198            Create a torus with given radiuses at the origin of coordinate system.
2199
2200            Parameters: 
2201                 theRMajor Torus major radius.
2202                 theRMinor Torus minor radius.
2203
2204            Returns:
2205                 New GEOM.GEOM_Object, containing the created torus.            
2206             """
2207             # Example: see GEOM_TestAll.py
2208             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
2209             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
2210             RaiseIfFailed("MakeTorusRR", self.PrimOp)
2211             anObj.SetParameters(Parameters)
2212             return anObj
2213
2214         # end of l3_3d_primitives
2215         ## @}
2216
2217         ## @addtogroup l3_complex
2218         ## @{
2219
2220         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
2221         #  @param theBase Base shape to be extruded.
2222         #  @param thePoint1 First end of extrusion vector.
2223         #  @param thePoint2 Second end of extrusion vector.
2224         #  @param theScaleFactor Use it to make prism with scaled second base.
2225         #                        Nagative value means not scaled second base.
2226         #  @return New GEOM.GEOM_Object, containing the created prism.
2227         #
2228         #  @ref tui_creation_prism "Example"
2229         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0):
2230             """
2231             Create a shape by extrusion of the base shape along a vector, defined by two points.
2232
2233             Parameters: 
2234                 theBase Base shape to be extruded.
2235                 thePoint1 First end of extrusion vector.
2236                 thePoint2 Second end of extrusion vector.
2237                 theScaleFactor Use it to make prism with scaled second base.
2238                                Nagative value means not scaled second base.
2239
2240             Returns:
2241                 New GEOM.GEOM_Object, containing the created prism.
2242             """
2243             # Example: see GEOM_TestAll.py
2244             anObj = None
2245             Parameters = ""
2246             if theScaleFactor > 0:
2247                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
2248                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
2249             else:
2250                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
2251             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
2252             anObj.SetParameters(Parameters)
2253             return anObj
2254
2255         ## Create a shape by extrusion of the base shape along a
2256         #  vector, defined by two points, in 2 Ways (forward/backward).
2257         #  @param theBase Base shape to be extruded.
2258         #  @param thePoint1 First end of extrusion vector.
2259         #  @param thePoint2 Second end of extrusion vector.
2260         #  @return New GEOM.GEOM_Object, containing the created prism.
2261         #
2262         #  @ref tui_creation_prism "Example"
2263         def MakePrism2Ways(self, theBase, thePoint1, thePoint2):
2264             """
2265             Create a shape by extrusion of the base shape along a
2266             vector, defined by two points, in 2 Ways (forward/backward).
2267
2268             Parameters: 
2269                 theBase Base shape to be extruded.
2270                 thePoint1 First end of extrusion vector.
2271                 thePoint2 Second end of extrusion vector.
2272
2273             Returns:
2274                 New GEOM.GEOM_Object, containing the created prism.
2275             """
2276             # Example: see GEOM_TestAll.py
2277             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
2278             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
2279             return anObj
2280
2281         ## Create a shape by extrusion of the base shape along the vector,
2282         #  i.e. all the space, transfixed by the base shape during its translation
2283         #  along the vector on the given distance.
2284         #  @param theBase Base shape to be extruded.
2285         #  @param theVec Direction of extrusion.
2286         #  @param theH Prism dimension along theVec.
2287         #  @param theScaleFactor Use it to make prism with scaled second base.
2288         #                        Negative value means not scaled second base.
2289         #  @return New GEOM.GEOM_Object, containing the created prism.
2290         #
2291         #  @ref tui_creation_prism "Example"
2292         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0):
2293             """
2294             Create a shape by extrusion of the base shape along the vector,
2295             i.e. all the space, transfixed by the base shape during its translation
2296             along the vector on the given distance.
2297
2298             Parameters: 
2299                 theBase Base shape to be extruded.
2300                 theVec Direction of extrusion.
2301                 theH Prism dimension along theVec.
2302                 theScaleFactor Use it to make prism with scaled second base.
2303                                Negative value means not scaled second base.
2304
2305             Returns:
2306                 New GEOM.GEOM_Object, containing the created prism.
2307             """
2308             # Example: see GEOM_TestAll.py
2309             anObj = None
2310             Parameters = ""
2311             if theScaleFactor > 0:
2312                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
2313                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
2314             else:
2315                 theH,Parameters = ParseParameters(theH)
2316                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
2317             RaiseIfFailed("MakePrismVecH", self.PrimOp)
2318             anObj.SetParameters(Parameters)
2319             return anObj
2320
2321         ## Create a shape by extrusion of the base shape along the vector,
2322         #  i.e. all the space, transfixed by the base shape during its translation
2323         #  along the vector on the given distance in 2 Ways (forward/backward).
2324         #  @param theBase Base shape to be extruded.
2325         #  @param theVec Direction of extrusion.
2326         #  @param theH Prism dimension along theVec in forward direction.
2327         #  @return New GEOM.GEOM_Object, containing the created prism.
2328         #
2329         #  @ref tui_creation_prism "Example"
2330         def MakePrismVecH2Ways(self, theBase, theVec, theH):
2331             """
2332             Create a shape by extrusion of the base shape along the vector,
2333             i.e. all the space, transfixed by the base shape during its translation
2334             along the vector on the given distance in 2 Ways (forward/backward).
2335
2336             Parameters:
2337                 theBase Base shape to be extruded.
2338                 theVec Direction of extrusion.
2339                 theH Prism dimension along theVec in forward direction.
2340
2341             Returns:
2342                 New GEOM.GEOM_Object, containing the created prism.
2343             """
2344             # Example: see GEOM_TestAll.py
2345             theH,Parameters = ParseParameters(theH)
2346             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
2347             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
2348             anObj.SetParameters(Parameters)
2349             return anObj
2350
2351         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
2352         #  @param theBase Base shape to be extruded.
2353         #  @param theDX, theDY, theDZ Directions of extrusion.
2354         #  @param theScaleFactor Use it to make prism with scaled second base.
2355         #                        Nagative value means not scaled second base.
2356         #  @return New GEOM.GEOM_Object, containing the created prism.
2357         #
2358         #  @ref tui_creation_prism "Example"
2359         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0):
2360             """
2361             Create a shape by extrusion of the base shape along the dx, dy, dz direction
2362
2363             Parameters:
2364                 theBase Base shape to be extruded.
2365                 theDX, theDY, theDZ Directions of extrusion.
2366                 theScaleFactor Use it to make prism with scaled second base.
2367                                Nagative value means not scaled second base.
2368
2369             Returns: 
2370                 New GEOM.GEOM_Object, containing the created prism.
2371             """
2372             # Example: see GEOM_TestAll.py
2373             anObj = None
2374             Parameters = ""
2375             if theScaleFactor > 0:
2376                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
2377                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
2378             else:
2379                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2380                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
2381             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
2382             anObj.SetParameters(Parameters)
2383             return anObj
2384
2385         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
2386         #  i.e. all the space, transfixed by the base shape during its translation
2387         #  along the vector on the given distance in 2 Ways (forward/backward).
2388         #  @param theBase Base shape to be extruded.
2389         #  @param theDX, theDY, theDZ Directions of extrusion.
2390         #  @return New GEOM.GEOM_Object, containing the created prism.
2391         #
2392         #  @ref tui_creation_prism "Example"
2393         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ):
2394             """
2395             Create a shape by extrusion of the base shape along the dx, dy, dz direction
2396             i.e. all the space, transfixed by the base shape during its translation
2397             along the vector on the given distance in 2 Ways (forward/backward).
2398
2399             Parameters:
2400                 theBase Base shape to be extruded.
2401                 theDX, theDY, theDZ Directions of extrusion.
2402
2403             Returns:
2404                 New GEOM.GEOM_Object, containing the created prism.
2405             """
2406             # Example: see GEOM_TestAll.py
2407             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2408             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
2409             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
2410             anObj.SetParameters(Parameters)
2411             return anObj
2412
2413         ## Create a shape by revolution of the base shape around the axis
2414         #  on the given angle, i.e. all the space, transfixed by the base
2415         #  shape during its rotation around the axis on the given angle.
2416         #  @param theBase Base shape to be rotated.
2417         #  @param theAxis Rotation axis.
2418         #  @param theAngle Rotation angle in radians.
2419         #  @return New GEOM.GEOM_Object, containing the created revolution.
2420         #
2421         #  @ref tui_creation_revolution "Example"
2422         def MakeRevolution(self, theBase, theAxis, theAngle):
2423             """
2424             Create a shape by revolution of the base shape around the axis
2425             on the given angle, i.e. all the space, transfixed by the base
2426             shape during its rotation around the axis on the given angle.
2427
2428             Parameters:
2429                 theBase Base shape to be rotated.
2430                 theAxis Rotation axis.
2431                 theAngle Rotation angle in radians.
2432
2433             Returns: 
2434                 New GEOM.GEOM_Object, containing the created revolution.
2435             """
2436             # Example: see GEOM_TestAll.py
2437             theAngle,Parameters = ParseParameters(theAngle)
2438             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
2439             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
2440             anObj.SetParameters(Parameters)
2441             return anObj
2442
2443         ## Create a shape by revolution of the base shape around the axis
2444         #  on the given angle, i.e. all the space, transfixed by the base
2445         #  shape during its rotation around the axis on the given angle in
2446         #  both directions (forward/backward)
2447         #  @param theBase Base shape to be rotated.
2448         #  @param theAxis Rotation axis.
2449         #  @param theAngle Rotation angle in radians.
2450         #  @return New GEOM.GEOM_Object, containing the created revolution.
2451         #
2452         #  @ref tui_creation_revolution "Example"
2453         def MakeRevolution2Ways(self, theBase, theAxis, theAngle):
2454             """
2455             Create a shape by revolution of the base shape around the axis
2456             on the given angle, i.e. all the space, transfixed by the base
2457             shape during its rotation around the axis on the given angle in
2458             both directions (forward/backward).
2459
2460             Parameters:
2461                 theBase Base shape to be rotated.
2462                 theAxis Rotation axis.
2463                 theAngle Rotation angle in radians.
2464
2465             Returns: 
2466                 New GEOM.GEOM_Object, containing the created revolution.
2467             """
2468             theAngle,Parameters = ParseParameters(theAngle)
2469             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
2470             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
2471             anObj.SetParameters(Parameters)
2472             return anObj
2473
2474         ## Create a filling from the given compound of contours.
2475         #  @param theShape the compound of contours
2476         #  @param theMinDeg a minimal degree of BSpline surface to create
2477         #  @param theMaxDeg a maximal degree of BSpline surface to create
2478         #  @param theTol2D a 2d tolerance to be reached
2479         #  @param theTol3D a 3d tolerance to be reached
2480         #  @param theNbIter a number of iteration of approximation algorithm
2481         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
2482         #  @param isApprox if True, BSpline curves are generated in the process
2483         #                  of surface construction. By default it is False, that means
2484         #                  the surface is created using Besier curves. The usage of
2485         #                  Approximation makes the algorithm work slower, but allows
2486         #                  building the surface for rather complex cases
2487         #  @return New GEOM.GEOM_Object, containing the created filling surface.
2488         #
2489         #  @ref tui_creation_filling "Example"
2490         def MakeFilling(self, theShape, theMinDeg, theMaxDeg, theTol2D,
2491                         theTol3D, theNbIter, theMethod=GEOM.FOM_Default, isApprox=0):
2492             """
2493             Create a filling from the given compound of contours.
2494
2495             Parameters:
2496                 theShape the compound of contours
2497                 theMinDeg a minimal degree of BSpline surface to create
2498                 theMaxDeg a maximal degree of BSpline surface to create
2499                 theTol2D a 2d tolerance to be reached
2500                 theTol3D a 3d tolerance to be reached
2501                 theNbIter a number of iteration of approximation algorithm
2502                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
2503                 isApprox if True, BSpline curves are generated in the process
2504                          of surface construction. By default it is False, that means
2505                          the surface is created using Besier curves. The usage of
2506                          Approximation makes the algorithm work slower, but allows
2507                          building the surface for rather complex cases
2508
2509             Returns: 
2510                 New GEOM.GEOM_Object, containing the created filling surface.
2511
2512             Example of usage:
2513                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
2514             """
2515             # Example: see GEOM_TestAll.py
2516             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
2517             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
2518                                             theTol2D, theTol3D, theNbIter,
2519                                             theMethod, isApprox)
2520             RaiseIfFailed("MakeFilling", self.PrimOp)
2521             anObj.SetParameters(Parameters)
2522             return anObj
2523
2524         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
2525         #  @param theSeqSections - set of specified sections.
2526         #  @param theModeSolid - mode defining building solid or shell
2527         #  @param thePreci - precision 3D used for smoothing
2528         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
2529         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
2530         #
2531         #  @ref swig_todo "Example"
2532         def MakeThruSections(self,theSeqSections,theModeSolid,thePreci,theRuled):
2533             """
2534             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
2535
2536             Parameters:
2537                 theSeqSections - set of specified sections.
2538                 theModeSolid - mode defining building solid or shell
2539                 thePreci - precision 3D used for smoothing
2540                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
2541
2542             Returns:
2543                 New GEOM.GEOM_Object, containing the created shell or solid.
2544             """
2545             # Example: see GEOM_TestAll.py
2546             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
2547             RaiseIfFailed("MakeThruSections", self.PrimOp)
2548             return anObj
2549
2550         ## Create a shape by extrusion of the base shape along
2551         #  the path shape. The path shape can be a wire or an edge.
2552         #  @param theBase Base shape to be extruded.
2553         #  @param thePath Path shape to extrude the base shape along it.
2554         #  @return New GEOM.GEOM_Object, containing the created pipe.
2555         #
2556         #  @ref tui_creation_pipe "Example"
2557         def MakePipe(self,theBase, thePath):
2558             """
2559             Create a shape by extrusion of the base shape along
2560             the path shape. The path shape can be a wire or an edge.
2561
2562             Parameters:
2563                 theBase Base shape to be extruded.
2564                 thePath Path shape to extrude the base shape along it.
2565
2566             Returns:
2567                 New GEOM.GEOM_Object, containing the created pipe.
2568             """
2569             # Example: see GEOM_TestAll.py
2570             anObj = self.PrimOp.MakePipe(theBase, thePath)
2571             RaiseIfFailed("MakePipe", self.PrimOp)
2572             return anObj
2573
2574         ## Create a shape by extrusion of the profile shape along
2575         #  the path shape. The path shape can be a wire or an edge.
2576         #  the several profiles can be specified in the several locations of path.
2577         #  @param theSeqBases - list of  Bases shape to be extruded.
2578         #  @param theLocations - list of locations on the path corresponding
2579         #                        specified list of the Bases shapes. Number of locations
2580         #                        should be equal to number of bases or list of locations can be empty.
2581         #  @param thePath - Path shape to extrude the base shape along it.
2582         #  @param theWithContact - the mode defining that the section is translated to be in
2583         #                          contact with the spine.
2584         #  @param theWithCorrection - defining that the section is rotated to be
2585         #                             orthogonal to the spine tangent in the correspondent point
2586         #  @return New GEOM.GEOM_Object, containing the created pipe.
2587         #
2588         #  @ref tui_creation_pipe_with_diff_sec "Example"
2589         def MakePipeWithDifferentSections(self, theSeqBases,
2590                                           theLocations, thePath,
2591                                           theWithContact, theWithCorrection):
2592             """
2593             Create a shape by extrusion of the profile shape along
2594             the path shape. The path shape can be a wire or an edge.
2595             the several profiles can be specified in the several locations of path.
2596
2597             Parameters:
2598                 theSeqBases - list of  Bases shape to be extruded.
2599                 theLocations - list of locations on the path corresponding
2600                                specified list of the Bases shapes. Number of locations
2601                                should be equal to number of bases or list of locations can be empty.
2602                 thePath - Path shape to extrude the base shape along it.
2603                 theWithContact - the mode defining that the section is translated to be in
2604                                  contact with the spine(0/1)
2605                 theWithCorrection - defining that the section is rotated to be
2606                                     orthogonal to the spine tangent in the correspondent point (0/1)
2607
2608             Returns:
2609                 New GEOM.GEOM_Object, containing the created pipe.
2610             """
2611             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
2612                                                               theLocations, thePath,
2613                                                               theWithContact, theWithCorrection)
2614             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
2615             return anObj
2616
2617         ## Create a shape by extrusion of the profile shape along
2618         #  the path shape. The path shape can be a wire or a edge.
2619         #  the several profiles can be specified in the several locations of path.
2620         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
2621         #                       shell or face. If number of faces in neighbour sections
2622         #                       aren't coincided result solid between such sections will
2623         #                       be created using external boundaries of this shells.
2624         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
2625         #                          This list is used for searching correspondences between
2626         #                          faces in the sections. Size of this list must be equal
2627         #                          to size of list of base shapes.
2628         #  @param theLocations - list of locations on the path corresponding
2629         #                        specified list of the Bases shapes. Number of locations
2630         #                        should be equal to number of bases. First and last
2631         #                        locations must be coincided with first and last vertexes
2632         #                        of path correspondingly.
2633         #  @param thePath - Path shape to extrude the base shape along it.
2634         #  @param theWithContact - the mode defining that the section is translated to be in
2635         #                          contact with the spine.
2636         #  @param theWithCorrection - defining that the section is rotated to be
2637         #                             orthogonal to the spine tangent in the correspondent point
2638         #  @return New GEOM.GEOM_Object, containing the created solids.
2639         #
2640         #  @ref tui_creation_pipe_with_shell_sec "Example"
2641         def MakePipeWithShellSections(self,theSeqBases, theSeqSubBases,
2642                                       theLocations, thePath,
2643                                       theWithContact, theWithCorrection):
2644             """
2645             Create a shape by extrusion of the profile shape along
2646             the path shape. The path shape can be a wire or a edge.
2647             the several profiles can be specified in the several locations of path.
2648
2649             Parameters:
2650                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
2651                               shell or face. If number of faces in neighbour sections
2652                               aren't coincided result solid between such sections will
2653                               be created using external boundaries of this shells.
2654                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
2655                                  This list is used for searching correspondences between
2656                                  faces in the sections. Size of this list must be equal
2657                                  to size of list of base shapes.
2658                 theLocations - list of locations on the path corresponding
2659                                specified list of the Bases shapes. Number of locations
2660                                should be equal to number of bases. First and last
2661                                locations must be coincided with first and last vertexes
2662                                of path correspondingly.
2663                 thePath - Path shape to extrude the base shape along it.
2664                 theWithContact - the mode defining that the section is translated to be in
2665                                  contact with the spine (0/1)
2666                 theWithCorrection - defining that the section is rotated to be
2667                                     orthogonal to the spine tangent in the correspondent point (0/1)
2668
2669             Returns:                           
2670                 New GEOM.GEOM_Object, containing the created solids.
2671             """
2672             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
2673                                                           theLocations, thePath,
2674                                                           theWithContact, theWithCorrection)
2675             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
2676             return anObj
2677
2678         ## Create a shape by extrusion of the profile shape along
2679         #  the path shape. This function is used only for debug pipe
2680         #  functionality - it is a version of function MakePipeWithShellSections()
2681         #  which give a possibility to recieve information about
2682         #  creating pipe between each pair of sections step by step.
2683         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
2684                                              theLocations, thePath,
2685                                              theWithContact, theWithCorrection):
2686             """
2687             Create a shape by extrusion of the profile shape along
2688             the path shape. This function is used only for debug pipe
2689             functionality - it is a version of previous function
2690             geompy.MakePipeWithShellSections() which give a possibility to
2691             recieve information about creating pipe between each pair of
2692             sections step by step.
2693             """
2694             res = []
2695             nbsect = len(theSeqBases)
2696             nbsubsect = len(theSeqSubBases)
2697             #print "nbsect = ",nbsect
2698             for i in range(1,nbsect):
2699                 #print "  i = ",i
2700                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
2701                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
2702                 tmpSeqSubBases = []
2703                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
2704                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
2705                                                               tmpLocations, thePath,
2706                                                               theWithContact, theWithCorrection)
2707                 if self.PrimOp.IsDone() == 0:
2708                     print "Problems with pipe creation between ",i," and ",i+1," sections"
2709                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
2710                     break
2711                 else:
2712                     print "Pipe between ",i," and ",i+1," sections is OK"
2713                     res.append(anObj)
2714                     pass
2715                 pass
2716
2717             resc = self.MakeCompound(res)
2718             #resc = self.MakeSewing(res, 0.001)
2719             #print "resc: ",resc
2720             return resc
2721
2722         ## Create solids between given sections
2723         #  @param theSeqBases - list of sections (shell or face).
2724         #  @param theLocations - list of corresponding vertexes
2725         #  @return New GEOM.GEOM_Object, containing the created solids.
2726         #
2727         #  @ref tui_creation_pipe_without_path "Example"
2728         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations):
2729             """
2730             Create solids between given sections
2731
2732             Parameters:
2733                 theSeqBases - list of sections (shell or face).
2734                 theLocations - list of corresponding vertexes
2735
2736             Returns:
2737                 New GEOM.GEOM_Object, containing the created solids.
2738             """
2739             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
2740             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
2741             return anObj
2742
2743         ## Create a shape by extrusion of the base shape along
2744         #  the path shape with constant bi-normal direction along the given vector.
2745         #  The path shape can be a wire or an edge.
2746         #  @param theBase Base shape to be extruded.
2747         #  @param thePath Path shape to extrude the base shape along it.
2748         #  @param theVec Vector defines a constant binormal direction to keep the
2749         #                same angle beetween the direction and the sections
2750         #                along the sweep surface.
2751         #  @return New GEOM.GEOM_Object, containing the created pipe.
2752         #
2753         #  @ref tui_creation_pipe "Example"
2754         def MakePipeBiNormalAlongVector(self,theBase, thePath, theVec):
2755             """
2756             Create a shape by extrusion of the base shape along
2757             the path shape with constant bi-normal direction along the given vector.
2758             The path shape can be a wire or an edge.
2759
2760             Parameters:
2761                 theBase Base shape to be extruded.
2762                 thePath Path shape to extrude the base shape along it.
2763                 theVec Vector defines a constant binormal direction to keep the
2764                        same angle beetween the direction and the sections
2765                        along the sweep surface.
2766
2767             Returns:              
2768                 New GEOM.GEOM_Object, containing the created pipe.
2769             """
2770             # Example: see GEOM_TestAll.py
2771             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
2772             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
2773             return anObj
2774
2775         # end of l3_complex
2776         ## @}
2777
2778         ## @addtogroup l3_advanced
2779         ## @{
2780
2781         ## Create a linear edge with specified ends.
2782         #  @param thePnt1 Point for the first end of edge.
2783         #  @param thePnt2 Point for the second end of edge.
2784         #  @return New GEOM.GEOM_Object, containing the created edge.
2785         #
2786         #  @ref tui_creation_edge "Example"
2787         def MakeEdge(self,thePnt1, thePnt2):
2788             """
2789             Create a linear edge with specified ends.
2790
2791             Parameters:
2792                 thePnt1 Point for the first end of edge.
2793                 thePnt2 Point for the second end of edge.
2794
2795             Returns:           
2796                 New GEOM.GEOM_Object, containing the created edge.
2797             """
2798             # Example: see GEOM_TestAll.py
2799             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
2800             RaiseIfFailed("MakeEdge", self.ShapesOp)
2801             return anObj
2802
2803         ## Create a new edge, corresponding to the given length on the given curve.
2804         #  @param theRefCurve The referenced curve (edge).
2805         #  @param theLength Length on the referenced curve. It can be negative.
2806         #  @param theStartPoint Any point can be selected for it, the new edge will begin
2807         #                       at the end of \a theRefCurve, close to the selected point.
2808         #                       If None, start from the first point of \a theRefCurve.
2809         #  @return New GEOM.GEOM_Object, containing the created edge.
2810         #
2811         #  @ref tui_creation_edge "Example"
2812         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None):
2813             """
2814             Create a new edge, corresponding to the given length on the given curve.
2815
2816             Parameters:
2817                 theRefCurve The referenced curve (edge).
2818                 theLength Length on the referenced curve. It can be negative.
2819                 theStartPoint Any point can be selected for it, the new edge will begin
2820                               at the end of theRefCurve, close to the selected point.
2821                               If None, start from the first point of theRefCurve.
2822
2823             Returns:              
2824                 New GEOM.GEOM_Object, containing the created edge.
2825             """
2826             # Example: see GEOM_TestAll.py
2827             theLength, Parameters = ParseParameters(theLength)
2828             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
2829             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
2830             anObj.SetParameters(Parameters)
2831             return anObj
2832
2833         ## Create an edge from specified wire.
2834         #  @param theWire source Wire
2835         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
2836         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
2837         #  @return New GEOM.GEOM_Object, containing the created edge.
2838         #
2839         #  @ref tui_creation_edge "Example"
2840         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12):
2841             """
2842             Create an edge from specified wire.
2843
2844             Parameters:
2845                 theWire source Wire
2846                 theLinearTolerance linear tolerance value (default = 1e-07)
2847                 theAngularTolerance angular tolerance value (default = 1e-12)
2848
2849             Returns:
2850                 New GEOM.GEOM_Object, containing the created edge.
2851             """
2852             # Example: see GEOM_TestAll.py
2853             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
2854             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
2855             return anObj
2856
2857         ## Create a wire from the set of edges and wires.
2858         #  @param theEdgesAndWires List of edges and/or wires.
2859         #  @param theTolerance Maximum distance between vertices, that will be merged.
2860         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
2861         #  @return New GEOM.GEOM_Object, containing the created wire.
2862         #
2863         #  @ref tui_creation_wire "Example"
2864         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07):
2865             """
2866             Create a wire from the set of edges and wires.
2867
2868             Parameters:
2869                 theEdgesAndWires List of edges and/or wires.
2870                 theTolerance Maximum distance between vertices, that will be merged.
2871                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
2872
2873             Returns:                    
2874                 New GEOM.GEOM_Object, containing the created wire.
2875             """
2876             # Example: see GEOM_TestAll.py
2877             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
2878             RaiseIfFailed("MakeWire", self.ShapesOp)
2879             return anObj
2880
2881         ## Create a face on the given wire.
2882         #  @param theWire closed Wire or Edge to build the face on.
2883         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
2884         #                        If the tolerance of the obtained planar face is less
2885         #                        than 1e-06, this face will be returned, otherwise the
2886         #                        algorithm tries to build any suitable face on the given
2887         #                        wire and prints a warning message.
2888         #  @return New GEOM.GEOM_Object, containing the created face.
2889         #
2890         #  @ref tui_creation_face "Example"
2891         def MakeFace(self, theWire, isPlanarWanted):
2892             """
2893             Create a face on the given wire.
2894
2895             Parameters:
2896                 theWire closed Wire or Edge to build the face on.
2897                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
2898                                If the tolerance of the obtained planar face is less
2899                                than 1e-06, this face will be returned, otherwise the
2900                                algorithm tries to build any suitable face on the given
2901                                wire and prints a warning message.
2902
2903             Returns:
2904                 New GEOM.GEOM_Object, containing the created face.
2905             """
2906             # Example: see GEOM_TestAll.py
2907             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
2908             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
2909                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
2910             else:
2911                 RaiseIfFailed("MakeFace", self.ShapesOp)
2912             return anObj
2913
2914         ## Create a face on the given wires set.
2915         #  @param theWires List of closed wires or edges to build the face on.
2916         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
2917         #                        If the tolerance of the obtained planar face is less
2918         #                        than 1e-06, this face will be returned, otherwise the
2919         #                        algorithm tries to build any suitable face on the given
2920         #                        wire and prints a warning message.
2921         #  @return New GEOM.GEOM_Object, containing the created face.
2922         #
2923         #  @ref tui_creation_face "Example"
2924         def MakeFaceWires(self, theWires, isPlanarWanted):
2925             """
2926             Create a face on the given wires set.
2927
2928             Parameters:
2929                 theWires List of closed wires or edges to build the face on.
2930                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
2931                                If the tolerance of the obtained planar face is less
2932                                than 1e-06, this face will be returned, otherwise the
2933                                algorithm tries to build any suitable face on the given
2934                                wire and prints a warning message.
2935
2936             Returns: 
2937                 New GEOM.GEOM_Object, containing the created face.
2938             """
2939             # Example: see GEOM_TestAll.py
2940             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
2941             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
2942                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
2943             else:
2944                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
2945             return anObj
2946
2947         ## See MakeFaceWires() method for details.
2948         #
2949         #  @ref tui_creation_face "Example 1"
2950         #  \n @ref swig_MakeFaces  "Example 2"
2951         def MakeFaces(self, theWires, isPlanarWanted):
2952             """
2953             See geompy.MakeFaceWires() method for details.
2954             """
2955             # Example: see GEOM_TestOthers.py
2956             anObj = self.MakeFaceWires(theWires, isPlanarWanted)
2957             return anObj
2958
2959         ## Create a shell from the set of faces and shells.
2960         #  @param theFacesAndShells List of faces and/or shells.
2961         #  @return New GEOM.GEOM_Object, containing the created shell.
2962         #
2963         #  @ref tui_creation_shell "Example"
2964         def MakeShell(self,theFacesAndShells):
2965             """
2966             Create a shell from the set of faces and shells.
2967
2968             Parameters:
2969                 theFacesAndShells List of faces and/or shells.
2970
2971             Returns:
2972                 New GEOM.GEOM_Object, containing the created shell.
2973             """
2974             # Example: see GEOM_TestAll.py
2975             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
2976             RaiseIfFailed("MakeShell", self.ShapesOp)
2977             return anObj
2978
2979         ## Create a solid, bounded by the given shells.
2980         #  @param theShells Sequence of bounding shells.
2981         #  @return New GEOM.GEOM_Object, containing the created solid.
2982         #
2983         #  @ref tui_creation_solid "Example"
2984         def MakeSolid(self,theShells):
2985             """
2986             Create a solid, bounded by the given shells.
2987
2988             Parameters:
2989                 theShells Sequence of bounding shells.
2990
2991             Returns:
2992                 New GEOM.GEOM_Object, containing the created solid.
2993             """
2994             # Example: see GEOM_TestAll.py
2995             anObj = self.ShapesOp.MakeSolidShells(theShells)
2996             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
2997             return anObj
2998
2999         ## Create a compound of the given shapes.
3000         #  @param theShapes List of shapes to put in compound.
3001         #  @return New GEOM.GEOM_Object, containing the created compound.
3002         #
3003         #  @ref tui_creation_compound "Example"
3004         def MakeCompound(self,theShapes):
3005             """
3006             Create a compound of the given shapes.
3007
3008             Parameters:
3009                 theShapes List of shapes to put in compound.
3010
3011             Returns:
3012                 New GEOM.GEOM_Object, containing the created compound.
3013             """
3014             # Example: see GEOM_TestAll.py
3015             anObj = self.ShapesOp.MakeCompound(theShapes)
3016             RaiseIfFailed("MakeCompound", self.ShapesOp)
3017             return anObj
3018
3019         # end of l3_advanced
3020         ## @}
3021
3022         ## @addtogroup l2_measure
3023         ## @{
3024
3025         ## Gives quantity of faces in the given shape.
3026         #  @param theShape Shape to count faces of.
3027         #  @return Quantity of faces.
3028         #
3029         #  @ref swig_NumberOf "Example"
3030         def NumberOfFaces(self, theShape):
3031             """
3032             Gives quantity of faces in the given shape.
3033
3034             Parameters:
3035                 theShape Shape to count faces of.
3036
3037             Returns:    
3038                 Quantity of faces.
3039             """
3040             # Example: see GEOM_TestOthers.py
3041             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
3042             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
3043             return nb_faces
3044
3045         ## Gives quantity of edges in the given shape.
3046         #  @param theShape Shape to count edges of.
3047         #  @return Quantity of edges.
3048         #
3049         #  @ref swig_NumberOf "Example"
3050         def NumberOfEdges(self, theShape):
3051             """
3052             Gives quantity of edges in the given shape.
3053
3054             Parameters:
3055                 theShape Shape to count edges of.
3056
3057             Returns:    
3058                 Quantity of edges.
3059             """
3060             # Example: see GEOM_TestOthers.py
3061             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
3062             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
3063             return nb_edges
3064
3065         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
3066         #  @param theShape Shape to count sub-shapes of.
3067         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
3068         #  @return Quantity of sub-shapes of given type.
3069         #
3070         #  @ref swig_NumberOf "Example"
3071         def NumberOfSubShapes(self, theShape, theShapeType):
3072             """
3073             Gives quantity of sub-shapes of type theShapeType in the given shape.
3074
3075             Parameters:
3076                 theShape Shape to count sub-shapes of.
3077                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
3078
3079             Returns:
3080                 Quantity of sub-shapes of given type.
3081             """
3082             # Example: see GEOM_TestOthers.py
3083             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
3084             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
3085             return nb_ss
3086
3087         ## Gives quantity of solids in the given shape.
3088         #  @param theShape Shape to count solids in.
3089         #  @return Quantity of solids.
3090         #
3091         #  @ref swig_NumberOf "Example"
3092         def NumberOfSolids(self, theShape):
3093             """
3094             Gives quantity of solids in the given shape.
3095
3096             Parameters:
3097                 theShape Shape to count solids in.
3098
3099             Returns:
3100                 Quantity of solids.
3101             """
3102             # Example: see GEOM_TestOthers.py
3103             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"])
3104             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
3105             return nb_solids
3106
3107         # end of l2_measure
3108         ## @}
3109
3110         ## @addtogroup l3_healing
3111         ## @{
3112
3113         ## Reverses an orientation the given shape.
3114         #  @param theShape Shape to be reversed.
3115         #  @return The reversed copy of theShape.
3116         #
3117         #  @ref swig_ChangeOrientation "Example"
3118         def ChangeOrientation(self,theShape):
3119             """
3120             Reverses an orientation the given shape.
3121
3122             Parameters:
3123                 theShape Shape to be reversed.
3124
3125             Returns:   
3126                 The reversed copy of theShape.
3127             """
3128             # Example: see GEOM_TestAll.py
3129             anObj = self.ShapesOp.ChangeOrientation(theShape)
3130             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
3131             return anObj
3132
3133         ## See ChangeOrientation() method for details.
3134         #
3135         #  @ref swig_OrientationChange "Example"
3136         def OrientationChange(self,theShape):
3137             """
3138             See geompy.ChangeOrientation method for details.
3139             """
3140             # Example: see GEOM_TestOthers.py
3141             anObj = self.ChangeOrientation(theShape)
3142             return anObj
3143
3144         # end of l3_healing
3145         ## @}
3146
3147         ## @addtogroup l4_obtain
3148         ## @{
3149
3150         ## Retrieve all free faces from the given shape.
3151         #  Free face is a face, which is not shared between two shells of the shape.
3152         #  @param theShape Shape to find free faces in.
3153         #  @return List of IDs of all free faces, contained in theShape.
3154         #
3155         #  @ref tui_measurement_tools_page "Example"
3156         def GetFreeFacesIDs(self,theShape):
3157             """
3158             Retrieve all free faces from the given shape.
3159             Free face is a face, which is not shared between two shells of the shape.
3160
3161             Parameters:
3162                 theShape Shape to find free faces in.
3163
3164             Returns:
3165                 List of IDs of all free faces, contained in theShape.
3166             """
3167             # Example: see GEOM_TestOthers.py
3168             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
3169             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
3170             return anIDs
3171
3172         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
3173         #  @param theShape1 Shape to find sub-shapes in.
3174         #  @param theShape2 Shape to find shared sub-shapes with.
3175         #  @param theShapeType Type of sub-shapes to be retrieved.
3176         #  @return List of sub-shapes of theShape1, shared with theShape2.
3177         #
3178         #  @ref swig_GetSharedShapes "Example"
3179         def GetSharedShapes(self,theShape1, theShape2, theShapeType):
3180             """
3181             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
3182
3183             Parameters:
3184                 theShape1 Shape to find sub-shapes in.
3185                 theShape2 Shape to find shared sub-shapes with.
3186                 theShapeType Type of sub-shapes to be retrieved.
3187
3188             Returns:
3189                 List of sub-shapes of theShape1, shared with theShape2.
3190             """
3191             # Example: see GEOM_TestOthers.py
3192             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
3193             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
3194             return aList
3195
3196         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
3197         #  @param theShapes Shapes to find common sub-shapes of.
3198         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3199         #  @return List of objects, that are sub-shapes of all given shapes.
3200         #
3201         #  @ref swig_GetSharedShapes "Example"
3202         def GetSharedShapesMulti(self, theShapes, theShapeType):
3203             """
3204             Get all sub-shapes, shared by all shapes in the list theShapes.
3205
3206             Parameters:
3207                 theShapes Shapes to find common sub-shapes of.
3208                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3209
3210             Returns:    
3211                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
3212             """
3213             # Example: see GEOM_TestOthers.py
3214             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
3215             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
3216             return aList
3217
3218         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3219         #  situated relatively the specified plane by the certain way,
3220         #  defined through <VAR>theState</VAR> parameter.
3221         #  @param theShape Shape to find sub-shapes of.
3222         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3223         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3224         #                direction and location of the plane to find shapes on.
3225         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3226         #  @return List of all found sub-shapes.
3227         #
3228         #  @ref swig_GetShapesOnPlane "Example"
3229         def GetShapesOnPlane(self,theShape, theShapeType, theAx1, theState):
3230             """
3231             Find in theShape all sub-shapes of type theShapeType,
3232             situated relatively the specified plane by the certain way,
3233             defined through theState parameter.
3234
3235             Parameters:
3236                 theShape Shape to find sub-shapes of.
3237                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3238                 theAx1 Vector (or line, or linear edge), specifying normal
3239                        direction and location of the plane to find shapes on.
3240                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3241
3242             Returns:
3243                 List of all found sub-shapes.
3244             """
3245             # Example: see GEOM_TestOthers.py
3246             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
3247             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
3248             return aList
3249
3250         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3251         #  situated relatively the specified plane by the certain way,
3252         #  defined through <VAR>theState</VAR> parameter.
3253         #  @param theShape Shape to find sub-shapes of.
3254         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3255         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3256         #                direction and location of the plane to find shapes on.
3257         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3258         #  @return List of all found sub-shapes indices.
3259         #
3260         #  @ref swig_GetShapesOnPlaneIDs "Example"
3261         def GetShapesOnPlaneIDs(self,theShape, theShapeType, theAx1, theState):
3262             """
3263             Find in theShape all sub-shapes of type theShapeType,
3264             situated relatively the specified plane by the certain way,
3265             defined through theState parameter.
3266
3267             Parameters:
3268                 theShape Shape to find sub-shapes of.
3269                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3270                 theAx1 Vector (or line, or linear edge), specifying normal
3271                        direction and location of the plane to find shapes on.
3272                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3273
3274             Returns:
3275                 List of all found sub-shapes indices.
3276             """
3277             # Example: see GEOM_TestOthers.py
3278             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
3279             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
3280             return aList
3281
3282         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3283         #  situated relatively the specified plane by the certain way,
3284         #  defined through <VAR>theState</VAR> parameter.
3285         #  @param theShape Shape to find sub-shapes of.
3286         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3287         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3288         #                direction of the plane to find shapes on.
3289         #  @param thePnt Point specifying location of the plane to find shapes on.
3290         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3291         #  @return List of all found sub-shapes.
3292         #
3293         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
3294         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState):
3295             """
3296             Find in theShape all sub-shapes of type theShapeType,
3297             situated relatively the specified plane by the certain way,
3298             defined through theState parameter.
3299
3300             Parameters:
3301                 theShape Shape to find sub-shapes of.
3302                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3303                 theAx1 Vector (or line, or linear edge), specifying normal
3304                        direction and location of the plane to find shapes on.
3305                 thePnt Point specifying location of the plane to find shapes on.
3306                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3307
3308             Returns:
3309                 List of all found sub-shapes.
3310             """
3311             # Example: see GEOM_TestOthers.py
3312             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
3313                                                                theAx1, thePnt, theState)
3314             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
3315             return aList
3316
3317         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3318         #  situated relatively the specified plane by the certain way,
3319         #  defined through <VAR>theState</VAR> parameter.
3320         #  @param theShape Shape to find sub-shapes of.
3321         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3322         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3323         #                direction of the plane to find shapes on.
3324         #  @param thePnt Point specifying location of the plane to find shapes on.
3325         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3326         #  @return List of all found sub-shapes indices.
3327         #
3328         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
3329         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
3330             """
3331             Find in theShape all sub-shapes of type theShapeType,
3332             situated relatively the specified plane by the certain way,
3333             defined through theState parameter.
3334
3335             Parameters:
3336                 theShape Shape to find sub-shapes of.
3337                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3338                 theAx1 Vector (or line, or linear edge), specifying normal
3339                        direction and location of the plane to find shapes on.
3340                 thePnt Point specifying location of the plane to find shapes on.
3341                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3342
3343             Returns:
3344                 List of all found sub-shapes indices.
3345             """
3346             # Example: see GEOM_TestOthers.py
3347             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
3348                                                                   theAx1, thePnt, theState)
3349             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
3350             return aList
3351
3352         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3353         #  the specified cylinder by the certain way, defined through \a theState parameter.
3354         #  @param theShape Shape to find sub-shapes of.
3355         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3356         #  @param theAxis Vector (or line, or linear edge), specifying
3357         #                 axis of the cylinder to find shapes on.
3358         #  @param theRadius Radius of the cylinder to find shapes on.
3359         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3360         #  @return List of all found sub-shapes.
3361         #
3362         #  @ref swig_GetShapesOnCylinder "Example"
3363         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState):
3364             """
3365             Find in theShape all sub-shapes of type theShapeType, situated relatively
3366             the specified cylinder by the certain way, defined through theState parameter.
3367
3368             Parameters:
3369                 theShape Shape to find sub-shapes of.
3370                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3371                 theAxis Vector (or line, or linear edge), specifying
3372                         axis of the cylinder to find shapes on.
3373                 theRadius Radius of the cylinder to find shapes on.
3374                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3375
3376             Returns:
3377                 List of all found sub-shapes.
3378             """
3379             # Example: see GEOM_TestOthers.py
3380             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
3381             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
3382             return aList
3383
3384         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3385         #  the specified cylinder by the certain way, defined through \a theState parameter.
3386         #  @param theShape Shape to find sub-shapes of.
3387         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3388         #  @param theAxis Vector (or line, or linear edge), specifying
3389         #                 axis of the cylinder to find shapes on.
3390         #  @param theRadius Radius of the cylinder to find shapes on.
3391         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3392         #  @return List of all found sub-shapes indices.
3393         #
3394         #  @ref swig_GetShapesOnCylinderIDs "Example"
3395         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
3396             """
3397             Find in theShape all sub-shapes of type theShapeType, situated relatively
3398             the specified cylinder by the certain way, defined through theState parameter.
3399
3400             Parameters:
3401                 theShape Shape to find sub-shapes of.
3402                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3403                 theAxis Vector (or line, or linear edge), specifying
3404                         axis of the cylinder to find shapes on.
3405                 theRadius Radius of the cylinder to find shapes on.
3406                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3407
3408             Returns:
3409                 List of all found sub-shapes indices.
3410             """
3411             # Example: see GEOM_TestOthers.py
3412             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
3413             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
3414             return aList
3415
3416         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3417         #  the specified cylinder by the certain way, defined through \a theState parameter.
3418         #  @param theShape Shape to find sub-shapes of.
3419         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3420         #  @param theAxis Vector (or line, or linear edge), specifying
3421         #                 axis of the cylinder to find shapes on.
3422         #  @param thePnt Point specifying location of the bottom of the cylinder.
3423         #  @param theRadius Radius of the cylinder to find shapes on.
3424         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3425         #  @return List of all found sub-shapes.
3426         #
3427         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
3428         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
3429             """
3430             Find in theShape all sub-shapes of type theShapeType, situated relatively
3431             the specified cylinder by the certain way, defined through theState parameter.
3432
3433             Parameters:
3434                 theShape Shape to find sub-shapes of.
3435                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3436                 theAxis Vector (or line, or linear edge), specifying
3437                         axis of the cylinder to find shapes on.
3438                 theRadius Radius of the cylinder to find shapes on.
3439                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3440
3441             Returns:
3442                 List of all found sub-shapes.
3443             """
3444             # Example: see GEOM_TestOthers.py
3445             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
3446             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
3447             return aList
3448
3449         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3450         #  the specified cylinder by the certain way, defined through \a theState parameter.
3451         #  @param theShape Shape to find sub-shapes of.
3452         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3453         #  @param theAxis Vector (or line, or linear edge), specifying
3454         #                 axis of the cylinder to find shapes on.
3455         #  @param thePnt Point specifying location of the bottom of the cylinder.
3456         #  @param theRadius Radius of the cylinder to find shapes on.
3457         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3458         #  @return List of all found sub-shapes indices
3459         #
3460         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
3461         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
3462             """
3463             Find in theShape all sub-shapes of type theShapeType, situated relatively
3464             the specified cylinder by the certain way, defined through theState parameter.
3465
3466             Parameters:
3467                 theShape Shape to find sub-shapes of.
3468                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3469                 theAxis Vector (or line, or linear edge), specifying
3470                         axis of the cylinder to find shapes on.
3471                 theRadius Radius of the cylinder to find shapes on.
3472                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3473
3474             Returns:
3475                 List of all found sub-shapes indices.            
3476             """
3477             # Example: see GEOM_TestOthers.py
3478             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
3479             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
3480             return aList
3481
3482         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3483         #  the specified sphere by the certain way, defined through \a theState parameter.
3484         #  @param theShape Shape to find sub-shapes of.
3485         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3486         #  @param theCenter Point, specifying center of the sphere to find shapes on.
3487         #  @param theRadius Radius of the sphere to find shapes on.
3488         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3489         #  @return List of all found sub-shapes.
3490         #
3491         #  @ref swig_GetShapesOnSphere "Example"
3492         def GetShapesOnSphere(self,theShape, theShapeType, theCenter, theRadius, theState):
3493             """
3494             Find in theShape all sub-shapes of type theShapeType, situated relatively
3495             the specified sphere by the certain way, defined through theState parameter.
3496
3497             Parameters:
3498                 theShape Shape to find sub-shapes of.
3499                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3500                 theCenter Point, specifying center of the sphere to find shapes on.
3501                 theRadius Radius of the sphere to find shapes on.
3502                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3503
3504             Returns:
3505                 List of all found sub-shapes.
3506             """
3507             # Example: see GEOM_TestOthers.py
3508             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
3509             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
3510             return aList
3511
3512         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3513         #  the specified sphere by the certain way, defined through \a theState parameter.
3514         #  @param theShape Shape to find sub-shapes of.
3515         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3516         #  @param theCenter Point, specifying center of the sphere to find shapes on.
3517         #  @param theRadius Radius of the sphere to find shapes on.
3518         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3519         #  @return List of all found sub-shapes indices.
3520         #
3521         #  @ref swig_GetShapesOnSphereIDs "Example"
3522         def GetShapesOnSphereIDs(self,theShape, theShapeType, theCenter, theRadius, theState):
3523             """
3524             Find in theShape all sub-shapes of type theShapeType, situated relatively
3525             the specified sphere by the certain way, defined through theState parameter.
3526
3527             Parameters:
3528                 theShape Shape to find sub-shapes of.
3529                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3530                 theCenter Point, specifying center of the sphere to find shapes on.
3531                 theRadius Radius of the sphere to find shapes on.
3532                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3533
3534             Returns:
3535                 List of all found sub-shapes indices.
3536             """
3537             # Example: see GEOM_TestOthers.py
3538             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
3539             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
3540             return aList
3541
3542         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3543         #  the specified quadrangle by the certain way, defined through \a theState parameter.
3544         #  @param theShape Shape to find sub-shapes of.
3545         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3546         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
3547         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
3548         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3549         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3550         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3551         #  @return List of all found sub-shapes.
3552         #
3553         #  @ref swig_GetShapesOnQuadrangle "Example"
3554         def GetShapesOnQuadrangle(self, theShape, theShapeType,
3555                                   theTopLeftPoint, theTopRigthPoint,
3556                                   theBottomLeftPoint, theBottomRigthPoint, theState):
3557             """
3558             Find in theShape all sub-shapes of type theShapeType, situated relatively
3559             the specified quadrangle by the certain way, defined through theState parameter.
3560
3561             Parameters:
3562                 theShape Shape to find sub-shapes of.
3563                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3564                 theTopLeftPoint Point, specifying top left corner of a quadrangle
3565                 theTopRigthPoint Point, specifying top right corner of a quadrangle
3566                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3567                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3568                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3569
3570             Returns:
3571                 List of all found sub-shapes.
3572             """
3573             # Example: see GEOM_TestOthers.py
3574             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
3575                                                         theTopLeftPoint, theTopRigthPoint,
3576                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
3577             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
3578             return aList
3579
3580         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3581         #  the specified quadrangle by the certain way, defined through \a theState parameter.
3582         #  @param theShape Shape to find sub-shapes of.
3583         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3584         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
3585         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
3586         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3587         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3588         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3589         #  @return List of all found sub-shapes indices.
3590         #
3591         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
3592         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
3593                                      theTopLeftPoint, theTopRigthPoint,
3594                                      theBottomLeftPoint, theBottomRigthPoint, theState):
3595             """
3596             Find in theShape all sub-shapes of type theShapeType, situated relatively
3597             the specified quadrangle by the certain way, defined through theState parameter.
3598
3599             Parameters:
3600                 theShape Shape to find sub-shapes of.
3601                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3602                 theTopLeftPoint Point, specifying top left corner of a quadrangle
3603                 theTopRigthPoint Point, specifying top right corner of a quadrangle
3604                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3605                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3606                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3607
3608             Returns:
3609                 List of all found sub-shapes indices.
3610             """
3611
3612             # Example: see GEOM_TestOthers.py
3613             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
3614                                                            theTopLeftPoint, theTopRigthPoint,
3615                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
3616             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
3617             return aList
3618
3619         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3620         #  the specified \a theBox by the certain way, defined through \a theState parameter.
3621         #  @param theBox Shape for relative comparing.
3622         #  @param theShape Shape to find sub-shapes of.
3623         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3624         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3625         #  @return List of all found sub-shapes.
3626         #
3627         #  @ref swig_GetShapesOnBox "Example"
3628         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState):
3629             """
3630             Find in theShape all sub-shapes of type theShapeType, situated relatively
3631             the specified theBox by the certain way, defined through theState parameter.
3632
3633             Parameters:
3634                 theBox Shape for relative comparing.
3635                 theShape Shape to find sub-shapes of.
3636                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3637                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3638
3639             Returns:
3640                 List of all found sub-shapes.
3641             """
3642             # Example: see GEOM_TestOthers.py
3643             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
3644             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
3645             return aList
3646
3647         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3648         #  the specified \a theBox by the certain way, defined through \a theState parameter.
3649         #  @param theBox Shape for relative comparing.
3650         #  @param theShape Shape to find sub-shapes of.
3651         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3652         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3653         #  @return List of all found sub-shapes indices.
3654         #
3655         #  @ref swig_GetShapesOnBoxIDs "Example"
3656         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
3657             """
3658             Find in theShape all sub-shapes of type theShapeType, situated relatively
3659             the specified theBox by the certain way, defined through theState parameter.
3660
3661             Parameters:
3662                 theBox Shape for relative comparing.
3663                 theShape Shape to find sub-shapes of.
3664                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3665                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3666
3667             Returns:
3668                 List of all found sub-shapes indices.
3669             """
3670             # Example: see GEOM_TestOthers.py
3671             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
3672             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
3673             return aList
3674
3675         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3676         #  situated relatively the specified \a theCheckShape by the
3677         #  certain way, defined through \a theState parameter.
3678         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3679         #  @param theShape Shape to find sub-shapes of.
3680         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
3681         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3682         #  @return List of all found sub-shapes.
3683         #
3684         #  @ref swig_GetShapesOnShape "Example"
3685         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState):
3686             """
3687             Find in theShape all sub-shapes of type theShapeType,
3688             situated relatively the specified theCheckShape by the
3689             certain way, defined through theState parameter.
3690
3691             Parameters:
3692                 theCheckShape Shape for relative comparing. It must be a solid.
3693                 theShape Shape to find sub-shapes of.
3694                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3695                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3696
3697             Returns:
3698                 List of all found sub-shapes.
3699             """
3700             # Example: see GEOM_TestOthers.py
3701             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
3702                                                    theShapeType, theState)
3703             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
3704             return aList
3705
3706         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3707         #  situated relatively the specified \a theCheckShape by the
3708         #  certain way, defined through \a theState parameter.
3709         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3710         #  @param theShape Shape to find sub-shapes of.
3711         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3712         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3713         #  @return All found sub-shapes as compound.
3714         #
3715         #  @ref swig_GetShapesOnShapeAsCompound "Example"
3716         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState):
3717             """
3718             Find in theShape all sub-shapes of type theShapeType,
3719             situated relatively the specified theCheckShape by the
3720             certain way, defined through theState parameter.
3721
3722             Parameters:
3723                 theCheckShape Shape for relative comparing. It must be a solid.
3724                 theShape Shape to find sub-shapes of.
3725                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3726                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3727
3728             Returns:
3729                 All found sub-shapes as compound.
3730             """
3731             # Example: see GEOM_TestOthers.py
3732             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
3733                                                              theShapeType, theState)
3734             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
3735             return anObj
3736
3737         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3738         #  situated relatively the specified \a theCheckShape by the
3739         #  certain way, defined through \a theState parameter.
3740         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3741         #  @param theShape Shape to find sub-shapes of.
3742         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3743         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3744         #  @return List of all found sub-shapes indices.
3745         #
3746         #  @ref swig_GetShapesOnShapeIDs "Example"
3747         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
3748             """
3749             Find in theShape all sub-shapes of type theShapeType,
3750             situated relatively the specified theCheckShape by the
3751             certain way, defined through theState parameter.
3752
3753             Parameters:
3754                 theCheckShape Shape for relative comparing. It must be a solid.
3755                 theShape Shape to find sub-shapes of.
3756                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3757                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3758
3759             Returns:
3760                 List of all found sub-shapes indices.
3761             """
3762             # Example: see GEOM_TestOthers.py
3763             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
3764                                                       theShapeType, theState)
3765             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
3766             return aList
3767
3768         ## Get sub-shape(s) of theShapeWhere, which are
3769         #  coincident with \a theShapeWhat or could be a part of it.
3770         #  @param theShapeWhere Shape to find sub-shapes of.
3771         #  @param theShapeWhat Shape, specifying what to find.
3772         #  @param isNewImplementation implementation of GetInPlace functionality
3773         #             (default = False, old alghorithm based on shape properties)
3774         #  @return Group of all found sub-shapes or a single found sub-shape.
3775         #
3776         #  @note This function has a restriction on argument shapes.
3777         #        If \a theShapeWhere has curved parts with significantly
3778         #        outstanding centres (i.e. the mass centre of a part is closer to
3779         #        \a theShapeWhat than to the part), such parts will not be found.
3780         #        @image html get_in_place_lost_part.png
3781         #
3782         #  @ref swig_GetInPlace "Example"
3783         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False):
3784             """
3785             Get sub-shape(s) of theShapeWhere, which are
3786             coincident with  theShapeWhat or could be a part of it.
3787
3788             Parameters:
3789                 theShapeWhere Shape to find sub-shapes of.
3790                 theShapeWhat Shape, specifying what to find.
3791                 isNewImplementation Implementation of GetInPlace functionality
3792                                     (default = False, old alghorithm based on shape properties)
3793
3794             Returns:
3795                 Group of all found sub-shapes or a single found sub-shape.
3796
3797                 
3798             Note:
3799                 This function has a restriction on argument shapes.
3800                 If theShapeWhere has curved parts with significantly
3801                 outstanding centres (i.e. the mass centre of a part is closer to
3802                 theShapeWhat than to the part), such parts will not be found.
3803             """
3804             # Example: see GEOM_TestOthers.py
3805             anObj = None
3806             if isNewImplementation:
3807                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
3808             else:
3809                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
3810                 pass
3811             RaiseIfFailed("GetInPlace", self.ShapesOp)
3812             return anObj
3813
3814         ## Get sub-shape(s) of \a theShapeWhere, which are
3815         #  coincident with \a theShapeWhat or could be a part of it.
3816         #
3817         #  Implementation of this method is based on a saved history of an operation,
3818         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
3819         #  arguments (an argument shape or a sub-shape of an argument shape).
3820         #  The operation could be the Partition or one of boolean operations,
3821         #  performed on simple shapes (not on compounds).
3822         #
3823         #  @param theShapeWhere Shape to find sub-shapes of.
3824         #  @param theShapeWhat Shape, specifying what to find (must be in the
3825         #                      building history of the ShapeWhere).
3826         #  @return Group of all found sub-shapes or a single found sub-shape.
3827         #
3828         #  @ref swig_GetInPlace "Example"
3829         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat):
3830             """
3831             Implementation of this method is based on a saved history of an operation,
3832             produced theShapeWhere. The theShapeWhat must be among this operation's
3833             arguments (an argument shape or a sub-shape of an argument shape).
3834             The operation could be the Partition or one of boolean operations,
3835             performed on simple shapes (not on compounds).
3836
3837             Parameters:
3838                 theShapeWhere Shape to find sub-shapes of.
3839                 theShapeWhat Shape, specifying what to find (must be in the
3840                                 building history of the ShapeWhere).
3841
3842             Returns:
3843                 Group of all found sub-shapes or a single found sub-shape.
3844             """
3845             # Example: see GEOM_TestOthers.py
3846             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
3847             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
3848             return anObj
3849
3850         ## Get sub-shape of theShapeWhere, which is
3851         #  equal to \a theShapeWhat.
3852         #  @param theShapeWhere Shape to find sub-shape of.
3853         #  @param theShapeWhat Shape, specifying what to find.
3854         #  @return New GEOM.GEOM_Object for found sub-shape.
3855         #
3856         #  @ref swig_GetSame "Example"
3857         def GetSame(self,theShapeWhere, theShapeWhat):
3858             """
3859             Get sub-shape of theShapeWhere, which is
3860             equal to theShapeWhat.
3861
3862             Parameters:
3863                 theShapeWhere Shape to find sub-shape of.
3864                 theShapeWhat Shape, specifying what to find.
3865
3866             Returns:
3867                 New GEOM.GEOM_Object for found sub-shape.
3868             """
3869             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
3870             RaiseIfFailed("GetSame", self.ShapesOp)
3871             return anObj
3872
3873
3874         ## Get sub-shape indices of theShapeWhere, which is
3875         #  equal to \a theShapeWhat.
3876         #  @param theShapeWhere Shape to find sub-shape of.
3877         #  @param theShapeWhat Shape, specifying what to find.
3878         #  @return List of all found sub-shapes indices. 
3879         #
3880         #  @ref swig_GetSame "Example"
3881         def GetSameIDs(self,theShapeWhere, theShapeWhat):
3882             """
3883             Get sub-shape indices of theShapeWhere, which is
3884             equal to theShapeWhat.
3885
3886             Parameters:
3887                 theShapeWhere Shape to find sub-shape of.
3888                 theShapeWhat Shape, specifying what to find.
3889
3890             Returns:
3891                 List of all found sub-shapes indices.
3892             """
3893             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
3894             RaiseIfFailed("GetSameIDs", self.ShapesOp)
3895             return anObj
3896
3897
3898         # end of l4_obtain
3899         ## @}
3900
3901         ## @addtogroup l4_access
3902         ## @{
3903
3904         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
3905         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
3906         #  @param aShape Shape to get sub-shape of.
3907         #  @param ListOfID List of sub-shapes indices.
3908         #  @return Found sub-shape.
3909         #
3910         #  @ref swig_all_decompose "Example"
3911         def GetSubShape(self, aShape, ListOfID):
3912             """
3913             Obtain a composite sub-shape of aShape, composed from sub-shapes
3914             of aShape, selected by their unique IDs inside aShape
3915
3916             Parameters:
3917                aShape Shape to get sub-shape of.
3918                ListOfID List of sub-shapes indices.
3919
3920             Returns:
3921                 Found sub-shape.
3922             """
3923             # Example: see GEOM_TestAll.py
3924             anObj = self.AddSubShape(aShape,ListOfID)
3925             return anObj
3926
3927         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
3928         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
3929         #  @param aShape Shape to get sub-shape of.
3930         #  @param aSubShape Sub-shapes of aShape.
3931         #  @return ID of found sub-shape.
3932         #
3933         #  @ref swig_all_decompose "Example"
3934         def GetSubShapeID(self, aShape, aSubShape):
3935             """
3936             Obtain unique ID of sub-shape aSubShape inside aShape
3937             of aShape, selected by their unique IDs inside aShape
3938
3939             Parameters:
3940                aShape Shape to get sub-shape of.
3941                aSubShape Sub-shapes of aShape.
3942
3943             Returns:
3944                ID of found sub-shape.
3945             """
3946             # Example: see GEOM_TestAll.py
3947             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
3948             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
3949             return anID
3950
3951         # end of l4_access
3952         ## @}
3953
3954         ## @addtogroup l4_decompose
3955         ## @{
3956
3957         ## Get all sub-shapes and groups of \a theShape,
3958         #  that were created already by any other methods.
3959         #  @param theShape Any shape.
3960         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
3961         #                       returned, else all found sub-shapes and groups.
3962         #  @return List of existing sub-objects of \a theShape.
3963         #
3964         #  @ref swig_all_decompose "Example"
3965         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
3966             """
3967             Get all sub-shapes and groups of theShape,
3968             that were created already by any other methods.
3969
3970             Parameters:
3971                 theShape Any shape.
3972                 theGroupsOnly If this parameter is TRUE, only groups will be
3973                                  returned, else all found sub-shapes and groups.
3974
3975             Returns:
3976                 List of existing sub-objects of theShape.
3977             """
3978             # Example: see GEOM_TestAll.py
3979             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
3980             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
3981             return ListObj
3982
3983         ## Get all groups of \a theShape,
3984         #  that were created already by any other methods.
3985         #  @param theShape Any shape.
3986         #  @return List of existing groups of \a theShape.
3987         #
3988         #  @ref swig_all_decompose "Example"
3989         def GetGroups(self, theShape):
3990             """
3991             Get all groups of theShape,
3992             that were created already by any other methods.
3993
3994             Parameters:
3995                 theShape Any shape.
3996
3997             Returns:
3998                 List of existing groups of theShape.
3999             """
4000             # Example: see GEOM_TestAll.py
4001             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
4002             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
4003             return ListObj
4004
4005         ## Explode a shape on sub-shapes of a given type.
4006         #  If the shape itself matches the type, it is also returned.
4007         #  @param aShape Shape to be exploded.
4008         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
4009         #  @return List of sub-shapes of type theShapeType, contained in theShape.
4010         #
4011         #  @ref swig_all_decompose "Example"
4012         def SubShapeAll(self, aShape, aType):
4013             """
4014             Explode a shape on sub-shapes of a given type.
4015             If the shape itself matches the type, it is also returned.
4016
4017             Parameters:
4018                 aShape Shape to be exploded.
4019                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
4020
4021             Returns:
4022                 List of sub-shapes of type theShapeType, contained in theShape.
4023             """
4024             # Example: see GEOM_TestAll.py
4025             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, False)
4026             RaiseIfFailed("SubShapeAll", self.ShapesOp)
4027             return ListObj
4028
4029         ## Explode a shape on sub-shapes of a given type.
4030         #  @param aShape Shape to be exploded.
4031         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4032         #  @return List of IDs of sub-shapes.
4033         #
4034         #  @ref swig_all_decompose "Example"
4035         def SubShapeAllIDs(self, aShape, aType):
4036             """
4037             Explode a shape on sub-shapes of a given type.
4038
4039             Parameters:
4040                 aShape Shape to be exploded (see geompy.ShapeType) 
4041                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4042
4043             Returns:
4044                 List of IDs of sub-shapes.
4045             """
4046             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, False)
4047             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4048             return ListObj
4049
4050         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
4051         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
4052         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4053         #  @param aShape Shape to get sub-shape of.
4054         #  @param ListOfInd List of sub-shapes indices.
4055         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4056         #  @return A compound of sub-shapes of aShape.
4057         #
4058         #  @ref swig_all_decompose "Example"
4059         def SubShape(self, aShape, aType, ListOfInd):
4060             """
4061             Obtain a compound of sub-shapes of aShape,
4062             selected by they indices in list of all sub-shapes of type aType.
4063             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4064             
4065             Parameters:
4066                 aShape Shape to get sub-shape of.
4067                 ListOfID List of sub-shapes indices.
4068                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4069
4070             Returns:
4071                 A compound of sub-shapes of aShape.
4072             """
4073             # Example: see GEOM_TestAll.py
4074             ListOfIDs = []
4075             AllShapeIDsList = self.SubShapeAllIDs(aShape, aType)
4076             for ind in ListOfInd:
4077                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4078             anObj = self.GetSubShape(aShape, ListOfIDs)
4079             return anObj
4080
4081         ## Explode a shape on sub-shapes of a given type.
4082         #  Sub-shapes will be sorted by coordinates of their gravity centers.
4083         #  If the shape itself matches the type, it is also returned.
4084         #  @param aShape Shape to be exploded.
4085         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4086         #  @return List of sub-shapes of type theShapeType, contained in theShape.
4087         #
4088         #  @ref swig_SubShapeAllSorted "Example"
4089         def SubShapeAllSortedCentres(self, aShape, aType):
4090             """
4091             Explode a shape on sub-shapes of a given type.
4092             Sub-shapes will be sorted by coordinates of their gravity centers.
4093             If the shape itself matches the type, it is also returned.
4094
4095             Parameters: 
4096                 aShape Shape to be exploded.
4097                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4098
4099             Returns: 
4100                 List of sub-shapes of type theShapeType, contained in theShape.
4101             """
4102             # Example: see GEOM_TestAll.py
4103             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, True)
4104             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
4105             return ListObj
4106
4107         ## Explode a shape on sub-shapes of a given type.
4108         #  Sub-shapes will be sorted by coordinates of their gravity centers.
4109         #  @param aShape Shape to be exploded.
4110         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4111         #  @return List of IDs of sub-shapes.
4112         #
4113         #  @ref swig_all_decompose "Example"
4114         def SubShapeAllSortedCentresIDs(self, aShape, aType):
4115             """
4116             Explode a shape on sub-shapes of a given type.
4117             Sub-shapes will be sorted by coordinates of their gravity centers.
4118
4119             Parameters: 
4120                 aShape Shape to be exploded.
4121                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4122
4123             Returns: 
4124                 List of IDs of sub-shapes.
4125             """
4126             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, True)
4127             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4128             return ListIDs
4129
4130         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
4131         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
4132         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4133         #  @param aShape Shape to get sub-shape of.
4134         #  @param ListOfInd List of sub-shapes indices.
4135         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4136         #  @return A compound of sub-shapes of aShape.
4137         #
4138         #  @ref swig_all_decompose "Example"
4139         def SubShapeSortedCentres(self, aShape, aType, ListOfInd):
4140             """
4141             Obtain a compound of sub-shapes of aShape,
4142             selected by they indices in sorted list of all sub-shapes of type aType.
4143             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4144
4145             Parameters:
4146                 aShape Shape to get sub-shape of.
4147                 ListOfID List of sub-shapes indices.
4148                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4149
4150             Returns:
4151                 A compound of sub-shapes of aShape.
4152             """
4153             # Example: see GEOM_TestAll.py
4154             ListOfIDs = []
4155             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, aType)
4156             for ind in ListOfInd:
4157                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4158             anObj = self.GetSubShape(aShape, ListOfIDs)
4159             return anObj
4160
4161         ## Extract shapes (excluding the main shape) of given type.
4162         #  @param aShape The shape.
4163         #  @param aType  The shape type (see ShapeType())
4164         #  @param isSorted Boolean flag to switch sorting on/off.
4165         #  @return List of sub-shapes of type aType, contained in aShape.
4166         #
4167         #  @ref swig_FilletChamfer "Example"
4168         def ExtractShapes(self, aShape, aType, isSorted = False):
4169             """
4170             Extract shapes (excluding the main shape) of given type.
4171
4172             Parameters:
4173                 aShape The shape.
4174                 aType  The shape type (see geompy.ShapeType)
4175                 isSorted Boolean flag to switch sorting on/off.
4176
4177             Returns:     
4178                 List of sub-shapes of type aType, contained in aShape.
4179             """
4180             # Example: see GEOM_TestAll.py
4181             ListObj = self.ShapesOp.ExtractSubShapes(aShape, aType, isSorted)
4182             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
4183             return ListObj
4184
4185         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
4186         #  @param aShape Main shape.
4187         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
4188         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
4189         #
4190         #  @ref swig_all_decompose "Example"
4191         def SubShapes(self, aShape, anIDs):
4192             """
4193             Get a set of sub-shapes defined by their unique IDs inside theMainShape
4194
4195             Parameters:
4196                 aShape Main shape.
4197                 anIDs List of unique IDs of sub-shapes inside theMainShape.
4198
4199             Returns:      
4200                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
4201             """
4202             # Example: see GEOM_TestAll.py
4203             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
4204             RaiseIfFailed("SubShapes", self.ShapesOp)
4205             return ListObj
4206
4207         # end of l4_decompose
4208         ## @}
4209
4210         ## @addtogroup l4_decompose_d
4211         ## @{
4212
4213         ## Deprecated method
4214         #  It works like SubShapeAllSortedCentres(), but wrongly
4215         #  defines centres of faces, shells and solids.
4216         def SubShapeAllSorted(self, aShape, aType):
4217             """
4218             Deprecated method
4219             It works like geompy.SubShapeAllSortedCentres, but wrongly
4220             defines centres of faces, shells and solids.
4221             """
4222             ListObj = self.ShapesOp.MakeExplode(aShape, aType, True)
4223             RaiseIfFailed("MakeExplode", self.ShapesOp)
4224             return ListObj
4225
4226         ## Deprecated method
4227         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
4228         #  defines centres of faces, shells and solids.
4229         def SubShapeAllSortedIDs(self, aShape, aType):
4230             """
4231             Deprecated method
4232             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
4233             defines centres of faces, shells and solids.
4234             """
4235             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, aType, True)
4236             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4237             return ListIDs
4238
4239         ## Deprecated method
4240         #  It works like SubShapeSortedCentres(), but has a bug
4241         #  (wrongly defines centres of faces, shells and solids).
4242         def SubShapeSorted(self, aShape, aType, ListOfInd):
4243             """
4244             Deprecated method
4245             It works like geompy.SubShapeSortedCentres, but has a bug
4246             (wrongly defines centres of faces, shells and solids).
4247             """
4248             ListOfIDs = []
4249             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, aType)
4250             for ind in ListOfInd:
4251                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4252             anObj = self.GetSubShape(aShape, ListOfIDs)
4253             return anObj
4254
4255         # end of l4_decompose_d
4256         ## @}
4257
4258         ## @addtogroup l3_healing
4259         ## @{
4260
4261         ## Apply a sequence of Shape Healing operators to the given object.
4262         #  @param theShape Shape to be processed.
4263         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
4264         #  @param theParameters List of names of parameters
4265         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
4266         #  @param theValues List of values of parameters, in the same order
4267         #                    as parameters are listed in <VAR>theParameters</VAR> list.
4268         #
4269         #
4270         #  <b> Operators and Parameters: </b> \n
4271         #
4272         #  * \b FixShape - corrects invalid shapes. \n
4273         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
4274         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
4275         #
4276         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
4277         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
4278         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
4279         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
4280         #
4281         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
4282         #    surfaces in segments using a certain angle. \n
4283         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
4284         #    if Angle=180, four if Angle=90, etc). \n
4285         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
4286         #
4287         #  * \b SplitClosedFaces - splits closed faces in segments.
4288         #    The number of segments depends on the number of splitting points.\n
4289         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
4290         #
4291         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
4292         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
4293         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
4294         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
4295         #   This and the previous parameters can take the following values:\n
4296         #   \b Parametric \b Continuity \n
4297         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
4298         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
4299         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
4300         #    ruling out sharp edges).\n
4301         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
4302         #       are of the same magnitude).\n
4303         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
4304         #    or surfaces (d/du C(u)) are the same at junction. \n
4305         #   \b Geometric \b Continuity \n
4306         #   \b G1: first derivatives are proportional at junction.\n
4307         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
4308         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
4309         #   \b G2: first and second derivatives are proportional at junction.
4310         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
4311         #    continuity requires that the underlying parameterization was continuous as well.
4312         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
4313         #
4314         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
4315         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
4316         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
4317         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
4318         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
4319         #       with the specified parameters.\n
4320         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
4321         #       with the specified parameters.\n
4322         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
4323         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
4324         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
4325         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
4326         #
4327         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
4328         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
4329         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
4330         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
4331         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
4332         #
4333         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
4334         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
4335         #
4336         #
4337         #  @return New GEOM.GEOM_Object, containing processed shape.
4338         #
4339         #  \n @ref tui_shape_processing "Example"
4340         def ProcessShape(self, theShape, theOperators, theParameters, theValues):
4341             """
4342             Apply a sequence of Shape Healing operators to the given object.
4343
4344             Parameters:
4345                 theShape Shape to be processed.
4346                 theValues List of values of parameters, in the same order
4347                           as parameters are listed in theParameters list.
4348                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
4349                 theParameters List of names of parameters
4350                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
4351                  Operators and Parameters:
4352
4353                  * FixShape - corrects invalid shapes.
4354                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
4355                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
4356                  * FixFaceSize - removes small faces, such as spots and strips.
4357                      * FixFaceSize.Tolerance - defines minimum possible face size.
4358                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
4359                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
4360                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
4361                                 in segments using a certain angle.
4362                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
4363                                           if Angle=180, four if Angle=90, etc).
4364                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
4365                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
4366                                       splitting points.
4367                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
4368                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
4369                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
4370                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
4371                      * SplitContinuity.CurveContinuity - required continuity for curves.
4372                        This and the previous parameters can take the following values:
4373                        
4374                        Parametric Continuity:
4375                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
4376                                                    coincidental. The curves or surfaces may still meet at an angle,
4377                                                    giving rise to a sharp corner or edge).
4378                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
4379                                                    are parallel, ruling out sharp edges).
4380                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
4381                                                   or surfaces are of the same magnitude).
4382                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
4383                           curves or surfaces (d/du C(u)) are the same at junction.
4384                           
4385                        Geometric Continuity:
4386                        G1: first derivatives are proportional at junction.
4387                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
4388                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
4389                        G2: first and second derivatives are proportional at junction. As the names imply,
4390                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
4391                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
4392                            geometric continuity of order n, but not vice-versa.
4393                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
4394                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
4395                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
4396                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
4397                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
4398                                                         the specified parameters.
4399                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
4400                                                         the specified parameters.
4401                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
4402                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
4403                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
4404                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
4405                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
4406                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
4407                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
4408                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
4409                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
4410                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
4411                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
4412
4413             Returns:
4414                 New GEOM.GEOM_Object, containing processed shape.
4415
4416             Note: For more information look through SALOME Geometry User's Guide->
4417                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
4418             """
4419             # Example: see GEOM_TestHealing.py
4420             theValues,Parameters = ParseList(theValues)
4421             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
4422             # To avoid script failure in case of good argument shape
4423             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
4424                 return theShape
4425             RaiseIfFailed("ProcessShape", self.HealOp)
4426             for string in (theOperators + theParameters):
4427                 Parameters = ":" + Parameters
4428                 pass
4429             anObj.SetParameters(Parameters)
4430             return anObj
4431
4432         ## Remove faces from the given object (shape).
4433         #  @param theObject Shape to be processed.
4434         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
4435         #                  removes ALL faces of the given object.
4436         #  @return New GEOM.GEOM_Object, containing processed shape.
4437         #
4438         #  @ref tui_suppress_faces "Example"
4439         def SuppressFaces(self,theObject, theFaces):
4440             """
4441             Remove faces from the given object (shape).
4442
4443             Parameters:
4444                 theObject Shape to be processed.
4445                 theFaces Indices of faces to be removed, if EMPTY then the method
4446                          removes ALL faces of the given object.
4447
4448             Returns:
4449                 New GEOM.GEOM_Object, containing processed shape.
4450             """
4451             # Example: see GEOM_TestHealing.py
4452             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
4453             RaiseIfFailed("SuppressFaces", self.HealOp)
4454             return anObj
4455
4456         ## Sewing of some shapes into single shape.
4457         #  @param ListShape Shapes to be processed.
4458         #  @param theTolerance Required tolerance value.
4459         #  @return New GEOM.GEOM_Object, containing processed shape.
4460         #
4461         #  @ref tui_sewing "Example"
4462         def MakeSewing(self, ListShape, theTolerance):
4463             """
4464             Sewing of some shapes into single shape.
4465
4466             Parameters:
4467                 ListShape Shapes to be processed.
4468                 theTolerance Required tolerance value.
4469
4470             Returns:
4471                 New GEOM.GEOM_Object, containing processed shape.
4472             """
4473             # Example: see GEOM_TestHealing.py
4474             comp = self.MakeCompound(ListShape)
4475             anObj = self.Sew(comp, theTolerance)
4476             return anObj
4477
4478         ## Sewing of the given object.
4479         #  @param theObject Shape to be processed.
4480         #  @param theTolerance Required tolerance value.
4481         #  @return New GEOM.GEOM_Object, containing processed shape.
4482         def Sew(self, theObject, theTolerance):
4483             """
4484             Sewing of the given object.
4485
4486             Parameters:
4487                 theObject Shape to be processed.
4488                 theTolerance Required tolerance value.
4489
4490             Returns:
4491                 New GEOM.GEOM_Object, containing processed shape.
4492             """
4493             # Example: see MakeSewing() above
4494             theTolerance,Parameters = ParseParameters(theTolerance)
4495             anObj = self.HealOp.Sew(theObject, theTolerance)
4496             RaiseIfFailed("Sew", self.HealOp)
4497             anObj.SetParameters(Parameters)
4498             return anObj
4499
4500         ## Remove internal wires and edges from the given object (face).
4501         #  @param theObject Shape to be processed.
4502         #  @param theWires Indices of wires to be removed, if EMPTY then the method
4503         #                  removes ALL internal wires of the given object.
4504         #  @return New GEOM.GEOM_Object, containing processed shape.
4505         #
4506         #  @ref tui_suppress_internal_wires "Example"
4507         def SuppressInternalWires(self,theObject, theWires):
4508             """
4509             Remove internal wires and edges from the given object (face).
4510
4511             Parameters:
4512                 theObject Shape to be processed.
4513                 theWires Indices of wires to be removed, if EMPTY then the method
4514                          removes ALL internal wires of the given object.
4515
4516             Returns:                
4517                 New GEOM.GEOM_Object, containing processed shape.
4518             """
4519             # Example: see GEOM_TestHealing.py
4520             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
4521             RaiseIfFailed("RemoveIntWires", self.HealOp)
4522             return anObj
4523
4524         ## Remove internal closed contours (holes) from the given object.
4525         #  @param theObject Shape to be processed.
4526         #  @param theWires Indices of wires to be removed, if EMPTY then the method
4527         #                  removes ALL internal holes of the given object
4528         #  @return New GEOM.GEOM_Object, containing processed shape.
4529         #
4530         #  @ref tui_suppress_holes "Example"
4531         def SuppressHoles(self,theObject, theWires):
4532             """
4533             Remove internal closed contours (holes) from the given object.
4534
4535             Parameters:
4536                 theObject Shape to be processed.
4537                 theWires Indices of wires to be removed, if EMPTY then the method
4538                          removes ALL internal holes of the given object
4539
4540             Returns:    
4541                 New GEOM.GEOM_Object, containing processed shape.
4542             """
4543             # Example: see GEOM_TestHealing.py
4544             anObj = self.HealOp.FillHoles(theObject, theWires)
4545             RaiseIfFailed("FillHoles", self.HealOp)
4546             return anObj
4547
4548         ## Close an open wire.
4549         #  @param theObject Shape to be processed.
4550         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
4551         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
4552         #  @param isCommonVertex If True  : closure by creation of a common vertex,
4553         #                        If False : closure by creation of an edge between ends.
4554         #  @return New GEOM.GEOM_Object, containing processed shape.
4555         #
4556         #  @ref tui_close_contour "Example"
4557         def CloseContour(self,theObject, theWires, isCommonVertex):
4558             """
4559             Close an open wire.
4560
4561             Parameters: 
4562                 theObject Shape to be processed.
4563                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
4564                          if [ ], then theObject itself is a wire.
4565                 isCommonVertex If True  : closure by creation of a common vertex,
4566                                If False : closure by creation of an edge between ends.
4567
4568             Returns:                      
4569                 New GEOM.GEOM_Object, containing processed shape. 
4570             """
4571             # Example: see GEOM_TestHealing.py
4572             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
4573             RaiseIfFailed("CloseContour", self.HealOp)
4574             return anObj
4575
4576         ## Addition of a point to a given edge object.
4577         #  @param theObject Shape to be processed.
4578         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
4579         #                      if -1, then theObject itself is the edge.
4580         #  @param theValue Value of parameter on edge or length parameter,
4581         #                  depending on \a isByParameter.
4582         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
4583         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
4584         #  @return New GEOM.GEOM_Object, containing processed shape.
4585         #
4586         #  @ref tui_add_point_on_edge "Example"
4587         def DivideEdge(self,theObject, theEdgeIndex, theValue, isByParameter):
4588             """
4589             Addition of a point to a given edge object.
4590
4591             Parameters: 
4592                 theObject Shape to be processed.
4593                 theEdgeIndex Index of edge to be divided within theObject's shape,
4594                              if -1, then theObject itself is the edge.
4595                 theValue Value of parameter on edge or length parameter,
4596                          depending on isByParameter.
4597                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
4598                               if FALSE : theValue is treated as a length parameter [0..1]
4599
4600             Returns:  
4601                 New GEOM.GEOM_Object, containing processed shape.
4602             """
4603             # Example: see GEOM_TestHealing.py
4604             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
4605             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
4606             RaiseIfFailed("DivideEdge", self.HealOp)
4607             anObj.SetParameters(Parameters)
4608             return anObj
4609
4610         ## Change orientation of the given object. Updates given shape.
4611         #  @param theObject Shape to be processed.
4612         #  @return Updated <var>theObject</var>
4613         #
4614         #  @ref swig_todo "Example"
4615         def ChangeOrientationShell(self,theObject):
4616             """
4617             Change orientation of the given object. Updates given shape.
4618
4619             Parameters: 
4620                 theObject Shape to be processed.
4621
4622             Returns:  
4623                 Updated theObject
4624             """
4625             theObject = self.HealOp.ChangeOrientation(theObject)
4626             RaiseIfFailed("ChangeOrientation", self.HealOp)
4627             pass
4628
4629         ## Change orientation of the given object.
4630         #  @param theObject Shape to be processed.
4631         #  @return New GEOM.GEOM_Object, containing processed shape.
4632         #
4633         #  @ref swig_todo "Example"
4634         def ChangeOrientationShellCopy(self, theObject):
4635             """
4636             Change orientation of the given object.
4637
4638             Parameters:
4639                 theObject Shape to be processed.
4640
4641             Returns:   
4642                 New GEOM.GEOM_Object, containing processed shape.
4643             """
4644             anObj = self.HealOp.ChangeOrientationCopy(theObject)
4645             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
4646             return anObj
4647
4648         ## Try to limit tolerance of the given object by value \a theTolerance.
4649         #  @param theObject Shape to be processed.
4650         #  @param theTolerance Required tolerance value.
4651         #  @return New GEOM.GEOM_Object, containing processed shape.
4652         #
4653         #  @ref tui_limit_tolerance "Example"
4654         def LimitTolerance(self, theObject, theTolerance = 1e-07):
4655             """
4656             Try to limit tolerance of the given object by value theTolerance.
4657
4658             Parameters:
4659                 theObject Shape to be processed.
4660                 theTolerance Required tolerance value.
4661
4662             Returns:   
4663                 New GEOM.GEOM_Object, containing processed shape.
4664             """
4665             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
4666             RaiseIfFailed("LimitTolerance", self.HealOp)
4667             return anObj
4668
4669         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
4670         #  that constitute a free boundary of the given shape.
4671         #  @param theObject Shape to get free boundary of.
4672         #  @return [\a status, \a theClosedWires, \a theOpenWires]
4673         #  \n \a status: FALSE, if an error(s) occured during the method execution.
4674         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
4675         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
4676         #
4677         #  @ref tui_measurement_tools_page "Example"
4678         def GetFreeBoundary(self, theObject):
4679             """
4680             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
4681             that constitute a free boundary of the given shape.
4682
4683             Parameters:
4684                 theObject Shape to get free boundary of.
4685
4686             Returns: 
4687                 [status, theClosedWires, theOpenWires]
4688                  status: FALSE, if an error(s) occured during the method execution.
4689                  theClosedWires: Closed wires on the free boundary of the given shape.
4690                  theOpenWires: Open wires on the free boundary of the given shape.
4691             """
4692             # Example: see GEOM_TestHealing.py
4693             anObj = self.HealOp.GetFreeBoundary(theObject)
4694             RaiseIfFailed("GetFreeBoundary", self.HealOp)
4695             return anObj
4696
4697         ## Replace coincident faces in theShape by one face.
4698         #  @param theShape Initial shape.
4699         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
4700         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
4701         #                         otherwise all initial shapes.
4702         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
4703         #
4704         #  @ref tui_glue_faces "Example"
4705         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True):
4706             """
4707             Replace coincident faces in theShape by one face.
4708
4709             Parameters:
4710                 theShape Initial shape.
4711                 theTolerance Maximum distance between faces, which can be considered as coincident.
4712                 doKeepNonSolids If FALSE, only solids will present in the result,
4713                                 otherwise all initial shapes.
4714
4715             Returns:
4716                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
4717             """
4718             # Example: see GEOM_Spanner.py
4719             theTolerance,Parameters = ParseParameters(theTolerance)
4720             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
4721             if anObj is None:
4722                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
4723             anObj.SetParameters(Parameters)
4724             return anObj
4725
4726         ## Find coincident faces in theShape for possible gluing.
4727         #  @param theShape Initial shape.
4728         #  @param theTolerance Maximum distance between faces,
4729         #                      which can be considered as coincident.
4730         #  @return GEOM.ListOfGO
4731         #
4732         #  @ref tui_glue_faces "Example"
4733         def GetGlueFaces(self, theShape, theTolerance):
4734             """
4735             Find coincident faces in theShape for possible gluing.
4736
4737             Parameters:
4738                 theShape Initial shape.
4739                 theTolerance Maximum distance between faces,
4740                              which can be considered as coincident.
4741
4742             Returns:                    
4743                 GEOM.ListOfGO
4744             """
4745             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
4746             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
4747             return anObj
4748
4749         ## Replace coincident faces in theShape by one face
4750         #  in compliance with given list of faces
4751         #  @param theShape Initial shape.
4752         #  @param theTolerance Maximum distance between faces,
4753         #                      which can be considered as coincident.
4754         #  @param theFaces List of faces for gluing.
4755         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
4756         #                         otherwise all initial shapes.
4757         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
4758         #                        will be glued, otherwise only the edges,
4759         #                        belonging to <VAR>theFaces</VAR>.
4760         #  @return New GEOM.GEOM_Object, containing a copy of theShape
4761         #          without some faces.
4762         #
4763         #  @ref tui_glue_faces "Example"
4764         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
4765                                 doKeepNonSolids=True, doGlueAllEdges=True):
4766             """
4767             Replace coincident faces in theShape by one face
4768             in compliance with given list of faces
4769
4770             Parameters:
4771                 theShape Initial shape.
4772                 theTolerance Maximum distance between faces,
4773                              which can be considered as coincident.
4774                 theFaces List of faces for gluing.
4775                 doKeepNonSolids If FALSE, only solids will present in the result,
4776                                 otherwise all initial shapes.
4777                 doGlueAllEdges If TRUE, all coincident edges of theShape
4778                                will be glued, otherwise only the edges,
4779                                belonging to theFaces.
4780
4781             Returns:
4782                 New GEOM.GEOM_Object, containing a copy of theShape
4783                     without some faces.
4784             """
4785             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
4786                                                       doKeepNonSolids, doGlueAllEdges)
4787             if anObj is None:
4788                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
4789             return anObj
4790
4791         ## Replace coincident edges in theShape by one edge.
4792         #  @param theShape Initial shape.
4793         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
4794         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
4795         #
4796         #  @ref tui_glue_edges "Example"
4797         def MakeGlueEdges(self, theShape, theTolerance):
4798             """
4799             Replace coincident edges in theShape by one edge.
4800
4801             Parameters:
4802                 theShape Initial shape.
4803                 theTolerance Maximum distance between edges, which can be considered as coincident.
4804
4805             Returns:    
4806                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
4807             """
4808             theTolerance,Parameters = ParseParameters(theTolerance)
4809             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
4810             if anObj is None:
4811                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
4812             anObj.SetParameters(Parameters)
4813             return anObj
4814
4815         ## Find coincident edges in theShape for possible gluing.
4816         #  @param theShape Initial shape.
4817         #  @param theTolerance Maximum distance between edges,
4818         #                      which can be considered as coincident.
4819         #  @return GEOM.ListOfGO
4820         #
4821         #  @ref tui_glue_edges "Example"
4822         def GetGlueEdges(self, theShape, theTolerance):
4823             """
4824             Find coincident edges in theShape for possible gluing.
4825
4826             Parameters:
4827                 theShape Initial shape.
4828                 theTolerance Maximum distance between edges,
4829                              which can be considered as coincident.
4830
4831             Returns:                         
4832                 GEOM.ListOfGO
4833             """
4834             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
4835             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
4836             return anObj
4837
4838         ## Replace coincident edges in theShape by one edge
4839         #  in compliance with given list of edges.
4840         #  @param theShape Initial shape.
4841         #  @param theTolerance Maximum distance between edges,
4842         #                      which can be considered as coincident.
4843         #  @param theEdges List of edges for gluing.
4844         #  @return New GEOM.GEOM_Object, containing a copy of theShape
4845         #          without some edges.
4846         #
4847         #  @ref tui_glue_edges "Example"
4848         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges):
4849             """
4850             Replace coincident edges in theShape by one edge
4851             in compliance with given list of edges.
4852
4853             Parameters:
4854                 theShape Initial shape.
4855                 theTolerance Maximum distance between edges,
4856                              which can be considered as coincident.
4857                 theEdges List of edges for gluing.
4858
4859             Returns:  
4860                 New GEOM.GEOM_Object, containing a copy of theShape
4861                 without some edges.
4862             """
4863             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
4864             if anObj is None:
4865                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
4866             return anObj
4867
4868         # end of l3_healing
4869         ## @}
4870
4871         ## @addtogroup l3_boolean Boolean Operations
4872         ## @{
4873
4874         # -----------------------------------------------------------------------------
4875         # Boolean (Common, Cut, Fuse, Section)
4876         # -----------------------------------------------------------------------------
4877
4878         ## Perform one of boolean operations on two given shapes.
4879         #  @param theShape1 First argument for boolean operation.
4880         #  @param theShape2 Second argument for boolean operation.
4881         #  @param theOperation Indicates the operation to be done:\n
4882         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
4883         #  @return New GEOM.GEOM_Object, containing the result shape.
4884         #
4885         #  @ref tui_fuse "Example"
4886         def MakeBoolean(self,theShape1, theShape2, theOperation):
4887             """
4888             Perform one of boolean operations on two given shapes.
4889
4890             Parameters: 
4891                 theShape1 First argument for boolean operation.
4892                 theShape2 Second argument for boolean operation.
4893                 theOperation Indicates the operation to be done:
4894                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
4895
4896             Returns:   
4897                 New GEOM.GEOM_Object, containing the result shape.
4898             """
4899             # Example: see GEOM_TestAll.py
4900             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
4901             RaiseIfFailed("MakeBoolean", self.BoolOp)
4902             return anObj
4903
4904         ## Perform Common boolean operation on two given shapes.
4905         #  @param theShape1 First argument for boolean operation.
4906         #  @param theShape2 Second argument for boolean operation.
4907         #  @return New GEOM.GEOM_Object, containing the result shape.
4908         #
4909         #  @ref tui_common "Example 1"
4910         #  \n @ref swig_MakeCommon "Example 2"
4911         def MakeCommon(self, theShape1, theShape2):
4912             """
4913             Perform Common boolean operation on two given shapes.
4914
4915             Parameters: 
4916                 theShape1 First argument for boolean operation.
4917                 theShape2 Second argument for boolean operation.
4918  
4919             Returns:   
4920                 New GEOM.GEOM_Object, containing the result shape.
4921             """
4922             # Example: see GEOM_TestOthers.py
4923             return self.MakeBoolean(theShape1, theShape2, 1)
4924
4925         ## Perform Cut boolean operation on two given shapes.
4926         #  @param theShape1 First argument for boolean operation.
4927         #  @param theShape2 Second argument for boolean operation.
4928         #  @return New GEOM.GEOM_Object, containing the result shape.
4929         #
4930         #  @ref tui_cut "Example 1"
4931         #  \n @ref swig_MakeCommon "Example 2"
4932         def MakeCut(self, theShape1, theShape2):
4933             """
4934             Perform Cut boolean operation on two given shapes.
4935
4936             Parameters: 
4937                 theShape1 First argument for boolean operation.
4938                 theShape2 Second argument for boolean operation.
4939  
4940             Returns:   
4941                 New GEOM.GEOM_Object, containing the result shape.
4942             
4943             """
4944             # Example: see GEOM_TestOthers.py
4945             return self.MakeBoolean(theShape1, theShape2, 2)
4946
4947         ## Perform Fuse boolean operation on two given shapes.
4948         #  @param theShape1 First argument for boolean operation.
4949         #  @param theShape2 Second argument for boolean operation.
4950         #  @return New GEOM.GEOM_Object, containing the result shape.
4951         #
4952         #  @ref tui_fuse "Example 1"
4953         #  \n @ref swig_MakeCommon "Example 2"
4954         def MakeFuse(self, theShape1, theShape2):
4955             """
4956             Perform Fuse boolean operation on two given shapes.
4957
4958             Parameters: 
4959                 theShape1 First argument for boolean operation.
4960                 theShape2 Second argument for boolean operation.
4961  
4962             Returns:   
4963                 New GEOM.GEOM_Object, containing the result shape.
4964             
4965             """
4966             # Example: see GEOM_TestOthers.py
4967             return self.MakeBoolean(theShape1, theShape2, 3)
4968
4969         ## Perform Section boolean operation on two given shapes.
4970         #  @param theShape1 First argument for boolean operation.
4971         #  @param theShape2 Second argument for boolean operation.
4972         #  @return New GEOM.GEOM_Object, containing the result shape.
4973         #
4974         #  @ref tui_section "Example 1"
4975         #  \n @ref swig_MakeCommon "Example 2"
4976         def MakeSection(self, theShape1, theShape2):
4977             """
4978             Perform Section boolean operation on two given shapes.
4979
4980             Parameters: 
4981                 theShape1 First argument for boolean operation.
4982                 theShape2 Second argument for boolean operation.
4983  
4984             Returns:   
4985                 New GEOM.GEOM_Object, containing the result shape.
4986             
4987             """
4988             # Example: see GEOM_TestOthers.py
4989             return self.MakeBoolean(theShape1, theShape2, 4)
4990
4991         # end of l3_boolean
4992         ## @}
4993
4994         ## @addtogroup l3_basic_op
4995         ## @{
4996
4997         ## Perform partition operation.
4998         #  @param ListShapes Shapes to be intersected.
4999         #  @param ListTools Shapes to intersect theShapes.
5000         #  @param Limit Type of resulting shapes (see ShapeType()).\n
5001         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
5002         #         type will be detected automatically.
5003         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
5004         #                             target type (equal to Limit) are kept in the result,
5005         #                             else standalone shapes of lower dimension
5006         #                             are kept also (if they exist).
5007         #  @note Each compound from ListShapes and ListTools will be exploded
5008         #        in order to avoid possible intersection between shapes from this compound.
5009         #
5010         #  After implementation new version of PartitionAlgo (October 2006)
5011         #  other parameters are ignored by current functionality. They are kept
5012         #  in this function only for support old versions.
5013         #      @param ListKeepInside Shapes, outside which the results will be deleted.
5014         #         Each shape from theKeepInside must belong to theShapes also.
5015         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
5016         #         Each shape from theRemoveInside must belong to theShapes also.
5017         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
5018         #      @param ListMaterials Material indices for each shape. Make sence,
5019         #         only if theRemoveWebs is TRUE.
5020         #
5021         #  @return New GEOM.GEOM_Object, containing the result shapes.
5022         #
5023         #  @ref tui_partition "Example"
5024         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
5025                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
5026                           KeepNonlimitShapes=0):
5027             """
5028             Perform partition operation.
5029
5030             Parameters: 
5031                 ListShapes Shapes to be intersected.
5032                 ListTools Shapes to intersect theShapes.
5033                 Limit Type of resulting shapes (see geompy.ShapeType)
5034                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
5035                       type will be detected automatically.
5036                 KeepNonlimitShapes if this parameter == 0, then only shapes of
5037                                     target type (equal to Limit) are kept in the result,
5038                                     else standalone shapes of lower dimension
5039                                     are kept also (if they exist).
5040             Note:
5041                     Each compound from ListShapes and ListTools will be exploded
5042                     in order to avoid possible intersection between shapes from
5043                     this compound.
5044                     
5045             After implementation new version of PartitionAlgo (October 2006) other
5046             parameters are ignored by current functionality. They are kept in this
5047             function only for support old versions.
5048             
5049             Ignored parameters:
5050                 ListKeepInside Shapes, outside which the results will be deleted.
5051                                Each shape from theKeepInside must belong to theShapes also.
5052                 ListRemoveInside Shapes, inside which the results will be deleted.
5053                                  Each shape from theRemoveInside must belong to theShapes also.
5054                 RemoveWebs If TRUE, perform Glue 3D algorithm.
5055                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
5056
5057             Returns:   
5058                 New GEOM.GEOM_Object, containing the result shapes.
5059             """
5060             # Example: see GEOM_TestAll.py
5061             if Limit == ShapeType["AUTO"]:
5062                 # automatic detection of the most appropriate shape limit type
5063                 lim = GEOM.SHAPE
5064                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
5065                 Limit = EnumToLong(lim)
5066                 pass
5067             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
5068                                               ListKeepInside, ListRemoveInside,
5069                                               Limit, RemoveWebs, ListMaterials,
5070                                               KeepNonlimitShapes);
5071             RaiseIfFailed("MakePartition", self.BoolOp)
5072             return anObj
5073
5074         ## Perform partition operation.
5075         #  This method may be useful if it is needed to make a partition for
5076         #  compound contains nonintersected shapes. Performance will be better
5077         #  since intersection between shapes from compound is not performed.
5078         #
5079         #  Description of all parameters as in previous method MakePartition()
5080         #
5081         #  @note Passed compounds (via ListShapes or via ListTools)
5082         #           have to consist of nonintersecting shapes.
5083         #
5084         #  @return New GEOM.GEOM_Object, containing the result shapes.
5085         #
5086         #  @ref swig_todo "Example"
5087         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
5088                                                  ListKeepInside=[], ListRemoveInside=[],
5089                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
5090                                                  ListMaterials=[], KeepNonlimitShapes=0):
5091             """
5092             Perform partition operation.
5093             This method may be useful if it is needed to make a partition for
5094             compound contains nonintersected shapes. Performance will be better
5095             since intersection between shapes from compound is not performed.
5096
5097             Parameters: 
5098                 Description of all parameters as in method geompy.MakePartition
5099         
5100             NOTE:
5101                 Passed compounds (via ListShapes or via ListTools)
5102                 have to consist of nonintersecting shapes.
5103
5104             Returns:   
5105                 New GEOM.GEOM_Object, containing the result shapes.
5106             """
5107             if Limit == ShapeType["AUTO"]:
5108                 # automatic detection of the most appropriate shape limit type
5109                 lim = GEOM.SHAPE
5110                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
5111                 Limit = EnumToLong(lim)
5112                 pass
5113             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
5114                                                                      ListKeepInside, ListRemoveInside,
5115                                                                      Limit, RemoveWebs, ListMaterials,
5116                                                                      KeepNonlimitShapes);
5117             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
5118             return anObj
5119
5120         ## See method MakePartition() for more information.
5121         #
5122         #  @ref tui_partition "Example 1"
5123         #  \n @ref swig_Partition "Example 2"
5124         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
5125                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
5126                       KeepNonlimitShapes=0):
5127             """
5128             See method geompy.MakePartition for more information.
5129             """
5130             # Example: see GEOM_TestOthers.py
5131             anObj = self.MakePartition(ListShapes, ListTools,
5132                                        ListKeepInside, ListRemoveInside,
5133                                        Limit, RemoveWebs, ListMaterials,
5134                                        KeepNonlimitShapes);
5135             return anObj
5136
5137         ## Perform partition of the Shape with the Plane
5138         #  @param theShape Shape to be intersected.
5139         #  @param thePlane Tool shape, to intersect theShape.
5140         #  @return New GEOM.GEOM_Object, containing the result shape.
5141         #
5142         #  @ref tui_partition "Example"
5143         def MakeHalfPartition(self,theShape, thePlane):
5144             """
5145             Perform partition of the Shape with the Plane
5146
5147             Parameters: 
5148                 theShape Shape to be intersected.
5149                 thePlane Tool shape, to intersect theShape.
5150
5151             Returns:  
5152                 New GEOM.GEOM_Object, containing the result shape.
5153             """
5154             # Example: see GEOM_TestAll.py
5155             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
5156             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
5157             return anObj
5158
5159         # end of l3_basic_op
5160         ## @}
5161
5162         ## @addtogroup l3_transform
5163         ## @{
5164
5165         ## Translate the given object along the vector, specified
5166         #  by its end points, creating its copy before the translation.
5167         #  @param theObject The object to be translated.
5168         #  @param thePoint1 Start point of translation vector.
5169         #  @param thePoint2 End point of translation vector.
5170         #  @return New GEOM.GEOM_Object, containing the translated object.
5171         #
5172         #  @ref tui_translation "Example 1"
5173         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
5174         def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2):
5175             """
5176             Translate the given object along the vector, specified
5177             by its end points, creating its copy before the translation.
5178
5179             Parameters: 
5180                 theObject The object to be translated.
5181                 thePoint1 Start point of translation vector.
5182                 thePoint2 End point of translation vector.
5183
5184             Returns:  
5185                 New GEOM.GEOM_Object, containing the translated object.
5186             """
5187             # Example: see GEOM_TestAll.py
5188             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
5189             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
5190             return anObj
5191
5192         ## Translate the given object along the vector, specified by its components.
5193         #  @param theObject The object to be translated.
5194         #  @param theDX,theDY,theDZ Components of translation vector.
5195         #  @return Translated GEOM.GEOM_Object.
5196         #
5197         #  @ref tui_translation "Example"
5198         def TranslateDXDYDZ(self,theObject, theDX, theDY, theDZ):
5199             """
5200             Translate the given object along the vector, specified by its components.
5201
5202             Parameters: 
5203                 theObject The object to be translated.
5204                 theDX,theDY,theDZ Components of translation vector.
5205
5206             Returns: 
5207                 Translated GEOM.GEOM_Object.
5208             """
5209             # Example: see GEOM_TestAll.py
5210             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
5211             anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
5212             anObj.SetParameters(Parameters)
5213             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
5214             return anObj
5215
5216         ## Translate the given object along the vector, specified
5217         #  by its components, creating its copy before the translation.
5218         #  @param theObject The object to be translated.
5219         #  @param theDX,theDY,theDZ Components of translation vector.
5220         #  @return New GEOM.GEOM_Object, containing the translated object.
5221         #
5222         #  @ref tui_translation "Example"
5223         def MakeTranslation(self,theObject, theDX, theDY, theDZ):
5224             """
5225             Translate the given object along the vector, specified
5226             by its components, creating its copy before the translation.
5227
5228             Parameters: 
5229                 theObject The object to be translated.
5230                 theDX,theDY,theDZ Components of translation vector.
5231
5232             Returns: 
5233                 New GEOM.GEOM_Object, containing the translated object.
5234             """
5235             # Example: see GEOM_TestAll.py
5236             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
5237             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
5238             anObj.SetParameters(Parameters)
5239             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
5240             return anObj
5241
5242         ## Translate the given object along the given vector,
5243         #  creating its copy before the translation.
5244         #  @param theObject The object to be translated.
5245         #  @param theVector The translation vector.
5246         #  @return New GEOM.GEOM_Object, containing the translated object.
5247         #
5248         #  @ref tui_translation "Example"
5249         def MakeTranslationVector(self,theObject, theVector):
5250             """
5251             Translate the given object along the given vector,
5252             creating its copy before the translation.
5253
5254             Parameters: 
5255                 theObject The object to be translated.
5256                 theVector The translation vector.
5257
5258             Returns: 
5259                 New GEOM.GEOM_Object, containing the translated object.
5260             """
5261             # Example: see GEOM_TestAll.py
5262             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
5263             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
5264             return anObj
5265
5266         ## Translate the given object along the given vector on given distance.
5267         #  @param theObject The object to be translated.
5268         #  @param theVector The translation vector.
5269         #  @param theDistance The translation distance.
5270         #  @param theCopy Flag used to translate object itself or create a copy.
5271         #  @return New GEOM.GEOM_Object, containing the translated object.
5272         #
5273         #  @ref tui_translation "Example"
5274         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy):
5275             """
5276             Translate the given object along the given vector on given distance.
5277
5278             Parameters: 
5279                 theObject The object to be translated.
5280                 theVector The translation vector.
5281                 theDistance The translation distance.
5282                 theCopy Flag used to translate object itself or create a copy.
5283
5284             Returns: 
5285                 New GEOM.GEOM_Object, containing the translated object.
5286             """
5287             # Example: see GEOM_TestAll.py
5288             theDistance,Parameters = ParseParameters(theDistance)
5289             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
5290             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
5291             anObj.SetParameters(Parameters)
5292             return anObj
5293
5294         ## Translate the given object along the given vector on given distance,
5295         #  creating its copy before the translation.
5296         #  @param theObject The object to be translated.
5297         #  @param theVector The translation vector.
5298         #  @param theDistance The translation distance.
5299         #  @return New GEOM.GEOM_Object, containing the translated object.
5300         #
5301         #  @ref tui_translation "Example"
5302         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance):
5303             """
5304             Translate the given object along the given vector on given distance,
5305             creating its copy before the translation.
5306
5307             Parameters:
5308                 theObject The object to be translated.
5309                 theVector The translation vector.
5310                 theDistance The translation distance.
5311
5312             Returns: 
5313                 New GEOM.GEOM_Object, containing the translated object.
5314             """
5315             # Example: see GEOM_TestAll.py
5316             theDistance,Parameters = ParseParameters(theDistance)
5317             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
5318             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
5319             anObj.SetParameters(Parameters)
5320             return anObj
5321
5322         ## Rotate the given object around the given axis on the given angle.
5323         #  @param theObject The object to be rotated.
5324         #  @param theAxis Rotation axis.
5325         #  @param theAngle Rotation angle in radians.
5326         #  @return New GEOM.GEOM_Object, containing the rotated object.
5327         #
5328         #  @ref tui_rotation "Example"
5329         def Rotate(self,theObject, theAxis, theAngle):
5330             """
5331             Rotate the given object around the given axis on the given angle.
5332
5333             Parameters:
5334                 theObject The object to be rotated.
5335                 theAxis Rotation axis.
5336                 theAngle Rotation angle in radians.
5337
5338             Returns: 
5339                 New GEOM.GEOM_Object, containing the rotated object.
5340             """
5341             # Example: see GEOM_TestAll.py
5342             flag = False
5343             if isinstance(theAngle,str):
5344                 flag = True
5345             theAngle, Parameters = ParseParameters(theAngle)
5346             if flag:
5347                 theAngle = theAngle*math.pi/180.0
5348             anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
5349             RaiseIfFailed("RotateCopy", self.TrsfOp)
5350             anObj.SetParameters(Parameters)
5351             return anObj
5352
5353         ## Rotate the given object around the given axis
5354         #  on the given angle, creating its copy before the rotatation.
5355         #  @param theObject The object to be rotated.
5356         #  @param theAxis Rotation axis.
5357         #  @param theAngle Rotation angle in radians.
5358         #  @return New GEOM.GEOM_Object, containing the rotated object.
5359         #
5360         #  @ref tui_rotation "Example"
5361         def MakeRotation(self,theObject, theAxis, theAngle):
5362             """
5363             Rotate the given object around the given axis
5364             on the given angle, creating its copy before the rotatation.
5365
5366             Parameters:
5367                 theObject The object to be rotated.
5368                 theAxis Rotation axis.
5369                 theAngle Rotation angle in radians.
5370
5371             Returns:
5372                 New GEOM.GEOM_Object, containing the rotated object.
5373             """
5374             # Example: see GEOM_TestAll.py
5375             flag = False
5376             if isinstance(theAngle,str):
5377                 flag = True
5378             theAngle, Parameters = ParseParameters(theAngle)
5379             if flag:
5380                 theAngle = theAngle*math.pi/180.0
5381             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
5382             RaiseIfFailed("RotateCopy", self.TrsfOp)
5383             anObj.SetParameters(Parameters)
5384             return anObj
5385
5386         ## Rotate given object around vector perpendicular to plane
5387         #  containing three points, creating its copy before the rotatation.
5388         #  @param theObject The object to be rotated.
5389         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
5390         #  containing the three points.
5391         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
5392         #  @return New GEOM.GEOM_Object, containing the rotated object.
5393         #
5394         #  @ref tui_rotation "Example"
5395         def MakeRotationThreePoints(self,theObject, theCentPoint, thePoint1, thePoint2):
5396             """
5397             Rotate given object around vector perpendicular to plane
5398             containing three points, creating its copy before the rotatation.
5399
5400             Parameters:
5401                 theObject The object to be rotated.
5402                 theCentPoint central point  the axis is the vector perpendicular to the plane
5403                              containing the three points.
5404                 thePoint1,thePoint2  in a perpendicular plane of the axis.
5405
5406             Returns:
5407                 New GEOM.GEOM_Object, containing the rotated object.
5408             """
5409             # Example: see GEOM_TestAll.py
5410             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
5411             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
5412             return anObj
5413
5414         ## Scale the given object by the factor, creating its copy before the scaling.
5415         #  @param theObject The object to be scaled.
5416         #  @param thePoint Center point for scaling.
5417         #                  Passing None for it means scaling relatively the origin of global CS.
5418         #  @param theFactor Scaling factor value.
5419         #  @return New GEOM.GEOM_Object, containing the scaled shape.
5420         #
5421         #  @ref tui_scale "Example"
5422         def MakeScaleTransform(self, theObject, thePoint, theFactor):
5423             """
5424             Scale the given object by the factor, creating its copy before the scaling.
5425
5426             Parameters:
5427                 theObject The object to be scaled.
5428                 thePoint Center point for scaling.
5429                          Passing None for it means scaling relatively the origin of global CS.
5430                 theFactor Scaling factor value.
5431
5432             Returns:    
5433                 New GEOM.GEOM_Object, containing the scaled shape.
5434             """
5435             # Example: see GEOM_TestAll.py
5436             theFactor, Parameters = ParseParameters(theFactor)
5437             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
5438             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
5439             anObj.SetParameters(Parameters)
5440             return anObj
5441
5442         ## Scale the given object by different factors along coordinate axes,
5443         #  creating its copy before the scaling.
5444         #  @param theObject The object to be scaled.
5445         #  @param thePoint Center point for scaling.
5446         #                  Passing None for it means scaling relatively the origin of global CS.
5447         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
5448         #  @return New GEOM.GEOM_Object, containing the scaled shape.
5449         #
5450         #  @ref swig_scale "Example"
5451         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ):
5452             """
5453             Scale the given object by different factors along coordinate axes,
5454             creating its copy before the scaling.
5455
5456             Parameters:
5457                 theObject The object to be scaled.
5458                 thePoint Center point for scaling.
5459                             Passing None for it means scaling relatively the origin of global CS.
5460                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
5461
5462             Returns:
5463                 New GEOM.GEOM_Object, containing the scaled shape.
5464             """
5465             # Example: see GEOM_TestAll.py
5466             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
5467             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
5468                                                         theFactorX, theFactorY, theFactorZ)
5469             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
5470             anObj.SetParameters(Parameters)
5471             return anObj
5472
5473         ## Create an object, symmetrical
5474         #  to the given one relatively the given plane.
5475         #  @param theObject The object to be mirrored.
5476         #  @param thePlane Plane of symmetry.
5477         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5478         #
5479         #  @ref tui_mirror "Example"
5480         def MakeMirrorByPlane(self,theObject, thePlane):
5481             """
5482             Create an object, symmetrical to the given one relatively the given plane.
5483
5484             Parameters:
5485                 theObject The object to be mirrored.
5486                 thePlane Plane of symmetry.
5487
5488             Returns:
5489                 New GEOM.GEOM_Object, containing the mirrored shape.
5490             """
5491             # Example: see GEOM_TestAll.py
5492             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
5493             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
5494             return anObj
5495
5496         ## Create an object, symmetrical
5497         #  to the given one relatively the given axis.
5498         #  @param theObject The object to be mirrored.
5499         #  @param theAxis Axis of symmetry.
5500         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5501         #
5502         #  @ref tui_mirror "Example"
5503         def MakeMirrorByAxis(self,theObject, theAxis):
5504             """
5505             Create an object, symmetrical to the given one relatively the given axis.
5506
5507             Parameters:
5508                 theObject The object to be mirrored.
5509                 theAxis Axis of symmetry.
5510
5511             Returns: 
5512                 New GEOM.GEOM_Object, containing the mirrored shape.
5513             """
5514             # Example: see GEOM_TestAll.py
5515             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
5516             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
5517             return anObj
5518
5519         ## Create an object, symmetrical
5520         #  to the given one relatively the given point.
5521         #  @param theObject The object to be mirrored.
5522         #  @param thePoint Point of symmetry.
5523         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5524         #
5525         #  @ref tui_mirror "Example"
5526         def MakeMirrorByPoint(self,theObject, thePoint):
5527             """
5528             Create an object, symmetrical
5529             to the given one relatively the given point.
5530
5531             Parameters:
5532                 theObject The object to be mirrored.
5533                 thePoint Point of symmetry.
5534
5535             Returns:  
5536                 New GEOM.GEOM_Object, containing the mirrored shape.
5537             """
5538             # Example: see GEOM_TestAll.py
5539             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
5540             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
5541             return anObj
5542
5543         ## Modify the Location of the given object by LCS,
5544         #  creating its copy before the setting.
5545         #  @param theObject The object to be displaced.
5546         #  @param theStartLCS Coordinate system to perform displacement from it.\n
5547         #                     If \a theStartLCS is NULL, displacement
5548         #                     will be performed from global CS.\n
5549         #                     If \a theObject itself is used as \a theStartLCS,
5550         #                     its location will be changed to \a theEndLCS.
5551         #  @param theEndLCS Coordinate system to perform displacement to it.
5552         #  @return New GEOM.GEOM_Object, containing the displaced shape.
5553         #
5554         #  @ref tui_modify_location "Example"
5555         def MakePosition(self,theObject, theStartLCS, theEndLCS):
5556             """
5557             Modify the Location of the given object by LCS, creating its copy before the setting.
5558
5559             Parameters:
5560                 theObject The object to be displaced.
5561                 theStartLCS Coordinate system to perform displacement from it.
5562                             If theStartLCS is NULL, displacement
5563                             will be performed from global CS.
5564                             If theObject itself is used as theStartLCS,
5565                             its location will be changed to theEndLCS.
5566                 theEndLCS Coordinate system to perform displacement to it.
5567
5568             Returns:  
5569                 New GEOM.GEOM_Object, containing the displaced shape.
5570
5571             Example of usage:
5572                 # create local coordinate systems
5573                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
5574                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
5575                 # modify the location of the given object
5576                 position = geompy.MakePosition(cylinder, cs1, cs2)
5577             """
5578             # Example: see GEOM_TestAll.py
5579             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
5580             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
5581             return anObj
5582
5583         ## Modify the Location of the given object by Path,
5584         #  @param  theObject The object to be displaced.
5585         #  @param  thePath Wire or Edge along that the object will be translated.
5586         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
5587         #  @param  theCopy is to create a copy objects if true.
5588         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
5589         #  @return New GEOM.GEOM_Object, containing the displaced shape.
5590         #
5591         #  @ref tui_modify_location "Example"
5592         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
5593             """
5594             Modify the Location of the given object by Path
5595
5596             Parameters:
5597                  theObject The object to be displaced.
5598                  thePath Wire or Edge along that the object will be translated.
5599                  theDistance progress of Path (0 = start location, 1 = end of path location).
5600                  theCopy is to create a copy objects if true.
5601                  theReverse  0 - for usual direction, 1 - to reverse path direction.
5602
5603             Returns:  
5604                 New GEOM.GEOM_Object, containing the displaced shape.
5605
5606             Example of usage:
5607                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
5608             """
5609             # Example: see GEOM_TestAll.py
5610             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
5611             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
5612             return anObj
5613
5614         ## Create new object as offset of the given one.
5615         #  @param theObject The base object for the offset.
5616         #  @param theOffset Offset value.
5617         #  @return New GEOM.GEOM_Object, containing the offset object.
5618         #
5619         #  @ref tui_offset "Example"
5620         def MakeOffset(self,theObject, theOffset):
5621             """
5622             Create new object as offset of the given one.
5623
5624             Parameters:
5625                 theObject The base object for the offset.
5626                 theOffset Offset value.
5627
5628             Returns:  
5629                 New GEOM.GEOM_Object, containing the offset object.
5630
5631             Example of usage:
5632                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
5633                  # create a new object as offset of the given object
5634                  offset = geompy.MakeOffset(box, 70.)
5635             """
5636             # Example: see GEOM_TestAll.py
5637             theOffset, Parameters = ParseParameters(theOffset)
5638             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
5639             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
5640             anObj.SetParameters(Parameters)
5641             return anObj
5642
5643         ## Create new object as projection of the given one on a 2D surface.
5644         #  @param theSource The source object for the projection. It can be a point, edge or wire.
5645         #  @param theTarget The target object. It can be planar or cylindrical face.
5646         #  @return New GEOM.GEOM_Object, containing the projection.
5647         #
5648         #  @ref tui_projection "Example"
5649         def MakeProjection(self, theSource, theTarget):
5650             """
5651             Create new object as projection of the given one on a 2D surface.
5652
5653             Parameters:
5654                 theSource The source object for the projection. It can be a point, edge or wire.
5655                 theTarget The target object. It can be planar or cylindrical face.
5656
5657             Returns:  
5658                 New GEOM.GEOM_Object, containing the projection.
5659             """
5660             # Example: see GEOM_TestAll.py
5661             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
5662             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
5663             return anObj
5664
5665         # -----------------------------------------------------------------------------
5666         # Patterns
5667         # -----------------------------------------------------------------------------
5668
5669         ## Translate the given object along the given vector a given number times
5670         #  @param theObject The object to be translated.
5671         #  @param theVector Direction of the translation.
5672         #  @param theStep Distance to translate on.
5673         #  @param theNbTimes Quantity of translations to be done.
5674         #  @return New GEOM.GEOM_Object, containing compound of all
5675         #          the shapes, obtained after each translation.
5676         #
5677         #  @ref tui_multi_translation "Example"
5678         def MakeMultiTranslation1D(self,theObject, theVector, theStep, theNbTimes):
5679             """
5680             Translate the given object along the given vector a given number times
5681
5682             Parameters:
5683                 theObject The object to be translated.
5684                 theVector Direction of the translation.
5685                 theStep Distance to translate on.
5686                 theNbTimes Quantity of translations to be done.
5687
5688             Returns:     
5689                 New GEOM.GEOM_Object, containing compound of all
5690                 the shapes, obtained after each translation.
5691
5692             Example of usage:
5693                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
5694             """
5695             # Example: see GEOM_TestAll.py
5696             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
5697             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
5698             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
5699             anObj.SetParameters(Parameters)
5700             return anObj
5701
5702         ## Conseqently apply two specified translations to theObject specified number of times.
5703         #  @param theObject The object to be translated.
5704         #  @param theVector1 Direction of the first translation.
5705         #  @param theStep1 Step of the first translation.
5706         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
5707         #  @param theVector2 Direction of the second translation.
5708         #  @param theStep2 Step of the second translation.
5709         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
5710         #  @return New GEOM.GEOM_Object, containing compound of all
5711         #          the shapes, obtained after each translation.
5712         #
5713         #  @ref tui_multi_translation "Example"
5714         def MakeMultiTranslation2D(self,theObject, theVector1, theStep1, theNbTimes1,
5715                                    theVector2, theStep2, theNbTimes2):
5716             """
5717             Conseqently apply two specified translations to theObject specified number of times.
5718
5719             Parameters:
5720                 theObject The object to be translated.
5721                 theVector1 Direction of the first translation.
5722                 theStep1 Step of the first translation.
5723                 theNbTimes1 Quantity of translations to be done along theVector1.
5724                 theVector2 Direction of the second translation.
5725                 theStep2 Step of the second translation.
5726                 theNbTimes2 Quantity of translations to be done along theVector2.
5727
5728             Returns:
5729                 New GEOM.GEOM_Object, containing compound of all
5730                 the shapes, obtained after each translation.
5731
5732             Example of usage:
5733                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
5734             """
5735             # Example: see GEOM_TestAll.py
5736             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
5737             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
5738                                                  theVector2, theStep2, theNbTimes2)
5739             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
5740             anObj.SetParameters(Parameters)
5741             return anObj
5742
5743         ## Rotate the given object around the given axis a given number times.
5744         #  Rotation angle will be 2*PI/theNbTimes.
5745         #  @param theObject The object to be rotated.
5746         #  @param theAxis The rotation axis.
5747         #  @param theNbTimes Quantity of rotations to be done.
5748         #  @return New GEOM.GEOM_Object, containing compound of all the
5749         #          shapes, obtained after each rotation.
5750         #
5751         #  @ref tui_multi_rotation "Example"
5752         def MultiRotate1D(self,theObject, theAxis, theNbTimes):
5753             """
5754             Rotate the given object around the given axis a given number times.
5755             Rotation angle will be 2*PI/theNbTimes.
5756
5757             Parameters:
5758                 theObject The object to be rotated.
5759                 theAxis The rotation axis.
5760                 theNbTimes Quantity of rotations to be done.
5761
5762             Returns:     
5763                 New GEOM.GEOM_Object, containing compound of all the
5764                 shapes, obtained after each rotation.
5765
5766             Example of usage:
5767                 rot1d = geompy.MultiRotate1D(prism, vect, 4)
5768             """
5769             # Example: see GEOM_TestAll.py
5770             theAxis, theNbTimes, Parameters = ParseParameters(theAxis, theNbTimes)
5771             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
5772             RaiseIfFailed("MultiRotate1D", self.TrsfOp)
5773             anObj.SetParameters(Parameters)
5774             return anObj
5775
5776         ## Rotate the given object around the
5777         #  given axis on the given angle a given number
5778         #  times and multi-translate each rotation result.
5779         #  Translation direction passes through center of gravity
5780         #  of rotated shape and its projection on the rotation axis.
5781         #  @param theObject The object to be rotated.
5782         #  @param theAxis Rotation axis.
5783         #  @param theAngle Rotation angle in graduces.
5784         #  @param theNbTimes1 Quantity of rotations to be done.
5785         #  @param theStep Translation distance.
5786         #  @param theNbTimes2 Quantity of translations to be done.
5787         #  @return New GEOM.GEOM_Object, containing compound of all the
5788         #          shapes, obtained after each transformation.
5789         #
5790         #  @ref tui_multi_rotation "Example"
5791         def MultiRotate2D(self,theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2):
5792             """
5793             Rotate the given object around the
5794             given axis on the given angle a given number
5795             times and multi-translate each rotation result.
5796             Translation direction passes through center of gravity
5797             of rotated shape and its projection on the rotation axis.
5798
5799             Parameters:
5800                 theObject The object to be rotated.
5801                 theAxis Rotation axis.
5802                 theAngle Rotation angle in graduces.
5803                 theNbTimes1 Quantity of rotations to be done.
5804                 theStep Translation distance.
5805                 theNbTimes2 Quantity of translations to be done.
5806
5807             Returns:    
5808                 New GEOM.GEOM_Object, containing compound of all the
5809                 shapes, obtained after each transformation.
5810
5811             Example of usage:
5812                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
5813             """
5814             # Example: see GEOM_TestAll.py
5815             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
5816             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
5817             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
5818             anObj.SetParameters(Parameters)
5819             return anObj
5820
5821         ## The same, as MultiRotate1D(), but axis is given by direction and point
5822         #
5823         #  @ref swig_MakeMultiRotation "Example"
5824         def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes):
5825             """
5826             The same, as geompy.MultiRotate1D, but axis is given by direction and point
5827
5828             Example of usage:
5829                 pz = geompy.MakeVertex(0, 0, 100)
5830                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
5831                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
5832             """
5833             # Example: see GEOM_TestOthers.py
5834             aVec = self.MakeLine(aPoint,aDir)
5835             anObj = self.MultiRotate1D(aShape,aVec,aNbTimes)
5836             return anObj
5837
5838         ## The same, as MultiRotate2D(), but axis is given by direction and point
5839         #
5840         #  @ref swig_MakeMultiRotation "Example"
5841         def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2):
5842             """
5843             The same, as MultiRotate2D(), but axis is given by direction and point
5844             
5845             Example of usage:
5846                 pz = geompy.MakeVertex(0, 0, 100)
5847                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
5848                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
5849             """
5850             # Example: see GEOM_TestOthers.py
5851             aVec = self.MakeLine(aPoint,aDir)
5852             anObj = self.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2)
5853             return anObj
5854
5855         # end of l3_transform
5856         ## @}
5857
5858         ## @addtogroup l3_local
5859         ## @{
5860
5861         ## Perform a fillet on all edges of the given shape.
5862         #  @param theShape Shape, to perform fillet on.
5863         #  @param theR Fillet radius.
5864         #  @return New GEOM.GEOM_Object, containing the result shape.
5865         #
5866         #  @ref tui_fillet "Example 1"
5867         #  \n @ref swig_MakeFilletAll "Example 2"
5868         def MakeFilletAll(self,theShape, theR):
5869             """
5870             Perform a fillet on all edges of the given shape.
5871
5872             Parameters:
5873                 theShape Shape, to perform fillet on.
5874                 theR Fillet radius.
5875
5876             Returns: 
5877                 New GEOM.GEOM_Object, containing the result shape.
5878
5879             Example of usage: 
5880                filletall = geompy.MakeFilletAll(prism, 10.) 
5881             """
5882             # Example: see GEOM_TestOthers.py
5883             theR,Parameters = ParseParameters(theR)
5884             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
5885             RaiseIfFailed("MakeFilletAll", self.LocalOp)
5886             anObj.SetParameters(Parameters)
5887             return anObj
5888
5889         ## Perform a fillet on the specified edges/faces of the given shape
5890         #  @param theShape Shape, to perform fillet on.
5891         #  @param theR Fillet radius.
5892         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
5893         #  @param theListShapes Global indices of edges/faces to perform fillet on.
5894         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
5895         #  @return New GEOM.GEOM_Object, containing the result shape.
5896         #
5897         #  @ref tui_fillet "Example"
5898         def MakeFillet(self,theShape, theR, theShapeType, theListShapes):
5899             """
5900             Perform a fillet on the specified edges/faces of the given shape
5901
5902             Parameters:
5903                 theShape Shape, to perform fillet on.
5904                 theR Fillet radius.
5905                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
5906                 theListShapes Global indices of edges/faces to perform fillet on.
5907
5908             Note:
5909                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
5910
5911             Returns: 
5912                 New GEOM.GEOM_Object, containing the result shape.
5913
5914             Example of usage:
5915                 # get the list of IDs (IDList) for the fillet
5916                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
5917                 IDlist_e = []
5918                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
5919                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
5920                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
5921                 # make a fillet on the specified edges of the given shape
5922                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
5923             """
5924             # Example: see GEOM_TestAll.py
5925             theR,Parameters = ParseParameters(theR)
5926             anObj = None
5927             if theShapeType == ShapeType["EDGE"]:
5928                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
5929                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
5930             else:
5931                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
5932                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
5933             anObj.SetParameters(Parameters)
5934             return anObj
5935
5936         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
5937         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes):
5938             """
5939             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
5940
5941             Example of usage:
5942                 # get the list of IDs (IDList) for the fillet
5943                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
5944                 IDlist_e = []
5945                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
5946                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
5947                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
5948                 # make a fillet on the specified edges of the given shape
5949                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
5950             """
5951             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
5952             anObj = None
5953             if theShapeType == ShapeType["EDGE"]:
5954                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
5955                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
5956             else:
5957                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
5958                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
5959             anObj.SetParameters(Parameters)
5960             return anObj
5961
5962         ## Perform a fillet on the specified edges of the given shape
5963         #  @param theShape  Wire Shape to perform fillet on.
5964         #  @param theR  Fillet radius.
5965         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
5966         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
5967         #    \note The list of vertices could be empty,
5968         #          in this case fillet will done done at all vertices in wire
5969         #  @return New GEOM.GEOM_Object, containing the result shape.
5970         #
5971         #  @ref tui_fillet2d "Example"
5972         def MakeFillet1D(self,theShape, theR, theListOfVertexes):
5973             """
5974             Perform a fillet on the specified edges of the given shape
5975
5976             Parameters:
5977                 theShape  Wire Shape to perform fillet on.
5978                 theR  Fillet radius.
5979                 theListOfVertexes Global indices of vertexes to perform fillet on.
5980             Note:
5981                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
5982
5983                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
5984
5985             Returns: 
5986                 New GEOM.GEOM_Object, containing the result shape.
5987
5988             Example of usage:  
5989                 # create wire
5990                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
5991                 # make fillet at given wire vertices with giver radius
5992                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
5993             """
5994             # Example: see GEOM_TestAll.py
5995             theR,Parameters = ParseParameters(theR)
5996             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes)
5997             RaiseIfFailed("MakeFillet1D", self.LocalOp)
5998             anObj.SetParameters(Parameters)
5999             return anObj
6000
6001         ## Perform a fillet at the specified vertices of the given face/shell.
6002         #  @param theShape Face or Shell shape to perform fillet on.
6003         #  @param theR Fillet radius.
6004         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
6005         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6006         #  @return New GEOM.GEOM_Object, containing the result shape.
6007         #
6008         #  @ref tui_fillet2d "Example"
6009         def MakeFillet2D(self, theShape, theR, theListOfVertexes):
6010             """
6011             Perform a fillet at the specified vertices of the given face/shell.
6012
6013             Parameters:
6014                 theShape  Face or Shell shape to perform fillet on.
6015                 theR  Fillet radius.
6016                 theListOfVertexes Global indices of vertexes to perform fillet on.
6017             Note:
6018                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6019
6020             Returns: 
6021                 New GEOM.GEOM_Object, containing the result shape.
6022
6023             Example of usage:
6024                 face = geompy.MakeFaceHW(100, 100, 1)
6025                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
6026             """
6027             # Example: see GEOM_TestAll.py
6028             theR,Parameters = ParseParameters(theR)
6029             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
6030             RaiseIfFailed("MakeFillet2D", self.LocalOp)
6031             anObj.SetParameters(Parameters)
6032             return anObj
6033
6034         ## Perform a symmetric chamfer on all edges of the given shape.
6035         #  @param theShape Shape, to perform chamfer on.
6036         #  @param theD Chamfer size along each face.
6037         #  @return New GEOM.GEOM_Object, containing the result shape.
6038         #
6039         #  @ref tui_chamfer "Example 1"
6040         #  \n @ref swig_MakeChamferAll "Example 2"
6041         def MakeChamferAll(self,theShape, theD):
6042             """
6043             Perform a symmetric chamfer on all edges of the given shape.
6044
6045             Parameters:
6046                 theShape Shape, to perform chamfer on.
6047                 theD Chamfer size along each face.
6048
6049             Returns:     
6050                 New GEOM.GEOM_Object, containing the result shape.
6051
6052             Example of usage:
6053                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
6054             """
6055             # Example: see GEOM_TestOthers.py
6056             theD,Parameters = ParseParameters(theD)
6057             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
6058             RaiseIfFailed("MakeChamferAll", self.LocalOp)
6059             anObj.SetParameters(Parameters)
6060             return anObj
6061
6062         ## Perform a chamfer on edges, common to the specified faces,
6063         #  with distance D1 on the Face1
6064         #  @param theShape Shape, to perform chamfer on.
6065         #  @param theD1 Chamfer size along \a theFace1.
6066         #  @param theD2 Chamfer size along \a theFace2.
6067         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
6068         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6069         #  @return New GEOM.GEOM_Object, containing the result shape.
6070         #
6071         #  @ref tui_chamfer "Example"
6072         def MakeChamferEdge(self,theShape, theD1, theD2, theFace1, theFace2):
6073             """
6074             Perform a chamfer on edges, common to the specified faces,
6075             with distance D1 on the Face1
6076
6077             Parameters:
6078                 theShape Shape, to perform chamfer on.
6079                 theD1 Chamfer size along theFace1.
6080                 theD2 Chamfer size along theFace2.
6081                 theFace1,theFace2 Global indices of two faces of theShape.
6082
6083             Note:
6084                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6085
6086             Returns:      
6087                 New GEOM.GEOM_Object, containing the result shape.
6088
6089             Example of usage:
6090                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
6091                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
6092                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
6093                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
6094             """
6095             # Example: see GEOM_TestAll.py
6096             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6097             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
6098             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
6099             anObj.SetParameters(Parameters)
6100             return anObj
6101
6102         ## Perform a chamfer on edges
6103         #  @param theShape Shape, to perform chamfer on.
6104         #  @param theD Chamfer length
6105         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6106         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
6107         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6108         #  @return New GEOM.GEOM_Object, containing the result shape.
6109         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2):
6110             """
6111             Perform a chamfer on edges
6112
6113             Parameters:
6114                 theShape Shape, to perform chamfer on.
6115                 theD1 Chamfer size along theFace1.
6116                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
6117                 theFace1,theFace2 Global indices of two faces of theShape.
6118
6119             Note:
6120                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6121
6122             Returns:      
6123                 New GEOM.GEOM_Object, containing the result shape.
6124
6125             Example of usage:
6126                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
6127                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
6128                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
6129                 ang = 30
6130                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
6131             """
6132             flag = False
6133             if isinstance(theAngle,str):
6134                 flag = True
6135             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6136             if flag:
6137                 theAngle = theAngle*math.pi/180.0
6138             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
6139             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
6140             anObj.SetParameters(Parameters)
6141             return anObj
6142
6143         ## Perform a chamfer on all edges of the specified faces,
6144         #  with distance D1 on the first specified face (if several for one edge)
6145         #  @param theShape Shape, to perform chamfer on.
6146         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
6147         #               connected to the edge, are in \a theFaces, \a theD1
6148         #               will be get along face, which is nearer to \a theFaces beginning.
6149         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
6150         #  @param theFaces Sequence of global indices of faces of \a theShape.
6151         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6152         #  @return New GEOM.GEOM_Object, containing the result shape.
6153         #
6154         #  @ref tui_chamfer "Example"
6155         def MakeChamferFaces(self,theShape, theD1, theD2, theFaces):
6156             """
6157             Perform a chamfer on all edges of the specified faces,
6158             with distance D1 on the first specified face (if several for one edge)
6159
6160             Parameters:
6161                 theShape Shape, to perform chamfer on.
6162                 theD1 Chamfer size along face from  theFaces. If both faces,
6163                       connected to the edge, are in theFaces, theD1
6164                       will be get along face, which is nearer to theFaces beginning.
6165                 theD2 Chamfer size along another of two faces, connected to the edge.
6166                 theFaces Sequence of global indices of faces of theShape.
6167
6168                 
6169             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
6170
6171             Returns:  
6172                 New GEOM.GEOM_Object, containing the result shape.
6173             """
6174             # Example: see GEOM_TestAll.py
6175             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6176             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
6177             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
6178             anObj.SetParameters(Parameters)
6179             return anObj
6180
6181         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
6182         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6183         #
6184         #  @ref swig_FilletChamfer "Example"
6185         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces):
6186             """
6187             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
6188             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6189             """
6190             flag = False
6191             if isinstance(theAngle,str):
6192                 flag = True
6193             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6194             if flag:
6195                 theAngle = theAngle*math.pi/180.0
6196             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
6197             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
6198             anObj.SetParameters(Parameters)
6199             return anObj
6200
6201         ## Perform a chamfer on edges,
6202         #  with distance D1 on the first specified face (if several for one edge)
6203         #  @param theShape Shape, to perform chamfer on.
6204         #  @param theD1,theD2 Chamfer size
6205         #  @param theEdges Sequence of edges of \a theShape.
6206         #  @return New GEOM.GEOM_Object, containing the result shape.
6207         #
6208         #  @ref swig_FilletChamfer "Example"
6209         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges):
6210             """
6211             Perform a chamfer on edges,
6212             with distance D1 on the first specified face (if several for one edge)
6213             
6214             Parameters:
6215                 theShape Shape, to perform chamfer on.
6216                 theD1,theD2 Chamfer size
6217                 theEdges Sequence of edges of theShape.
6218
6219             Returns:
6220                 New GEOM.GEOM_Object, containing the result shape.
6221             """
6222             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6223             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
6224             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
6225             anObj.SetParameters(Parameters)
6226             return anObj
6227
6228         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
6229         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6230         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges):
6231             """
6232             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
6233             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6234             """
6235             flag = False
6236             if isinstance(theAngle,str):
6237                 flag = True
6238             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6239             if flag:
6240                 theAngle = theAngle*math.pi/180.0
6241             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
6242             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
6243             anObj.SetParameters(Parameters)
6244             return anObj
6245
6246         ## /sa MakeChamferEdge() and MakeChamferFaces()
6247         #
6248         #  @ref swig_MakeChamfer "Example"
6249         def MakeChamfer(self,aShape,d1,d2,aShapeType,ListShape):
6250             """
6251             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
6252             """
6253             # Example: see GEOM_TestOthers.py
6254             anObj = None
6255             if aShapeType == ShapeType["EDGE"]:
6256                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1])
6257             else:
6258                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape)
6259             return anObj
6260             
6261         ## Remove material from a solid by extrusion of the base shape on the given distance.
6262         #  @param theInit Shape to remove material from. It must be a solid or 
6263         #  a compound made of a single solid.
6264         #  @param theBase Closed edge or wire defining the base shape to be extruded.
6265         #  @param theH Prism dimension along the normal to theBase
6266         #  @param theAngle Draft angle in degrees.
6267         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
6268         #
6269         #  @ref tui_creation_prism "Example"
6270         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle):
6271             """
6272             Add material to a solid by extrusion of the base shape on the given distance.
6273
6274             Parameters:
6275                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
6276                 theBase Closed edge or wire defining the base shape to be extruded.
6277                 theH Prism dimension along the normal  to theBase
6278                 theAngle Draft angle in degrees.
6279
6280             Returns:
6281                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
6282             """
6283             # Example: see GEOM_TestAll.py
6284             #theH,Parameters = ParseParameters(theH)
6285             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
6286             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
6287             #anObj.SetParameters(Parameters)
6288             return anObj   
6289             
6290         ## Add material to a solid by extrusion of the base shape on the given distance.
6291         #  @param theInit Shape to add material to. It must be a solid or 
6292         #  a compound made of a single solid.
6293         #  @param theBase Closed edge or wire defining the base shape to be extruded.
6294         #  @param theH Prism dimension along the normal to theBase
6295         #  @param theAngle Draft angle in degrees.
6296         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
6297         #
6298         #  @ref tui_creation_prism "Example"
6299         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle):
6300             """
6301             Add material to a solid by extrusion of the base shape on the given distance.
6302
6303             Parameters:
6304                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
6305                 theBase Closed edge or wire defining the base shape to be extruded.
6306                 theH Prism dimension along the normal  to theBase
6307                 theAngle Draft angle in degrees.
6308
6309             Returns:
6310                 New GEOM.GEOM_Object,  containing the initial shape with added material.
6311             """
6312             # Example: see GEOM_TestAll.py
6313             #theH,Parameters = ParseParameters(theH)
6314             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
6315             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
6316             #anObj.SetParameters(Parameters)
6317             return anObj   
6318
6319         # end of l3_local
6320         ## @}
6321
6322         ## @addtogroup l3_basic_op
6323         ## @{
6324
6325         ## Perform an Archimde operation on the given shape with given parameters.
6326         #  The object presenting the resulting face is returned.
6327         #  @param theShape Shape to be put in water.
6328         #  @param theWeight Weight og the shape.
6329         #  @param theWaterDensity Density of the water.
6330         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
6331         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
6332         #          by a plane, corresponding to water level.
6333         #
6334         #  @ref tui_archimede "Example"
6335         def Archimede(self,theShape, theWeight, theWaterDensity, theMeshDeflection):
6336             """
6337             Perform an Archimde operation on the given shape with given parameters.
6338             The object presenting the resulting face is returned.
6339
6340             Parameters: 
6341                 theShape Shape to be put in water.
6342                 theWeight Weight og the shape.
6343                 theWaterDensity Density of the water.
6344                 theMeshDeflection Deflection of the mesh, using to compute the section.
6345
6346             Returns: 
6347                 New GEOM.GEOM_Object, containing a section of theShape
6348                 by a plane, corresponding to water level.
6349             """
6350             # Example: see GEOM_TestAll.py
6351             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
6352               theWeight,theWaterDensity,theMeshDeflection)
6353             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
6354             RaiseIfFailed("MakeArchimede", self.LocalOp)
6355             anObj.SetParameters(Parameters)
6356             return anObj
6357
6358         # end of l3_basic_op
6359         ## @}
6360
6361         ## @addtogroup l2_measure
6362         ## @{
6363
6364         ## Get point coordinates
6365         #  @return [x, y, z]
6366         #
6367         #  @ref tui_measurement_tools_page "Example"
6368         def PointCoordinates(self,Point):
6369             """
6370             Get point coordinates
6371
6372             Returns:
6373                 [x, y, z]
6374             """
6375             # Example: see GEOM_TestMeasures.py
6376             aTuple = self.MeasuOp.PointCoordinates(Point)
6377             RaiseIfFailed("PointCoordinates", self.MeasuOp)
6378             return aTuple
6379
6380         ## Get summarized length of all wires,
6381         #  area of surface and volume of the given shape.
6382         #  @param theShape Shape to define properties of.
6383         #  @return [theLength, theSurfArea, theVolume]\n
6384         #  theLength:   Summarized length of all wires of the given shape.\n
6385         #  theSurfArea: Area of surface of the given shape.\n
6386         #  theVolume:   Volume of the given shape.
6387         #
6388         #  @ref tui_measurement_tools_page "Example"
6389         def BasicProperties(self,theShape):
6390             """
6391             Get summarized length of all wires,
6392             area of surface and volume of the given shape.
6393
6394             Parameters: 
6395                 theShape Shape to define properties of.
6396
6397             Returns:
6398                 [theLength, theSurfArea, theVolume]
6399                  theLength:   Summarized length of all wires of the given shape.
6400                  theSurfArea: Area of surface of the given shape.
6401                  theVolume:   Volume of the given shape.
6402             """
6403             # Example: see GEOM_TestMeasures.py
6404             aTuple = self.MeasuOp.GetBasicProperties(theShape)
6405             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
6406             return aTuple
6407
6408         ## Get parameters of bounding box of the given shape
6409         #  @param theShape Shape to obtain bounding box of.
6410         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
6411         #  Xmin,Xmax: Limits of shape along OX axis.
6412         #  Ymin,Ymax: Limits of shape along OY axis.
6413         #  Zmin,Zmax: Limits of shape along OZ axis.
6414         #
6415         #  @ref tui_measurement_tools_page "Example"
6416         def BoundingBox(self,theShape):
6417             """
6418             Get parameters of bounding box of the given shape
6419
6420             Parameters: 
6421                 theShape Shape to obtain bounding box of.
6422
6423             Returns:
6424                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
6425                  Xmin,Xmax: Limits of shape along OX axis.
6426                  Ymin,Ymax: Limits of shape along OY axis.
6427                  Zmin,Zmax: Limits of shape along OZ axis.
6428             """
6429             # Example: see GEOM_TestMeasures.py
6430             aTuple = self.MeasuOp.GetBoundingBox(theShape)
6431             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
6432             return aTuple
6433
6434         ## Get inertia matrix and moments of inertia of theShape.
6435         #  @param theShape Shape to calculate inertia of.
6436         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
6437         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
6438         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
6439         #
6440         #  @ref tui_measurement_tools_page "Example"
6441         def Inertia(self,theShape):
6442             """
6443             Get inertia matrix and moments of inertia of theShape.
6444
6445             Parameters: 
6446                 theShape Shape to calculate inertia of.
6447
6448             Returns:
6449                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
6450                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
6451                  Ix,Iy,Iz:    Moments of inertia of the given shape.
6452             """
6453             # Example: see GEOM_TestMeasures.py
6454             aTuple = self.MeasuOp.GetInertia(theShape)
6455             RaiseIfFailed("GetInertia", self.MeasuOp)
6456             return aTuple
6457
6458         ## Get if coords are included in the shape (ST_IN or ST_ON)
6459         #  @param theShape Shape
6460         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
6461         #  @param tolerance to be used (default is 1.0e-7)
6462         #  @return list_of_boolean = [res1, res2, ...]
6463         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
6464             """
6465             Get if coords are included in the shape (ST_IN or ST_ON)
6466             
6467             Parameters: 
6468                 theShape Shape
6469                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
6470                 tolerance to be used (default is 1.0e-7)
6471
6472             Returns:
6473                 list_of_boolean = [res1, res2, ...]
6474             """
6475             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
6476
6477         ## Get minimal distance between the given shapes.
6478         #  @param theShape1,theShape2 Shapes to find minimal distance between.
6479         #  @return Value of the minimal distance between the given shapes.
6480         #
6481         #  @ref tui_measurement_tools_page "Example"
6482         def MinDistance(self, theShape1, theShape2):
6483             """
6484             Get minimal distance between the given shapes.
6485             
6486             Parameters: 
6487                 theShape1,theShape2 Shapes to find minimal distance between.
6488
6489             Returns:    
6490                 Value of the minimal distance between the given shapes.
6491             """
6492             # Example: see GEOM_TestMeasures.py
6493             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
6494             RaiseIfFailed("GetMinDistance", self.MeasuOp)
6495             return aTuple[0]
6496
6497         ## Get minimal distance between the given shapes.
6498         #  @param theShape1,theShape2 Shapes to find minimal distance between.
6499         #  @return Value of the minimal distance between the given shapes.
6500         #
6501         #  @ref swig_all_measure "Example"
6502         def MinDistanceComponents(self, theShape1, theShape2):
6503             """
6504             Get minimal distance between the given shapes.
6505
6506             Parameters: 
6507                 theShape1,theShape2 Shapes to find minimal distance between.
6508
6509             Returns:  
6510                 Value of the minimal distance between the given shapes.
6511             """
6512             # Example: see GEOM_TestMeasures.py
6513             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
6514             RaiseIfFailed("GetMinDistance", self.MeasuOp)
6515             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
6516             return aRes
6517
6518         ## Get angle between the given shapes in degrees.
6519         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
6520         #  @note If both arguments are vectors, the angle is computed in accordance
6521         #        with their orientations, otherwise the minimum angle is computed.
6522         #  @return Value of the angle between the given shapes in degrees.
6523         #
6524         #  @ref tui_measurement_tools_page "Example"
6525         def GetAngle(self, theShape1, theShape2):
6526             """
6527             Get angle between the given shapes in degrees.
6528
6529             Parameters: 
6530                 theShape1,theShape2 Lines or linear edges to find angle between.
6531
6532             Note:
6533                 If both arguments are vectors, the angle is computed in accordance
6534                 with their orientations, otherwise the minimum angle is computed.
6535
6536             Returns:  
6537                 Value of the angle between the given shapes in degrees.
6538             """
6539             # Example: see GEOM_TestMeasures.py
6540             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
6541             RaiseIfFailed("GetAngle", self.MeasuOp)
6542             return anAngle
6543
6544         ## Get angle between the given shapes in radians.
6545         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
6546         #  @note If both arguments are vectors, the angle is computed in accordance
6547         #        with their orientations, otherwise the minimum angle is computed.
6548         #  @return Value of the angle between the given shapes in radians.
6549         #
6550         #  @ref tui_measurement_tools_page "Example"
6551         def GetAngleRadians(self, theShape1, theShape2):
6552             """
6553             Get angle between the given shapes in radians.
6554
6555             Parameters: 
6556                 theShape1,theShape2 Lines or linear edges to find angle between.
6557
6558                 
6559             Note:
6560                 If both arguments are vectors, the angle is computed in accordance
6561                 with their orientations, otherwise the minimum angle is computed.
6562
6563             Returns:  
6564                 Value of the angle between the given shapes in radians.
6565             """
6566             # Example: see GEOM_TestMeasures.py
6567             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
6568             RaiseIfFailed("GetAngle", self.MeasuOp)
6569             return anAngle
6570
6571         ## @name Curve Curvature Measurement
6572         #  Methods for receiving radius of curvature of curves
6573         #  in the given point
6574         ## @{
6575
6576         ## Measure curvature of a curve at a point, set by parameter.
6577         #  @param theCurve a curve.
6578         #  @param theParam parameter.
6579         #  @return radius of curvature of \a theCurve.
6580         #
6581         #  @ref swig_todo "Example"
6582         def CurveCurvatureByParam(self, theCurve, theParam):
6583             """
6584             Measure curvature of a curve at a point, set by parameter.
6585
6586             Parameters: 
6587                 theCurve a curve.
6588                 theParam parameter.
6589
6590             Returns: 
6591                 radius of curvature of theCurve.
6592             """
6593             # Example: see GEOM_TestMeasures.py
6594             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
6595             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
6596             return aCurv
6597
6598         ## Measure curvature of a curve at a point.
6599         #  @param theCurve a curve.
6600         #  @param thePoint given point.
6601         #  @return radius of curvature of \a theCurve.
6602         #
6603         #  @ref swig_todo "Example"
6604         def CurveCurvatureByPoint(self, theCurve, thePoint):
6605             """
6606             Measure curvature of a curve at a point.
6607
6608             Parameters: 
6609                 theCurve a curve.
6610                 thePoint given point.
6611
6612             Returns: 
6613                 radius of curvature of theCurve.           
6614             """
6615             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
6616             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
6617             return aCurv
6618         ## @}
6619
6620         ## @name Surface Curvature Measurement
6621         #  Methods for receiving max and min radius of curvature of surfaces
6622         #  in the given point
6623         ## @{
6624
6625         ## Measure max radius of curvature of surface.
6626         #  @param theSurf the given surface.
6627         #  @param theUParam Value of U-parameter on the referenced surface.
6628         #  @param theVParam Value of V-parameter on the referenced surface.
6629         #  @return max radius of curvature of theSurf.
6630         #
6631         ## @ref swig_todo "Example"
6632         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
6633             """
6634             Measure max radius of curvature of surface.
6635
6636             Parameters: 
6637                 theSurf the given surface.
6638                 theUParam Value of U-parameter on the referenced surface.
6639                 theVParam Value of V-parameter on the referenced surface.
6640                 
6641             Returns:     
6642                 max radius of curvature of theSurf.
6643             """
6644             # Example: see GEOM_TestMeasures.py
6645             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
6646             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
6647             return aSurf
6648
6649         ## Measure max radius of curvature of surface in the given point
6650         #  @param theSurf the given surface.
6651         #  @param thePoint given point.
6652         #  @return max radius of curvature of theSurf.
6653         #
6654         ## @ref swig_todo "Example"
6655         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
6656             """
6657             Measure max radius of curvature of surface in the given point.
6658
6659             Parameters: 
6660                 theSurf the given surface.
6661                 thePoint given point.
6662                 
6663             Returns:     
6664                 max radius of curvature of theSurf.          
6665             """
6666             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
6667             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
6668             return aSurf
6669
6670         ## Measure min radius of curvature of surface.
6671         #  @param theSurf the given surface.
6672         #  @param theUParam Value of U-parameter on the referenced surface.
6673         #  @param theVParam Value of V-parameter on the referenced surface.
6674         #  @return min radius of curvature of theSurf.
6675         #   
6676         ## @ref swig_todo "Example"
6677         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
6678             """
6679             Measure min radius of curvature of surface.
6680
6681             Parameters: 
6682                 theSurf the given surface.
6683                 theUParam Value of U-parameter on the referenced surface.
6684                 theVParam Value of V-parameter on the referenced surface.
6685                 
6686             Returns:     
6687                 Min radius of curvature of theSurf.
6688             """
6689             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
6690             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
6691             return aSurf
6692
6693         ## Measure min radius of curvature of surface in the given point
6694         #  @param theSurf the given surface.
6695         #  @param thePoint given point.
6696         #  @return min radius of curvature of theSurf.
6697         #
6698         ## @ref swig_todo "Example"
6699         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
6700             """
6701             Measure min radius of curvature of surface in the given point.
6702
6703             Parameters: 
6704                 theSurf the given surface.
6705                 thePoint given point.
6706                 
6707             Returns:     
6708                 Min radius of curvature of theSurf.          
6709             """
6710             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
6711             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
6712             return aSurf
6713         ## @}
6714
6715         ## Get min and max tolerances of sub-shapes of theShape
6716         #  @param theShape Shape, to get tolerances of.
6717         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
6718         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
6719         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
6720         #  VertMin,VertMax: Min and max tolerances of the vertices.
6721         #
6722         #  @ref tui_measurement_tools_page "Example"
6723         def Tolerance(self,theShape):
6724             """
6725             Get min and max tolerances of sub-shapes of theShape
6726
6727             Parameters: 
6728                 theShape Shape, to get tolerances of.
6729
6730             Returns:    
6731                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
6732                  FaceMin,FaceMax: Min and max tolerances of the faces.
6733                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
6734                  VertMin,VertMax: Min and max tolerances of the vertices.
6735             """
6736             # Example: see GEOM_TestMeasures.py
6737             aTuple = self.MeasuOp.GetTolerance(theShape)
6738             RaiseIfFailed("GetTolerance", self.MeasuOp)
6739             return aTuple
6740
6741         ## Obtain description of the given shape (number of sub-shapes of each type)
6742         #  @param theShape Shape to be described.
6743         #  @return Description of the given shape.
6744         #
6745         #  @ref tui_measurement_tools_page "Example"
6746         def WhatIs(self,theShape):
6747             """
6748             Obtain description of the given shape (number of sub-shapes of each type)
6749
6750             Parameters:
6751                 theShape Shape to be described.
6752
6753             Returns:
6754                 Description of the given shape.
6755             """
6756             # Example: see GEOM_TestMeasures.py
6757             aDescr = self.MeasuOp.WhatIs(theShape)
6758             RaiseIfFailed("WhatIs", self.MeasuOp)
6759             return aDescr
6760
6761         ## Obtain quantity of shapes of the given type in \a theShape.
6762         #  If \a theShape is of type \a theType, it is also counted.
6763         #  @param theShape Shape to be described.
6764         #  @param theType the given ShapeType().
6765         #  @return Quantity of shapes of type \a theType in \a theShape.
6766         #
6767         #  @ref tui_measurement_tools_page "Example"
6768         def NbShapes (self, theShape, theType):
6769             """
6770             Obtain quantity of shapes of the given type in theShape.
6771             If theShape is of type theType, it is also counted.
6772
6773             Parameters:
6774                 theShape Shape to be described.
6775                 theType the given geompy.ShapeType
6776
6777             Returns:
6778                 Quantity of shapes of type theType in theShape.
6779             """
6780             # Example: see GEOM_TestMeasures.py
6781             listSh = self.SubShapeAllIDs(theShape, theType)
6782             Nb = len(listSh)
6783             t       = EnumToLong(theShape.GetShapeType())
6784             theType = EnumToLong(theType)
6785             if t == theType:
6786                 Nb = Nb + 1
6787                 pass
6788             return Nb
6789
6790         ## Obtain quantity of shapes of each type in \a theShape.
6791         #  The \a theShape is also counted.
6792         #  @param theShape Shape to be described.
6793         #  @return Dictionary of ShapeType() with bound quantities of shapes.
6794         #
6795         #  @ref tui_measurement_tools_page "Example"
6796         def ShapeInfo (self, theShape):
6797             """
6798             Obtain quantity of shapes of each type in theShape.
6799             The theShape is also counted.
6800
6801             Parameters:
6802                 theShape Shape to be described.
6803
6804             Returns:
6805                 Dictionary of geompy.ShapeType with bound quantities of shapes.
6806             """
6807             # Example: see GEOM_TestMeasures.py
6808             aDict = {}
6809             for typeSh in ShapeType:
6810                 if typeSh in ( "AUTO", "SHAPE" ): continue
6811                 listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
6812                 Nb = len(listSh)
6813                 if EnumToLong(theShape.GetShapeType()) == ShapeType[typeSh]:
6814                     Nb = Nb + 1
6815                     pass
6816                 aDict[typeSh] = Nb
6817                 pass
6818             return aDict
6819
6820         ## Get a point, situated at the centre of mass of theShape.
6821         #  @param theShape Shape to define centre of mass of.
6822         #  @return New GEOM.GEOM_Object, containing the created point.
6823         #
6824         #  @ref tui_measurement_tools_page "Example"
6825         def MakeCDG(self,theShape):
6826             """
6827             Get a point, situated at the centre of mass of theShape.
6828
6829             Parameters:
6830                 theShape Shape to define centre of mass of.
6831
6832             Returns:
6833                 New GEOM.GEOM_Object, containing the created point.
6834             """
6835             # Example: see GEOM_TestMeasures.py
6836             anObj = self.MeasuOp.GetCentreOfMass(theShape)
6837             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
6838             return anObj
6839
6840         ## Get a vertex sub-shape by index depended with orientation.
6841         #  @param theShape Shape to find sub-shape.
6842         #  @param theIndex Index to find vertex by this index (starting from zero)
6843         #  @return New GEOM.GEOM_Object, containing the created vertex.
6844         #
6845         #  @ref tui_measurement_tools_page "Example"
6846         def GetVertexByIndex(self,theShape, theIndex):
6847             """
6848             Get a vertex sub-shape by index depended with orientation.
6849
6850             Parameters:
6851                 theShape Shape to find sub-shape.
6852                 theIndex Index to find vertex by this index (starting from zero)
6853
6854             Returns:
6855                 New GEOM.GEOM_Object, containing the created vertex.
6856             """
6857             # Example: see GEOM_TestMeasures.py
6858             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
6859             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
6860             return anObj
6861
6862         ## Get the first vertex of wire/edge depended orientation.
6863         #  @param theShape Shape to find first vertex.
6864         #  @return New GEOM.GEOM_Object, containing the created vertex.
6865         #
6866         #  @ref tui_measurement_tools_page "Example"
6867         def GetFirstVertex(self,theShape):
6868             """
6869             Get the first vertex of wire/edge depended orientation.
6870
6871             Parameters:
6872                 theShape Shape to find first vertex.
6873
6874             Returns:    
6875                 New GEOM.GEOM_Object, containing the created vertex.
6876             """
6877             # Example: see GEOM_TestMeasures.py
6878             anObj = self.GetVertexByIndex(theShape, 0)
6879             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
6880             return anObj
6881
6882         ## Get the last vertex of wire/edge depended orientation.
6883         #  @param theShape Shape to find last vertex.
6884         #  @return New GEOM.GEOM_Object, containing the created vertex.
6885         #
6886         #  @ref tui_measurement_tools_page "Example"
6887         def GetLastVertex(self,theShape):
6888             """
6889             Get the last vertex of wire/edge depended orientation.
6890
6891             Parameters: 
6892                 theShape Shape to find last vertex.
6893
6894             Returns:   
6895                 New GEOM.GEOM_Object, containing the created vertex.
6896             """
6897             # Example: see GEOM_TestMeasures.py
6898             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"])
6899             anObj = self.GetVertexByIndex(theShape, (nb_vert-1))
6900             RaiseIfFailed("GetLastVertex", self.MeasuOp)
6901             return anObj
6902
6903         ## Get a normale to the given face. If the point is not given,
6904         #  the normale is calculated at the center of mass.
6905         #  @param theFace Face to define normale of.
6906         #  @param theOptionalPoint Point to compute the normale at.
6907         #  @return New GEOM.GEOM_Object, containing the created vector.
6908         #
6909         #  @ref swig_todo "Example"
6910         def GetNormal(self, theFace, theOptionalPoint = None):
6911             """
6912             Get a normale to the given face. If the point is not given,
6913             the normale is calculated at the center of mass.
6914             
6915             Parameters: 
6916                 theFace Face to define normale of.
6917                 theOptionalPoint Point to compute the normale at.
6918
6919             Returns:   
6920                 New GEOM.GEOM_Object, containing the created vector.
6921             """
6922             # Example: see GEOM_TestMeasures.py
6923             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
6924             RaiseIfFailed("GetNormal", self.MeasuOp)
6925             return anObj
6926
6927         ## Check a topology of the given shape.
6928         #  @param theShape Shape to check validity of.
6929         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
6930         #                        if TRUE, the shape's geometry will be checked also.
6931         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
6932         #                        of problem is printed.
6933         #                        if TRUE and if theShape is invalid, the description 
6934         #                        of problem is also returned.
6935         #  @return TRUE, if the shape "seems to be valid".
6936         #
6937         #  @ref tui_measurement_tools_page "Example"
6938         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
6939             """
6940             Check a topology of the given shape.
6941
6942             Parameters: 
6943                 theShape Shape to check validity of.
6944                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
6945                                if TRUE, the shape's geometry will be checked also.
6946                 theReturnStatus If FALSE and if theShape is invalid, a description
6947                                 of problem is printed.
6948                                 if TRUE and if theShape is invalid, the description 
6949                                 of problem is returned.
6950
6951             Returns:   
6952                 TRUE, if the shape "seems to be valid".
6953                 If theShape is invalid, prints a description of problem.
6954                 This description can also be returned.
6955             """
6956             # Example: see GEOM_TestMeasures.py
6957             if theIsCheckGeom:
6958                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
6959                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
6960             else:
6961                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
6962                 RaiseIfFailed("CheckShape", self.MeasuOp)
6963             if IsValid == 0:
6964                 if theReturnStatus == 0:
6965                     print Status
6966             if theReturnStatus == 1:
6967               return (IsValid, Status)
6968             return IsValid
6969
6970         ## Detect self-intersections in the given shape.
6971         #  @param theShape Shape to check.
6972         #  @return TRUE, if the shape contains no self-intersections.
6973         #
6974         #  @ref tui_measurement_tools_page "Example"
6975         def CheckSelfIntersections(self, theShape):
6976             """
6977             Detect self-intersections in the given shape.
6978
6979             Parameters: 
6980                 theShape Shape to check.
6981
6982             Returns:   
6983                 TRUE, if the shape contains no self-intersections.
6984             """
6985             # Example: see GEOM_TestMeasures.py
6986             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
6987             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
6988             return IsValid
6989
6990         ## Get position (LCS) of theShape.
6991         #
6992         #  Origin of the LCS is situated at the shape's center of mass.
6993         #  Axes of the LCS are obtained from shape's location or,
6994         #  if the shape is a planar face, from position of its plane.
6995         #
6996         #  @param theShape Shape to calculate position of.
6997         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
6998         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
6999         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
7000         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
7001         #
7002         #  @ref swig_todo "Example"
7003         def GetPosition(self,theShape):
7004             """
7005             Get position (LCS) of theShape.
7006             Origin of the LCS is situated at the shape's center of mass.
7007             Axes of the LCS are obtained from shape's location or,
7008             if the shape is a planar face, from position of its plane.
7009
7010             Parameters: 
7011                 theShape Shape to calculate position of.
7012
7013             Returns:  
7014                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
7015                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
7016                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
7017                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
7018             """
7019             # Example: see GEOM_TestMeasures.py
7020             aTuple = self.MeasuOp.GetPosition(theShape)
7021             RaiseIfFailed("GetPosition", self.MeasuOp)
7022             return aTuple
7023
7024         ## Get kind of theShape.
7025         #
7026         #  @param theShape Shape to get a kind of.
7027         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
7028         #          and a list of parameters, describing the shape.
7029         #  @note  Concrete meaning of each value, returned via \a theIntegers
7030         #         or \a theDoubles list depends on the kind() of the shape.
7031         #
7032         #  @ref swig_todo "Example"
7033         def KindOfShape(self,theShape):
7034             """
7035             Get kind of theShape.
7036          
7037             Parameters: 
7038                 theShape Shape to get a kind of.
7039
7040             Returns:
7041                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
7042                     and a list of parameters, describing the shape.
7043             Note:
7044                 Concrete meaning of each value, returned via theIntegers
7045                 or theDoubles list depends on the geompy.kind of the shape
7046             """
7047             # Example: see GEOM_TestMeasures.py
7048             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
7049             RaiseIfFailed("KindOfShape", self.MeasuOp)
7050
7051             aKind  = aRoughTuple[0]
7052             anInts = aRoughTuple[1]
7053             aDbls  = aRoughTuple[2]
7054
7055             # Now there is no exception from this rule:
7056             aKindTuple = [aKind] + aDbls + anInts
7057
7058             # If they are we will regroup parameters for such kind of shape.
7059             # For example:
7060             #if aKind == kind.SOME_KIND:
7061             #    #  SOME_KIND     int int double int double double
7062             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
7063
7064             return aKindTuple
7065
7066         # end of l2_measure
7067         ## @}
7068
7069         ## @addtogroup l2_import_export
7070         ## @{
7071
7072         ## Import a shape from the BREP or IGES or STEP file
7073         #  (depends on given format) with given name.
7074         #  @param theFileName The file, containing the shape.
7075         #  @param theFormatName Specify format for the file reading.
7076         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
7077         #         If format 'IGES_SCALE' is used instead 'IGES' length unit will be
7078         #         set to 'meter' and result model will be scaled.
7079         #  @return New GEOM.GEOM_Object, containing the imported shape.
7080         #
7081         #  @ref swig_Import_Export "Example"
7082         def ImportFile(self,theFileName, theFormatName):
7083             """
7084             Import a shape from the BREP or IGES or STEP file
7085             (depends on given format) with given name.
7086
7087             Parameters: 
7088                 theFileName The file, containing the shape.
7089                 theFormatName Specify format for the file reading.
7090                               Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
7091                               If format 'IGES_SCALE' is used instead 'IGES' length unit will be
7092                               set to 'meter' and result model will be scaled.
7093
7094             Returns:
7095                 New GEOM.GEOM_Object, containing the imported shape.
7096             """
7097             # Example: see GEOM_TestOthers.py
7098             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
7099             RaiseIfFailed("Import", self.InsertOp)
7100             return anObj
7101
7102         ## Deprecated analog of ImportFile()
7103         def Import(self,theFileName, theFormatName):
7104             """
7105             Deprecated analog of geompy.ImportFile
7106             """
7107             print "WARNING: Function Import is deprecated, use ImportFile instead"
7108             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
7109             RaiseIfFailed("Import", self.InsertOp)
7110             return anObj
7111
7112         ## Shortcut to ImportFile() for BREP format
7113         #
7114         #  @ref swig_Import_Export "Example"
7115         def ImportBREP(self,theFileName):
7116             """
7117             geompy.ImportFile(...) function for BREP format
7118             """
7119             # Example: see GEOM_TestOthers.py
7120             return self.ImportFile(theFileName, "BREP")
7121
7122         ## Shortcut to ImportFile() for IGES format
7123         #
7124         #  @ref swig_Import_Export "Example"
7125         def ImportIGES(self,theFileName):
7126             """
7127             geompy.ImportFile(...) function for IGES format
7128             """
7129             # Example: see GEOM_TestOthers.py
7130             return self.ImportFile(theFileName, "IGES")
7131
7132         ## Return length unit from given IGES file
7133         #
7134         #  @ref swig_Import_Export "Example"
7135         def GetIGESUnit(self,theFileName):
7136             """
7137             Return length unit from given IGES file
7138             """
7139             # Example: see GEOM_TestOthers.py
7140             anObj = self.InsertOp.ImportFile(theFileName, "IGES_UNIT")
7141             #RaiseIfFailed("Import", self.InsertOp)
7142             # recieve name using returned vertex
7143             UnitName = "M"
7144             if anObj.GetShapeType() == GEOM.VERTEX:
7145                 vertices = [anObj]
7146             else:
7147                 vertices = self.SubShapeAll(anObj,ShapeType["VERTEX"])
7148             if len(vertices)>0:
7149                 p = self.PointCoordinates(vertices[0])
7150                 if abs(p[0]-0.01) < 1.e-6:
7151                     UnitName = "CM"
7152                 elif abs(p[0]-0.001) < 1.e-6:
7153                     UnitName = "MM"
7154             return UnitName
7155
7156         ## Shortcut to ImportFile() for STEP format
7157         #
7158         #  @ref swig_Import_Export "Example"
7159         def ImportSTEP(self,theFileName):
7160             """
7161             geompy.ImportFile(...) function for STEP format
7162             """
7163             # Example: see GEOM_TestOthers.py
7164             return self.ImportFile(theFileName, "STEP")
7165
7166         ## Export the given shape into a file with given name.
7167         #  @param theObject Shape to be stored in the file.
7168         #  @param theFileName Name of the file to store the given shape in.
7169         #  @param theFormatName Specify format for the shape storage.
7170         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
7171         #
7172         #  @ref swig_Import_Export "Example"
7173         def Export(self,theObject, theFileName, theFormatName):
7174             """
7175             Export the given shape into a file with given name.
7176
7177             Parameters: 
7178                 theObject Shape to be stored in the file.
7179                 theFileName Name of the file to store the given shape in.
7180                 theFormatName Specify format for the shape storage.
7181                               Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
7182             """
7183             # Example: see GEOM_TestOthers.py
7184             self.InsertOp.Export(theObject, theFileName, theFormatName)
7185             if self.InsertOp.IsDone() == 0:
7186                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
7187                 pass
7188             pass
7189
7190         ## Shortcut to Export() for BREP format
7191         #
7192         #  @ref swig_Import_Export "Example"
7193         def ExportBREP(self,theObject, theFileName):
7194             """
7195             geompy.Export(...) function for BREP format
7196             """
7197             # Example: see GEOM_TestOthers.py
7198             return self.Export(theObject, theFileName, "BREP")
7199
7200         ## Shortcut to Export() for IGES format
7201         #
7202         #  @ref swig_Import_Export "Example"
7203         def ExportIGES(self,theObject, theFileName):
7204             """
7205             geompy.Export(...) function for IGES format
7206             """
7207             # Example: see GEOM_TestOthers.py
7208             return self.Export(theObject, theFileName, "IGES")
7209
7210         ## Shortcut to Export() for STEP format
7211         #
7212         #  @ref swig_Import_Export "Example"
7213         def ExportSTEP(self,theObject, theFileName):
7214             """
7215             geompy.Export(...) function for STEP format
7216             """
7217             # Example: see GEOM_TestOthers.py
7218             return self.Export(theObject, theFileName, "STEP")
7219
7220         # end of l2_import_export
7221         ## @}
7222
7223         ## @addtogroup l3_blocks
7224         ## @{
7225
7226         ## Create a quadrangle face from four edges. Order of Edges is not
7227         #  important. It is  not necessary that edges share the same vertex.
7228         #  @param E1,E2,E3,E4 Edges for the face bound.
7229         #  @return New GEOM.GEOM_Object, containing the created face.
7230         #
7231         #  @ref tui_building_by_blocks_page "Example"
7232         def MakeQuad(self,E1, E2, E3, E4):
7233             """
7234             Create a quadrangle face from four edges. Order of Edges is not
7235             important. It is  not necessary that edges share the same vertex.
7236
7237             Parameters: 
7238                 E1,E2,E3,E4 Edges for the face bound.
7239
7240             Returns: 
7241                 New GEOM.GEOM_Object, containing the created face.
7242
7243             Example of usage:               
7244                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
7245             """
7246             # Example: see GEOM_Spanner.py
7247             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
7248             RaiseIfFailed("MakeQuad", self.BlocksOp)
7249             return anObj
7250
7251         ## Create a quadrangle face on two edges.
7252         #  The missing edges will be built by creating the shortest ones.
7253         #  @param E1,E2 Two opposite edges for the face.
7254         #  @return New GEOM.GEOM_Object, containing the created face.
7255         #
7256         #  @ref tui_building_by_blocks_page "Example"
7257         def MakeQuad2Edges(self,E1, E2):
7258             """
7259             Create a quadrangle face on two edges.
7260             The missing edges will be built by creating the shortest ones.
7261
7262             Parameters: 
7263                 E1,E2 Two opposite edges for the face.
7264
7265             Returns: 
7266                 New GEOM.GEOM_Object, containing the created face.
7267             
7268             Example of usage:
7269                 # create vertices
7270                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
7271                 p2 = geompy.MakeVertex(150.,  30.,   0.)
7272                 p3 = geompy.MakeVertex(  0., 120.,  50.)
7273                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
7274                 # create edges
7275                 edge1 = geompy.MakeEdge(p1, p2)
7276                 edge2 = geompy.MakeEdge(p3, p4)
7277                 # create a quadrangle face from two edges
7278                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
7279             """
7280             # Example: see GEOM_Spanner.py
7281             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
7282             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
7283             return anObj
7284
7285         ## Create a quadrangle face with specified corners.
7286         #  The missing edges will be built by creating the shortest ones.
7287         #  @param V1,V2,V3,V4 Corner vertices for the face.
7288         #  @return New GEOM.GEOM_Object, containing the created face.
7289         #
7290         #  @ref tui_building_by_blocks_page "Example 1"
7291         #  \n @ref swig_MakeQuad4Vertices "Example 2"
7292         def MakeQuad4Vertices(self,V1, V2, V3, V4):
7293             """
7294             Create a quadrangle face with specified corners.
7295             The missing edges will be built by creating the shortest ones.
7296
7297             Parameters: 
7298                 V1,V2,V3,V4 Corner vertices for the face.
7299
7300             Returns: 
7301                 New GEOM.GEOM_Object, containing the created face.
7302
7303             Example of usage:
7304                 # create vertices
7305                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
7306                 p2 = geompy.MakeVertex(150.,  30.,   0.)
7307                 p3 = geompy.MakeVertex(  0., 120.,  50.)
7308                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
7309                 # create a quadrangle from four points in its corners
7310                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
7311             """
7312             # Example: see GEOM_Spanner.py
7313             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
7314             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
7315             return anObj
7316
7317         ## Create a hexahedral solid, bounded by the six given faces. Order of
7318         #  faces is not important. It is  not necessary that Faces share the same edge.
7319         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
7320         #  @return New GEOM.GEOM_Object, containing the created solid.
7321         #
7322         #  @ref tui_building_by_blocks_page "Example 1"
7323         #  \n @ref swig_MakeHexa "Example 2"
7324         def MakeHexa(self,F1, F2, F3, F4, F5, F6):
7325             """
7326             Create a hexahedral solid, bounded by the six given faces. Order of
7327             faces is not important. It is  not necessary that Faces share the same edge.
7328
7329             Parameters: 
7330                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
7331
7332             Returns:    
7333                 New GEOM.GEOM_Object, containing the created solid.
7334
7335             Example of usage:
7336                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
7337             """
7338             # Example: see GEOM_Spanner.py
7339             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
7340             RaiseIfFailed("MakeHexa", self.BlocksOp)
7341             return anObj
7342
7343         ## Create a hexahedral solid between two given faces.
7344         #  The missing faces will be built by creating the smallest ones.
7345         #  @param F1,F2 Two opposite faces for the hexahedral solid.
7346         #  @return New GEOM.GEOM_Object, containing the created solid.
7347         #
7348         #  @ref tui_building_by_blocks_page "Example 1"
7349         #  \n @ref swig_MakeHexa2Faces "Example 2"
7350         def MakeHexa2Faces(self,F1, F2):
7351             """
7352             Create a hexahedral solid between two given faces.
7353             The missing faces will be built by creating the smallest ones.
7354
7355             Parameters: 
7356                 F1,F2 Two opposite faces for the hexahedral solid.
7357
7358             Returns:
7359                 New GEOM.GEOM_Object, containing the created solid.
7360
7361             Example of usage:
7362                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
7363             """
7364             # Example: see GEOM_Spanner.py
7365             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
7366             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
7367             return anObj
7368
7369         # end of l3_blocks
7370         ## @}
7371
7372         ## @addtogroup l3_blocks_op
7373         ## @{
7374
7375         ## Get a vertex, found in the given shape by its coordinates.
7376         #  @param theShape Block or a compound of blocks.
7377         #  @param theX,theY,theZ Coordinates of the sought vertex.
7378         #  @param theEpsilon Maximum allowed distance between the resulting
7379         #                    vertex and point with the given coordinates.
7380         #  @return New GEOM.GEOM_Object, containing the found vertex.
7381         #
7382         #  @ref swig_GetPoint "Example"
7383         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon):
7384             """
7385             Get a vertex, found in the given shape by its coordinates.
7386
7387             Parameters: 
7388                 theShape Block or a compound of blocks.
7389                 theX,theY,theZ Coordinates of the sought vertex.
7390                 theEpsilon Maximum allowed distance between the resulting
7391                            vertex and point with the given coordinates.
7392
7393             Returns:                  
7394                 New GEOM.GEOM_Object, containing the found vertex.
7395
7396             Example of usage:
7397                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
7398             """
7399             # Example: see GEOM_TestOthers.py
7400             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
7401             RaiseIfFailed("GetPoint", self.BlocksOp)
7402             return anObj
7403
7404         ## Find a vertex of the given shape, which has minimal distance to the given point.
7405         #  @param theShape Any shape.
7406         #  @param thePoint Point, close to the desired vertex.
7407         #  @return New GEOM.GEOM_Object, containing the found vertex.
7408         #
7409         #  @ref swig_GetVertexNearPoint "Example"
7410         def GetVertexNearPoint(self, theShape, thePoint):
7411             """
7412             Find a vertex of the given shape, which has minimal distance to the given point.
7413
7414             Parameters: 
7415                 theShape Any shape.
7416                 thePoint Point, close to the desired vertex.
7417
7418             Returns:
7419                 New GEOM.GEOM_Object, containing the found vertex.
7420
7421             Example of usage:
7422                 pmidle = geompy.MakeVertex(50, 0, 50)
7423                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
7424             """
7425             # Example: see GEOM_TestOthers.py
7426             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
7427             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
7428             return anObj
7429
7430         ## Get an edge, found in the given shape by two given vertices.
7431         #  @param theShape Block or a compound of blocks.
7432         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
7433         #  @return New GEOM.GEOM_Object, containing the found edge.
7434         #
7435         #  @ref swig_GetEdge "Example"
7436         def GetEdge(self, theShape, thePoint1, thePoint2):
7437             """
7438             Get an edge, found in the given shape by two given vertices.
7439
7440             Parameters: 
7441                 theShape Block or a compound of blocks.
7442                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
7443
7444             Returns:
7445                 New GEOM.GEOM_Object, containing the found edge.
7446             """
7447             # Example: see GEOM_Spanner.py
7448             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
7449             RaiseIfFailed("GetEdge", self.BlocksOp)
7450             return anObj
7451
7452         ## Find an edge of the given shape, which has minimal distance to the given point.
7453         #  @param theShape Block or a compound of blocks.
7454         #  @param thePoint Point, close to the desired edge.
7455         #  @return New GEOM.GEOM_Object, containing the found edge.
7456         #
7457         #  @ref swig_GetEdgeNearPoint "Example"
7458         def GetEdgeNearPoint(self, theShape, thePoint):
7459             """
7460             Find an edge of the given shape, which has minimal distance to the given point.
7461
7462             Parameters: 
7463                 theShape Block or a compound of blocks.
7464                 thePoint Point, close to the desired edge.
7465
7466             Returns:
7467                 New GEOM.GEOM_Object, containing the found edge.
7468             """
7469             # Example: see GEOM_TestOthers.py
7470             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
7471             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
7472             return anObj
7473
7474         ## Returns a face, found in the given shape by four given corner vertices.
7475         #  @param theShape Block or a compound of blocks.
7476         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
7477         #  @return New GEOM.GEOM_Object, containing the found face.
7478         #
7479         #  @ref swig_todo "Example"
7480         def GetFaceByPoints(self,theShape, thePoint1, thePoint2, thePoint3, thePoint4):
7481             """
7482             Returns a face, found in the given shape by four given corner vertices.
7483
7484             Parameters:
7485                 theShape Block or a compound of blocks.
7486                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
7487
7488             Returns:
7489                 New GEOM.GEOM_Object, containing the found face.
7490             """
7491             # Example: see GEOM_Spanner.py
7492             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
7493             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
7494             return anObj
7495
7496         ## Get a face of block, found in the given shape by two given edges.
7497         #  @param theShape Block or a compound of blocks.
7498         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
7499         #  @return New GEOM.GEOM_Object, containing the found face.
7500         #
7501         #  @ref swig_todo "Example"
7502         def GetFaceByEdges(self,theShape, theEdge1, theEdge2):
7503             """
7504             Get a face of block, found in the given shape by two given edges.
7505
7506             Parameters:
7507                 theShape Block or a compound of blocks.
7508                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
7509
7510             Returns:
7511                 New GEOM.GEOM_Object, containing the found face.
7512             """
7513             # Example: see GEOM_Spanner.py
7514             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
7515             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
7516             return anObj
7517
7518         ## Find a face, opposite to the given one in the given block.
7519         #  @param theBlock Must be a hexahedral solid.
7520         #  @param theFace Face of \a theBlock, opposite to the desired face.
7521         #  @return New GEOM.GEOM_Object, containing the found face.
7522         #
7523         #  @ref swig_GetOppositeFace "Example"
7524         def GetOppositeFace(self,theBlock, theFace):
7525             """
7526             Find a face, opposite to the given one in the given block.
7527
7528             Parameters:
7529                 theBlock Must be a hexahedral solid.
7530                 theFace Face of theBlock, opposite to the desired face.
7531
7532             Returns: 
7533                 New GEOM.GEOM_Object, containing the found face.
7534             """
7535             # Example: see GEOM_Spanner.py
7536             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
7537             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
7538             return anObj
7539
7540         ## Find a face of the given shape, which has minimal distance to the given point.
7541         #  @param theShape Block or a compound of blocks.
7542         #  @param thePoint Point, close to the desired face.
7543         #  @return New GEOM.GEOM_Object, containing the found face.
7544         #
7545         #  @ref swig_GetFaceNearPoint "Example"
7546         def GetFaceNearPoint(self, theShape, thePoint):
7547             """
7548             Find a face of the given shape, which has minimal distance to the given point.
7549
7550             Parameters:
7551                 theShape Block or a compound of blocks.
7552                 thePoint Point, close to the desired face.
7553
7554             Returns:
7555                 New GEOM.GEOM_Object, containing the found face.
7556             """
7557             # Example: see GEOM_Spanner.py
7558             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
7559             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
7560             return anObj
7561
7562         ## Find a face of block, whose outside normale has minimal angle with the given vector.
7563         #  @param theBlock Block or a compound of blocks.
7564         #  @param theVector Vector, close to the normale of the desired face.
7565         #  @return New GEOM.GEOM_Object, containing the found face.
7566         #
7567         #  @ref swig_todo "Example"
7568         def GetFaceByNormale(self, theBlock, theVector):
7569             """
7570             Find a face of block, whose outside normale has minimal angle with the given vector.
7571
7572             Parameters:
7573                 theBlock Block or a compound of blocks.
7574                 theVector Vector, close to the normale of the desired face.
7575
7576             Returns:
7577                 New GEOM.GEOM_Object, containing the found face.
7578             """
7579             # Example: see GEOM_Spanner.py
7580             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
7581             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
7582             return anObj
7583
7584         ## Find all sub-shapes of type \a theShapeType of the given shape,
7585         #  which have minimal distance to the given point.
7586         #  @param theShape Any shape.
7587         #  @param thePoint Point, close to the desired shape.
7588         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
7589         #  @param theTolerance The tolerance for distances comparison. All shapes
7590         #                      with distances to the given point in interval
7591         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
7592         #  @return New GEOM_Object, containing a group of all found shapes.
7593         #
7594         #  @ref swig_GetShapesNearPoint "Example"
7595         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07):
7596             """
7597             Find all sub-shapes of type theShapeType of the given shape,
7598             which have minimal distance to the given point.
7599
7600             Parameters:
7601                 theShape Any shape.
7602                 thePoint Point, close to the desired shape.
7603                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
7604                 theTolerance The tolerance for distances comparison. All shapes
7605                                 with distances to the given point in interval
7606                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
7607
7608             Returns:
7609                 New GEOM_Object, containing a group of all found shapes.
7610             """
7611             # Example: see GEOM_TestOthers.py
7612             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
7613             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
7614             return anObj
7615
7616         # end of l3_blocks_op
7617         ## @}
7618
7619         ## @addtogroup l4_blocks_measure
7620         ## @{
7621
7622         ## Check, if the compound of blocks is given.
7623         #  To be considered as a compound of blocks, the
7624         #  given shape must satisfy the following conditions:
7625         #  - Each element of the compound should be a Block (6 faces and 12 edges).
7626         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
7627         #  - The compound should be connexe.
7628         #  - The glue between two quadrangle faces should be applied.
7629         #  @param theCompound The compound to check.
7630         #  @return TRUE, if the given shape is a compound of blocks.
7631         #  If theCompound is not valid, prints all discovered errors.
7632         #
7633         #  @ref tui_measurement_tools_page "Example 1"
7634         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
7635         def CheckCompoundOfBlocks(self,theCompound):
7636             """
7637             Check, if the compound of blocks is given.
7638             To be considered as a compound of blocks, the
7639             given shape must satisfy the following conditions:
7640             - Each element of the compound should be a Block (6 faces and 12 edges).
7641             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
7642             - The compound should be connexe.
7643             - The glue between two quadrangle faces should be applied.
7644
7645             Parameters:
7646                 theCompound The compound to check.
7647
7648             Returns:
7649                 TRUE, if the given shape is a compound of blocks.
7650                 If theCompound is not valid, prints all discovered errors.            
7651             """
7652             # Example: see GEOM_Spanner.py
7653             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
7654             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
7655             if IsValid == 0:
7656                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
7657                 print Descr
7658             return IsValid
7659
7660         ## Remove all seam and degenerated edges from \a theShape.
7661         #  Unite faces and edges, sharing one surface. It means that
7662         #  this faces must have references to one C++ surface object (handle).
7663         #  @param theShape The compound or single solid to remove irregular edges from.
7664         #  @param doUnionFaces If True, then unite faces. If False (the default value),
7665         #         do not unite faces.
7666         #  @return Improved shape.
7667         #
7668         #  @ref swig_RemoveExtraEdges "Example"
7669         def RemoveExtraEdges(self, theShape, doUnionFaces=False):
7670             """
7671             Remove all seam and degenerated edges from theShape.
7672             Unite faces and edges, sharing one surface. It means that
7673             this faces must have references to one C++ surface object (handle).
7674
7675             Parameters:
7676                 theShape The compound or single solid to remove irregular edges from.
7677                 doUnionFaces If True, then unite faces. If False (the default value),
7678                              do not unite faces.
7679
7680             Returns: 
7681                 Improved shape.
7682             """
7683             # Example: see GEOM_TestOthers.py
7684             nbFacesOptimum = -1 # -1 means do not unite faces
7685             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
7686             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
7687             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
7688             return anObj
7689
7690         ## Check, if the given shape is a blocks compound.
7691         #  Fix all detected errors.
7692         #    \note Single block can be also fixed by this method.
7693         #  @param theShape The compound to check and improve.
7694         #  @return Improved compound.
7695         #
7696         #  @ref swig_CheckAndImprove "Example"
7697         def CheckAndImprove(self,theShape):
7698             """
7699             Check, if the given shape is a blocks compound.
7700             Fix all detected errors.
7701
7702             Note:
7703                 Single block can be also fixed by this method.
7704
7705             Parameters:
7706                 theShape The compound to check and improve.
7707
7708             Returns: 
7709                 Improved compound.
7710             """
7711             # Example: see GEOM_TestOthers.py
7712             anObj = self.BlocksOp.CheckAndImprove(theShape)
7713             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
7714             return anObj
7715
7716         # end of l4_blocks_measure
7717         ## @}
7718
7719         ## @addtogroup l3_blocks_op
7720         ## @{
7721
7722         ## Get all the blocks, contained in the given compound.
7723         #  @param theCompound The compound to explode.
7724         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
7725         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
7726         #    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
7727         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
7728         #
7729         #  @ref tui_explode_on_blocks "Example 1"
7730         #  \n @ref swig_MakeBlockExplode "Example 2"
7731         def MakeBlockExplode(self,theCompound, theMinNbFaces, theMaxNbFaces):
7732             """
7733             Get all the blocks, contained in the given compound.
7734
7735             Parameters:
7736                 theCompound The compound to explode.
7737                 theMinNbFaces If solid has lower number of faces, it is not a block.
7738                 theMaxNbFaces If solid has higher number of faces, it is not a block.
7739
7740             Note:
7741                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
7742
7743             Returns:  
7744                 List of GEOM.GEOM_Object, containing the retrieved blocks.
7745             """
7746             # Example: see GEOM_TestOthers.py
7747             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
7748             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
7749             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
7750             for anObj in aList:
7751                 anObj.SetParameters(Parameters)
7752                 pass
7753             return aList
7754
7755         ## Find block, containing the given point inside its volume or on boundary.
7756         #  @param theCompound Compound, to find block in.
7757         #  @param thePoint Point, close to the desired block. If the point lays on
7758         #         boundary between some blocks, we return block with nearest center.
7759         #  @return New GEOM.GEOM_Object, containing the found block.
7760         #
7761         #  @ref swig_todo "Example"
7762         def GetBlockNearPoint(self,theCompound, thePoint):
7763             """
7764             Find block, containing the given point inside its volume or on boundary.
7765
7766             Parameters:
7767                 theCompound Compound, to find block in.
7768                 thePoint Point, close to the desired block. If the point lays on
7769                          boundary between some blocks, we return block with nearest center.
7770
7771             Returns:
7772                 New GEOM.GEOM_Object, containing the found block.
7773             """
7774             # Example: see GEOM_Spanner.py
7775             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
7776             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
7777             return anObj
7778
7779         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
7780         #  @param theCompound Compound, to find block in.
7781         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
7782         #  @return New GEOM.GEOM_Object, containing the found block.
7783         #
7784         #  @ref swig_GetBlockByParts "Example"
7785         def GetBlockByParts(self,theCompound, theParts):
7786             """
7787              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
7788
7789              Parameters:
7790                 theCompound Compound, to find block in.
7791                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
7792
7793             Returns: 
7794                 New GEOM_Object, containing the found block.
7795             """
7796             # Example: see GEOM_TestOthers.py
7797             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
7798             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
7799             return anObj
7800
7801         ## Return all blocks, containing all the elements, passed as the parts.
7802         #  @param theCompound Compound, to find blocks in.
7803         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
7804         #  @return List of GEOM.GEOM_Object, containing the found blocks.
7805         #
7806         #  @ref swig_todo "Example"
7807         def GetBlocksByParts(self,theCompound, theParts):
7808             """
7809             Return all blocks, containing all the elements, passed as the parts.
7810
7811             Parameters:
7812                 theCompound Compound, to find blocks in.
7813                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
7814
7815             Returns:
7816                 List of GEOM.GEOM_Object, containing the found blocks.
7817             """
7818             # Example: see GEOM_Spanner.py
7819             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
7820             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
7821             return aList
7822
7823         ## Multi-transformate block and glue the result.
7824         #  Transformation is defined so, as to superpose direction faces.
7825         #  @param Block Hexahedral solid to be multi-transformed.
7826         #  @param DirFace1 ID of First direction face.
7827         #  @param DirFace2 ID of Second direction face.
7828         #  @param NbTimes Quantity of transformations to be done.
7829         #    \note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
7830         #  @return New GEOM.GEOM_Object, containing the result shape.
7831         #
7832         #  @ref tui_multi_transformation "Example"
7833         def MakeMultiTransformation1D(self,Block, DirFace1, DirFace2, NbTimes):
7834             """
7835             Multi-transformate block and glue the result.
7836             Transformation is defined so, as to superpose direction faces.
7837
7838             Parameters:
7839                 Block Hexahedral solid to be multi-transformed.
7840                 DirFace1 ID of First direction face.
7841                 DirFace2 ID of Second direction face.
7842                 NbTimes Quantity of transformations to be done.
7843
7844             Note:
7845                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
7846
7847             Returns:
7848                 New GEOM.GEOM_Object, containing the result shape.
7849             """
7850             # Example: see GEOM_Spanner.py
7851             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
7852             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
7853             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
7854             anObj.SetParameters(Parameters)
7855             return anObj
7856
7857         ## Multi-transformate block and glue the result.
7858         #  @param Block Hexahedral solid to be multi-transformed.
7859         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
7860         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
7861         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
7862         #  @return New GEOM.GEOM_Object, containing the result shape.
7863         #
7864         #  @ref tui_multi_transformation "Example"
7865         def MakeMultiTransformation2D(self,Block, DirFace1U, DirFace2U, NbTimesU,
7866                                       DirFace1V, DirFace2V, NbTimesV):
7867             """
7868             Multi-transformate block and glue the result.
7869
7870             Parameters:
7871                 Block Hexahedral solid to be multi-transformed.
7872                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
7873                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
7874                 NbTimesU,NbTimesV Quantity of transformations to be done.
7875
7876             Returns:
7877                 New GEOM.GEOM_Object, containing the result shape.
7878             """
7879             # Example: see GEOM_Spanner.py
7880             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
7881               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
7882             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
7883                                                             DirFace1V, DirFace2V, NbTimesV)
7884             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
7885             anObj.SetParameters(Parameters)
7886             return anObj
7887
7888         ## Build all possible propagation groups.
7889         #  Propagation group is a set of all edges, opposite to one (main)
7890         #  edge of this group directly or through other opposite edges.
7891         #  Notion of Opposite Edge make sence only on quadrangle face.
7892         #  @param theShape Shape to build propagation groups on.
7893         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
7894         #
7895         #  @ref swig_Propagate "Example"
7896         def Propagate(self,theShape):
7897             """
7898             Build all possible propagation groups.
7899             Propagation group is a set of all edges, opposite to one (main)
7900             edge of this group directly or through other opposite edges.
7901             Notion of Opposite Edge make sence only on quadrangle face.
7902
7903             Parameters:
7904                 theShape Shape to build propagation groups on.
7905
7906             Returns:
7907                 List of GEOM.GEOM_Object, each of them is a propagation group.
7908             """
7909             # Example: see GEOM_TestOthers.py
7910             listChains = self.BlocksOp.Propagate(theShape)
7911             RaiseIfFailed("Propagate", self.BlocksOp)
7912             return listChains
7913
7914         # end of l3_blocks_op
7915         ## @}
7916
7917         ## @addtogroup l3_groups
7918         ## @{
7919
7920         ## Creates a new group which will store sub-shapes of theMainShape
7921         #  @param theMainShape is a GEOM object on which the group is selected
7922         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
7923         #  @return a newly created GEOM group
7924         #
7925         #  @ref tui_working_with_groups_page "Example 1"
7926         #  \n @ref swig_CreateGroup "Example 2"
7927         def CreateGroup(self,theMainShape, theShapeType):
7928             """
7929             Creates a new group which will store sub-shapes of theMainShape
7930
7931             Parameters:
7932                theMainShape is a GEOM object on which the group is selected
7933                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
7934                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
7935
7936             Returns:
7937                a newly created GEOM group
7938
7939             Example of usage:
7940                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
7941                 
7942             """
7943             # Example: see GEOM_TestOthers.py
7944             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
7945             RaiseIfFailed("CreateGroup", self.GroupOp)
7946             return anObj
7947
7948         ## Adds a sub-object with ID theSubShapeId to the group
7949         #  @param theGroup is a GEOM group to which the new sub-shape is added
7950         #  @param theSubShapeID is a sub-shape ID in the main object.
7951         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
7952         #
7953         #  @ref tui_working_with_groups_page "Example"
7954         def AddObject(self,theGroup, theSubShapeID):
7955             """
7956             Adds a sub-object with ID theSubShapeId to the group
7957
7958             Parameters:
7959                 theGroup       is a GEOM group to which the new sub-shape is added
7960                 theSubShapeID  is a sub-shape ID in the main object.
7961
7962             Note:
7963                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
7964             """
7965             # Example: see GEOM_TestOthers.py
7966             self.GroupOp.AddObject(theGroup, theSubShapeID)
7967             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
7968                 RaiseIfFailed("AddObject", self.GroupOp)
7969                 pass
7970             pass
7971
7972         ## Removes a sub-object with ID \a theSubShapeId from the group
7973         #  @param theGroup is a GEOM group from which the new sub-shape is removed
7974         #  @param theSubShapeID is a sub-shape ID in the main object.
7975         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
7976         #
7977         #  @ref tui_working_with_groups_page "Example"
7978         def RemoveObject(self,theGroup, theSubShapeID):
7979             """
7980             Removes a sub-object with ID theSubShapeId from the group
7981
7982             Parameters:
7983                 theGroup is a GEOM group from which the new sub-shape is removed
7984                 theSubShapeID is a sub-shape ID in the main object.
7985
7986             Note:
7987                 Use method GetSubShapeID() to get an unique ID of the sub-shape
7988             """
7989             # Example: see GEOM_TestOthers.py
7990             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
7991             RaiseIfFailed("RemoveObject", self.GroupOp)
7992             pass
7993
7994         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
7995         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
7996         #  @param theSubShapes is a list of sub-shapes to be added.
7997         #
7998         #  @ref tui_working_with_groups_page "Example"
7999         def UnionList (self,theGroup, theSubShapes):
8000             """
8001             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
8002
8003             Parameters:
8004                 theGroup is a GEOM group to which the new sub-shapes are added.
8005                 theSubShapes is a list of sub-shapes to be added.
8006             """
8007             # Example: see GEOM_TestOthers.py
8008             self.GroupOp.UnionList(theGroup, theSubShapes)
8009             RaiseIfFailed("UnionList", self.GroupOp)
8010             pass
8011
8012         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
8013         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
8014         #  @param theSubShapes is a list of indices of sub-shapes to be added.
8015         #
8016         #  @ref swig_UnionIDs "Example"
8017         def UnionIDs(self,theGroup, theSubShapes):
8018             """
8019             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
8020
8021             Parameters:
8022                 theGroup is a GEOM group to which the new sub-shapes are added.
8023                 theSubShapes is a list of indices of sub-shapes to be added.
8024             """
8025             # Example: see GEOM_TestOthers.py
8026             self.GroupOp.UnionIDs(theGroup, theSubShapes)
8027             RaiseIfFailed("UnionIDs", self.GroupOp)
8028             pass
8029
8030         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
8031         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
8032         #  @param theSubShapes is a list of sub-shapes to be removed.
8033         #
8034         #  @ref tui_working_with_groups_page "Example"
8035         def DifferenceList (self,theGroup, theSubShapes):
8036             """
8037             Removes from the group all the given shapes. No errors, if some shapes are not included.
8038
8039             Parameters:
8040                 theGroup is a GEOM group from which the sub-shapes are removed.
8041                 theSubShapes is a list of sub-shapes to be removed.
8042             """
8043             # Example: see GEOM_TestOthers.py
8044             self.GroupOp.DifferenceList(theGroup, theSubShapes)
8045             RaiseIfFailed("DifferenceList", self.GroupOp)
8046             pass
8047
8048         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
8049         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
8050         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
8051         #
8052         #  @ref swig_DifferenceIDs "Example"
8053         def DifferenceIDs(self,theGroup, theSubShapes):
8054             """
8055             Removes from the group all the given shapes. No errors, if some shapes are not included.
8056
8057             Parameters:
8058                 theGroup is a GEOM group from which the sub-shapes are removed.
8059                 theSubShapes is a list of indices of sub-shapes to be removed.
8060             """            
8061             # Example: see GEOM_TestOthers.py
8062             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
8063             RaiseIfFailed("DifferenceIDs", self.GroupOp)
8064             pass
8065
8066         ## Returns a list of sub-objects ID stored in the group
8067         #  @param theGroup is a GEOM group for which a list of IDs is requested
8068         #
8069         #  @ref swig_GetObjectIDs "Example"
8070         def GetObjectIDs(self,theGroup):
8071             """
8072             Returns a list of sub-objects ID stored in the group
8073
8074             Parameters:
8075                 theGroup is a GEOM group for which a list of IDs is requested
8076             """
8077             # Example: see GEOM_TestOthers.py
8078             ListIDs = self.GroupOp.GetObjects(theGroup)
8079             RaiseIfFailed("GetObjects", self.GroupOp)
8080             return ListIDs
8081
8082         ## Returns a type of sub-objects stored in the group
8083         #  @param theGroup is a GEOM group which type is returned.
8084         #
8085         #  @ref swig_GetType "Example"
8086         def GetType(self,theGroup):
8087             """
8088             Returns a type of sub-objects stored in the group
8089
8090             Parameters:
8091                 theGroup is a GEOM group which type is returned.
8092             """
8093             # Example: see GEOM_TestOthers.py
8094             aType = self.GroupOp.GetType(theGroup)
8095             RaiseIfFailed("GetType", self.GroupOp)
8096             return aType
8097
8098         ## Convert a type of geom object from id to string value
8099         #  @param theId is a GEOM obect type id.
8100         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
8101         #  @ref swig_GetType "Example"
8102         def ShapeIdToType(self, theId):
8103             """
8104             Convert a type of geom object from id to string value
8105
8106             Parameters:
8107                 theId is a GEOM obect type id.
8108                 
8109             Returns:
8110                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
8111             """
8112             if theId == 0:
8113                 return "COPY"
8114             if theId == 1:
8115                 return "IMPORT"
8116             if theId == 2:
8117                 return "POINT"
8118             if theId == 3:
8119                 return "VECTOR"
8120             if theId == 4:
8121                 return "PLANE"
8122             if theId == 5:
8123                 return "LINE"
8124             if theId == 6:
8125                 return "TORUS"
8126             if theId == 7:
8127                 return "BOX"
8128             if theId == 8:
8129                 return "CYLINDER"
8130             if theId == 9:
8131                 return "CONE"
8132             if theId == 10:
8133                 return "SPHERE"
8134             if theId == 11:
8135                 return "PRISM"
8136             if theId == 12:
8137                 return "REVOLUTION"
8138             if theId == 13:
8139                 return "BOOLEAN"
8140             if theId == 14:
8141                 return "PARTITION"
8142             if theId == 15:
8143                 return "POLYLINE"
8144             if theId == 16:
8145                 return "CIRCLE"
8146             if theId == 17:
8147                 return "SPLINE"
8148             if theId == 18:
8149                 return "ELLIPSE"
8150             if theId == 19:
8151                 return "CIRC_ARC"
8152             if theId == 20:
8153                 return "FILLET"
8154             if theId == 21:
8155                 return "CHAMFER"
8156             if theId == 22:
8157                 return "EDGE"
8158             if theId == 23:
8159                 return "WIRE"
8160             if theId == 24:
8161                 return "FACE"
8162             if theId == 25:
8163                 return "SHELL"
8164             if theId == 26:
8165                 return "SOLID"
8166             if theId == 27:
8167                 return "COMPOUND"
8168             if theId == 28:
8169                 return "SUBSHAPE"
8170             if theId == 29:
8171                 return "PIPE"
8172             if theId == 30:
8173                 return "ARCHIMEDE"
8174             if theId == 31:
8175                 return "FILLING"
8176             if theId == 32:
8177                 return "EXPLODE"
8178             if theId == 33:
8179                 return "GLUED"
8180             if theId == 34:
8181                 return "SKETCHER"
8182             if theId == 35:
8183                 return "CDG"
8184             if theId == 36:
8185                 return "FREE_BOUNDS"
8186             if theId == 37:
8187                 return "GROUP"
8188             if theId == 38:
8189                 return "BLOCK"
8190             if theId == 39:
8191                 return "MARKER"
8192             if theId == 40:
8193                 return "THRUSECTIONS"
8194             if theId == 41:
8195                 return "COMPOUNDFILTER"
8196             if theId == 42:
8197                 return "SHAPES_ON_SHAPE"
8198             if theId == 43:
8199                 return "ELLIPSE_ARC"
8200             if theId == 44:
8201                 return "3DSKETCHER"
8202             if theId == 45:
8203                 return "FILLET_2D"
8204             if theId == 46:
8205                 return "FILLET_1D"
8206             if theId == 201:
8207                 return "PIPETSHAPE"
8208             return "Shape Id not exist."
8209
8210         ## Returns a main shape associated with the group
8211         #  @param theGroup is a GEOM group for which a main shape object is requested
8212         #  @return a GEOM object which is a main shape for theGroup
8213         #
8214         #  @ref swig_GetMainShape "Example"
8215         def GetMainShape(self,theGroup):
8216             """
8217             Returns a main shape associated with the group
8218
8219             Parameters:
8220                 theGroup is a GEOM group for which a main shape object is requested
8221
8222             Returns:
8223                 a GEOM object which is a main shape for theGroup
8224
8225             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
8226             """
8227             # Example: see GEOM_TestOthers.py
8228             anObj = self.GroupOp.GetMainShape(theGroup)
8229             RaiseIfFailed("GetMainShape", self.GroupOp)
8230             return anObj
8231
8232         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
8233         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
8234         #  @param theShape given shape (see GEOM.GEOM_Object)
8235         #  @param min_length minimum length of edges of theShape
8236         #  @param max_length maximum length of edges of theShape
8237         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8238         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8239         #  @return a newly created GEOM group of edges
8240         #  @@ref swig_todo "Example"
8241         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1):
8242             """
8243             Create group of edges of theShape, whose length is in range [min_length, max_length].
8244             If include_min/max == 0, edges with length == min/max_length will not be included in result.
8245
8246             Parameters:
8247                 theShape given shape
8248                 min_length minimum length of edges of theShape
8249                 max_length maximum length of edges of theShape
8250                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8251                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8252
8253              Returns:
8254                 a newly created GEOM group of edges.
8255             """
8256             edges = self.SubShapeAll(theShape, ShapeType["EDGE"])
8257             edges_in_range = []
8258             for edge in edges:
8259                 Props = self.BasicProperties(edge)
8260                 if min_length <= Props[0] and Props[0] <= max_length:
8261                     if (not include_min) and (min_length == Props[0]):
8262                         skip = 1
8263                     else:
8264                         if (not include_max) and (Props[0] == max_length):
8265                             skip = 1
8266                         else:
8267                             edges_in_range.append(edge)
8268
8269             if len(edges_in_range) <= 0:
8270                 print "No edges found by given criteria"
8271                 return 0
8272
8273             group_edges = self.CreateGroup(theShape, ShapeType["EDGE"])
8274             self.UnionList(group_edges, edges_in_range)
8275
8276             return group_edges
8277
8278         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
8279         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
8280         #  @param min_length minimum length of edges of selected shape
8281         #  @param max_length maximum length of edges of selected shape
8282         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8283         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8284         #  @return a newly created GEOM group of edges
8285         #  @ref swig_todo "Example"
8286         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
8287             """
8288             Create group of edges of selected shape, whose length is in range [min_length, max_length].
8289             If include_min/max == 0, edges with length == min/max_length will not be included in result.
8290
8291             Parameters:
8292                 min_length minimum length of edges of selected shape
8293                 max_length maximum length of edges of selected shape
8294                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8295                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8296
8297              Returns:
8298                 a newly created GEOM group of edges.
8299             """
8300             nb_selected = sg.SelectedCount()
8301             if nb_selected < 1:
8302                 print "Select a shape before calling this function, please."
8303                 return 0
8304             if nb_selected > 1:
8305                 print "Only one shape must be selected"
8306                 return 0
8307
8308             id_shape = sg.getSelected(0)
8309             shape = IDToObject( id_shape )
8310
8311             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
8312
8313             left_str  = " < "
8314             right_str = " < "
8315             if include_min: left_str  = " <= "
8316             if include_max: right_str  = " <= "
8317
8318             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
8319                                     + left_str + "length" + right_str + `max_length`)
8320
8321             sg.updateObjBrowser(1)
8322
8323             return group_edges
8324
8325         # end of l3_groups
8326         ## @}
8327
8328         ## @addtogroup l4_advanced
8329         ## @{
8330
8331         ## Create a T-shape object with specified caracteristics for the main
8332         #  and the incident pipes (radius, width, half-length).
8333         #  The extremities of the main pipe are located on junctions points P1 and P2.
8334         #  The extremity of the incident pipe is located on junction point P3.
8335         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8336         #  the main plane of the T-shape is XOY.
8337         #  @param theR1 Internal radius of main pipe
8338         #  @param theW1 Width of main pipe
8339         #  @param theL1 Half-length of main pipe
8340         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8341         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8342         #  @param theL2 Half-length of incident pipe
8343         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8344         #  @param theP1 1st junction point of main pipe
8345         #  @param theP2 2nd junction point of main pipe
8346         #  @param theP3 Junction point of incident pipe
8347         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8348         #
8349         #  @ref tui_creation_pipetshape "Example"
8350         def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8351             """
8352             Create a T-shape object with specified caracteristics for the main
8353             and the incident pipes (radius, width, half-length).
8354             The extremities of the main pipe are located on junctions points P1 and P2.
8355             The extremity of the incident pipe is located on junction point P3.
8356             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8357             the main plane of the T-shape is XOY.
8358
8359             Paremeters:
8360                 theR1 Internal radius of main pipe
8361                 theW1 Width of main pipe
8362                 theL1 Half-length of main pipe
8363                 theR2 Internal radius of incident pipe (R2 < R1)
8364                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8365                 theL2 Half-length of incident pipe
8366                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8367                 theP1 1st junction point of main pipe
8368                 theP2 2nd junction point of main pipe
8369                 theP3 Junction point of incident pipe
8370
8371             Returns:
8372                 List of GEOM_Object, containing the created shape and propagation groups.
8373
8374             Example of usage:
8375                 # create PipeTShape object
8376                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
8377                 # create PipeTShape object with position
8378                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
8379             """
8380             theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)        
8381             if (theP1 and theP2 and theP3):
8382                 anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3)
8383             else:
8384                 anObj = self.AdvOp.MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh)
8385             RaiseIfFailed("MakePipeTShape", self.AdvOp)
8386             if Parameters: anObj[0].SetParameters(Parameters)
8387             return anObj
8388
8389         ## Create a T-shape object with chamfer and with specified caracteristics for the main
8390         #  and the incident pipes (radius, width, half-length). The chamfer is
8391         #  created on the junction of the pipes.
8392         #  The extremities of the main pipe are located on junctions points P1 and P2.
8393         #  The extremity of the incident pipe is located on junction point P3.
8394         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8395         #  the main plane of the T-shape is XOY.
8396         #  @param theR1 Internal radius of main pipe
8397         #  @param theW1 Width of main pipe
8398         #  @param theL1 Half-length of main pipe
8399         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8400         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8401         #  @param theL2 Half-length of incident pipe
8402         #  @param theH Height of the chamfer.
8403         #  @param theW Width of the chamfer.
8404         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8405         #  @param theP1 1st junction point of main pipe
8406         #  @param theP2 2nd junction point of main pipe
8407         #  @param theP3 Junction point of incident pipe
8408         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8409         #
8410         #  @ref tui_creation_pipetshape "Example"
8411         def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8412             """
8413             Create a T-shape object with chamfer and with specified caracteristics for the main
8414             and the incident pipes (radius, width, half-length). The chamfer is
8415             created on the junction of the pipes.
8416             The extremities of the main pipe are located on junctions points P1 and P2.
8417             The extremity of the incident pipe is located on junction point P3.
8418             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8419             the main plane of the T-shape is XOY.
8420
8421             Paremeters:
8422                 theR1 Internal radius of main pipe
8423                 theW1 Width of main pipe
8424                 theL1 Half-length of main pipe
8425                 theR2 Internal radius of incident pipe (R2 < R1)
8426                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8427                 theL2 Half-length of incident pipe
8428                 theH Height of the chamfer.
8429                 theW Width of the chamfer.
8430                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8431                 theP1 1st junction point of main pipe
8432                 theP2 2nd junction point of main pipe
8433                 theP3 Junction point of incident pipe
8434
8435             Returns:
8436                 List of GEOM_Object, containing the created shape and propagation groups.
8437
8438             Example of usage:
8439                 # create PipeTShape with chamfer object
8440                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
8441                 # create PipeTShape with chamfer object with position
8442                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
8443             """
8444             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW)
8445             if (theP1 and theP2 and theP3):
8446               anObj = self.AdvOp.MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3)
8447             else:
8448               anObj = self.AdvOp.MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh)
8449             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
8450             if Parameters: anObj[0].SetParameters(Parameters)
8451             return anObj
8452
8453         ## Create a T-shape object with fillet and with specified caracteristics for the main
8454         #  and the incident pipes (radius, width, half-length). The fillet is
8455         #  created on the junction of the pipes.
8456         #  The extremities of the main pipe are located on junctions points P1 and P2.
8457         #  The extremity of the incident pipe is located on junction point P3.
8458         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8459         #  the main plane of the T-shape is XOY.
8460         #  @param theR1 Internal radius of main pipe
8461         #  @param theW1 Width of main pipe
8462         #  @param theL1 Half-length of main pipe
8463         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8464         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8465         #  @param theL2 Half-length of incident pipe
8466         #  @param theRF Radius of curvature of fillet.
8467         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8468         #  @param theP1 1st junction point of main pipe
8469         #  @param theP2 2nd junction point of main pipe
8470         #  @param theP3 Junction point of incident pipe
8471         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8472         #
8473         #  @ref tui_creation_pipetshape "Example"
8474         def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8475             """
8476             Create a T-shape object with fillet and with specified caracteristics for the main
8477             and the incident pipes (radius, width, half-length). The fillet is
8478             created on the junction of the pipes.
8479             The extremities of the main pipe are located on junctions points P1 and P2.
8480             The extremity of the incident pipe is located on junction point P3.
8481
8482             Paremeters:
8483                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8484                 the main plane of the T-shape is XOY.
8485                 theR1 Internal radius of main pipe
8486                 theW1 Width of main pipe
8487                 heL1 Half-length of main pipe
8488                 theR2 Internal radius of incident pipe (R2 < R1)
8489                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8490                 theL2 Half-length of incident pipe
8491                 theRF Radius of curvature of fillet.
8492                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8493                 theP1 1st junction point of main pipe
8494                 theP2 2nd junction point of main pipe
8495                 theP3 Junction point of incident pipe
8496                 
8497             Returns:
8498                 List of GEOM_Object, containing the created shape and propagation groups.
8499                 
8500             Example of usage:
8501                 # create PipeTShape with fillet object
8502                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
8503                 # create PipeTShape with fillet object with position
8504                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
8505         
8506             """
8507             theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
8508             if (theP1 and theP2 and theP3):
8509               anObj = self.AdvOp.MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3)
8510             else:
8511               anObj = self.AdvOp.MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh)
8512             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
8513             if Parameters: anObj[0].SetParameters(Parameters)
8514             return anObj
8515
8516         #@@ insert new functions before this line @@ do not remove this line @@#
8517
8518         # end of l4_advanced
8519         ## @}
8520
8521         ## Create a copy of the given object
8522         #
8523         #  @param theOriginal geometry object for copy
8524         #  @return unique object identifier
8525         #  @ingroup l1_geompy_auxiliary
8526         #  @ref swig_MakeCopy "Example"
8527         def MakeCopy(self,theOriginal):
8528             """
8529             Create a copy of the given object
8530
8531             Paremeters:
8532                 theOriginal geometry object for copy
8533
8534             Returns:
8535                 unique object identifier
8536
8537             Example of usage: Copy = geompy.MakeCopy(Box)
8538             """
8539             # Example: see GEOM_TestAll.py
8540             anObj = self.InsertOp.MakeCopy(theOriginal)
8541             RaiseIfFailed("MakeCopy", self.InsertOp)
8542             return anObj
8543
8544         ## Add Path to load python scripts from
8545         #  @param Path a path to load python scripts from
8546         #  @ingroup l1_geompy_auxiliary
8547         def addPath(self,Path):
8548             """
8549             Add Path to load python scripts from
8550
8551             Parameters:
8552                 Path a path to load python scripts from
8553             """
8554             if (sys.path.count(Path) < 1):
8555                 sys.path.append(Path)
8556                 pass
8557             pass
8558
8559         ## Load marker texture from the file
8560         #  @param Path a path to the texture file
8561         #  @return unique texture identifier
8562         #  @ingroup l1_geompy_auxiliary
8563         def LoadTexture(self, Path):
8564             """
8565             Load marker texture from the file
8566             
8567             Parameters:
8568                 Path a path to the texture file
8569                 
8570             Returns:
8571                 unique texture identifier
8572             """
8573             # Example: see GEOM_TestAll.py
8574             ID = self.InsertOp.LoadTexture(Path)
8575             RaiseIfFailed("LoadTexture", self.InsertOp)
8576             return ID
8577
8578         ## Get entry of the object
8579         #  @param obj geometry object
8580         #  @return unique object identifier
8581         #  @ingroup l1_geompy_auxiliary
8582         def getObjectID(self, obj):
8583             """
8584             Get entry of the object
8585
8586             Parameters:
8587                 obj geometry object
8588
8589             Returns:
8590                 unique object identifier
8591             """
8592             ID = ""
8593             entry = salome.ObjectToID(obj)
8594             if entry is not None:
8595                 lst = entry.split(":")
8596                 if len(lst) > 0:
8597                     ID = lst[-1] # -1 means last item in the list            
8598                     return "GEOM_" + ID
8599             return ID
8600                 
8601             
8602
8603         ## Add marker texture. @a Width and @a Height parameters
8604         #  specify width and height of the texture in pixels.
8605         #  If @a RowData is @c True, @a Texture parameter should represent texture data
8606         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
8607         #  parameter should be unpacked string, in which '1' symbols represent opaque
8608         #  pixels and '0' represent transparent pixels of the texture bitmap.
8609         #
8610         #  @param Width texture width in pixels
8611         #  @param Height texture height in pixels
8612         #  @param Texture texture data
8613         #  @param RowData if @c True, @a Texture data are packed in the byte stream
8614         #  @return unique texture identifier
8615         #  @ingroup l1_geompy_auxiliary
8616         def AddTexture(self, Width, Height, Texture, RowData=False):
8617             """
8618             Add marker texture. Width and Height parameters
8619             specify width and height of the texture in pixels.
8620             If RowData is True, Texture parameter should represent texture data
8621             packed into the byte array. If RowData is False (default), Texture
8622             parameter should be unpacked string, in which '1' symbols represent opaque
8623             pixels and '0' represent transparent pixels of the texture bitmap.
8624
8625             Parameters:
8626                 Width texture width in pixels
8627                 Height texture height in pixels
8628                 Texture texture data
8629                 RowData if True, Texture data are packed in the byte stream
8630
8631             Returns:
8632                 return unique texture identifier
8633             """
8634             if not RowData: Texture = PackData(Texture)
8635             ID = self.InsertOp.AddTexture(Width, Height, Texture)
8636             RaiseIfFailed("AddTexture", self.InsertOp)
8637             return ID
8638
8639 import omniORB
8640 #Register the new proxy for GEOM_Gen
8641 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geompyDC)