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