]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_SWIG/geompyDC.py
Salome HOME
Merge from V6_2_BR 23/12/2010
[modules/geom.git] / src / GEOM_SWIG / geompyDC.py
1 #  -*- coding: iso-8859-1 -*-
2 #  Copyright (C) 2007-2010  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 #  GEOM GEOM_SWIG : binding of C++ omplementaion with Python
21 #  File   : geompy.py
22 #  Author : Paul RASCLE, EDF
23 #  Module : GEOM
24
25 """
26     \namespace geompy
27     \brief Module geompy
28 """
29
30 ## @defgroup l1_geompy_auxiliary Auxiliary data structures and methods
31
32 ## @defgroup l1_geompy_purpose   All package methods, grouped by their purpose
33 ## @{
34 ##   @defgroup l2_import_export Importing/exporting geometrical objects
35 ##   @defgroup l2_creating      Creating geometrical objects
36 ##   @{
37 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
38 ##     @{
39 ##       @defgroup l4_curves        Creating Curves
40
41 ##     @}
42 ##     @defgroup l3_3d_primitives Creating 3D Primitives
43 ##     @defgroup l3_complex       Creating Complex Objects
44 ##     @defgroup l3_groups        Working with groups
45 ##     @defgroup l3_blocks        Building by blocks
46 ##     @{
47 ##       @defgroup l4_blocks_measure Check and Improve
48
49 ##     @}
50 ##     @defgroup l3_sketcher      Sketcher
51 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
52 ##     @{
53 ##       @defgroup l4_decompose     Decompose objects
54 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
55 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
56 ##       @defgroup l4_obtain        Access to subshapes by a criteria
57 ##       @defgroup l4_advanced      Advanced objects creation functions
58
59 ##     @}
60
61 ##   @}
62 ##   @defgroup l2_transforming  Transforming geometrical objects
63 ##   @{
64 ##     @defgroup l3_basic_op      Basic Operations
65 ##     @defgroup l3_boolean       Boolean Operations
66 ##     @defgroup l3_transform     Transformation Operations
67 ##     @defgroup l3_local         Local Operations (Fillet and Chamfer)
68 ##     @defgroup l3_blocks_op     Blocks Operations
69 ##     @defgroup l3_healing       Repairing Operations
70 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of subshapes
71
72 ##   @}
73 ##   @defgroup l2_measure       Using measurement tools
74
75 ## @}
76
77 import salome
78 salome.salome_init()
79 from salome import *
80
81 from salome_notebook import *
82
83 import GEOM
84 import math
85
86 ## Enumeration ShapeType as a dictionary
87 #  @ingroup l1_geompy_auxiliary
88 ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
89
90 ## Raise an Error, containing the Method_name, if Operation is Failed
91 ## @ingroup l1_geompy_auxiliary
92 def RaiseIfFailed (Method_name, Operation):
93     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
94         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
95
96 ## Return list of variables value from salome notebook
97 ## @ingroup l1_geompy_auxiliary
98 def ParseParameters(*parameters):
99     Result = []
100     StringResult = []
101     for parameter in parameters:
102         if isinstance(parameter, list):
103             lResults = ParseParameters(*parameter)
104             if len(lResults) > 0:
105                 Result.append(lResults[:-1])
106                 StringResult += lResults[-1].split(":")
107                 pass
108             pass
109         else:
110             if isinstance(parameter,str):
111                 if notebook.isVariable(parameter):
112                     Result.append(notebook.get(parameter))
113                 else:
114                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
115                 pass
116             else:
117                 Result.append(parameter)
118                 pass
119             StringResult.append(str(parameter))
120             pass
121         pass
122     if Result:
123         Result.append(":".join(StringResult))
124     else:
125         Result = ":".join(StringResult)
126     return Result
127
128 ## Return list of variables value from salome notebook
129 ## @ingroup l1_geompy_auxiliary
130 def ParseList(list):
131     Result = []
132     StringResult = ""
133     for parameter in list:
134         if isinstance(parameter,str) and notebook.isVariable(parameter):
135             Result.append(str(notebook.get(parameter)))
136             pass
137         else:
138             Result.append(str(parameter))
139             pass
140
141         StringResult = StringResult + str(parameter)
142         StringResult = StringResult + ":"
143         pass
144     StringResult = StringResult[:len(StringResult)-1]
145     return Result, StringResult
146
147 ## Return list of variables value from salome notebook
148 ## @ingroup l1_geompy_auxiliary
149 def ParseSketcherCommand(command):
150     Result = ""
151     StringResult = ""
152     sections = command.split(":")
153     for section in sections:
154         parameters = section.split(" ")
155         paramIndex = 1
156         for parameter in parameters:
157             if paramIndex > 1 and parameter.find("'") != -1:
158                 parameter = parameter.replace("'","")
159                 if notebook.isVariable(parameter):
160                     Result = Result + str(notebook.get(parameter)) + " "
161                     pass
162                 else:
163                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
164                     pass
165                 pass
166             else:
167                 Result = Result + str(parameter) + " "
168                 pass
169             if paramIndex > 1:
170                 StringResult = StringResult + parameter
171                 StringResult = StringResult + ":"
172                 pass
173             paramIndex = paramIndex + 1
174             pass
175         Result = Result[:len(Result)-1] + ":"
176         pass
177     Result = Result[:len(Result)-1]
178     return Result, StringResult
179
180 ## Helper function which can be used to pack the passed string to the byte data.
181 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
182 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
183 ## For example,
184 ## \code
185 ## val = PackData("10001110") # val = 0xAE
186 ## val = PackData("1")        # val = 0x80
187 ## \endcode
188 ## @param data unpacked data - a string containing '1' and '0' symbols
189 ## @return data packed to the byte stream
190 ## @ingroup l1_geompy_auxiliary
191 def PackData(data):
192     bytes = len(data)/8
193     if len(data)%8: bytes += 1
194     res = ""
195     for b in range(bytes):
196         d = data[b*8:(b+1)*8]
197         val = 0
198         for i in range(8):
199             val *= 2
200             if i < len(d):
201                 if d[i] == "1": val += 1
202                 elif d[i] != "0":
203                     raise "Invalid symbol %s" % d[i]
204                 pass
205             pass
206         res += chr(val)
207         pass
208     return res
209
210 ## Read bitmap texture from the text file.
211 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
212 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
213 ## The function returns width and height of the pixmap in pixels and byte stream representing
214 ## texture bitmap itself.
215 ##
216 ## This function can be used to read the texture to the byte stream in order to pass it to
217 ## the AddTexture() function of geompy class.
218 ## For example,
219 ## \code
220 ## import geompy
221 ## geompy.init_geom(salome.myStudy)
222 ## texture = geompy.readtexture('mytexture.dat')
223 ## texture = geompy.AddTexture(*texture)
224 ## obj.SetMarkerTexture(texture)
225 ## \endcode
226 ## @param fname texture file name
227 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
228 ## @ingroup l1_geompy_auxiliary
229 def ReadTexture(fname):
230     try:
231         f = open(fname)
232         lines = [ l.strip() for l in f.readlines()]
233         f.close()
234         maxlen = 0
235         if lines: maxlen = max([len(x) for x in lines])
236         lenbytes = maxlen/8
237         if maxlen%8: lenbytes += 1
238         bytedata=""
239         for line in lines:
240             if len(line)%8:
241                 lenline = (len(line)/8+1)*8
242                 pass
243             else:
244                 lenline = (len(line)/8)*8
245                 pass
246             for i in range(lenline/8):
247                 byte=""
248                 for j in range(8):
249                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
250                     else: byte += "0"
251                     pass
252                 bytedata += PackData(byte)
253                 pass
254             for i in range(lenline/8, lenbytes):
255                 bytedata += PackData("0")
256             pass
257         return lenbytes*8, len(lines), bytedata
258     except:
259         pass
260     return 0, 0, ""
261
262 ## Kinds of shape enumeration
263 #  @ingroup l1_geompy_auxiliary
264 kind = GEOM.GEOM_IKindOfShape
265
266 ## Information about closed/unclosed state of shell or wire
267 #  @ingroup l1_geompy_auxiliary
268 class info:
269     UNKNOWN  = 0
270     CLOSED   = 1
271     UNCLOSED = 2
272
273 class geompyDC(GEOM._objref_GEOM_Gen):
274
275         def __init__(self):
276             GEOM._objref_GEOM_Gen.__init__(self)
277             self.myBuilder = None
278             self.myStudyId = 0
279             self.father    = None
280
281             self.BasicOp  = None
282             self.CurvesOp = None
283             self.PrimOp   = None
284             self.ShapesOp = None
285             self.HealOp   = None
286             self.InsertOp = None
287             self.BoolOp   = None
288             self.TrsfOp   = None
289             self.LocalOp  = None
290             self.MeasuOp  = None
291             self.BlocksOp = None
292             self.GroupOp  = None
293             self.AdvOp    = None
294             pass
295
296         ## @addtogroup l1_geompy_auxiliary
297         ## @{
298         def init_geom(self,theStudy):
299             self.myStudy = theStudy
300             self.myStudyId = self.myStudy._get_StudyId()
301             self.myBuilder = self.myStudy.NewBuilder()
302             self.father = self.myStudy.FindComponent("GEOM")
303             if self.father is None:
304                 self.father = self.myBuilder.NewComponent("GEOM")
305                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
306                 FName = A1._narrow(SALOMEDS.AttributeName)
307                 FName.SetValue("Geometry")
308                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
309                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
310                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
311                 self.myBuilder.DefineComponentInstance(self.father,self)
312                 pass
313             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
314             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
315             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
316             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
317             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
318             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
319             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
320             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
321             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
322             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
323             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
324             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
325             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
326             pass
327
328         ## Get name for sub-shape aSubObj of shape aMainObj
329         #
330         # @ref swig_SubShapeAllSorted "Example"
331         def SubShapeName(self,aSubObj, aMainObj):
332             # Example: see GEOM_TestAll.py
333
334             #aSubId  = orb.object_to_string(aSubObj)
335             #aMainId = orb.object_to_string(aMainObj)
336             #index = gg.getIndexTopology(aSubId, aMainId)
337             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
338             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
339             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
340             return name
341
342         ## Publish in study aShape with name aName
343         #
344         #  \param aShape the shape to be published
345         #  \param aName  the name for the shape
346         #  \param doRestoreSubShapes if True, finds and publishes also
347         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
348         #         and published sub-shapes of arguments
349         #  \param theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes for
350         #                                                  these arguments description
351         #  \return study entry of the published shape in form of string
352         #
353         #  @ref swig_MakeQuad4Vertices "Example"
354         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
355                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
356             # Example: see GEOM_TestAll.py
357             try:
358                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
359                 if doRestoreSubShapes:
360                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
361                                             theFindMethod, theInheritFirstArg, True )
362             except:
363                 print "addToStudy() failed"
364                 return ""
365             return aShape.GetStudyEntry()
366
367         ## Publish in study aShape with name aName as sub-object of previously published aFather
368         #
369         #  @ref swig_SubShapeAllSorted "Example"
370         def addToStudyInFather(self, aFather, aShape, aName):
371             # Example: see GEOM_TestAll.py
372             try:
373                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
374             except:
375                 print "addToStudyInFather() failed"
376                 return ""
377             return aShape.GetStudyEntry()
378
379         # end of l1_geompy_auxiliary
380         ## @}
381
382         ## @addtogroup l3_restore_ss
383         ## @{
384
385         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
386         #  To be used from python scripts out of geompy.addToStudy (non-default usage)
387         #  \param theObject published GEOM object, arguments of which will be published
388         #  \param theArgs   list of GEOM_Object, operation arguments to be published.
389         #                   If this list is empty, all operation arguments will be published
390         #  \param theFindMethod method to search subshapes, corresponding to arguments and
391         #                       their subshapes. Value from enumeration GEOM::find_shape_method.
392         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
393         #                            Do not publish subshapes in place of arguments, but only
394         #                            in place of subshapes of the first argument,
395         #                            because the whole shape corresponds to the first argument.
396         #                            Mainly to be used after transformations, but it also can be
397         #                            usefull after partition with one object shape, and some other
398         #                            operations, where only the first argument has to be considered.
399         #                            If theObject has only one argument shape, this flag is automatically
400         #                            considered as True, not regarding really passed value.
401         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
402         #                      and prefix "from_subshapes_of_" to names of partially restored subshapes.
403         #  \return list of published sub-shapes
404         #
405         #  @ref tui_restore_prs_params "Example"
406         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
407                               theInheritFirstArg=False, theAddPrefix=True):
408             # Example: see GEOM_TestAll.py
409             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
410                                           theFindMethod, theInheritFirstArg, theAddPrefix)
411
412         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
413         #  To be used from python scripts out of geompy.addToStudy (non-default usage)
414         #  \param theObject published GEOM object, arguments of which will be published
415         #  \param theArgs   list of GEOM_Object, operation arguments to be published.
416         #                   If this list is empty, all operation arguments will be published
417         #  \param theFindMethod method to search subshapes, corresponding to arguments and
418         #                       their subshapes. Value from enumeration GEOM::find_shape_method.
419         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
420         #                            Do not publish subshapes in place of arguments, but only
421         #                            in place of subshapes of the first argument,
422         #                            because the whole shape corresponds to the first argument.
423         #                            Mainly to be used after transformations, but it also can be
424         #                            usefull after partition with one object shape, and some other
425         #                            operations, where only the first argument has to be considered.
426         #                            If theObject has only one argument shape, this flag is automatically
427         #                            considered as True, not regarding really passed value.
428         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
429         #                      and prefix "from_subshapes_of_" to names of partially restored subshapes.
430         #  \return list of published sub-shapes
431         #
432         #  @ref tui_restore_prs_params "Example"
433         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
434                                    theInheritFirstArg=False, theAddPrefix=True):
435             # Example: see GEOM_TestAll.py
436             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
437                                                theFindMethod, theInheritFirstArg, theAddPrefix)
438
439         # end of l3_restore_ss
440         ## @}
441
442         ## @addtogroup l3_basic_go
443         ## @{
444
445         ## Create point by three coordinates.
446         #  @param theX The X coordinate of the point.
447         #  @param theY The Y coordinate of the point.
448         #  @param theZ The Z coordinate of the point.
449         #  @return New GEOM_Object, containing the created point.
450         #
451         #  @ref tui_creation_point "Example"
452         def MakeVertex(self, theX, theY, theZ):
453             # Example: see GEOM_TestAll.py
454             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
455             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
456             RaiseIfFailed("MakePointXYZ", self.BasicOp)
457             anObj.SetParameters(Parameters)
458             return anObj
459
460         ## Create a point, distant from the referenced point
461         #  on the given distances along the coordinate axes.
462         #  @param theReference The referenced point.
463         #  @param theX Displacement from the referenced point along OX axis.
464         #  @param theY Displacement from the referenced point along OY axis.
465         #  @param theZ Displacement from the referenced point along OZ axis.
466         #  @return New GEOM_Object, containing the created point.
467         #
468         #  @ref tui_creation_point "Example"
469         def MakeVertexWithRef(self,theReference, theX, theY, theZ):
470             # Example: see GEOM_TestAll.py
471             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
472             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
473             RaiseIfFailed("MakePointWithReference", self.BasicOp)
474             anObj.SetParameters(Parameters)
475             return anObj
476
477         ## Create a point, corresponding to the given parameter on the given curve.
478         #  @param theRefCurve The referenced curve.
479         #  @param theParameter Value of parameter on the referenced curve.
480         #  @return New GEOM_Object, containing the created point.
481         #
482         #  @ref tui_creation_point "Example"
483         def MakeVertexOnCurve(self,theRefCurve, theParameter):
484             # Example: see GEOM_TestAll.py
485             theParameter, Parameters = ParseParameters(theParameter)
486             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
487             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
488             anObj.SetParameters(Parameters)
489             return anObj
490
491         ## Create a point by projection give coordinates on the given curve
492         #  @param theRefCurve The referenced curve.
493         #  @param theX X-coordinate in 3D space
494         #  @param theY Y-coordinate in 3D space
495         #  @param theZ Z-coordinate in 3D space
496         #  @return New GEOM_Object, containing the created point.
497         #
498         #  @ref tui_creation_point "Example"
499         def MakeVertexOnCurveByCoord(self,theRefCurve, theX, theY, theZ):
500             # Example: see GEOM_TestAll.py
501             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
502             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
503             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
504             anObj.SetParameters(Parameters)
505             return anObj
506         
507         ## Create a point, corresponding to the given length on the given curve.
508         #  @param theRefCurve The referenced curve.
509         #  @param theLength length on the referenced curve.
510         #  @return New GEOM_Object, containing the created point.
511         #
512         #  @ref tui_creation_point "Example"
513         def MakeVertexOnCurveByLength(self,theRefCurve, theLength):
514             # Example: see GEOM_TestAll.py
515             theLength, Parameters = ParseParameters(theLength)
516             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength)
517             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
518             anObj.SetParameters(Parameters)
519             return anObj
520
521         ## Create a point, corresponding to the given parameters on the
522         #    given surface.
523         #  @param theRefSurf The referenced surface.
524         #  @param theUParameter Value of U-parameter on the referenced surface.
525         #  @param theVParameter Value of V-parameter on the referenced surface.
526         #  @return New GEOM_Object, containing the created point.
527         #
528         #  @ref swig_MakeVertexOnSurface "Example"
529         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter):
530             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
531             # Example: see GEOM_TestAll.py
532             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
533             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
534             anObj.SetParameters(Parameters);
535             return anObj
536
537         ## Create a point by projection give coordinates on the given surface
538         #  @param theRefSurf The referenced surface.
539         #  @param theX X-coordinate in 3D space
540         #  @param theY Y-coordinate in 3D space
541         #  @param theZ Z-coordinate in 3D space
542         #  @return New GEOM_Object, containing the created point.
543         #
544         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
545         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ):
546             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
547             # Example: see GEOM_TestAll.py
548             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
549             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
550             anObj.SetParameters(Parameters);
551             return anObj
552
553         ## Create a point on intersection of two lines.
554         #  @param theRefLine1, theRefLine2 The referenced lines.
555         #  @return New GEOM_Object, containing the created point.
556         #
557         #  @ref swig_MakeVertexOnLinesIntersection "Example"
558         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2):
559             # Example: see GEOM_TestAll.py
560             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
561             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
562             return anObj
563
564         ## Create a tangent, corresponding to the given parameter on the given curve.
565         #  @param theRefCurve The referenced curve.
566         #  @param theParameter Value of parameter on the referenced curve.
567         #  @return New GEOM_Object, containing the created tangent.
568         #
569         #  @ref swig_MakeTangentOnCurve "Example"
570         def MakeTangentOnCurve(self, theRefCurve, theParameter):
571             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
572             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
573             return anObj
574
575         ## Create a tangent plane, corresponding to the given parameter on the given face.
576         #  @param theFace The face for which tangent plane should be built.
577         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
578         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
579         #  @param theTrimSize the size of plane.
580         #  @return New GEOM_Object, containing the created tangent.
581         #
582         #  @ref swig_MakeTangentPlaneOnFace "Example"
583         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize):
584             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
585             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
586             return anObj
587
588         ## Create a vector with the given components.
589         #  @param theDX X component of the vector.
590         #  @param theDY Y component of the vector.
591         #  @param theDZ Z component of the vector.
592         #  @return New GEOM_Object, containing the created vector.
593         #
594         #  @ref tui_creation_vector "Example"
595         def MakeVectorDXDYDZ(self,theDX, theDY, theDZ):
596             # Example: see GEOM_TestAll.py
597             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
598             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
599             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
600             anObj.SetParameters(Parameters)
601             return anObj
602
603         ## Create a vector between two points.
604         #  @param thePnt1 Start point for the vector.
605         #  @param thePnt2 End point for the vector.
606         #  @return New GEOM_Object, containing the created vector.
607         #
608         #  @ref tui_creation_vector "Example"
609         def MakeVector(self,thePnt1, thePnt2):
610             # Example: see GEOM_TestAll.py
611             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
612             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
613             return anObj
614
615         ## Create a line, passing through the given point
616         #  and parrallel to the given direction
617         #  @param thePnt Point. The resulting line will pass through it.
618         #  @param theDir Direction. The resulting line will be parallel to it.
619         #  @return New GEOM_Object, containing the created line.
620         #
621         #  @ref tui_creation_line "Example"
622         def MakeLine(self,thePnt, theDir):
623             # Example: see GEOM_TestAll.py
624             anObj = self.BasicOp.MakeLine(thePnt, theDir)
625             RaiseIfFailed("MakeLine", self.BasicOp)
626             return anObj
627
628         ## Create a line, passing through the given points
629         #  @param thePnt1 First of two points, defining the line.
630         #  @param thePnt2 Second of two points, defining the line.
631         #  @return New GEOM_Object, containing the created line.
632         #
633         #  @ref tui_creation_line "Example"
634         def MakeLineTwoPnt(self,thePnt1, thePnt2):
635             # Example: see GEOM_TestAll.py
636             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
637             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
638             return anObj
639
640         ## Create a line on two faces intersection.
641         #  @param theFace1 First of two faces, defining the line.
642         #  @param theFace2 Second of two faces, defining the line.
643         #  @return New GEOM_Object, containing the created line.
644         #
645         #  @ref swig_MakeLineTwoFaces "Example"
646         def MakeLineTwoFaces(self, theFace1, theFace2):
647             # Example: see GEOM_TestAll.py
648             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
649             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
650             return anObj
651
652         ## Create a plane, passing through the given point
653         #  and normal to the given vector.
654         #  @param thePnt Point, the plane has to pass through.
655         #  @param theVec Vector, defining the plane normal direction.
656         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
657         #  @return New GEOM_Object, containing the created plane.
658         #
659         #  @ref tui_creation_plane "Example"
660         def MakePlane(self,thePnt, theVec, theTrimSize):
661             # Example: see GEOM_TestAll.py
662             theTrimSize, Parameters = ParseParameters(theTrimSize);
663             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
664             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
665             anObj.SetParameters(Parameters)
666             return anObj
667
668         ## Create a plane, passing through the three given points
669         #  @param thePnt1 First of three points, defining the plane.
670         #  @param thePnt2 Second of three points, defining the plane.
671         #  @param thePnt3 Fird of three points, defining the plane.
672         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
673         #  @return New GEOM_Object, containing the created plane.
674         #
675         #  @ref tui_creation_plane "Example"
676         def MakePlaneThreePnt(self,thePnt1, thePnt2, thePnt3, theTrimSize):
677             # Example: see GEOM_TestAll.py
678             theTrimSize, Parameters = ParseParameters(theTrimSize);
679             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
680             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
681             anObj.SetParameters(Parameters)
682             return anObj
683
684         ## Create a plane, similar to the existing one, but with another size of representing face.
685         #  @param theFace Referenced plane or LCS(Marker).
686         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
687         #  @return New GEOM_Object, containing the created plane.
688         #
689         #  @ref tui_creation_plane "Example"
690         def MakePlaneFace(self,theFace, theTrimSize):
691             # Example: see GEOM_TestAll.py
692             theTrimSize, Parameters = ParseParameters(theTrimSize);
693             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
694             RaiseIfFailed("MakePlaneFace", self.BasicOp)
695             anObj.SetParameters(Parameters)
696             return anObj
697
698         ## Create a plane, passing through the 2 vectors
699         #  with center in a start point of the first vector.
700         #  @param theVec1 Vector, defining center point and plane direction.
701         #  @param theVec2 Vector, defining the plane normal direction.
702         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
703         #  @return New GEOM_Object, containing the created plane.
704         #
705         #  @ref tui_creation_plane "Example"
706         def MakePlane2Vec(self,theVec1, theVec2, theTrimSize):
707             # Example: see GEOM_TestAll.py
708             theTrimSize, Parameters = ParseParameters(theTrimSize);
709             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
710             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
711             anObj.SetParameters(Parameters)
712             return anObj
713
714         ## Create a plane, based on a Local coordinate system.
715         #  @param theLCS  coordinate system, defining plane.
716         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
717         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
718         #  @return New GEOM_Object, containing the created plane.
719         #
720         #  @ref tui_creation_plane "Example"
721         def MakePlaneLCS(self,theLCS, theTrimSize, theOrientation):
722             # Example: see GEOM_TestAll.py
723             theTrimSize, Parameters = ParseParameters(theTrimSize);
724             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
725             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
726             anObj.SetParameters(Parameters)
727             return anObj
728
729         ## Create a local coordinate system.
730         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
731         #  @param XDX,XDY,XDZ Three components of OX direction
732         #  @param YDX,YDY,YDZ Three components of OY direction
733         #  @return New GEOM_Object, containing the created coordinate system.
734         #
735         #  @ref swig_MakeMarker "Example"
736         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ):
737             # Example: see GEOM_TestAll.py
738             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
739             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
740             RaiseIfFailed("MakeMarker", self.BasicOp)
741             anObj.SetParameters(Parameters)
742             return anObj
743
744         ## Create a local coordinate system from shape.
745         #  @param theShape The initial shape to detect the coordinate system.
746         #  @return New GEOM_Object, containing the created coordinate system.
747         #
748         #  @ref tui_creation_lcs "Example"
749         def MakeMarkerFromShape(self, theShape):
750             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
751             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
752             return anObj
753
754         ## Create a local coordinate system from point and two vectors.
755         #  @param theOrigin Point of coordinate system origin.
756         #  @param theXVec Vector of X direction
757         #  @param theYVec Vector of Y direction
758         #  @return New GEOM_Object, containing the created coordinate system.
759         #
760         #  @ref tui_creation_lcs "Example"
761         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec):
762             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
763             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
764             return anObj
765
766         # end of l3_basic_go
767         ## @}
768
769         ## @addtogroup l4_curves
770         ## @{
771
772         ##  Create an arc of circle, passing through three given points.
773         #  @param thePnt1 Start point of the arc.
774         #  @param thePnt2 Middle point of the arc.
775         #  @param thePnt3 End point of the arc.
776         #  @return New GEOM_Object, containing the created arc.
777         #
778         #  @ref swig_MakeArc "Example"
779         def MakeArc(self,thePnt1, thePnt2, thePnt3):
780             # Example: see GEOM_TestAll.py
781             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
782             RaiseIfFailed("MakeArc", self.CurvesOp)
783             return anObj
784
785         ##  Create an arc of circle from a center and 2 points.
786         #  @param thePnt1 Center of the arc
787         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
788         #  @param thePnt3 End point of the arc (Gives also a direction)
789         #  @param theSense Orientation of the arc
790         #  @return New GEOM_Object, containing the created arc.
791         #
792         #  @ref swig_MakeArc "Example"
793         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False):
794             # Example: see GEOM_TestAll.py
795             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
796             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
797             return anObj
798
799         ##  Create an arc of ellipse, of center and two points.
800         #  @param theCenter Center of the arc.
801         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
802         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
803         #  @return New GEOM_Object, containing the created arc.
804         #
805         #  @ref swig_MakeArc "Example"
806         def MakeArcOfEllipse(self,theCenter, thePnt1, thePnt2):
807             # Example: see GEOM_TestAll.py
808             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
809             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
810             return anObj
811
812         ## Create a circle with given center, normal vector and radius.
813         #  @param thePnt Circle center.
814         #  @param theVec Vector, normal to the plane of the circle.
815         #  @param theR Circle radius.
816         #  @return New GEOM_Object, containing the created circle.
817         #
818         #  @ref tui_creation_circle "Example"
819         def MakeCircle(self, thePnt, theVec, theR):
820             # Example: see GEOM_TestAll.py
821             theR, Parameters = ParseParameters(theR)
822             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
823             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
824             anObj.SetParameters(Parameters)
825             return anObj
826
827         ## Create a circle with given radius.
828         #  Center of the circle will be in the origin of global
829         #  coordinate system and normal vector will be codirected with Z axis
830         #  @param theR Circle radius.
831         #  @return New GEOM_Object, containing the created circle.
832         def MakeCircleR(self, theR):
833             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
834             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
835             return anObj
836
837         ## Create a circle, passing through three given points
838         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
839         #  @return New GEOM_Object, containing the created circle.
840         #
841         #  @ref tui_creation_circle "Example"
842         def MakeCircleThreePnt(self,thePnt1, thePnt2, thePnt3):
843             # Example: see GEOM_TestAll.py
844             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
845             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
846             return anObj
847
848         ## Create a circle, with given point1 as center,
849         #  passing through the point2 as radius and laying in the plane,
850         #  defined by all three given points.
851         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
852         #  @return New GEOM_Object, containing the created circle.
853         #
854         #  @ref swig_MakeCircle "Example"
855         def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3):
856             # Example: see GEOM_example6.py
857             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
858             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
859             return anObj
860
861         ## Create an ellipse with given center, normal vector and radiuses.
862         #  @param thePnt Ellipse center.
863         #  @param theVec Vector, normal to the plane of the ellipse.
864         #  @param theRMajor Major ellipse radius.
865         #  @param theRMinor Minor ellipse radius.
866         #  @param theVecMaj Vector, direction of the ellipse's main axis.
867         #  @return New GEOM_Object, containing the created ellipse.
868         #
869         #  @ref tui_creation_ellipse "Example"
870         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None):
871             # Example: see GEOM_TestAll.py
872             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
873             if theVecMaj is not None:
874                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
875             else:
876                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
877                 pass
878             RaiseIfFailed("MakeEllipse", self.CurvesOp)
879             anObj.SetParameters(Parameters)
880             return anObj
881
882         ## Create an ellipse with given radiuses.
883         #  Center of the ellipse will be in the origin of global
884         #  coordinate system and normal vector will be codirected with Z axis
885         #  @param theRMajor Major ellipse radius.
886         #  @param theRMinor Minor ellipse radius.
887         #  @return New GEOM_Object, containing the created ellipse.
888         def MakeEllipseRR(self, theRMajor, theRMinor):
889             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
890             RaiseIfFailed("MakeEllipse", self.CurvesOp)
891             return anObj
892
893         ## Create a polyline on the set of points.
894         #  @param thePoints Sequence of points for the polyline.
895         #  @return New GEOM_Object, containing the created polyline.
896         #
897         #  @ref tui_creation_curve "Example"
898         def MakePolyline(self,thePoints):
899             # Example: see GEOM_TestAll.py
900             anObj = self.CurvesOp.MakePolyline(thePoints)
901             RaiseIfFailed("MakePolyline", self.CurvesOp)
902             return anObj
903
904         ## Create bezier curve on the set of points.
905         #  @param thePoints Sequence of points for the bezier curve.
906         #  @return New GEOM_Object, containing the created bezier curve.
907         #
908         #  @ref tui_creation_curve "Example"
909         def MakeBezier(self,thePoints):
910             # Example: see GEOM_TestAll.py
911             anObj = self.CurvesOp.MakeSplineBezier(thePoints)
912             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
913             return anObj
914
915         ## Create B-Spline curve on the set of points.
916         #  @param thePoints Sequence of points for the B-Spline curve.
917         #  @param theIsClosed If True, build a closed curve.
918         #  @return New GEOM_Object, containing the created B-Spline curve.
919         #
920         #  @ref tui_creation_curve "Example"
921         def MakeInterpol(self, thePoints, theIsClosed=False):
922             # Example: see GEOM_TestAll.py
923             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed)
924             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
925             return anObj
926
927         # end of l4_curves
928         ## @}
929
930         ## @addtogroup l3_sketcher
931         ## @{
932
933         ## Create a sketcher (wire or face), following the textual description,
934         #  passed through <VAR>theCommand</VAR> argument. \n
935         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
936         #  Format of the description string have to be the following:
937         #
938         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
939         #
940         #  Where:
941         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
942         #  - CMD is one of
943         #     - "R angle" : Set the direction by angle
944         #     - "D dx dy" : Set the direction by DX & DY
945         #     .
946         #       \n
947         #     - "TT x y" : Create segment by point at X & Y
948         #     - "T dx dy" : Create segment by point with DX & DY
949         #     - "L length" : Create segment by direction & Length
950         #     - "IX x" : Create segment by direction & Intersect. X
951         #     - "IY y" : Create segment by direction & Intersect. Y
952         #     .
953         #       \n
954         #     - "C radius length" : Create arc by direction, radius and length(in degree)
955         #     - "AA x y": Create arc by point at X & Y
956         #     - "A dx dy" : Create arc by point with DX & DY
957         #     - "A dx dy" : Create arc by point with DX & DY
958         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs 
959         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
960         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates 
961         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
962         #     .
963         #       \n
964         #     - "WW" : Close Wire (to finish)
965         #     - "WF" : Close Wire and build face (to finish)
966         #     .
967         #       \n
968         #  - Flag1 (= reverse) is 0 or 2 ... 
969         #     - if 0 the drawn arc is the one of lower angle (< Pi)
970         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
971         #     .
972         #       \n
973         #  - Flag2 (= control tolerance) is 0 or 1 ...
974         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
975         #     - if 1 the wire is built only if the end point is on the arc 
976         #       with a tolerance of 10^-7 on the distance else the creation fails
977         #
978         #  @param theCommand String, defining the sketcher in local
979         #                    coordinates of the working plane.
980         #  @param theWorkingPlane Nine double values, defining origin,
981         #                         OZ and OX directions of the working plane.
982         #  @return New GEOM_Object, containing the created wire.
983         #
984         #  @ref tui_sketcher_page "Example"
985         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0]):
986             # Example: see GEOM_TestAll.py
987             theCommand,Parameters = ParseSketcherCommand(theCommand)
988             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
989             RaiseIfFailed("MakeSketcher", self.CurvesOp)
990             anObj.SetParameters(Parameters)
991             return anObj
992
993         ## Create a sketcher (wire or face), following the textual description,
994         #  passed through <VAR>theCommand</VAR> argument. \n
995         #  For format of the description string see the previous method.\n
996         #  @param theCommand String, defining the sketcher in local
997         #                    coordinates of the working plane.
998         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
999         #  @return New GEOM_Object, containing the created wire.
1000         #
1001         #  @ref tui_sketcher_page "Example"
1002         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane):
1003             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
1004             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
1005             return anObj
1006
1007         ## Create a sketcher wire, following the numerical description,
1008         #  passed through <VAR>theCoordinates</VAR> argument. \n
1009         #  @param theCoordinates double values, defining points to create a wire,
1010         #                                                      passing from it.
1011         #  @return New GEOM_Object, containing the created wire.
1012         #
1013         #  @ref tui_sketcher_page "Example"
1014         def Make3DSketcher(self, theCoordinates):
1015             theCoordinates,Parameters = ParseParameters(theCoordinates)
1016             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
1017             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
1018             anObj.SetParameters(Parameters)
1019             return anObj
1020
1021         # end of l3_sketcher
1022         ## @}
1023
1024         ## @addtogroup l3_3d_primitives
1025         ## @{
1026
1027         ## Create a box by coordinates of two opposite vertices.
1028         #
1029         #  @ref tui_creation_box "Example"
1030         def MakeBox(self,x1,y1,z1,x2,y2,z2):
1031             # Example: see GEOM_TestAll.py
1032             pnt1 = self.MakeVertex(x1,y1,z1)
1033             pnt2 = self.MakeVertex(x2,y2,z2)
1034             return self.MakeBoxTwoPnt(pnt1,pnt2)
1035
1036         ## Create a box with specified dimensions along the coordinate axes
1037         #  and with edges, parallel to the coordinate axes.
1038         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
1039         #  @param theDX Length of Box edges, parallel to OX axis.
1040         #  @param theDY Length of Box edges, parallel to OY axis.
1041         #  @param theDZ Length of Box edges, parallel to OZ axis.
1042         #  @return New GEOM_Object, containing the created box.
1043         #
1044         #  @ref tui_creation_box "Example"
1045         def MakeBoxDXDYDZ(self,theDX, theDY, theDZ):
1046             # Example: see GEOM_TestAll.py
1047             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1048             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
1049             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
1050             anObj.SetParameters(Parameters)
1051             return anObj
1052
1053         ## Create a box with two specified opposite vertices,
1054         #  and with edges, parallel to the coordinate axes
1055         #  @param thePnt1 First of two opposite vertices.
1056         #  @param thePnt2 Second of two opposite vertices.
1057         #  @return New GEOM_Object, containing the created box.
1058         #
1059         #  @ref tui_creation_box "Example"
1060         def MakeBoxTwoPnt(self,thePnt1, thePnt2):
1061             # Example: see GEOM_TestAll.py
1062             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
1063             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
1064             return anObj
1065
1066         ## Create a face with specified dimensions along OX-OY coordinate axes,
1067         #  with edges, parallel to this coordinate axes.
1068         #  @param theH height of Face.
1069         #  @param theW width of Face.
1070         #  @param theOrientation orientation belong axis OXY OYZ OZX
1071         #  @return New GEOM_Object, containing the created face.
1072         #
1073         #  @ref tui_creation_face "Example"
1074         def MakeFaceHW(self,theH, theW, theOrientation):
1075             # Example: see GEOM_TestAll.py
1076             theH,theW,Parameters = ParseParameters(theH, theW)
1077             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
1078             RaiseIfFailed("MakeFaceHW", self.PrimOp)
1079             anObj.SetParameters(Parameters)
1080             return anObj
1081
1082         ## Create a face from another plane and two sizes,
1083         #  vertical size and horisontal size.
1084         #  @param theObj   Normale vector to the creating face or
1085         #  the face object.
1086         #  @param theH     Height (vertical size).
1087         #  @param theW     Width (horisontal size).
1088         #  @return New GEOM_Object, containing the created face.
1089         #
1090         #  @ref tui_creation_face "Example"
1091         def MakeFaceObjHW(self, theObj, theH, theW):
1092             # Example: see GEOM_TestAll.py
1093             theH,theW,Parameters = ParseParameters(theH, theW)
1094             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
1095             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
1096             anObj.SetParameters(Parameters)
1097             return anObj
1098
1099         ## Create a disk with given center, normal vector and radius.
1100         #  @param thePnt Disk center.
1101         #  @param theVec Vector, normal to the plane of the disk.
1102         #  @param theR Disk radius.
1103         #  @return New GEOM_Object, containing the created disk.
1104         #
1105         #  @ref tui_creation_disk "Example"
1106         def MakeDiskPntVecR(self,thePnt, theVec, theR):
1107             # Example: see GEOM_TestAll.py
1108             theR,Parameters = ParseParameters(theR)
1109             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
1110             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
1111             anObj.SetParameters(Parameters)
1112             return anObj
1113
1114         ## Create a disk, passing through three given points
1115         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
1116         #  @return New GEOM_Object, containing the created disk.
1117         #
1118         #  @ref tui_creation_disk "Example"
1119         def MakeDiskThreePnt(self,thePnt1, thePnt2, thePnt3):
1120             # Example: see GEOM_TestAll.py
1121             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
1122             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
1123             return anObj
1124
1125         ## Create a disk with specified dimensions along OX-OY coordinate axes.
1126         #  @param theR Radius of Face.
1127         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
1128         #  @return New GEOM_Object, containing the created disk.
1129         #
1130         #  @ref tui_creation_face "Example"
1131         def MakeDiskR(self,theR, theOrientation):
1132             # Example: see GEOM_TestAll.py
1133             theR,Parameters = ParseParameters(theR)
1134             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
1135             RaiseIfFailed("MakeDiskR", self.PrimOp)
1136             anObj.SetParameters(Parameters)
1137             return anObj
1138
1139         ## Create a cylinder with given base point, axis, radius and height.
1140         #  @param thePnt Central point of cylinder base.
1141         #  @param theAxis Cylinder axis.
1142         #  @param theR Cylinder radius.
1143         #  @param theH Cylinder height.
1144         #  @return New GEOM_Object, containing the created cylinder.
1145         #
1146         #  @ref tui_creation_cylinder "Example"
1147         def MakeCylinder(self,thePnt, theAxis, theR, theH):
1148             # Example: see GEOM_TestAll.py
1149             theR,theH,Parameters = ParseParameters(theR, theH)
1150             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
1151             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
1152             anObj.SetParameters(Parameters)
1153             return anObj
1154
1155         ## Create a cylinder with given radius and height at
1156         #  the origin of coordinate system. Axis of the cylinder
1157         #  will be collinear to the OZ axis of the coordinate system.
1158         #  @param theR Cylinder radius.
1159         #  @param theH Cylinder height.
1160         #  @return New GEOM_Object, containing the created cylinder.
1161         #
1162         #  @ref tui_creation_cylinder "Example"
1163         def MakeCylinderRH(self,theR, theH):
1164             # Example: see GEOM_TestAll.py
1165             theR,theH,Parameters = ParseParameters(theR, theH)
1166             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
1167             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
1168             anObj.SetParameters(Parameters)
1169             return anObj
1170
1171         ## Create a sphere with given center and radius.
1172         #  @param thePnt Sphere center.
1173         #  @param theR Sphere radius.
1174         #  @return New GEOM_Object, containing the created sphere.
1175         #
1176         #  @ref tui_creation_sphere "Example"
1177         def MakeSpherePntR(self, thePnt, theR):
1178             # Example: see GEOM_TestAll.py
1179             theR,Parameters = ParseParameters(theR)
1180             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
1181             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
1182             anObj.SetParameters(Parameters)
1183             return anObj
1184
1185         ## Create a sphere with given center and radius.
1186         #  @param x,y,z Coordinates of sphere center.
1187         #  @param theR Sphere radius.
1188         #  @return New GEOM_Object, containing the created sphere.
1189         #
1190         #  @ref tui_creation_sphere "Example"
1191         def MakeSphere(self, x, y, z, theR):
1192             # Example: see GEOM_TestAll.py
1193             point = self.MakeVertex(x, y, z)
1194             anObj = self.MakeSpherePntR(point, theR)
1195             return anObj
1196
1197         ## Create a sphere with given radius at the origin of coordinate system.
1198         #  @param theR Sphere radius.
1199         #  @return New GEOM_Object, containing the created sphere.
1200         #
1201         #  @ref tui_creation_sphere "Example"
1202         def MakeSphereR(self, theR):
1203             # Example: see GEOM_TestAll.py
1204             theR,Parameters = ParseParameters(theR)
1205             anObj = self.PrimOp.MakeSphereR(theR)
1206             RaiseIfFailed("MakeSphereR", self.PrimOp)
1207             anObj.SetParameters(Parameters)
1208             return anObj
1209
1210         ## Create a cone with given base point, axis, height and radiuses.
1211         #  @param thePnt Central point of the first cone base.
1212         #  @param theAxis Cone axis.
1213         #  @param theR1 Radius of the first cone base.
1214         #  @param theR2 Radius of the second cone base.
1215         #    \note If both radiuses are non-zero, the cone will be truncated.
1216         #    \note If the radiuses are equal, a cylinder will be created instead.
1217         #  @param theH Cone height.
1218         #  @return New GEOM_Object, containing the created cone.
1219         #
1220         #  @ref tui_creation_cone "Example"
1221         def MakeCone(self,thePnt, theAxis, theR1, theR2, theH):
1222             # Example: see GEOM_TestAll.py
1223             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
1224             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
1225             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
1226             anObj.SetParameters(Parameters)
1227             return anObj
1228
1229         ## Create a cone with given height and radiuses at
1230         #  the origin of coordinate system. Axis of the cone will
1231         #  be collinear to the OZ axis of the coordinate system.
1232         #  @param theR1 Radius of the first cone base.
1233         #  @param theR2 Radius of the second cone base.
1234         #    \note If both radiuses are non-zero, the cone will be truncated.
1235         #    \note If the radiuses are equal, a cylinder will be created instead.
1236         #  @param theH Cone height.
1237         #  @return New GEOM_Object, containing the created cone.
1238         #
1239         #  @ref tui_creation_cone "Example"
1240         def MakeConeR1R2H(self,theR1, theR2, theH):
1241             # Example: see GEOM_TestAll.py
1242             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
1243             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
1244             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
1245             anObj.SetParameters(Parameters)
1246             return anObj
1247
1248         ## Create a torus with given center, normal vector and radiuses.
1249         #  @param thePnt Torus central point.
1250         #  @param theVec Torus axis of symmetry.
1251         #  @param theRMajor Torus major radius.
1252         #  @param theRMinor Torus minor radius.
1253         #  @return New GEOM_Object, containing the created torus.
1254         #
1255         #  @ref tui_creation_torus "Example"
1256         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor):
1257             # Example: see GEOM_TestAll.py
1258             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
1259             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
1260             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
1261             anObj.SetParameters(Parameters)
1262             return anObj
1263
1264         ## Create a torus with given radiuses at the origin of coordinate system.
1265         #  @param theRMajor Torus major radius.
1266         #  @param theRMinor Torus minor radius.
1267         #  @return New GEOM_Object, containing the created torus.
1268         #
1269         #  @ref tui_creation_torus "Example"
1270         def MakeTorusRR(self, theRMajor, theRMinor):
1271             # Example: see GEOM_TestAll.py
1272             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
1273             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
1274             RaiseIfFailed("MakeTorusRR", self.PrimOp)
1275             anObj.SetParameters(Parameters)
1276             return anObj
1277
1278         # end of l3_3d_primitives
1279         ## @}
1280
1281         ## @addtogroup l3_complex
1282         ## @{
1283
1284         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
1285         #  @param theBase Base shape to be extruded.
1286         #  @param thePoint1 First end of extrusion vector.
1287         #  @param thePoint2 Second end of extrusion vector.
1288         #  @return New GEOM_Object, containing the created prism.
1289         #
1290         #  @ref tui_creation_prism "Example"
1291         def MakePrism(self, theBase, thePoint1, thePoint2):
1292             # Example: see GEOM_TestAll.py
1293             anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
1294             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
1295             return anObj
1296
1297         ## Create a shape by extrusion of the base shape along the vector,
1298         #  i.e. all the space, transfixed by the base shape during its translation
1299         #  along the vector on the given distance.
1300         #  @param theBase Base shape to be extruded.
1301         #  @param theVec Direction of extrusion.
1302         #  @param theH Prism dimension along theVec.
1303         #  @return New GEOM_Object, containing the created prism.
1304         #
1305         #  @ref tui_creation_prism "Example"
1306         def MakePrismVecH(self, theBase, theVec, theH):
1307             # Example: see GEOM_TestAll.py
1308             theH,Parameters = ParseParameters(theH)
1309             anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
1310             RaiseIfFailed("MakePrismVecH", self.PrimOp)
1311             anObj.SetParameters(Parameters)
1312             return anObj
1313
1314         ## Create a shape by extrusion of the base shape along the vector,
1315         #  i.e. all the space, transfixed by the base shape during its translation
1316         #  along the vector on the given distance in 2 Ways (forward/backward) .
1317         #  @param theBase Base shape to be extruded.
1318         #  @param theVec Direction of extrusion.
1319         #  @param theH Prism dimension along theVec in forward direction.
1320         #  @return New GEOM_Object, containing the created prism.
1321         #
1322         #  @ref tui_creation_prism "Example"
1323         def MakePrismVecH2Ways(self, theBase, theVec, theH):
1324             # Example: see GEOM_TestAll.py
1325             theH,Parameters = ParseParameters(theH)
1326             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
1327             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
1328             anObj.SetParameters(Parameters)
1329             return anObj
1330
1331         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
1332         #  @param theBase Base shape to be extruded.
1333         #  @param theDX, theDY, theDZ Directions of extrusion.
1334         #  @return New GEOM_Object, containing the created prism.
1335         #
1336         #  @ref tui_creation_prism "Example"
1337         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ):
1338             # Example: see GEOM_TestAll.py
1339             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1340             anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
1341             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
1342             anObj.SetParameters(Parameters)
1343             return anObj
1344
1345         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
1346         #  i.e. all the space, transfixed by the base shape during its translation
1347         #  along the vector on the given distance in 2 Ways (forward/backward) .
1348         #  @param theBase Base shape to be extruded.
1349         #  @param theDX, theDY, theDZ Directions of extrusion.
1350         #  @return New GEOM_Object, containing the created prism.
1351         #
1352         #  @ref tui_creation_prism "Example"
1353         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ):
1354             # Example: see GEOM_TestAll.py
1355             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1356             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
1357             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
1358             anObj.SetParameters(Parameters)
1359             return anObj
1360
1361         ## Create a shape by revolution of the base shape around the axis
1362         #  on the given angle, i.e. all the space, transfixed by the base
1363         #  shape during its rotation around the axis on the given angle.
1364         #  @param theBase Base shape to be rotated.
1365         #  @param theAxis Rotation axis.
1366         #  @param theAngle Rotation angle in radians.
1367         #  @return New GEOM_Object, containing the created revolution.
1368         #
1369         #  @ref tui_creation_revolution "Example"
1370         def MakeRevolution(self, theBase, theAxis, theAngle):
1371             # Example: see GEOM_TestAll.py
1372             theAngle,Parameters = ParseParameters(theAngle)
1373             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
1374             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
1375             anObj.SetParameters(Parameters)
1376             return anObj
1377
1378         ## The Same Revolution but in both ways forward&backward.
1379         def MakeRevolution2Ways(self, theBase, theAxis, theAngle):
1380             theAngle,Parameters = ParseParameters(theAngle)
1381             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
1382             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
1383             anObj.SetParameters(Parameters)
1384             return anObj
1385
1386         ## Create a filling from the given compound of contours.
1387         #  @param theShape the compound of contours
1388         #  @param theMinDeg a minimal degree of BSpline surface to create
1389         #  @param theMaxDeg a maximal degree of BSpline surface to create
1390         #  @param theTol2D a 2d tolerance to be reached
1391         #  @param theTol3D a 3d tolerance to be reached
1392         #  @param theNbIter a number of iteration of approximation algorithm
1393         #  @param theMethod Kind of method to perform filling operation:
1394         #                   GEOM.FOM_Default - Default - standard behaviour
1395         #                   /GEOM.FOM_UseOri - Use edges orientation - orientation of edges is
1396         #                       used: if the edge is reversed, the curve from this edge
1397         #                       is reversed before using it in the filling algorithm.
1398         #                   /GEOM.FOM_AutoCorrect - Auto-correct orientation - changes the orientation
1399         #                       of the curves using minimization of sum of distances
1400         #                       between the end points of the edges.
1401         #  @param isApprox if True, BSpline curves are generated in the process
1402         #                  of surface construction. By default it is False, that means
1403         #                  the surface is created using Besier curves. The usage of
1404         #                  Approximation makes the algorithm work slower, but allows
1405         #                  building the surface for rather complex cases
1406         #  @return New GEOM_Object, containing the created filling surface.
1407         #
1408         #  @ref tui_creation_filling "Example"
1409         def MakeFilling(self, theShape, theMinDeg, theMaxDeg, theTol2D,
1410                         theTol3D, theNbIter, theMethod=GEOM.FOM_Default, isApprox=0):
1411             # Example: see GEOM_TestAll.py
1412             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
1413             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
1414                                             theTol2D, theTol3D, theNbIter,
1415                                             theMethod, isApprox)
1416             RaiseIfFailed("MakeFilling", self.PrimOp)
1417             anObj.SetParameters(Parameters)
1418             return anObj
1419
1420         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
1421         #  @param theSeqSections - set of specified sections.
1422         #  @param theModeSolid - mode defining building solid or shell
1423         #  @param thePreci - precision 3D used for smoothing by default 1.e-6
1424         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
1425         #  @return New GEOM_Object, containing the created shell or solid.
1426         #
1427         #  @ref swig_todo "Example"
1428         def MakeThruSections(self,theSeqSections,theModeSolid,thePreci,theRuled):
1429             # Example: see GEOM_TestAll.py
1430             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
1431             RaiseIfFailed("MakeThruSections", self.PrimOp)
1432             return anObj
1433
1434         ## Create a shape by extrusion of the base shape along
1435         #  the path shape. The path shape can be a wire or an edge.
1436         #  @param theBase Base shape to be extruded.
1437         #  @param thePath Path shape to extrude the base shape along it.
1438         #  @return New GEOM_Object, containing the created pipe.
1439         #
1440         #  @ref tui_creation_pipe "Example"
1441         def MakePipe(self,theBase, thePath):
1442             # Example: see GEOM_TestAll.py
1443             anObj = self.PrimOp.MakePipe(theBase, thePath)
1444             RaiseIfFailed("MakePipe", self.PrimOp)
1445             return anObj
1446
1447         ## Create a shape by extrusion of the profile shape along
1448         #  the path shape. The path shape can be a wire or an edge.
1449         #  the several profiles can be specified in the several locations of path.
1450         #  @param theSeqBases - list of  Bases shape to be extruded.
1451         #  @param theLocations - list of locations on the path corresponding
1452         #                        specified list of the Bases shapes. Number of locations
1453         #                        should be equal to number of bases or list of locations can be empty.
1454         #  @param thePath - Path shape to extrude the base shape along it.
1455         #  @param theWithContact - the mode defining that the section is translated to be in
1456         #                          contact with the spine.
1457         #  @param theWithCorrection - defining that the section is rotated to be
1458         #                             orthogonal to the spine tangent in the correspondent point
1459         #  @return New GEOM_Object, containing the created pipe.
1460         #
1461         #  @ref tui_creation_pipe_with_diff_sec "Example"
1462         def MakePipeWithDifferentSections(self, theSeqBases,
1463                                           theLocations, thePath,
1464                                           theWithContact, theWithCorrection):
1465             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
1466                                                               theLocations, thePath,
1467                                                               theWithContact, theWithCorrection)
1468             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
1469             return anObj
1470
1471         ## Create a shape by extrusion of the profile shape along
1472         #  the path shape. The path shape can be a wire or a edge.
1473         #  the several profiles can be specified in the several locations of path.
1474         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
1475         #                       shell or face. If number of faces in neighbour sections
1476         #                       aren't coincided result solid between such sections will
1477         #                       be created using external boundaries of this shells.
1478         #  @param theSeqSubBases - list of corresponding subshapes of section shapes.
1479         #                          This list is used for searching correspondences between
1480         #                          faces in the sections. Size of this list must be equal
1481         #                          to size of list of base shapes.
1482         #  @param theLocations - list of locations on the path corresponding
1483         #                        specified list of the Bases shapes. Number of locations
1484         #                        should be equal to number of bases. First and last
1485         #                        locations must be coincided with first and last vertexes
1486         #                        of path correspondingly.
1487         #  @param thePath - Path shape to extrude the base shape along it.
1488         #  @param theWithContact - the mode defining that the section is translated to be in
1489         #                          contact with the spine.
1490         #  @param theWithCorrection - defining that the section is rotated to be
1491         #                             orthogonal to the spine tangent in the correspondent point
1492         #  @return New GEOM_Object, containing the created solids.
1493         #
1494         #  @ref tui_creation_pipe_with_shell_sec "Example"
1495         def MakePipeWithShellSections(self,theSeqBases, theSeqSubBases,
1496                                       theLocations, thePath,
1497                                       theWithContact, theWithCorrection):
1498             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
1499                                                           theLocations, thePath,
1500                                                           theWithContact, theWithCorrection)
1501             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
1502             return anObj
1503
1504         ## Create a shape by extrusion of the profile shape along
1505         #  the path shape. This function is used only for debug pipe
1506         #  functionality - it is a version of previous function
1507         #  (MakePipeWithShellSections(...)) which give a possibility to
1508         #  recieve information about creating pipe between each pair of
1509         #  sections step by step.
1510         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
1511                                              theLocations, thePath,
1512                                              theWithContact, theWithCorrection):
1513             res = []
1514             nbsect = len(theSeqBases)
1515             nbsubsect = len(theSeqSubBases)
1516             #print "nbsect = ",nbsect
1517             for i in range(1,nbsect):
1518                 #print "  i = ",i
1519                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
1520                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
1521                 tmpSeqSubBases = []
1522                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
1523                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
1524                                                               tmpLocations, thePath,
1525                                                               theWithContact, theWithCorrection)
1526                 if self.PrimOp.IsDone() == 0:
1527                     print "Problems with pipe creation between ",i," and ",i+1," sections"
1528                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
1529                     break
1530                 else:
1531                     print "Pipe between ",i," and ",i+1," sections is OK"
1532                     res.append(anObj)
1533                     pass
1534                 pass
1535
1536             resc = self.MakeCompound(res)
1537             #resc = self.MakeSewing(res, 0.001)
1538             #print "resc: ",resc
1539             return resc
1540
1541         ## Create solids between given sections
1542         #  @param theSeqBases - list of sections (shell or face).
1543         #  @param theLocations - list of corresponding vertexes
1544         #  @return New GEOM_Object, containing the created solids.
1545         #
1546         #  @ref tui_creation_pipe_without_path "Example"
1547         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations):
1548             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
1549             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
1550             return anObj
1551
1552         ## Create a shape by extrusion of the base shape along
1553         #  the path shape with constant bi-normal direction along the given vector.
1554         #  The path shape can be a wire or an edge.
1555         #  @param theBase Base shape to be extruded.
1556         #  @param thePath Path shape to extrude the base shape along it.
1557         #  @param theVec Vector defines a constant binormal direction to keep the
1558         #                same angle beetween the direction and the sections
1559         #                along the sweep surface.
1560         #  @return New GEOM_Object, containing the created pipe.
1561         #
1562         #  @ref tui_creation_pipe "Example"
1563         def MakePipeBiNormalAlongVector(self,theBase, thePath, theVec):
1564             # Example: see GEOM_TestAll.py
1565             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
1566             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
1567             return anObj
1568
1569         # end of l3_complex
1570         ## @}
1571
1572         ## @addtogroup l3_advanced
1573         ## @{
1574
1575         ## Create a linear edge with specified ends.
1576         #  @param thePnt1 Point for the first end of edge.
1577         #  @param thePnt2 Point for the second end of edge.
1578         #  @return New GEOM_Object, containing the created edge.
1579         #
1580         #  @ref tui_creation_edge "Example"
1581         def MakeEdge(self,thePnt1, thePnt2):
1582             # Example: see GEOM_TestAll.py
1583             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
1584             RaiseIfFailed("MakeEdge", self.ShapesOp)
1585             return anObj
1586
1587         ## Create an edge from specified wire.
1588         #  @param theWire source Wire.
1589         #  @param theLinearTolerance linear tolerance value.
1590         #  @param theAngularTolerance angular tolerance value.
1591         #  @return New GEOM_Object, containing the created edge.
1592         #
1593         #  @ref tui_creation_edge "Example"
1594         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12):
1595             # Example: see GEOM_TestAll.py
1596             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
1597             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
1598             return anObj
1599
1600         ## Create a wire from the set of edges and wires.
1601         #  @param theEdgesAndWires List of edges and/or wires.
1602         #  @param theTolerance Maximum distance between vertices, that will be merged.
1603         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
1604         #  @return New GEOM_Object, containing the created wire.
1605         #
1606         #  @ref tui_creation_wire "Example"
1607         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07):
1608             # Example: see GEOM_TestAll.py
1609             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
1610             RaiseIfFailed("MakeWire", self.ShapesOp)
1611             return anObj
1612
1613         ## Create a face on the given wire.
1614         #  @param theWire closed Wire or Edge to build the face on.
1615         #  @param isPlanarWanted If TRUE, only planar face will be built.
1616         #                        If impossible, NULL object will be returned.
1617         #  @return New GEOM_Object, containing the created face.
1618         #
1619         #  @ref tui_creation_face "Example"
1620         def MakeFace(self,theWire, isPlanarWanted):
1621             # Example: see GEOM_TestAll.py
1622             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
1623             RaiseIfFailed("MakeFace", self.ShapesOp)
1624             return anObj
1625
1626         ## Create a face on the given wires set.
1627         #  @param theWires List of closed wires or edges to build the face on.
1628         #  @param isPlanarWanted If TRUE, only planar face will be built.
1629         #                        If impossible, NULL object will be returned.
1630         #  @return New GEOM_Object, containing the created face.
1631         #
1632         #  @ref tui_creation_face "Example"
1633         def MakeFaceWires(self,theWires, isPlanarWanted):
1634             # Example: see GEOM_TestAll.py
1635             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
1636             RaiseIfFailed("MakeFaceWires", self.ShapesOp)
1637             return anObj
1638
1639         ## Shortcut to MakeFaceWires()
1640         #
1641         #  @ref tui_creation_face "Example 1"
1642         #  \n @ref swig_MakeFaces  "Example 2"
1643         def MakeFaces(self,theWires, isPlanarWanted):
1644             # Example: see GEOM_TestOthers.py
1645             anObj = self.MakeFaceWires(theWires, isPlanarWanted)
1646             return anObj
1647
1648         ## Create a shell from the set of faces and shells.
1649         #  @param theFacesAndShells List of faces and/or shells.
1650         #  @return New GEOM_Object, containing the created shell.
1651         #
1652         #  @ref tui_creation_shell "Example"
1653         def MakeShell(self,theFacesAndShells):
1654             # Example: see GEOM_TestAll.py
1655             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
1656             RaiseIfFailed("MakeShell", self.ShapesOp)
1657             return anObj
1658
1659         ## Create a solid, bounded by the given shells.
1660         #  @param theShells Sequence of bounding shells.
1661         #  @return New GEOM_Object, containing the created solid.
1662         #
1663         #  @ref tui_creation_solid "Example"
1664         def MakeSolid(self,theShells):
1665             # Example: see GEOM_TestAll.py
1666             anObj = self.ShapesOp.MakeSolidShells(theShells)
1667             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
1668             return anObj
1669
1670         ## Create a compound of the given shapes.
1671         #  @param theShapes List of shapes to put in compound.
1672         #  @return New GEOM_Object, containing the created compound.
1673         #
1674         #  @ref tui_creation_compound "Example"
1675         def MakeCompound(self,theShapes):
1676             # Example: see GEOM_TestAll.py
1677             anObj = self.ShapesOp.MakeCompound(theShapes)
1678             RaiseIfFailed("MakeCompound", self.ShapesOp)
1679             return anObj
1680
1681         # end of l3_advanced
1682         ## @}
1683
1684         ## @addtogroup l2_measure
1685         ## @{
1686
1687         ## Gives quantity of faces in the given shape.
1688         #  @param theShape Shape to count faces of.
1689         #  @return Quantity of faces.
1690         #
1691         #  @ref swig_NumberOf "Example"
1692         def NumberOfFaces(self, theShape):
1693             # Example: see GEOM_TestOthers.py
1694             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
1695             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
1696             return nb_faces
1697
1698         ## Gives quantity of edges in the given shape.
1699         #  @param theShape Shape to count edges of.
1700         #  @return Quantity of edges.
1701         #
1702         #  @ref swig_NumberOf "Example"
1703         def NumberOfEdges(self, theShape):
1704             # Example: see GEOM_TestOthers.py
1705             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
1706             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
1707             return nb_edges
1708
1709         ## Gives quantity of subshapes of type theShapeType in the given shape.
1710         #  @param theShape Shape to count subshapes of.
1711         #  @param theShapeType Type of subshapes to count.
1712         #  @return Quantity of subshapes of given type.
1713         #
1714         #  @ref swig_NumberOf "Example"
1715         def NumberOfSubShapes(self, theShape, theShapeType):
1716             # Example: see GEOM_TestOthers.py
1717             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
1718             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
1719             return nb_ss
1720
1721         ## Gives quantity of solids in the given shape.
1722         #  @param theShape Shape to count solids in.
1723         #  @return Quantity of solids.
1724         #
1725         #  @ref swig_NumberOf "Example"
1726         def NumberOfSolids(self, theShape):
1727             # Example: see GEOM_TestOthers.py
1728             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"])
1729             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
1730             return nb_solids
1731
1732         # end of l2_measure
1733         ## @}
1734
1735         ## @addtogroup l3_healing
1736         ## @{
1737
1738         ## Reverses an orientation the given shape.
1739         #  @param theShape Shape to be reversed.
1740         #  @return The reversed copy of theShape.
1741         #
1742         #  @ref swig_ChangeOrientation "Example"
1743         def ChangeOrientation(self,theShape):
1744             # Example: see GEOM_TestAll.py
1745             anObj = self.ShapesOp.ChangeOrientation(theShape)
1746             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
1747             return anObj
1748
1749         ## Shortcut to ChangeOrientation()
1750         #
1751         #  @ref swig_OrientationChange "Example"
1752         def OrientationChange(self,theShape):
1753             # Example: see GEOM_TestOthers.py
1754             anObj = self.ChangeOrientation(theShape)
1755             return anObj
1756
1757         # end of l3_healing
1758         ## @}
1759
1760         ## @addtogroup l4_obtain
1761         ## @{
1762
1763         ## Retrieve all free faces from the given shape.
1764         #  Free face is a face, which is not shared between two shells of the shape.
1765         #  @param theShape Shape to find free faces in.
1766         #  @return List of IDs of all free faces, contained in theShape.
1767         #
1768         #  @ref tui_measurement_tools_page "Example"
1769         def GetFreeFacesIDs(self,theShape):
1770             # Example: see GEOM_TestOthers.py
1771             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
1772             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
1773             return anIDs
1774
1775         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
1776         #  @param theShape1 Shape to find sub-shapes in.
1777         #  @param theShape2 Shape to find shared sub-shapes with.
1778         #  @param theShapeType Type of sub-shapes to be retrieved.
1779         #  @return List of sub-shapes of theShape1, shared with theShape2.
1780         #
1781         #  @ref swig_GetSharedShapes "Example"
1782         def GetSharedShapes(self,theShape1, theShape2, theShapeType):
1783             # Example: see GEOM_TestOthers.py
1784             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
1785             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
1786             return aList
1787
1788         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
1789         #  @param theShapes Shapes to find common sub-shapes of.
1790         #  @param theShapeType Type of sub-shapes to be retrieved.
1791         #  @return List of objects, that are sub-shapes of all given shapes.
1792         #
1793         #  @ref swig_GetSharedShapes "Example"
1794         def GetSharedShapesMulti(self, theShapes, theShapeType):
1795             # Example: see GEOM_TestOthers.py
1796             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
1797             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
1798             return aList
1799
1800         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
1801         #  situated relatively the specified plane by the certain way,
1802         #  defined through <VAR>theState</VAR> parameter.
1803         #  @param theShape Shape to find sub-shapes of.
1804         #  @param theShapeType Type of sub-shapes to be retrieved.
1805         #  @param theAx1 Vector (or line, or linear edge), specifying normal
1806         #                direction and location of the plane to find shapes on.
1807         #  @param theState The state of the subshapes to find. It can be one of
1808         #   ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
1809         #  @return List of all found sub-shapes.
1810         #
1811         #  @ref swig_GetShapesOnPlane "Example"
1812         def GetShapesOnPlane(self,theShape, theShapeType, theAx1, theState):
1813             # Example: see GEOM_TestOthers.py
1814             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
1815             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
1816             return aList
1817
1818         ## Works like the above method, but returns list of sub-shapes indices
1819         #
1820         #  @ref swig_GetShapesOnPlaneIDs "Example"
1821         def GetShapesOnPlaneIDs(self,theShape, theShapeType, theAx1, theState):
1822             # Example: see GEOM_TestOthers.py
1823             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
1824             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
1825             return aList
1826
1827         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
1828         #  situated relatively the specified plane by the certain way,
1829         #  defined through <VAR>theState</VAR> parameter.
1830         #  @param theShape Shape to find sub-shapes of.
1831         #  @param theShapeType Type of sub-shapes to be retrieved.
1832         #  @param theAx1 Vector (or line, or linear edge), specifying normal
1833         #                direction of the plane to find shapes on.
1834         #  @param thePnt Point specifying location of the plane to find shapes on.
1835         #  @param theState The state of the subshapes to find. It can be one of
1836         #                  ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
1837         #  @return List of all found sub-shapes.
1838         #
1839         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
1840         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState):
1841             # Example: see GEOM_TestOthers.py
1842             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
1843                                                                theAx1, thePnt, theState)
1844             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
1845             return aList
1846
1847         ## Works like the above method, but returns list of sub-shapes indices
1848         #
1849         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
1850         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
1851             # Example: see GEOM_TestOthers.py
1852             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
1853                                                                   theAx1, thePnt, theState)
1854             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
1855             return aList
1856
1857         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1858         #  the specified cylinder by the certain way, defined through \a theState parameter.
1859         #  @param theShape Shape to find sub-shapes of.
1860         #  @param theShapeType Type of sub-shapes to be retrieved.
1861         #  @param theAxis Vector (or line, or linear edge), specifying
1862         #                 axis of the cylinder to find shapes on.
1863         #  @param theRadius Radius of the cylinder to find shapes on.
1864         #  @param theState The state of the subshapes to find. It can be one of
1865         #   ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
1866         #  @return List of all found sub-shapes.
1867         #
1868         #  @ref swig_GetShapesOnCylinder "Example"
1869         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState):
1870             # Example: see GEOM_TestOthers.py
1871             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
1872             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
1873             return aList
1874
1875         ## Works like the above method, but returns list of sub-shapes indices
1876         #
1877         #  @ref swig_GetShapesOnCylinderIDs "Example"
1878         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
1879             # Example: see GEOM_TestOthers.py
1880             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
1881             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
1882             return aList
1883
1884         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1885         #  the specified cylinder by the certain way, defined through \a theState parameter.
1886         #  @param theShape Shape to find sub-shapes of.
1887         #  @param theShapeType Type of sub-shapes to be retrieved.
1888         #  @param theAxis Vector (or line, or linear edge), specifying
1889         #                 axis of the cylinder to find shapes on.
1890         #  @param thePnt Point specifying location of the bottom of the cylinder.
1891         #  @param theRadius Radius of the cylinder to find shapes on.
1892         #  @param theState The state of the subshapes to find. It can be one of
1893         #   ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
1894         #  @return List of all found sub-shapes.
1895         #
1896         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
1897         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
1898             # Example: see GEOM_TestOthers.py
1899             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
1900             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
1901             return aList
1902
1903         ## Works like the above method, but returns list of sub-shapes indices
1904         #
1905         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
1906         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
1907             # Example: see GEOM_TestOthers.py
1908             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
1909             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
1910             return aList
1911
1912         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1913         #  the specified sphere by the certain way, defined through \a theState parameter.
1914         #  @param theShape Shape to find sub-shapes of.
1915         #  @param theShapeType Type of sub-shapes to be retrieved.
1916         #  @param theCenter Point, specifying center of the sphere to find shapes on.
1917         #  @param theRadius Radius of the sphere to find shapes on.
1918         #  @param theState The state of the subshapes to find. It can be one of
1919         #   ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
1920         #  @return List of all found sub-shapes.
1921         #
1922         #  @ref swig_GetShapesOnSphere "Example"
1923         def GetShapesOnSphere(self,theShape, theShapeType, theCenter, theRadius, theState):
1924             # Example: see GEOM_TestOthers.py
1925             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
1926             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
1927             return aList
1928
1929         ## Works like the above method, but returns list of sub-shapes indices
1930         #
1931         #  @ref swig_GetShapesOnSphereIDs "Example"
1932         def GetShapesOnSphereIDs(self,theShape, theShapeType, theCenter, theRadius, theState):
1933             # Example: see GEOM_TestOthers.py
1934             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
1935             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
1936             return aList
1937
1938         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1939         #  the specified quadrangle by the certain way, defined through \a theState parameter.
1940         #  @param theShape Shape to find sub-shapes of.
1941         #  @param theShapeType Type of sub-shapes to be retrieved.
1942         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
1943         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
1944         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
1945         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
1946         #  @param theState The state of the subshapes to find. It can be one of
1947         #                  ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
1948         #  @return List of all found sub-shapes.
1949         #
1950         #  @ref swig_GetShapesOnQuadrangle "Example"
1951         def GetShapesOnQuadrangle(self, theShape, theShapeType,
1952                                   theTopLeftPoint, theTopRigthPoint,
1953                                   theBottomLeftPoint, theBottomRigthPoint, theState):
1954             # Example: see GEOM_TestOthers.py
1955             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
1956                                                         theTopLeftPoint, theTopRigthPoint,
1957                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
1958             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
1959             return aList
1960
1961         ## Works like the above method, but returns list of sub-shapes indices
1962         #
1963         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
1964         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
1965                                      theTopLeftPoint, theTopRigthPoint,
1966                                      theBottomLeftPoint, theBottomRigthPoint, theState):
1967             # Example: see GEOM_TestOthers.py
1968             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
1969                                                            theTopLeftPoint, theTopRigthPoint,
1970                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
1971             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
1972             return aList
1973
1974         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1975         #  the specified \a theBox by the certain way, defined through \a theState parameter.
1976         #  @param theBox Shape for relative comparing.
1977         #  @param theShape Shape to find sub-shapes of.
1978         #  @param theShapeType Type of sub-shapes to be retrieved.
1979         #  @param theState The state of the subshapes to find. It can be one of
1980         #                  ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
1981         #  @return List of all found sub-shapes.
1982         #
1983         #  @ref swig_GetShapesOnBox "Example"
1984         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState):
1985             # Example: see GEOM_TestOthers.py
1986             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
1987             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
1988             return aList
1989
1990         ## Works like the above method, but returns list of sub-shapes indices
1991         #
1992         #  @ref swig_GetShapesOnBoxIDs "Example"
1993         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
1994             # Example: see GEOM_TestOthers.py
1995             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
1996             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
1997             return aList
1998
1999         ## Find in \a theShape all sub-shapes of type \a theShapeType,
2000         #  situated relatively the specified \a theCheckShape by the
2001         #  certain way, defined through \a theState parameter.
2002         #  @param theCheckShape Shape for relative comparing. It must be a solid.
2003         #  @param theShape Shape to find sub-shapes of.
2004         #  @param theShapeType Type of sub-shapes to be retrieved.
2005         #  @param theState The state of the subshapes to find. It can be one of
2006         #                  ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
2007         #  @return List of all found sub-shapes.
2008         #
2009         #  @ref swig_GetShapesOnShape "Example"
2010         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState):
2011             # Example: see GEOM_TestOthers.py
2012             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
2013                                                    theShapeType, theState)
2014             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
2015             return aList
2016
2017         ## Works like the above method, but returns result as compound
2018         #
2019         #  @ref swig_GetShapesOnShapeAsCompound "Example"
2020         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState):
2021             # Example: see GEOM_TestOthers.py
2022             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
2023                                                              theShapeType, theState)
2024             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
2025             return anObj
2026
2027         ## Works like the above method, but returns list of sub-shapes indices
2028         #
2029         #  @ref swig_GetShapesOnShapeIDs "Example"
2030         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
2031             # Example: see GEOM_TestOthers.py
2032             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
2033                                                       theShapeType, theState)
2034             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
2035             return aList
2036
2037         ## Get sub-shape(s) of theShapeWhere, which are
2038         #  coincident with \a theShapeWhat or could be a part of it.
2039         #  @param theShapeWhere Shape to find sub-shapes of.
2040         #  @param theShapeWhat Shape, specifying what to find.
2041         #  @return Group of all found sub-shapes or a single found sub-shape.
2042         #
2043         #  @note This function has a restriction on argument shapes.
2044         #        If \a theShapeWhere has curved parts with significantly
2045         #        outstanding centres (i.e. the mass centre of a part is closer to
2046         #        \a theShapeWhat than to the part), such parts will not be found.
2047         #        @image html get_in_place_lost_part.png
2048         #
2049         #  @ref swig_GetInPlace "Example"
2050         def GetInPlace(self, theShapeWhere, theShapeWhat):
2051             # Example: see GEOM_TestOthers.py
2052             anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
2053             RaiseIfFailed("GetInPlace", self.ShapesOp)
2054             return anObj
2055
2056         ## Get sub-shape(s) of \a theShapeWhere, which are
2057         #  coincident with \a theShapeWhat or could be a part of it.
2058         #
2059         #  Implementation of this method is based on a saved history of an operation,
2060         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
2061         #  arguments (an argument shape or a sub-shape of an argument shape).
2062         #  The operation could be the Partition or one of boolean operations,
2063         #  performed on simple shapes (not on compounds).
2064         #
2065         #  @param theShapeWhere Shape to find sub-shapes of.
2066         #  @param theShapeWhat Shape, specifying what to find (must be in the
2067         #                      building history of the ShapeWhere).
2068         #  @return Group of all found sub-shapes or a single found sub-shape.
2069         #
2070         #  @ref swig_GetInPlace "Example"
2071         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat):
2072             # Example: see GEOM_TestOthers.py
2073             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
2074             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
2075             return anObj
2076
2077         ## Get sub-shape of theShapeWhere, which is
2078         #  equal to \a theShapeWhat.
2079         #  @param theShapeWhere Shape to find sub-shape of.
2080         #  @param theShapeWhat Shape, specifying what to find.
2081         #  @return New GEOM_Object for found sub-shape.
2082         #
2083         #  @ref swig_GetSame "Example"
2084         def GetSame(self,theShapeWhere, theShapeWhat):
2085             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
2086             RaiseIfFailed("GetSame", self.ShapesOp)
2087             return anObj
2088
2089         # end of l4_obtain
2090         ## @}
2091
2092         ## @addtogroup l4_access
2093         ## @{
2094
2095         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
2096         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
2097         #
2098         #  @ref swig_all_decompose "Example"
2099         def GetSubShape(self, aShape, ListOfID):
2100             # Example: see GEOM_TestAll.py
2101             anObj = self.AddSubShape(aShape,ListOfID)
2102             return anObj
2103
2104         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
2105         #
2106         #  @ref swig_all_decompose "Example"
2107         def GetSubShapeID(self, aShape, aSubShape):
2108             # Example: see GEOM_TestAll.py
2109             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
2110             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
2111             return anID
2112
2113         # end of l4_access
2114         ## @}
2115
2116         ## @addtogroup l4_decompose
2117         ## @{
2118
2119         ## Get all sub-shapes and groups of \a theShape,
2120         #  that were created already by any other methods.
2121         #  @param theShape Any shape.
2122         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
2123         #                       returned, else all found sub-shapes and groups.
2124         #  @return List of existing sub-objects of \a theShape.
2125         #
2126         #  @ref swig_all_decompose "Example"
2127         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
2128             # Example: see GEOM_TestAll.py
2129             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
2130             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
2131             return ListObj
2132
2133         ## Get all groups of \a theShape,
2134         #  that were created already by any other methods.
2135         #  @param theShape Any shape.
2136         #  @return List of existing groups of \a theShape.
2137         #
2138         #  @ref swig_all_decompose "Example"
2139         def GetGroups(self, theShape):
2140             # Example: see GEOM_TestAll.py
2141             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
2142             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
2143             return ListObj
2144
2145         ## Explode a shape on subshapes of a given type.
2146         #  @param aShape Shape to be exploded.
2147         #  @param aType Type of sub-shapes to be retrieved.
2148         #  @return List of sub-shapes of type theShapeType, contained in theShape.
2149         #
2150         #  @ref swig_all_decompose "Example"
2151         def SubShapeAll(self, aShape, aType):
2152             # Example: see GEOM_TestAll.py
2153             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, False)
2154             RaiseIfFailed("SubShapeAll", self.ShapesOp)
2155             return ListObj
2156
2157         ## Explode a shape on subshapes of a given type.
2158         #  @param aShape Shape to be exploded.
2159         #  @param aType Type of sub-shapes to be retrieved.
2160         #  @return List of IDs of sub-shapes.
2161         #
2162         #  @ref swig_all_decompose "Example"
2163         def SubShapeAllIDs(self, aShape, aType):
2164             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, False)
2165             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
2166             return ListObj
2167
2168         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
2169         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
2170         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
2171         #
2172         #  @ref swig_all_decompose "Example"
2173         def SubShape(self, aShape, aType, ListOfInd):
2174             # Example: see GEOM_TestAll.py
2175             ListOfIDs = []
2176             AllShapeIDsList = self.SubShapeAllIDs(aShape, aType)
2177             for ind in ListOfInd:
2178                 ListOfIDs.append(AllShapeIDsList[ind - 1])
2179             anObj = self.GetSubShape(aShape, ListOfIDs)
2180             return anObj
2181
2182         ## Explode a shape on subshapes of a given type.
2183         #  Sub-shapes will be sorted by coordinates of their gravity centers.
2184         #  @param aShape Shape to be exploded.
2185         #  @param aType Type of sub-shapes to be retrieved.
2186         #  @return List of sub-shapes of type theShapeType, contained in theShape.
2187         #
2188         #  @ref swig_SubShapeAllSorted "Example"
2189         def SubShapeAllSortedCentres(self, aShape, aType):
2190             # Example: see GEOM_TestAll.py
2191             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, True)
2192             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
2193             return ListObj
2194
2195         ## Explode a shape on subshapes of a given type.
2196         #  Sub-shapes will be sorted by coordinates of their gravity centers.
2197         #  @param aShape Shape to be exploded.
2198         #  @param aType Type of sub-shapes to be retrieved.
2199         #  @return List of IDs of sub-shapes.
2200         #
2201         #  @ref swig_all_decompose "Example"
2202         def SubShapeAllSortedCentresIDs(self, aShape, aType):
2203             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, True)
2204             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
2205             return ListIDs
2206
2207         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
2208         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
2209         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
2210         #
2211         #  @ref swig_all_decompose "Example"
2212         def SubShapeSortedCentres(self, aShape, aType, ListOfInd):
2213             # Example: see GEOM_TestAll.py
2214             ListOfIDs = []
2215             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, aType)
2216             for ind in ListOfInd:
2217                 ListOfIDs.append(AllShapeIDsList[ind - 1])
2218             anObj = self.GetSubShape(aShape, ListOfIDs)
2219             return anObj
2220
2221         # end of l4_decompose
2222         ## @}
2223
2224         ## @addtogroup l4_decompose_d
2225         ## @{
2226
2227         ## Deprecated method
2228         #  It works like SubShapeAllSortedCentres, but wrongly
2229         #  defines centres of faces, shells and solids.
2230         def SubShapeAllSorted(self, aShape, aType):
2231             ListObj = self.ShapesOp.MakeExplode(aShape, aType, True)
2232             RaiseIfFailed("MakeExplode", self.ShapesOp)
2233             return ListObj
2234
2235         ## Deprecated method
2236         #  It works like SubShapeAllSortedCentresIDs, but wrongly
2237         #  defines centres of faces, shells and solids.
2238         def SubShapeAllSortedIDs(self, aShape, aType):
2239             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, aType, True)
2240             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
2241             return ListIDs
2242
2243         ## Deprecated method
2244         #  It works like SubShapeSortedCentres, but has a bug
2245         #  (wrongly defines centres of faces, shells and solids).
2246         def SubShapeSorted(self, aShape, aType, ListOfInd):
2247             ListOfIDs = []
2248             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, aType)
2249             for ind in ListOfInd:
2250                 ListOfIDs.append(AllShapeIDsList[ind - 1])
2251             anObj = self.GetSubShape(aShape, ListOfIDs)
2252             return anObj
2253
2254         ## Extract shapes (main shape or sub-shape) of given type
2255         # @param aShape shape
2256         # @param aType  shape type
2257         def ExtractShapes(self, aShape, aType, sorted = False):
2258             ret = []
2259             t = aShape.GetShapeType()._v
2260             if hasattr(aType, "_v"): aType = aType._v
2261             if t == aType:
2262                 ret.append(aShape )
2263             elif sorted:
2264                 ret = self.SubShapeAllSortedCentres(aShape, aType)
2265             else:
2266                 ret = self.SubShapeAll(aShape, aType)
2267             return ret
2268         
2269         # end of l4_decompose_d
2270         ## @}
2271
2272         ## @addtogroup l3_healing
2273         ## @{
2274
2275         ## Apply a sequence of Shape Healing operators to the given object.
2276         #  @param theShape Shape to be processed.
2277         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
2278         #  @param theParameters List of names of parameters
2279         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
2280         #  @param theValues List of values of parameters, in the same order
2281         #                    as parameters are listed in <VAR>theParameters</VAR> list.
2282         #  @return New GEOM_Object, containing processed shape.
2283         #
2284         #  @ref tui_shape_processing "Example"
2285         def ProcessShape(self, theShape, theOperators, theParameters, theValues):
2286             # Example: see GEOM_TestHealing.py
2287             theValues,Parameters = ParseList(theValues)
2288             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
2289             # To avoid script failure in case of good argument shape
2290             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
2291                 return theShape
2292             RaiseIfFailed("ProcessShape", self.HealOp)
2293             for string in (theOperators + theParameters):
2294                 Parameters = ":" + Parameters
2295                 pass
2296             anObj.SetParameters(Parameters)
2297             return anObj
2298
2299         ## Remove faces from the given object (shape).
2300         #  @param theObject Shape to be processed.
2301         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
2302         #                  removes ALL faces of the given object.
2303         #  @return New GEOM_Object, containing processed shape.
2304         #
2305         #  @ref tui_suppress_faces "Example"
2306         def SuppressFaces(self,theObject, theFaces):
2307             # Example: see GEOM_TestHealing.py
2308             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
2309             RaiseIfFailed("SuppressFaces", self.HealOp)
2310             return anObj
2311
2312         ## Sewing of some shapes into single shape.
2313         #
2314         #  @ref tui_sewing "Example"
2315         def MakeSewing(self, ListShape, theTolerance):
2316             # Example: see GEOM_TestHealing.py
2317             comp = self.MakeCompound(ListShape)
2318             anObj = self.Sew(comp, theTolerance)
2319             return anObj
2320
2321         ## Sewing of the given object.
2322         #  @param theObject Shape to be processed.
2323         #  @param theTolerance Required tolerance value.
2324         #  @return New GEOM_Object, containing processed shape.
2325         def Sew(self, theObject, theTolerance):
2326             # Example: see MakeSewing() above
2327             theTolerance,Parameters = ParseParameters(theTolerance)
2328             anObj = self.HealOp.Sew(theObject, theTolerance)
2329             RaiseIfFailed("Sew", self.HealOp)
2330             anObj.SetParameters(Parameters)
2331             return anObj
2332
2333         ## Remove internal wires and edges from the given object (face).
2334         #  @param theObject Shape to be processed.
2335         #  @param theWires Indices of wires to be removed, if EMPTY then the method
2336         #                  removes ALL internal wires of the given object.
2337         #  @return New GEOM_Object, containing processed shape.
2338         #
2339         #  @ref tui_suppress_internal_wires "Example"
2340         def SuppressInternalWires(self,theObject, theWires):
2341             # Example: see GEOM_TestHealing.py
2342             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
2343             RaiseIfFailed("RemoveIntWires", self.HealOp)
2344             return anObj
2345
2346         ## Remove internal closed contours (holes) from the given object.
2347         #  @param theObject Shape to be processed.
2348         #  @param theWires Indices of wires to be removed, if EMPTY then the method
2349         #                  removes ALL internal holes of the given object
2350         #  @return New GEOM_Object, containing processed shape.
2351         #
2352         #  @ref tui_suppress_holes "Example"
2353         def SuppressHoles(self,theObject, theWires):
2354             # Example: see GEOM_TestHealing.py
2355             anObj = self.HealOp.FillHoles(theObject, theWires)
2356             RaiseIfFailed("FillHoles", self.HealOp)
2357             return anObj
2358
2359         ## Close an open wire.
2360         #  @param theObject Shape to be processed.
2361         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
2362         #                  if -1, then <VAR>theObject</VAR> itself is a wire.
2363         #  @param isCommonVertex If TRUE : closure by creation of a common vertex,
2364         #                        If FALS : closure by creation of an edge between ends.
2365         #  @return New GEOM_Object, containing processed shape.
2366         #
2367         #  @ref tui_close_contour "Example"
2368         def CloseContour(self,theObject, theWires, isCommonVertex):
2369             # Example: see GEOM_TestHealing.py
2370             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
2371             RaiseIfFailed("CloseContour", self.HealOp)
2372             return anObj
2373
2374         ## Addition of a point to a given edge object.
2375         #  @param theObject Shape to be processed.
2376         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
2377         #                      if -1, then theObject itself is the edge.
2378         #  @param theValue Value of parameter on edge or length parameter,
2379         #                  depending on \a isByParameter.
2380         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1],
2381         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
2382         #  @return New GEOM_Object, containing processed shape.
2383         #
2384         #  @ref tui_add_point_on_edge "Example"
2385         def DivideEdge(self,theObject, theEdgeIndex, theValue, isByParameter):
2386             # Example: see GEOM_TestHealing.py
2387             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
2388             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
2389             RaiseIfFailed("DivideEdge", self.HealOp)
2390             anObj.SetParameters(Parameters)
2391             return anObj
2392
2393         ## Change orientation of the given object. Updates given shape.
2394         #  @param theObject Shape to be processed.
2395         #
2396         #  @ref swig_todo "Example"
2397         def ChangeOrientationShell(self,theObject):
2398             theObject = self.HealOp.ChangeOrientation(theObject)
2399             RaiseIfFailed("ChangeOrientation", self.HealOp)
2400             pass
2401
2402         ## Change orientation of the given object.
2403         #  @param theObject Shape to be processed.
2404         #  @return New GEOM_Object, containing processed shape.
2405         #
2406         #  @ref swig_todo "Example"
2407         def ChangeOrientationShellCopy(self, theObject):
2408             anObj = self.HealOp.ChangeOrientationCopy(theObject)
2409             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
2410             return anObj
2411
2412         ## Try to limit tolerance of the given object by value \a theTolerance.
2413         #  @param theObject Shape to be processed.
2414         #  @param theTolerance Required tolerance value.
2415         #  @return New GEOM_Object, containing processed shape.
2416         #
2417         #  @ref tui_limit_tolerance "Example"
2418         def LimitTolerance(self, theObject, theTolerance = 1e-07):
2419             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
2420             RaiseIfFailed("LimitTolerance", self.HealOp)
2421             return anObj
2422
2423         ## Get a list of wires (wrapped in GEOM_Object-s),
2424         #  that constitute a free boundary of the given shape.
2425         #  @param theObject Shape to get free boundary of.
2426         #  @return [status, theClosedWires, theOpenWires]
2427         #  status: FALSE, if an error(s) occured during the method execution.
2428         #  theClosedWires: Closed wires on the free boundary of the given shape.
2429         #  theOpenWires: Open wires on the free boundary of the given shape.
2430         #
2431         #  @ref tui_measurement_tools_page "Example"
2432         def GetFreeBoundary(self, theObject):
2433             # Example: see GEOM_TestHealing.py
2434             anObj = self.HealOp.GetFreeBoundary(theObject)
2435             RaiseIfFailed("GetFreeBoundary", self.HealOp)
2436             return anObj
2437
2438         ## Replace coincident faces in theShape by one face.
2439         #  @param theShape Initial shape.
2440         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
2441         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
2442         #                         otherwise all initial shapes.
2443         #  @return New GEOM_Object, containing a copy of theShape without coincident faces.
2444         #
2445         #  @ref tui_glue_faces "Example"
2446         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True):
2447             # Example: see GEOM_Spanner.py
2448             theTolerance,Parameters = ParseParameters(theTolerance)
2449             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
2450             if anObj is None:
2451                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
2452             anObj.SetParameters(Parameters)
2453             return anObj
2454
2455         ## Find coincident faces in theShape for possible gluing.
2456         #  @param theShape Initial shape.
2457         #  @param theTolerance Maximum distance between faces,
2458         #                      which can be considered as coincident.
2459         #  @return ListOfGO.
2460         #
2461         #  @ref swig_todo "Example"
2462         def GetGlueFaces(self, theShape, theTolerance):
2463             # Example: see GEOM_Spanner.py
2464             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
2465             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
2466             return anObj
2467
2468         ## Replace coincident faces in theShape by one face
2469         #  in compliance with given list of faces
2470         #  @param theShape Initial shape.
2471         #  @param theTolerance Maximum distance between faces,
2472         #                      which can be considered as coincident.
2473         #  @param theFaces List of faces for gluing.
2474         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
2475         #                         otherwise all initial shapes.
2476         #  @return New GEOM_Object, containing a copy of theShape
2477         #          without some faces.
2478         #
2479         #  @ref swig_todo "Example"
2480         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces, doKeepNonSolids=True):
2481             # Example: see GEOM_Spanner.py
2482             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids)
2483             if anObj is None:
2484                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
2485             return anObj
2486
2487         # end of l3_healing
2488         ## @}
2489
2490         ## @addtogroup l3_boolean Boolean Operations
2491         ## @{
2492
2493         # -----------------------------------------------------------------------------
2494         # Boolean (Common, Cut, Fuse, Section)
2495         # -----------------------------------------------------------------------------
2496
2497         ## Perform one of boolean operations on two given shapes.
2498         #  @param theShape1 First argument for boolean operation.
2499         #  @param theShape2 Second argument for boolean operation.
2500         #  @param theOperation Indicates the operation to be done:
2501         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
2502         #  @return New GEOM_Object, containing the result shape.
2503         #
2504         #  @ref tui_fuse "Example"
2505         def MakeBoolean(self,theShape1, theShape2, theOperation):
2506             # Example: see GEOM_TestAll.py
2507             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
2508             RaiseIfFailed("MakeBoolean", self.BoolOp)
2509             return anObj
2510
2511         ## Shortcut to MakeBoolean(s1, s2, 1)
2512         #
2513         #  @ref tui_common "Example 1"
2514         #  \n @ref swig_MakeCommon "Example 2"
2515         def MakeCommon(self, s1, s2):
2516             # Example: see GEOM_TestOthers.py
2517             return self.MakeBoolean(s1, s2, 1)
2518
2519         ## Shortcut to MakeBoolean(s1, s2, 2)
2520         #
2521         #  @ref tui_cut "Example 1"
2522         #  \n @ref swig_MakeCommon "Example 2"
2523         def MakeCut(self, s1, s2):
2524             # Example: see GEOM_TestOthers.py
2525             return self.MakeBoolean(s1, s2, 2)
2526
2527         ## Shortcut to MakeBoolean(s1, s2, 3)
2528         #
2529         #  @ref tui_fuse "Example 1"
2530         #  \n @ref swig_MakeCommon "Example 2"
2531         def MakeFuse(self, s1, s2):
2532             # Example: see GEOM_TestOthers.py
2533             return self.MakeBoolean(s1, s2, 3)
2534
2535         ## Shortcut to MakeBoolean(s1, s2, 4)
2536         #
2537         #  @ref tui_section "Example 1"
2538         #  \n @ref swig_MakeCommon "Example 2"
2539         def MakeSection(self, s1, s2):
2540             # Example: see GEOM_TestOthers.py
2541             return self.MakeBoolean(s1, s2, 4)
2542
2543         # end of l3_boolean
2544         ## @}
2545
2546         ## @addtogroup l3_basic_op
2547         ## @{
2548
2549         ## Perform partition operation.
2550         #  @param ListShapes Shapes to be intersected.
2551         #  @param ListTools Shapes to intersect theShapes.
2552         #  !!!NOTE: Each compound from ListShapes and ListTools will be exploded
2553         #           in order to avoid possible intersection between shapes from
2554         #           this compound.
2555         #  @param Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
2556         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
2557         #         type will be detected automatically.
2558         #  @param KeepNonlimitShapes: if this parameter == 0, then only shapes of
2559         #                             target type (equal to Limit) are kept in the result,
2560         #                             else standalone shapes of lower dimension
2561         #                             are kept also (if they exist).
2562         #
2563         #  After implementation new version of PartitionAlgo (October 2006)
2564         #  other parameters are ignored by current functionality. They are kept
2565         #  in this function only for support old versions.
2566         #  Ignored parameters:
2567         #      @param ListKeepInside Shapes, outside which the results will be deleted.
2568         #         Each shape from theKeepInside must belong to theShapes also.
2569         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
2570         #         Each shape from theRemoveInside must belong to theShapes also.
2571         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
2572         #      @param ListMaterials Material indices for each shape. Make sence,
2573         #         only if theRemoveWebs is TRUE.
2574         #
2575         #  @return New GEOM_Object, containing the result shapes.
2576         #
2577         #  @ref tui_partition "Example"
2578         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
2579                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
2580                           KeepNonlimitShapes=0):
2581             # Example: see GEOM_TestAll.py
2582             if Limit == ShapeType["AUTO"]:
2583                 # automatic detection of the most appropriate shape limit type
2584                 lim = GEOM.SHAPE
2585                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
2586                 Limit = lim._v
2587                 pass
2588             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
2589                                               ListKeepInside, ListRemoveInside,
2590                                               Limit, RemoveWebs, ListMaterials,
2591                                               KeepNonlimitShapes);
2592             RaiseIfFailed("MakePartition", self.BoolOp)
2593             return anObj
2594
2595         ## Perform partition operation.
2596         #  This method may be useful if it is needed to make a partition for
2597         #  compound contains nonintersected shapes. Performance will be better
2598         #  since intersection between shapes from compound is not performed.
2599         #
2600         #  Description of all parameters as in previous method MakePartition()
2601         #
2602         #  !!!NOTE: Passed compounds (via ListShapes or via ListTools)
2603         #           have to consist of nonintersecting shapes.
2604         #
2605         #  @return New GEOM_Object, containing the result shapes.
2606         #
2607         #  @ref swig_todo "Example"
2608         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
2609                                                  ListKeepInside=[], ListRemoveInside=[],
2610                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
2611                                                  ListMaterials=[], KeepNonlimitShapes=0):
2612             if Limit == ShapeType["AUTO"]:
2613                 # automatic detection of the most appropriate shape limit type
2614                 lim = GEOM.SHAPE
2615                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
2616                 Limit = lim._v
2617                 pass
2618             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
2619                                                                      ListKeepInside, ListRemoveInside,
2620                                                                      Limit, RemoveWebs, ListMaterials,
2621                                                                      KeepNonlimitShapes);
2622             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
2623             return anObj
2624
2625         ## Shortcut to MakePartition()
2626         #
2627         #  @ref tui_partition "Example 1"
2628         #  \n @ref swig_Partition "Example 2"
2629         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
2630                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
2631                       KeepNonlimitShapes=0):
2632             # Example: see GEOM_TestOthers.py
2633             anObj = self.MakePartition(ListShapes, ListTools,
2634                                        ListKeepInside, ListRemoveInside,
2635                                        Limit, RemoveWebs, ListMaterials,
2636                                        KeepNonlimitShapes);
2637             return anObj
2638
2639         ## Perform partition of the Shape with the Plane
2640         #  @param theShape Shape to be intersected.
2641         #  @param thePlane Tool shape, to intersect theShape.
2642         #  @return New GEOM_Object, containing the result shape.
2643         #
2644         #  @ref tui_partition "Example"
2645         def MakeHalfPartition(self,theShape, thePlane):
2646             # Example: see GEOM_TestAll.py
2647             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
2648             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
2649             return anObj
2650
2651         # end of l3_basic_op
2652         ## @}
2653
2654         ## @addtogroup l3_transform
2655         ## @{
2656
2657         ## Translate the given object along the vector, specified
2658         #  by its end points, creating its copy before the translation.
2659         #  @param theObject The object to be translated.
2660         #  @param thePoint1 Start point of translation vector.
2661         #  @param thePoint2 End point of translation vector.
2662         #  @return New GEOM_Object, containing the translated object.
2663         #
2664         #  @ref tui_translation "Example 1"
2665         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
2666         def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2):
2667             # Example: see GEOM_TestAll.py
2668             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
2669             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
2670             return anObj
2671
2672         ## Translate the given object along the vector, specified by its components.
2673         #  @param theObject The object to be translated.
2674         #  @param theDX,theDY,theDZ Components of translation vector.
2675         #  @return Translated GEOM_Object.
2676         #
2677         #  @ref tui_translation "Example"
2678         def TranslateDXDYDZ(self,theObject, theDX, theDY, theDZ):
2679             # Example: see GEOM_TestAll.py
2680             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
2681             anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
2682             anObj.SetParameters(Parameters)
2683             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
2684             return anObj
2685
2686         ## Translate the given object along the vector, specified
2687         #  by its components, creating its copy before the translation.
2688         #  @param theObject The object to be translated.
2689         #  @param theDX,theDY,theDZ Components of translation vector.
2690         #  @return New GEOM_Object, containing the translated object.
2691         #
2692         #  @ref tui_translation "Example"
2693         def MakeTranslation(self,theObject, theDX, theDY, theDZ):
2694             # Example: see GEOM_TestAll.py
2695             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
2696             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
2697             anObj.SetParameters(Parameters)
2698             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
2699             return anObj
2700
2701         ## Translate the given object along the given vector,
2702         #  creating its copy before the translation.
2703         #  @param theObject The object to be translated.
2704         #  @param theVector The translation vector.
2705         #  @return New GEOM_Object, containing the translated object.
2706         #
2707         #  @ref tui_translation "Example"
2708         def MakeTranslationVector(self,theObject, theVector):
2709             # Example: see GEOM_TestAll.py
2710             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
2711             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
2712             return anObj
2713
2714         ## Translate the given object along the given vector on given distance.
2715         #  @param theObject The object to be translated.
2716         #  @param theVector The translation vector.
2717         #  @param theDistance The translation distance.
2718         #  @param theCopy Flag used to translate object itself or create a copy.
2719         #  @return Translated GEOM_Object.
2720         #
2721         #  @ref tui_translation "Example"
2722         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy):
2723             # Example: see GEOM_TestAll.py
2724             theDistance,Parameters = ParseParameters(theDistance)
2725             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
2726             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
2727             anObj.SetParameters(Parameters)
2728             return anObj
2729
2730         ## Translate the given object along the given vector on given distance,
2731         #  creating its copy before the translation.
2732         #  @param theObject The object to be translated.
2733         #  @param theVector The translation vector.
2734         #  @param theDistance The translation distance.
2735         #  @return New GEOM_Object, containing the translated object.
2736         #
2737         #  @ref tui_translation "Example"
2738         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance):
2739             # Example: see GEOM_TestAll.py
2740             theDistance,Parameters = ParseParameters(theDistance)
2741             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
2742             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
2743             anObj.SetParameters(Parameters)
2744             return anObj
2745
2746         ## Rotate the given object around the given axis on the given angle.
2747         #  @param theObject The object to be rotated.
2748         #  @param theAxis Rotation axis.
2749         #  @param theAngle Rotation angle in radians.
2750         #  @return Rotated GEOM_Object.
2751         #
2752         #  @ref tui_rotation "Example"
2753         def Rotate(self,theObject, theAxis, theAngle):
2754             # Example: see GEOM_TestAll.py
2755             flag = False
2756             if isinstance(theAngle,str):
2757                 flag = True
2758             theAngle, Parameters = ParseParameters(theAngle)
2759             if flag:
2760                 theAngle = theAngle*math.pi/180.0
2761             anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
2762             RaiseIfFailed("RotateCopy", self.TrsfOp)
2763             anObj.SetParameters(Parameters)
2764             return anObj
2765
2766         ## Rotate the given object around the given axis
2767         #  on the given angle, creating its copy before the rotatation.
2768         #  @param theObject The object to be rotated.
2769         #  @param theAxis Rotation axis.
2770         #  @param theAngle Rotation angle in radians.
2771         #  @return New GEOM_Object, containing the rotated object.
2772         #
2773         #  @ref tui_rotation "Example"
2774         def MakeRotation(self,theObject, theAxis, theAngle):
2775             # Example: see GEOM_TestAll.py
2776             flag = False
2777             if isinstance(theAngle,str):
2778                 flag = True
2779             theAngle, Parameters = ParseParameters(theAngle)
2780             if flag:
2781                 theAngle = theAngle*math.pi/180.0
2782             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
2783             RaiseIfFailed("RotateCopy", self.TrsfOp)
2784             anObj.SetParameters(Parameters)
2785             return anObj
2786
2787         ## Rotate given object around vector perpendicular to plane
2788         #  containing three points, creating its copy before the rotatation.
2789         #  @param theObject The object to be rotated.
2790         #  @param theCentPoint central point - the axis is the vector perpendicular to the plane
2791         #  containing the three points.
2792         #  @param thePoint1,thePoint2 - in a perpendicular plane of the axis.
2793         #  @return New GEOM_Object, containing the rotated object.
2794         #
2795         #  @ref tui_rotation "Example"
2796         def MakeRotationThreePoints(self,theObject, theCentPoint, thePoint1, thePoint2):
2797             # Example: see GEOM_TestAll.py
2798             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
2799             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
2800             return anObj
2801
2802         ## Scale the given object by the factor, creating its copy before the scaling.
2803         #  @param theObject The object to be scaled.
2804         #  @param thePoint Center point for scaling.
2805         #                  Passing None for it means scaling relatively the origin of global CS.
2806         #  @param theFactor Scaling factor value.
2807         #  @return New GEOM_Object, containing the scaled shape.
2808         #
2809         #  @ref tui_scale "Example"
2810         def MakeScaleTransform(self, theObject, thePoint, theFactor):
2811             # Example: see GEOM_TestAll.py
2812             theFactor, Parameters = ParseParameters(theFactor)
2813             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
2814             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
2815             anObj.SetParameters(Parameters)
2816             return anObj
2817
2818         ## Scale the given object by different factors along coordinate axes,
2819         #  creating its copy before the scaling.
2820         #  @param theObject The object to be scaled.
2821         #  @param thePoint Center point for scaling.
2822         #                  Passing None for it means scaling relatively the origin of global CS.
2823         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
2824         #  @return New GEOM_Object, containing the scaled shape.
2825         #
2826         #  @ref swig_scale "Example"
2827         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ):
2828             # Example: see GEOM_TestAll.py
2829             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
2830             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
2831                                                         theFactorX, theFactorY, theFactorZ)
2832             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
2833             anObj.SetParameters(Parameters)
2834             return anObj
2835
2836         ## Create an object, symmetrical
2837         #  to the given one relatively the given plane.
2838         #  @param theObject The object to be mirrored.
2839         #  @param thePlane Plane of symmetry.
2840         #  @return New GEOM_Object, containing the mirrored shape.
2841         #
2842         #  @ref tui_mirror "Example"
2843         def MakeMirrorByPlane(self,theObject, thePlane):
2844             # Example: see GEOM_TestAll.py
2845             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
2846             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
2847             return anObj
2848
2849         ## Create an object, symmetrical
2850         #  to the given one relatively the given axis.
2851         #  @param theObject The object to be mirrored.
2852         #  @param theAxis Axis of symmetry.
2853         #  @return New GEOM_Object, containing the mirrored shape.
2854         #
2855         #  @ref tui_mirror "Example"
2856         def MakeMirrorByAxis(self,theObject, theAxis):
2857             # Example: see GEOM_TestAll.py
2858             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
2859             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
2860             return anObj
2861
2862         ## Create an object, symmetrical
2863         #  to the given one relatively the given point.
2864         #  @param theObject The object to be mirrored.
2865         #  @param thePoint Point of symmetry.
2866         #  @return New GEOM_Object, containing the mirrored shape.
2867         #
2868         #  @ref tui_mirror "Example"
2869         def MakeMirrorByPoint(self,theObject, thePoint):
2870             # Example: see GEOM_TestAll.py
2871             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
2872             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
2873             return anObj
2874
2875         ## Modify the Location of the given object by LCS,
2876         #  creating its copy before the setting.
2877         #  @param theObject The object to be displaced.
2878         #  @param theStartLCS Coordinate system to perform displacement from it.
2879         #                     If \a theStartLCS is NULL, displacement
2880         #                     will be performed from global CS.
2881         #                     If \a theObject itself is used as \a theStartLCS,
2882         #                     its location will be changed to \a theEndLCS.
2883         #  @param theEndLCS Coordinate system to perform displacement to it.
2884         #  @return New GEOM_Object, containing the displaced shape.
2885         #
2886         #  @ref tui_modify_location "Example"
2887         def MakePosition(self,theObject, theStartLCS, theEndLCS):
2888             # Example: see GEOM_TestAll.py
2889             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
2890             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
2891             return anObj
2892
2893         ## Modify the Location of the given object by Path,
2894         #  @param  theObject The object to be displaced.
2895         #  @param  thePath Wire or Edge along that the object will be translated.
2896         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
2897         #  @param  theCopy is to create a copy objects if true.
2898         #  @param  theReverse - 0 for usual direction, 1 to reverse path direction.
2899         #  @return New GEOM_Object, containing the displaced shape.
2900         #
2901         #  @ref tui_modify_location "Example"
2902         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
2903             # Example: see GEOM_TestAll.py
2904             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
2905             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
2906             return anObj
2907
2908         ## Create new object as offset of the given one.
2909         #  @param theObject The base object for the offset.
2910         #  @param theOffset Offset value.
2911         #  @return New GEOM_Object, containing the offset object.
2912         #
2913         #  @ref tui_offset "Example"
2914         def MakeOffset(self,theObject, theOffset):
2915             # Example: see GEOM_TestAll.py
2916             theOffset, Parameters = ParseParameters(theOffset)
2917             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
2918             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
2919             anObj.SetParameters(Parameters)
2920             return anObj
2921
2922         # -----------------------------------------------------------------------------
2923         # Patterns
2924         # -----------------------------------------------------------------------------
2925
2926         ## Translate the given object along the given vector a given number times
2927         #  @param theObject The object to be translated.
2928         #  @param theVector Direction of the translation.
2929         #  @param theStep Distance to translate on.
2930         #  @param theNbTimes Quantity of translations to be done.
2931         #  @return New GEOM_Object, containing compound of all
2932         #          the shapes, obtained after each translation.
2933         #
2934         #  @ref tui_multi_translation "Example"
2935         def MakeMultiTranslation1D(self,theObject, theVector, theStep, theNbTimes):
2936             # Example: see GEOM_TestAll.py
2937             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
2938             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
2939             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
2940             anObj.SetParameters(Parameters)
2941             return anObj
2942
2943         ## Conseqently apply two specified translations to theObject specified number of times.
2944         #  @param theObject The object to be translated.
2945         #  @param theVector1 Direction of the first translation.
2946         #  @param theStep1 Step of the first translation.
2947         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
2948         #  @param theVector2 Direction of the second translation.
2949         #  @param theStep2 Step of the second translation.
2950         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
2951         #  @return New GEOM_Object, containing compound of all
2952         #          the shapes, obtained after each translation.
2953         #
2954         #  @ref tui_multi_translation "Example"
2955         def MakeMultiTranslation2D(self,theObject, theVector1, theStep1, theNbTimes1,
2956                                    theVector2, theStep2, theNbTimes2):
2957             # Example: see GEOM_TestAll.py
2958             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
2959             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
2960                                                  theVector2, theStep2, theNbTimes2)
2961             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
2962             anObj.SetParameters(Parameters)
2963             return anObj
2964
2965         ## Rotate the given object around the given axis a given number times.
2966         #  Rotation angle will be 2*PI/theNbTimes.
2967         #  @param theObject The object to be rotated.
2968         #  @param theAxis The rotation axis.
2969         #  @param theNbTimes Quantity of rotations to be done.
2970         #  @return New GEOM_Object, containing compound of all the
2971         #          shapes, obtained after each rotation.
2972         #
2973         #  @ref tui_multi_rotation "Example"
2974         def MultiRotate1D(self,theObject, theAxis, theNbTimes):
2975             # Example: see GEOM_TestAll.py
2976             theAxis, theNbTimes, Parameters = ParseParameters(theAxis, theNbTimes)
2977             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
2978             RaiseIfFailed("MultiRotate1D", self.TrsfOp)
2979             anObj.SetParameters(Parameters)
2980             return anObj
2981
2982         ## Rotate the given object around the
2983         #  given axis on the given angle a given number
2984         #  times and multi-translate each rotation result.
2985         #  Translation direction passes through center of gravity
2986         #  of rotated shape and its projection on the rotation axis.
2987         #  @param theObject The object to be rotated.
2988         #  @param theAxis Rotation axis.
2989         #  @param theAngle Rotation angle in graduces.
2990         #  @param theNbTimes1 Quantity of rotations to be done.
2991         #  @param theStep Translation distance.
2992         #  @param theNbTimes2 Quantity of translations to be done.
2993         #  @return New GEOM_Object, containing compound of all the
2994         #          shapes, obtained after each transformation.
2995         #
2996         #  @ref tui_multi_rotation "Example"
2997         def MultiRotate2D(self,theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2):
2998             # Example: see GEOM_TestAll.py
2999             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
3000             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
3001             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
3002             anObj.SetParameters(Parameters)
3003             return anObj
3004
3005         ## The same, as MultiRotate1D(), but axis is given by direction and point
3006         #  @ref swig_MakeMultiRotation "Example"
3007         def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes):
3008             # Example: see GEOM_TestOthers.py
3009             aVec = self.MakeLine(aPoint,aDir)
3010             anObj = self.MultiRotate1D(aShape,aVec,aNbTimes)
3011             return anObj
3012
3013         ## The same, as MultiRotate2D(), but axis is given by direction and point
3014         #  @ref swig_MakeMultiRotation "Example"
3015         def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2):
3016             # Example: see GEOM_TestOthers.py
3017             aVec = self.MakeLine(aPoint,aDir)
3018             anObj = self.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2)
3019             return anObj
3020
3021         # end of l3_transform
3022         ## @}
3023
3024         ## @addtogroup l3_local
3025         ## @{
3026
3027         ## Perform a fillet on all edges of the given shape.
3028         #  @param theShape Shape, to perform fillet on.
3029         #  @param theR Fillet radius.
3030         #  @return New GEOM_Object, containing the result shape.
3031         #
3032         #  @ref tui_fillet "Example 1"
3033         #  \n @ref swig_MakeFilletAll "Example 2"
3034         def MakeFilletAll(self,theShape, theR):
3035             # Example: see GEOM_TestOthers.py
3036             theR,Parameters = ParseParameters(theR)
3037             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
3038             RaiseIfFailed("MakeFilletAll", self.LocalOp)
3039             anObj.SetParameters(Parameters)
3040             return anObj
3041
3042         ## Perform a fillet on the specified edges/faces of the given shape
3043         #  @param theShape Shape, to perform fillet on.
3044         #  @param theR Fillet radius.
3045         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR>.
3046         #  @param theListShapes Global indices of edges/faces to perform fillet on.
3047         #    \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
3048         #  @return New GEOM_Object, containing the result shape.
3049         #
3050         #  @ref tui_fillet "Example"
3051         def MakeFillet(self,theShape, theR, theShapeType, theListShapes):
3052             # Example: see GEOM_TestAll.py
3053             theR,Parameters = ParseParameters(theR)
3054             anObj = None
3055             if theShapeType == ShapeType["EDGE"]:
3056                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
3057                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
3058             else:
3059                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
3060                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
3061             anObj.SetParameters(Parameters)
3062             return anObj
3063
3064         ## The same that MakeFillet but with two Fillet Radius R1 and R2
3065         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes):
3066             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
3067             anObj = None
3068             if theShapeType == ShapeType["EDGE"]:
3069                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
3070                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
3071             else:
3072                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
3073                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
3074             anObj.SetParameters(Parameters)
3075             return anObj
3076
3077         ## Perform a fillet on the specified edges of the given shape
3078         #  @param theShape - Wire Shape to perform fillet on.
3079         #  @param theR - Fillet radius.
3080         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
3081         #    \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
3082         #    \note The list of vertices could be empty,
3083         #          in this case fillet will done done at all vertices in wire
3084         #  @return New GEOM_Object, containing the result shape.
3085         #
3086         #  @ref tui_fillet2d "Example"
3087         def MakeFillet1D(self,theShape, theR, theListOfVertexes):
3088             # Example: see GEOM_TestAll.py
3089             theR,Parameters = ParseParameters(theR)
3090             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes)
3091             RaiseIfFailed("MakeFillet1D", self.LocalOp)
3092             anObj.SetParameters(Parameters)
3093             return anObj
3094
3095         ## Perform a fillet on the specified edges/faces of the given shape
3096         #  @param theShape - Face Shape to perform fillet on.
3097         #  @param theR - Fillet radius.
3098         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
3099         #    \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
3100         #  @return New GEOM_Object, containing the result shape.
3101         #
3102         #  @ref tui_fillet2d "Example"
3103         def MakeFillet2D(self,theShape, theR, theListOfVertexes):
3104             # Example: see GEOM_TestAll.py
3105             theR,Parameters = ParseParameters(theR)
3106             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
3107             RaiseIfFailed("MakeFillet2D", self.LocalOp)
3108             anObj.SetParameters(Parameters)
3109             return anObj
3110
3111         ## Perform a symmetric chamfer on all edges of the given shape.
3112         #  @param theShape Shape, to perform chamfer on.
3113         #  @param theD Chamfer size along each face.
3114         #  @return New GEOM_Object, containing the result shape.
3115         #
3116         #  @ref tui_chamfer "Example 1"
3117         #  \n @ref swig_MakeChamferAll "Example 2"
3118         def MakeChamferAll(self,theShape, theD):
3119             # Example: see GEOM_TestOthers.py
3120             theD,Parameters = ParseParameters(theD)
3121             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
3122             RaiseIfFailed("MakeChamferAll", self.LocalOp)
3123             anObj.SetParameters(Parameters)
3124             return anObj
3125
3126         ## Perform a chamfer on edges, common to the specified faces,
3127         #  with distance D1 on the Face1
3128         #  @param theShape Shape, to perform chamfer on.
3129         #  @param theD1 Chamfer size along \a theFace1.
3130         #  @param theD2 Chamfer size along \a theFace2.
3131         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
3132         #    \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
3133         #  @return New GEOM_Object, containing the result shape.
3134         #
3135         #  @ref tui_chamfer "Example"
3136         def MakeChamferEdge(self,theShape, theD1, theD2, theFace1, theFace2):
3137             # Example: see GEOM_TestAll.py
3138             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
3139             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
3140             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
3141             anObj.SetParameters(Parameters)
3142             return anObj
3143
3144         ## The Same that MakeChamferEdge but with params theD is chamfer length and
3145         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
3146         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2):
3147             flag = False
3148             if isinstance(theAngle,str):
3149                 flag = True
3150             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
3151             if flag:
3152                 theAngle = theAngle*math.pi/180.0
3153             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
3154             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
3155             anObj.SetParameters(Parameters)
3156             return anObj
3157
3158         ## Perform a chamfer on all edges of the specified faces,
3159         #  with distance D1 on the first specified face (if several for one edge)
3160         #  @param theShape Shape, to perform chamfer on.
3161         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
3162         #               connected to the edge, are in \a theFaces, \a theD1
3163         #               will be get along face, which is nearer to \a theFaces beginning.
3164         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
3165         #  @param theFaces Sequence of global indices of faces of \a theShape.
3166         #    \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
3167         #  @return New GEOM_Object, containing the result shape.
3168         #
3169         #  @ref tui_chamfer "Example"
3170         def MakeChamferFaces(self,theShape, theD1, theD2, theFaces):
3171             # Example: see GEOM_TestAll.py
3172             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
3173             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
3174             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
3175             anObj.SetParameters(Parameters)
3176             return anObj
3177
3178         ## The Same that MakeChamferFaces but with params theD is chamfer lenght and
3179         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
3180         #
3181         #  @ref swig_FilletChamfer "Example"
3182         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces):
3183             flag = False
3184             if isinstance(theAngle,str):
3185                 flag = True
3186             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
3187             if flag:
3188                 theAngle = theAngle*math.pi/180.0
3189             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
3190             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
3191             anObj.SetParameters(Parameters)
3192             return anObj
3193
3194         ## Perform a chamfer on edges,
3195         #  with distance D1 on the first specified face (if several for one edge)
3196         #  @param theShape Shape, to perform chamfer on.
3197         #  @param theD1,theD2 Chamfer size
3198         #  @param theEdges Sequence of edges of \a theShape.
3199         #  @return New GEOM_Object, containing the result shape.
3200         #
3201         #  @ref swig_FilletChamfer "Example"
3202         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges):
3203             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
3204             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
3205             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
3206             anObj.SetParameters(Parameters)
3207             return anObj
3208
3209         ## The Same that MakeChamferEdges but with params theD is chamfer lenght and
3210         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
3211         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges):
3212             flag = False
3213             if isinstance(theAngle,str):
3214                 flag = True
3215             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
3216             if flag:
3217                 theAngle = theAngle*math.pi/180.0
3218             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
3219             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
3220             anObj.SetParameters(Parameters)
3221             return anObj
3222
3223         ## Shortcut to MakeChamferEdge() and MakeChamferFaces()
3224         #
3225         #  @ref swig_MakeChamfer "Example"
3226         def MakeChamfer(self,aShape,d1,d2,aShapeType,ListShape):
3227             # Example: see GEOM_TestOthers.py
3228             anObj = None
3229             if aShapeType == ShapeType["EDGE"]:
3230                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1])
3231             else:
3232                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape)
3233             return anObj
3234
3235         # end of l3_local
3236         ## @}
3237
3238         ## @addtogroup l3_basic_op
3239         ## @{
3240
3241         ## Perform an Archimde operation on the given shape with given parameters.
3242         #  The object presenting the resulting face is returned.
3243         #  @param theShape Shape to be put in water.
3244         #  @param theWeight Weight og the shape.
3245         #  @param theWaterDensity Density of the water.
3246         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
3247         #  @return New GEOM_Object, containing a section of \a theShape
3248         #          by a plane, corresponding to water level.
3249         #
3250         #  @ref tui_archimede "Example"
3251         def Archimede(self,theShape, theWeight, theWaterDensity, theMeshDeflection):
3252             # Example: see GEOM_TestAll.py
3253             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
3254               theWeight,theWaterDensity,theMeshDeflection)
3255             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
3256             RaiseIfFailed("MakeArchimede", self.LocalOp)
3257             anObj.SetParameters(Parameters)
3258             return anObj
3259
3260         # end of l3_basic_op
3261         ## @}
3262
3263         ## @addtogroup l2_measure
3264         ## @{
3265
3266         ## Get point coordinates
3267         #  @return [x, y, z]
3268         #
3269         #  @ref tui_measurement_tools_page "Example"
3270         def PointCoordinates(self,Point):
3271             # Example: see GEOM_TestMeasures.py
3272             aTuple = self.MeasuOp.PointCoordinates(Point)
3273             RaiseIfFailed("PointCoordinates", self.MeasuOp)
3274             return aTuple
3275
3276         ## Get summarized length of all wires,
3277         #  area of surface and volume of the given shape.
3278         #  @param theShape Shape to define properties of.
3279         #  @return [theLength, theSurfArea, theVolume]
3280         #  theLength:   Summarized length of all wires of the given shape.
3281         #  theSurfArea: Area of surface of the given shape.
3282         #  theVolume:   Volume of the given shape.
3283         #
3284         #  @ref tui_measurement_tools_page "Example"
3285         def BasicProperties(self,theShape):
3286             # Example: see GEOM_TestMeasures.py
3287             aTuple = self.MeasuOp.GetBasicProperties(theShape)
3288             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
3289             return aTuple
3290
3291         ## Get parameters of bounding box of the given shape
3292         #  @param theShape Shape to obtain bounding box of.
3293         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
3294         #  Xmin,Xmax: Limits of shape along OX axis.
3295         #  Ymin,Ymax: Limits of shape along OY axis.
3296         #  Zmin,Zmax: Limits of shape along OZ axis.
3297         #
3298         #  @ref tui_measurement_tools_page "Example"
3299         def BoundingBox(self,theShape):
3300             # Example: see GEOM_TestMeasures.py
3301             aTuple = self.MeasuOp.GetBoundingBox(theShape)
3302             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
3303             return aTuple
3304
3305         ## Get inertia matrix and moments of inertia of theShape.
3306         #  @param theShape Shape to calculate inertia of.
3307         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
3308         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
3309         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
3310         #
3311         #  @ref tui_measurement_tools_page "Example"
3312         def Inertia(self,theShape):
3313             # Example: see GEOM_TestMeasures.py
3314             aTuple = self.MeasuOp.GetInertia(theShape)
3315             RaiseIfFailed("GetInertia", self.MeasuOp)
3316             return aTuple
3317
3318         ## Get minimal distance between the given shapes.
3319         #  @param theShape1,theShape2 Shapes to find minimal distance between.
3320         #  @return Value of the minimal distance between the given shapes.
3321         #
3322         #  @ref tui_measurement_tools_page "Example"
3323         def MinDistance(self, theShape1, theShape2):
3324             # Example: see GEOM_TestMeasures.py
3325             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
3326             RaiseIfFailed("GetMinDistance", self.MeasuOp)
3327             return aTuple[0]
3328
3329         ## Get minimal distance between the given shapes.
3330         #  @param theShape1,theShape2 Shapes to find minimal distance between.
3331         #  @return Value of the minimal distance between the given shapes.
3332         #
3333         #  @ref swig_all_measure "Example"
3334         def MinDistanceComponents(self, theShape1, theShape2):
3335             # Example: see GEOM_TestMeasures.py
3336             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
3337             RaiseIfFailed("GetMinDistance", self.MeasuOp)
3338             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
3339             return aRes
3340
3341         ## Get angle between the given shapes in degrees.
3342         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
3343         #  @return Value of the angle between the given shapes in degrees.
3344         #
3345         #  @ref tui_measurement_tools_page "Example"
3346         def GetAngle(self, theShape1, theShape2):
3347             # Example: see GEOM_TestMeasures.py
3348             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
3349             RaiseIfFailed("GetAngle", self.MeasuOp)
3350             return anAngle
3351         ## Get angle between the given shapes in radians.
3352         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
3353         #  @return Value of the angle between the given shapes in radians.
3354         #
3355         #  @ref tui_measurement_tools_page "Example"
3356         def GetAngleRadians(self, theShape1, theShape2):
3357             # Example: see GEOM_TestMeasures.py
3358             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
3359             RaiseIfFailed("GetAngle", self.MeasuOp)
3360             return anAngle
3361
3362         ## @name Curve Curvature Measurement
3363         #  Methods for receiving radius of curvature of curves
3364         #  in the given point
3365         ## @{
3366
3367         ## Measure curvature of a curve at a point, set by parameter.
3368         #  @ref swig_todo "Example"
3369         def CurveCurvatureByParam(self, theCurve, theParam):
3370             # Example: see GEOM_TestMeasures.py
3371             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
3372             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
3373             return aCurv
3374
3375         ## @details
3376         #  @ref swig_todo "Example"
3377         def CurveCurvatureByPoint(self, theCurve, thePoint):
3378             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
3379             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
3380             return aCurv
3381         ## @}
3382
3383         ## @name Surface Curvature Measurement
3384         #  Methods for receiving max and min radius of curvature of surfaces
3385         #  in the given point
3386         ## @{
3387
3388         ## @details
3389         ## @ref swig_todo "Example"
3390         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
3391             # Example: see GEOM_TestMeasures.py
3392             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
3393             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
3394             return aSurf
3395
3396         ## @details
3397         ## @ref swig_todo "Example"
3398         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
3399             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
3400             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
3401             return aSurf
3402
3403         ## @details
3404         ## @ref swig_todo "Example"
3405         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
3406             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
3407             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
3408             return aSurf
3409
3410         ## @details
3411         ## @ref swig_todo "Example"
3412         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
3413             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
3414             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
3415             return aSurf
3416         ## @}
3417
3418         ## Get min and max tolerances of sub-shapes of theShape
3419         #  @param theShape Shape, to get tolerances of.
3420         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
3421         #  FaceMin,FaceMax: Min and max tolerances of the faces.
3422         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.
3423         #  VertMin,VertMax: Min and max tolerances of the vertices.
3424         #
3425         #  @ref tui_measurement_tools_page "Example"
3426         def Tolerance(self,theShape):
3427             # Example: see GEOM_TestMeasures.py
3428             aTuple = self.MeasuOp.GetTolerance(theShape)
3429             RaiseIfFailed("GetTolerance", self.MeasuOp)
3430             return aTuple
3431
3432         ## Obtain description of the given shape (number of sub-shapes of each type)
3433         #  @param theShape Shape to be described.
3434         #  @return Description of the given shape.
3435         #
3436         #  @ref tui_measurement_tools_page "Example"
3437         def WhatIs(self,theShape):
3438             # Example: see GEOM_TestMeasures.py
3439             aDescr = self.MeasuOp.WhatIs(theShape)
3440             RaiseIfFailed("WhatIs", self.MeasuOp)
3441             return aDescr
3442
3443         ## Obtain quantity of shapes of the given type in \a theShape.
3444         #  If \a theShape is of type \a theType, it is also counted.
3445         #  @param theShape Shape to be described.
3446         #  @return Quantity of shapes of type \a theType in \a theShape.
3447         #
3448         #  @ref tui_measurement_tools_page "Example"
3449         def NbShapes (self, theShape, theType):
3450             # Example: see GEOM_TestMeasures.py
3451             listSh = self.SubShapeAllIDs(theShape, theType)
3452             Nb = len(listSh)
3453             if theShape.GetShapeType()._v == theType:
3454                 Nb = Nb + 1
3455                 pass
3456             return Nb
3457
3458         ## Obtain quantity of shapes of each type in \a theShape.
3459         #  The \a theShape is also counted.
3460         #  @param theShape Shape to be described.
3461         #  @return Dictionary of shape types with bound quantities of shapes.
3462         #
3463         #  @ref tui_measurement_tools_page "Example"
3464         def ShapeInfo (self, theShape):
3465             # Example: see GEOM_TestMeasures.py
3466             aDict = {}
3467             for typeSh in ShapeType:
3468                 if typeSh != "AUTO" and typeSh != "SHAPE":
3469                     listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
3470                     Nb = len(listSh)
3471                     if theShape.GetShapeType()._v == ShapeType[typeSh]:
3472                         Nb = Nb + 1
3473                         pass
3474                     aDict[typeSh] = Nb
3475                     pass
3476                 pass
3477             return aDict
3478
3479         ## Get a point, situated at the centre of mass of theShape.
3480         #  @param theShape Shape to define centre of mass of.
3481         #  @return New GEOM_Object, containing the created point.
3482         #
3483         #  @ref tui_measurement_tools_page "Example"
3484         def MakeCDG(self,theShape):
3485             # Example: see GEOM_TestMeasures.py
3486             anObj = self.MeasuOp.GetCentreOfMass(theShape)
3487             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
3488             return anObj
3489
3490         ## Get a vertex subshape by index depended with orientation.
3491         #  @param theShape Shape to find subshape.
3492         #  @param theIndex Index to find vertex by this index.
3493         #  @return New GEOM_Object, containing the created vertex.
3494         #
3495         #  @ref tui_measurement_tools_page "Example"
3496         def GetVertexByIndex(self,theShape, theIndex):
3497             # Example: see GEOM_TestMeasures.py
3498             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
3499             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
3500             return anObj
3501
3502         ## Get the first vertex of wire/edge depended orientation.
3503         #  @param theShape Shape to find first vertex.
3504         #  @return New GEOM_Object, containing the created vertex.
3505         #
3506         #  @ref tui_measurement_tools_page "Example"
3507         def GetFirstVertex(self,theShape):
3508             # Example: see GEOM_TestMeasures.py
3509             anObj = self.GetVertexByIndex(theShape, 0)
3510             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
3511             return anObj
3512
3513         ## Get the last vertex of wire/edge depended orientation.
3514         #  @param theShape Shape to find last vertex.
3515         #  @return New GEOM_Object, containing the created vertex.
3516         #
3517         #  @ref tui_measurement_tools_page "Example"
3518         def GetLastVertex(self,theShape):
3519             # Example: see GEOM_TestMeasures.py
3520             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"])
3521             anObj = self.GetVertexByIndex(theShape, (nb_vert-1))
3522             RaiseIfFailed("GetLastVertex", self.MeasuOp)
3523             return anObj
3524
3525         ## Get a normale to the given face. If the point is not given,
3526         #  the normale is calculated at the center of mass.
3527         #  @param theFace Face to define normale of.
3528         #  @param theOptionalPoint Point to compute the normale at.
3529         #  @return New GEOM_Object, containing the created vector.
3530         #
3531         #  @ref swig_todo "Example"
3532         def GetNormal(self, theFace, theOptionalPoint = None):
3533             # Example: see GEOM_TestMeasures.py
3534             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
3535             RaiseIfFailed("GetNormal", self.MeasuOp)
3536             return anObj
3537
3538         ## Check a topology of the given shape.
3539         #  @param theShape Shape to check validity of.
3540         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked,
3541         #                        if TRUE, the shape's geometry will be checked also.
3542         #  @return TRUE, if the shape "seems to be valid".
3543         #  If theShape is invalid, prints a description of problem.
3544         #
3545         #  @ref tui_measurement_tools_page "Example"
3546         def CheckShape(self,theShape, theIsCheckGeom = 0):
3547             # Example: see GEOM_TestMeasures.py
3548             if theIsCheckGeom:
3549                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
3550                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
3551             else:
3552                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
3553                 RaiseIfFailed("CheckShape", self.MeasuOp)
3554             if IsValid == 0:
3555                 print Status
3556             return IsValid
3557
3558         ## Get position (LCS) of theShape.
3559         #
3560         #  Origin of the LCS is situated at the shape's center of mass.
3561         #  Axes of the LCS are obtained from shape's location or,
3562         #  if the shape is a planar face, from position of its plane.
3563         #
3564         #  @param theShape Shape to calculate position of.
3565         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
3566         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
3567         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
3568         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
3569         #
3570         #  @ref swig_todo "Example"
3571         def GetPosition(self,theShape):
3572             # Example: see GEOM_TestMeasures.py
3573             aTuple = self.MeasuOp.GetPosition(theShape)
3574             RaiseIfFailed("GetPosition", self.MeasuOp)
3575             return aTuple
3576
3577         ## Get kind of theShape.
3578         #
3579         #  @param theShape Shape to get a kind of.
3580         #  @return Returns a kind of shape in terms of <VAR>GEOM_IKindOfShape.shape_kind</VAR> enumeration
3581         #          and a list of parameters, describing the shape.
3582         #  @note  Concrete meaning of each value, returned via \a theIntegers
3583         #         or \a theDoubles list depends on the kind of the shape.
3584         #         The full list of possible outputs is:
3585         #
3586         #  - geompy.kind.COMPOUND              nb_solids  nb_faces  nb_edges  nb_vertices
3587         #  - geompy.kind.COMPSOLID             nb_solids  nb_faces  nb_edges  nb_vertices
3588         #
3589         #  - geompy.kind.SHELL       geompy.info.CLOSED   nb_faces  nb_edges  nb_vertices
3590         #  - geompy.kind.SHELL       geompy.info.UNCLOSED nb_faces  nb_edges  nb_vertices
3591         #
3592         #  - geompy.kind.WIRE        geompy.info.CLOSED             nb_edges  nb_vertices
3593         #  - geompy.kind.WIRE        geompy.info.UNCLOSED           nb_edges  nb_vertices
3594         #
3595         #  - geompy.kind.SPHERE       xc yc zc            R
3596         #  - geompy.kind.CYLINDER     xb yb zb  dx dy dz  R         H
3597         #  - geompy.kind.BOX          xc yc zc                      ax ay az
3598         #  - geompy.kind.ROTATED_BOX  xc yc zc  zx zy zz  xx xy xz  ax ay az
3599         #  - geompy.kind.TORUS        xc yc zc  dx dy dz  R_1  R_2
3600         #  - geompy.kind.CONE         xb yb zb  dx dy dz  R_1  R_2  H
3601         #  - geompy.kind.POLYHEDRON                       nb_faces  nb_edges  nb_vertices
3602         #  - geompy.kind.SOLID                            nb_faces  nb_edges  nb_vertices
3603         #
3604         #  - geompy.kind.SPHERE2D     xc yc zc            R
3605         #  - geompy.kind.CYLINDER2D   xb yb zb  dx dy dz  R         H
3606         #  - geompy.kind.TORUS2D      xc yc zc  dx dy dz  R_1  R_2
3607         #  - geompy.kind.CONE2D       xc yc zc  dx dy dz  R_1  R_2  H
3608         #  - geompy.kind.DISK_CIRCLE  xc yc zc  dx dy dz  R
3609         #  - geompy.kind.DISK_ELLIPSE xc yc zc  dx dy dz  R_1  R_2
3610         #  - geompy.kind.POLYGON      xo yo zo  dx dy dz            nb_edges  nb_vertices
3611         #  - geompy.kind.PLANE        xo yo zo  dx dy dz
3612         #  - geompy.kind.PLANAR       xo yo zo  dx dy dz            nb_edges  nb_vertices
3613         #  - geompy.kind.FACE                                       nb_edges  nb_vertices
3614         #
3615         #  - geompy.kind.CIRCLE       xc yc zc  dx dy dz  R
3616         #  - geompy.kind.ARC_CIRCLE   xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2
3617         #  - geompy.kind.ELLIPSE      xc yc zc  dx dy dz  R_1  R_2
3618         #  - geompy.kind.ARC_ELLIPSE  xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2
3619         #  - geompy.kind.LINE         xo yo zo  dx dy dz
3620         #  - geompy.kind.SEGMENT      x1 y1 z1  x2 y2 z2
3621         #  - geompy.kind.EDGE                                                 nb_vertices
3622         #
3623         #  - geompy.kind.VERTEX       x  y  z
3624         #
3625         #  @ref swig_todo "Example"
3626         def KindOfShape(self,theShape):
3627             # Example: see GEOM_TestMeasures.py
3628             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
3629             RaiseIfFailed("KindOfShape", self.MeasuOp)
3630
3631             aKind  = aRoughTuple[0]
3632             anInts = aRoughTuple[1]
3633             aDbls  = aRoughTuple[2]
3634
3635             # Now there is no exception from this rule:
3636             aKindTuple = [aKind] + aDbls + anInts
3637
3638             # If they are we will regroup parameters for such kind of shape.
3639             # For example:
3640             #if aKind == kind.SOME_KIND:
3641             #    #  SOME_KIND     int int double int double double
3642             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
3643
3644             return aKindTuple
3645
3646         # end of l2_measure
3647         ## @}
3648
3649         ## @addtogroup l2_import_export
3650         ## @{
3651
3652         ## Import a shape from the BREP or IGES or STEP file
3653         #  (depends on given format) with given name.
3654         #  @param theFileName The file, containing the shape.
3655         #  @param theFormatName Specify format for the file reading.
3656         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
3657         #         If format 'IGES_SCALE' is used instead 'IGES' length unit will be
3658         #         set to 'meter' and result model will be scaled.
3659         #  @return New GEOM_Object, containing the imported shape.
3660         #
3661         #  @ref swig_Import_Export "Example"
3662         def Import(self,theFileName, theFormatName):
3663             # Example: see GEOM_TestOthers.py
3664             anObj = self.InsertOp.Import(theFileName, theFormatName)
3665             RaiseIfFailed("Import", self.InsertOp)
3666             return anObj
3667
3668         ## Shortcut to Import() for BREP format
3669         #
3670         #  @ref swig_Import_Export "Example"
3671         def ImportBREP(self,theFileName):
3672             # Example: see GEOM_TestOthers.py
3673             return self.Import(theFileName, "BREP")
3674
3675         ## Shortcut to Import() for IGES format
3676         #
3677         #  @ref swig_Import_Export "Example"
3678         def ImportIGES(self,theFileName):
3679             # Example: see GEOM_TestOthers.py
3680             return self.Import(theFileName, "IGES")
3681
3682         ## Return length unit from given IGES file
3683         #
3684         #  @ref swig_Import_Export "Example"
3685         def GetIGESUnit(self,theFileName):
3686             # Example: see GEOM_TestOthers.py
3687             anObj = self.InsertOp.Import(theFileName, "IGES_UNIT")
3688             #RaiseIfFailed("Import", self.InsertOp)
3689             # recieve name using returned vertex
3690             UnitName = "M"
3691             if anObj.GetShapeType() == GEOM.VERTEX:
3692                 vertices = [anObj]
3693             else:
3694                 vertices = self.SubShapeAll(anObj,ShapeType["VERTEX"])
3695             if len(vertices)>0:
3696                 p = self.PointCoordinates(vertices[0])
3697                 if abs(p[0]-0.01) < 1.e-6:
3698                     UnitName = "CM"
3699                 elif abs(p[0]-0.001) < 1.e-6:
3700                     UnitName = "MM"
3701             return UnitName
3702
3703         ## Shortcut to Import() for STEP format
3704         #
3705         #  @ref swig_Import_Export "Example"
3706         def ImportSTEP(self,theFileName):
3707             # Example: see GEOM_TestOthers.py
3708             return self.Import(theFileName, "STEP")
3709
3710         ## Export the given shape into a file with given name.
3711         #  @param theObject Shape to be stored in the file.
3712         #  @param theFileName Name of the file to store the given shape in.
3713         #  @param theFormatName Specify format for the shape storage.
3714         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
3715         #
3716         #  @ref swig_Import_Export "Example"
3717         def Export(self,theObject, theFileName, theFormatName):
3718             # Example: see GEOM_TestOthers.py
3719             self.InsertOp.Export(theObject, theFileName, theFormatName)
3720             if self.InsertOp.IsDone() == 0:
3721                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
3722                 pass
3723             pass
3724
3725         ## Shortcut to Export() for BREP format
3726         #
3727         #  @ref swig_Import_Export "Example"
3728         def ExportBREP(self,theObject, theFileName):
3729             # Example: see GEOM_TestOthers.py
3730             return self.Export(theObject, theFileName, "BREP")
3731
3732         ## Shortcut to Export() for IGES format
3733         #
3734         #  @ref swig_Import_Export "Example"
3735         def ExportIGES(self,theObject, theFileName):
3736             # Example: see GEOM_TestOthers.py
3737             return self.Export(theObject, theFileName, "IGES")
3738
3739         ## Shortcut to Export() for STEP format
3740         #
3741         #  @ref swig_Import_Export "Example"
3742         def ExportSTEP(self,theObject, theFileName):
3743             # Example: see GEOM_TestOthers.py
3744             return self.Export(theObject, theFileName, "STEP")
3745
3746         # end of l2_import_export
3747         ## @}
3748
3749         ## @addtogroup l3_blocks
3750         ## @{
3751
3752         ## Create a quadrangle face from four edges. Order of Edges is not
3753         #  important. It is  not necessary that edges share the same vertex.
3754         #  @param E1,E2,E3,E4 Edges for the face bound.
3755         #  @return New GEOM_Object, containing the created face.
3756         #
3757         #  @ref tui_building_by_blocks_page "Example"
3758         def MakeQuad(self,E1, E2, E3, E4):
3759             # Example: see GEOM_Spanner.py
3760             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
3761             RaiseIfFailed("MakeQuad", self.BlocksOp)
3762             return anObj
3763
3764         ## Create a quadrangle face on two edges.
3765         #  The missing edges will be built by creating the shortest ones.
3766         #  @param E1,E2 Two opposite edges for the face.
3767         #  @return New GEOM_Object, containing the created face.
3768         #
3769         #  @ref tui_building_by_blocks_page "Example"
3770         def MakeQuad2Edges(self,E1, E2):
3771             # Example: see GEOM_Spanner.py
3772             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
3773             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
3774             return anObj
3775
3776         ## Create a quadrangle face with specified corners.
3777         #  The missing edges will be built by creating the shortest ones.
3778         #  @param V1,V2,V3,V4 Corner vertices for the face.
3779         #  @return New GEOM_Object, containing the created face.
3780         #
3781         #  @ref tui_building_by_blocks_page "Example 1"
3782         #  \n @ref swig_MakeQuad4Vertices "Example 2"
3783         def MakeQuad4Vertices(self,V1, V2, V3, V4):
3784             # Example: see GEOM_Spanner.py
3785             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
3786             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
3787             return anObj
3788
3789         ## Create a hexahedral solid, bounded by the six given faces. Order of
3790         #  faces is not important. It is  not necessary that Faces share the same edge.
3791         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
3792         #  @return New GEOM_Object, containing the created solid.
3793         #
3794         #  @ref tui_building_by_blocks_page "Example 1"
3795         #  \n @ref swig_MakeHexa "Example 2"
3796         def MakeHexa(self,F1, F2, F3, F4, F5, F6):
3797             # Example: see GEOM_Spanner.py
3798             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
3799             RaiseIfFailed("MakeHexa", self.BlocksOp)
3800             return anObj
3801
3802         ## Create a hexahedral solid between two given faces.
3803         #  The missing faces will be built by creating the smallest ones.
3804         #  @param F1,F2 Two opposite faces for the hexahedral solid.
3805         #  @return New GEOM_Object, containing the created solid.
3806         #
3807         #  @ref tui_building_by_blocks_page "Example 1"
3808         #  \n @ref swig_MakeHexa2Faces "Example 2"
3809         def MakeHexa2Faces(self,F1, F2):
3810             # Example: see GEOM_Spanner.py
3811             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
3812             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
3813             return anObj
3814
3815         # end of l3_blocks
3816         ## @}
3817
3818         ## @addtogroup l3_blocks_op
3819         ## @{
3820
3821         ## Get a vertex, found in the given shape by its coordinates.
3822         #  @param theShape Block or a compound of blocks.
3823         #  @param theX,theY,theZ Coordinates of the sought vertex.
3824         #  @param theEpsilon Maximum allowed distance between the resulting
3825         #                    vertex and point with the given coordinates.
3826         #  @return New GEOM_Object, containing the found vertex.
3827         #
3828         #  @ref swig_GetPoint "Example"
3829         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon):
3830             # Example: see GEOM_TestOthers.py
3831             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
3832             RaiseIfFailed("GetPoint", self.BlocksOp)
3833             return anObj
3834
3835         ## Find a vertex of the given shape, which has minimal distance to the given point.
3836         #  @param theShape Any shape.
3837         #  @param thePoint Point, close to the desired vertex.
3838         #  @return New GEOM_Object, containing the found vertex.
3839         #
3840         #  @ref swig_GetVertexNearPoint "Example"
3841         def GetVertexNearPoint(self, theShape, thePoint):
3842             # Example: see GEOM_TestOthers.py
3843             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
3844             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
3845             return anObj
3846
3847         ## Get an edge, found in the given shape by two given vertices.
3848         #  @param theShape Block or a compound of blocks.
3849         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
3850         #  @return New GEOM_Object, containing the found edge.
3851         #
3852         #  @ref swig_GetEdge "Example"
3853         def GetEdge(self, theShape, thePoint1, thePoint2):
3854             # Example: see GEOM_Spanner.py
3855             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
3856             RaiseIfFailed("GetEdge", self.BlocksOp)
3857             return anObj
3858
3859         ## Find an edge of the given shape, which has minimal distance to the given point.
3860         #  @param theShape Block or a compound of blocks.
3861         #  @param thePoint Point, close to the desired edge.
3862         #  @return New GEOM_Object, containing the found edge.
3863         #
3864         #  @ref swig_GetEdgeNearPoint "Example"
3865         def GetEdgeNearPoint(self, theShape, thePoint):
3866             # Example: see GEOM_TestOthers.py
3867             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
3868             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
3869             return anObj
3870
3871         ## Returns a face, found in the given shape by four given corner vertices.
3872         #  @param theShape Block or a compound of blocks.
3873         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
3874         #  @return New GEOM_Object, containing the found face.
3875         #
3876         #  @ref swig_todo "Example"
3877         def GetFaceByPoints(self,theShape, thePoint1, thePoint2, thePoint3, thePoint4):
3878             # Example: see GEOM_Spanner.py
3879             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
3880             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
3881             return anObj
3882
3883         ## Get a face of block, found in the given shape by two given edges.
3884         #  @param theShape Block or a compound of blocks.
3885         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
3886         #  @return New GEOM_Object, containing the found face.
3887         #
3888         #  @ref swig_todo "Example"
3889         def GetFaceByEdges(self,theShape, theEdge1, theEdge2):
3890             # Example: see GEOM_Spanner.py
3891             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
3892             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
3893             return anObj
3894
3895         ## Find a face, opposite to the given one in the given block.
3896         #  @param theBlock Must be a hexahedral solid.
3897         #  @param theFace Face of \a theBlock, opposite to the desired face.
3898         #  @return New GEOM_Object, containing the found face.
3899         #
3900         #  @ref swig_GetOppositeFace "Example"
3901         def GetOppositeFace(self,theBlock, theFace):
3902             # Example: see GEOM_Spanner.py
3903             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
3904             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
3905             return anObj
3906
3907         ## Find a face of the given shape, which has minimal distance to the given point.
3908         #  @param theShape Block or a compound of blocks.
3909         #  @param thePoint Point, close to the desired face.
3910         #  @return New GEOM_Object, containing the found face.
3911         #
3912         #  @ref swig_GetFaceNearPoint "Example"
3913         def GetFaceNearPoint(self, theShape, thePoint):
3914             # Example: see GEOM_Spanner.py
3915             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
3916             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
3917             return anObj
3918
3919         ## Find a face of block, whose outside normale has minimal angle with the given vector.
3920         #  @param theBlock Block or a compound of blocks.
3921         #  @param theVector Vector, close to the normale of the desired face.
3922         #  @return New GEOM_Object, containing the found face.
3923         #
3924         #  @ref swig_todo "Example"
3925         def GetFaceByNormale(self, theBlock, theVector):
3926             # Example: see GEOM_Spanner.py
3927             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
3928             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
3929             return anObj
3930
3931         ## Find all subshapes of type \a theShapeType of the given shape,
3932         #  which have minimal distance to the given point.
3933         #  @param theShape Any shape.
3934         #  @param thePoint Point, close to the desired shape.
3935         #  @param theShapeType Defines what kind of subshapes is searched.
3936         #  @param theTolerance The tolerance for distances comparison. All shapes
3937         #                      with distances to the given point in interval
3938         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
3939         #  @return New GEOM_Object, containing a group of all found shapes.
3940         #
3941         #  @ref swig_GetShapesNearPoint "Example"
3942         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07):
3943             # Example: see GEOM_TestOthers.py
3944             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
3945             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
3946             return anObj
3947
3948         # end of l3_blocks_op
3949         ## @}
3950
3951         ## @addtogroup l4_blocks_measure
3952         ## @{
3953
3954         ## Check, if the compound of blocks is given.
3955         #  To be considered as a compound of blocks, the
3956         #  given shape must satisfy the following conditions:
3957         #  - Each element of the compound should be a Block (6 faces and 12 edges).
3958         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
3959         #  - The compound should be connexe.
3960         #  - The glue between two quadrangle faces should be applied.
3961         #  @param theCompound The compound to check.
3962         #  @return TRUE, if the given shape is a compound of blocks.
3963         #  If theCompound is not valid, prints all discovered errors.
3964         #
3965         #  @ref tui_measurement_tools_page "Example 1"
3966         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
3967         def CheckCompoundOfBlocks(self,theCompound):
3968             # Example: see GEOM_Spanner.py
3969             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
3970             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
3971             if IsValid == 0:
3972                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
3973                 print Descr
3974             return IsValid
3975
3976         ## Remove all seam and degenerated edges from \a theShape.
3977         #  Unite faces and edges, sharing one surface. It means that
3978         #  this faces must have references to one C++ surface object (handle).
3979         #  @param theShape The compound or single solid to remove irregular edges from.
3980         #  @param doUnionFaces If True, then unite faces. If False (the default value),
3981         #         do not unite faces.
3982         #  @return Improved shape.
3983         #
3984         #  @ref swig_RemoveExtraEdges "Example"
3985         def RemoveExtraEdges(self, theShape, doUnionFaces=False):
3986             # Example: see GEOM_TestOthers.py
3987             nbFacesOptimum = -1 # -1 means do not unite faces
3988             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
3989             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
3990             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
3991             return anObj
3992
3993         ## Check, if the given shape is a blocks compound.
3994         #  Fix all detected errors.
3995         #    \note Single block can be also fixed by this method.
3996         #  @param theShape The compound to check and improve.
3997         #  @return Improved compound.
3998         #
3999         #  @ref swig_CheckAndImprove "Example"
4000         def CheckAndImprove(self,theShape):
4001             # Example: see GEOM_TestOthers.py
4002             anObj = self.BlocksOp.CheckAndImprove(theShape)
4003             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
4004             return anObj
4005
4006         # end of l4_blocks_measure
4007         ## @}
4008
4009         ## @addtogroup l3_blocks_op
4010         ## @{
4011
4012         ## Get all the blocks, contained in the given compound.
4013         #  @param theCompound The compound to explode.
4014         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
4015         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
4016         #    \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
4017         #  @return List of GEOM_Objects, containing the retrieved blocks.
4018         #
4019         #  @ref tui_explode_on_blocks "Example 1"
4020         #  \n @ref swig_MakeBlockExplode "Example 2"
4021         def MakeBlockExplode(self,theCompound, theMinNbFaces, theMaxNbFaces):
4022             # Example: see GEOM_TestOthers.py
4023             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
4024             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
4025             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
4026             for anObj in aList:
4027                 anObj.SetParameters(Parameters)
4028                 pass
4029             return aList
4030
4031         ## Find block, containing the given point inside its volume or on boundary.
4032         #  @param theCompound Compound, to find block in.
4033         #  @param thePoint Point, close to the desired block. If the point lays on
4034         #         boundary between some blocks, we return block with nearest center.
4035         #  @return New GEOM_Object, containing the found block.
4036         #
4037         #  @ref swig_todo "Example"
4038         def GetBlockNearPoint(self,theCompound, thePoint):
4039             # Example: see GEOM_Spanner.py
4040             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
4041             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
4042             return anObj
4043
4044         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
4045         #  @param theCompound Compound, to find block in.
4046         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
4047         #  @return New GEOM_Object, containing the found block.
4048         #
4049         #  @ref swig_GetBlockByParts "Example"
4050         def GetBlockByParts(self,theCompound, theParts):
4051             # Example: see GEOM_TestOthers.py
4052             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
4053             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
4054             return anObj
4055
4056         ## Return all blocks, containing all the elements, passed as the parts.
4057         #  @param theCompound Compound, to find blocks in.
4058         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
4059         #  @return List of GEOM_Objects, containing the found blocks.
4060         #
4061         #  @ref swig_todo "Example"
4062         def GetBlocksByParts(self,theCompound, theParts):
4063             # Example: see GEOM_Spanner.py
4064             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
4065             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
4066             return aList
4067
4068         ## Multi-transformate block and glue the result.
4069         #  Transformation is defined so, as to superpose direction faces.
4070         #  @param Block Hexahedral solid to be multi-transformed.
4071         #  @param DirFace1 ID of First direction face.
4072         #  @param DirFace2 ID of Second direction face.
4073         #  @param NbTimes Quantity of transformations to be done.
4074         #    \note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
4075         #  @return New GEOM_Object, containing the result shape.
4076         #
4077         #  @ref tui_multi_transformation "Example"
4078         def MakeMultiTransformation1D(self,Block, DirFace1, DirFace2, NbTimes):
4079             # Example: see GEOM_Spanner.py
4080             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
4081             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
4082             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
4083             anObj.SetParameters(Parameters)
4084             return anObj
4085
4086         ## Multi-transformate block and glue the result.
4087         #  @param Block Hexahedral solid to be multi-transformed.
4088         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
4089         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
4090         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
4091         #  @return New GEOM_Object, containing the result shape.
4092         #
4093         #  @ref tui_multi_transformation "Example"
4094         def MakeMultiTransformation2D(self,Block, DirFace1U, DirFace2U, NbTimesU,
4095                                       DirFace1V, DirFace2V, NbTimesV):
4096             # Example: see GEOM_Spanner.py
4097             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
4098               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
4099             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
4100                                                             DirFace1V, DirFace2V, NbTimesV)
4101             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
4102             anObj.SetParameters(Parameters)
4103             return anObj
4104
4105         ## Build all possible propagation groups.
4106         #  Propagation group is a set of all edges, opposite to one (main)
4107         #  edge of this group directly or through other opposite edges.
4108         #  Notion of Opposite Edge make sence only on quadrangle face.
4109         #  @param theShape Shape to build propagation groups on.
4110         #  @return List of GEOM_Objects, each of them is a propagation group.
4111         #
4112         #  @ref swig_Propagate "Example"
4113         def Propagate(self,theShape):
4114             # Example: see GEOM_TestOthers.py
4115             listChains = self.BlocksOp.Propagate(theShape)
4116             RaiseIfFailed("Propagate", self.BlocksOp)
4117             return listChains
4118
4119         # end of l3_blocks_op
4120         ## @}
4121
4122         ## @addtogroup l3_groups
4123         ## @{
4124
4125         ## Creates a new group which will store sub shapes of theMainShape
4126         #  @param theMainShape is a GEOM object on which the group is selected
4127         #  @param theShapeType defines a shape type of the group
4128         #  @return a newly created GEOM group
4129         #
4130         #  @ref tui_working_with_groups_page "Example 1"
4131         #  \n @ref swig_CreateGroup "Example 2"
4132         def CreateGroup(self,theMainShape, theShapeType):
4133             # Example: see GEOM_TestOthers.py
4134             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
4135             RaiseIfFailed("CreateGroup", self.GroupOp)
4136             return anObj
4137
4138         ## Adds a sub object with ID theSubShapeId to the group
4139         #  @param theGroup is a GEOM group to which the new sub shape is added
4140         #  @param theSubShapeID is a sub shape ID in the main object.
4141         #  \note Use method GetSubShapeID() to get an unique ID of the sub shape
4142         #
4143         #  @ref tui_working_with_groups_page "Example"
4144         def AddObject(self,theGroup, theSubShapeID):
4145             # Example: see GEOM_TestOthers.py
4146             self.GroupOp.AddObject(theGroup, theSubShapeID)
4147             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
4148                 RaiseIfFailed("AddObject", self.GroupOp)
4149                 pass
4150             pass
4151
4152         ## Removes a sub object with ID \a theSubShapeId from the group
4153         #  @param theGroup is a GEOM group from which the new sub shape is removed
4154         #  @param theSubShapeID is a sub shape ID in the main object.
4155         #  \note Use method GetSubShapeID() to get an unique ID of the sub shape
4156         #
4157         #  @ref tui_working_with_groups_page "Example"
4158         def RemoveObject(self,theGroup, theSubShapeID):
4159             # Example: see GEOM_TestOthers.py
4160             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
4161             RaiseIfFailed("RemoveObject", self.GroupOp)
4162             pass
4163
4164         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
4165         #  @param theGroup is a GEOM group to which the new sub shapes are added.
4166         #  @param theSubShapes is a list of sub shapes to be added.
4167         #
4168         #  @ref tui_working_with_groups_page "Example"
4169         def UnionList (self,theGroup, theSubShapes):
4170             # Example: see GEOM_TestOthers.py
4171             self.GroupOp.UnionList(theGroup, theSubShapes)
4172             RaiseIfFailed("UnionList", self.GroupOp)
4173             pass
4174
4175         ## Works like the above method, but argument
4176         #  theSubShapes here is a list of sub-shapes indices
4177         #
4178         #  @ref swig_UnionIDs "Example"
4179         def UnionIDs(self,theGroup, theSubShapes):
4180             # Example: see GEOM_TestOthers.py
4181             self.GroupOp.UnionIDs(theGroup, theSubShapes)
4182             RaiseIfFailed("UnionIDs", self.GroupOp)
4183             pass
4184
4185         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
4186         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
4187         #  @param theSubShapes is a list of sub-shapes to be removed.
4188         #
4189         #  @ref tui_working_with_groups_page "Example"
4190         def DifferenceList (self,theGroup, theSubShapes):
4191             # Example: see GEOM_TestOthers.py
4192             self.GroupOp.DifferenceList(theGroup, theSubShapes)
4193             RaiseIfFailed("DifferenceList", self.GroupOp)
4194             pass
4195
4196         ## Works like the above method, but argument
4197         #  theSubShapes here is a list of sub-shapes indices
4198         #
4199         #  @ref swig_DifferenceIDs "Example"
4200         def DifferenceIDs(self,theGroup, theSubShapes):
4201             # Example: see GEOM_TestOthers.py
4202             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
4203             RaiseIfFailed("DifferenceIDs", self.GroupOp)
4204             pass
4205
4206         ## Returns a list of sub objects ID stored in the group
4207         #  @param theGroup is a GEOM group for which a list of IDs is requested
4208         #
4209         #  @ref swig_GetObjectIDs "Example"
4210         def GetObjectIDs(self,theGroup):
4211             # Example: see GEOM_TestOthers.py
4212             ListIDs = self.GroupOp.GetObjects(theGroup)
4213             RaiseIfFailed("GetObjects", self.GroupOp)
4214             return ListIDs
4215
4216         ## Returns a type of sub objects stored in the group
4217         #  @param theGroup is a GEOM group which type is returned.
4218         #
4219         #  @ref swig_GetType "Example"
4220         def GetType(self,theGroup):
4221             # Example: see GEOM_TestOthers.py
4222             aType = self.GroupOp.GetType(theGroup)
4223             RaiseIfFailed("GetType", self.GroupOp)
4224             return aType
4225
4226         ## Convert a type of geom object from id to string value
4227         #  @param theId is a GEOM obect type id.
4228         #
4229         #  @ref swig_GetType "Example"
4230         def ShapeIdToType(self, theId):
4231             if theId == 0:
4232                 return "COPY"
4233             if theId == 1:
4234                 return "IMPORT"
4235             if theId == 2:
4236                 return "POINT"
4237             if theId == 3:
4238                 return "VECTOR"
4239             if theId == 4:
4240                 return "PLANE"
4241             if theId == 5:
4242                 return "LINE"
4243             if theId == 6:
4244                 return "TORUS"
4245             if theId == 7:
4246                 return "BOX"
4247             if theId == 8:
4248                 return "CYLINDER"
4249             if theId == 9:
4250                 return "CONE"
4251             if theId == 10:
4252                 return "SPHERE"
4253             if theId == 11:
4254                 return "PRISM"
4255             if theId == 12:
4256                 return "REVOLUTION"
4257             if theId == 13:
4258                 return "BOOLEAN"
4259             if theId == 14:
4260                 return "PARTITION"
4261             if theId == 15:
4262                 return "POLYLINE"
4263             if theId == 16:
4264                 return "CIRCLE"
4265             if theId == 17:
4266                 return "SPLINE"
4267             if theId == 18:
4268                 return "ELLIPSE"
4269             if theId == 19:
4270                 return "CIRC_ARC"
4271             if theId == 20:
4272                 return "FILLET"
4273             if theId == 21:
4274                 return "CHAMFER"
4275             if theId == 22:
4276                 return "EDGE"
4277             if theId == 23:
4278                 return "WIRE"
4279             if theId == 24:
4280                 return "FACE"
4281             if theId == 25:
4282                 return "SHELL"
4283             if theId == 26:
4284                 return "SOLID"
4285             if theId == 27:
4286                 return "COMPOUND"
4287             if theId == 28:
4288                 return "SUBSHAPE"
4289             if theId == 29:
4290                 return "PIPE"
4291             if theId == 30:
4292                 return "ARCHIMEDE"
4293             if theId == 31:
4294                 return "FILLING"
4295             if theId == 32:
4296                 return "EXPLODE"
4297             if theId == 33:
4298                 return "GLUED"
4299             if theId == 34:
4300                 return "SKETCHER"
4301             if theId == 35:
4302                 return "CDG"
4303             if theId == 36:
4304                 return "FREE_BOUNDS"
4305             if theId == 37:
4306                 return "GROUP"
4307             if theId == 38:
4308                 return "BLOCK"
4309             if theId == 39:
4310                 return "MARKER"
4311             if theId == 40:
4312                 return "THRUSECTIONS"
4313             if theId == 41:
4314                 return "COMPOUNDFILTER"
4315             if theId == 42:
4316                 return "SHAPES_ON_SHAPE"
4317             if theId == 43:
4318                 return "ELLIPSE_ARC"
4319             if theId == 44:
4320                 return "3DSKETCHER"
4321             if theId == 45:
4322                 return "FILLET_2D"
4323             if theId == 46:
4324                 return "FILLET_1D"
4325             return "Shape Id not exist."
4326
4327         ## Returns a main shape associated with the group
4328         #  @param theGroup is a GEOM group for which a main shape object is requested
4329         #  @return a GEOM object which is a main shape for theGroup
4330         #
4331         #  @ref swig_GetMainShape "Example"
4332         def GetMainShape(self,theGroup):
4333             # Example: see GEOM_TestOthers.py
4334             anObj = self.GroupOp.GetMainShape(theGroup)
4335             RaiseIfFailed("GetMainShape", self.GroupOp)
4336             return anObj
4337
4338         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
4339         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
4340         #
4341         #  @ref swig_todo "Example"
4342         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1):
4343             edges = self.SubShapeAll(theShape, ShapeType["EDGE"])
4344             edges_in_range = []
4345             for edge in edges:
4346                 Props = self.BasicProperties(edge)
4347                 if min_length <= Props[0] and Props[0] <= max_length:
4348                     if (not include_min) and (min_length == Props[0]):
4349                         skip = 1
4350                     else:
4351                         if (not include_max) and (Props[0] == max_length):
4352                             skip = 1
4353                         else:
4354                             edges_in_range.append(edge)
4355
4356             if len(edges_in_range) <= 0:
4357                 print "No edges found by given criteria"
4358                 return 0
4359
4360             group_edges = self.CreateGroup(theShape, ShapeType["EDGE"])
4361             self.UnionList(group_edges, edges_in_range)
4362
4363             return group_edges
4364
4365         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
4366         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
4367         #
4368         #  @ref swig_todo "Example"
4369         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
4370             nb_selected = sg.SelectedCount()
4371             if nb_selected < 1:
4372                 print "Select a shape before calling this function, please."
4373                 return 0
4374             if nb_selected > 1:
4375                 print "Only one shape must be selected"
4376                 return 0
4377
4378             id_shape = sg.getSelected(0)
4379             shape = IDToObject( id_shape )
4380
4381             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
4382
4383             left_str  = " < "
4384             right_str = " < "
4385             if include_min: left_str  = " <= "
4386             if include_max: right_str  = " <= "
4387
4388             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
4389                                     + left_str + "length" + right_str + `max_length`)
4390
4391             sg.updateObjBrowser(1)
4392
4393             return group_edges
4394
4395         # end of l3_groups
4396         ## @}
4397
4398         ## @addtogroup l4_advanced
4399         ## @{
4400
4401         ## Create a T-shape object with specified caracteristics for the main
4402         #  and the incident pipes (radius, width, half-length).
4403         #  The extremities of the main pipe are located on junctions points P1 and P2.
4404         #  The extremity of the incident pipe is located on junction point P3.
4405         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
4406         #  the main plane of the T-shape is XOY.
4407         #  @param theR1 Internal radius of main pipe
4408         #  @param theW1 Width of main pipe
4409         #  @param theL1 Half-length of main pipe
4410         #  @param theR2 Internal radius of incident pipe (R2 < R1)
4411         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
4412         #  @param theL2 Half-length of incident pipe
4413         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
4414         #  @param theP1 1st junction point of main pipe
4415         #  @param theP2 2nd junction point of main pipe
4416         #  @param theP3 Junction point of incident pipe
4417         #  @return List of GEOM_Objects, containing the created shape and propagation groups.
4418         #
4419         #  @ref tui_creation_pipetshape "Example"
4420         def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None):
4421             theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)
4422             if (theP1 and theP2 and theP3):
4423                 anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3)
4424             else:
4425                 anObj = self.AdvOp.MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh)
4426             RaiseIfFailed("MakePipeTShape", self.AdvOp)
4427             if Parameters: anObj[0].SetParameters(Parameters)
4428             return anObj
4429
4430         ## Create a T-shape object with chamfer and with specified caracteristics for the main
4431         #  and the incident pipes (radius, width, half-length). The chamfer is
4432         #  created on the junction of the pipes.
4433         #  The extremities of the main pipe are located on junctions points P1 and P2.
4434         #  The extremity of the incident pipe is located on junction point P3.
4435         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
4436         #  the main plane of the T-shape is XOY.
4437         #  @param theR1 Internal radius of main pipe
4438         #  @param theW1 Width of main pipe
4439         #  @param theL1 Half-length of main pipe
4440         #  @param theR2 Internal radius of incident pipe (R2 < R1)
4441         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
4442         #  @param theL2 Half-length of incident pipe
4443         #  @param theH Height of the chamfer.
4444         #  @param theW Width of the chamfer.
4445         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
4446         #  @param theP1 1st junction point of main pipe
4447         #  @param theP2 2nd junction point of main pipe
4448         #  @param theP3 Junction point of incident pipe
4449         #  @return List of GEOM_Objects, containing the created shape and propagation groups.
4450         #
4451         #  @ref tui_creation_pipetshape "Example"
4452         def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None):
4453             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW)
4454             if (theP1 and theP2 and theP3):
4455               anObj = self.AdvOp.MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3)
4456             else:
4457               anObj = self.AdvOp.MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh)
4458             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
4459             if Parameters: anObj[0].SetParameters(Parameters)
4460             return anObj
4461
4462         ## Create a T-shape object with fillet and with specified caracteristics for the main
4463         #  and the incident pipes (radius, width, half-length). The fillet is
4464         #  created on the junction of the pipes.
4465         #  The extremities of the main pipe are located on junctions points P1 and P2.
4466         #  The extremity of the incident pipe is located on junction point P3.
4467         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
4468         #  the main plane of the T-shape is XOY.
4469         #  @param theR1 Internal radius of main pipe
4470         #  @param theW1 Width of main pipe
4471         #  @param theL1 Half-length of main pipe
4472         #  @param theR2 Internal radius of incident pipe (R2 < R1)
4473         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
4474         #  @param theL2 Half-length of incident pipe
4475         #  @param theRF Radius of curvature of fillet.
4476         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
4477         #  @param theP1 1st junction point of main pipe
4478         #  @param theP2 2nd junction point of main pipe
4479         #  @param theP3 Junction point of incident pipe
4480         #  @return List of GEOM_Objects, containing the created shape and propagation groups.
4481         #
4482         #  @ref tui_creation_pipetshape "Example"
4483         def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None):
4484             theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
4485             if (theP1 and theP2 and theP3):
4486               anObj = self.AdvOp.MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3)
4487             else:
4488               anObj = self.AdvOp.MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh)
4489             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
4490             if Parameters: anObj[0].SetParameters(Parameters)
4491             return anObj
4492
4493         #@@ insert new functions before this line @@ do not remove this line @@#
4494
4495         # end of l4_advanced
4496         ## @}
4497
4498         ## Create a copy of the given object
4499         #  @ingroup l1_geompy_auxiliary
4500         #
4501         #  @ref swig_all_advanced "Example"
4502         def MakeCopy(self,theOriginal):
4503             # Example: see GEOM_TestAll.py
4504             anObj = self.InsertOp.MakeCopy(theOriginal)
4505             RaiseIfFailed("MakeCopy", self.InsertOp)
4506             return anObj
4507
4508         ## Add Path to load python scripts from
4509         #  @ingroup l1_geompy_auxiliary
4510         def addPath(self,Path):
4511             if (sys.path.count(Path) < 1):
4512                 sys.path.append(Path)
4513                 pass
4514             pass
4515
4516         ## Load marker texture from the file
4517         #  @param Path a path to the texture file
4518         #  @return unique texture identifier
4519         #  @ingroup l1_geompy_auxiliary
4520         def LoadTexture(self, Path):
4521             # Example: see GEOM_TestAll.py
4522             ID = self.InsertOp.LoadTexture(Path)
4523             RaiseIfFailed("LoadTexture", self.InsertOp)
4524             return ID
4525
4526         ## Add marker texture. @a Width and @a Height parameters
4527         #  specify width and height of the texture in pixels.
4528         #  If @a RowData is @c True, @a Texture parameter should represent texture data
4529         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
4530         #  parameter should be unpacked string, in which '1' symbols represent opaque
4531         #  pixels and '0' represent transparent pixels of the texture bitmap.
4532         #
4533         #  @param Width texture width in pixels
4534         #  @param Height texture height in pixels
4535         #  @param Texture texture data
4536         #  @param RowData if @c True, @a Texture data are packed in the byte stream
4537         #  @ingroup l1_geompy_auxiliary
4538         def AddTexture(self, Width, Height, Texture, RowData=False):
4539             # Example: see GEOM_TestAll.py
4540             if not RowData: Texture = PackData(Texture)
4541             ID = self.InsertOp.AddTexture(Width, Height, Texture)
4542             RaiseIfFailed("AddTexture", self.InsertOp)
4543             return ID
4544
4545 import omniORB
4546 #Register the new proxy for GEOM_Gen
4547 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geompyDC)