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