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