]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geompyDC.py
Salome HOME
88a05c1bc80a3311b7cddd8510d12e37b179d073
[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 given 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 given 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
2525         ## Create a filling from the given compound of contours.
2526         #  This method corresponds to MakeFilling with isApprox=True
2527         #  @param theShape the compound of contours
2528         #  @param theMinDeg a minimal degree of BSpline surface to create
2529         #  @param theMaxDeg a maximal degree of BSpline surface to create
2530         #  @param theTol3D a 3d tolerance to be reached
2531         #  @return New GEOM.GEOM_Object, containing the created filling surface.
2532         #
2533         #  @ref tui_creation_filling "Example"
2534         def MakeFillingNew(self, theShape, theMinDeg, theMaxDeg, theTol3D):
2535             """
2536             Create a filling from the given compound of contours.
2537             This method corresponds to MakeFilling with isApprox=True
2538
2539             Parameters:
2540                 theShape the compound of contours
2541                 theMinDeg a minimal degree of BSpline surface to create
2542                 theMaxDeg a maximal degree of BSpline surface to create
2543                 theTol3D a 3d tolerance to be reached
2544
2545             Returns: 
2546                 New GEOM.GEOM_Object, containing the created filling surface.
2547
2548             Example of usage:
2549                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
2550             """
2551             # Example: see GEOM_TestAll.py
2552             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
2553             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
2554                                             0, theTol3D, 0, GEOM.FOM_Default, True)
2555             RaiseIfFailed("MakeFillingNew", self.PrimOp)
2556             anObj.SetParameters(Parameters)
2557             return anObj
2558
2559         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
2560         #  @param theSeqSections - set of specified sections.
2561         #  @param theModeSolid - mode defining building solid or shell
2562         #  @param thePreci - precision 3D used for smoothing
2563         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
2564         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
2565         #
2566         #  @ref swig_todo "Example"
2567         def MakeThruSections(self,theSeqSections,theModeSolid,thePreci,theRuled):
2568             """
2569             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
2570
2571             Parameters:
2572                 theSeqSections - set of specified sections.
2573                 theModeSolid - mode defining building solid or shell
2574                 thePreci - precision 3D used for smoothing
2575                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
2576
2577             Returns:
2578                 New GEOM.GEOM_Object, containing the created shell or solid.
2579             """
2580             # Example: see GEOM_TestAll.py
2581             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
2582             RaiseIfFailed("MakeThruSections", self.PrimOp)
2583             return anObj
2584
2585         ## Create a shape by extrusion of the base shape along
2586         #  the path shape. The path shape can be a wire or an edge.
2587         #  @param theBase Base shape to be extruded.
2588         #  @param thePath Path shape to extrude the base shape along it.
2589         #  @return New GEOM.GEOM_Object, containing the created pipe.
2590         #
2591         #  @ref tui_creation_pipe "Example"
2592         def MakePipe(self,theBase, thePath):
2593             """
2594             Create a shape by extrusion of the base shape along
2595             the path shape. The path shape can be a wire or an edge.
2596
2597             Parameters:
2598                 theBase Base shape to be extruded.
2599                 thePath Path shape to extrude the base shape along it.
2600
2601             Returns:
2602                 New GEOM.GEOM_Object, containing the created pipe.
2603             """
2604             # Example: see GEOM_TestAll.py
2605             anObj = self.PrimOp.MakePipe(theBase, thePath)
2606             RaiseIfFailed("MakePipe", self.PrimOp)
2607             return anObj
2608
2609         ## Create a shape by extrusion of the profile shape along
2610         #  the path shape. The path shape can be a wire or an edge.
2611         #  the several profiles can be specified in the several locations of path.
2612         #  @param theSeqBases - list of  Bases shape to be extruded.
2613         #  @param theLocations - list of locations on the path corresponding
2614         #                        specified list of the Bases shapes. Number of locations
2615         #                        should be equal to number of bases or list of locations can be empty.
2616         #  @param thePath - Path shape to extrude the base shape along it.
2617         #  @param theWithContact - the mode defining that the section is translated to be in
2618         #                          contact with the spine.
2619         #  @param theWithCorrection - defining that the section is rotated to be
2620         #                             orthogonal to the spine tangent in the correspondent point
2621         #  @return New GEOM.GEOM_Object, containing the created pipe.
2622         #
2623         #  @ref tui_creation_pipe_with_diff_sec "Example"
2624         def MakePipeWithDifferentSections(self, theSeqBases,
2625                                           theLocations, thePath,
2626                                           theWithContact, theWithCorrection):
2627             """
2628             Create a shape by extrusion of the profile shape along
2629             the path shape. The path shape can be a wire or an edge.
2630             the several profiles can be specified in the several locations of path.
2631
2632             Parameters:
2633                 theSeqBases - list of  Bases shape to be extruded.
2634                 theLocations - list of locations on the path corresponding
2635                                specified list of the Bases shapes. Number of locations
2636                                should be equal to number of bases or list of locations can be empty.
2637                 thePath - Path shape to extrude the base shape along it.
2638                 theWithContact - the mode defining that the section is translated to be in
2639                                  contact with the spine(0/1)
2640                 theWithCorrection - defining that the section is rotated to be
2641                                     orthogonal to the spine tangent in the correspondent point (0/1)
2642
2643             Returns:
2644                 New GEOM.GEOM_Object, containing the created pipe.
2645             """
2646             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
2647                                                               theLocations, thePath,
2648                                                               theWithContact, theWithCorrection)
2649             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
2650             return anObj
2651
2652         ## Create a shape by extrusion of the profile shape along
2653         #  the path shape. The path shape can be a wire or a edge.
2654         #  the several profiles can be specified in the several locations of path.
2655         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
2656         #                       shell or face. If number of faces in neighbour sections
2657         #                       aren't coincided result solid between such sections will
2658         #                       be created using external boundaries of this shells.
2659         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
2660         #                          This list is used for searching correspondences between
2661         #                          faces in the sections. Size of this list must be equal
2662         #                          to size of list of base shapes.
2663         #  @param theLocations - list of locations on the path corresponding
2664         #                        specified list of the Bases shapes. Number of locations
2665         #                        should be equal to number of bases. First and last
2666         #                        locations must be coincided with first and last vertexes
2667         #                        of path correspondingly.
2668         #  @param thePath - Path shape to extrude the base shape along it.
2669         #  @param theWithContact - the mode defining that the section is translated to be in
2670         #                          contact with the spine.
2671         #  @param theWithCorrection - defining that the section is rotated to be
2672         #                             orthogonal to the spine tangent in the correspondent point
2673         #  @return New GEOM.GEOM_Object, containing the created solids.
2674         #
2675         #  @ref tui_creation_pipe_with_shell_sec "Example"
2676         def MakePipeWithShellSections(self,theSeqBases, theSeqSubBases,
2677                                       theLocations, thePath,
2678                                       theWithContact, theWithCorrection):
2679             """
2680             Create a shape by extrusion of the profile shape along
2681             the path shape. The path shape can be a wire or a edge.
2682             the several profiles can be specified in the several locations of path.
2683
2684             Parameters:
2685                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
2686                               shell or face. If number of faces in neighbour sections
2687                               aren't coincided result solid between such sections will
2688                               be created using external boundaries of this shells.
2689                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
2690                                  This list is used for searching correspondences between
2691                                  faces in the sections. Size of this list must be equal
2692                                  to size of list of base shapes.
2693                 theLocations - list of locations on the path corresponding
2694                                specified list of the Bases shapes. Number of locations
2695                                should be equal to number of bases. First and last
2696                                locations must be coincided with first and last vertexes
2697                                of path correspondingly.
2698                 thePath - Path shape to extrude the base shape along it.
2699                 theWithContact - the mode defining that the section is translated to be in
2700                                  contact with the spine (0/1)
2701                 theWithCorrection - defining that the section is rotated to be
2702                                     orthogonal to the spine tangent in the correspondent point (0/1)
2703
2704             Returns:                           
2705                 New GEOM.GEOM_Object, containing the created solids.
2706             """
2707             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
2708                                                           theLocations, thePath,
2709                                                           theWithContact, theWithCorrection)
2710             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
2711             return anObj
2712
2713         ## Create a shape by extrusion of the profile shape along
2714         #  the path shape. This function is used only for debug pipe
2715         #  functionality - it is a version of function MakePipeWithShellSections()
2716         #  which give a possibility to recieve information about
2717         #  creating pipe between each pair of sections step by step.
2718         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
2719                                              theLocations, thePath,
2720                                              theWithContact, theWithCorrection):
2721             """
2722             Create a shape by extrusion of the profile shape along
2723             the path shape. This function is used only for debug pipe
2724             functionality - it is a version of previous function
2725             geompy.MakePipeWithShellSections() which give a possibility to
2726             recieve information about creating pipe between each pair of
2727             sections step by step.
2728             """
2729             res = []
2730             nbsect = len(theSeqBases)
2731             nbsubsect = len(theSeqSubBases)
2732             #print "nbsect = ",nbsect
2733             for i in range(1,nbsect):
2734                 #print "  i = ",i
2735                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
2736                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
2737                 tmpSeqSubBases = []
2738                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
2739                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
2740                                                               tmpLocations, thePath,
2741                                                               theWithContact, theWithCorrection)
2742                 if self.PrimOp.IsDone() == 0:
2743                     print "Problems with pipe creation between ",i," and ",i+1," sections"
2744                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
2745                     break
2746                 else:
2747                     print "Pipe between ",i," and ",i+1," sections is OK"
2748                     res.append(anObj)
2749                     pass
2750                 pass
2751
2752             resc = self.MakeCompound(res)
2753             #resc = self.MakeSewing(res, 0.001)
2754             #print "resc: ",resc
2755             return resc
2756
2757         ## Create solids between given sections
2758         #  @param theSeqBases - list of sections (shell or face).
2759         #  @param theLocations - list of corresponding vertexes
2760         #  @return New GEOM.GEOM_Object, containing the created solids.
2761         #
2762         #  @ref tui_creation_pipe_without_path "Example"
2763         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations):
2764             """
2765             Create solids between given sections
2766
2767             Parameters:
2768                 theSeqBases - list of sections (shell or face).
2769                 theLocations - list of corresponding vertexes
2770
2771             Returns:
2772                 New GEOM.GEOM_Object, containing the created solids.
2773             """
2774             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
2775             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
2776             return anObj
2777
2778         ## Create a shape by extrusion of the base shape along
2779         #  the path shape with constant bi-normal direction along the given vector.
2780         #  The path shape can be a wire or an edge.
2781         #  @param theBase Base shape to be extruded.
2782         #  @param thePath Path shape to extrude the base shape along it.
2783         #  @param theVec Vector defines a constant binormal direction to keep the
2784         #                same angle beetween the direction and the sections
2785         #                along the sweep surface.
2786         #  @return New GEOM.GEOM_Object, containing the created pipe.
2787         #
2788         #  @ref tui_creation_pipe "Example"
2789         def MakePipeBiNormalAlongVector(self,theBase, thePath, theVec):
2790             """
2791             Create a shape by extrusion of the base shape along
2792             the path shape with constant bi-normal direction along the given vector.
2793             The path shape can be a wire or an edge.
2794
2795             Parameters:
2796                 theBase Base shape to be extruded.
2797                 thePath Path shape to extrude the base shape along it.
2798                 theVec Vector defines a constant binormal direction to keep the
2799                        same angle beetween the direction and the sections
2800                        along the sweep surface.
2801
2802             Returns:              
2803                 New GEOM.GEOM_Object, containing the created pipe.
2804             """
2805             # Example: see GEOM_TestAll.py
2806             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
2807             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
2808             return anObj
2809
2810         # end of l3_complex
2811         ## @}
2812
2813         ## @addtogroup l3_advanced
2814         ## @{
2815
2816         ## Create a linear edge with specified ends.
2817         #  @param thePnt1 Point for the first end of edge.
2818         #  @param thePnt2 Point for the second end of edge.
2819         #  @return New GEOM.GEOM_Object, containing the created edge.
2820         #
2821         #  @ref tui_creation_edge "Example"
2822         def MakeEdge(self,thePnt1, thePnt2):
2823             """
2824             Create a linear edge with specified ends.
2825
2826             Parameters:
2827                 thePnt1 Point for the first end of edge.
2828                 thePnt2 Point for the second end of edge.
2829
2830             Returns:           
2831                 New GEOM.GEOM_Object, containing the created edge.
2832             """
2833             # Example: see GEOM_TestAll.py
2834             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
2835             RaiseIfFailed("MakeEdge", self.ShapesOp)
2836             return anObj
2837
2838         ## Create a new edge, corresponding to the given length on the given curve.
2839         #  @param theRefCurve The referenced curve (edge).
2840         #  @param theLength Length on the referenced curve. It can be negative.
2841         #  @param theStartPoint Any point can be selected for it, the new edge will begin
2842         #                       at the end of \a theRefCurve, close to the selected point.
2843         #                       If None, start from the first point of \a theRefCurve.
2844         #  @return New GEOM.GEOM_Object, containing the created edge.
2845         #
2846         #  @ref tui_creation_edge "Example"
2847         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None):
2848             """
2849             Create a new edge, corresponding to the given length on the given curve.
2850
2851             Parameters:
2852                 theRefCurve The referenced curve (edge).
2853                 theLength Length on the referenced curve. It can be negative.
2854                 theStartPoint Any point can be selected for it, the new edge will begin
2855                               at the end of theRefCurve, close to the selected point.
2856                               If None, start from the first point of theRefCurve.
2857
2858             Returns:              
2859                 New GEOM.GEOM_Object, containing the created edge.
2860             """
2861             # Example: see GEOM_TestAll.py
2862             theLength, Parameters = ParseParameters(theLength)
2863             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
2864             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
2865             anObj.SetParameters(Parameters)
2866             return anObj
2867
2868         ## Create an edge from specified wire.
2869         #  @param theWire source Wire
2870         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
2871         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
2872         #  @return New GEOM.GEOM_Object, containing the created edge.
2873         #
2874         #  @ref tui_creation_edge "Example"
2875         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12):
2876             """
2877             Create an edge from specified wire.
2878
2879             Parameters:
2880                 theWire source Wire
2881                 theLinearTolerance linear tolerance value (default = 1e-07)
2882                 theAngularTolerance angular tolerance value (default = 1e-12)
2883
2884             Returns:
2885                 New GEOM.GEOM_Object, containing the created edge.
2886             """
2887             # Example: see GEOM_TestAll.py
2888             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
2889             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
2890             return anObj
2891
2892         ## Create a wire from the set of edges and wires.
2893         #  @param theEdgesAndWires List of edges and/or wires.
2894         #  @param theTolerance Maximum distance between vertices, that will be merged.
2895         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
2896         #  @return New GEOM.GEOM_Object, containing the created wire.
2897         #
2898         #  @ref tui_creation_wire "Example"
2899         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07):
2900             """
2901             Create a wire from the set of edges and wires.
2902
2903             Parameters:
2904                 theEdgesAndWires List of edges and/or wires.
2905                 theTolerance Maximum distance between vertices, that will be merged.
2906                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
2907
2908             Returns:                    
2909                 New GEOM.GEOM_Object, containing the created wire.
2910             """
2911             # Example: see GEOM_TestAll.py
2912             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
2913             RaiseIfFailed("MakeWire", self.ShapesOp)
2914             return anObj
2915
2916         ## Create a face on the given wire.
2917         #  @param theWire closed Wire or Edge to build the face on.
2918         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
2919         #                        If the tolerance of the obtained planar face is less
2920         #                        than 1e-06, this face will be returned, otherwise the
2921         #                        algorithm tries to build any suitable face on the given
2922         #                        wire and prints a warning message.
2923         #  @return New GEOM.GEOM_Object, containing the created face.
2924         #
2925         #  @ref tui_creation_face "Example"
2926         def MakeFace(self, theWire, isPlanarWanted):
2927             """
2928             Create a face on the given wire.
2929
2930             Parameters:
2931                 theWire closed Wire or Edge to build the face on.
2932                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
2933                                If the tolerance of the obtained planar face is less
2934                                than 1e-06, this face will be returned, otherwise the
2935                                algorithm tries to build any suitable face on the given
2936                                wire and prints a warning message.
2937
2938             Returns:
2939                 New GEOM.GEOM_Object, containing the created face.
2940             """
2941             # Example: see GEOM_TestAll.py
2942             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
2943             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
2944                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
2945             else:
2946                 RaiseIfFailed("MakeFace", self.ShapesOp)
2947             return anObj
2948
2949         ## Create a face on the given wires set.
2950         #  @param theWires List of closed wires or edges to build the face on.
2951         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
2952         #                        If the tolerance of the obtained planar face is less
2953         #                        than 1e-06, this face will be returned, otherwise the
2954         #                        algorithm tries to build any suitable face on the given
2955         #                        wire and prints a warning message.
2956         #  @return New GEOM.GEOM_Object, containing the created face.
2957         #
2958         #  @ref tui_creation_face "Example"
2959         def MakeFaceWires(self, theWires, isPlanarWanted):
2960             """
2961             Create a face on the given wires set.
2962
2963             Parameters:
2964                 theWires List of closed wires or edges to build the face on.
2965                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
2966                                If the tolerance of the obtained planar face is less
2967                                than 1e-06, this face will be returned, otherwise the
2968                                algorithm tries to build any suitable face on the given
2969                                wire and prints a warning message.
2970
2971             Returns: 
2972                 New GEOM.GEOM_Object, containing the created face.
2973             """
2974             # Example: see GEOM_TestAll.py
2975             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
2976             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
2977                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
2978             else:
2979                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
2980             return anObj
2981
2982         ## See MakeFaceWires() method for details.
2983         #
2984         #  @ref tui_creation_face "Example 1"
2985         #  \n @ref swig_MakeFaces  "Example 2"
2986         def MakeFaces(self, theWires, isPlanarWanted):
2987             """
2988             See geompy.MakeFaceWires() method for details.
2989             """
2990             # Example: see GEOM_TestOthers.py
2991             anObj = self.MakeFaceWires(theWires, isPlanarWanted)
2992             return anObj
2993
2994         ## Create a shell from the set of faces and shells.
2995         #  @param theFacesAndShells List of faces and/or shells.
2996         #  @return New GEOM.GEOM_Object, containing the created shell.
2997         #
2998         #  @ref tui_creation_shell "Example"
2999         def MakeShell(self,theFacesAndShells):
3000             """
3001             Create a shell from the set of faces and shells.
3002
3003             Parameters:
3004                 theFacesAndShells List of faces and/or shells.
3005
3006             Returns:
3007                 New GEOM.GEOM_Object, containing the created shell.
3008             """
3009             # Example: see GEOM_TestAll.py
3010             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
3011             RaiseIfFailed("MakeShell", self.ShapesOp)
3012             return anObj
3013
3014         ## Create a solid, bounded by the given shells.
3015         #  @param theShells Sequence of bounding shells.
3016         #  @return New GEOM.GEOM_Object, containing the created solid.
3017         #
3018         #  @ref tui_creation_solid "Example"
3019         def MakeSolid(self,theShells):
3020             """
3021             Create a solid, bounded by the given shells.
3022
3023             Parameters:
3024                 theShells Sequence of bounding shells.
3025
3026             Returns:
3027                 New GEOM.GEOM_Object, containing the created solid.
3028             """
3029             # Example: see GEOM_TestAll.py
3030             anObj = self.ShapesOp.MakeSolidShells(theShells)
3031             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
3032             return anObj
3033
3034         ## Create a compound of the given shapes.
3035         #  @param theShapes List of shapes to put in compound.
3036         #  @return New GEOM.GEOM_Object, containing the created compound.
3037         #
3038         #  @ref tui_creation_compound "Example"
3039         def MakeCompound(self,theShapes):
3040             """
3041             Create a compound of the given shapes.
3042
3043             Parameters:
3044                 theShapes List of shapes to put in compound.
3045
3046             Returns:
3047                 New GEOM.GEOM_Object, containing the created compound.
3048             """
3049             # Example: see GEOM_TestAll.py
3050             anObj = self.ShapesOp.MakeCompound(theShapes)
3051             RaiseIfFailed("MakeCompound", self.ShapesOp)
3052             return anObj
3053
3054         # end of l3_advanced
3055         ## @}
3056
3057         ## @addtogroup l2_measure
3058         ## @{
3059
3060         ## Gives quantity of faces in the given shape.
3061         #  @param theShape Shape to count faces of.
3062         #  @return Quantity of faces.
3063         #
3064         #  @ref swig_NumberOf "Example"
3065         def NumberOfFaces(self, theShape):
3066             """
3067             Gives quantity of faces in the given shape.
3068
3069             Parameters:
3070                 theShape Shape to count faces of.
3071
3072             Returns:    
3073                 Quantity of faces.
3074             """
3075             # Example: see GEOM_TestOthers.py
3076             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
3077             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
3078             return nb_faces
3079
3080         ## Gives quantity of edges in the given shape.
3081         #  @param theShape Shape to count edges of.
3082         #  @return Quantity of edges.
3083         #
3084         #  @ref swig_NumberOf "Example"
3085         def NumberOfEdges(self, theShape):
3086             """
3087             Gives quantity of edges in the given shape.
3088
3089             Parameters:
3090                 theShape Shape to count edges of.
3091
3092             Returns:    
3093                 Quantity of edges.
3094             """
3095             # Example: see GEOM_TestOthers.py
3096             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
3097             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
3098             return nb_edges
3099
3100         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
3101         #  @param theShape Shape to count sub-shapes of.
3102         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
3103         #  @return Quantity of sub-shapes of given type.
3104         #
3105         #  @ref swig_NumberOf "Example"
3106         def NumberOfSubShapes(self, theShape, theShapeType):
3107             """
3108             Gives quantity of sub-shapes of type theShapeType in the given shape.
3109
3110             Parameters:
3111                 theShape Shape to count sub-shapes of.
3112                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
3113
3114             Returns:
3115                 Quantity of sub-shapes of given type.
3116             """
3117             # Example: see GEOM_TestOthers.py
3118             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
3119             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
3120             return nb_ss
3121
3122         ## Gives quantity of solids in the given shape.
3123         #  @param theShape Shape to count solids in.
3124         #  @return Quantity of solids.
3125         #
3126         #  @ref swig_NumberOf "Example"
3127         def NumberOfSolids(self, theShape):
3128             """
3129             Gives quantity of solids in the given shape.
3130
3131             Parameters:
3132                 theShape Shape to count solids in.
3133
3134             Returns:
3135                 Quantity of solids.
3136             """
3137             # Example: see GEOM_TestOthers.py
3138             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"])
3139             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
3140             return nb_solids
3141
3142         # end of l2_measure
3143         ## @}
3144
3145         ## @addtogroup l3_healing
3146         ## @{
3147
3148         ## Reverses an orientation the given shape.
3149         #  @param theShape Shape to be reversed.
3150         #  @return The reversed copy of theShape.
3151         #
3152         #  @ref swig_ChangeOrientation "Example"
3153         def ChangeOrientation(self,theShape):
3154             """
3155             Reverses an orientation the given shape.
3156
3157             Parameters:
3158                 theShape Shape to be reversed.
3159
3160             Returns:   
3161                 The reversed copy of theShape.
3162             """
3163             # Example: see GEOM_TestAll.py
3164             anObj = self.ShapesOp.ChangeOrientation(theShape)
3165             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
3166             return anObj
3167
3168         ## See ChangeOrientation() method for details.
3169         #
3170         #  @ref swig_OrientationChange "Example"
3171         def OrientationChange(self,theShape):
3172             """
3173             See geompy.ChangeOrientation method for details.
3174             """
3175             # Example: see GEOM_TestOthers.py
3176             anObj = self.ChangeOrientation(theShape)
3177             return anObj
3178
3179         # end of l3_healing
3180         ## @}
3181
3182         ## @addtogroup l4_obtain
3183         ## @{
3184
3185         ## Retrieve all free faces from the given shape.
3186         #  Free face is a face, which is not shared between two shells of the shape.
3187         #  @param theShape Shape to find free faces in.
3188         #  @return List of IDs of all free faces, contained in theShape.
3189         #
3190         #  @ref tui_measurement_tools_page "Example"
3191         def GetFreeFacesIDs(self,theShape):
3192             """
3193             Retrieve all free faces from the given shape.
3194             Free face is a face, which is not shared between two shells of the shape.
3195
3196             Parameters:
3197                 theShape Shape to find free faces in.
3198
3199             Returns:
3200                 List of IDs of all free faces, contained in theShape.
3201             """
3202             # Example: see GEOM_TestOthers.py
3203             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
3204             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
3205             return anIDs
3206
3207         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
3208         #  @param theShape1 Shape to find sub-shapes in.
3209         #  @param theShape2 Shape to find shared sub-shapes with.
3210         #  @param theShapeType Type of sub-shapes to be retrieved.
3211         #  @return List of sub-shapes of theShape1, shared with theShape2.
3212         #
3213         #  @ref swig_GetSharedShapes "Example"
3214         def GetSharedShapes(self,theShape1, theShape2, theShapeType):
3215             """
3216             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
3217
3218             Parameters:
3219                 theShape1 Shape to find sub-shapes in.
3220                 theShape2 Shape to find shared sub-shapes with.
3221                 theShapeType Type of sub-shapes to be retrieved.
3222
3223             Returns:
3224                 List of sub-shapes of theShape1, shared with theShape2.
3225             """
3226             # Example: see GEOM_TestOthers.py
3227             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
3228             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
3229             return aList
3230
3231         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
3232         #  @param theShapes Shapes to find common sub-shapes of.
3233         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3234         #  @return List of objects, that are sub-shapes of all given shapes.
3235         #
3236         #  @ref swig_GetSharedShapes "Example"
3237         def GetSharedShapesMulti(self, theShapes, theShapeType):
3238             """
3239             Get all sub-shapes, shared by all shapes in the list theShapes.
3240
3241             Parameters:
3242                 theShapes Shapes to find common sub-shapes of.
3243                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3244
3245             Returns:    
3246                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
3247             """
3248             # Example: see GEOM_TestOthers.py
3249             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
3250             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
3251             return aList
3252
3253         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3254         #  situated relatively the specified plane by the certain way,
3255         #  defined through <VAR>theState</VAR> parameter.
3256         #  @param theShape Shape to find sub-shapes of.
3257         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3258         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3259         #                direction and location of the plane to find shapes on.
3260         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3261         #  @return List of all found sub-shapes.
3262         #
3263         #  @ref swig_GetShapesOnPlane "Example"
3264         def GetShapesOnPlane(self,theShape, theShapeType, theAx1, theState):
3265             """
3266             Find in theShape all sub-shapes of type theShapeType,
3267             situated relatively the specified plane by the certain way,
3268             defined through theState parameter.
3269
3270             Parameters:
3271                 theShape Shape to find sub-shapes of.
3272                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3273                 theAx1 Vector (or line, or linear edge), specifying normal
3274                        direction and location of the plane to find shapes on.
3275                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3276
3277             Returns:
3278                 List of all found sub-shapes.
3279             """
3280             # Example: see GEOM_TestOthers.py
3281             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
3282             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
3283             return aList
3284
3285         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3286         #  situated relatively the specified plane by the certain way,
3287         #  defined through <VAR>theState</VAR> parameter.
3288         #  @param theShape Shape to find sub-shapes of.
3289         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3290         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3291         #                direction and location of the plane to find shapes on.
3292         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3293         #  @return List of all found sub-shapes indices.
3294         #
3295         #  @ref swig_GetShapesOnPlaneIDs "Example"
3296         def GetShapesOnPlaneIDs(self,theShape, theShapeType, theAx1, theState):
3297             """
3298             Find in theShape all sub-shapes of type theShapeType,
3299             situated relatively the specified plane by the certain way,
3300             defined through theState parameter.
3301
3302             Parameters:
3303                 theShape Shape to find sub-shapes of.
3304                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3305                 theAx1 Vector (or line, or linear edge), specifying normal
3306                        direction and location of the plane to find shapes on.
3307                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3308
3309             Returns:
3310                 List of all found sub-shapes indices.
3311             """
3312             # Example: see GEOM_TestOthers.py
3313             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
3314             RaiseIfFailed("GetShapesOnPlaneIDs", 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.
3327         #
3328         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
3329         def GetShapesOnPlaneWithLocation(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.
3345             """
3346             # Example: see GEOM_TestOthers.py
3347             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
3348                                                                theAx1, thePnt, theState)
3349             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
3350             return aList
3351
3352         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
3353         #  situated relatively the specified plane by the certain way,
3354         #  defined through <VAR>theState</VAR> parameter.
3355         #  @param theShape Shape to find sub-shapes of.
3356         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3357         #  @param theAx1 Vector (or line, or linear edge), specifying normal
3358         #                direction of the plane to find shapes on.
3359         #  @param thePnt Point specifying location of the plane to find shapes on.
3360         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3361         #  @return List of all found sub-shapes indices.
3362         #
3363         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
3364         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
3365             """
3366             Find in theShape all sub-shapes of type theShapeType,
3367             situated relatively the specified plane by the certain way,
3368             defined through theState parameter.
3369
3370             Parameters:
3371                 theShape Shape to find sub-shapes of.
3372                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3373                 theAx1 Vector (or line, or linear edge), specifying normal
3374                        direction and location of the plane to find shapes on.
3375                 thePnt Point specifying location of the plane to find shapes on.
3376                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3377
3378             Returns:
3379                 List of all found sub-shapes indices.
3380             """
3381             # Example: see GEOM_TestOthers.py
3382             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
3383                                                                   theAx1, thePnt, theState)
3384             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
3385             return aList
3386
3387         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3388         #  the specified cylinder by the certain way, defined through \a theState parameter.
3389         #  @param theShape Shape to find sub-shapes of.
3390         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3391         #  @param theAxis Vector (or line, or linear edge), specifying
3392         #                 axis of the cylinder to find shapes on.
3393         #  @param theRadius Radius of the cylinder to find shapes on.
3394         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3395         #  @return List of all found sub-shapes.
3396         #
3397         #  @ref swig_GetShapesOnCylinder "Example"
3398         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState):
3399             """
3400             Find in theShape all sub-shapes of type theShapeType, situated relatively
3401             the specified cylinder by the certain way, defined through theState parameter.
3402
3403             Parameters:
3404                 theShape Shape to find sub-shapes of.
3405                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3406                 theAxis Vector (or line, or linear edge), specifying
3407                         axis of the cylinder to find shapes on.
3408                 theRadius Radius of the cylinder to find shapes on.
3409                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3410
3411             Returns:
3412                 List of all found sub-shapes.
3413             """
3414             # Example: see GEOM_TestOthers.py
3415             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
3416             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
3417             return aList
3418
3419         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3420         #  the specified cylinder by the certain way, defined through \a theState parameter.
3421         #  @param theShape Shape to find sub-shapes of.
3422         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3423         #  @param theAxis Vector (or line, or linear edge), specifying
3424         #                 axis of the cylinder to find shapes on.
3425         #  @param theRadius Radius of the cylinder to find shapes on.
3426         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3427         #  @return List of all found sub-shapes indices.
3428         #
3429         #  @ref swig_GetShapesOnCylinderIDs "Example"
3430         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
3431             """
3432             Find in theShape all sub-shapes of type theShapeType, situated relatively
3433             the specified cylinder by the certain way, defined through theState parameter.
3434
3435             Parameters:
3436                 theShape Shape to find sub-shapes of.
3437                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3438                 theAxis Vector (or line, or linear edge), specifying
3439                         axis of the cylinder to find shapes on.
3440                 theRadius Radius of the cylinder to find shapes on.
3441                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3442
3443             Returns:
3444                 List of all found sub-shapes indices.
3445             """
3446             # Example: see GEOM_TestOthers.py
3447             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
3448             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
3449             return aList
3450
3451         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3452         #  the specified cylinder by the certain way, defined through \a theState parameter.
3453         #  @param theShape Shape to find sub-shapes of.
3454         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3455         #  @param theAxis Vector (or line, or linear edge), specifying
3456         #                 axis of the cylinder to find shapes on.
3457         #  @param thePnt Point specifying location of the bottom of the cylinder.
3458         #  @param theRadius Radius of the cylinder to find shapes on.
3459         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3460         #  @return List of all found sub-shapes.
3461         #
3462         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
3463         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
3464             """
3465             Find in theShape all sub-shapes of type theShapeType, situated relatively
3466             the specified cylinder by the certain way, defined through theState parameter.
3467
3468             Parameters:
3469                 theShape Shape to find sub-shapes of.
3470                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3471                 theAxis Vector (or line, or linear edge), specifying
3472                         axis of the cylinder to find shapes on.
3473                 theRadius Radius of the cylinder to find shapes on.
3474                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3475
3476             Returns:
3477                 List of all found sub-shapes.
3478             """
3479             # Example: see GEOM_TestOthers.py
3480             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
3481             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
3482             return aList
3483
3484         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3485         #  the specified cylinder by the certain way, defined through \a theState parameter.
3486         #  @param theShape Shape to find sub-shapes of.
3487         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3488         #  @param theAxis Vector (or line, or linear edge), specifying
3489         #                 axis of the cylinder to find shapes on.
3490         #  @param thePnt Point specifying location of the bottom of the cylinder.
3491         #  @param theRadius Radius of the cylinder to find shapes on.
3492         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3493         #  @return List of all found sub-shapes indices
3494         #
3495         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
3496         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
3497             """
3498             Find in theShape all sub-shapes of type theShapeType, situated relatively
3499             the specified cylinder by the certain way, defined through theState parameter.
3500
3501             Parameters:
3502                 theShape Shape to find sub-shapes of.
3503                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3504                 theAxis Vector (or line, or linear edge), specifying
3505                         axis of the cylinder to find shapes on.
3506                 theRadius Radius of the cylinder to find shapes on.
3507                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3508
3509             Returns:
3510                 List of all found sub-shapes indices.            
3511             """
3512             # Example: see GEOM_TestOthers.py
3513             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
3514             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
3515             return aList
3516
3517         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3518         #  the specified sphere by the certain way, defined through \a theState parameter.
3519         #  @param theShape Shape to find sub-shapes of.
3520         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3521         #  @param theCenter Point, specifying center of the sphere to find shapes on.
3522         #  @param theRadius Radius of the sphere to find shapes on.
3523         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3524         #  @return List of all found sub-shapes.
3525         #
3526         #  @ref swig_GetShapesOnSphere "Example"
3527         def GetShapesOnSphere(self,theShape, theShapeType, theCenter, theRadius, theState):
3528             """
3529             Find in theShape all sub-shapes of type theShapeType, situated relatively
3530             the specified sphere by the certain way, defined through theState parameter.
3531
3532             Parameters:
3533                 theShape Shape to find sub-shapes of.
3534                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3535                 theCenter Point, specifying center of the sphere to find shapes on.
3536                 theRadius Radius of the sphere to find shapes on.
3537                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3538
3539             Returns:
3540                 List of all found sub-shapes.
3541             """
3542             # Example: see GEOM_TestOthers.py
3543             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
3544             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
3545             return aList
3546
3547         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3548         #  the specified sphere by the certain way, defined through \a theState parameter.
3549         #  @param theShape Shape to find sub-shapes of.
3550         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3551         #  @param theCenter Point, specifying center of the sphere to find shapes on.
3552         #  @param theRadius Radius of the sphere to find shapes on.
3553         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3554         #  @return List of all found sub-shapes indices.
3555         #
3556         #  @ref swig_GetShapesOnSphereIDs "Example"
3557         def GetShapesOnSphereIDs(self,theShape, theShapeType, theCenter, theRadius, theState):
3558             """
3559             Find in theShape all sub-shapes of type theShapeType, situated relatively
3560             the specified sphere by the certain way, defined through theState parameter.
3561
3562             Parameters:
3563                 theShape Shape to find sub-shapes of.
3564                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3565                 theCenter Point, specifying center of the sphere to find shapes on.
3566                 theRadius Radius of the sphere to find shapes on.
3567                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3568
3569             Returns:
3570                 List of all found sub-shapes indices.
3571             """
3572             # Example: see GEOM_TestOthers.py
3573             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
3574             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
3575             return aList
3576
3577         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3578         #  the specified quadrangle by the certain way, defined through \a theState parameter.
3579         #  @param theShape Shape to find sub-shapes of.
3580         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3581         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
3582         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
3583         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3584         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3585         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3586         #  @return List of all found sub-shapes.
3587         #
3588         #  @ref swig_GetShapesOnQuadrangle "Example"
3589         def GetShapesOnQuadrangle(self, theShape, theShapeType,
3590                                   theTopLeftPoint, theTopRigthPoint,
3591                                   theBottomLeftPoint, theBottomRigthPoint, theState):
3592             """
3593             Find in theShape all sub-shapes of type theShapeType, situated relatively
3594             the specified quadrangle by the certain way, defined through theState parameter.
3595
3596             Parameters:
3597                 theShape Shape to find sub-shapes of.
3598                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3599                 theTopLeftPoint Point, specifying top left corner of a quadrangle
3600                 theTopRigthPoint Point, specifying top right corner of a quadrangle
3601                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3602                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3603                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3604
3605             Returns:
3606                 List of all found sub-shapes.
3607             """
3608             # Example: see GEOM_TestOthers.py
3609             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
3610                                                         theTopLeftPoint, theTopRigthPoint,
3611                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
3612             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
3613             return aList
3614
3615         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3616         #  the specified quadrangle by the certain way, defined through \a theState parameter.
3617         #  @param theShape Shape to find sub-shapes of.
3618         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3619         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
3620         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
3621         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3622         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3623         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3624         #  @return List of all found sub-shapes indices.
3625         #
3626         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
3627         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
3628                                      theTopLeftPoint, theTopRigthPoint,
3629                                      theBottomLeftPoint, theBottomRigthPoint, theState):
3630             """
3631             Find in theShape all sub-shapes of type theShapeType, situated relatively
3632             the specified quadrangle by the certain way, defined through theState parameter.
3633
3634             Parameters:
3635                 theShape Shape to find sub-shapes of.
3636                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3637                 theTopLeftPoint Point, specifying top left corner of a quadrangle
3638                 theTopRigthPoint Point, specifying top right corner of a quadrangle
3639                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
3640                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
3641                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3642
3643             Returns:
3644                 List of all found sub-shapes indices.
3645             """
3646
3647             # Example: see GEOM_TestOthers.py
3648             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
3649                                                            theTopLeftPoint, theTopRigthPoint,
3650                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
3651             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
3652             return aList
3653
3654         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3655         #  the specified \a theBox by the certain way, defined through \a theState parameter.
3656         #  @param theBox Shape for relative comparing.
3657         #  @param theShape Shape to find sub-shapes of.
3658         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3659         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3660         #  @return List of all found sub-shapes.
3661         #
3662         #  @ref swig_GetShapesOnBox "Example"
3663         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState):
3664             """
3665             Find in theShape all sub-shapes of type theShapeType, situated relatively
3666             the specified theBox by the certain way, defined through theState parameter.
3667
3668             Parameters:
3669                 theBox Shape for relative comparing.
3670                 theShape Shape to find sub-shapes of.
3671                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3672                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3673
3674             Returns:
3675                 List of all found sub-shapes.
3676             """
3677             # Example: see GEOM_TestOthers.py
3678             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
3679             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
3680             return aList
3681
3682         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
3683         #  the specified \a theBox by the certain way, defined through \a theState parameter.
3684         #  @param theBox Shape for relative comparing.
3685         #  @param theShape Shape to find sub-shapes of.
3686         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3687         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3688         #  @return List of all found sub-shapes indices.
3689         #
3690         #  @ref swig_GetShapesOnBoxIDs "Example"
3691         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
3692             """
3693             Find in theShape all sub-shapes of type theShapeType, situated relatively
3694             the specified theBox by the certain way, defined through theState parameter.
3695
3696             Parameters:
3697                 theBox Shape for relative comparing.
3698                 theShape Shape to find sub-shapes of.
3699                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3700                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3701
3702             Returns:
3703                 List of all found sub-shapes indices.
3704             """
3705             # Example: see GEOM_TestOthers.py
3706             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
3707             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
3708             return aList
3709
3710         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3711         #  situated relatively the specified \a theCheckShape by the
3712         #  certain way, defined through \a theState parameter.
3713         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3714         #  @param theShape Shape to find sub-shapes of.
3715         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
3716         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3717         #  @return List of all found sub-shapes.
3718         #
3719         #  @ref swig_GetShapesOnShape "Example"
3720         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState):
3721             """
3722             Find in theShape all sub-shapes of type theShapeType,
3723             situated relatively the specified theCheckShape by the
3724             certain way, defined through theState parameter.
3725
3726             Parameters:
3727                 theCheckShape Shape for relative comparing. It must be a solid.
3728                 theShape Shape to find sub-shapes of.
3729                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3730                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3731
3732             Returns:
3733                 List of all found sub-shapes.
3734             """
3735             # Example: see GEOM_TestOthers.py
3736             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
3737                                                    theShapeType, theState)
3738             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
3739             return aList
3740
3741         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3742         #  situated relatively the specified \a theCheckShape by the
3743         #  certain way, defined through \a theState parameter.
3744         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3745         #  @param theShape Shape to find sub-shapes of.
3746         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3747         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3748         #  @return All found sub-shapes as compound.
3749         #
3750         #  @ref swig_GetShapesOnShapeAsCompound "Example"
3751         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState):
3752             """
3753             Find in theShape all sub-shapes of type theShapeType,
3754             situated relatively the specified theCheckShape by the
3755             certain way, defined through theState parameter.
3756
3757             Parameters:
3758                 theCheckShape Shape for relative comparing. It must be a solid.
3759                 theShape Shape to find sub-shapes of.
3760                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3761                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3762
3763             Returns:
3764                 All found sub-shapes as compound.
3765             """
3766             # Example: see GEOM_TestOthers.py
3767             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
3768                                                              theShapeType, theState)
3769             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
3770             return anObj
3771
3772         ## Find in \a theShape all sub-shapes of type \a theShapeType,
3773         #  situated relatively the specified \a theCheckShape by the
3774         #  certain way, defined through \a theState parameter.
3775         #  @param theCheckShape Shape for relative comparing. It must be a solid.
3776         #  @param theShape Shape to find sub-shapes of.
3777         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
3778         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
3779         #  @return List of all found sub-shapes indices.
3780         #
3781         #  @ref swig_GetShapesOnShapeIDs "Example"
3782         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
3783             """
3784             Find in theShape all sub-shapes of type theShapeType,
3785             situated relatively the specified theCheckShape by the
3786             certain way, defined through theState parameter.
3787
3788             Parameters:
3789                 theCheckShape Shape for relative comparing. It must be a solid.
3790                 theShape Shape to find sub-shapes of.
3791                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
3792                 theState The state of the sub-shapes to find (see GEOM::shape_state)
3793
3794             Returns:
3795                 List of all found sub-shapes indices.
3796             """
3797             # Example: see GEOM_TestOthers.py
3798             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
3799                                                       theShapeType, theState)
3800             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
3801             return aList
3802
3803         ## Get sub-shape(s) of theShapeWhere, which are
3804         #  coincident with \a theShapeWhat or could be a part of it.
3805         #  @param theShapeWhere Shape to find sub-shapes of.
3806         #  @param theShapeWhat Shape, specifying what to find.
3807         #  @param isNewImplementation implementation of GetInPlace functionality
3808         #             (default = False, old alghorithm based on shape properties)
3809         #  @return Group of all found sub-shapes or a single found sub-shape.
3810         #
3811         #  @note This function has a restriction on argument shapes.
3812         #        If \a theShapeWhere has curved parts with significantly
3813         #        outstanding centres (i.e. the mass centre of a part is closer to
3814         #        \a theShapeWhat than to the part), such parts will not be found.
3815         #        @image html get_in_place_lost_part.png
3816         #
3817         #  @ref swig_GetInPlace "Example"
3818         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False):
3819             """
3820             Get sub-shape(s) of theShapeWhere, which are
3821             coincident with  theShapeWhat or could be a part of it.
3822
3823             Parameters:
3824                 theShapeWhere Shape to find sub-shapes of.
3825                 theShapeWhat Shape, specifying what to find.
3826                 isNewImplementation Implementation of GetInPlace functionality
3827                                     (default = False, old alghorithm based on shape properties)
3828
3829             Returns:
3830                 Group of all found sub-shapes or a single found sub-shape.
3831
3832                 
3833             Note:
3834                 This function has a restriction on argument shapes.
3835                 If theShapeWhere has curved parts with significantly
3836                 outstanding centres (i.e. the mass centre of a part is closer to
3837                 theShapeWhat than to the part), such parts will not be found.
3838             """
3839             # Example: see GEOM_TestOthers.py
3840             anObj = None
3841             if isNewImplementation:
3842                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
3843             else:
3844                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
3845                 pass
3846             RaiseIfFailed("GetInPlace", self.ShapesOp)
3847             return anObj
3848
3849         ## Get sub-shape(s) of \a theShapeWhere, which are
3850         #  coincident with \a theShapeWhat or could be a part of it.
3851         #
3852         #  Implementation of this method is based on a saved history of an operation,
3853         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
3854         #  arguments (an argument shape or a sub-shape of an argument shape).
3855         #  The operation could be the Partition or one of boolean operations,
3856         #  performed on simple shapes (not on compounds).
3857         #
3858         #  @param theShapeWhere Shape to find sub-shapes of.
3859         #  @param theShapeWhat Shape, specifying what to find (must be in the
3860         #                      building history of the ShapeWhere).
3861         #  @return Group of all found sub-shapes or a single found sub-shape.
3862         #
3863         #  @ref swig_GetInPlace "Example"
3864         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat):
3865             """
3866             Implementation of this method is based on a saved history of an operation,
3867             produced theShapeWhere. The theShapeWhat must be among this operation's
3868             arguments (an argument shape or a sub-shape of an argument shape).
3869             The operation could be the Partition or one of boolean operations,
3870             performed on simple shapes (not on compounds).
3871
3872             Parameters:
3873                 theShapeWhere Shape to find sub-shapes of.
3874                 theShapeWhat Shape, specifying what to find (must be in the
3875                                 building history of the ShapeWhere).
3876
3877             Returns:
3878                 Group of all found sub-shapes or a single found sub-shape.
3879             """
3880             # Example: see GEOM_TestOthers.py
3881             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
3882             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
3883             return anObj
3884
3885         ## Get sub-shape of theShapeWhere, which is
3886         #  equal to \a theShapeWhat.
3887         #  @param theShapeWhere Shape to find sub-shape of.
3888         #  @param theShapeWhat Shape, specifying what to find.
3889         #  @return New GEOM.GEOM_Object for found sub-shape.
3890         #
3891         #  @ref swig_GetSame "Example"
3892         def GetSame(self,theShapeWhere, theShapeWhat):
3893             """
3894             Get sub-shape of theShapeWhere, which is
3895             equal to theShapeWhat.
3896
3897             Parameters:
3898                 theShapeWhere Shape to find sub-shape of.
3899                 theShapeWhat Shape, specifying what to find.
3900
3901             Returns:
3902                 New GEOM.GEOM_Object for found sub-shape.
3903             """
3904             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
3905             RaiseIfFailed("GetSame", self.ShapesOp)
3906             return anObj
3907
3908
3909         ## Get sub-shape indices of theShapeWhere, which is
3910         #  equal to \a theShapeWhat.
3911         #  @param theShapeWhere Shape to find sub-shape of.
3912         #  @param theShapeWhat Shape, specifying what to find.
3913         #  @return List of all found sub-shapes indices. 
3914         #
3915         #  @ref swig_GetSame "Example"
3916         def GetSameIDs(self,theShapeWhere, theShapeWhat):
3917             """
3918             Get sub-shape indices of theShapeWhere, which is
3919             equal to theShapeWhat.
3920
3921             Parameters:
3922                 theShapeWhere Shape to find sub-shape of.
3923                 theShapeWhat Shape, specifying what to find.
3924
3925             Returns:
3926                 List of all found sub-shapes indices.
3927             """
3928             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
3929             RaiseIfFailed("GetSameIDs", self.ShapesOp)
3930             return anObj
3931
3932
3933         # end of l4_obtain
3934         ## @}
3935
3936         ## @addtogroup l4_access
3937         ## @{
3938
3939         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
3940         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
3941         #  @param aShape Shape to get sub-shape of.
3942         #  @param ListOfID List of sub-shapes indices.
3943         #  @return Found sub-shape.
3944         #
3945         #  @ref swig_all_decompose "Example"
3946         def GetSubShape(self, aShape, ListOfID):
3947             """
3948             Obtain a composite sub-shape of aShape, composed from sub-shapes
3949             of aShape, selected by their unique IDs inside aShape
3950
3951             Parameters:
3952                aShape Shape to get sub-shape of.
3953                ListOfID List of sub-shapes indices.
3954
3955             Returns:
3956                 Found sub-shape.
3957             """
3958             # Example: see GEOM_TestAll.py
3959             anObj = self.AddSubShape(aShape,ListOfID)
3960             return anObj
3961
3962         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
3963         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
3964         #  @param aShape Shape to get sub-shape of.
3965         #  @param aSubShape Sub-shapes of aShape.
3966         #  @return ID of found sub-shape.
3967         #
3968         #  @ref swig_all_decompose "Example"
3969         def GetSubShapeID(self, aShape, aSubShape):
3970             """
3971             Obtain unique ID of sub-shape aSubShape inside aShape
3972             of aShape, selected by their unique IDs inside aShape
3973
3974             Parameters:
3975                aShape Shape to get sub-shape of.
3976                aSubShape Sub-shapes of aShape.
3977
3978             Returns:
3979                ID of found sub-shape.
3980             """
3981             # Example: see GEOM_TestAll.py
3982             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
3983             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
3984             return anID
3985
3986         # end of l4_access
3987         ## @}
3988
3989         ## @addtogroup l4_decompose
3990         ## @{
3991
3992         ## Get all sub-shapes and groups of \a theShape,
3993         #  that were created already by any other methods.
3994         #  @param theShape Any shape.
3995         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
3996         #                       returned, else all found sub-shapes and groups.
3997         #  @return List of existing sub-objects of \a theShape.
3998         #
3999         #  @ref swig_all_decompose "Example"
4000         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
4001             """
4002             Get all sub-shapes and groups of theShape,
4003             that were created already by any other methods.
4004
4005             Parameters:
4006                 theShape Any shape.
4007                 theGroupsOnly If this parameter is TRUE, only groups will be
4008                                  returned, else all found sub-shapes and groups.
4009
4010             Returns:
4011                 List of existing sub-objects of theShape.
4012             """
4013             # Example: see GEOM_TestAll.py
4014             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
4015             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
4016             return ListObj
4017
4018         ## Get all groups of \a theShape,
4019         #  that were created already by any other methods.
4020         #  @param theShape Any shape.
4021         #  @return List of existing groups of \a theShape.
4022         #
4023         #  @ref swig_all_decompose "Example"
4024         def GetGroups(self, theShape):
4025             """
4026             Get all groups of theShape,
4027             that were created already by any other methods.
4028
4029             Parameters:
4030                 theShape Any shape.
4031
4032             Returns:
4033                 List of existing groups of theShape.
4034             """
4035             # Example: see GEOM_TestAll.py
4036             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
4037             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
4038             return ListObj
4039
4040         ## Explode a shape on sub-shapes of a given type.
4041         #  If the shape itself matches the type, it is also returned.
4042         #  @param aShape Shape to be exploded.
4043         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
4044         #  @return List of sub-shapes of type theShapeType, contained in theShape.
4045         #
4046         #  @ref swig_all_decompose "Example"
4047         def SubShapeAll(self, aShape, aType):
4048             """
4049             Explode a shape on sub-shapes of a given type.
4050             If the shape itself matches the type, it is also returned.
4051
4052             Parameters:
4053                 aShape Shape to be exploded.
4054                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
4055
4056             Returns:
4057                 List of sub-shapes of type theShapeType, contained in theShape.
4058             """
4059             # Example: see GEOM_TestAll.py
4060             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, False)
4061             RaiseIfFailed("SubShapeAll", self.ShapesOp)
4062             return ListObj
4063
4064         ## Explode a shape on sub-shapes of a given type.
4065         #  @param aShape Shape to be exploded.
4066         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4067         #  @return List of IDs of sub-shapes.
4068         #
4069         #  @ref swig_all_decompose "Example"
4070         def SubShapeAllIDs(self, aShape, aType):
4071             """
4072             Explode a shape on sub-shapes of a given type.
4073
4074             Parameters:
4075                 aShape Shape to be exploded (see geompy.ShapeType) 
4076                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4077
4078             Returns:
4079                 List of IDs of sub-shapes.
4080             """
4081             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, False)
4082             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4083             return ListObj
4084
4085         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
4086         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
4087         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4088         #  @param aShape Shape to get sub-shape of.
4089         #  @param ListOfInd List of sub-shapes indices.
4090         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4091         #  @return A compound of sub-shapes of aShape.
4092         #
4093         #  @ref swig_all_decompose "Example"
4094         def SubShape(self, aShape, aType, ListOfInd):
4095             """
4096             Obtain a compound of sub-shapes of aShape,
4097             selected by they indices in list of all sub-shapes of type aType.
4098             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4099             
4100             Parameters:
4101                 aShape Shape to get sub-shape of.
4102                 ListOfID List of sub-shapes indices.
4103                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4104
4105             Returns:
4106                 A compound of sub-shapes of aShape.
4107             """
4108             # Example: see GEOM_TestAll.py
4109             ListOfIDs = []
4110             AllShapeIDsList = self.SubShapeAllIDs(aShape, aType)
4111             for ind in ListOfInd:
4112                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4113             anObj = self.GetSubShape(aShape, ListOfIDs)
4114             return anObj
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         #  If the shape itself matches the type, it is also returned.
4119         #  @param aShape Shape to be exploded.
4120         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4121         #  @return List of sub-shapes of type theShapeType, contained in theShape.
4122         #
4123         #  @ref swig_SubShapeAllSorted "Example"
4124         def SubShapeAllSortedCentres(self, aShape, aType):
4125             """
4126             Explode a shape on sub-shapes of a given type.
4127             Sub-shapes will be sorted by coordinates of their gravity centers.
4128             If the shape itself matches the type, it is also returned.
4129
4130             Parameters: 
4131                 aShape Shape to be exploded.
4132                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4133
4134             Returns: 
4135                 List of sub-shapes of type theShapeType, contained in theShape.
4136             """
4137             # Example: see GEOM_TestAll.py
4138             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, True)
4139             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
4140             return ListObj
4141
4142         ## Explode a shape on sub-shapes of a given type.
4143         #  Sub-shapes will be sorted by coordinates of their gravity centers.
4144         #  @param aShape Shape to be exploded.
4145         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4146         #  @return List of IDs of sub-shapes.
4147         #
4148         #  @ref swig_all_decompose "Example"
4149         def SubShapeAllSortedCentresIDs(self, aShape, aType):
4150             """
4151             Explode a shape on sub-shapes of a given type.
4152             Sub-shapes will be sorted by coordinates of their gravity centers.
4153
4154             Parameters: 
4155                 aShape Shape to be exploded.
4156                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4157
4158             Returns: 
4159                 List of IDs of sub-shapes.
4160             """
4161             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, True)
4162             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4163             return ListIDs
4164
4165         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
4166         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
4167         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4168         #  @param aShape Shape to get sub-shape of.
4169         #  @param ListOfInd List of sub-shapes indices.
4170         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
4171         #  @return A compound of sub-shapes of aShape.
4172         #
4173         #  @ref swig_all_decompose "Example"
4174         def SubShapeSortedCentres(self, aShape, aType, ListOfInd):
4175             """
4176             Obtain a compound of sub-shapes of aShape,
4177             selected by they indices in sorted list of all sub-shapes of type aType.
4178             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
4179
4180             Parameters:
4181                 aShape Shape to get sub-shape of.
4182                 ListOfID List of sub-shapes indices.
4183                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4184
4185             Returns:
4186                 A compound of sub-shapes of aShape.
4187             """
4188             # Example: see GEOM_TestAll.py
4189             ListOfIDs = []
4190             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, aType)
4191             for ind in ListOfInd:
4192                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4193             anObj = self.GetSubShape(aShape, ListOfIDs)
4194             return anObj
4195
4196         ## Extract shapes (excluding the main shape) of given type.
4197         #  @param aShape The shape.
4198         #  @param aType  The shape type (see ShapeType())
4199         #  @param isSorted Boolean flag to switch sorting on/off.
4200         #  @return List of sub-shapes of type aType, contained in aShape.
4201         #
4202         #  @ref swig_FilletChamfer "Example"
4203         def ExtractShapes(self, aShape, aType, isSorted = False):
4204             """
4205             Extract shapes (excluding the main shape) of given type.
4206
4207             Parameters:
4208                 aShape The shape.
4209                 aType  The shape type (see geompy.ShapeType)
4210                 isSorted Boolean flag to switch sorting on/off.
4211
4212             Returns:     
4213                 List of sub-shapes of type aType, contained in aShape.
4214             """
4215             # Example: see GEOM_TestAll.py
4216             ListObj = self.ShapesOp.ExtractSubShapes(aShape, aType, isSorted)
4217             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
4218             return ListObj
4219
4220         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
4221         #  @param aShape Main shape.
4222         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
4223         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
4224         #
4225         #  @ref swig_all_decompose "Example"
4226         def SubShapes(self, aShape, anIDs):
4227             """
4228             Get a set of sub-shapes defined by their unique IDs inside theMainShape
4229
4230             Parameters:
4231                 aShape Main shape.
4232                 anIDs List of unique IDs of sub-shapes inside theMainShape.
4233
4234             Returns:      
4235                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
4236             """
4237             # Example: see GEOM_TestAll.py
4238             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
4239             RaiseIfFailed("SubShapes", self.ShapesOp)
4240             return ListObj
4241
4242         # end of l4_decompose
4243         ## @}
4244
4245         ## @addtogroup l4_decompose_d
4246         ## @{
4247
4248         ## Deprecated method
4249         #  It works like SubShapeAllSortedCentres(), but wrongly
4250         #  defines centres of faces, shells and solids.
4251         def SubShapeAllSorted(self, aShape, aType):
4252             """
4253             Deprecated method
4254             It works like geompy.SubShapeAllSortedCentres, but wrongly
4255             defines centres of faces, shells and solids.
4256             """
4257             ListObj = self.ShapesOp.MakeExplode(aShape, aType, True)
4258             RaiseIfFailed("MakeExplode", self.ShapesOp)
4259             return ListObj
4260
4261         ## Deprecated method
4262         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
4263         #  defines centres of faces, shells and solids.
4264         def SubShapeAllSortedIDs(self, aShape, aType):
4265             """
4266             Deprecated method
4267             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
4268             defines centres of faces, shells and solids.
4269             """
4270             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, aType, True)
4271             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
4272             return ListIDs
4273
4274         ## Deprecated method
4275         #  It works like SubShapeSortedCentres(), but has a bug
4276         #  (wrongly defines centres of faces, shells and solids).
4277         def SubShapeSorted(self, aShape, aType, ListOfInd):
4278             """
4279             Deprecated method
4280             It works like geompy.SubShapeSortedCentres, but has a bug
4281             (wrongly defines centres of faces, shells and solids).
4282             """
4283             ListOfIDs = []
4284             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, aType)
4285             for ind in ListOfInd:
4286                 ListOfIDs.append(AllShapeIDsList[ind - 1])
4287             anObj = self.GetSubShape(aShape, ListOfIDs)
4288             return anObj
4289
4290         # end of l4_decompose_d
4291         ## @}
4292
4293         ## @addtogroup l3_healing
4294         ## @{
4295
4296         ## Apply a sequence of Shape Healing operators to the given object.
4297         #  @param theShape Shape to be processed.
4298         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
4299         #  @param theParameters List of names of parameters
4300         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
4301         #  @param theValues List of values of parameters, in the same order
4302         #                    as parameters are listed in <VAR>theParameters</VAR> list.
4303         #
4304         #
4305         #  <b> Operators and Parameters: </b> \n
4306         #
4307         #  * \b FixShape - corrects invalid shapes. \n
4308         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
4309         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
4310         #
4311         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
4312         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
4313         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
4314         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
4315         #
4316         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
4317         #    surfaces in segments using a certain angle. \n
4318         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
4319         #    if Angle=180, four if Angle=90, etc). \n
4320         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
4321         #
4322         #  * \b SplitClosedFaces - splits closed faces in segments.
4323         #    The number of segments depends on the number of splitting points.\n
4324         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
4325         #
4326         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
4327         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
4328         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
4329         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
4330         #   This and the previous parameters can take the following values:\n
4331         #   \b Parametric \b Continuity \n
4332         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
4333         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
4334         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
4335         #    ruling out sharp edges).\n
4336         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
4337         #       are of the same magnitude).\n
4338         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
4339         #    or surfaces (d/du C(u)) are the same at junction. \n
4340         #   \b Geometric \b Continuity \n
4341         #   \b G1: first derivatives are proportional at junction.\n
4342         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
4343         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
4344         #   \b G2: first and second derivatives are proportional at junction.
4345         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
4346         #    continuity requires that the underlying parameterization was continuous as well.
4347         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
4348         #
4349         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
4350         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
4351         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
4352         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
4353         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
4354         #       with the specified parameters.\n
4355         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
4356         #       with the specified parameters.\n
4357         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
4358         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
4359         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
4360         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
4361         #
4362         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
4363         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
4364         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
4365         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
4366         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
4367         #
4368         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
4369         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
4370         #
4371         #
4372         #  @return New GEOM.GEOM_Object, containing processed shape.
4373         #
4374         #  \n @ref tui_shape_processing "Example"
4375         def ProcessShape(self, theShape, theOperators, theParameters, theValues):
4376             """
4377             Apply a sequence of Shape Healing operators to the given object.
4378
4379             Parameters:
4380                 theShape Shape to be processed.
4381                 theValues List of values of parameters, in the same order
4382                           as parameters are listed in theParameters list.
4383                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
4384                 theParameters List of names of parameters
4385                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
4386                  Operators and Parameters:
4387
4388                  * FixShape - corrects invalid shapes.
4389                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
4390                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
4391                  * FixFaceSize - removes small faces, such as spots and strips.
4392                      * FixFaceSize.Tolerance - defines minimum possible face size.
4393                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
4394                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
4395                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
4396                                 in segments using a certain angle.
4397                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
4398                                           if Angle=180, four if Angle=90, etc).
4399                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
4400                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
4401                                       splitting points.
4402                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
4403                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
4404                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
4405                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
4406                      * SplitContinuity.CurveContinuity - required continuity for curves.
4407                        This and the previous parameters can take the following values:
4408                        
4409                        Parametric Continuity:
4410                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
4411                                                    coincidental. The curves or surfaces may still meet at an angle,
4412                                                    giving rise to a sharp corner or edge).
4413                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
4414                                                    are parallel, ruling out sharp edges).
4415                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
4416                                                   or surfaces are of the same magnitude).
4417                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
4418                           curves or surfaces (d/du C(u)) are the same at junction.
4419                           
4420                        Geometric Continuity:
4421                        G1: first derivatives are proportional at junction.
4422                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
4423                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
4424                        G2: first and second derivatives are proportional at junction. As the names imply,
4425                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
4426                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
4427                            geometric continuity of order n, but not vice-versa.
4428                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
4429                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
4430                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
4431                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
4432                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
4433                                                         the specified parameters.
4434                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
4435                                                         the specified parameters.
4436                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
4437                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
4438                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
4439                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
4440                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
4441                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
4442                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
4443                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
4444                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
4445                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
4446                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
4447
4448             Returns:
4449                 New GEOM.GEOM_Object, containing processed shape.
4450
4451             Note: For more information look through SALOME Geometry User's Guide->
4452                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
4453             """
4454             # Example: see GEOM_TestHealing.py
4455             theValues,Parameters = ParseList(theValues)
4456             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
4457             # To avoid script failure in case of good argument shape
4458             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
4459                 return theShape
4460             RaiseIfFailed("ProcessShape", self.HealOp)
4461             for string in (theOperators + theParameters):
4462                 Parameters = ":" + Parameters
4463                 pass
4464             anObj.SetParameters(Parameters)
4465             return anObj
4466
4467         ## Remove faces from the given object (shape).
4468         #  @param theObject Shape to be processed.
4469         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
4470         #                  removes ALL faces of the given object.
4471         #  @return New GEOM.GEOM_Object, containing processed shape.
4472         #
4473         #  @ref tui_suppress_faces "Example"
4474         def SuppressFaces(self,theObject, theFaces):
4475             """
4476             Remove faces from the given object (shape).
4477
4478             Parameters:
4479                 theObject Shape to be processed.
4480                 theFaces Indices of faces to be removed, if EMPTY then the method
4481                          removes ALL faces of the given object.
4482
4483             Returns:
4484                 New GEOM.GEOM_Object, containing processed shape.
4485             """
4486             # Example: see GEOM_TestHealing.py
4487             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
4488             RaiseIfFailed("SuppressFaces", self.HealOp)
4489             return anObj
4490
4491         ## Sewing of some shapes into single shape.
4492         #  @param ListShape Shapes to be processed.
4493         #  @param theTolerance Required tolerance value.
4494         #  @return New GEOM.GEOM_Object, containing processed shape.
4495         #
4496         #  @ref tui_sewing "Example"
4497         def MakeSewing(self, ListShape, theTolerance):
4498             """
4499             Sewing of some shapes into single shape.
4500
4501             Parameters:
4502                 ListShape Shapes to be processed.
4503                 theTolerance Required tolerance value.
4504
4505             Returns:
4506                 New GEOM.GEOM_Object, containing processed shape.
4507             """
4508             # Example: see GEOM_TestHealing.py
4509             comp = self.MakeCompound(ListShape)
4510             anObj = self.Sew(comp, theTolerance)
4511             return anObj
4512
4513         ## Sewing of the given object.
4514         #  @param theObject Shape to be processed.
4515         #  @param theTolerance Required tolerance value.
4516         #  @return New GEOM.GEOM_Object, containing processed shape.
4517         def Sew(self, theObject, theTolerance):
4518             """
4519             Sewing of the given object.
4520
4521             Parameters:
4522                 theObject Shape to be processed.
4523                 theTolerance Required tolerance value.
4524
4525             Returns:
4526                 New GEOM.GEOM_Object, containing processed shape.
4527             """
4528             # Example: see MakeSewing() above
4529             theTolerance,Parameters = ParseParameters(theTolerance)
4530             anObj = self.HealOp.Sew(theObject, theTolerance)
4531             RaiseIfFailed("Sew", self.HealOp)
4532             anObj.SetParameters(Parameters)
4533             return anObj
4534
4535         ## Remove internal wires and edges from the given object (face).
4536         #  @param theObject Shape to be processed.
4537         #  @param theWires Indices of wires to be removed, if EMPTY then the method
4538         #                  removes ALL internal wires of the given object.
4539         #  @return New GEOM.GEOM_Object, containing processed shape.
4540         #
4541         #  @ref tui_suppress_internal_wires "Example"
4542         def SuppressInternalWires(self,theObject, theWires):
4543             """
4544             Remove internal wires and edges from the given object (face).
4545
4546             Parameters:
4547                 theObject Shape to be processed.
4548                 theWires Indices of wires to be removed, if EMPTY then the method
4549                          removes ALL internal wires of the given object.
4550
4551             Returns:                
4552                 New GEOM.GEOM_Object, containing processed shape.
4553             """
4554             # Example: see GEOM_TestHealing.py
4555             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
4556             RaiseIfFailed("RemoveIntWires", self.HealOp)
4557             return anObj
4558
4559         ## Remove internal closed contours (holes) from the given object.
4560         #  @param theObject Shape to be processed.
4561         #  @param theWires Indices of wires to be removed, if EMPTY then the method
4562         #                  removes ALL internal holes of the given object
4563         #  @return New GEOM.GEOM_Object, containing processed shape.
4564         #
4565         #  @ref tui_suppress_holes "Example"
4566         def SuppressHoles(self,theObject, theWires):
4567             """
4568             Remove internal closed contours (holes) from the given object.
4569
4570             Parameters:
4571                 theObject Shape to be processed.
4572                 theWires Indices of wires to be removed, if EMPTY then the method
4573                          removes ALL internal holes of the given object
4574
4575             Returns:    
4576                 New GEOM.GEOM_Object, containing processed shape.
4577             """
4578             # Example: see GEOM_TestHealing.py
4579             anObj = self.HealOp.FillHoles(theObject, theWires)
4580             RaiseIfFailed("FillHoles", self.HealOp)
4581             return anObj
4582
4583         ## Close an open wire.
4584         #  @param theObject Shape to be processed.
4585         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
4586         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
4587         #  @param isCommonVertex If True  : closure by creation of a common vertex,
4588         #                        If False : closure by creation of an edge between ends.
4589         #  @return New GEOM.GEOM_Object, containing processed shape.
4590         #
4591         #  @ref tui_close_contour "Example"
4592         def CloseContour(self,theObject, theWires, isCommonVertex):
4593             """
4594             Close an open wire.
4595
4596             Parameters: 
4597                 theObject Shape to be processed.
4598                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
4599                          if [ ], then theObject itself is a wire.
4600                 isCommonVertex If True  : closure by creation of a common vertex,
4601                                If False : closure by creation of an edge between ends.
4602
4603             Returns:                      
4604                 New GEOM.GEOM_Object, containing processed shape. 
4605             """
4606             # Example: see GEOM_TestHealing.py
4607             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
4608             RaiseIfFailed("CloseContour", self.HealOp)
4609             return anObj
4610
4611         ## Addition of a point to a given edge object.
4612         #  @param theObject Shape to be processed.
4613         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
4614         #                      if -1, then theObject itself is the edge.
4615         #  @param theValue Value of parameter on edge or length parameter,
4616         #                  depending on \a isByParameter.
4617         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
4618         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
4619         #  @return New GEOM.GEOM_Object, containing processed shape.
4620         #
4621         #  @ref tui_add_point_on_edge "Example"
4622         def DivideEdge(self,theObject, theEdgeIndex, theValue, isByParameter):
4623             """
4624             Addition of a point to a given edge object.
4625
4626             Parameters: 
4627                 theObject Shape to be processed.
4628                 theEdgeIndex Index of edge to be divided within theObject's shape,
4629                              if -1, then theObject itself is the edge.
4630                 theValue Value of parameter on edge or length parameter,
4631                          depending on isByParameter.
4632                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
4633                               if FALSE : theValue is treated as a length parameter [0..1]
4634
4635             Returns:  
4636                 New GEOM.GEOM_Object, containing processed shape.
4637             """
4638             # Example: see GEOM_TestHealing.py
4639             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
4640             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
4641             RaiseIfFailed("DivideEdge", self.HealOp)
4642             anObj.SetParameters(Parameters)
4643             return anObj
4644
4645         ## Change orientation of the given object. Updates given shape.
4646         #  @param theObject Shape to be processed.
4647         #  @return Updated <var>theObject</var>
4648         #
4649         #  @ref swig_todo "Example"
4650         def ChangeOrientationShell(self,theObject):
4651             """
4652             Change orientation of the given object. Updates given shape.
4653
4654             Parameters: 
4655                 theObject Shape to be processed.
4656
4657             Returns:  
4658                 Updated theObject
4659             """
4660             theObject = self.HealOp.ChangeOrientation(theObject)
4661             RaiseIfFailed("ChangeOrientation", self.HealOp)
4662             pass
4663
4664         ## Change orientation of the given object.
4665         #  @param theObject Shape to be processed.
4666         #  @return New GEOM.GEOM_Object, containing processed shape.
4667         #
4668         #  @ref swig_todo "Example"
4669         def ChangeOrientationShellCopy(self, theObject):
4670             """
4671             Change orientation of the given object.
4672
4673             Parameters:
4674                 theObject Shape to be processed.
4675
4676             Returns:   
4677                 New GEOM.GEOM_Object, containing processed shape.
4678             """
4679             anObj = self.HealOp.ChangeOrientationCopy(theObject)
4680             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
4681             return anObj
4682
4683         ## Try to limit tolerance of the given object by value \a theTolerance.
4684         #  @param theObject Shape to be processed.
4685         #  @param theTolerance Required tolerance value.
4686         #  @return New GEOM.GEOM_Object, containing processed shape.
4687         #
4688         #  @ref tui_limit_tolerance "Example"
4689         def LimitTolerance(self, theObject, theTolerance = 1e-07):
4690             """
4691             Try to limit tolerance of the given object by value theTolerance.
4692
4693             Parameters:
4694                 theObject Shape to be processed.
4695                 theTolerance Required tolerance value.
4696
4697             Returns:   
4698                 New GEOM.GEOM_Object, containing processed shape.
4699             """
4700             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
4701             RaiseIfFailed("LimitTolerance", self.HealOp)
4702             return anObj
4703
4704         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
4705         #  that constitute a free boundary of the given shape.
4706         #  @param theObject Shape to get free boundary of.
4707         #  @return [\a status, \a theClosedWires, \a theOpenWires]
4708         #  \n \a status: FALSE, if an error(s) occured during the method execution.
4709         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
4710         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
4711         #
4712         #  @ref tui_measurement_tools_page "Example"
4713         def GetFreeBoundary(self, theObject):
4714             """
4715             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
4716             that constitute a free boundary of the given shape.
4717
4718             Parameters:
4719                 theObject Shape to get free boundary of.
4720
4721             Returns: 
4722                 [status, theClosedWires, theOpenWires]
4723                  status: FALSE, if an error(s) occured during the method execution.
4724                  theClosedWires: Closed wires on the free boundary of the given shape.
4725                  theOpenWires: Open wires on the free boundary of the given shape.
4726             """
4727             # Example: see GEOM_TestHealing.py
4728             anObj = self.HealOp.GetFreeBoundary(theObject)
4729             RaiseIfFailed("GetFreeBoundary", self.HealOp)
4730             return anObj
4731
4732         ## Replace coincident faces in theShape by one face.
4733         #  @param theShape Initial shape.
4734         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
4735         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
4736         #                         otherwise all initial shapes.
4737         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
4738         #
4739         #  @ref tui_glue_faces "Example"
4740         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True):
4741             """
4742             Replace coincident faces in theShape by one face.
4743
4744             Parameters:
4745                 theShape Initial shape.
4746                 theTolerance Maximum distance between faces, which can be considered as coincident.
4747                 doKeepNonSolids If FALSE, only solids will present in the result,
4748                                 otherwise all initial shapes.
4749
4750             Returns:
4751                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
4752             """
4753             # Example: see GEOM_Spanner.py
4754             theTolerance,Parameters = ParseParameters(theTolerance)
4755             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
4756             if anObj is None:
4757                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
4758             anObj.SetParameters(Parameters)
4759             return anObj
4760
4761         ## Find coincident faces in theShape for possible gluing.
4762         #  @param theShape Initial shape.
4763         #  @param theTolerance Maximum distance between faces,
4764         #                      which can be considered as coincident.
4765         #  @return GEOM.ListOfGO
4766         #
4767         #  @ref tui_glue_faces "Example"
4768         def GetGlueFaces(self, theShape, theTolerance):
4769             """
4770             Find coincident faces in theShape for possible gluing.
4771
4772             Parameters:
4773                 theShape Initial shape.
4774                 theTolerance Maximum distance between faces,
4775                              which can be considered as coincident.
4776
4777             Returns:                    
4778                 GEOM.ListOfGO
4779             """
4780             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
4781             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
4782             return anObj
4783
4784         ## Replace coincident faces in theShape by one face
4785         #  in compliance with given list of faces
4786         #  @param theShape Initial shape.
4787         #  @param theTolerance Maximum distance between faces,
4788         #                      which can be considered as coincident.
4789         #  @param theFaces List of faces for gluing.
4790         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
4791         #                         otherwise all initial shapes.
4792         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
4793         #                        will be glued, otherwise only the edges,
4794         #                        belonging to <VAR>theFaces</VAR>.
4795         #  @return New GEOM.GEOM_Object, containing a copy of theShape
4796         #          without some faces.
4797         #
4798         #  @ref tui_glue_faces "Example"
4799         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
4800                                 doKeepNonSolids=True, doGlueAllEdges=True):
4801             """
4802             Replace coincident faces in theShape by one face
4803             in compliance with given list of faces
4804
4805             Parameters:
4806                 theShape Initial shape.
4807                 theTolerance Maximum distance between faces,
4808                              which can be considered as coincident.
4809                 theFaces List of faces for gluing.
4810                 doKeepNonSolids If FALSE, only solids will present in the result,
4811                                 otherwise all initial shapes.
4812                 doGlueAllEdges If TRUE, all coincident edges of theShape
4813                                will be glued, otherwise only the edges,
4814                                belonging to theFaces.
4815
4816             Returns:
4817                 New GEOM.GEOM_Object, containing a copy of theShape
4818                     without some faces.
4819             """
4820             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
4821                                                       doKeepNonSolids, doGlueAllEdges)
4822             if anObj is None:
4823                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
4824             return anObj
4825
4826         ## Replace coincident edges in theShape by one edge.
4827         #  @param theShape Initial shape.
4828         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
4829         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
4830         #
4831         #  @ref tui_glue_edges "Example"
4832         def MakeGlueEdges(self, theShape, theTolerance):
4833             """
4834             Replace coincident edges in theShape by one edge.
4835
4836             Parameters:
4837                 theShape Initial shape.
4838                 theTolerance Maximum distance between edges, which can be considered as coincident.
4839
4840             Returns:    
4841                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
4842             """
4843             theTolerance,Parameters = ParseParameters(theTolerance)
4844             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
4845             if anObj is None:
4846                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
4847             anObj.SetParameters(Parameters)
4848             return anObj
4849
4850         ## Find coincident edges in theShape for possible gluing.
4851         #  @param theShape Initial shape.
4852         #  @param theTolerance Maximum distance between edges,
4853         #                      which can be considered as coincident.
4854         #  @return GEOM.ListOfGO
4855         #
4856         #  @ref tui_glue_edges "Example"
4857         def GetGlueEdges(self, theShape, theTolerance):
4858             """
4859             Find coincident edges in theShape for possible gluing.
4860
4861             Parameters:
4862                 theShape Initial shape.
4863                 theTolerance Maximum distance between edges,
4864                              which can be considered as coincident.
4865
4866             Returns:                         
4867                 GEOM.ListOfGO
4868             """
4869             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
4870             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
4871             return anObj
4872
4873         ## Replace coincident edges in theShape by one edge
4874         #  in compliance with given list of edges.
4875         #  @param theShape Initial shape.
4876         #  @param theTolerance Maximum distance between edges,
4877         #                      which can be considered as coincident.
4878         #  @param theEdges List of edges for gluing.
4879         #  @return New GEOM.GEOM_Object, containing a copy of theShape
4880         #          without some edges.
4881         #
4882         #  @ref tui_glue_edges "Example"
4883         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges):
4884             """
4885             Replace coincident edges in theShape by one edge
4886             in compliance with given list of edges.
4887
4888             Parameters:
4889                 theShape Initial shape.
4890                 theTolerance Maximum distance between edges,
4891                              which can be considered as coincident.
4892                 theEdges List of edges for gluing.
4893
4894             Returns:  
4895                 New GEOM.GEOM_Object, containing a copy of theShape
4896                 without some edges.
4897             """
4898             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
4899             if anObj is None:
4900                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
4901             return anObj
4902
4903         # end of l3_healing
4904         ## @}
4905
4906         ## @addtogroup l3_boolean Boolean Operations
4907         ## @{
4908
4909         # -----------------------------------------------------------------------------
4910         # Boolean (Common, Cut, Fuse, Section)
4911         # -----------------------------------------------------------------------------
4912
4913         ## Perform one of boolean operations on two given shapes.
4914         #  @param theShape1 First argument for boolean operation.
4915         #  @param theShape2 Second argument for boolean operation.
4916         #  @param theOperation Indicates the operation to be done:\n
4917         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
4918         #  @return New GEOM.GEOM_Object, containing the result shape.
4919         #
4920         #  @ref tui_fuse "Example"
4921         def MakeBoolean(self,theShape1, theShape2, theOperation):
4922             """
4923             Perform one of boolean operations on two given shapes.
4924
4925             Parameters: 
4926                 theShape1 First argument for boolean operation.
4927                 theShape2 Second argument for boolean operation.
4928                 theOperation Indicates the operation to be done:
4929                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
4930
4931             Returns:   
4932                 New GEOM.GEOM_Object, containing the result shape.
4933             """
4934             # Example: see GEOM_TestAll.py
4935             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
4936             RaiseIfFailed("MakeBoolean", self.BoolOp)
4937             return anObj
4938
4939         ## Perform Common boolean operation on two given shapes.
4940         #  @param theShape1 First argument for boolean operation.
4941         #  @param theShape2 Second argument for boolean operation.
4942         #  @return New GEOM.GEOM_Object, containing the result shape.
4943         #
4944         #  @ref tui_common "Example 1"
4945         #  \n @ref swig_MakeCommon "Example 2"
4946         def MakeCommon(self, theShape1, theShape2):
4947             """
4948             Perform Common boolean operation on two given shapes.
4949
4950             Parameters: 
4951                 theShape1 First argument for boolean operation.
4952                 theShape2 Second argument for boolean operation.
4953  
4954             Returns:   
4955                 New GEOM.GEOM_Object, containing the result shape.
4956             """
4957             # Example: see GEOM_TestOthers.py
4958             return self.MakeBoolean(theShape1, theShape2, 1)
4959
4960         ## Perform Cut boolean operation on two given shapes.
4961         #  @param theShape1 First argument for boolean operation.
4962         #  @param theShape2 Second argument for boolean operation.
4963         #  @return New GEOM.GEOM_Object, containing the result shape.
4964         #
4965         #  @ref tui_cut "Example 1"
4966         #  \n @ref swig_MakeCommon "Example 2"
4967         def MakeCut(self, theShape1, theShape2):
4968             """
4969             Perform Cut boolean operation on two given shapes.
4970
4971             Parameters: 
4972                 theShape1 First argument for boolean operation.
4973                 theShape2 Second argument for boolean operation.
4974  
4975             Returns:   
4976                 New GEOM.GEOM_Object, containing the result shape.
4977             
4978             """
4979             # Example: see GEOM_TestOthers.py
4980             return self.MakeBoolean(theShape1, theShape2, 2)
4981
4982         ## Perform Fuse boolean operation on two given shapes.
4983         #  @param theShape1 First argument for boolean operation.
4984         #  @param theShape2 Second argument for boolean operation.
4985         #  @return New GEOM.GEOM_Object, containing the result shape.
4986         #
4987         #  @ref tui_fuse "Example 1"
4988         #  \n @ref swig_MakeCommon "Example 2"
4989         def MakeFuse(self, theShape1, theShape2):
4990             """
4991             Perform Fuse boolean operation on two given shapes.
4992
4993             Parameters: 
4994                 theShape1 First argument for boolean operation.
4995                 theShape2 Second argument for boolean operation.
4996  
4997             Returns:   
4998                 New GEOM.GEOM_Object, containing the result shape.
4999             
5000             """
5001             # Example: see GEOM_TestOthers.py
5002             return self.MakeBoolean(theShape1, theShape2, 3)
5003
5004         ## Perform Section boolean operation on two given shapes.
5005         #  @param theShape1 First argument for boolean operation.
5006         #  @param theShape2 Second argument for boolean operation.
5007         #  @return New GEOM.GEOM_Object, containing the result shape.
5008         #
5009         #  @ref tui_section "Example 1"
5010         #  \n @ref swig_MakeCommon "Example 2"
5011         def MakeSection(self, theShape1, theShape2):
5012             """
5013             Perform Section boolean operation on two given shapes.
5014
5015             Parameters: 
5016                 theShape1 First argument for boolean operation.
5017                 theShape2 Second argument for boolean operation.
5018  
5019             Returns:   
5020                 New GEOM.GEOM_Object, containing the result shape.
5021             
5022             """
5023             # Example: see GEOM_TestOthers.py
5024             return self.MakeBoolean(theShape1, theShape2, 4)
5025
5026         # end of l3_boolean
5027         ## @}
5028
5029         ## @addtogroup l3_basic_op
5030         ## @{
5031
5032         ## Perform partition operation.
5033         #  @param ListShapes Shapes to be intersected.
5034         #  @param ListTools Shapes to intersect theShapes.
5035         #  @param Limit Type of resulting shapes (see ShapeType()).\n
5036         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
5037         #         type will be detected automatically.
5038         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
5039         #                             target type (equal to Limit) are kept in the result,
5040         #                             else standalone shapes of lower dimension
5041         #                             are kept also (if they exist).
5042         #  @note Each compound from ListShapes and ListTools will be exploded
5043         #        in order to avoid possible intersection between shapes from this compound.
5044         #
5045         #  After implementation new version of PartitionAlgo (October 2006)
5046         #  other parameters are ignored by current functionality. They are kept
5047         #  in this function only for support old versions.
5048         #      @param ListKeepInside Shapes, outside which the results will be deleted.
5049         #         Each shape from theKeepInside must belong to theShapes also.
5050         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
5051         #         Each shape from theRemoveInside must belong to theShapes also.
5052         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
5053         #      @param ListMaterials Material indices for each shape. Make sence,
5054         #         only if theRemoveWebs is TRUE.
5055         #
5056         #  @return New GEOM.GEOM_Object, containing the result shapes.
5057         #
5058         #  @ref tui_partition "Example"
5059         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
5060                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
5061                           KeepNonlimitShapes=0):
5062             """
5063             Perform partition operation.
5064
5065             Parameters: 
5066                 ListShapes Shapes to be intersected.
5067                 ListTools Shapes to intersect theShapes.
5068                 Limit Type of resulting shapes (see geompy.ShapeType)
5069                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
5070                       type will be detected automatically.
5071                 KeepNonlimitShapes if this parameter == 0, then only shapes of
5072                                     target type (equal to Limit) are kept in the result,
5073                                     else standalone shapes of lower dimension
5074                                     are kept also (if they exist).
5075             Note:
5076                     Each compound from ListShapes and ListTools will be exploded
5077                     in order to avoid possible intersection between shapes from
5078                     this compound.
5079                     
5080             After implementation new version of PartitionAlgo (October 2006) other
5081             parameters are ignored by current functionality. They are kept in this
5082             function only for support old versions.
5083             
5084             Ignored parameters:
5085                 ListKeepInside Shapes, outside which the results will be deleted.
5086                                Each shape from theKeepInside must belong to theShapes also.
5087                 ListRemoveInside Shapes, inside which the results will be deleted.
5088                                  Each shape from theRemoveInside must belong to theShapes also.
5089                 RemoveWebs If TRUE, perform Glue 3D algorithm.
5090                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
5091
5092             Returns:   
5093                 New GEOM.GEOM_Object, containing the result shapes.
5094             """
5095             # Example: see GEOM_TestAll.py
5096             if Limit == ShapeType["AUTO"]:
5097                 # automatic detection of the most appropriate shape limit type
5098                 lim = GEOM.SHAPE
5099                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
5100                 Limit = EnumToLong(lim)
5101                 pass
5102             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
5103                                               ListKeepInside, ListRemoveInside,
5104                                               Limit, RemoveWebs, ListMaterials,
5105                                               KeepNonlimitShapes);
5106             RaiseIfFailed("MakePartition", self.BoolOp)
5107             return anObj
5108
5109         ## Perform partition operation.
5110         #  This method may be useful if it is needed to make a partition for
5111         #  compound contains nonintersected shapes. Performance will be better
5112         #  since intersection between shapes from compound is not performed.
5113         #
5114         #  Description of all parameters as in previous method MakePartition()
5115         #
5116         #  @note Passed compounds (via ListShapes or via ListTools)
5117         #           have to consist of nonintersecting shapes.
5118         #
5119         #  @return New GEOM.GEOM_Object, containing the result shapes.
5120         #
5121         #  @ref swig_todo "Example"
5122         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
5123                                                  ListKeepInside=[], ListRemoveInside=[],
5124                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
5125                                                  ListMaterials=[], KeepNonlimitShapes=0):
5126             """
5127             Perform partition operation.
5128             This method may be useful if it is needed to make a partition for
5129             compound contains nonintersected shapes. Performance will be better
5130             since intersection between shapes from compound is not performed.
5131
5132             Parameters: 
5133                 Description of all parameters as in method geompy.MakePartition
5134         
5135             NOTE:
5136                 Passed compounds (via ListShapes or via ListTools)
5137                 have to consist of nonintersecting shapes.
5138
5139             Returns:   
5140                 New GEOM.GEOM_Object, containing the result shapes.
5141             """
5142             if Limit == ShapeType["AUTO"]:
5143                 # automatic detection of the most appropriate shape limit type
5144                 lim = GEOM.SHAPE
5145                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
5146                 Limit = EnumToLong(lim)
5147                 pass
5148             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
5149                                                                      ListKeepInside, ListRemoveInside,
5150                                                                      Limit, RemoveWebs, ListMaterials,
5151                                                                      KeepNonlimitShapes);
5152             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
5153             return anObj
5154
5155         ## See method MakePartition() for more information.
5156         #
5157         #  @ref tui_partition "Example 1"
5158         #  \n @ref swig_Partition "Example 2"
5159         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
5160                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
5161                       KeepNonlimitShapes=0):
5162             """
5163             See method geompy.MakePartition for more information.
5164             """
5165             # Example: see GEOM_TestOthers.py
5166             anObj = self.MakePartition(ListShapes, ListTools,
5167                                        ListKeepInside, ListRemoveInside,
5168                                        Limit, RemoveWebs, ListMaterials,
5169                                        KeepNonlimitShapes);
5170             return anObj
5171
5172         ## Perform partition of the Shape with the Plane
5173         #  @param theShape Shape to be intersected.
5174         #  @param thePlane Tool shape, to intersect theShape.
5175         #  @return New GEOM.GEOM_Object, containing the result shape.
5176         #
5177         #  @ref tui_partition "Example"
5178         def MakeHalfPartition(self,theShape, thePlane):
5179             """
5180             Perform partition of the Shape with the Plane
5181
5182             Parameters: 
5183                 theShape Shape to be intersected.
5184                 thePlane Tool shape, to intersect theShape.
5185
5186             Returns:  
5187                 New GEOM.GEOM_Object, containing the result shape.
5188             """
5189             # Example: see GEOM_TestAll.py
5190             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
5191             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
5192             return anObj
5193
5194         # end of l3_basic_op
5195         ## @}
5196
5197         ## @addtogroup l3_transform
5198         ## @{
5199
5200         ## Translate the given object along the vector, specified
5201         #  by its end points, creating its copy before the translation.
5202         #  @param theObject The object to be translated.
5203         #  @param thePoint1 Start point of translation vector.
5204         #  @param thePoint2 End point of translation vector.
5205         #  @return New GEOM.GEOM_Object, containing the translated object.
5206         #
5207         #  @ref tui_translation "Example 1"
5208         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
5209         def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2):
5210             """
5211             Translate the given object along the vector, specified
5212             by its end points, creating its copy before the translation.
5213
5214             Parameters: 
5215                 theObject The object to be translated.
5216                 thePoint1 Start point of translation vector.
5217                 thePoint2 End point of translation vector.
5218
5219             Returns:  
5220                 New GEOM.GEOM_Object, containing the translated object.
5221             """
5222             # Example: see GEOM_TestAll.py
5223             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
5224             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
5225             return anObj
5226
5227         ## Translate the given object along the vector, specified by its components.
5228         #  @param theObject The object to be translated.
5229         #  @param theDX,theDY,theDZ Components of translation vector.
5230         #  @return Translated GEOM.GEOM_Object.
5231         #
5232         #  @ref tui_translation "Example"
5233         def TranslateDXDYDZ(self,theObject, theDX, theDY, theDZ):
5234             """
5235             Translate the given object along the vector, specified by its components.
5236
5237             Parameters: 
5238                 theObject The object to be translated.
5239                 theDX,theDY,theDZ Components of translation vector.
5240
5241             Returns: 
5242                 Translated GEOM.GEOM_Object.
5243             """
5244             # Example: see GEOM_TestAll.py
5245             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
5246             anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
5247             anObj.SetParameters(Parameters)
5248             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
5249             return anObj
5250
5251         ## Translate the given object along the vector, specified
5252         #  by its components, creating its copy before the translation.
5253         #  @param theObject The object to be translated.
5254         #  @param theDX,theDY,theDZ Components of translation vector.
5255         #  @return New GEOM.GEOM_Object, containing the translated object.
5256         #
5257         #  @ref tui_translation "Example"
5258         def MakeTranslation(self,theObject, theDX, theDY, theDZ):
5259             """
5260             Translate the given object along the vector, specified
5261             by its components, creating its copy before the translation.
5262
5263             Parameters: 
5264                 theObject The object to be translated.
5265                 theDX,theDY,theDZ Components of translation vector.
5266
5267             Returns: 
5268                 New GEOM.GEOM_Object, containing the translated object.
5269             """
5270             # Example: see GEOM_TestAll.py
5271             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
5272             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
5273             anObj.SetParameters(Parameters)
5274             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
5275             return anObj
5276
5277         ## Translate the given object along the given vector,
5278         #  creating its copy before the translation.
5279         #  @param theObject The object to be translated.
5280         #  @param theVector The translation vector.
5281         #  @return New GEOM.GEOM_Object, containing the translated object.
5282         #
5283         #  @ref tui_translation "Example"
5284         def MakeTranslationVector(self,theObject, theVector):
5285             """
5286             Translate the given object along the given vector,
5287             creating its copy before the translation.
5288
5289             Parameters: 
5290                 theObject The object to be translated.
5291                 theVector The translation vector.
5292
5293             Returns: 
5294                 New GEOM.GEOM_Object, containing the translated object.
5295             """
5296             # Example: see GEOM_TestAll.py
5297             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
5298             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
5299             return anObj
5300
5301         ## Translate the given object along the given vector on given distance.
5302         #  @param theObject The object to be translated.
5303         #  @param theVector The translation vector.
5304         #  @param theDistance The translation distance.
5305         #  @param theCopy Flag used to translate object itself or create a copy.
5306         #  @return New GEOM.GEOM_Object, containing the translated object.
5307         #
5308         #  @ref tui_translation "Example"
5309         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy):
5310             """
5311             Translate the given object along the given vector on given distance.
5312
5313             Parameters: 
5314                 theObject The object to be translated.
5315                 theVector The translation vector.
5316                 theDistance The translation distance.
5317                 theCopy Flag used to translate object itself or create a copy.
5318
5319             Returns: 
5320                 New GEOM.GEOM_Object, containing the translated object.
5321             """
5322             # Example: see GEOM_TestAll.py
5323             theDistance,Parameters = ParseParameters(theDistance)
5324             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
5325             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
5326             anObj.SetParameters(Parameters)
5327             return anObj
5328
5329         ## Translate the given object along the given vector on given distance,
5330         #  creating its copy before the translation.
5331         #  @param theObject The object to be translated.
5332         #  @param theVector The translation vector.
5333         #  @param theDistance The translation distance.
5334         #  @return New GEOM.GEOM_Object, containing the translated object.
5335         #
5336         #  @ref tui_translation "Example"
5337         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance):
5338             """
5339             Translate the given object along the given vector on given distance,
5340             creating its copy before the translation.
5341
5342             Parameters:
5343                 theObject The object to be translated.
5344                 theVector The translation vector.
5345                 theDistance The translation distance.
5346
5347             Returns: 
5348                 New GEOM.GEOM_Object, containing the translated object.
5349             """
5350             # Example: see GEOM_TestAll.py
5351             theDistance,Parameters = ParseParameters(theDistance)
5352             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
5353             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
5354             anObj.SetParameters(Parameters)
5355             return anObj
5356
5357         ## Rotate the given object around the given axis on the given angle.
5358         #  @param theObject The object to be rotated.
5359         #  @param theAxis Rotation axis.
5360         #  @param theAngle Rotation angle in radians.
5361         #  @return New GEOM.GEOM_Object, containing the rotated object.
5362         #
5363         #  @ref tui_rotation "Example"
5364         def Rotate(self,theObject, theAxis, theAngle):
5365             """
5366             Rotate the given object around the given axis on the given angle.
5367
5368             Parameters:
5369                 theObject The object to be rotated.
5370                 theAxis Rotation axis.
5371                 theAngle Rotation angle in radians.
5372
5373             Returns: 
5374                 New GEOM.GEOM_Object, containing the rotated object.
5375             """
5376             # Example: see GEOM_TestAll.py
5377             flag = False
5378             if isinstance(theAngle,str):
5379                 flag = True
5380             theAngle, Parameters = ParseParameters(theAngle)
5381             if flag:
5382                 theAngle = theAngle*math.pi/180.0
5383             anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
5384             RaiseIfFailed("RotateCopy", self.TrsfOp)
5385             anObj.SetParameters(Parameters)
5386             return anObj
5387
5388         ## Rotate the given object around the given axis
5389         #  on the given angle, creating its copy before the rotatation.
5390         #  @param theObject The object to be rotated.
5391         #  @param theAxis Rotation axis.
5392         #  @param theAngle Rotation angle in radians.
5393         #  @return New GEOM.GEOM_Object, containing the rotated object.
5394         #
5395         #  @ref tui_rotation "Example"
5396         def MakeRotation(self,theObject, theAxis, theAngle):
5397             """
5398             Rotate the given object around the given axis
5399             on the given angle, creating its copy before the rotatation.
5400
5401             Parameters:
5402                 theObject The object to be rotated.
5403                 theAxis Rotation axis.
5404                 theAngle Rotation angle in radians.
5405
5406             Returns:
5407                 New GEOM.GEOM_Object, containing the rotated object.
5408             """
5409             # Example: see GEOM_TestAll.py
5410             flag = False
5411             if isinstance(theAngle,str):
5412                 flag = True
5413             theAngle, Parameters = ParseParameters(theAngle)
5414             if flag:
5415                 theAngle = theAngle*math.pi/180.0
5416             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
5417             RaiseIfFailed("RotateCopy", self.TrsfOp)
5418             anObj.SetParameters(Parameters)
5419             return anObj
5420
5421         ## Rotate given object around vector perpendicular to plane
5422         #  containing three points, creating its copy before the rotatation.
5423         #  @param theObject The object to be rotated.
5424         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
5425         #  containing the three points.
5426         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
5427         #  @return New GEOM.GEOM_Object, containing the rotated object.
5428         #
5429         #  @ref tui_rotation "Example"
5430         def MakeRotationThreePoints(self,theObject, theCentPoint, thePoint1, thePoint2):
5431             """
5432             Rotate given object around vector perpendicular to plane
5433             containing three points, creating its copy before the rotatation.
5434
5435             Parameters:
5436                 theObject The object to be rotated.
5437                 theCentPoint central point  the axis is the vector perpendicular to the plane
5438                              containing the three points.
5439                 thePoint1,thePoint2  in a perpendicular plane of the axis.
5440
5441             Returns:
5442                 New GEOM.GEOM_Object, containing the rotated object.
5443             """
5444             # Example: see GEOM_TestAll.py
5445             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
5446             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
5447             return anObj
5448
5449         ## Scale the given object by the factor, creating its copy before the scaling.
5450         #  @param theObject The object to be scaled.
5451         #  @param thePoint Center point for scaling.
5452         #                  Passing None for it means scaling relatively the origin of global CS.
5453         #  @param theFactor Scaling factor value.
5454         #  @return New GEOM.GEOM_Object, containing the scaled shape.
5455         #
5456         #  @ref tui_scale "Example"
5457         def MakeScaleTransform(self, theObject, thePoint, theFactor):
5458             """
5459             Scale the given object by the factor, creating its copy before the scaling.
5460
5461             Parameters:
5462                 theObject The object to be scaled.
5463                 thePoint Center point for scaling.
5464                          Passing None for it means scaling relatively the origin of global CS.
5465                 theFactor Scaling factor value.
5466
5467             Returns:    
5468                 New GEOM.GEOM_Object, containing the scaled shape.
5469             """
5470             # Example: see GEOM_TestAll.py
5471             theFactor, Parameters = ParseParameters(theFactor)
5472             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
5473             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
5474             anObj.SetParameters(Parameters)
5475             return anObj
5476
5477         ## Scale the given object by different factors along coordinate axes,
5478         #  creating its copy before the scaling.
5479         #  @param theObject The object to be scaled.
5480         #  @param thePoint Center point for scaling.
5481         #                  Passing None for it means scaling relatively the origin of global CS.
5482         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
5483         #  @return New GEOM.GEOM_Object, containing the scaled shape.
5484         #
5485         #  @ref swig_scale "Example"
5486         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ):
5487             """
5488             Scale the given object by different factors along coordinate axes,
5489             creating its copy before the scaling.
5490
5491             Parameters:
5492                 theObject The object to be scaled.
5493                 thePoint Center point for scaling.
5494                             Passing None for it means scaling relatively the origin of global CS.
5495                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
5496
5497             Returns:
5498                 New GEOM.GEOM_Object, containing the scaled shape.
5499             """
5500             # Example: see GEOM_TestAll.py
5501             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
5502             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
5503                                                         theFactorX, theFactorY, theFactorZ)
5504             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
5505             anObj.SetParameters(Parameters)
5506             return anObj
5507
5508         ## Create an object, symmetrical
5509         #  to the given one relatively the given plane.
5510         #  @param theObject The object to be mirrored.
5511         #  @param thePlane Plane of symmetry.
5512         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5513         #
5514         #  @ref tui_mirror "Example"
5515         def MakeMirrorByPlane(self,theObject, thePlane):
5516             """
5517             Create an object, symmetrical to the given one relatively the given plane.
5518
5519             Parameters:
5520                 theObject The object to be mirrored.
5521                 thePlane Plane of symmetry.
5522
5523             Returns:
5524                 New GEOM.GEOM_Object, containing the mirrored shape.
5525             """
5526             # Example: see GEOM_TestAll.py
5527             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
5528             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
5529             return anObj
5530
5531         ## Create an object, symmetrical
5532         #  to the given one relatively the given axis.
5533         #  @param theObject The object to be mirrored.
5534         #  @param theAxis Axis of symmetry.
5535         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5536         #
5537         #  @ref tui_mirror "Example"
5538         def MakeMirrorByAxis(self,theObject, theAxis):
5539             """
5540             Create an object, symmetrical to the given one relatively the given axis.
5541
5542             Parameters:
5543                 theObject The object to be mirrored.
5544                 theAxis Axis of symmetry.
5545
5546             Returns: 
5547                 New GEOM.GEOM_Object, containing the mirrored shape.
5548             """
5549             # Example: see GEOM_TestAll.py
5550             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
5551             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
5552             return anObj
5553
5554         ## Create an object, symmetrical
5555         #  to the given one relatively the given point.
5556         #  @param theObject The object to be mirrored.
5557         #  @param thePoint Point of symmetry.
5558         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
5559         #
5560         #  @ref tui_mirror "Example"
5561         def MakeMirrorByPoint(self,theObject, thePoint):
5562             """
5563             Create an object, symmetrical
5564             to the given one relatively the given point.
5565
5566             Parameters:
5567                 theObject The object to be mirrored.
5568                 thePoint Point of symmetry.
5569
5570             Returns:  
5571                 New GEOM.GEOM_Object, containing the mirrored shape.
5572             """
5573             # Example: see GEOM_TestAll.py
5574             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
5575             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
5576             return anObj
5577
5578         ## Modify the Location of the given object by LCS,
5579         #  creating its copy before the setting.
5580         #  @param theObject The object to be displaced.
5581         #  @param theStartLCS Coordinate system to perform displacement from it.\n
5582         #                     If \a theStartLCS is NULL, displacement
5583         #                     will be performed from global CS.\n
5584         #                     If \a theObject itself is used as \a theStartLCS,
5585         #                     its location will be changed to \a theEndLCS.
5586         #  @param theEndLCS Coordinate system to perform displacement to it.
5587         #  @return New GEOM.GEOM_Object, containing the displaced shape.
5588         #
5589         #  @ref tui_modify_location "Example"
5590         def MakePosition(self,theObject, theStartLCS, theEndLCS):
5591             """
5592             Modify the Location of the given object by LCS, creating its copy before the setting.
5593
5594             Parameters:
5595                 theObject The object to be displaced.
5596                 theStartLCS Coordinate system to perform displacement from it.
5597                             If theStartLCS is NULL, displacement
5598                             will be performed from global CS.
5599                             If theObject itself is used as theStartLCS,
5600                             its location will be changed to theEndLCS.
5601                 theEndLCS Coordinate system to perform displacement to it.
5602
5603             Returns:  
5604                 New GEOM.GEOM_Object, containing the displaced shape.
5605
5606             Example of usage:
5607                 # create local coordinate systems
5608                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
5609                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
5610                 # modify the location of the given object
5611                 position = geompy.MakePosition(cylinder, cs1, cs2)
5612             """
5613             # Example: see GEOM_TestAll.py
5614             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
5615             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
5616             return anObj
5617
5618         ## Modify the Location of the given object by Path,
5619         #  @param  theObject The object to be displaced.
5620         #  @param  thePath Wire or Edge along that the object will be translated.
5621         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
5622         #  @param  theCopy is to create a copy objects if true.
5623         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
5624         #  @return New GEOM.GEOM_Object, containing the displaced shape.
5625         #
5626         #  @ref tui_modify_location "Example"
5627         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
5628             """
5629             Modify the Location of the given object by Path
5630
5631             Parameters:
5632                  theObject The object to be displaced.
5633                  thePath Wire or Edge along that the object will be translated.
5634                  theDistance progress of Path (0 = start location, 1 = end of path location).
5635                  theCopy is to create a copy objects if true.
5636                  theReverse  0 - for usual direction, 1 - to reverse path direction.
5637
5638             Returns:  
5639                 New GEOM.GEOM_Object, containing the displaced shape.
5640
5641             Example of usage:
5642                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
5643             """
5644             # Example: see GEOM_TestAll.py
5645             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
5646             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
5647             return anObj
5648
5649         ## Create new object as offset of the given one.
5650         #  @param theObject The base object for the offset.
5651         #  @param theOffset Offset value.
5652         #  @return New GEOM.GEOM_Object, containing the offset object.
5653         #
5654         #  @ref tui_offset "Example"
5655         def MakeOffset(self,theObject, theOffset):
5656             """
5657             Create new object as offset of the given one.
5658
5659             Parameters:
5660                 theObject The base object for the offset.
5661                 theOffset Offset value.
5662
5663             Returns:  
5664                 New GEOM.GEOM_Object, containing the offset object.
5665
5666             Example of usage:
5667                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
5668                  # create a new object as offset of the given object
5669                  offset = geompy.MakeOffset(box, 70.)
5670             """
5671             # Example: see GEOM_TestAll.py
5672             theOffset, Parameters = ParseParameters(theOffset)
5673             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
5674             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
5675             anObj.SetParameters(Parameters)
5676             return anObj
5677
5678         ## Create new object as projection of the given one on a 2D surface.
5679         #  @param theSource The source object for the projection. It can be a point, edge or wire.
5680         #  @param theTarget The target object. It can be planar or cylindrical face.
5681         #  @return New GEOM.GEOM_Object, containing the projection.
5682         #
5683         #  @ref tui_projection "Example"
5684         def MakeProjection(self, theSource, theTarget):
5685             """
5686             Create new object as projection of the given one on a 2D surface.
5687
5688             Parameters:
5689                 theSource The source object for the projection. It can be a point, edge or wire.
5690                 theTarget The target object. It can be planar or cylindrical face.
5691
5692             Returns:  
5693                 New GEOM.GEOM_Object, containing the projection.
5694             """
5695             # Example: see GEOM_TestAll.py
5696             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
5697             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
5698             return anObj
5699
5700         # -----------------------------------------------------------------------------
5701         # Patterns
5702         # -----------------------------------------------------------------------------
5703
5704         ## Translate the given object along the given vector a given number times
5705         #  @param theObject The object to be translated.
5706         #  @param theVector Direction of the translation.
5707         #  @param theStep Distance to translate on.
5708         #  @param theNbTimes Quantity of translations to be done.
5709         #  @return New GEOM.GEOM_Object, containing compound of all
5710         #          the shapes, obtained after each translation.
5711         #
5712         #  @ref tui_multi_translation "Example"
5713         def MakeMultiTranslation1D(self,theObject, theVector, theStep, theNbTimes):
5714             """
5715             Translate the given object along the given vector a given number times
5716
5717             Parameters:
5718                 theObject The object to be translated.
5719                 theVector Direction of the translation.
5720                 theStep Distance to translate on.
5721                 theNbTimes Quantity of translations to be done.
5722
5723             Returns:     
5724                 New GEOM.GEOM_Object, containing compound of all
5725                 the shapes, obtained after each translation.
5726
5727             Example of usage:
5728                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
5729             """
5730             # Example: see GEOM_TestAll.py
5731             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
5732             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
5733             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
5734             anObj.SetParameters(Parameters)
5735             return anObj
5736
5737         ## Conseqently apply two specified translations to theObject specified number of times.
5738         #  @param theObject The object to be translated.
5739         #  @param theVector1 Direction of the first translation.
5740         #  @param theStep1 Step of the first translation.
5741         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
5742         #  @param theVector2 Direction of the second translation.
5743         #  @param theStep2 Step of the second translation.
5744         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
5745         #  @return New GEOM.GEOM_Object, containing compound of all
5746         #          the shapes, obtained after each translation.
5747         #
5748         #  @ref tui_multi_translation "Example"
5749         def MakeMultiTranslation2D(self,theObject, theVector1, theStep1, theNbTimes1,
5750                                    theVector2, theStep2, theNbTimes2):
5751             """
5752             Conseqently apply two specified translations to theObject specified number of times.
5753
5754             Parameters:
5755                 theObject The object to be translated.
5756                 theVector1 Direction of the first translation.
5757                 theStep1 Step of the first translation.
5758                 theNbTimes1 Quantity of translations to be done along theVector1.
5759                 theVector2 Direction of the second translation.
5760                 theStep2 Step of the second translation.
5761                 theNbTimes2 Quantity of translations to be done along theVector2.
5762
5763             Returns:
5764                 New GEOM.GEOM_Object, containing compound of all
5765                 the shapes, obtained after each translation.
5766
5767             Example of usage:
5768                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
5769             """
5770             # Example: see GEOM_TestAll.py
5771             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
5772             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
5773                                                  theVector2, theStep2, theNbTimes2)
5774             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
5775             anObj.SetParameters(Parameters)
5776             return anObj
5777
5778         ## Rotate the given object around the given axis a given number times.
5779         #  Rotation angle will be 2*PI/theNbTimes.
5780         #  @param theObject The object to be rotated.
5781         #  @param theAxis The rotation axis.
5782         #  @param theNbTimes Quantity of rotations to be done.
5783         #  @return New GEOM.GEOM_Object, containing compound of all the
5784         #          shapes, obtained after each rotation.
5785         #
5786         #  @ref tui_multi_rotation "Example"
5787         def MultiRotate1D(self,theObject, theAxis, theNbTimes):
5788             """
5789             Rotate the given object around the given axis a given number times.
5790             Rotation angle will be 2*PI/theNbTimes.
5791
5792             Parameters:
5793                 theObject The object to be rotated.
5794                 theAxis The rotation axis.
5795                 theNbTimes Quantity of rotations to be done.
5796
5797             Returns:     
5798                 New GEOM.GEOM_Object, containing compound of all the
5799                 shapes, obtained after each rotation.
5800
5801             Example of usage:
5802                 rot1d = geompy.MultiRotate1D(prism, vect, 4)
5803             """
5804             # Example: see GEOM_TestAll.py
5805             theAxis, theNbTimes, Parameters = ParseParameters(theAxis, theNbTimes)
5806             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
5807             RaiseIfFailed("MultiRotate1D", self.TrsfOp)
5808             anObj.SetParameters(Parameters)
5809             return anObj
5810
5811         ## Rotate the given object around the
5812         #  given axis on the given angle a given number
5813         #  times and multi-translate each rotation result.
5814         #  Translation direction passes through center of gravity
5815         #  of rotated shape and its projection on the rotation axis.
5816         #  @param theObject The object to be rotated.
5817         #  @param theAxis Rotation axis.
5818         #  @param theAngle Rotation angle in graduces.
5819         #  @param theNbTimes1 Quantity of rotations to be done.
5820         #  @param theStep Translation distance.
5821         #  @param theNbTimes2 Quantity of translations to be done.
5822         #  @return New GEOM.GEOM_Object, containing compound of all the
5823         #          shapes, obtained after each transformation.
5824         #
5825         #  @ref tui_multi_rotation "Example"
5826         def MultiRotate2D(self,theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2):
5827             """
5828             Rotate the given object around the
5829             given axis on the given angle a given number
5830             times and multi-translate each rotation result.
5831             Translation direction passes through center of gravity
5832             of rotated shape and its projection on the rotation axis.
5833
5834             Parameters:
5835                 theObject The object to be rotated.
5836                 theAxis Rotation axis.
5837                 theAngle Rotation angle in graduces.
5838                 theNbTimes1 Quantity of rotations to be done.
5839                 theStep Translation distance.
5840                 theNbTimes2 Quantity of translations to be done.
5841
5842             Returns:    
5843                 New GEOM.GEOM_Object, containing compound of all the
5844                 shapes, obtained after each transformation.
5845
5846             Example of usage:
5847                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
5848             """
5849             # Example: see GEOM_TestAll.py
5850             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
5851             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
5852             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
5853             anObj.SetParameters(Parameters)
5854             return anObj
5855
5856         ## The same, as MultiRotate1D(), but axis is given by direction and point
5857         #
5858         #  @ref swig_MakeMultiRotation "Example"
5859         def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes):
5860             """
5861             The same, as geompy.MultiRotate1D, but axis is given by direction and point
5862
5863             Example of usage:
5864                 pz = geompy.MakeVertex(0, 0, 100)
5865                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
5866                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
5867             """
5868             # Example: see GEOM_TestOthers.py
5869             aVec = self.MakeLine(aPoint,aDir)
5870             anObj = self.MultiRotate1D(aShape,aVec,aNbTimes)
5871             return anObj
5872
5873         ## The same, as MultiRotate2D(), but axis is given by direction and point
5874         #
5875         #  @ref swig_MakeMultiRotation "Example"
5876         def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2):
5877             """
5878             The same, as MultiRotate2D(), but axis is given by direction and point
5879             
5880             Example of usage:
5881                 pz = geompy.MakeVertex(0, 0, 100)
5882                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
5883                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
5884             """
5885             # Example: see GEOM_TestOthers.py
5886             aVec = self.MakeLine(aPoint,aDir)
5887             anObj = self.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2)
5888             return anObj
5889
5890         # end of l3_transform
5891         ## @}
5892
5893         ## @addtogroup l3_local
5894         ## @{
5895
5896         ## Perform a fillet on all edges of the given shape.
5897         #  @param theShape Shape, to perform fillet on.
5898         #  @param theR Fillet radius.
5899         #  @return New GEOM.GEOM_Object, containing the result shape.
5900         #
5901         #  @ref tui_fillet "Example 1"
5902         #  \n @ref swig_MakeFilletAll "Example 2"
5903         def MakeFilletAll(self,theShape, theR):
5904             """
5905             Perform a fillet on all edges of the given shape.
5906
5907             Parameters:
5908                 theShape Shape, to perform fillet on.
5909                 theR Fillet radius.
5910
5911             Returns: 
5912                 New GEOM.GEOM_Object, containing the result shape.
5913
5914             Example of usage: 
5915                filletall = geompy.MakeFilletAll(prism, 10.) 
5916             """
5917             # Example: see GEOM_TestOthers.py
5918             theR,Parameters = ParseParameters(theR)
5919             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
5920             RaiseIfFailed("MakeFilletAll", self.LocalOp)
5921             anObj.SetParameters(Parameters)
5922             return anObj
5923
5924         ## Perform a fillet on the specified edges/faces of the given shape
5925         #  @param theShape Shape, to perform fillet on.
5926         #  @param theR Fillet radius.
5927         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
5928         #  @param theListShapes Global indices of edges/faces to perform fillet on.
5929         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
5930         #  @return New GEOM.GEOM_Object, containing the result shape.
5931         #
5932         #  @ref tui_fillet "Example"
5933         def MakeFillet(self,theShape, theR, theShapeType, theListShapes):
5934             """
5935             Perform a fillet on the specified edges/faces of the given shape
5936
5937             Parameters:
5938                 theShape Shape, to perform fillet on.
5939                 theR Fillet radius.
5940                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
5941                 theListShapes Global indices of edges/faces to perform fillet on.
5942
5943             Note:
5944                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
5945
5946             Returns: 
5947                 New GEOM.GEOM_Object, containing the result shape.
5948
5949             Example of usage:
5950                 # get the list of IDs (IDList) for the fillet
5951                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
5952                 IDlist_e = []
5953                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
5954                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
5955                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
5956                 # make a fillet on the specified edges of the given shape
5957                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
5958             """
5959             # Example: see GEOM_TestAll.py
5960             theR,Parameters = ParseParameters(theR)
5961             anObj = None
5962             if theShapeType == ShapeType["EDGE"]:
5963                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
5964                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
5965             else:
5966                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
5967                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
5968             anObj.SetParameters(Parameters)
5969             return anObj
5970
5971         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
5972         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes):
5973             """
5974             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
5975
5976             Example of usage:
5977                 # get the list of IDs (IDList) for the fillet
5978                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
5979                 IDlist_e = []
5980                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
5981                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
5982                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
5983                 # make a fillet on the specified edges of the given shape
5984                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
5985             """
5986             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
5987             anObj = None
5988             if theShapeType == ShapeType["EDGE"]:
5989                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
5990                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
5991             else:
5992                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
5993                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
5994             anObj.SetParameters(Parameters)
5995             return anObj
5996
5997         ## Perform a fillet on the specified edges of the given shape
5998         #  @param theShape  Wire Shape to perform fillet on.
5999         #  @param theR  Fillet radius.
6000         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
6001         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
6002         #    \note The list of vertices could be empty,
6003         #          in this case fillet will done done at all vertices in wire
6004         #  @return New GEOM.GEOM_Object, containing the result shape.
6005         #
6006         #  @ref tui_fillet2d "Example"
6007         def MakeFillet1D(self,theShape, theR, theListOfVertexes):
6008             """
6009             Perform a fillet on the specified edges of the given shape
6010
6011             Parameters:
6012                 theShape  Wire Shape to perform fillet on.
6013                 theR  Fillet radius.
6014                 theListOfVertexes Global indices of vertexes to perform fillet on.
6015             Note:
6016                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6017
6018                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
6019
6020             Returns: 
6021                 New GEOM.GEOM_Object, containing the result shape.
6022
6023             Example of usage:  
6024                 # create wire
6025                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
6026                 # make fillet at given wire vertices with giver radius
6027                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
6028             """
6029             # Example: see GEOM_TestAll.py
6030             theR,Parameters = ParseParameters(theR)
6031             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes)
6032             RaiseIfFailed("MakeFillet1D", self.LocalOp)
6033             anObj.SetParameters(Parameters)
6034             return anObj
6035
6036         ## Perform a fillet at the specified vertices of the given face/shell.
6037         #  @param theShape Face or Shell shape to perform fillet on.
6038         #  @param theR Fillet radius.
6039         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
6040         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6041         #  @return New GEOM.GEOM_Object, containing the result shape.
6042         #
6043         #  @ref tui_fillet2d "Example"
6044         def MakeFillet2D(self, theShape, theR, theListOfVertexes):
6045             """
6046             Perform a fillet at the specified vertices of the given face/shell.
6047
6048             Parameters:
6049                 theShape  Face or Shell shape to perform fillet on.
6050                 theR  Fillet radius.
6051                 theListOfVertexes Global indices of vertexes to perform fillet on.
6052             Note:
6053                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6054
6055             Returns: 
6056                 New GEOM.GEOM_Object, containing the result shape.
6057
6058             Example of usage:
6059                 face = geompy.MakeFaceHW(100, 100, 1)
6060                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
6061             """
6062             # Example: see GEOM_TestAll.py
6063             theR,Parameters = ParseParameters(theR)
6064             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
6065             RaiseIfFailed("MakeFillet2D", self.LocalOp)
6066             anObj.SetParameters(Parameters)
6067             return anObj
6068
6069         ## Perform a symmetric chamfer on all edges of the given shape.
6070         #  @param theShape Shape, to perform chamfer on.
6071         #  @param theD Chamfer size along each face.
6072         #  @return New GEOM.GEOM_Object, containing the result shape.
6073         #
6074         #  @ref tui_chamfer "Example 1"
6075         #  \n @ref swig_MakeChamferAll "Example 2"
6076         def MakeChamferAll(self,theShape, theD):
6077             """
6078             Perform a symmetric chamfer on all edges of the given shape.
6079
6080             Parameters:
6081                 theShape Shape, to perform chamfer on.
6082                 theD Chamfer size along each face.
6083
6084             Returns:     
6085                 New GEOM.GEOM_Object, containing the result shape.
6086
6087             Example of usage:
6088                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
6089             """
6090             # Example: see GEOM_TestOthers.py
6091             theD,Parameters = ParseParameters(theD)
6092             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
6093             RaiseIfFailed("MakeChamferAll", self.LocalOp)
6094             anObj.SetParameters(Parameters)
6095             return anObj
6096
6097         ## Perform a chamfer on edges, common to the specified faces,
6098         #  with distance D1 on the Face1
6099         #  @param theShape Shape, to perform chamfer on.
6100         #  @param theD1 Chamfer size along \a theFace1.
6101         #  @param theD2 Chamfer size along \a theFace2.
6102         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
6103         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6104         #  @return New GEOM.GEOM_Object, containing the result shape.
6105         #
6106         #  @ref tui_chamfer "Example"
6107         def MakeChamferEdge(self,theShape, theD1, theD2, theFace1, theFace2):
6108             """
6109             Perform a chamfer on edges, common to the specified faces,
6110             with distance D1 on the Face1
6111
6112             Parameters:
6113                 theShape Shape, to perform chamfer on.
6114                 theD1 Chamfer size along theFace1.
6115                 theD2 Chamfer size along theFace2.
6116                 theFace1,theFace2 Global indices of two faces of theShape.
6117
6118             Note:
6119                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6120
6121             Returns:      
6122                 New GEOM.GEOM_Object, containing the result shape.
6123
6124             Example of usage:
6125                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
6126                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
6127                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
6128                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
6129             """
6130             # Example: see GEOM_TestAll.py
6131             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6132             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
6133             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
6134             anObj.SetParameters(Parameters)
6135             return anObj
6136
6137         ## Perform a chamfer on edges
6138         #  @param theShape Shape, to perform chamfer on.
6139         #  @param theD Chamfer length
6140         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6141         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
6142         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6143         #  @return New GEOM.GEOM_Object, containing the result shape.
6144         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2):
6145             """
6146             Perform a chamfer on edges
6147
6148             Parameters:
6149                 theShape Shape, to perform chamfer on.
6150                 theD1 Chamfer size along theFace1.
6151                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
6152                 theFace1,theFace2 Global indices of two faces of theShape.
6153
6154             Note:
6155                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
6156
6157             Returns:      
6158                 New GEOM.GEOM_Object, containing the result shape.
6159
6160             Example of usage:
6161                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
6162                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
6163                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
6164                 ang = 30
6165                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
6166             """
6167             flag = False
6168             if isinstance(theAngle,str):
6169                 flag = True
6170             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6171             if flag:
6172                 theAngle = theAngle*math.pi/180.0
6173             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
6174             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
6175             anObj.SetParameters(Parameters)
6176             return anObj
6177
6178         ## Perform a chamfer on all edges of the specified faces,
6179         #  with distance D1 on the first specified face (if several for one edge)
6180         #  @param theShape Shape, to perform chamfer on.
6181         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
6182         #               connected to the edge, are in \a theFaces, \a theD1
6183         #               will be get along face, which is nearer to \a theFaces beginning.
6184         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
6185         #  @param theFaces Sequence of global indices of faces of \a theShape.
6186         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID().
6187         #  @return New GEOM.GEOM_Object, containing the result shape.
6188         #
6189         #  @ref tui_chamfer "Example"
6190         def MakeChamferFaces(self,theShape, theD1, theD2, theFaces):
6191             """
6192             Perform a chamfer on all edges of the specified faces,
6193             with distance D1 on the first specified face (if several for one edge)
6194
6195             Parameters:
6196                 theShape Shape, to perform chamfer on.
6197                 theD1 Chamfer size along face from  theFaces. If both faces,
6198                       connected to the edge, are in theFaces, theD1
6199                       will be get along face, which is nearer to theFaces beginning.
6200                 theD2 Chamfer size along another of two faces, connected to the edge.
6201                 theFaces Sequence of global indices of faces of theShape.
6202
6203                 
6204             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
6205
6206             Returns:  
6207                 New GEOM.GEOM_Object, containing the result shape.
6208             """
6209             # Example: see GEOM_TestAll.py
6210             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6211             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
6212             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
6213             anObj.SetParameters(Parameters)
6214             return anObj
6215
6216         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
6217         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6218         #
6219         #  @ref swig_FilletChamfer "Example"
6220         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces):
6221             """
6222             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
6223             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6224             """
6225             flag = False
6226             if isinstance(theAngle,str):
6227                 flag = True
6228             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6229             if flag:
6230                 theAngle = theAngle*math.pi/180.0
6231             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
6232             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
6233             anObj.SetParameters(Parameters)
6234             return anObj
6235
6236         ## Perform a chamfer on edges,
6237         #  with distance D1 on the first specified face (if several for one edge)
6238         #  @param theShape Shape, to perform chamfer on.
6239         #  @param theD1,theD2 Chamfer size
6240         #  @param theEdges Sequence of edges of \a theShape.
6241         #  @return New GEOM.GEOM_Object, containing the result shape.
6242         #
6243         #  @ref swig_FilletChamfer "Example"
6244         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges):
6245             """
6246             Perform a chamfer on edges,
6247             with distance D1 on the first specified face (if several for one edge)
6248             
6249             Parameters:
6250                 theShape Shape, to perform chamfer on.
6251                 theD1,theD2 Chamfer size
6252                 theEdges Sequence of edges of theShape.
6253
6254             Returns:
6255                 New GEOM.GEOM_Object, containing the result shape.
6256             """
6257             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
6258             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
6259             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
6260             anObj.SetParameters(Parameters)
6261             return anObj
6262
6263         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
6264         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6265         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges):
6266             """
6267             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
6268             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
6269             """
6270             flag = False
6271             if isinstance(theAngle,str):
6272                 flag = True
6273             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
6274             if flag:
6275                 theAngle = theAngle*math.pi/180.0
6276             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
6277             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
6278             anObj.SetParameters(Parameters)
6279             return anObj
6280
6281         ## /sa MakeChamferEdge() and MakeChamferFaces()
6282         #
6283         #  @ref swig_MakeChamfer "Example"
6284         def MakeChamfer(self,aShape,d1,d2,aShapeType,ListShape):
6285             """
6286             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
6287             """
6288             # Example: see GEOM_TestOthers.py
6289             anObj = None
6290             if aShapeType == ShapeType["EDGE"]:
6291                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1])
6292             else:
6293                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape)
6294             return anObj
6295             
6296         ## Remove material from a solid by extrusion of the base shape on the given distance.
6297         #  @param theInit Shape to remove material from. It must be a solid or 
6298         #  a compound made of a single solid.
6299         #  @param theBase Closed edge or wire defining the base shape to be extruded.
6300         #  @param theH Prism dimension along the normal to theBase
6301         #  @param theAngle Draft angle in degrees.
6302         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
6303         #
6304         #  @ref tui_creation_prism "Example"
6305         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle):
6306             """
6307             Add material to a solid by extrusion of the base shape on the given distance.
6308
6309             Parameters:
6310                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
6311                 theBase Closed edge or wire defining the base shape to be extruded.
6312                 theH Prism dimension along the normal  to theBase
6313                 theAngle Draft angle in degrees.
6314
6315             Returns:
6316                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
6317             """
6318             # Example: see GEOM_TestAll.py
6319             #theH,Parameters = ParseParameters(theH)
6320             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
6321             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
6322             #anObj.SetParameters(Parameters)
6323             return anObj   
6324             
6325         ## Add material to a solid by extrusion of the base shape on the given distance.
6326         #  @param theInit Shape to add material to. It must be a solid or 
6327         #  a compound made of a single solid.
6328         #  @param theBase Closed edge or wire defining the base shape to be extruded.
6329         #  @param theH Prism dimension along the normal to theBase
6330         #  @param theAngle Draft angle in degrees.
6331         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
6332         #
6333         #  @ref tui_creation_prism "Example"
6334         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle):
6335             """
6336             Add material to a solid by extrusion of the base shape on the given distance.
6337
6338             Parameters:
6339                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
6340                 theBase Closed edge or wire defining the base shape to be extruded.
6341                 theH Prism dimension along the normal  to theBase
6342                 theAngle Draft angle in degrees.
6343
6344             Returns:
6345                 New GEOM.GEOM_Object,  containing the initial shape with added material.
6346             """
6347             # Example: see GEOM_TestAll.py
6348             #theH,Parameters = ParseParameters(theH)
6349             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
6350             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
6351             #anObj.SetParameters(Parameters)
6352             return anObj   
6353
6354         # end of l3_local
6355         ## @}
6356
6357         ## @addtogroup l3_basic_op
6358         ## @{
6359
6360         ## Perform an Archimde operation on the given shape with given parameters.
6361         #  The object presenting the resulting face is returned.
6362         #  @param theShape Shape to be put in water.
6363         #  @param theWeight Weight og the shape.
6364         #  @param theWaterDensity Density of the water.
6365         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
6366         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
6367         #          by a plane, corresponding to water level.
6368         #
6369         #  @ref tui_archimede "Example"
6370         def Archimede(self,theShape, theWeight, theWaterDensity, theMeshDeflection):
6371             """
6372             Perform an Archimde operation on the given shape with given parameters.
6373             The object presenting the resulting face is returned.
6374
6375             Parameters: 
6376                 theShape Shape to be put in water.
6377                 theWeight Weight og the shape.
6378                 theWaterDensity Density of the water.
6379                 theMeshDeflection Deflection of the mesh, using to compute the section.
6380
6381             Returns: 
6382                 New GEOM.GEOM_Object, containing a section of theShape
6383                 by a plane, corresponding to water level.
6384             """
6385             # Example: see GEOM_TestAll.py
6386             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
6387               theWeight,theWaterDensity,theMeshDeflection)
6388             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
6389             RaiseIfFailed("MakeArchimede", self.LocalOp)
6390             anObj.SetParameters(Parameters)
6391             return anObj
6392
6393         # end of l3_basic_op
6394         ## @}
6395
6396         ## @addtogroup l2_measure
6397         ## @{
6398
6399         ## Get point coordinates
6400         #  @return [x, y, z]
6401         #
6402         #  @ref tui_measurement_tools_page "Example"
6403         def PointCoordinates(self,Point):
6404             """
6405             Get point coordinates
6406
6407             Returns:
6408                 [x, y, z]
6409             """
6410             # Example: see GEOM_TestMeasures.py
6411             aTuple = self.MeasuOp.PointCoordinates(Point)
6412             RaiseIfFailed("PointCoordinates", self.MeasuOp)
6413             return aTuple
6414
6415         ## Get summarized length of all wires,
6416         #  area of surface and volume of the given shape.
6417         #  @param theShape Shape to define properties of.
6418         #  @return [theLength, theSurfArea, theVolume]\n
6419         #  theLength:   Summarized length of all wires of the given shape.\n
6420         #  theSurfArea: Area of surface of the given shape.\n
6421         #  theVolume:   Volume of the given shape.
6422         #
6423         #  @ref tui_measurement_tools_page "Example"
6424         def BasicProperties(self,theShape):
6425             """
6426             Get summarized length of all wires,
6427             area of surface and volume of the given shape.
6428
6429             Parameters: 
6430                 theShape Shape to define properties of.
6431
6432             Returns:
6433                 [theLength, theSurfArea, theVolume]
6434                  theLength:   Summarized length of all wires of the given shape.
6435                  theSurfArea: Area of surface of the given shape.
6436                  theVolume:   Volume of the given shape.
6437             """
6438             # Example: see GEOM_TestMeasures.py
6439             aTuple = self.MeasuOp.GetBasicProperties(theShape)
6440             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
6441             return aTuple
6442
6443         ## Get parameters of bounding box of the given shape
6444         #  @param theShape Shape to obtain bounding box of.
6445         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
6446         #  Xmin,Xmax: Limits of shape along OX axis.
6447         #  Ymin,Ymax: Limits of shape along OY axis.
6448         #  Zmin,Zmax: Limits of shape along OZ axis.
6449         #
6450         #  @ref tui_measurement_tools_page "Example"
6451         def BoundingBox(self,theShape):
6452             """
6453             Get parameters of bounding box of the given shape
6454
6455             Parameters: 
6456                 theShape Shape to obtain bounding box of.
6457
6458             Returns:
6459                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
6460                  Xmin,Xmax: Limits of shape along OX axis.
6461                  Ymin,Ymax: Limits of shape along OY axis.
6462                  Zmin,Zmax: Limits of shape along OZ axis.
6463             """
6464             # Example: see GEOM_TestMeasures.py
6465             aTuple = self.MeasuOp.GetBoundingBox(theShape)
6466             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
6467             return aTuple
6468
6469         ## Get inertia matrix and moments of inertia of theShape.
6470         #  @param theShape Shape to calculate inertia of.
6471         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
6472         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
6473         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
6474         #
6475         #  @ref tui_measurement_tools_page "Example"
6476         def Inertia(self,theShape):
6477             """
6478             Get inertia matrix and moments of inertia of theShape.
6479
6480             Parameters: 
6481                 theShape Shape to calculate inertia of.
6482
6483             Returns:
6484                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
6485                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
6486                  Ix,Iy,Iz:    Moments of inertia of the given shape.
6487             """
6488             # Example: see GEOM_TestMeasures.py
6489             aTuple = self.MeasuOp.GetInertia(theShape)
6490             RaiseIfFailed("GetInertia", self.MeasuOp)
6491             return aTuple
6492
6493         ## Get if coords are included in the shape (ST_IN or ST_ON)
6494         #  @param theShape Shape
6495         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
6496         #  @param tolerance to be used (default is 1.0e-7)
6497         #  @return list_of_boolean = [res1, res2, ...]
6498         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
6499             """
6500             Get if coords are included in the shape (ST_IN or ST_ON)
6501             
6502             Parameters: 
6503                 theShape Shape
6504                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
6505                 tolerance to be used (default is 1.0e-7)
6506
6507             Returns:
6508                 list_of_boolean = [res1, res2, ...]
6509             """
6510             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
6511
6512         ## Get minimal distance between the given shapes.
6513         #  @param theShape1,theShape2 Shapes to find minimal distance between.
6514         #  @return Value of the minimal distance between the given shapes.
6515         #
6516         #  @ref tui_measurement_tools_page "Example"
6517         def MinDistance(self, theShape1, theShape2):
6518             """
6519             Get minimal distance between the given shapes.
6520             
6521             Parameters: 
6522                 theShape1,theShape2 Shapes to find minimal distance between.
6523
6524             Returns:    
6525                 Value of the minimal distance between the given shapes.
6526             """
6527             # Example: see GEOM_TestMeasures.py
6528             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
6529             RaiseIfFailed("GetMinDistance", self.MeasuOp)
6530             return aTuple[0]
6531
6532         ## Get minimal distance between the given shapes.
6533         #  @param theShape1,theShape2 Shapes to find minimal distance between.
6534         #  @return Value of the minimal distance between the given shapes.
6535         #
6536         #  @ref swig_all_measure "Example"
6537         def MinDistanceComponents(self, theShape1, theShape2):
6538             """
6539             Get minimal distance between the given shapes.
6540
6541             Parameters: 
6542                 theShape1,theShape2 Shapes to find minimal distance between.
6543
6544             Returns:  
6545                 Value of the minimal distance between the given shapes.
6546             """
6547             # Example: see GEOM_TestMeasures.py
6548             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
6549             RaiseIfFailed("GetMinDistance", self.MeasuOp)
6550             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
6551             return aRes
6552
6553         ## Get angle between the given shapes in degrees.
6554         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
6555         #  @note If both arguments are vectors, the angle is computed in accordance
6556         #        with their orientations, otherwise the minimum angle is computed.
6557         #  @return Value of the angle between the given shapes in degrees.
6558         #
6559         #  @ref tui_measurement_tools_page "Example"
6560         def GetAngle(self, theShape1, theShape2):
6561             """
6562             Get angle between the given shapes in degrees.
6563
6564             Parameters: 
6565                 theShape1,theShape2 Lines or linear edges to find angle between.
6566
6567             Note:
6568                 If both arguments are vectors, the angle is computed in accordance
6569                 with their orientations, otherwise the minimum angle is computed.
6570
6571             Returns:  
6572                 Value of the angle between the given shapes in degrees.
6573             """
6574             # Example: see GEOM_TestMeasures.py
6575             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
6576             RaiseIfFailed("GetAngle", self.MeasuOp)
6577             return anAngle
6578
6579         ## Get angle between the given shapes in radians.
6580         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
6581         #  @note If both arguments are vectors, the angle is computed in accordance
6582         #        with their orientations, otherwise the minimum angle is computed.
6583         #  @return Value of the angle between the given shapes in radians.
6584         #
6585         #  @ref tui_measurement_tools_page "Example"
6586         def GetAngleRadians(self, theShape1, theShape2):
6587             """
6588             Get angle between the given shapes in radians.
6589
6590             Parameters: 
6591                 theShape1,theShape2 Lines or linear edges to find angle between.
6592
6593                 
6594             Note:
6595                 If both arguments are vectors, the angle is computed in accordance
6596                 with their orientations, otherwise the minimum angle is computed.
6597
6598             Returns:  
6599                 Value of the angle between the given shapes in radians.
6600             """
6601             # Example: see GEOM_TestMeasures.py
6602             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
6603             RaiseIfFailed("GetAngle", self.MeasuOp)
6604             return anAngle
6605
6606         ## @name Curve Curvature Measurement
6607         #  Methods for receiving radius of curvature of curves
6608         #  in the given point
6609         ## @{
6610
6611         ## Measure curvature of a curve at a point, set by parameter.
6612         #  @param theCurve a curve.
6613         #  @param theParam parameter.
6614         #  @return radius of curvature of \a theCurve.
6615         #
6616         #  @ref swig_todo "Example"
6617         def CurveCurvatureByParam(self, theCurve, theParam):
6618             """
6619             Measure curvature of a curve at a point, set by parameter.
6620
6621             Parameters: 
6622                 theCurve a curve.
6623                 theParam parameter.
6624
6625             Returns: 
6626                 radius of curvature of theCurve.
6627             """
6628             # Example: see GEOM_TestMeasures.py
6629             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
6630             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
6631             return aCurv
6632
6633         ## Measure curvature of a curve at a point.
6634         #  @param theCurve a curve.
6635         #  @param thePoint given point.
6636         #  @return radius of curvature of \a theCurve.
6637         #
6638         #  @ref swig_todo "Example"
6639         def CurveCurvatureByPoint(self, theCurve, thePoint):
6640             """
6641             Measure curvature of a curve at a point.
6642
6643             Parameters: 
6644                 theCurve a curve.
6645                 thePoint given point.
6646
6647             Returns: 
6648                 radius of curvature of theCurve.           
6649             """
6650             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
6651             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
6652             return aCurv
6653         ## @}
6654
6655         ## @name Surface Curvature Measurement
6656         #  Methods for receiving max and min radius of curvature of surfaces
6657         #  in the given point
6658         ## @{
6659
6660         ## Measure max radius of curvature of surface.
6661         #  @param theSurf the given surface.
6662         #  @param theUParam Value of U-parameter on the referenced surface.
6663         #  @param theVParam Value of V-parameter on the referenced surface.
6664         #  @return max radius of curvature of theSurf.
6665         #
6666         ## @ref swig_todo "Example"
6667         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
6668             """
6669             Measure max radius of curvature of surface.
6670
6671             Parameters: 
6672                 theSurf the given surface.
6673                 theUParam Value of U-parameter on the referenced surface.
6674                 theVParam Value of V-parameter on the referenced surface.
6675                 
6676             Returns:     
6677                 max radius of curvature of theSurf.
6678             """
6679             # Example: see GEOM_TestMeasures.py
6680             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
6681             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
6682             return aSurf
6683
6684         ## Measure max radius of curvature of surface in the given point
6685         #  @param theSurf the given surface.
6686         #  @param thePoint given point.
6687         #  @return max radius of curvature of theSurf.
6688         #
6689         ## @ref swig_todo "Example"
6690         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
6691             """
6692             Measure max radius of curvature of surface in the given point.
6693
6694             Parameters: 
6695                 theSurf the given surface.
6696                 thePoint given point.
6697                 
6698             Returns:     
6699                 max radius of curvature of theSurf.          
6700             """
6701             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
6702             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
6703             return aSurf
6704
6705         ## Measure min radius of curvature of surface.
6706         #  @param theSurf the given surface.
6707         #  @param theUParam Value of U-parameter on the referenced surface.
6708         #  @param theVParam Value of V-parameter on the referenced surface.
6709         #  @return min radius of curvature of theSurf.
6710         #   
6711         ## @ref swig_todo "Example"
6712         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
6713             """
6714             Measure min radius of curvature of surface.
6715
6716             Parameters: 
6717                 theSurf the given surface.
6718                 theUParam Value of U-parameter on the referenced surface.
6719                 theVParam Value of V-parameter on the referenced surface.
6720                 
6721             Returns:     
6722                 Min radius of curvature of theSurf.
6723             """
6724             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
6725             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
6726             return aSurf
6727
6728         ## Measure min radius of curvature of surface in the given point
6729         #  @param theSurf the given surface.
6730         #  @param thePoint given point.
6731         #  @return min radius of curvature of theSurf.
6732         #
6733         ## @ref swig_todo "Example"
6734         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
6735             """
6736             Measure min radius of curvature of surface in the given point.
6737
6738             Parameters: 
6739                 theSurf the given surface.
6740                 thePoint given point.
6741                 
6742             Returns:     
6743                 Min radius of curvature of theSurf.          
6744             """
6745             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
6746             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
6747             return aSurf
6748         ## @}
6749
6750         ## Get min and max tolerances of sub-shapes of theShape
6751         #  @param theShape Shape, to get tolerances of.
6752         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
6753         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
6754         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
6755         #  VertMin,VertMax: Min and max tolerances of the vertices.
6756         #
6757         #  @ref tui_measurement_tools_page "Example"
6758         def Tolerance(self,theShape):
6759             """
6760             Get min and max tolerances of sub-shapes of theShape
6761
6762             Parameters: 
6763                 theShape Shape, to get tolerances of.
6764
6765             Returns:    
6766                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
6767                  FaceMin,FaceMax: Min and max tolerances of the faces.
6768                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
6769                  VertMin,VertMax: Min and max tolerances of the vertices.
6770             """
6771             # Example: see GEOM_TestMeasures.py
6772             aTuple = self.MeasuOp.GetTolerance(theShape)
6773             RaiseIfFailed("GetTolerance", self.MeasuOp)
6774             return aTuple
6775
6776         ## Obtain description of the given shape (number of sub-shapes of each type)
6777         #  @param theShape Shape to be described.
6778         #  @return Description of the given shape.
6779         #
6780         #  @ref tui_measurement_tools_page "Example"
6781         def WhatIs(self,theShape):
6782             """
6783             Obtain description of the given shape (number of sub-shapes of each type)
6784
6785             Parameters:
6786                 theShape Shape to be described.
6787
6788             Returns:
6789                 Description of the given shape.
6790             """
6791             # Example: see GEOM_TestMeasures.py
6792             aDescr = self.MeasuOp.WhatIs(theShape)
6793             RaiseIfFailed("WhatIs", self.MeasuOp)
6794             return aDescr
6795
6796         ## Obtain quantity of shapes of the given type in \a theShape.
6797         #  If \a theShape is of type \a theType, it is also counted.
6798         #  @param theShape Shape to be described.
6799         #  @param theType the given ShapeType().
6800         #  @return Quantity of shapes of type \a theType in \a theShape.
6801         #
6802         #  @ref tui_measurement_tools_page "Example"
6803         def NbShapes (self, theShape, theType):
6804             """
6805             Obtain quantity of shapes of the given type in theShape.
6806             If theShape is of type theType, it is also counted.
6807
6808             Parameters:
6809                 theShape Shape to be described.
6810                 theType the given geompy.ShapeType
6811
6812             Returns:
6813                 Quantity of shapes of type theType in theShape.
6814             """
6815             # Example: see GEOM_TestMeasures.py
6816             listSh = self.SubShapeAllIDs(theShape, theType)
6817             Nb = len(listSh)
6818             t       = EnumToLong(theShape.GetShapeType())
6819             theType = EnumToLong(theType)
6820             if t == theType:
6821                 Nb = Nb + 1
6822                 pass
6823             return Nb
6824
6825         ## Obtain quantity of shapes of each type in \a theShape.
6826         #  The \a theShape is also counted.
6827         #  @param theShape Shape to be described.
6828         #  @return Dictionary of ShapeType() with bound quantities of shapes.
6829         #
6830         #  @ref tui_measurement_tools_page "Example"
6831         def ShapeInfo (self, theShape):
6832             """
6833             Obtain quantity of shapes of each type in theShape.
6834             The theShape is also counted.
6835
6836             Parameters:
6837                 theShape Shape to be described.
6838
6839             Returns:
6840                 Dictionary of geompy.ShapeType with bound quantities of shapes.
6841             """
6842             # Example: see GEOM_TestMeasures.py
6843             aDict = {}
6844             for typeSh in ShapeType:
6845                 if typeSh in ( "AUTO", "SHAPE" ): continue
6846                 listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
6847                 Nb = len(listSh)
6848                 if EnumToLong(theShape.GetShapeType()) == ShapeType[typeSh]:
6849                     Nb = Nb + 1
6850                     pass
6851                 aDict[typeSh] = Nb
6852                 pass
6853             return aDict
6854
6855         ## Get a point, situated at the centre of mass of theShape.
6856         #  @param theShape Shape to define centre of mass of.
6857         #  @return New GEOM.GEOM_Object, containing the created point.
6858         #
6859         #  @ref tui_measurement_tools_page "Example"
6860         def MakeCDG(self,theShape):
6861             """
6862             Get a point, situated at the centre of mass of theShape.
6863
6864             Parameters:
6865                 theShape Shape to define centre of mass of.
6866
6867             Returns:
6868                 New GEOM.GEOM_Object, containing the created point.
6869             """
6870             # Example: see GEOM_TestMeasures.py
6871             anObj = self.MeasuOp.GetCentreOfMass(theShape)
6872             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
6873             return anObj
6874
6875         ## Get a vertex sub-shape by index depended with orientation.
6876         #  @param theShape Shape to find sub-shape.
6877         #  @param theIndex Index to find vertex by this index (starting from zero)
6878         #  @return New GEOM.GEOM_Object, containing the created vertex.
6879         #
6880         #  @ref tui_measurement_tools_page "Example"
6881         def GetVertexByIndex(self,theShape, theIndex):
6882             """
6883             Get a vertex sub-shape by index depended with orientation.
6884
6885             Parameters:
6886                 theShape Shape to find sub-shape.
6887                 theIndex Index to find vertex by this index (starting from zero)
6888
6889             Returns:
6890                 New GEOM.GEOM_Object, containing the created vertex.
6891             """
6892             # Example: see GEOM_TestMeasures.py
6893             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
6894             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
6895             return anObj
6896
6897         ## Get the first vertex of wire/edge depended orientation.
6898         #  @param theShape Shape to find first vertex.
6899         #  @return New GEOM.GEOM_Object, containing the created vertex.
6900         #
6901         #  @ref tui_measurement_tools_page "Example"
6902         def GetFirstVertex(self,theShape):
6903             """
6904             Get the first vertex of wire/edge depended orientation.
6905
6906             Parameters:
6907                 theShape Shape to find first vertex.
6908
6909             Returns:    
6910                 New GEOM.GEOM_Object, containing the created vertex.
6911             """
6912             # Example: see GEOM_TestMeasures.py
6913             anObj = self.GetVertexByIndex(theShape, 0)
6914             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
6915             return anObj
6916
6917         ## Get the last vertex of wire/edge depended orientation.
6918         #  @param theShape Shape to find last vertex.
6919         #  @return New GEOM.GEOM_Object, containing the created vertex.
6920         #
6921         #  @ref tui_measurement_tools_page "Example"
6922         def GetLastVertex(self,theShape):
6923             """
6924             Get the last vertex of wire/edge depended orientation.
6925
6926             Parameters: 
6927                 theShape Shape to find last vertex.
6928
6929             Returns:   
6930                 New GEOM.GEOM_Object, containing the created vertex.
6931             """
6932             # Example: see GEOM_TestMeasures.py
6933             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"])
6934             anObj = self.GetVertexByIndex(theShape, (nb_vert-1))
6935             RaiseIfFailed("GetLastVertex", self.MeasuOp)
6936             return anObj
6937
6938         ## Get a normale to the given face. If the point is not given,
6939         #  the normale is calculated at the center of mass.
6940         #  @param theFace Face to define normale of.
6941         #  @param theOptionalPoint Point to compute the normale at.
6942         #  @return New GEOM.GEOM_Object, containing the created vector.
6943         #
6944         #  @ref swig_todo "Example"
6945         def GetNormal(self, theFace, theOptionalPoint = None):
6946             """
6947             Get a normale to the given face. If the point is not given,
6948             the normale is calculated at the center of mass.
6949             
6950             Parameters: 
6951                 theFace Face to define normale of.
6952                 theOptionalPoint Point to compute the normale at.
6953
6954             Returns:   
6955                 New GEOM.GEOM_Object, containing the created vector.
6956             """
6957             # Example: see GEOM_TestMeasures.py
6958             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
6959             RaiseIfFailed("GetNormal", self.MeasuOp)
6960             return anObj
6961
6962         ## Check a topology of the given shape.
6963         #  @param theShape Shape to check validity of.
6964         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
6965         #                        if TRUE, the shape's geometry will be checked also.
6966         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
6967         #                        of problem is printed.
6968         #                        if TRUE and if theShape is invalid, the description 
6969         #                        of problem is also returned.
6970         #  @return TRUE, if the shape "seems to be valid".
6971         #
6972         #  @ref tui_measurement_tools_page "Example"
6973         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
6974             """
6975             Check a topology of the given shape.
6976
6977             Parameters: 
6978                 theShape Shape to check validity of.
6979                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
6980                                if TRUE, the shape's geometry will be checked also.
6981                 theReturnStatus If FALSE and if theShape is invalid, a description
6982                                 of problem is printed.
6983                                 if TRUE and if theShape is invalid, the description 
6984                                 of problem is returned.
6985
6986             Returns:   
6987                 TRUE, if the shape "seems to be valid".
6988                 If theShape is invalid, prints a description of problem.
6989                 This description can also be returned.
6990             """
6991             # Example: see GEOM_TestMeasures.py
6992             if theIsCheckGeom:
6993                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
6994                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
6995             else:
6996                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
6997                 RaiseIfFailed("CheckShape", self.MeasuOp)
6998             if IsValid == 0:
6999                 if theReturnStatus == 0:
7000                     print Status
7001             if theReturnStatus == 1:
7002               return (IsValid, Status)
7003             return IsValid
7004
7005         ## Detect self-intersections in the given shape.
7006         #  @param theShape Shape to check.
7007         #  @return TRUE, if the shape contains no self-intersections.
7008         #
7009         #  @ref tui_measurement_tools_page "Example"
7010         def CheckSelfIntersections(self, theShape):
7011             """
7012             Detect self-intersections in the given shape.
7013
7014             Parameters: 
7015                 theShape Shape to check.
7016
7017             Returns:   
7018                 TRUE, if the shape contains no self-intersections.
7019             """
7020             # Example: see GEOM_TestMeasures.py
7021             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
7022             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
7023             return IsValid
7024
7025         ## Get position (LCS) of theShape.
7026         #
7027         #  Origin of the LCS is situated at the shape's center of mass.
7028         #  Axes of the LCS are obtained from shape's location or,
7029         #  if the shape is a planar face, from position of its plane.
7030         #
7031         #  @param theShape Shape to calculate position of.
7032         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
7033         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
7034         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
7035         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
7036         #
7037         #  @ref swig_todo "Example"
7038         def GetPosition(self,theShape):
7039             """
7040             Get position (LCS) of theShape.
7041             Origin of the LCS is situated at the shape's center of mass.
7042             Axes of the LCS are obtained from shape's location or,
7043             if the shape is a planar face, from position of its plane.
7044
7045             Parameters: 
7046                 theShape Shape to calculate position of.
7047
7048             Returns:  
7049                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
7050                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
7051                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
7052                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
7053             """
7054             # Example: see GEOM_TestMeasures.py
7055             aTuple = self.MeasuOp.GetPosition(theShape)
7056             RaiseIfFailed("GetPosition", self.MeasuOp)
7057             return aTuple
7058
7059         ## Get kind of theShape.
7060         #
7061         #  @param theShape Shape to get a kind of.
7062         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
7063         #          and a list of parameters, describing the shape.
7064         #  @note  Concrete meaning of each value, returned via \a theIntegers
7065         #         or \a theDoubles list depends on the kind() of the shape.
7066         #
7067         #  @ref swig_todo "Example"
7068         def KindOfShape(self,theShape):
7069             """
7070             Get kind of theShape.
7071          
7072             Parameters: 
7073                 theShape Shape to get a kind of.
7074
7075             Returns:
7076                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
7077                     and a list of parameters, describing the shape.
7078             Note:
7079                 Concrete meaning of each value, returned via theIntegers
7080                 or theDoubles list depends on the geompy.kind of the shape
7081             """
7082             # Example: see GEOM_TestMeasures.py
7083             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
7084             RaiseIfFailed("KindOfShape", self.MeasuOp)
7085
7086             aKind  = aRoughTuple[0]
7087             anInts = aRoughTuple[1]
7088             aDbls  = aRoughTuple[2]
7089
7090             # Now there is no exception from this rule:
7091             aKindTuple = [aKind] + aDbls + anInts
7092
7093             # If they are we will regroup parameters for such kind of shape.
7094             # For example:
7095             #if aKind == kind.SOME_KIND:
7096             #    #  SOME_KIND     int int double int double double
7097             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
7098
7099             return aKindTuple
7100
7101         # end of l2_measure
7102         ## @}
7103
7104         ## @addtogroup l2_import_export
7105         ## @{
7106
7107         ## Import a shape from the BREP or IGES or STEP file
7108         #  (depends on given format) with given name.
7109         #  @param theFileName The file, containing the shape.
7110         #  @param theFormatName Specify format for the file reading.
7111         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
7112         #         If format 'IGES_SCALE' is used instead 'IGES' length unit will be
7113         #         set to 'meter' and result model will be scaled.
7114         #  @return New GEOM.GEOM_Object, containing the imported shape.
7115         #
7116         #  @ref swig_Import_Export "Example"
7117         def ImportFile(self,theFileName, theFormatName):
7118             """
7119             Import a shape from the BREP or IGES or STEP file
7120             (depends on given format) with given name.
7121
7122             Parameters: 
7123                 theFileName The file, containing the shape.
7124                 theFormatName Specify format for the file reading.
7125                               Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
7126                               If format 'IGES_SCALE' is used instead 'IGES' length unit will be
7127                               set to 'meter' and result model will be scaled.
7128
7129             Returns:
7130                 New GEOM.GEOM_Object, containing the imported shape.
7131             """
7132             # Example: see GEOM_TestOthers.py
7133             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
7134             RaiseIfFailed("Import", self.InsertOp)
7135             return anObj
7136
7137         ## Deprecated analog of ImportFile()
7138         def Import(self,theFileName, theFormatName):
7139             """
7140             Deprecated analog of geompy.ImportFile
7141             """
7142             print "WARNING: Function Import is deprecated, use ImportFile instead"
7143             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
7144             RaiseIfFailed("Import", self.InsertOp)
7145             return anObj
7146
7147         ## Shortcut to ImportFile() for BREP format
7148         #
7149         #  @ref swig_Import_Export "Example"
7150         def ImportBREP(self,theFileName):
7151             """
7152             geompy.ImportFile(...) function for BREP format
7153             """
7154             # Example: see GEOM_TestOthers.py
7155             return self.ImportFile(theFileName, "BREP")
7156
7157         ## Shortcut to ImportFile() for IGES format
7158         #
7159         #  @ref swig_Import_Export "Example"
7160         def ImportIGES(self,theFileName):
7161             """
7162             geompy.ImportFile(...) function for IGES format
7163             """
7164             # Example: see GEOM_TestOthers.py
7165             return self.ImportFile(theFileName, "IGES")
7166
7167         ## Return length unit from given IGES file
7168         #
7169         #  @ref swig_Import_Export "Example"
7170         def GetIGESUnit(self,theFileName):
7171             """
7172             Return length unit from given IGES file
7173             """
7174             # Example: see GEOM_TestOthers.py
7175             anObj = self.InsertOp.ImportFile(theFileName, "IGES_UNIT")
7176             #RaiseIfFailed("Import", self.InsertOp)
7177             # recieve name using returned vertex
7178             UnitName = "M"
7179             if anObj.GetShapeType() == GEOM.VERTEX:
7180                 vertices = [anObj]
7181             else:
7182                 vertices = self.SubShapeAll(anObj,ShapeType["VERTEX"])
7183             if len(vertices)>0:
7184                 p = self.PointCoordinates(vertices[0])
7185                 if abs(p[0]-0.01) < 1.e-6:
7186                     UnitName = "CM"
7187                 elif abs(p[0]-0.001) < 1.e-6:
7188                     UnitName = "MM"
7189             return UnitName
7190
7191         ## Shortcut to ImportFile() for STEP format
7192         #
7193         #  @ref swig_Import_Export "Example"
7194         def ImportSTEP(self,theFileName):
7195             """
7196             geompy.ImportFile(...) function for STEP format
7197             """
7198             # Example: see GEOM_TestOthers.py
7199             return self.ImportFile(theFileName, "STEP")
7200
7201         ## Export the given shape into a file with given name.
7202         #  @param theObject Shape to be stored in the file.
7203         #  @param theFileName Name of the file to store the given shape in.
7204         #  @param theFormatName Specify format for the shape storage.
7205         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
7206         #
7207         #  @ref swig_Import_Export "Example"
7208         def Export(self,theObject, theFileName, theFormatName):
7209             """
7210             Export the given shape into a file with given name.
7211
7212             Parameters: 
7213                 theObject Shape to be stored in the file.
7214                 theFileName Name of the file to store the given shape in.
7215                 theFormatName Specify format for the shape storage.
7216                               Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
7217             """
7218             # Example: see GEOM_TestOthers.py
7219             self.InsertOp.Export(theObject, theFileName, theFormatName)
7220             if self.InsertOp.IsDone() == 0:
7221                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
7222                 pass
7223             pass
7224
7225         ## Shortcut to Export() for BREP format
7226         #
7227         #  @ref swig_Import_Export "Example"
7228         def ExportBREP(self,theObject, theFileName):
7229             """
7230             geompy.Export(...) function for BREP format
7231             """
7232             # Example: see GEOM_TestOthers.py
7233             return self.Export(theObject, theFileName, "BREP")
7234
7235         ## Shortcut to Export() for IGES format
7236         #
7237         #  @ref swig_Import_Export "Example"
7238         def ExportIGES(self,theObject, theFileName):
7239             """
7240             geompy.Export(...) function for IGES format
7241             """
7242             # Example: see GEOM_TestOthers.py
7243             return self.Export(theObject, theFileName, "IGES")
7244
7245         ## Shortcut to Export() for STEP format
7246         #
7247         #  @ref swig_Import_Export "Example"
7248         def ExportSTEP(self,theObject, theFileName):
7249             """
7250             geompy.Export(...) function for STEP format
7251             """
7252             # Example: see GEOM_TestOthers.py
7253             return self.Export(theObject, theFileName, "STEP")
7254
7255         # end of l2_import_export
7256         ## @}
7257
7258         ## @addtogroup l3_blocks
7259         ## @{
7260
7261         ## Create a quadrangle face from four edges. Order of Edges is not
7262         #  important. It is  not necessary that edges share the same vertex.
7263         #  @param E1,E2,E3,E4 Edges for the face bound.
7264         #  @return New GEOM.GEOM_Object, containing the created face.
7265         #
7266         #  @ref tui_building_by_blocks_page "Example"
7267         def MakeQuad(self,E1, E2, E3, E4):
7268             """
7269             Create a quadrangle face from four edges. Order of Edges is not
7270             important. It is  not necessary that edges share the same vertex.
7271
7272             Parameters: 
7273                 E1,E2,E3,E4 Edges for the face bound.
7274
7275             Returns: 
7276                 New GEOM.GEOM_Object, containing the created face.
7277
7278             Example of usage:               
7279                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
7280             """
7281             # Example: see GEOM_Spanner.py
7282             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
7283             RaiseIfFailed("MakeQuad", self.BlocksOp)
7284             return anObj
7285
7286         ## Create a quadrangle face on two edges.
7287         #  The missing edges will be built by creating the shortest ones.
7288         #  @param E1,E2 Two opposite edges for the face.
7289         #  @return New GEOM.GEOM_Object, containing the created face.
7290         #
7291         #  @ref tui_building_by_blocks_page "Example"
7292         def MakeQuad2Edges(self,E1, E2):
7293             """
7294             Create a quadrangle face on two edges.
7295             The missing edges will be built by creating the shortest ones.
7296
7297             Parameters: 
7298                 E1,E2 Two opposite edges 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 edges
7310                 edge1 = geompy.MakeEdge(p1, p2)
7311                 edge2 = geompy.MakeEdge(p3, p4)
7312                 # create a quadrangle face from two edges
7313                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
7314             """
7315             # Example: see GEOM_Spanner.py
7316             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
7317             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
7318             return anObj
7319
7320         ## Create a quadrangle face with specified corners.
7321         #  The missing edges will be built by creating the shortest ones.
7322         #  @param V1,V2,V3,V4 Corner vertices for the face.
7323         #  @return New GEOM.GEOM_Object, containing the created face.
7324         #
7325         #  @ref tui_building_by_blocks_page "Example 1"
7326         #  \n @ref swig_MakeQuad4Vertices "Example 2"
7327         def MakeQuad4Vertices(self,V1, V2, V3, V4):
7328             """
7329             Create a quadrangle face with specified corners.
7330             The missing edges will be built by creating the shortest ones.
7331
7332             Parameters: 
7333                 V1,V2,V3,V4 Corner vertices for the face.
7334
7335             Returns: 
7336                 New GEOM.GEOM_Object, containing the created face.
7337
7338             Example of usage:
7339                 # create vertices
7340                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
7341                 p2 = geompy.MakeVertex(150.,  30.,   0.)
7342                 p3 = geompy.MakeVertex(  0., 120.,  50.)
7343                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
7344                 # create a quadrangle from four points in its corners
7345                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
7346             """
7347             # Example: see GEOM_Spanner.py
7348             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
7349             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
7350             return anObj
7351
7352         ## Create a hexahedral solid, bounded by the six given faces. Order of
7353         #  faces is not important. It is  not necessary that Faces share the same edge.
7354         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
7355         #  @return New GEOM.GEOM_Object, containing the created solid.
7356         #
7357         #  @ref tui_building_by_blocks_page "Example 1"
7358         #  \n @ref swig_MakeHexa "Example 2"
7359         def MakeHexa(self,F1, F2, F3, F4, F5, F6):
7360             """
7361             Create a hexahedral solid, bounded by the six given faces. Order of
7362             faces is not important. It is  not necessary that Faces share the same edge.
7363
7364             Parameters: 
7365                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
7366
7367             Returns:    
7368                 New GEOM.GEOM_Object, containing the created solid.
7369
7370             Example of usage:
7371                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
7372             """
7373             # Example: see GEOM_Spanner.py
7374             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
7375             RaiseIfFailed("MakeHexa", self.BlocksOp)
7376             return anObj
7377
7378         ## Create a hexahedral solid between two given faces.
7379         #  The missing faces will be built by creating the smallest ones.
7380         #  @param F1,F2 Two opposite faces for the hexahedral solid.
7381         #  @return New GEOM.GEOM_Object, containing the created solid.
7382         #
7383         #  @ref tui_building_by_blocks_page "Example 1"
7384         #  \n @ref swig_MakeHexa2Faces "Example 2"
7385         def MakeHexa2Faces(self,F1, F2):
7386             """
7387             Create a hexahedral solid between two given faces.
7388             The missing faces will be built by creating the smallest ones.
7389
7390             Parameters: 
7391                 F1,F2 Two opposite faces for the hexahedral solid.
7392
7393             Returns:
7394                 New GEOM.GEOM_Object, containing the created solid.
7395
7396             Example of usage:
7397                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
7398             """
7399             # Example: see GEOM_Spanner.py
7400             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
7401             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
7402             return anObj
7403
7404         # end of l3_blocks
7405         ## @}
7406
7407         ## @addtogroup l3_blocks_op
7408         ## @{
7409
7410         ## Get a vertex, found in the given shape by its coordinates.
7411         #  @param theShape Block or a compound of blocks.
7412         #  @param theX,theY,theZ Coordinates of the sought vertex.
7413         #  @param theEpsilon Maximum allowed distance between the resulting
7414         #                    vertex and point with the given coordinates.
7415         #  @return New GEOM.GEOM_Object, containing the found vertex.
7416         #
7417         #  @ref swig_GetPoint "Example"
7418         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon):
7419             """
7420             Get a vertex, found in the given shape by its coordinates.
7421
7422             Parameters: 
7423                 theShape Block or a compound of blocks.
7424                 theX,theY,theZ Coordinates of the sought vertex.
7425                 theEpsilon Maximum allowed distance between the resulting
7426                            vertex and point with the given coordinates.
7427
7428             Returns:                  
7429                 New GEOM.GEOM_Object, containing the found vertex.
7430
7431             Example of usage:
7432                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
7433             """
7434             # Example: see GEOM_TestOthers.py
7435             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
7436             RaiseIfFailed("GetPoint", self.BlocksOp)
7437             return anObj
7438
7439         ## Find a vertex of the given shape, which has minimal distance to the given point.
7440         #  @param theShape Any shape.
7441         #  @param thePoint Point, close to the desired vertex.
7442         #  @return New GEOM.GEOM_Object, containing the found vertex.
7443         #
7444         #  @ref swig_GetVertexNearPoint "Example"
7445         def GetVertexNearPoint(self, theShape, thePoint):
7446             """
7447             Find a vertex of the given shape, which has minimal distance to the given point.
7448
7449             Parameters: 
7450                 theShape Any shape.
7451                 thePoint Point, close to the desired vertex.
7452
7453             Returns:
7454                 New GEOM.GEOM_Object, containing the found vertex.
7455
7456             Example of usage:
7457                 pmidle = geompy.MakeVertex(50, 0, 50)
7458                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
7459             """
7460             # Example: see GEOM_TestOthers.py
7461             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
7462             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
7463             return anObj
7464
7465         ## Get an edge, found in the given shape by two given vertices.
7466         #  @param theShape Block or a compound of blocks.
7467         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
7468         #  @return New GEOM.GEOM_Object, containing the found edge.
7469         #
7470         #  @ref swig_GetEdge "Example"
7471         def GetEdge(self, theShape, thePoint1, thePoint2):
7472             """
7473             Get an edge, found in the given shape by two given vertices.
7474
7475             Parameters: 
7476                 theShape Block or a compound of blocks.
7477                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
7478
7479             Returns:
7480                 New GEOM.GEOM_Object, containing the found edge.
7481             """
7482             # Example: see GEOM_Spanner.py
7483             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
7484             RaiseIfFailed("GetEdge", self.BlocksOp)
7485             return anObj
7486
7487         ## Find an edge of the given shape, which has minimal distance to the given point.
7488         #  @param theShape Block or a compound of blocks.
7489         #  @param thePoint Point, close to the desired edge.
7490         #  @return New GEOM.GEOM_Object, containing the found edge.
7491         #
7492         #  @ref swig_GetEdgeNearPoint "Example"
7493         def GetEdgeNearPoint(self, theShape, thePoint):
7494             """
7495             Find an edge of the given shape, which has minimal distance to the given point.
7496
7497             Parameters: 
7498                 theShape Block or a compound of blocks.
7499                 thePoint Point, close to the desired edge.
7500
7501             Returns:
7502                 New GEOM.GEOM_Object, containing the found edge.
7503             """
7504             # Example: see GEOM_TestOthers.py
7505             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
7506             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
7507             return anObj
7508
7509         ## Returns a face, found in the given shape by four given corner vertices.
7510         #  @param theShape Block or a compound of blocks.
7511         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
7512         #  @return New GEOM.GEOM_Object, containing the found face.
7513         #
7514         #  @ref swig_todo "Example"
7515         def GetFaceByPoints(self,theShape, thePoint1, thePoint2, thePoint3, thePoint4):
7516             """
7517             Returns a face, found in the given shape by four given corner vertices.
7518
7519             Parameters:
7520                 theShape Block or a compound of blocks.
7521                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
7522
7523             Returns:
7524                 New GEOM.GEOM_Object, containing the found face.
7525             """
7526             # Example: see GEOM_Spanner.py
7527             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
7528             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
7529             return anObj
7530
7531         ## Get a face of block, found in the given shape by two given edges.
7532         #  @param theShape Block or a compound of blocks.
7533         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
7534         #  @return New GEOM.GEOM_Object, containing the found face.
7535         #
7536         #  @ref swig_todo "Example"
7537         def GetFaceByEdges(self,theShape, theEdge1, theEdge2):
7538             """
7539             Get a face of block, found in the given shape by two given edges.
7540
7541             Parameters:
7542                 theShape Block or a compound of blocks.
7543                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
7544
7545             Returns:
7546                 New GEOM.GEOM_Object, containing the found face.
7547             """
7548             # Example: see GEOM_Spanner.py
7549             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
7550             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
7551             return anObj
7552
7553         ## Find a face, opposite to the given one in the given block.
7554         #  @param theBlock Must be a hexahedral solid.
7555         #  @param theFace Face of \a theBlock, opposite to the desired face.
7556         #  @return New GEOM.GEOM_Object, containing the found face.
7557         #
7558         #  @ref swig_GetOppositeFace "Example"
7559         def GetOppositeFace(self,theBlock, theFace):
7560             """
7561             Find a face, opposite to the given one in the given block.
7562
7563             Parameters:
7564                 theBlock Must be a hexahedral solid.
7565                 theFace Face of theBlock, opposite to the desired face.
7566
7567             Returns: 
7568                 New GEOM.GEOM_Object, containing the found face.
7569             """
7570             # Example: see GEOM_Spanner.py
7571             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
7572             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
7573             return anObj
7574
7575         ## Find a face of the given shape, which has minimal distance to the given point.
7576         #  @param theShape Block or a compound of blocks.
7577         #  @param thePoint Point, close to the desired face.
7578         #  @return New GEOM.GEOM_Object, containing the found face.
7579         #
7580         #  @ref swig_GetFaceNearPoint "Example"
7581         def GetFaceNearPoint(self, theShape, thePoint):
7582             """
7583             Find a face of the given shape, which has minimal distance to the given point.
7584
7585             Parameters:
7586                 theShape Block or a compound of blocks.
7587                 thePoint Point, close to the desired face.
7588
7589             Returns:
7590                 New GEOM.GEOM_Object, containing the found face.
7591             """
7592             # Example: see GEOM_Spanner.py
7593             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
7594             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
7595             return anObj
7596
7597         ## Find a face of block, whose outside normale has minimal angle with the given vector.
7598         #  @param theBlock Block or a compound of blocks.
7599         #  @param theVector Vector, close to the normale of the desired face.
7600         #  @return New GEOM.GEOM_Object, containing the found face.
7601         #
7602         #  @ref swig_todo "Example"
7603         def GetFaceByNormale(self, theBlock, theVector):
7604             """
7605             Find a face of block, whose outside normale has minimal angle with the given vector.
7606
7607             Parameters:
7608                 theBlock Block or a compound of blocks.
7609                 theVector Vector, close to the normale of the desired face.
7610
7611             Returns:
7612                 New GEOM.GEOM_Object, containing the found face.
7613             """
7614             # Example: see GEOM_Spanner.py
7615             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
7616             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
7617             return anObj
7618
7619         ## Find all sub-shapes of type \a theShapeType of the given shape,
7620         #  which have minimal distance to the given point.
7621         #  @param theShape Any shape.
7622         #  @param thePoint Point, close to the desired shape.
7623         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
7624         #  @param theTolerance The tolerance for distances comparison. All shapes
7625         #                      with distances to the given point in interval
7626         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
7627         #  @return New GEOM_Object, containing a group of all found shapes.
7628         #
7629         #  @ref swig_GetShapesNearPoint "Example"
7630         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07):
7631             """
7632             Find all sub-shapes of type theShapeType of the given shape,
7633             which have minimal distance to the given point.
7634
7635             Parameters:
7636                 theShape Any shape.
7637                 thePoint Point, close to the desired shape.
7638                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
7639                 theTolerance The tolerance for distances comparison. All shapes
7640                                 with distances to the given point in interval
7641                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
7642
7643             Returns:
7644                 New GEOM_Object, containing a group of all found shapes.
7645             """
7646             # Example: see GEOM_TestOthers.py
7647             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
7648             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
7649             return anObj
7650
7651         # end of l3_blocks_op
7652         ## @}
7653
7654         ## @addtogroup l4_blocks_measure
7655         ## @{
7656
7657         ## Check, if the compound of blocks is given.
7658         #  To be considered as a compound of blocks, the
7659         #  given shape must satisfy the following conditions:
7660         #  - Each element of the compound should be a Block (6 faces and 12 edges).
7661         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
7662         #  - The compound should be connexe.
7663         #  - The glue between two quadrangle faces should be applied.
7664         #  @param theCompound The compound to check.
7665         #  @return TRUE, if the given shape is a compound of blocks.
7666         #  If theCompound is not valid, prints all discovered errors.
7667         #
7668         #  @ref tui_measurement_tools_page "Example 1"
7669         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
7670         def CheckCompoundOfBlocks(self,theCompound):
7671             """
7672             Check, if the compound of blocks is given.
7673             To be considered as a compound of blocks, the
7674             given shape must satisfy the following conditions:
7675             - Each element of the compound should be a Block (6 faces and 12 edges).
7676             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
7677             - The compound should be connexe.
7678             - The glue between two quadrangle faces should be applied.
7679
7680             Parameters:
7681                 theCompound The compound to check.
7682
7683             Returns:
7684                 TRUE, if the given shape is a compound of blocks.
7685                 If theCompound is not valid, prints all discovered errors.            
7686             """
7687             # Example: see GEOM_Spanner.py
7688             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
7689             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
7690             if IsValid == 0:
7691                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
7692                 print Descr
7693             return IsValid
7694
7695         ## Remove all seam and degenerated edges from \a theShape.
7696         #  Unite faces and edges, sharing one surface. It means that
7697         #  this faces must have references to one C++ surface object (handle).
7698         #  @param theShape The compound or single solid to remove irregular edges from.
7699         #  @param doUnionFaces If True, then unite faces. If False (the default value),
7700         #         do not unite faces.
7701         #  @return Improved shape.
7702         #
7703         #  @ref swig_RemoveExtraEdges "Example"
7704         def RemoveExtraEdges(self, theShape, doUnionFaces=False):
7705             """
7706             Remove all seam and degenerated edges from theShape.
7707             Unite faces and edges, sharing one surface. It means that
7708             this faces must have references to one C++ surface object (handle).
7709
7710             Parameters:
7711                 theShape The compound or single solid to remove irregular edges from.
7712                 doUnionFaces If True, then unite faces. If False (the default value),
7713                              do not unite faces.
7714
7715             Returns: 
7716                 Improved shape.
7717             """
7718             # Example: see GEOM_TestOthers.py
7719             nbFacesOptimum = -1 # -1 means do not unite faces
7720             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
7721             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
7722             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
7723             return anObj
7724
7725         ## Check, if the given shape is a blocks compound.
7726         #  Fix all detected errors.
7727         #    \note Single block can be also fixed by this method.
7728         #  @param theShape The compound to check and improve.
7729         #  @return Improved compound.
7730         #
7731         #  @ref swig_CheckAndImprove "Example"
7732         def CheckAndImprove(self,theShape):
7733             """
7734             Check, if the given shape is a blocks compound.
7735             Fix all detected errors.
7736
7737             Note:
7738                 Single block can be also fixed by this method.
7739
7740             Parameters:
7741                 theShape The compound to check and improve.
7742
7743             Returns: 
7744                 Improved compound.
7745             """
7746             # Example: see GEOM_TestOthers.py
7747             anObj = self.BlocksOp.CheckAndImprove(theShape)
7748             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
7749             return anObj
7750
7751         # end of l4_blocks_measure
7752         ## @}
7753
7754         ## @addtogroup l3_blocks_op
7755         ## @{
7756
7757         ## Get all the blocks, contained in the given compound.
7758         #  @param theCompound The compound to explode.
7759         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
7760         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
7761         #    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
7762         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
7763         #
7764         #  @ref tui_explode_on_blocks "Example 1"
7765         #  \n @ref swig_MakeBlockExplode "Example 2"
7766         def MakeBlockExplode(self,theCompound, theMinNbFaces, theMaxNbFaces):
7767             """
7768             Get all the blocks, contained in the given compound.
7769
7770             Parameters:
7771                 theCompound The compound to explode.
7772                 theMinNbFaces If solid has lower number of faces, it is not a block.
7773                 theMaxNbFaces If solid has higher number of faces, it is not a block.
7774
7775             Note:
7776                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
7777
7778             Returns:  
7779                 List of GEOM.GEOM_Object, containing the retrieved blocks.
7780             """
7781             # Example: see GEOM_TestOthers.py
7782             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
7783             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
7784             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
7785             for anObj in aList:
7786                 anObj.SetParameters(Parameters)
7787                 pass
7788             return aList
7789
7790         ## Find block, containing the given point inside its volume or on boundary.
7791         #  @param theCompound Compound, to find block in.
7792         #  @param thePoint Point, close to the desired block. If the point lays on
7793         #         boundary between some blocks, we return block with nearest center.
7794         #  @return New GEOM.GEOM_Object, containing the found block.
7795         #
7796         #  @ref swig_todo "Example"
7797         def GetBlockNearPoint(self,theCompound, thePoint):
7798             """
7799             Find block, containing the given point inside its volume or on boundary.
7800
7801             Parameters:
7802                 theCompound Compound, to find block in.
7803                 thePoint Point, close to the desired block. If the point lays on
7804                          boundary between some blocks, we return block with nearest center.
7805
7806             Returns:
7807                 New GEOM.GEOM_Object, containing the found block.
7808             """
7809             # Example: see GEOM_Spanner.py
7810             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
7811             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
7812             return anObj
7813
7814         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
7815         #  @param theCompound Compound, to find block in.
7816         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
7817         #  @return New GEOM.GEOM_Object, containing the found block.
7818         #
7819         #  @ref swig_GetBlockByParts "Example"
7820         def GetBlockByParts(self,theCompound, theParts):
7821             """
7822              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
7823
7824              Parameters:
7825                 theCompound Compound, to find block in.
7826                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
7827
7828             Returns: 
7829                 New GEOM_Object, containing the found block.
7830             """
7831             # Example: see GEOM_TestOthers.py
7832             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
7833             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
7834             return anObj
7835
7836         ## Return all blocks, containing all the elements, passed as the parts.
7837         #  @param theCompound Compound, to find blocks in.
7838         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
7839         #  @return List of GEOM.GEOM_Object, containing the found blocks.
7840         #
7841         #  @ref swig_todo "Example"
7842         def GetBlocksByParts(self,theCompound, theParts):
7843             """
7844             Return all blocks, containing all the elements, passed as the parts.
7845
7846             Parameters:
7847                 theCompound Compound, to find blocks in.
7848                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
7849
7850             Returns:
7851                 List of GEOM.GEOM_Object, containing the found blocks.
7852             """
7853             # Example: see GEOM_Spanner.py
7854             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
7855             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
7856             return aList
7857
7858         ## Multi-transformate block and glue the result.
7859         #  Transformation is defined so, as to superpose direction faces.
7860         #  @param Block Hexahedral solid to be multi-transformed.
7861         #  @param DirFace1 ID of First direction face.
7862         #  @param DirFace2 ID of Second direction face.
7863         #  @param NbTimes Quantity of transformations to be done.
7864         #    \note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
7865         #  @return New GEOM.GEOM_Object, containing the result shape.
7866         #
7867         #  @ref tui_multi_transformation "Example"
7868         def MakeMultiTransformation1D(self,Block, DirFace1, DirFace2, NbTimes):
7869             """
7870             Multi-transformate block and glue the result.
7871             Transformation is defined so, as to superpose direction faces.
7872
7873             Parameters:
7874                 Block Hexahedral solid to be multi-transformed.
7875                 DirFace1 ID of First direction face.
7876                 DirFace2 ID of Second direction face.
7877                 NbTimes Quantity of transformations to be done.
7878
7879             Note:
7880                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
7881
7882             Returns:
7883                 New GEOM.GEOM_Object, containing the result shape.
7884             """
7885             # Example: see GEOM_Spanner.py
7886             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
7887             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
7888             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
7889             anObj.SetParameters(Parameters)
7890             return anObj
7891
7892         ## Multi-transformate block and glue the result.
7893         #  @param Block Hexahedral solid to be multi-transformed.
7894         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
7895         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
7896         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
7897         #  @return New GEOM.GEOM_Object, containing the result shape.
7898         #
7899         #  @ref tui_multi_transformation "Example"
7900         def MakeMultiTransformation2D(self,Block, DirFace1U, DirFace2U, NbTimesU,
7901                                       DirFace1V, DirFace2V, NbTimesV):
7902             """
7903             Multi-transformate block and glue the result.
7904
7905             Parameters:
7906                 Block Hexahedral solid to be multi-transformed.
7907                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
7908                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
7909                 NbTimesU,NbTimesV Quantity of transformations to be done.
7910
7911             Returns:
7912                 New GEOM.GEOM_Object, containing the result shape.
7913             """
7914             # Example: see GEOM_Spanner.py
7915             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
7916               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
7917             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
7918                                                             DirFace1V, DirFace2V, NbTimesV)
7919             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
7920             anObj.SetParameters(Parameters)
7921             return anObj
7922
7923         ## Build all possible propagation groups.
7924         #  Propagation group is a set of all edges, opposite to one (main)
7925         #  edge of this group directly or through other opposite edges.
7926         #  Notion of Opposite Edge make sence only on quadrangle face.
7927         #  @param theShape Shape to build propagation groups on.
7928         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
7929         #
7930         #  @ref swig_Propagate "Example"
7931         def Propagate(self,theShape):
7932             """
7933             Build all possible propagation groups.
7934             Propagation group is a set of all edges, opposite to one (main)
7935             edge of this group directly or through other opposite edges.
7936             Notion of Opposite Edge make sence only on quadrangle face.
7937
7938             Parameters:
7939                 theShape Shape to build propagation groups on.
7940
7941             Returns:
7942                 List of GEOM.GEOM_Object, each of them is a propagation group.
7943             """
7944             # Example: see GEOM_TestOthers.py
7945             listChains = self.BlocksOp.Propagate(theShape)
7946             RaiseIfFailed("Propagate", self.BlocksOp)
7947             return listChains
7948
7949         # end of l3_blocks_op
7950         ## @}
7951
7952         ## @addtogroup l3_groups
7953         ## @{
7954
7955         ## Creates a new group which will store sub-shapes of theMainShape
7956         #  @param theMainShape is a GEOM object on which the group is selected
7957         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
7958         #  @return a newly created GEOM group
7959         #
7960         #  @ref tui_working_with_groups_page "Example 1"
7961         #  \n @ref swig_CreateGroup "Example 2"
7962         def CreateGroup(self,theMainShape, theShapeType):
7963             """
7964             Creates a new group which will store sub-shapes of theMainShape
7965
7966             Parameters:
7967                theMainShape is a GEOM object on which the group is selected
7968                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
7969                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
7970
7971             Returns:
7972                a newly created GEOM group
7973
7974             Example of usage:
7975                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
7976                 
7977             """
7978             # Example: see GEOM_TestOthers.py
7979             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
7980             RaiseIfFailed("CreateGroup", self.GroupOp)
7981             return anObj
7982
7983         ## Adds a sub-object with ID theSubShapeId to the group
7984         #  @param theGroup is a GEOM group to which the new sub-shape is added
7985         #  @param theSubShapeID is a sub-shape ID in the main object.
7986         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
7987         #
7988         #  @ref tui_working_with_groups_page "Example"
7989         def AddObject(self,theGroup, theSubShapeID):
7990             """
7991             Adds a sub-object with ID theSubShapeId to the group
7992
7993             Parameters:
7994                 theGroup       is a GEOM group to which the new sub-shape is added
7995                 theSubShapeID  is a sub-shape ID in the main object.
7996
7997             Note:
7998                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
7999             """
8000             # Example: see GEOM_TestOthers.py
8001             self.GroupOp.AddObject(theGroup, theSubShapeID)
8002             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
8003                 RaiseIfFailed("AddObject", self.GroupOp)
8004                 pass
8005             pass
8006
8007         ## Removes a sub-object with ID \a theSubShapeId from the group
8008         #  @param theGroup is a GEOM group from which the new sub-shape is removed
8009         #  @param theSubShapeID is a sub-shape ID in the main object.
8010         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
8011         #
8012         #  @ref tui_working_with_groups_page "Example"
8013         def RemoveObject(self,theGroup, theSubShapeID):
8014             """
8015             Removes a sub-object with ID theSubShapeId from the group
8016
8017             Parameters:
8018                 theGroup is a GEOM group from which the new sub-shape is removed
8019                 theSubShapeID is a sub-shape ID in the main object.
8020
8021             Note:
8022                 Use method GetSubShapeID() to get an unique ID of the sub-shape
8023             """
8024             # Example: see GEOM_TestOthers.py
8025             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
8026             RaiseIfFailed("RemoveObject", self.GroupOp)
8027             pass
8028
8029         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
8030         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
8031         #  @param theSubShapes is a list of sub-shapes to be added.
8032         #
8033         #  @ref tui_working_with_groups_page "Example"
8034         def UnionList (self,theGroup, theSubShapes):
8035             """
8036             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
8037
8038             Parameters:
8039                 theGroup is a GEOM group to which the new sub-shapes are added.
8040                 theSubShapes is a list of sub-shapes to be added.
8041             """
8042             # Example: see GEOM_TestOthers.py
8043             self.GroupOp.UnionList(theGroup, theSubShapes)
8044             RaiseIfFailed("UnionList", self.GroupOp)
8045             pass
8046
8047         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
8048         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
8049         #  @param theSubShapes is a list of indices of sub-shapes to be added.
8050         #
8051         #  @ref swig_UnionIDs "Example"
8052         def UnionIDs(self,theGroup, theSubShapes):
8053             """
8054             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
8055
8056             Parameters:
8057                 theGroup is a GEOM group to which the new sub-shapes are added.
8058                 theSubShapes is a list of indices of sub-shapes to be added.
8059             """
8060             # Example: see GEOM_TestOthers.py
8061             self.GroupOp.UnionIDs(theGroup, theSubShapes)
8062             RaiseIfFailed("UnionIDs", self.GroupOp)
8063             pass
8064
8065         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
8066         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
8067         #  @param theSubShapes is a list of sub-shapes to be removed.
8068         #
8069         #  @ref tui_working_with_groups_page "Example"
8070         def DifferenceList (self,theGroup, theSubShapes):
8071             """
8072             Removes from the group all the given shapes. No errors, if some shapes are not included.
8073
8074             Parameters:
8075                 theGroup is a GEOM group from which the sub-shapes are removed.
8076                 theSubShapes is a list of sub-shapes to be removed.
8077             """
8078             # Example: see GEOM_TestOthers.py
8079             self.GroupOp.DifferenceList(theGroup, theSubShapes)
8080             RaiseIfFailed("DifferenceList", self.GroupOp)
8081             pass
8082
8083         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
8084         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
8085         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
8086         #
8087         #  @ref swig_DifferenceIDs "Example"
8088         def DifferenceIDs(self,theGroup, theSubShapes):
8089             """
8090             Removes from the group all the given shapes. No errors, if some shapes are not included.
8091
8092             Parameters:
8093                 theGroup is a GEOM group from which the sub-shapes are removed.
8094                 theSubShapes is a list of indices of sub-shapes to be removed.
8095             """            
8096             # Example: see GEOM_TestOthers.py
8097             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
8098             RaiseIfFailed("DifferenceIDs", self.GroupOp)
8099             pass
8100
8101         ## Returns a list of sub-objects ID stored in the group
8102         #  @param theGroup is a GEOM group for which a list of IDs is requested
8103         #
8104         #  @ref swig_GetObjectIDs "Example"
8105         def GetObjectIDs(self,theGroup):
8106             """
8107             Returns a list of sub-objects ID stored in the group
8108
8109             Parameters:
8110                 theGroup is a GEOM group for which a list of IDs is requested
8111             """
8112             # Example: see GEOM_TestOthers.py
8113             ListIDs = self.GroupOp.GetObjects(theGroup)
8114             RaiseIfFailed("GetObjects", self.GroupOp)
8115             return ListIDs
8116
8117         ## Returns a type of sub-objects stored in the group
8118         #  @param theGroup is a GEOM group which type is returned.
8119         #
8120         #  @ref swig_GetType "Example"
8121         def GetType(self,theGroup):
8122             """
8123             Returns a type of sub-objects stored in the group
8124
8125             Parameters:
8126                 theGroup is a GEOM group which type is returned.
8127             """
8128             # Example: see GEOM_TestOthers.py
8129             aType = self.GroupOp.GetType(theGroup)
8130             RaiseIfFailed("GetType", self.GroupOp)
8131             return aType
8132
8133         ## Convert a type of geom object from id to string value
8134         #  @param theId is a GEOM obect type id.
8135         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
8136         #  @ref swig_GetType "Example"
8137         def ShapeIdToType(self, theId):
8138             """
8139             Convert a type of geom object from id to string value
8140
8141             Parameters:
8142                 theId is a GEOM obect type id.
8143                 
8144             Returns:
8145                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
8146             """
8147             if theId == 0:
8148                 return "COPY"
8149             if theId == 1:
8150                 return "IMPORT"
8151             if theId == 2:
8152                 return "POINT"
8153             if theId == 3:
8154                 return "VECTOR"
8155             if theId == 4:
8156                 return "PLANE"
8157             if theId == 5:
8158                 return "LINE"
8159             if theId == 6:
8160                 return "TORUS"
8161             if theId == 7:
8162                 return "BOX"
8163             if theId == 8:
8164                 return "CYLINDER"
8165             if theId == 9:
8166                 return "CONE"
8167             if theId == 10:
8168                 return "SPHERE"
8169             if theId == 11:
8170                 return "PRISM"
8171             if theId == 12:
8172                 return "REVOLUTION"
8173             if theId == 13:
8174                 return "BOOLEAN"
8175             if theId == 14:
8176                 return "PARTITION"
8177             if theId == 15:
8178                 return "POLYLINE"
8179             if theId == 16:
8180                 return "CIRCLE"
8181             if theId == 17:
8182                 return "SPLINE"
8183             if theId == 18:
8184                 return "ELLIPSE"
8185             if theId == 19:
8186                 return "CIRC_ARC"
8187             if theId == 20:
8188                 return "FILLET"
8189             if theId == 21:
8190                 return "CHAMFER"
8191             if theId == 22:
8192                 return "EDGE"
8193             if theId == 23:
8194                 return "WIRE"
8195             if theId == 24:
8196                 return "FACE"
8197             if theId == 25:
8198                 return "SHELL"
8199             if theId == 26:
8200                 return "SOLID"
8201             if theId == 27:
8202                 return "COMPOUND"
8203             if theId == 28:
8204                 return "SUBSHAPE"
8205             if theId == 29:
8206                 return "PIPE"
8207             if theId == 30:
8208                 return "ARCHIMEDE"
8209             if theId == 31:
8210                 return "FILLING"
8211             if theId == 32:
8212                 return "EXPLODE"
8213             if theId == 33:
8214                 return "GLUED"
8215             if theId == 34:
8216                 return "SKETCHER"
8217             if theId == 35:
8218                 return "CDG"
8219             if theId == 36:
8220                 return "FREE_BOUNDS"
8221             if theId == 37:
8222                 return "GROUP"
8223             if theId == 38:
8224                 return "BLOCK"
8225             if theId == 39:
8226                 return "MARKER"
8227             if theId == 40:
8228                 return "THRUSECTIONS"
8229             if theId == 41:
8230                 return "COMPOUNDFILTER"
8231             if theId == 42:
8232                 return "SHAPES_ON_SHAPE"
8233             if theId == 43:
8234                 return "ELLIPSE_ARC"
8235             if theId == 44:
8236                 return "3DSKETCHER"
8237             if theId == 45:
8238                 return "FILLET_2D"
8239             if theId == 46:
8240                 return "FILLET_1D"
8241             if theId == 201:
8242                 return "PIPETSHAPE"
8243             return "Shape Id not exist."
8244
8245         ## Returns a main shape associated with the group
8246         #  @param theGroup is a GEOM group for which a main shape object is requested
8247         #  @return a GEOM object which is a main shape for theGroup
8248         #
8249         #  @ref swig_GetMainShape "Example"
8250         def GetMainShape(self,theGroup):
8251             """
8252             Returns a main shape associated with the group
8253
8254             Parameters:
8255                 theGroup is a GEOM group for which a main shape object is requested
8256
8257             Returns:
8258                 a GEOM object which is a main shape for theGroup
8259
8260             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
8261             """
8262             # Example: see GEOM_TestOthers.py
8263             anObj = self.GroupOp.GetMainShape(theGroup)
8264             RaiseIfFailed("GetMainShape", self.GroupOp)
8265             return anObj
8266
8267         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
8268         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
8269         #  @param theShape given shape (see GEOM.GEOM_Object)
8270         #  @param min_length minimum length of edges of theShape
8271         #  @param max_length maximum length of edges of theShape
8272         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8273         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8274         #  @return a newly created GEOM group of edges
8275         #  @@ref swig_todo "Example"
8276         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1):
8277             """
8278             Create group of edges of theShape, 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
8281             Parameters:
8282                 theShape given shape
8283                 min_length minimum length of edges of theShape
8284                 max_length maximum length of edges of theShape
8285                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8286                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8287
8288              Returns:
8289                 a newly created GEOM group of edges.
8290             """
8291             edges = self.SubShapeAll(theShape, ShapeType["EDGE"])
8292             edges_in_range = []
8293             for edge in edges:
8294                 Props = self.BasicProperties(edge)
8295                 if min_length <= Props[0] and Props[0] <= max_length:
8296                     if (not include_min) and (min_length == Props[0]):
8297                         skip = 1
8298                     else:
8299                         if (not include_max) and (Props[0] == max_length):
8300                             skip = 1
8301                         else:
8302                             edges_in_range.append(edge)
8303
8304             if len(edges_in_range) <= 0:
8305                 print "No edges found by given criteria"
8306                 return 0
8307
8308             group_edges = self.CreateGroup(theShape, ShapeType["EDGE"])
8309             self.UnionList(group_edges, edges_in_range)
8310
8311             return group_edges
8312
8313         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
8314         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
8315         #  @param min_length minimum length of edges of selected shape
8316         #  @param max_length maximum length of edges of selected shape
8317         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8318         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8319         #  @return a newly created GEOM group of edges
8320         #  @ref swig_todo "Example"
8321         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
8322             """
8323             Create group of edges of selected shape, whose length is in range [min_length, max_length].
8324             If include_min/max == 0, edges with length == min/max_length will not be included in result.
8325
8326             Parameters:
8327                 min_length minimum length of edges of selected shape
8328                 max_length maximum length of edges of selected shape
8329                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
8330                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
8331
8332              Returns:
8333                 a newly created GEOM group of edges.
8334             """
8335             nb_selected = sg.SelectedCount()
8336             if nb_selected < 1:
8337                 print "Select a shape before calling this function, please."
8338                 return 0
8339             if nb_selected > 1:
8340                 print "Only one shape must be selected"
8341                 return 0
8342
8343             id_shape = sg.getSelected(0)
8344             shape = IDToObject( id_shape )
8345
8346             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
8347
8348             left_str  = " < "
8349             right_str = " < "
8350             if include_min: left_str  = " <= "
8351             if include_max: right_str  = " <= "
8352
8353             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
8354                                     + left_str + "length" + right_str + `max_length`)
8355
8356             sg.updateObjBrowser(1)
8357
8358             return group_edges
8359
8360         # end of l3_groups
8361         ## @}
8362
8363         ## @addtogroup l4_advanced
8364         ## @{
8365
8366         ## Create a T-shape object with specified caracteristics for the main
8367         #  and the incident pipes (radius, width, half-length).
8368         #  The extremities of the main pipe are located on junctions points P1 and P2.
8369         #  The extremity of the incident pipe is located on junction point P3.
8370         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8371         #  the main plane of the T-shape is XOY.
8372         #  @param theR1 Internal radius of main pipe
8373         #  @param theW1 Width of main pipe
8374         #  @param theL1 Half-length of main pipe
8375         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8376         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8377         #  @param theL2 Half-length of incident pipe
8378         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8379         #  @param theP1 1st junction point of main pipe
8380         #  @param theP2 2nd junction point of main pipe
8381         #  @param theP3 Junction point of incident pipe
8382         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8383         #
8384         #  @ref tui_creation_pipetshape "Example"
8385         def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8386             """
8387             Create a T-shape object with specified caracteristics for the main
8388             and the incident pipes (radius, width, half-length).
8389             The extremities of the main pipe are located on junctions points P1 and P2.
8390             The extremity of the incident pipe is located on junction point P3.
8391             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8392             the main plane of the T-shape is XOY.
8393
8394             Paremeters:
8395                 theR1 Internal radius of main pipe
8396                 theW1 Width of main pipe
8397                 theL1 Half-length of main pipe
8398                 theR2 Internal radius of incident pipe (R2 < R1)
8399                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8400                 theL2 Half-length of incident pipe
8401                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8402                 theP1 1st junction point of main pipe
8403                 theP2 2nd junction point of main pipe
8404                 theP3 Junction point of incident pipe
8405
8406             Returns:
8407                 List of GEOM_Object, containing the created shape and propagation groups.
8408
8409             Example of usage:
8410                 # create PipeTShape object
8411                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
8412                 # create PipeTShape object with position
8413                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
8414             """
8415             theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)        
8416             if (theP1 and theP2 and theP3):
8417                 anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3)
8418             else:
8419                 anObj = self.AdvOp.MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh)
8420             RaiseIfFailed("MakePipeTShape", self.AdvOp)
8421             if Parameters: anObj[0].SetParameters(Parameters)
8422             return anObj
8423
8424         ## Create a T-shape object with chamfer and with specified caracteristics for the main
8425         #  and the incident pipes (radius, width, half-length). The chamfer is
8426         #  created on the junction of the pipes.
8427         #  The extremities of the main pipe are located on junctions points P1 and P2.
8428         #  The extremity of the incident pipe is located on junction point P3.
8429         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8430         #  the main plane of the T-shape is XOY.
8431         #  @param theR1 Internal radius of main pipe
8432         #  @param theW1 Width of main pipe
8433         #  @param theL1 Half-length of main pipe
8434         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8435         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8436         #  @param theL2 Half-length of incident pipe
8437         #  @param theH Height of the chamfer.
8438         #  @param theW Width of the chamfer.
8439         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8440         #  @param theP1 1st junction point of main pipe
8441         #  @param theP2 2nd junction point of main pipe
8442         #  @param theP3 Junction point of incident pipe
8443         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8444         #
8445         #  @ref tui_creation_pipetshape "Example"
8446         def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8447             """
8448             Create a T-shape object with chamfer and with specified caracteristics for the main
8449             and the incident pipes (radius, width, half-length). The chamfer is
8450             created on the junction of the pipes.
8451             The extremities of the main pipe are located on junctions points P1 and P2.
8452             The extremity of the incident pipe is located on junction point P3.
8453             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8454             the main plane of the T-shape is XOY.
8455
8456             Paremeters:
8457                 theR1 Internal radius of main pipe
8458                 theW1 Width of main pipe
8459                 theL1 Half-length of main pipe
8460                 theR2 Internal radius of incident pipe (R2 < R1)
8461                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8462                 theL2 Half-length of incident pipe
8463                 theH Height of the chamfer.
8464                 theW Width of the chamfer.
8465                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8466                 theP1 1st junction point of main pipe
8467                 theP2 2nd junction point of main pipe
8468                 theP3 Junction point of incident pipe
8469
8470             Returns:
8471                 List of GEOM_Object, containing the created shape and propagation groups.
8472
8473             Example of usage:
8474                 # create PipeTShape with chamfer object
8475                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
8476                 # create PipeTShape with chamfer object with position
8477                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
8478             """
8479             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW)
8480             if (theP1 and theP2 and theP3):
8481               anObj = self.AdvOp.MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3)
8482             else:
8483               anObj = self.AdvOp.MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh)
8484             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
8485             if Parameters: anObj[0].SetParameters(Parameters)
8486             return anObj
8487
8488         ## Create a T-shape object with fillet and with specified caracteristics for the main
8489         #  and the incident pipes (radius, width, half-length). The fillet is
8490         #  created on the junction of the pipes.
8491         #  The extremities of the main pipe are located on junctions points P1 and P2.
8492         #  The extremity of the incident pipe is located on junction point P3.
8493         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8494         #  the main plane of the T-shape is XOY.
8495         #  @param theR1 Internal radius of main pipe
8496         #  @param theW1 Width of main pipe
8497         #  @param theL1 Half-length of main pipe
8498         #  @param theR2 Internal radius of incident pipe (R2 < R1)
8499         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
8500         #  @param theL2 Half-length of incident pipe
8501         #  @param theRF Radius of curvature of fillet.
8502         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8503         #  @param theP1 1st junction point of main pipe
8504         #  @param theP2 2nd junction point of main pipe
8505         #  @param theP3 Junction point of incident pipe
8506         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
8507         #
8508         #  @ref tui_creation_pipetshape "Example"
8509         def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None):
8510             """
8511             Create a T-shape object with fillet and with specified caracteristics for the main
8512             and the incident pipes (radius, width, half-length). The fillet is
8513             created on the junction of the pipes.
8514             The extremities of the main pipe are located on junctions points P1 and P2.
8515             The extremity of the incident pipe is located on junction point P3.
8516
8517             Paremeters:
8518                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
8519                 the main plane of the T-shape is XOY.
8520                 theR1 Internal radius of main pipe
8521                 theW1 Width of main pipe
8522                 heL1 Half-length of main pipe
8523                 theR2 Internal radius of incident pipe (R2 < R1)
8524                 theW2 Width of incident pipe (R2+W2 < R1+W1)
8525                 theL2 Half-length of incident pipe
8526                 theRF Radius of curvature of fillet.
8527                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
8528                 theP1 1st junction point of main pipe
8529                 theP2 2nd junction point of main pipe
8530                 theP3 Junction point of incident pipe
8531                 
8532             Returns:
8533                 List of GEOM_Object, containing the created shape and propagation groups.
8534                 
8535             Example of usage:
8536                 # create PipeTShape with fillet object
8537                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
8538                 # create PipeTShape with fillet object with position
8539                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
8540         
8541             """
8542             theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
8543             if (theP1 and theP2 and theP3):
8544               anObj = self.AdvOp.MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3)
8545             else:
8546               anObj = self.AdvOp.MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh)
8547             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
8548             if Parameters: anObj[0].SetParameters(Parameters)
8549             return anObj
8550
8551         ## This function allows to create a disk already divided into blocks. It
8552         #  can be use to create divided pipes for later meshing in hexaedra.
8553         #  @param theR Radius of the disk
8554         #  @param theRatio Relative size of the central square diagonal against the disk diameter
8555         #  @return New GEOM_Object, containing the created shape.
8556         #
8557         #  @ref tui_creation_divideddisk "Example"
8558         def MakeDividedDisk(self, theR, theRatio):
8559             theR, theRatio, Parameters = ParseParameters(theR, theRatio)
8560             anObj = self.AdvOp.MakeDividedDisk(theR, theRatio)
8561             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
8562             if Parameters: anObj.SetParameters(Parameters)
8563             return anObj
8564
8565         #@@ insert new functions before this line @@ do not remove this line @@#
8566
8567         # end of l4_advanced
8568         ## @}
8569
8570         ## Create a copy of the given object
8571         #
8572         #  @param theOriginal geometry object for copy
8573         #  @return unique object identifier
8574         #  @ingroup l1_geompy_auxiliary
8575         #  @ref swig_MakeCopy "Example"
8576         def MakeCopy(self,theOriginal):
8577             """
8578             Create a copy of the given object
8579
8580             Paremeters:
8581                 theOriginal geometry object for copy
8582
8583             Returns:
8584                 unique object identifier
8585
8586             Example of usage: Copy = geompy.MakeCopy(Box)
8587             """
8588             # Example: see GEOM_TestAll.py
8589             anObj = self.InsertOp.MakeCopy(theOriginal)
8590             RaiseIfFailed("MakeCopy", self.InsertOp)
8591             return anObj
8592
8593         ## Add Path to load python scripts from
8594         #  @param Path a path to load python scripts from
8595         #  @ingroup l1_geompy_auxiliary
8596         def addPath(self,Path):
8597             """
8598             Add Path to load python scripts from
8599
8600             Parameters:
8601                 Path a path to load python scripts from
8602             """
8603             if (sys.path.count(Path) < 1):
8604                 sys.path.append(Path)
8605                 pass
8606             pass
8607
8608         ## Load marker texture from the file
8609         #  @param Path a path to the texture file
8610         #  @return unique texture identifier
8611         #  @ingroup l1_geompy_auxiliary
8612         def LoadTexture(self, Path):
8613             """
8614             Load marker texture from the file
8615             
8616             Parameters:
8617                 Path a path to the texture file
8618                 
8619             Returns:
8620                 unique texture identifier
8621             """
8622             # Example: see GEOM_TestAll.py
8623             ID = self.InsertOp.LoadTexture(Path)
8624             RaiseIfFailed("LoadTexture", self.InsertOp)
8625             return ID
8626
8627         ## Get entry of the object
8628         #  @param obj geometry object
8629         #  @return unique object identifier
8630         #  @ingroup l1_geompy_auxiliary
8631         def getObjectID(self, obj):
8632             """
8633             Get entry of the object
8634
8635             Parameters:
8636                 obj geometry object
8637
8638             Returns:
8639                 unique object identifier
8640             """
8641             ID = ""
8642             entry = salome.ObjectToID(obj)
8643             if entry is not None:
8644                 lst = entry.split(":")
8645                 if len(lst) > 0:
8646                     ID = lst[-1] # -1 means last item in the list            
8647                     return "GEOM_" + ID
8648             return ID
8649                 
8650             
8651
8652         ## Add marker texture. @a Width and @a Height parameters
8653         #  specify width and height of the texture in pixels.
8654         #  If @a RowData is @c True, @a Texture parameter should represent texture data
8655         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
8656         #  parameter should be unpacked string, in which '1' symbols represent opaque
8657         #  pixels and '0' represent transparent pixels of the texture bitmap.
8658         #
8659         #  @param Width texture width in pixels
8660         #  @param Height texture height in pixels
8661         #  @param Texture texture data
8662         #  @param RowData if @c True, @a Texture data are packed in the byte stream
8663         #  @return unique texture identifier
8664         #  @ingroup l1_geompy_auxiliary
8665         def AddTexture(self, Width, Height, Texture, RowData=False):
8666             """
8667             Add marker texture. Width and Height parameters
8668             specify width and height of the texture in pixels.
8669             If RowData is True, Texture parameter should represent texture data
8670             packed into the byte array. If RowData is False (default), Texture
8671             parameter should be unpacked string, in which '1' symbols represent opaque
8672             pixels and '0' represent transparent pixels of the texture bitmap.
8673
8674             Parameters:
8675                 Width texture width in pixels
8676                 Height texture height in pixels
8677                 Texture texture data
8678                 RowData if True, Texture data are packed in the byte stream
8679
8680             Returns:
8681                 return unique texture identifier
8682             """
8683             if not RowData: Texture = PackData(Texture)
8684             ID = self.InsertOp.AddTexture(Width, Height, Texture)
8685             RaiseIfFailed("AddTexture", self.InsertOp)
8686             return ID
8687
8688 import omniORB
8689 #Register the new proxy for GEOM_Gen
8690 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geompyDC)