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