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