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