Salome HOME
Mantis issue 0022227: Integration request: Building a surface from a cloud of points
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 #  GEOM GEOM_SWIG : binding of C++ implementation with Python
22 #  File   : geomBuilder.py
23 #  Author : Paul RASCLE, EDF
24 #  Module : GEOM
25
26 """
27     \namespace geomBuilder
28     \brief Module geomBuilder
29 """
30
31 ##
32 ## @defgroup l1_publish_data Publishing results in SALOME study
33 ## @{
34 ##
35 ## @details
36 ##
37 ## By default, all functions of geomBuilder Python module do not publish
38 ## resulting geometrical objects. This can be done in the Python script
39 ## by means of \ref geomBuilder.geomBuilder.addToStudy() "addToStudy()"
40 ## or \ref geomBuilder.geomBuilder.addToStudyInFather() "addToStudyInFather()"
41 ## functions.
42 ## 
43 ## However, it is possible to publish result data in the study
44 ## automatically. For this, almost each function of
45 ## \ref geomBuilder.geomBuilder "geomBuilder" class has
46 ## an additional @a theName parameter (@c None by default).
47 ## As soon as non-empty string value is passed to this parameter,
48 ## the result object is published in the study automatically.
49 ## 
50 ## For example, consider the following Python script:
51 ## 
52 ## @code
53 ## import salome
54 ## from salome.geom import geomBuilder
55 ## geompy = geomBuilder.New(salome.myStudy)
56 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) # box is not published in the study yet
57 ## geompy.addToStudy(box, "box")             # explicit publishing
58 ## @endcode
59 ## 
60 ## Last two lines can be replaced by one-line instruction:
61 ## 
62 ## @code
63 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, theName="box") # box is published in the study with "box" name
64 ## @endcode
65 ## 
66 ## ... or simply
67 ## 
68 ## @code
69 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "box") # box is published in the study with "box" name
70 ## @endcode
71 ##
72 ## Note, that some functions produce more than one geometrical objects. For example,
73 ## \ref geomBuilder.geomBuilder.GetNonBlocks() "GetNonBlocks()" function returns two objects:
74 ## group of all non-hexa solids and group of all non-quad faces.
75 ## For such functions it is possible to specify separate names for results.
76 ##
77 ## For example
78 ##
79 ## @code
80 ## # create and publish cylinder
81 ## cyl = geompy.MakeCylinderRH(100, 100, "cylinder")
82 ## # get non blocks from cylinder
83 ## g1, g2 = geompy.GetNonBlocks(cyl, "nonblock")
84 ## @endcode
85 ##
86 ## Above example will publish both result compounds (first with non-hexa solids and
87 ## second with non-quad faces) as two items, both named "nonblock".
88 ## However, if second command is invoked as
89 ##
90 ## @code
91 ## g1, g2 = geompy.GetNonBlocks(cyl, ("nonhexa", "nonquad"))
92 ## @endcode
93 ##
94 ## ... the first compound will be published with "nonhexa" name, and second will be named "nonquad".
95 ##
96 ## Automatic publication of all results can be also enabled/disabled by means of the function
97 ## \ref geomBuilder.geomBuilder.addToStudyAuto() "addToStudyAuto()". The automatic publishing
98 ## is managed by the numeric parameter passed to this function:
99 ## - if @a maxNbSubShapes = 0, automatic publishing is disabled.
100 ## - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
101 ##   maximum number of sub-shapes allowed for publishing is unlimited; any negative
102 ##   value passed as parameter has the same effect.
103 ## - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
104 ##   maximum number of sub-shapes allowed for publishing is set to specified value.
105 ## 
106 ## When automatic publishing is enabled, you even do not need to pass @a theName parameter 
107 ## to the functions creating objects, instead default names will be used. However, you
108 ## can always change the behavior, by passing explicit name to the @a theName parameter
109 ## and it will be used instead default one.
110 ## The publishing of the collections of objects will be done according to the above
111 ## mentioned rules (maximum allowed number of sub-shapes).
112 ##
113 ## For example:
114 ##
115 ## @code
116 ## import salome
117 ## from salome.geom import geomBuilder
118 ## geompy = geomBuilder.New(salome.myStudy)
119 ## geompy.addToStudyAuto() # enable automatic publication
120 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100) 
121 ## # the box is created and published in the study with default name
122 ## geompy.addToStudyAuto(5) # set max allowed number of sub-shapes to 5
123 ## vertices = geompy.SubShapeAll(box, geomBuilder.ShapeType['VERTEX'])
124 ## # only 5 first vertices will be published, with default names
125 ## print len(vertices)
126 ## # note, that result value still containes all 8 vertices
127 ## geompy.addToStudyAuto(-1) # disable automatic publication
128 ## @endcode
129 ##
130 ## This feature can be used, for example, for debugging purposes.
131 ##
132 ## @note
133 ## - Use automatic publication feature with caution. When it is enabled, any function of
134 ##   \ref geomBuilder.geomBuilder "geomBuilder" class publishes the results in the study,
135 ##   that can lead to the huge size of the study data tree.
136 ##   For example, repeating call of \ref geomBuilder.geomBuilder.SubShapeAll() "SubShapeAll()"
137 ##   command on the same main shape each time will publish all child objects, that will lead
138 ##   to a lot of duplicated items in the study.
139 ## - Sub-shapes are automatically published as child items of the parent main shape in the study if main
140 ##   shape was also published before. Otherwise, sub-shapes are published as top-level objects.
141 ## - Not that some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   @theName parameter (and, thus, do not support automatic publication).
143 ##   For example, some transformation operations like
144 ##   \ref geomBuilder.geomBuilder.TranslateDXDYDZ() "TranslateDXDYDZ()".
145 ##   Refer to the documentation to check if some function has such possibility.
146 ##
147 ## @}
148
149
150 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
151
152 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
153 ## @{
154 ##   @defgroup l2_import_export Importing/exporting geometrical objects
155 ##   @defgroup l2_creating      Creating geometrical objects
156 ##   @{
157 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
158 ##     @{
159 ##       @defgroup l4_curves        Creating Curves
160
161 ##     @}
162 ##     @defgroup l3_3d_primitives Creating 3D Primitives
163 ##     @defgroup l3_complex       Creating Complex Objects
164 ##     @defgroup l3_groups        Working with groups
165 ##     @defgroup l3_blocks        Building by blocks
166 ##     @{
167 ##       @defgroup l4_blocks_measure Check and Improve
168
169 ##     @}
170 ##     @defgroup l3_sketcher      Sketcher
171 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
172 ##     @{
173 ##       @defgroup l4_decompose     Decompose objects
174 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
175 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
176 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
177 ##       @defgroup l4_advanced      Advanced objects creation functions
178
179 ##     @}
180
181 ##   @}
182 ##   @defgroup l2_transforming  Transforming geometrical objects
183 ##   @{
184 ##     @defgroup l3_basic_op      Basic Operations
185 ##     @defgroup l3_boolean       Boolean Operations
186 ##     @defgroup l3_transform     Transformation Operations
187 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
188 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
189 ##     @defgroup l3_blocks_op     Blocks Operations
190 ##     @defgroup l3_healing       Repairing Operations
191 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
192
193 ##   @}
194 ##   @defgroup l2_measure       Using measurement tools
195
196 ## @}
197
198 # initialize SALOME session in try/except block
199 # to avoid problems in some cases, e.g. when generating documentation
200 try:
201     import salome
202     salome.salome_init()
203     from salome import *
204 except:
205     pass
206
207 from salome_notebook import *
208
209 import GEOM
210 import math
211 import os
212
213 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
214
215 # service function
216 def _toListOfNames(_names, _size=-1):
217     l = []
218     import types
219     if type(_names) in [types.ListType, types.TupleType]:
220         for i in _names: l.append(i)
221     elif _names:
222         l.append(_names)
223     if l and len(l) < _size:
224         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
225     return l
226
227 ## Raise an Error, containing the Method_name, if Operation is Failed
228 ## @ingroup l1_geomBuilder_auxiliary
229 def RaiseIfFailed (Method_name, Operation):
230     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
231         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
232
233 ## Return list of variables value from salome notebook
234 ## @ingroup l1_geomBuilder_auxiliary
235 def ParseParameters(*parameters):
236     Result = []
237     StringResult = []
238     for parameter in parameters:
239         if isinstance(parameter, list):
240             lResults = ParseParameters(*parameter)
241             if len(lResults) > 0:
242                 Result.append(lResults[:-1])
243                 StringResult += lResults[-1].split(":")
244                 pass
245             pass
246         else:
247             if isinstance(parameter,str):
248                 if notebook.isVariable(parameter):
249                     Result.append(notebook.get(parameter))
250                 else:
251                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
252                 pass
253             else:
254                 Result.append(parameter)
255                 pass
256             StringResult.append(str(parameter))
257             pass
258         pass
259     if Result:
260         Result.append(":".join(StringResult))
261     else:
262         Result = ":".join(StringResult)
263     return Result
264
265 ## Return list of variables value from salome notebook
266 ## @ingroup l1_geomBuilder_auxiliary
267 def ParseList(list):
268     Result = []
269     StringResult = ""
270     for parameter in list:
271         if isinstance(parameter,str) and notebook.isVariable(parameter):
272             Result.append(str(notebook.get(parameter)))
273             pass
274         else:
275             Result.append(str(parameter))
276             pass
277
278         StringResult = StringResult + str(parameter)
279         StringResult = StringResult + ":"
280         pass
281     StringResult = StringResult[:len(StringResult)-1]
282     return Result, StringResult
283
284 ## Return list of variables value from salome notebook
285 ## @ingroup l1_geomBuilder_auxiliary
286 def ParseSketcherCommand(command):
287     Result = ""
288     StringResult = ""
289     sections = command.split(":")
290     for section in sections:
291         parameters = section.split(" ")
292         paramIndex = 1
293         for parameter in parameters:
294             if paramIndex > 1 and parameter.find("'") != -1:
295                 parameter = parameter.replace("'","")
296                 if notebook.isVariable(parameter):
297                     Result = Result + str(notebook.get(parameter)) + " "
298                     pass
299                 else:
300                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
301                     pass
302                 pass
303             else:
304                 Result = Result + str(parameter) + " "
305                 pass
306             if paramIndex > 1:
307                 StringResult = StringResult + parameter
308                 StringResult = StringResult + ":"
309                 pass
310             paramIndex = paramIndex + 1
311             pass
312         Result = Result[:len(Result)-1] + ":"
313         pass
314     Result = Result[:len(Result)-1]
315     return Result, StringResult
316
317 ## Helper function which can be used to pack the passed string to the byte data.
318 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
319 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
320 ## For example,
321 ## \code
322 ## val = PackData("10001110") # val = 0xAE
323 ## val = PackData("1")        # val = 0x80
324 ## \endcode
325 ## @param data unpacked data - a string containing '1' and '0' symbols
326 ## @return data packed to the byte stream
327 ## @ingroup l1_geomBuilder_auxiliary
328 def PackData(data):
329     """
330     Helper function which can be used to pack the passed string to the byte data.
331     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
332     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
333
334     Parameters:
335         data unpacked data - a string containing '1' and '0' symbols
336
337     Returns:
338         data packed to the byte stream
339         
340     Example of usage:
341         val = PackData("10001110") # val = 0xAE
342         val = PackData("1")        # val = 0x80
343     """
344     bytes = len(data)/8
345     if len(data)%8: bytes += 1
346     res = ""
347     for b in range(bytes):
348         d = data[b*8:(b+1)*8]
349         val = 0
350         for i in range(8):
351             val *= 2
352             if i < len(d):
353                 if d[i] == "1": val += 1
354                 elif d[i] != "0":
355                     raise "Invalid symbol %s" % d[i]
356                 pass
357             pass
358         res += chr(val)
359         pass
360     return res
361
362 ## Read bitmap texture from the text file.
363 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
364 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
365 ## The function returns width and height of the pixmap in pixels and byte stream representing
366 ## texture bitmap itself.
367 ##
368 ## This function can be used to read the texture to the byte stream in order to pass it to
369 ## the AddTexture() function of geomBuilder class.
370 ## For example,
371 ## \code
372 ## from salome.geom import geomBuilder
373 ## geompy = geomBuilder.New(salome.myStudy)
374 ## texture = geompy.readtexture('mytexture.dat')
375 ## texture = geompy.AddTexture(*texture)
376 ## obj.SetMarkerTexture(texture)
377 ## \endcode
378 ## @param fname texture file name
379 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
380 ## @ingroup l1_geomBuilder_auxiliary
381 def ReadTexture(fname):
382     """
383     Read bitmap texture from the text file.
384     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
385     A zero symbol ('0') represents transparent pixel of the texture bitmap.
386     The function returns width and height of the pixmap in pixels and byte stream representing
387     texture bitmap itself.
388     This function can be used to read the texture to the byte stream in order to pass it to
389     the AddTexture() function of geomBuilder class.
390     
391     Parameters:
392         fname texture file name
393
394     Returns:
395         sequence of tree values: texture's width, height in pixels and its byte stream
396     
397     Example of usage:
398         from salome.geom import geomBuilder
399         geompy = geomBuilder.New(salome.myStudy)
400         texture = geompy.readtexture('mytexture.dat')
401         texture = geompy.AddTexture(*texture)
402         obj.SetMarkerTexture(texture)
403     """
404     try:
405         f = open(fname)
406         lines = [ l.strip() for l in f.readlines()]
407         f.close()
408         maxlen = 0
409         if lines: maxlen = max([len(x) for x in lines])
410         lenbytes = maxlen/8
411         if maxlen%8: lenbytes += 1
412         bytedata=""
413         for line in lines:
414             if len(line)%8:
415                 lenline = (len(line)/8+1)*8
416                 pass
417             else:
418                 lenline = (len(line)/8)*8
419                 pass
420             for i in range(lenline/8):
421                 byte=""
422                 for j in range(8):
423                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
424                     else: byte += "0"
425                     pass
426                 bytedata += PackData(byte)
427                 pass
428             for i in range(lenline/8, lenbytes):
429                 bytedata += PackData("0")
430             pass
431         return lenbytes*8, len(lines), bytedata
432     except:
433         pass
434     return 0, 0, ""
435
436 ## Returns a long value from enumeration type
437 #  Can be used for CORBA enumerator types like GEOM.shape_type
438 #  @param theItem enumeration type
439 #  @ingroup l1_geomBuilder_auxiliary
440 def EnumToLong(theItem):
441     """
442     Returns a long value from enumeration type
443     Can be used for CORBA enumerator types like geomBuilder.ShapeType
444
445     Parameters:
446         theItem enumeration type
447     """
448     ret = theItem
449     if hasattr(theItem, "_v"): ret = theItem._v
450     return ret
451
452 ## Information about closed/unclosed state of shell or wire
453 #  @ingroup l1_geomBuilder_auxiliary
454 class info:
455     """
456     Information about closed/unclosed state of shell or wire
457     """
458     UNKNOWN  = 0
459     CLOSED   = 1
460     UNCLOSED = 2
461
462 # Warning: geom is a singleton
463 geom = None
464 engine = None
465 doLcc = False
466 created = False
467
468 class geomBuilder(object, GEOM._objref_GEOM_Gen):
469
470         ## Enumeration ShapeType as a dictionary. \n
471         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
472         #  @ingroup l1_geomBuilder_auxiliary
473         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
474
475         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
476         #  and a list of parameters, describing the shape.
477         #  List of parameters, describing the shape:
478         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
479         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
480         #
481         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
482         #
483         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
484         #
485         #  - SPHERE:       [xc yc zc            R]
486         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
487         #  - BOX:          [xc yc zc                      ax ay az]
488         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
489         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
490         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
491         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
492         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
493         #
494         #  - SPHERE2D:     [xc yc zc            R]
495         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
496         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
497         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
498         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
499         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
500         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
501         #  - PLANE:        [xo yo zo  dx dy dz]
502         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
503         #  - FACE:                                       [nb_edges  nb_vertices]
504         #
505         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
506         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
507         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
508         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
509         #  - LINE:         [xo yo zo  dx dy dz]
510         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
511         #  - EDGE:                                                 [nb_vertices]
512         #
513         #  - VERTEX:       [x  y  z]
514         #  @ingroup l1_geomBuilder_auxiliary
515         kind = GEOM.GEOM_IKindOfShape
516
517         def __new__(cls):
518             global engine
519             global geom
520             global doLcc
521             global created
522             #print "==== __new__ ", engine, geom, doLcc, created
523             if geom is None:
524                 # geom engine is either retrieved from engine, or created
525                 geom = engine
526                 # Following test avoids a recursive loop
527                 if doLcc:
528                     if geom is not None:
529                         # geom engine not created: existing engine found
530                         doLcc = False
531                     if doLcc and not created:
532                         doLcc = False
533                         # FindOrLoadComponent called:
534                         # 1. CORBA resolution of server
535                         # 2. the __new__ method is called again
536                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
537                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
538                         #print "====1 ",geom
539                 else:
540                     # FindOrLoadComponent not called
541                     if geom is None:
542                         # geomBuilder instance is created from lcc.FindOrLoadComponent
543                         #print "==== super ", engine, geom, doLcc, created
544                         geom = super(geomBuilder,cls).__new__(cls)
545                         #print "====2 ",geom
546                     else:
547                         # geom engine not created: existing engine found
548                         #print "==== existing ", engine, geom, doLcc, created
549                         pass
550                 #print "return geom 1 ", geom
551                 return geom
552
553             #print "return geom 2 ", geom
554             return geom
555
556         def __init__(self):
557             global created
558             #print "-------- geomBuilder __init__ --- ", created, self
559             if not created:
560               created = True
561               GEOM._objref_GEOM_Gen.__init__(self)
562               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
563               self.myBuilder = None
564               self.myStudyId = 0
565               self.father    = None
566
567               self.BasicOp  = None
568               self.CurvesOp = None
569               self.PrimOp   = None
570               self.ShapesOp = None
571               self.HealOp   = None
572               self.InsertOp = None
573               self.BoolOp   = None
574               self.TrsfOp   = None
575               self.LocalOp  = None
576               self.MeasuOp  = None
577               self.BlocksOp = None
578               self.GroupOp  = None
579               self.AdvOp    = None
580             pass
581
582         ## Process object publication in the study, as follows:
583         #  - if @a theName is specified (not None), the object is published in the study
584         #    with this name, not taking into account "auto-publishing" option;
585         #  - if @a theName is NOT specified, the object is published in the study
586         #    (using default name, which can be customized using @a theDefaultName parameter)
587         #    only if auto-publishing is switched on.
588         #
589         #  @param theObj  object, a subject for publishing
590         #  @param theName object name for study
591         #  @param theDefaultName default name for the auto-publishing
592         #
593         #  @sa addToStudyAuto()
594         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
595             # ---
596             def _item_name(_names, _defname, _idx=-1):
597                 if not _names: _names = _defname
598                 if type(_names) in [types.ListType, types.TupleType]:
599                     if _idx >= 0:
600                         if _idx >= len(_names) or not _names[_idx]:
601                             if type(_defname) not in [types.ListType, types.TupleType]:
602                                 _name = "%s_%d"%(_defname, _idx+1)
603                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
604                                 _name = _defname[_idx]
605                             else:
606                                 _name = "%noname_%d"%(dn, _idx+1)
607                             pass
608                         else:
609                             _name = _names[_idx]
610                         pass
611                     else:
612                         # must be wrong  usage
613                         _name = _names[0]
614                     pass
615                 else:
616                     if _idx >= 0:
617                         _name = "%s_%d"%(_names, _idx+1)
618                     else:
619                         _name = _names
620                     pass
621                 return _name
622             # ---
623             if not theObj:
624                 return # null object
625             if not theName and not self.myMaxNbSubShapesAllowed:
626                 return # nothing to do: auto-publishing is disabled
627             if not theName and not theDefaultName:
628                 return # neither theName nor theDefaultName is given
629             import types
630             if type(theObj) in [types.ListType, types.TupleType]:
631                 # list of objects is being published
632                 idx = 0
633                 for obj in theObj:
634                     if not obj: continue # bad object
635                     ###if obj.GetStudyEntry(): continue # already published
636                     name = _item_name(theName, theDefaultName, idx)
637                     if obj.IsMainShape() or not obj.GetMainShape().GetStudyEntry():
638                         self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
639                     else:
640                         self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
641                         pass
642                     idx = idx+1
643                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
644                     pass
645                 pass
646             else:
647                 # single object is published
648                 ###if theObj.GetStudyEntry(): return # already published
649                 name = _item_name(theName, theDefaultName)
650                 if theObj.IsMainShape():
651                     self.addToStudy(theObj, name)
652                 else:
653                     self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
654                     pass
655                 pass
656             pass
657
658         ## @addtogroup l1_geomBuilder_auxiliary
659         ## @{
660         def init_geom(self,theStudy):
661             self.myStudy = theStudy
662             self.myStudyId = self.myStudy._get_StudyId()
663             self.myBuilder = self.myStudy.NewBuilder()
664             self.father = self.myStudy.FindComponent("GEOM")
665             if self.father is None:
666                 self.father = self.myBuilder.NewComponent("GEOM")
667                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
668                 FName = A1._narrow(SALOMEDS.AttributeName)
669                 FName.SetValue("Geometry")
670                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
671                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
672                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
673                 self.myBuilder.DefineComponentInstance(self.father,self)
674                 pass
675             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
676             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
677             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
678             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
679             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
680             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
681             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
682             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
683             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
684             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
685             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
686             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
687             self.AdvOp    = self.GetIAdvancedOperations (self.myStudyId)
688             pass
689
690         ## Enable / disable results auto-publishing
691         # 
692         #  The automatic publishing is managed in the following way:
693         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
694         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
695         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
696         #  value passed as parameter has the same effect.
697         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
698         #  maximum number of sub-shapes allowed for publishing is set to specified value.
699         #
700         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
701         #  @ingroup l1_publish_data
702         def addToStudyAuto(self, maxNbSubShapes=-1):
703             """
704             Enable / disable results auto-publishing
705
706             The automatic publishing is managed in the following way:
707             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
708             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
709             maximum number of sub-shapes allowed for publishing is unlimited; any negative
710             value passed as parameter has the same effect.
711             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
712             maximum number of sub-shapes allowed for publishing is set to this value.
713
714             Parameters:
715                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
716
717             Example of usage:
718                 geompy.addToStudyAuto()   # enable auto-publishing
719                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
720                 geompy.addToStudyAuto(0)  # disable auto-publishing
721             """
722             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
723             pass
724
725         ## Dump component to the Python script
726         #  This method overrides IDL function to allow default values for the parameters.
727         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
728             """
729             Dump component to the Python script
730             This method overrides IDL function to allow default values for the parameters.
731             """
732             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
733
734         ## Get name for sub-shape aSubObj of shape aMainObj
735         #
736         # @ref swig_SubShapeName "Example"
737         def SubShapeName(self,aSubObj, aMainObj):
738             """
739             Get name for sub-shape aSubObj of shape aMainObj
740             """
741             # Example: see GEOM_TestAll.py
742
743             #aSubId  = orb.object_to_string(aSubObj)
744             #aMainId = orb.object_to_string(aMainObj)
745             #index = gg.getIndexTopology(aSubId, aMainId)
746             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
747             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
748             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
749             return name
750
751         ## Publish in study aShape with name aName
752         #
753         #  \param aShape the shape to be published
754         #  \param aName  the name for the shape
755         #  \param doRestoreSubShapes if True, finds and publishes also
756         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
757         #         and published sub-shapes of arguments
758         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
759         #                                                  these arguments description
760         #  \return study entry of the published shape in form of string
761         #
762         #  @ingroup l1_publish_data
763         #  @ref swig_all_addtostudy "Example"
764         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
765                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
766             """
767             Publish in study aShape with name aName
768
769             Parameters:
770                 aShape the shape to be published
771                 aName  the name for the shape
772                 doRestoreSubShapes if True, finds and publishes also
773                                    sub-shapes of aShape, corresponding to its arguments
774                                    and published sub-shapes of arguments
775                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
776                                                          these arguments description
777
778             Returns:
779                 study entry of the published shape in form of string
780
781             Example of usage:
782                 id_block1 = geompy.addToStudy(Block1, "Block 1")
783             """
784             # Example: see GEOM_TestAll.py
785             try:
786                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
787                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
788                 if doRestoreSubShapes:
789                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
790                                             theFindMethod, theInheritFirstArg, True )
791             except:
792                 print "addToStudy() failed"
793                 return ""
794             return aShape.GetStudyEntry()
795
796         ## Publish in study aShape with name aName as sub-object of previously published aFather
797         #  \param aFather previously published object
798         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
799         #  \param aName  the name for the shape
800         #
801         #  \return study entry of the published shape in form of string
802         #
803         #  @ingroup l1_publish_data
804         #  @ref swig_all_addtostudyInFather "Example"
805         def addToStudyInFather(self, aFather, aShape, aName):
806             """
807             Publish in study aShape with name aName as sub-object of previously published aFather
808
809             Parameters:
810                 aFather previously published object
811                 aShape the shape to be published as sub-object of aFather
812                 aName  the name for the shape
813
814             Returns:
815                 study entry of the published shape in form of string
816             """
817             # Example: see GEOM_TestAll.py
818             try:
819                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
820                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
821             except:
822                 print "addToStudyInFather() failed"
823                 return ""
824             return aShape.GetStudyEntry()
825
826         ## Unpublish object in study
827         #
828         #  \param obj the object to be unpublished
829         def hideInStudy(self, obj):
830             """
831             Unpublish object in study
832
833             Parameters:
834                 obj the object to be unpublished
835             """
836             ior = salome.orb.object_to_string(obj)
837             aSObject = self.myStudy.FindObjectIOR(ior)
838             if aSObject is not None:
839                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
840                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
841                 drwAttribute.SetDrawable(False)
842                 pass
843
844         # end of l1_geomBuilder_auxiliary
845         ## @}
846
847         ## @addtogroup l3_restore_ss
848         ## @{
849
850         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
851         #  To be used from python scripts out of addToStudy() (non-default usage)
852         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
853         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
854         #                   If this list is empty, all operation arguments will be published
855         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
856         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
857         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
858         #                            Do not publish sub-shapes in place of arguments, but only
859         #                            in place of sub-shapes of the first argument,
860         #                            because the whole shape corresponds to the first argument.
861         #                            Mainly to be used after transformations, but it also can be
862         #                            usefull after partition with one object shape, and some other
863         #                            operations, where only the first argument has to be considered.
864         #                            If theObject has only one argument shape, this flag is automatically
865         #                            considered as True, not regarding really passed value.
866         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
867         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
868         #  \return list of published sub-shapes
869         #
870         #  @ref tui_restore_prs_params "Example"
871         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
872                               theInheritFirstArg=False, theAddPrefix=True):
873             """
874             Publish sub-shapes, standing for arguments and sub-shapes of arguments
875             To be used from python scripts out of geompy.addToStudy (non-default usage)
876
877             Parameters:
878                 theObject published GEOM.GEOM_Object, arguments of which will be published
879                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
880                           If this list is empty, all operation arguments will be published
881                 theFindMethod method to search sub-shapes, corresponding to arguments and
882                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
883                 theInheritFirstArg set properties of the first argument for theObject.
884                                    Do not publish sub-shapes in place of arguments, but only
885                                    in place of sub-shapes of the first argument,
886                                    because the whole shape corresponds to the first argument.
887                                    Mainly to be used after transformations, but it also can be
888                                    usefull after partition with one object shape, and some other
889                                    operations, where only the first argument has to be considered.
890                                    If theObject has only one argument shape, this flag is automatically
891                                    considered as True, not regarding really passed value.
892                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
893                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
894             Returns:
895                 list of published sub-shapes
896             """
897             # Example: see GEOM_TestAll.py
898             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
899                                           theFindMethod, theInheritFirstArg, theAddPrefix)
900
901         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
902         #  To be used from python scripts out of addToStudy() (non-default usage)
903         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
904         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
905         #                   If this list is empty, all operation arguments will be published
906         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
907         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
908         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
909         #                            Do not publish sub-shapes in place of arguments, but only
910         #                            in place of sub-shapes of the first argument,
911         #                            because the whole shape corresponds to the first argument.
912         #                            Mainly to be used after transformations, but it also can be
913         #                            usefull after partition with one object shape, and some other
914         #                            operations, where only the first argument has to be considered.
915         #                            If theObject has only one argument shape, this flag is automatically
916         #                            considered as True, not regarding really passed value.
917         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
918         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
919         #  \return list of published sub-shapes
920         #
921         #  @ref tui_restore_prs_params "Example"
922         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
923                                    theInheritFirstArg=False, theAddPrefix=True):
924             """
925             Publish sub-shapes, standing for arguments and sub-shapes of arguments
926             To be used from python scripts out of geompy.addToStudy() (non-default usage)
927
928             Parameters:
929                 theObject published GEOM.GEOM_Object, arguments of which will be published
930                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
931                           If this list is empty, all operation arguments will be published
932                 theFindMethod method to search sub-shapes, corresponding to arguments and
933                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
934                 theInheritFirstArg set properties of the first argument for theObject.
935                                    Do not publish sub-shapes in place of arguments, but only
936                                    in place of sub-shapes of the first argument,
937                                    because the whole shape corresponds to the first argument.
938                                    Mainly to be used after transformations, but it also can be
939                                    usefull after partition with one object shape, and some other
940                                    operations, where only the first argument has to be considered.
941                                    If theObject has only one argument shape, this flag is automatically
942                                    considered as True, not regarding really passed value.
943                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
944                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
945
946             Returns: 
947                 list of published sub-shapes
948             """
949             # Example: see GEOM_TestAll.py
950             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
951                                                theFindMethod, theInheritFirstArg, theAddPrefix)
952
953         # end of l3_restore_ss
954         ## @}
955
956         ## @addtogroup l3_basic_go
957         ## @{
958
959         ## Create point by three coordinates.
960         #  @param theX The X coordinate of the point.
961         #  @param theY The Y coordinate of the point.
962         #  @param theZ The Z coordinate of the point.
963         #  @param theName Object name; when specified, this parameter is used
964         #         for result publication in the study. Otherwise, if automatic
965         #         publication is switched on, default value is used for result name.
966         #
967         #  @return New GEOM.GEOM_Object, containing the created point.
968         #
969         #  @ref tui_creation_point "Example"
970         def MakeVertex(self, theX, theY, theZ, theName=None):
971             """
972             Create point by three coordinates.
973
974             Parameters:
975                 theX The X coordinate of the point.
976                 theY The Y coordinate of the point.
977                 theZ The Z coordinate of the point.
978                 theName Object name; when specified, this parameter is used
979                         for result publication in the study. Otherwise, if automatic
980                         publication is switched on, default value is used for result name.
981                 
982             Returns: 
983                 New GEOM.GEOM_Object, containing the created point.
984             """
985             # Example: see GEOM_TestAll.py
986             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
987             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
988             RaiseIfFailed("MakePointXYZ", self.BasicOp)
989             anObj.SetParameters(Parameters)
990             self._autoPublish(anObj, theName, "vertex")
991             return anObj
992
993         ## Create a point, distant from the referenced point
994         #  on the given distances along the coordinate axes.
995         #  @param theReference The referenced point.
996         #  @param theX Displacement from the referenced point along OX axis.
997         #  @param theY Displacement from the referenced point along OY axis.
998         #  @param theZ Displacement from the referenced point along OZ axis.
999         #  @param theName Object name; when specified, this parameter is used
1000         #         for result publication in the study. Otherwise, if automatic
1001         #         publication is switched on, default value is used for result name.
1002         #
1003         #  @return New GEOM.GEOM_Object, containing the created point.
1004         #
1005         #  @ref tui_creation_point "Example"
1006         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1007             """
1008             Create a point, distant from the referenced point
1009             on the given distances along the coordinate axes.
1010
1011             Parameters:
1012                 theReference The referenced point.
1013                 theX Displacement from the referenced point along OX axis.
1014                 theY Displacement from the referenced point along OY axis.
1015                 theZ Displacement from the referenced point along OZ axis.
1016                 theName Object name; when specified, this parameter is used
1017                         for result publication in the study. Otherwise, if automatic
1018                         publication is switched on, default value is used for result name.
1019
1020             Returns:
1021                 New GEOM.GEOM_Object, containing the created point.
1022             """
1023             # Example: see GEOM_TestAll.py
1024             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1025             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1026             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1027             anObj.SetParameters(Parameters)
1028             self._autoPublish(anObj, theName, "vertex")
1029             return anObj
1030
1031         ## Create a point, corresponding to the given parameter on the given curve.
1032         #  @param theRefCurve The referenced curve.
1033         #  @param theParameter Value of parameter on the referenced curve.
1034         #  @param theName Object name; when specified, this parameter is used
1035         #         for result publication in the study. Otherwise, if automatic
1036         #         publication is switched on, default value is used for result name.
1037         #
1038         #  @return New GEOM.GEOM_Object, containing the created point.
1039         #
1040         #  @ref tui_creation_point "Example"
1041         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1042             """
1043             Create a point, corresponding to the given parameter on the given curve.
1044
1045             Parameters:
1046                 theRefCurve The referenced curve.
1047                 theParameter Value of parameter on the referenced curve.
1048                 theName Object name; when specified, this parameter is used
1049                         for result publication in the study. Otherwise, if automatic
1050                         publication is switched on, default value is used for result name.
1051
1052             Returns:
1053                 New GEOM.GEOM_Object, containing the created point.
1054
1055             Example of usage:
1056                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1057             """
1058             # Example: see GEOM_TestAll.py
1059             theParameter, Parameters = ParseParameters(theParameter)
1060             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1061             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1062             anObj.SetParameters(Parameters)
1063             self._autoPublish(anObj, theName, "vertex")
1064             return anObj
1065
1066         ## Create a point by projection give coordinates on the given curve
1067         #  @param theRefCurve The referenced curve.
1068         #  @param theX X-coordinate in 3D space
1069         #  @param theY Y-coordinate in 3D space
1070         #  @param theZ Z-coordinate in 3D space
1071         #  @param theName Object name; when specified, this parameter is used
1072         #         for result publication in the study. Otherwise, if automatic
1073         #         publication is switched on, default value is used for result name.
1074         #
1075         #  @return New GEOM.GEOM_Object, containing the created point.
1076         #
1077         #  @ref tui_creation_point "Example"
1078         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1079             """
1080             Create a point by projection give coordinates on the given curve
1081             
1082             Parameters:
1083                 theRefCurve The referenced curve.
1084                 theX X-coordinate in 3D space
1085                 theY Y-coordinate in 3D space
1086                 theZ Z-coordinate in 3D space
1087                 theName Object name; when specified, this parameter is used
1088                         for result publication in the study. Otherwise, if automatic
1089                         publication is switched on, default value is used for result name.
1090
1091             Returns:
1092                 New GEOM.GEOM_Object, containing the created point.
1093
1094             Example of usage:
1095                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1096             """
1097             # Example: see GEOM_TestAll.py
1098             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1099             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1100             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1101             anObj.SetParameters(Parameters)
1102             self._autoPublish(anObj, theName, "vertex")
1103             return anObj
1104
1105         ## Create a point, corresponding to the given length on the given curve.
1106         #  @param theRefCurve The referenced curve.
1107         #  @param theLength Length on the referenced curve. It can be negative.
1108         #  @param theStartPoint Point allowing to choose the direction for the calculation
1109         #                       of the length. If None, start from the first point of theRefCurve.
1110         #  @param theName Object name; when specified, this parameter is used
1111         #         for result publication in the study. Otherwise, if automatic
1112         #         publication is switched on, default value is used for result name.
1113         #
1114         #  @return New GEOM.GEOM_Object, containing the created point.
1115         #
1116         #  @ref tui_creation_point "Example"
1117         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1118             """
1119             Create a point, corresponding to the given length on the given curve.
1120
1121             Parameters:
1122                 theRefCurve The referenced curve.
1123                 theLength Length on the referenced curve. It can be negative.
1124                 theStartPoint Point allowing to choose the direction for the calculation
1125                               of the length. If None, start from the first point of theRefCurve.
1126                 theName Object name; when specified, this parameter is used
1127                         for result publication in the study. Otherwise, if automatic
1128                         publication is switched on, default value is used for result name.
1129
1130             Returns:
1131                 New GEOM.GEOM_Object, containing the created point.
1132             """
1133             # Example: see GEOM_TestAll.py
1134             theLength, Parameters = ParseParameters(theLength)
1135             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1136             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1137             anObj.SetParameters(Parameters)
1138             self._autoPublish(anObj, theName, "vertex")
1139             return anObj
1140
1141         ## Create a point, corresponding to the given parameters on the
1142         #    given surface.
1143         #  @param theRefSurf The referenced surface.
1144         #  @param theUParameter Value of U-parameter on the referenced surface.
1145         #  @param theVParameter Value of V-parameter on the referenced surface.
1146         #  @param theName Object name; when specified, this parameter is used
1147         #         for result publication in the study. Otherwise, if automatic
1148         #         publication is switched on, default value is used for result name.
1149         #
1150         #  @return New GEOM.GEOM_Object, containing the created point.
1151         #
1152         #  @ref swig_MakeVertexOnSurface "Example"
1153         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1154             """
1155             Create a point, corresponding to the given parameters on the
1156             given surface.
1157
1158             Parameters:
1159                 theRefSurf The referenced surface.
1160                 theUParameter Value of U-parameter on the referenced surface.
1161                 theVParameter Value of V-parameter on the referenced surface.
1162                 theName Object name; when specified, this parameter is used
1163                         for result publication in the study. Otherwise, if automatic
1164                         publication is switched on, default value is used for result name.
1165
1166             Returns:
1167                 New GEOM.GEOM_Object, containing the created point.
1168
1169             Example of usage:
1170                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1171             """
1172             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1173             # Example: see GEOM_TestAll.py
1174             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1175             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1176             anObj.SetParameters(Parameters);
1177             self._autoPublish(anObj, theName, "vertex")
1178             return anObj
1179
1180         ## Create a point by projection give coordinates on the given surface
1181         #  @param theRefSurf The referenced surface.
1182         #  @param theX X-coordinate in 3D space
1183         #  @param theY Y-coordinate in 3D space
1184         #  @param theZ Z-coordinate in 3D space
1185         #  @param theName Object name; when specified, this parameter is used
1186         #         for result publication in the study. Otherwise, if automatic
1187         #         publication is switched on, default value is used for result name.
1188         #
1189         #  @return New GEOM.GEOM_Object, containing the created point.
1190         #
1191         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1192         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1193             """
1194             Create a point by projection give coordinates on the given surface
1195
1196             Parameters:
1197                 theRefSurf The referenced surface.
1198                 theX X-coordinate in 3D space
1199                 theY Y-coordinate in 3D space
1200                 theZ Z-coordinate in 3D space
1201                 theName Object name; when specified, this parameter is used
1202                         for result publication in the study. Otherwise, if automatic
1203                         publication is switched on, default value is used for result name.
1204
1205             Returns:
1206                 New GEOM.GEOM_Object, containing the created point.
1207
1208             Example of usage:
1209                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1210             """
1211             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1212             # Example: see GEOM_TestAll.py
1213             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1214             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1215             anObj.SetParameters(Parameters);
1216             self._autoPublish(anObj, theName, "vertex")
1217             return anObj
1218
1219         ## Create a point, which lays on the given face.
1220         #  The point will lay in arbitrary place of the face.
1221         #  The only condition on it is a non-zero distance to the face boundary.
1222         #  Such point can be used to uniquely identify the face inside any
1223         #  shape in case, when the shape does not contain overlapped faces.
1224         #  @param theFace The referenced face.
1225         #  @param theName Object name; when specified, this parameter is used
1226         #         for result publication in the study. Otherwise, if automatic
1227         #         publication is switched on, default value is used for result name.
1228         #
1229         #  @return New GEOM.GEOM_Object, containing the created point.
1230         #
1231         #  @ref swig_MakeVertexInsideFace "Example"
1232         def MakeVertexInsideFace (self, theFace, theName=None):
1233             """
1234             Create a point, which lays on the given face.
1235             The point will lay in arbitrary place of the face.
1236             The only condition on it is a non-zero distance to the face boundary.
1237             Such point can be used to uniquely identify the face inside any
1238             shape in case, when the shape does not contain overlapped faces.
1239
1240             Parameters:
1241                 theFace The referenced face.
1242                 theName Object name; when specified, this parameter is used
1243                         for result publication in the study. Otherwise, if automatic
1244                         publication is switched on, default value is used for result name.
1245
1246             Returns:
1247                 New GEOM.GEOM_Object, containing the created point.
1248
1249             Example of usage:
1250                 p_on_face = geompy.MakeVertexInsideFace(Face)
1251             """
1252             # Example: see GEOM_TestAll.py
1253             anObj = self.BasicOp.MakePointOnFace(theFace)
1254             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1255             self._autoPublish(anObj, theName, "vertex")
1256             return anObj
1257
1258         ## Create a point on intersection of two lines.
1259         #  @param theRefLine1, theRefLine2 The referenced lines.
1260         #  @param theName Object name; when specified, this parameter is used
1261         #         for result publication in the study. Otherwise, if automatic
1262         #         publication is switched on, default value is used for result name.
1263         #
1264         #  @return New GEOM.GEOM_Object, containing the created point.
1265         #
1266         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1267         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1268             """
1269             Create a point on intersection of two lines.
1270
1271             Parameters:
1272                 theRefLine1, theRefLine2 The referenced lines.
1273                 theName Object name; when specified, this parameter is used
1274                         for result publication in the study. Otherwise, if automatic
1275                         publication is switched on, default value is used for result name.
1276
1277             Returns:
1278                 New GEOM.GEOM_Object, containing the created point.
1279             """
1280             # Example: see GEOM_TestAll.py
1281             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1282             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1283             self._autoPublish(anObj, theName, "vertex")
1284             return anObj
1285
1286         ## Create a tangent, corresponding to the given parameter on the given curve.
1287         #  @param theRefCurve The referenced curve.
1288         #  @param theParameter Value of parameter on the referenced curve.
1289         #  @param theName Object name; when specified, this parameter is used
1290         #         for result publication in the study. Otherwise, if automatic
1291         #         publication is switched on, default value is used for result name.
1292         #
1293         #  @return New GEOM.GEOM_Object, containing the created tangent.
1294         #
1295         #  @ref swig_MakeTangentOnCurve "Example"
1296         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1297             """
1298             Create a tangent, corresponding to the given parameter on the given curve.
1299
1300             Parameters:
1301                 theRefCurve The referenced curve.
1302                 theParameter Value of parameter on the referenced curve.
1303                 theName Object name; when specified, this parameter is used
1304                         for result publication in the study. Otherwise, if automatic
1305                         publication is switched on, default value is used for result name.
1306
1307             Returns:
1308                 New GEOM.GEOM_Object, containing the created tangent.
1309
1310             Example of usage:
1311                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1312             """
1313             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1314             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1315             self._autoPublish(anObj, theName, "tangent")
1316             return anObj
1317
1318         ## Create a tangent plane, corresponding to the given parameter on the given face.
1319         #  @param theFace The face for which tangent plane should be built.
1320         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1321         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1322         #  @param theTrimSize the size of plane.
1323         #  @param theName Object name; when specified, this parameter is used
1324         #         for result publication in the study. Otherwise, if automatic
1325         #         publication is switched on, default value is used for result name.
1326         #
1327         #  @return New GEOM.GEOM_Object, containing the created tangent.
1328         #
1329         #  @ref swig_MakeTangentPlaneOnFace "Example"
1330         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1331             """
1332             Create a tangent plane, corresponding to the given parameter on the given face.
1333
1334             Parameters:
1335                 theFace The face for which tangent plane should be built.
1336                 theParameterV vertical value of the center point (0.0 - 1.0).
1337                 theParameterU horisontal value of the center point (0.0 - 1.0).
1338                 theTrimSize the size of plane.
1339                 theName Object name; when specified, this parameter is used
1340                         for result publication in the study. Otherwise, if automatic
1341                         publication is switched on, default value is used for result name.
1342
1343            Returns: 
1344                 New GEOM.GEOM_Object, containing the created tangent.
1345
1346            Example of usage:
1347                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1348             """
1349             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1350             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1351             self._autoPublish(anObj, theName, "tangent")
1352             return anObj
1353
1354         ## Create a vector with the given components.
1355         #  @param theDX X component of the vector.
1356         #  @param theDY Y component of the vector.
1357         #  @param theDZ Z component of the vector.
1358         #  @param theName Object name; when specified, this parameter is used
1359         #         for result publication in the study. Otherwise, if automatic
1360         #         publication is switched on, default value is used for result name.
1361         #
1362         #  @return New GEOM.GEOM_Object, containing the created vector.
1363         #
1364         #  @ref tui_creation_vector "Example"
1365         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1366             """
1367             Create a vector with the given components.
1368
1369             Parameters:
1370                 theDX X component of the vector.
1371                 theDY Y component of the vector.
1372                 theDZ Z component of the vector.
1373                 theName Object name; when specified, this parameter is used
1374                         for result publication in the study. Otherwise, if automatic
1375                         publication is switched on, default value is used for result name.
1376
1377             Returns:     
1378                 New GEOM.GEOM_Object, containing the created vector.
1379             """
1380             # Example: see GEOM_TestAll.py
1381             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1382             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1383             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1384             anObj.SetParameters(Parameters)
1385             self._autoPublish(anObj, theName, "vector")
1386             return anObj
1387
1388         ## Create a vector between two points.
1389         #  @param thePnt1 Start point for the vector.
1390         #  @param thePnt2 End point for the vector.
1391         #  @param theName Object name; when specified, this parameter is used
1392         #         for result publication in the study. Otherwise, if automatic
1393         #         publication is switched on, default value is used for result name.
1394         #
1395         #  @return New GEOM.GEOM_Object, containing the created vector.
1396         #
1397         #  @ref tui_creation_vector "Example"
1398         def MakeVector(self, thePnt1, thePnt2, theName=None):
1399             """
1400             Create a vector between two points.
1401
1402             Parameters:
1403                 thePnt1 Start point for the vector.
1404                 thePnt2 End point for the vector.
1405                 theName Object name; when specified, this parameter is used
1406                         for result publication in the study. Otherwise, if automatic
1407                         publication is switched on, default value is used for result name.
1408
1409             Returns:        
1410                 New GEOM.GEOM_Object, containing the created vector.
1411             """
1412             # Example: see GEOM_TestAll.py
1413             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1414             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1415             self._autoPublish(anObj, theName, "vector")
1416             return anObj
1417
1418         ## Create a line, passing through the given point
1419         #  and parrallel to the given direction
1420         #  @param thePnt Point. The resulting line will pass through it.
1421         #  @param theDir Direction. The resulting line will be parallel to it.
1422         #  @param theName Object name; when specified, this parameter is used
1423         #         for result publication in the study. Otherwise, if automatic
1424         #         publication is switched on, default value is used for result name.
1425         #
1426         #  @return New GEOM.GEOM_Object, containing the created line.
1427         #
1428         #  @ref tui_creation_line "Example"
1429         def MakeLine(self, thePnt, theDir, theName=None):
1430             """
1431             Create a line, passing through the given point
1432             and parrallel to the given direction
1433
1434             Parameters:
1435                 thePnt Point. The resulting line will pass through it.
1436                 theDir Direction. The resulting line will be parallel to it.
1437                 theName Object name; when specified, this parameter is used
1438                         for result publication in the study. Otherwise, if automatic
1439                         publication is switched on, default value is used for result name.
1440
1441             Returns:
1442                 New GEOM.GEOM_Object, containing the created line.
1443             """
1444             # Example: see GEOM_TestAll.py
1445             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1446             RaiseIfFailed("MakeLine", self.BasicOp)
1447             self._autoPublish(anObj, theName, "line")
1448             return anObj
1449
1450         ## Create a line, passing through the given points
1451         #  @param thePnt1 First of two points, defining the line.
1452         #  @param thePnt2 Second of two points, defining the line.
1453         #  @param theName Object name; when specified, this parameter is used
1454         #         for result publication in the study. Otherwise, if automatic
1455         #         publication is switched on, default value is used for result name.
1456         #
1457         #  @return New GEOM.GEOM_Object, containing the created line.
1458         #
1459         #  @ref tui_creation_line "Example"
1460         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1461             """
1462             Create a line, passing through the given points
1463
1464             Parameters:
1465                 thePnt1 First of two points, defining the line.
1466                 thePnt2 Second of two points, defining the line.
1467                 theName Object name; when specified, this parameter is used
1468                         for result publication in the study. Otherwise, if automatic
1469                         publication is switched on, default value is used for result name.
1470
1471             Returns:
1472                 New GEOM.GEOM_Object, containing the created line.
1473             """
1474             # Example: see GEOM_TestAll.py
1475             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1476             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1477             self._autoPublish(anObj, theName, "line")
1478             return anObj
1479
1480         ## Create a line on two faces intersection.
1481         #  @param theFace1 First of two faces, defining the line.
1482         #  @param theFace2 Second of two faces, defining the line.
1483         #  @param theName Object name; when specified, this parameter is used
1484         #         for result publication in the study. Otherwise, if automatic
1485         #         publication is switched on, default value is used for result name.
1486         #
1487         #  @return New GEOM.GEOM_Object, containing the created line.
1488         #
1489         #  @ref swig_MakeLineTwoFaces "Example"
1490         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1491             """
1492             Create a line on two faces intersection.
1493
1494             Parameters:
1495                 theFace1 First of two faces, defining the line.
1496                 theFace2 Second of two faces, defining the line.
1497                 theName Object name; when specified, this parameter is used
1498                         for result publication in the study. Otherwise, if automatic
1499                         publication is switched on, default value is used for result name.
1500
1501             Returns:
1502                 New GEOM.GEOM_Object, containing the created line.
1503             """
1504             # Example: see GEOM_TestAll.py
1505             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1506             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1507             self._autoPublish(anObj, theName, "line")
1508             return anObj
1509
1510         ## Create a plane, passing through the given point
1511         #  and normal to the given vector.
1512         #  @param thePnt Point, the plane has to pass through.
1513         #  @param theVec Vector, defining the plane normal direction.
1514         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1515         #  @param theName Object name; when specified, this parameter is used
1516         #         for result publication in the study. Otherwise, if automatic
1517         #         publication is switched on, default value is used for result name.
1518         #
1519         #  @return New GEOM.GEOM_Object, containing the created plane.
1520         #
1521         #  @ref tui_creation_plane "Example"
1522         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1523             """
1524             Create a plane, passing through the given point
1525             and normal to the given vector.
1526
1527             Parameters:
1528                 thePnt Point, the plane has to pass through.
1529                 theVec Vector, defining the plane normal direction.
1530                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1531                 theName Object name; when specified, this parameter is used
1532                         for result publication in the study. Otherwise, if automatic
1533                         publication is switched on, default value is used for result name.
1534
1535             Returns:    
1536                 New GEOM.GEOM_Object, containing the created plane.
1537             """
1538             # Example: see GEOM_TestAll.py
1539             theTrimSize, Parameters = ParseParameters(theTrimSize);
1540             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1541             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1542             anObj.SetParameters(Parameters)
1543             self._autoPublish(anObj, theName, "plane")
1544             return anObj
1545
1546         ## Create a plane, passing through the three given points
1547         #  @param thePnt1 First of three points, defining the plane.
1548         #  @param thePnt2 Second of three points, defining the plane.
1549         #  @param thePnt3 Fird of three points, defining the plane.
1550         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1551         #  @param theName Object name; when specified, this parameter is used
1552         #         for result publication in the study. Otherwise, if automatic
1553         #         publication is switched on, default value is used for result name.
1554         #
1555         #  @return New GEOM.GEOM_Object, containing the created plane.
1556         #
1557         #  @ref tui_creation_plane "Example"
1558         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1559             """
1560             Create a plane, passing through the three given points
1561
1562             Parameters:
1563                 thePnt1 First of three points, defining the plane.
1564                 thePnt2 Second of three points, defining the plane.
1565                 thePnt3 Fird of three points, defining the plane.
1566                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1567                 theName Object name; when specified, this parameter is used
1568                         for result publication in the study. Otherwise, if automatic
1569                         publication is switched on, default value is used for result name.
1570
1571             Returns:
1572                 New GEOM.GEOM_Object, containing the created plane.
1573             """
1574             # Example: see GEOM_TestAll.py
1575             theTrimSize, Parameters = ParseParameters(theTrimSize);
1576             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1577             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1578             anObj.SetParameters(Parameters)
1579             self._autoPublish(anObj, theName, "plane")
1580             return anObj
1581
1582         ## Create a plane, similar to the existing one, but with another size of representing face.
1583         #  @param theFace Referenced plane or LCS(Marker).
1584         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1585         #  @param theName Object name; when specified, this parameter is used
1586         #         for result publication in the study. Otherwise, if automatic
1587         #         publication is switched on, default value is used for result name.
1588         #
1589         #  @return New GEOM.GEOM_Object, containing the created plane.
1590         #
1591         #  @ref tui_creation_plane "Example"
1592         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1593             """
1594             Create a plane, similar to the existing one, but with another size of representing face.
1595
1596             Parameters:
1597                 theFace Referenced plane or LCS(Marker).
1598                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1599                 theName Object name; when specified, this parameter is used
1600                         for result publication in the study. Otherwise, if automatic
1601                         publication is switched on, default value is used for result name.
1602
1603             Returns:
1604                 New GEOM.GEOM_Object, containing the created plane.
1605             """
1606             # Example: see GEOM_TestAll.py
1607             theTrimSize, Parameters = ParseParameters(theTrimSize);
1608             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1609             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1610             anObj.SetParameters(Parameters)
1611             self._autoPublish(anObj, theName, "plane")
1612             return anObj
1613
1614         ## Create a plane, passing through the 2 vectors
1615         #  with center in a start point of the first vector.
1616         #  @param theVec1 Vector, defining center point and plane direction.
1617         #  @param theVec2 Vector, defining the plane normal direction.
1618         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1619         #  @param theName Object name; when specified, this parameter is used
1620         #         for result publication in the study. Otherwise, if automatic
1621         #         publication is switched on, default value is used for result name.
1622         #
1623         #  @return New GEOM.GEOM_Object, containing the created plane.
1624         #
1625         #  @ref tui_creation_plane "Example"
1626         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1627             """
1628             Create a plane, passing through the 2 vectors
1629             with center in a start point of the first vector.
1630
1631             Parameters:
1632                 theVec1 Vector, defining center point and plane direction.
1633                 theVec2 Vector, defining the plane normal direction.
1634                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1635                 theName Object name; when specified, this parameter is used
1636                         for result publication in the study. Otherwise, if automatic
1637                         publication is switched on, default value is used for result name.
1638
1639             Returns: 
1640                 New GEOM.GEOM_Object, containing the created plane.
1641             """
1642             # Example: see GEOM_TestAll.py
1643             theTrimSize, Parameters = ParseParameters(theTrimSize);
1644             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1645             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1646             anObj.SetParameters(Parameters)
1647             self._autoPublish(anObj, theName, "plane")
1648             return anObj
1649
1650         ## Create a plane, based on a Local coordinate system.
1651         #  @param theLCS  coordinate system, defining plane.
1652         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1653         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1654         #  @param theName Object name; when specified, this parameter is used
1655         #         for result publication in the study. Otherwise, if automatic
1656         #         publication is switched on, default value is used for result name.
1657         #
1658         #  @return New GEOM.GEOM_Object, containing the created plane.
1659         #
1660         #  @ref tui_creation_plane "Example"
1661         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1662             """
1663             Create a plane, based on a Local coordinate system.
1664
1665            Parameters: 
1666                 theLCS  coordinate system, defining plane.
1667                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1668                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1669                 theName Object name; when specified, this parameter is used
1670                         for result publication in the study. Otherwise, if automatic
1671                         publication is switched on, default value is used for result name.
1672
1673             Returns: 
1674                 New GEOM.GEOM_Object, containing the created plane.
1675             """
1676             # Example: see GEOM_TestAll.py
1677             theTrimSize, Parameters = ParseParameters(theTrimSize);
1678             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1679             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1680             anObj.SetParameters(Parameters)
1681             self._autoPublish(anObj, theName, "plane")
1682             return anObj
1683
1684         ## Create a local coordinate system.
1685         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1686         #  @param XDX,XDY,XDZ Three components of OX direction
1687         #  @param YDX,YDY,YDZ Three components of OY direction
1688         #  @param theName Object name; when specified, this parameter is used
1689         #         for result publication in the study. Otherwise, if automatic
1690         #         publication is switched on, default value is used for result name.
1691         #
1692         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1693         #
1694         #  @ref swig_MakeMarker "Example"
1695         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1696             """
1697             Create a local coordinate system.
1698
1699             Parameters: 
1700                 OX,OY,OZ Three coordinates of coordinate system origin.
1701                 XDX,XDY,XDZ Three components of OX direction
1702                 YDX,YDY,YDZ Three components of OY direction
1703                 theName Object name; when specified, this parameter is used
1704                         for result publication in the study. Otherwise, if automatic
1705                         publication is switched on, default value is used for result name.
1706
1707             Returns: 
1708                 New GEOM.GEOM_Object, containing the created coordinate system.
1709             """
1710             # Example: see GEOM_TestAll.py
1711             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1712             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1713             RaiseIfFailed("MakeMarker", self.BasicOp)
1714             anObj.SetParameters(Parameters)
1715             self._autoPublish(anObj, theName, "lcs")
1716             return anObj
1717
1718         ## Create a local coordinate system from shape.
1719         #  @param theShape The initial shape to detect the coordinate system.
1720         #  @param theName Object name; when specified, this parameter is used
1721         #         for result publication in the study. Otherwise, if automatic
1722         #         publication is switched on, default value is used for result name.
1723         #
1724         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1725         #
1726         #  @ref tui_creation_lcs "Example"
1727         def MakeMarkerFromShape(self, theShape, theName=None):
1728             """
1729             Create a local coordinate system from shape.
1730
1731             Parameters:
1732                 theShape The initial shape to detect the coordinate system.
1733                 theName Object name; when specified, this parameter is used
1734                         for result publication in the study. Otherwise, if automatic
1735                         publication is switched on, default value is used for result name.
1736                 
1737             Returns: 
1738                 New GEOM.GEOM_Object, containing the created coordinate system.
1739             """
1740             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1741             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1742             self._autoPublish(anObj, theName, "lcs")
1743             return anObj
1744
1745         ## Create a local coordinate system from point and two vectors.
1746         #  @param theOrigin Point of coordinate system origin.
1747         #  @param theXVec Vector of X direction
1748         #  @param theYVec Vector of Y direction
1749         #  @param theName Object name; when specified, this parameter is used
1750         #         for result publication in the study. Otherwise, if automatic
1751         #         publication is switched on, default value is used for result name.
1752         #
1753         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1754         #
1755         #  @ref tui_creation_lcs "Example"
1756         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1757             """
1758             Create a local coordinate system from point and two vectors.
1759
1760             Parameters:
1761                 theOrigin Point of coordinate system origin.
1762                 theXVec Vector of X direction
1763                 theYVec Vector of Y direction
1764                 theName Object name; when specified, this parameter is used
1765                         for result publication in the study. Otherwise, if automatic
1766                         publication is switched on, default value is used for result name.
1767
1768             Returns: 
1769                 New GEOM.GEOM_Object, containing the created coordinate system.
1770
1771             """
1772             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1773             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1774             self._autoPublish(anObj, theName, "lcs")
1775             return anObj
1776
1777         # end of l3_basic_go
1778         ## @}
1779
1780         ## @addtogroup l4_curves
1781         ## @{
1782
1783         ##  Create an arc of circle, passing through three given points.
1784         #  @param thePnt1 Start point of the arc.
1785         #  @param thePnt2 Middle point of the arc.
1786         #  @param thePnt3 End point of the arc.
1787         #  @param theName Object name; when specified, this parameter is used
1788         #         for result publication in the study. Otherwise, if automatic
1789         #         publication is switched on, default value is used for result name.
1790         #
1791         #  @return New GEOM.GEOM_Object, containing the created arc.
1792         #
1793         #  @ref swig_MakeArc "Example"
1794         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1795             """
1796             Create an arc of circle, passing through three given points.
1797
1798             Parameters:
1799                 thePnt1 Start point of the arc.
1800                 thePnt2 Middle point of the arc.
1801                 thePnt3 End point of the arc.
1802                 theName Object name; when specified, this parameter is used
1803                         for result publication in the study. Otherwise, if automatic
1804                         publication is switched on, default value is used for result name.
1805
1806             Returns: 
1807                 New GEOM.GEOM_Object, containing the created arc.
1808             """
1809             # Example: see GEOM_TestAll.py
1810             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1811             RaiseIfFailed("MakeArc", self.CurvesOp)
1812             self._autoPublish(anObj, theName, "arc")
1813             return anObj
1814
1815         ##  Create an arc of circle from a center and 2 points.
1816         #  @param thePnt1 Center of the arc
1817         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1818         #  @param thePnt3 End point of the arc (Gives also a direction)
1819         #  @param theSense Orientation of the arc
1820         #  @param theName Object name; when specified, this parameter is used
1821         #         for result publication in the study. Otherwise, if automatic
1822         #         publication is switched on, default value is used for result name.
1823         #
1824         #  @return New GEOM.GEOM_Object, containing the created arc.
1825         #
1826         #  @ref swig_MakeArc "Example"
1827         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1828             """
1829             Create an arc of circle from a center and 2 points.
1830
1831             Parameters:
1832                 thePnt1 Center of the arc
1833                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1834                 thePnt3 End point of the arc (Gives also a direction)
1835                 theSense Orientation of the arc
1836                 theName Object name; when specified, this parameter is used
1837                         for result publication in the study. Otherwise, if automatic
1838                         publication is switched on, default value is used for result name.
1839
1840             Returns:
1841                 New GEOM.GEOM_Object, containing the created arc.
1842             """
1843             # Example: see GEOM_TestAll.py
1844             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1845             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1846             self._autoPublish(anObj, theName, "arc")
1847             return anObj
1848
1849         ##  Create an arc of ellipse, of center and two points.
1850         #  @param theCenter Center of the arc.
1851         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1852         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1853         #  @param theName Object name; when specified, this parameter is used
1854         #         for result publication in the study. Otherwise, if automatic
1855         #         publication is switched on, default value is used for result name.
1856         #
1857         #  @return New GEOM.GEOM_Object, containing the created arc.
1858         #
1859         #  @ref swig_MakeArc "Example"
1860         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
1861             """
1862             Create an arc of ellipse, of center and two points.
1863
1864             Parameters:
1865                 theCenter Center of the arc.
1866                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1867                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1868                 theName Object name; when specified, this parameter is used
1869                         for result publication in the study. Otherwise, if automatic
1870                         publication is switched on, default value is used for result name.
1871
1872             Returns:
1873                 New GEOM.GEOM_Object, containing the created arc.
1874             """
1875             # Example: see GEOM_TestAll.py
1876             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
1877             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
1878             self._autoPublish(anObj, theName, "arc")
1879             return anObj
1880
1881         ## Create a circle with given center, normal vector and radius.
1882         #  @param thePnt Circle center.
1883         #  @param theVec Vector, normal to the plane of the circle.
1884         #  @param theR Circle radius.
1885         #  @param theName Object name; when specified, this parameter is used
1886         #         for result publication in the study. Otherwise, if automatic
1887         #         publication is switched on, default value is used for result name.
1888         #
1889         #  @return New GEOM.GEOM_Object, containing the created circle.
1890         #
1891         #  @ref tui_creation_circle "Example"
1892         def MakeCircle(self, thePnt, theVec, theR, theName=None):
1893             """
1894             Create a circle with given center, normal vector and radius.
1895
1896             Parameters:
1897                 thePnt Circle center.
1898                 theVec Vector, normal to the plane of the circle.
1899                 theR Circle radius.
1900                 theName Object name; when specified, this parameter is used
1901                         for result publication in the study. Otherwise, if automatic
1902                         publication is switched on, default value is used for result name.
1903
1904             Returns:
1905                 New GEOM.GEOM_Object, containing the created circle.
1906             """
1907             # Example: see GEOM_TestAll.py
1908             theR, Parameters = ParseParameters(theR)
1909             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
1910             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1911             anObj.SetParameters(Parameters)
1912             self._autoPublish(anObj, theName, "circle")
1913             return anObj
1914
1915         ## Create a circle with given radius.
1916         #  Center of the circle will be in the origin of global
1917         #  coordinate system and normal vector will be codirected with Z axis
1918         #  @param theR Circle radius.
1919         #  @param theName Object name; when specified, this parameter is used
1920         #         for result publication in the study. Otherwise, if automatic
1921         #         publication is switched on, default value is used for result name.
1922         #
1923         #  @return New GEOM.GEOM_Object, containing the created circle.
1924         def MakeCircleR(self, theR, theName=None):
1925             """
1926             Create a circle with given radius.
1927             Center of the circle will be in the origin of global
1928             coordinate system and normal vector will be codirected with Z axis
1929
1930             Parameters:
1931                 theR Circle radius.
1932                 theName Object name; when specified, this parameter is used
1933                         for result publication in the study. Otherwise, if automatic
1934                         publication is switched on, default value is used for result name.
1935
1936             Returns:
1937                 New GEOM.GEOM_Object, containing the created circle.
1938             """
1939             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
1940             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
1941             self._autoPublish(anObj, theName, "circle")
1942             return anObj
1943
1944         ## Create a circle, passing through three given points
1945         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1946         #  @param theName Object name; when specified, this parameter is used
1947         #         for result publication in the study. Otherwise, if automatic
1948         #         publication is switched on, default value is used for result name.
1949         #
1950         #  @return New GEOM.GEOM_Object, containing the created circle.
1951         #
1952         #  @ref tui_creation_circle "Example"
1953         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1954             """
1955             Create a circle, passing through three given points
1956
1957             Parameters:
1958                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1959                 theName Object name; when specified, this parameter is used
1960                         for result publication in the study. Otherwise, if automatic
1961                         publication is switched on, default value is used for result name.
1962
1963             Returns:
1964                 New GEOM.GEOM_Object, containing the created circle.
1965             """
1966             # Example: see GEOM_TestAll.py
1967             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
1968             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
1969             self._autoPublish(anObj, theName, "circle")
1970             return anObj
1971
1972         ## Create a circle, with given point1 as center,
1973         #  passing through the point2 as radius and laying in the plane,
1974         #  defined by all three given points.
1975         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
1976         #  @param theName Object name; when specified, this parameter is used
1977         #         for result publication in the study. Otherwise, if automatic
1978         #         publication is switched on, default value is used for result name.
1979         #
1980         #  @return New GEOM.GEOM_Object, containing the created circle.
1981         #
1982         #  @ref swig_MakeCircle "Example"
1983         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
1984             """
1985             Create a circle, with given point1 as center,
1986             passing through the point2 as radius and laying in the plane,
1987             defined by all three given points.
1988
1989             Parameters:
1990                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
1991                 theName Object name; when specified, this parameter is used
1992                         for result publication in the study. Otherwise, if automatic
1993                         publication is switched on, default value is used for result name.
1994
1995             Returns:
1996                 New GEOM.GEOM_Object, containing the created circle.
1997             """
1998             # Example: see GEOM_example6.py
1999             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2000             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2001             self._autoPublish(anObj, theName, "circle")
2002             return anObj
2003
2004         ## Create an ellipse with given center, normal vector and radiuses.
2005         #  @param thePnt Ellipse center.
2006         #  @param theVec Vector, normal to the plane of the ellipse.
2007         #  @param theRMajor Major ellipse radius.
2008         #  @param theRMinor Minor ellipse radius.
2009         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2010         #  @param theName Object name; when specified, this parameter is used
2011         #         for result publication in the study. Otherwise, if automatic
2012         #         publication is switched on, default value is used for result name.
2013         #
2014         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2015         #
2016         #  @ref tui_creation_ellipse "Example"
2017         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2018             """
2019             Create an ellipse with given center, normal vector and radiuses.
2020
2021             Parameters:
2022                 thePnt Ellipse center.
2023                 theVec Vector, normal to the plane of the ellipse.
2024                 theRMajor Major ellipse radius.
2025                 theRMinor Minor ellipse radius.
2026                 theVecMaj Vector, direction of the ellipse's main axis.
2027                 theName Object name; when specified, this parameter is used
2028                         for result publication in the study. Otherwise, if automatic
2029                         publication is switched on, default value is used for result name.
2030
2031             Returns:    
2032                 New GEOM.GEOM_Object, containing the created ellipse.
2033             """
2034             # Example: see GEOM_TestAll.py
2035             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2036             if theVecMaj is not None:
2037                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2038             else:
2039                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2040                 pass
2041             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2042             anObj.SetParameters(Parameters)
2043             self._autoPublish(anObj, theName, "ellipse")
2044             return anObj
2045
2046         ## Create an ellipse with given radiuses.
2047         #  Center of the ellipse will be in the origin of global
2048         #  coordinate system and normal vector will be codirected with Z axis
2049         #  @param theRMajor Major ellipse radius.
2050         #  @param theRMinor Minor ellipse radius.
2051         #  @param theName Object name; when specified, this parameter is used
2052         #         for result publication in the study. Otherwise, if automatic
2053         #         publication is switched on, default value is used for result name.
2054         #
2055         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2056         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2057             """
2058             Create an ellipse with given radiuses.
2059             Center of the ellipse will be in the origin of global
2060             coordinate system and normal vector will be codirected with Z axis
2061
2062             Parameters:
2063                 theRMajor Major ellipse radius.
2064                 theRMinor Minor ellipse radius.
2065                 theName Object name; when specified, this parameter is used
2066                         for result publication in the study. Otherwise, if automatic
2067                         publication is switched on, default value is used for result name.
2068
2069             Returns:
2070             New GEOM.GEOM_Object, containing the created ellipse.
2071             """
2072             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2073             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2074             self._autoPublish(anObj, theName, "ellipse")
2075             return anObj
2076
2077         ## Create a polyline on the set of points.
2078         #  @param thePoints Sequence of points for the polyline.
2079         #  @param theIsClosed If True, build a closed wire.
2080         #  @param theName Object name; when specified, this parameter is used
2081         #         for result publication in the study. Otherwise, if automatic
2082         #         publication is switched on, default value is used for result name.
2083         #
2084         #  @return New GEOM.GEOM_Object, containing the created polyline.
2085         #
2086         #  @ref tui_creation_curve "Example"
2087         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2088             """
2089             Create a polyline on the set of points.
2090
2091             Parameters:
2092                 thePoints Sequence of points for the polyline.
2093                 theIsClosed If True, build a closed wire.
2094                 theName Object name; when specified, this parameter is used
2095                         for result publication in the study. Otherwise, if automatic
2096                         publication is switched on, default value is used for result name.
2097
2098             Returns:
2099                 New GEOM.GEOM_Object, containing the created polyline.
2100             """
2101             # Example: see GEOM_TestAll.py
2102             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2103             RaiseIfFailed("MakePolyline", self.CurvesOp)
2104             self._autoPublish(anObj, theName, "polyline")
2105             return anObj
2106
2107         ## Create bezier curve on the set of points.
2108         #  @param thePoints Sequence of points for the bezier curve.
2109         #  @param theIsClosed If True, build a closed curve.
2110         #  @param theName Object name; when specified, this parameter is used
2111         #         for result publication in the study. Otherwise, if automatic
2112         #         publication is switched on, default value is used for result name.
2113         #
2114         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2115         #
2116         #  @ref tui_creation_curve "Example"
2117         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2118             """
2119             Create bezier curve on the set of points.
2120
2121             Parameters:
2122                 thePoints Sequence of points for the bezier curve.
2123                 theIsClosed If True, build a closed curve.
2124                 theName Object name; when specified, this parameter is used
2125                         for result publication in the study. Otherwise, if automatic
2126                         publication is switched on, default value is used for result name.
2127
2128             Returns:
2129                 New GEOM.GEOM_Object, containing the created bezier curve.
2130             """
2131             # Example: see GEOM_TestAll.py
2132             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2133             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2134             self._autoPublish(anObj, theName, "bezier")
2135             return anObj
2136
2137         ## Create B-Spline curve on the set of points.
2138         #  @param thePoints Sequence of points for the B-Spline curve.
2139         #  @param theIsClosed If True, build a closed curve.
2140         #  @param theDoReordering If TRUE, the algo does not follow the order of
2141         #                         \a thePoints but searches for the closest vertex.
2142         #  @param theName Object name; when specified, this parameter is used
2143         #         for result publication in the study. Otherwise, if automatic
2144         #         publication is switched on, default value is used for result name.
2145         #
2146         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2147         #
2148         #  @ref tui_creation_curve "Example"
2149         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2150             """
2151             Create B-Spline curve on the set of points.
2152
2153             Parameters:
2154                 thePoints Sequence of points for the B-Spline curve.
2155                 theIsClosed If True, build a closed curve.
2156                 theDoReordering If True, the algo does not follow the order of
2157                                 thePoints but searches for the closest vertex.
2158                 theName Object name; when specified, this parameter is used
2159                         for result publication in the study. Otherwise, if automatic
2160                         publication is switched on, default value is used for result name.
2161
2162             Returns:                     
2163                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2164             """
2165             # Example: see GEOM_TestAll.py
2166             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2167             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2168             self._autoPublish(anObj, theName, "bspline")
2169             return anObj
2170
2171         ## Create B-Spline curve on the set of points.
2172         #  @param thePoints Sequence of points for the B-Spline curve.
2173         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2174         #  @param theLastVec Vector object, defining the curve direction at its last point.
2175         #  @param theName Object name; when specified, this parameter is used
2176         #         for result publication in the study. Otherwise, if automatic
2177         #         publication is switched on, default value is used for result name.
2178         #
2179         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2180         #
2181         #  @ref tui_creation_curve "Example"
2182         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2183             """
2184             Create B-Spline curve on the set of points.
2185
2186             Parameters:
2187                 thePoints Sequence of points for the B-Spline curve.
2188                 theFirstVec Vector object, defining the curve direction at its first point.
2189                 theLastVec Vector object, defining the curve direction at its last point.
2190                 theName Object name; when specified, this parameter is used
2191                         for result publication in the study. Otherwise, if automatic
2192                         publication is switched on, default value is used for result name.
2193
2194             Returns:                     
2195                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2196             """
2197             # Example: see GEOM_TestAll.py
2198             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2199             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2200             self._autoPublish(anObj, theName, "bspline")
2201             return anObj
2202
2203         ## Creates a curve using the parametric definition of the basic points.
2204         #  @param thexExpr parametric equation of the coordinates X.
2205         #  @param theyExpr parametric equation of the coordinates Y.
2206         #  @param thezExpr parametric equation of the coordinates Z.
2207         #  @param theParamMin the minimal value of the parameter.
2208         #  @param theParamMax the maximum value of the parameter.
2209         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2210         #  @param theCurveType the type of the curve.
2211         #  @param theNewMethod flag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
2212         #  @param theName Object name; when specified, this parameter is used
2213         #         for result publication in the study. Otherwise, if automatic
2214         #         publication is switched on, default value is used for result name.
2215         #
2216         #  @return New GEOM.GEOM_Object, containing the created curve.
2217         #
2218         #  @ref tui_creation_curve "Example"
2219         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2220                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2221             """
2222             Creates a curve using the parametric definition of the basic points.
2223
2224             Parameters:
2225                 thexExpr parametric equation of the coordinates X.
2226                 theyExpr parametric equation of the coordinates Y.
2227                 thezExpr parametric equation of the coordinates Z.
2228                 theParamMin the minimal value of the parameter.
2229                 theParamMax the maximum value of the parameter.
2230                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2231                 theCurveType the type of the curve.
2232                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2233                              method is used which can lead to a bug.
2234                 theName Object name; when specified, this parameter is used
2235                         for result publication in the study. Otherwise, if automatic
2236                         publication is switched on, default value is used for result name.
2237
2238             Returns:
2239                 New GEOM.GEOM_Object, containing the created curve.
2240             """
2241             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2242             if theNewMethod:
2243               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2244             else:
2245               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
2246             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2247             anObj.SetParameters(Parameters)
2248             self._autoPublish(anObj, theName, "curve")
2249             return anObj
2250
2251         # end of l4_curves
2252         ## @}
2253
2254         ## @addtogroup l3_sketcher
2255         ## @{
2256
2257         ## Create a sketcher (wire or face), following the textual description,
2258         #  passed through <VAR>theCommand</VAR> argument. \n
2259         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2260         #  Format of the description string have to be the following:
2261         #
2262         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2263         #
2264         #  Where:
2265         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2266         #  - CMD is one of
2267         #     - "R angle" : Set the direction by angle
2268         #     - "D dx dy" : Set the direction by DX & DY
2269         #     .
2270         #       \n
2271         #     - "TT x y" : Create segment by point at X & Y
2272         #     - "T dx dy" : Create segment by point with DX & DY
2273         #     - "L length" : Create segment by direction & Length
2274         #     - "IX x" : Create segment by direction & Intersect. X
2275         #     - "IY y" : Create segment by direction & Intersect. Y
2276         #     .
2277         #       \n
2278         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2279         #     - "AA x y": Create arc by point at X & Y
2280         #     - "A dx dy" : Create arc by point with DX & DY
2281         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2282         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2283         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2284         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2285         #     .
2286         #       \n
2287         #     - "WW" : Close Wire (to finish)
2288         #     - "WF" : Close Wire and build face (to finish)
2289         #     .
2290         #        \n
2291         #  - Flag1 (= reverse) is 0 or 2 ...
2292         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2293         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2294         #     .
2295         #        \n
2296         #  - Flag2 (= control tolerance) is 0 or 1 ...
2297         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2298         #     - if 1 the wire is built only if the end point is on the arc
2299         #       with a tolerance of 10^-7 on the distance else the creation fails
2300         #
2301         #  @param theCommand String, defining the sketcher in local
2302         #                    coordinates of the working plane.
2303         #  @param theWorkingPlane Nine double values, defining origin,
2304         #                         OZ and OX directions of the working plane.
2305         #  @param theName Object name; when specified, this parameter is used
2306         #         for result publication in the study. Otherwise, if automatic
2307         #         publication is switched on, default value is used for result name.
2308         #
2309         #  @return New GEOM.GEOM_Object, containing the created wire.
2310         #
2311         #  @ref tui_sketcher_page "Example"
2312         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2313             """
2314             Create a sketcher (wire or face), following the textual description, passed
2315             through theCommand argument.
2316             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2317             Format of the description string have to be the following:
2318                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2319             Where:
2320             - x1, y1 are coordinates of the first sketcher point (zero by default),
2321             - CMD is one of
2322                - "R angle" : Set the direction by angle
2323                - "D dx dy" : Set the direction by DX & DY
2324                
2325                - "TT x y" : Create segment by point at X & Y
2326                - "T dx dy" : Create segment by point with DX & DY
2327                - "L length" : Create segment by direction & Length
2328                - "IX x" : Create segment by direction & Intersect. X
2329                - "IY y" : Create segment by direction & Intersect. Y
2330
2331                - "C radius length" : Create arc by direction, radius and length(in degree)
2332                - "AA x y": Create arc by point at X & Y
2333                - "A dx dy" : Create arc by point with DX & DY
2334                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2335                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2336                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2337                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2338
2339                - "WW" : Close Wire (to finish)
2340                - "WF" : Close Wire and build face (to finish)
2341             
2342             - Flag1 (= reverse) is 0 or 2 ...
2343                - if 0 the drawn arc is the one of lower angle (< Pi)
2344                - if 2 the drawn arc ius the one of greater angle (> Pi)
2345         
2346             - Flag2 (= control tolerance) is 0 or 1 ...
2347                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2348                - if 1 the wire is built only if the end point is on the arc
2349                  with a tolerance of 10^-7 on the distance else the creation fails
2350
2351             Parameters:
2352                 theCommand String, defining the sketcher in local
2353                            coordinates of the working plane.
2354                 theWorkingPlane Nine double values, defining origin,
2355                                 OZ and OX directions of the working plane.
2356                 theName Object name; when specified, this parameter is used
2357                         for result publication in the study. Otherwise, if automatic
2358                         publication is switched on, default value is used for result name.
2359
2360             Returns:
2361                 New GEOM.GEOM_Object, containing the created wire.
2362             """
2363             # Example: see GEOM_TestAll.py
2364             theCommand,Parameters = ParseSketcherCommand(theCommand)
2365             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2366             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2367             anObj.SetParameters(Parameters)
2368             self._autoPublish(anObj, theName, "wire")
2369             return anObj
2370
2371         ## Create a sketcher (wire or face), following the textual description,
2372         #  passed through <VAR>theCommand</VAR> argument. \n
2373         #  For format of the description string see MakeSketcher() method.\n
2374         #  @param theCommand String, defining the sketcher in local
2375         #                    coordinates of the working plane.
2376         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2377         #  @param theName Object name; when specified, this parameter is used
2378         #         for result publication in the study. Otherwise, if automatic
2379         #         publication is switched on, default value is used for result name.
2380         #
2381         #  @return New GEOM.GEOM_Object, containing the created wire.
2382         #
2383         #  @ref tui_sketcher_page "Example"
2384         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2385             """
2386             Create a sketcher (wire or face), following the textual description,
2387             passed through theCommand argument.
2388             For format of the description string see geompy.MakeSketcher() method.
2389
2390             Parameters:
2391                 theCommand String, defining the sketcher in local
2392                            coordinates of the working plane.
2393                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2394                 theName Object name; when specified, this parameter is used
2395                         for result publication in the study. Otherwise, if automatic
2396                         publication is switched on, default value is used for result name.
2397
2398             Returns:
2399                 New GEOM.GEOM_Object, containing the created wire.
2400             """
2401             theCommand,Parameters = ParseSketcherCommand(theCommand)
2402             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2403             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2404             anObj.SetParameters(Parameters)
2405             self._autoPublish(anObj, theName, "wire")
2406             return anObj
2407
2408         ## Obtain a 2D sketcher interface
2409         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface      
2410         def Sketcher2D (self):
2411             """
2412             Obtain a 2D sketcher interface.
2413
2414             Example of usage:
2415                sk = geompy.Sketcher2D()
2416                sk.addPoint(20, 20)
2417                sk.addSegmentRelative(15, 70)
2418                sk.addSegmentPerpY(50)
2419                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2420                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2421                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2422                sk.close()
2423                Sketch_1 = sk.wire(geomObj_1)
2424             """
2425             sk = Sketcher2D (self)
2426             return sk
2427         
2428         ## Create a sketcher wire, following the numerical description,
2429         #  passed through <VAR>theCoordinates</VAR> argument. \n
2430         #  @param theCoordinates double values, defining points to create a wire,
2431         #                                                      passing from it.
2432         #  @param theName Object name; when specified, this parameter is used
2433         #         for result publication in the study. Otherwise, if automatic
2434         #         publication is switched on, default value is used for result name.
2435         #
2436         #  @return New GEOM.GEOM_Object, containing the created wire.
2437         #
2438         #  @ref tui_3dsketcher_page "Example"
2439         def Make3DSketcher(self, theCoordinates, theName=None):
2440             """
2441             Create a sketcher wire, following the numerical description,
2442             passed through theCoordinates argument.
2443
2444             Parameters:
2445                 theCoordinates double values, defining points to create a wire,
2446                                passing from it.
2447                 theName Object name; when specified, this parameter is used
2448                         for result publication in the study. Otherwise, if automatic
2449                         publication is switched on, default value is used for result name.
2450
2451             Returns:
2452                 New GEOM_Object, containing the created wire.
2453             """
2454             theCoordinates,Parameters = ParseParameters(theCoordinates)
2455             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2456             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2457             anObj.SetParameters(Parameters)
2458             self._autoPublish(anObj, theName, "wire")
2459             return anObj
2460
2461         ## Obtain a 3D sketcher interface
2462         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2463         #
2464         #  @ref tui_3dsketcher_page "Example"
2465         def Sketcher3D (self):
2466             """
2467             Obtain a 3D sketcher interface.
2468
2469             Example of usage:
2470                 sk = geompy.Sketcher3D()
2471                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2472                 sk.addPointsRelative(0, 0, 130)
2473                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2474                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2475                 sk.close()
2476                 a3D_Sketcher_1 = sk.wire()
2477             """
2478             sk = Sketcher3D (self)
2479             return sk
2480
2481         # end of l3_sketcher
2482         ## @}
2483
2484         ## @addtogroup l3_3d_primitives
2485         ## @{
2486
2487         ## Create a box by coordinates of two opposite vertices.
2488         #
2489         #  @param x1,y1,z1 double values, defining first point it.
2490         #  @param x2,y2,z2 double values, defining first point it.
2491         #  @param theName Object name; when specified, this parameter is used
2492         #         for result publication in the study. Otherwise, if automatic
2493         #         publication is switched on, default value is used for result name.
2494         #
2495         #  @return New GEOM.GEOM_Object, containing the created box.
2496         #
2497         #  @ref tui_creation_box "Example"
2498         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2499             """
2500             Create a box by coordinates of two opposite vertices.
2501             
2502             Parameters:
2503                 x1,y1,z1 double values, defining first point.
2504                 x2,y2,z2 double values, defining second point.
2505                 theName Object name; when specified, this parameter is used
2506                         for result publication in the study. Otherwise, if automatic
2507                         publication is switched on, default value is used for result name.
2508                 
2509             Returns:
2510                 New GEOM.GEOM_Object, containing the created box.
2511             """
2512             # Example: see GEOM_TestAll.py
2513             pnt1 = self.MakeVertex(x1,y1,z1)
2514             pnt2 = self.MakeVertex(x2,y2,z2)
2515             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2516             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2517
2518         ## Create a box with specified dimensions along the coordinate axes
2519         #  and with edges, parallel to the coordinate axes.
2520         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2521         #  @param theDX Length of Box edges, parallel to OX axis.
2522         #  @param theDY Length of Box edges, parallel to OY axis.
2523         #  @param theDZ Length of Box edges, parallel to OZ axis.
2524         #  @param theName Object name; when specified, this parameter is used
2525         #         for result publication in the study. Otherwise, if automatic
2526         #         publication is switched on, default value is used for result name.
2527         #
2528         #  @return New GEOM.GEOM_Object, containing the created box.
2529         #
2530         #  @ref tui_creation_box "Example"
2531         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2532             """
2533             Create a box with specified dimensions along the coordinate axes
2534             and with edges, parallel to the coordinate axes.
2535             Center of the box will be at point (DX/2, DY/2, DZ/2).
2536
2537             Parameters:
2538                 theDX Length of Box edges, parallel to OX axis.
2539                 theDY Length of Box edges, parallel to OY axis.
2540                 theDZ Length of Box edges, parallel to OZ axis.
2541                 theName Object name; when specified, this parameter is used
2542                         for result publication in the study. Otherwise, if automatic
2543                         publication is switched on, default value is used for result name.
2544
2545             Returns:   
2546                 New GEOM.GEOM_Object, containing the created box.
2547             """
2548             # Example: see GEOM_TestAll.py
2549             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2550             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2551             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2552             anObj.SetParameters(Parameters)
2553             self._autoPublish(anObj, theName, "box")
2554             return anObj
2555
2556         ## Create a box with two specified opposite vertices,
2557         #  and with edges, parallel to the coordinate axes
2558         #  @param thePnt1 First of two opposite vertices.
2559         #  @param thePnt2 Second of two opposite vertices.
2560         #  @param theName Object name; when specified, this parameter is used
2561         #         for result publication in the study. Otherwise, if automatic
2562         #         publication is switched on, default value is used for result name.
2563         #
2564         #  @return New GEOM.GEOM_Object, containing the created box.
2565         #
2566         #  @ref tui_creation_box "Example"
2567         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2568             """
2569             Create a box with two specified opposite vertices,
2570             and with edges, parallel to the coordinate axes
2571
2572             Parameters:
2573                 thePnt1 First of two opposite vertices.
2574                 thePnt2 Second of two opposite vertices.
2575                 theName Object name; when specified, this parameter is used
2576                         for result publication in the study. Otherwise, if automatic
2577                         publication is switched on, default value is used for result name.
2578
2579             Returns:
2580                 New GEOM.GEOM_Object, containing the created box.
2581             """
2582             # Example: see GEOM_TestAll.py
2583             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2584             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2585             self._autoPublish(anObj, theName, "box")
2586             return anObj
2587
2588         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2589         #  @param theH height of Face.
2590         #  @param theW width of Face.
2591         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2592         #  @param theName Object name; when specified, this parameter is used
2593         #         for result publication in the study. Otherwise, if automatic
2594         #         publication is switched on, default value is used for result name.
2595         #
2596         #  @return New GEOM.GEOM_Object, containing the created face.
2597         #
2598         #  @ref tui_creation_face "Example"
2599         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2600             """
2601             Create a face with specified dimensions with edges parallel to coordinate axes.
2602
2603             Parameters:
2604                 theH height of Face.
2605                 theW width of Face.
2606                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2607                 theName Object name; when specified, this parameter is used
2608                         for result publication in the study. Otherwise, if automatic
2609                         publication is switched on, default value is used for result name.
2610
2611             Returns:
2612                 New GEOM.GEOM_Object, containing the created face.
2613             """
2614             # Example: see GEOM_TestAll.py
2615             theH,theW,Parameters = ParseParameters(theH, theW)
2616             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2617             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2618             anObj.SetParameters(Parameters)
2619             self._autoPublish(anObj, theName, "rectangle")
2620             return anObj
2621
2622         ## Create a face from another plane and two sizes,
2623         #  vertical size and horisontal size.
2624         #  @param theObj   Normale vector to the creating face or
2625         #  the face object.
2626         #  @param theH     Height (vertical size).
2627         #  @param theW     Width (horisontal size).
2628         #  @param theName Object name; when specified, this parameter is used
2629         #         for result publication in the study. Otherwise, if automatic
2630         #         publication is switched on, default value is used for result name.
2631         #
2632         #  @return New GEOM.GEOM_Object, containing the created face.
2633         #
2634         #  @ref tui_creation_face "Example"
2635         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2636             """
2637             Create a face from another plane and two sizes,
2638             vertical size and horisontal size.
2639
2640             Parameters:
2641                 theObj   Normale vector to the creating face or
2642                          the face object.
2643                 theH     Height (vertical size).
2644                 theW     Width (horisontal size).
2645                 theName Object name; when specified, this parameter is used
2646                         for result publication in the study. Otherwise, if automatic
2647                         publication is switched on, default value is used for result name.
2648
2649             Returns:
2650                 New GEOM_Object, containing the created face.
2651             """
2652             # Example: see GEOM_TestAll.py
2653             theH,theW,Parameters = ParseParameters(theH, theW)
2654             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2655             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2656             anObj.SetParameters(Parameters)
2657             self._autoPublish(anObj, theName, "rectangle")
2658             return anObj
2659
2660         ## Create a disk with given center, normal vector and radius.
2661         #  @param thePnt Disk center.
2662         #  @param theVec Vector, normal to the plane of the disk.
2663         #  @param theR Disk radius.
2664         #  @param theName Object name; when specified, this parameter is used
2665         #         for result publication in the study. Otherwise, if automatic
2666         #         publication is switched on, default value is used for result name.
2667         #
2668         #  @return New GEOM.GEOM_Object, containing the created disk.
2669         #
2670         #  @ref tui_creation_disk "Example"
2671         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2672             """
2673             Create a disk with given center, normal vector and radius.
2674
2675             Parameters:
2676                 thePnt Disk center.
2677                 theVec Vector, normal to the plane of the disk.
2678                 theR Disk radius.
2679                 theName Object name; when specified, this parameter is used
2680                         for result publication in the study. Otherwise, if automatic
2681                         publication is switched on, default value is used for result name.
2682
2683             Returns:    
2684                 New GEOM.GEOM_Object, containing the created disk.
2685             """
2686             # Example: see GEOM_TestAll.py
2687             theR,Parameters = ParseParameters(theR)
2688             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2689             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2690             anObj.SetParameters(Parameters)
2691             self._autoPublish(anObj, theName, "disk")
2692             return anObj
2693
2694         ## Create a disk, passing through three given points
2695         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2696         #  @param theName Object name; when specified, this parameter is used
2697         #         for result publication in the study. Otherwise, if automatic
2698         #         publication is switched on, default value is used for result name.
2699         #
2700         #  @return New GEOM.GEOM_Object, containing the created disk.
2701         #
2702         #  @ref tui_creation_disk "Example"
2703         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2704             """
2705             Create a disk, passing through three given points
2706
2707             Parameters:
2708                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2709                 theName Object name; when specified, this parameter is used
2710                         for result publication in the study. Otherwise, if automatic
2711                         publication is switched on, default value is used for result name.
2712
2713             Returns:    
2714                 New GEOM.GEOM_Object, containing the created disk.
2715             """
2716             # Example: see GEOM_TestAll.py
2717             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2718             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2719             self._autoPublish(anObj, theName, "disk")
2720             return anObj
2721
2722         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2723         #  @param theR Radius of Face.
2724         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2725         #  @param theName Object name; when specified, this parameter is used
2726         #         for result publication in the study. Otherwise, if automatic
2727         #         publication is switched on, default value is used for result name.
2728         #
2729         #  @return New GEOM.GEOM_Object, containing the created disk.
2730         #
2731         #  @ref tui_creation_face "Example"
2732         def MakeDiskR(self, theR, theOrientation, theName=None):
2733             """
2734             Create a disk with specified dimensions along OX-OY coordinate axes.
2735
2736             Parameters:
2737                 theR Radius of Face.
2738                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2739                 theName Object name; when specified, this parameter is used
2740                         for result publication in the study. Otherwise, if automatic
2741                         publication is switched on, default value is used for result name.
2742
2743             Returns: 
2744                 New GEOM.GEOM_Object, containing the created disk.
2745
2746             Example of usage:
2747                 Disk3 = geompy.MakeDiskR(100., 1)
2748             """
2749             # Example: see GEOM_TestAll.py
2750             theR,Parameters = ParseParameters(theR)
2751             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2752             RaiseIfFailed("MakeDiskR", self.PrimOp)
2753             anObj.SetParameters(Parameters)
2754             self._autoPublish(anObj, theName, "disk")
2755             return anObj
2756
2757         ## Create a cylinder with given base point, axis, radius and height.
2758         #  @param thePnt Central point of cylinder base.
2759         #  @param theAxis Cylinder axis.
2760         #  @param theR Cylinder radius.
2761         #  @param theH Cylinder height.
2762         #  @param theName Object name; when specified, this parameter is used
2763         #         for result publication in the study. Otherwise, if automatic
2764         #         publication is switched on, default value is used for result name.
2765         #
2766         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2767         #
2768         #  @ref tui_creation_cylinder "Example"
2769         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2770             """
2771             Create a cylinder with given base point, axis, radius and height.
2772
2773             Parameters:
2774                 thePnt Central point of cylinder base.
2775                 theAxis Cylinder axis.
2776                 theR Cylinder radius.
2777                 theH Cylinder height.
2778                 theName Object name; when specified, this parameter is used
2779                         for result publication in the study. Otherwise, if automatic
2780                         publication is switched on, default value is used for result name.
2781
2782             Returns: 
2783                 New GEOM.GEOM_Object, containing the created cylinder.
2784             """
2785             # Example: see GEOM_TestAll.py
2786             theR,theH,Parameters = ParseParameters(theR, theH)
2787             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2788             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2789             anObj.SetParameters(Parameters)
2790             self._autoPublish(anObj, theName, "cylinder")
2791             return anObj
2792
2793         ## Create a cylinder with given radius and height at
2794         #  the origin of coordinate system. Axis of the cylinder
2795         #  will be collinear to the OZ axis of the coordinate system.
2796         #  @param theR Cylinder radius.
2797         #  @param theH Cylinder height.
2798         #  @param theName Object name; when specified, this parameter is used
2799         #         for result publication in the study. Otherwise, if automatic
2800         #         publication is switched on, default value is used for result name.
2801         #
2802         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2803         #
2804         #  @ref tui_creation_cylinder "Example"
2805         def MakeCylinderRH(self, theR, theH, theName=None):
2806             """
2807             Create a cylinder with given radius and height at
2808             the origin of coordinate system. Axis of the cylinder
2809             will be collinear to the OZ axis of the coordinate system.
2810
2811             Parameters:
2812                 theR Cylinder radius.
2813                 theH Cylinder height.
2814                 theName Object name; when specified, this parameter is used
2815                         for result publication in the study. Otherwise, if automatic
2816                         publication is switched on, default value is used for result name.
2817
2818             Returns:    
2819                 New GEOM.GEOM_Object, containing the created cylinder.
2820             """
2821             # Example: see GEOM_TestAll.py
2822             theR,theH,Parameters = ParseParameters(theR, theH)
2823             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
2824             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
2825             anObj.SetParameters(Parameters)
2826             self._autoPublish(anObj, theName, "cylinder")
2827             return anObj
2828
2829         ## Create a sphere with given center and radius.
2830         #  @param thePnt Sphere center.
2831         #  @param theR Sphere radius.
2832         #  @param theName Object name; when specified, this parameter is used
2833         #         for result publication in the study. Otherwise, if automatic
2834         #         publication is switched on, default value is used for result name.
2835         #
2836         #  @return New GEOM.GEOM_Object, containing the created sphere.
2837         #
2838         #  @ref tui_creation_sphere "Example"
2839         def MakeSpherePntR(self, thePnt, theR, theName=None):
2840             """
2841             Create a sphere with given center and radius.
2842
2843             Parameters:
2844                 thePnt Sphere center.
2845                 theR Sphere radius.
2846                 theName Object name; when specified, this parameter is used
2847                         for result publication in the study. Otherwise, if automatic
2848                         publication is switched on, default value is used for result name.
2849
2850             Returns:    
2851                 New GEOM.GEOM_Object, containing the created sphere.            
2852             """
2853             # Example: see GEOM_TestAll.py
2854             theR,Parameters = ParseParameters(theR)
2855             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
2856             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
2857             anObj.SetParameters(Parameters)
2858             self._autoPublish(anObj, theName, "sphere")
2859             return anObj
2860
2861         ## Create a sphere with given center and radius.
2862         #  @param x,y,z Coordinates of sphere center.
2863         #  @param theR Sphere radius.
2864         #  @param theName Object name; when specified, this parameter is used
2865         #         for result publication in the study. Otherwise, if automatic
2866         #         publication is switched on, default value is used for result name.
2867         #
2868         #  @return New GEOM.GEOM_Object, containing the created sphere.
2869         #
2870         #  @ref tui_creation_sphere "Example"
2871         def MakeSphere(self, x, y, z, theR, theName=None):
2872             """
2873             Create a sphere with given center and radius.
2874
2875             Parameters: 
2876                 x,y,z Coordinates of sphere center.
2877                 theR Sphere radius.
2878                 theName Object name; when specified, this parameter is used
2879                         for result publication in the study. Otherwise, if automatic
2880                         publication is switched on, default value is used for result name.
2881
2882             Returns:
2883                 New GEOM.GEOM_Object, containing the created sphere.
2884             """
2885             # Example: see GEOM_TestAll.py
2886             point = self.MakeVertex(x, y, z)
2887             # note: auto-publishing is done in self.MakeSpherePntR()
2888             anObj = self.MakeSpherePntR(point, theR, theName)
2889             return anObj
2890
2891         ## Create a sphere with given radius at the origin of coordinate system.
2892         #  @param theR Sphere radius.
2893         #  @param theName Object name; when specified, this parameter is used
2894         #         for result publication in the study. Otherwise, if automatic
2895         #         publication is switched on, default value is used for result name.
2896         #
2897         #  @return New GEOM.GEOM_Object, containing the created sphere.
2898         #
2899         #  @ref tui_creation_sphere "Example"
2900         def MakeSphereR(self, theR, theName=None):
2901             """
2902             Create a sphere with given radius at the origin of coordinate system.
2903
2904             Parameters: 
2905                 theR Sphere radius.
2906                 theName Object name; when specified, this parameter is used
2907                         for result publication in the study. Otherwise, if automatic
2908                         publication is switched on, default value is used for result name.
2909
2910             Returns:
2911                 New GEOM.GEOM_Object, containing the created sphere.            
2912             """
2913             # Example: see GEOM_TestAll.py
2914             theR,Parameters = ParseParameters(theR)
2915             anObj = self.PrimOp.MakeSphereR(theR)
2916             RaiseIfFailed("MakeSphereR", self.PrimOp)
2917             anObj.SetParameters(Parameters)
2918             self._autoPublish(anObj, theName, "sphere")
2919             return anObj
2920
2921         ## Create a cone with given base point, axis, height and radiuses.
2922         #  @param thePnt Central point of the first cone base.
2923         #  @param theAxis Cone axis.
2924         #  @param theR1 Radius of the first cone base.
2925         #  @param theR2 Radius of the second cone base.
2926         #    \note If both radiuses are non-zero, the cone will be truncated.
2927         #    \note If the radiuses are equal, a cylinder will be created instead.
2928         #  @param theH Cone height.
2929         #  @param theName Object name; when specified, this parameter is used
2930         #         for result publication in the study. Otherwise, if automatic
2931         #         publication is switched on, default value is used for result name.
2932         #
2933         #  @return New GEOM.GEOM_Object, containing the created cone.
2934         #
2935         #  @ref tui_creation_cone "Example"
2936         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
2937             """
2938             Create a cone with given base point, axis, height and radiuses.
2939
2940             Parameters: 
2941                 thePnt Central point of the first cone base.
2942                 theAxis Cone axis.
2943                 theR1 Radius of the first cone base.
2944                 theR2 Radius of the second cone base.
2945                 theH Cone height.
2946                 theName Object name; when specified, this parameter is used
2947                         for result publication in the study. Otherwise, if automatic
2948                         publication is switched on, default value is used for result name.
2949
2950             Note:
2951                 If both radiuses are non-zero, the cone will be truncated.
2952                 If the radiuses are equal, a cylinder will be created instead.
2953
2954             Returns:
2955                 New GEOM.GEOM_Object, containing the created cone.
2956             """
2957             # Example: see GEOM_TestAll.py
2958             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
2959             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
2960             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
2961             anObj.SetParameters(Parameters)
2962             self._autoPublish(anObj, theName, "cone")
2963             return anObj
2964
2965         ## Create a cone with given height and radiuses at
2966         #  the origin of coordinate system. Axis of the cone will
2967         #  be collinear to the OZ axis of the coordinate system.
2968         #  @param theR1 Radius of the first cone base.
2969         #  @param theR2 Radius of the second cone base.
2970         #    \note If both radiuses are non-zero, the cone will be truncated.
2971         #    \note If the radiuses are equal, a cylinder will be created instead.
2972         #  @param theH Cone height.
2973         #  @param theName Object name; when specified, this parameter is used
2974         #         for result publication in the study. Otherwise, if automatic
2975         #         publication is switched on, default value is used for result name.
2976         #
2977         #  @return New GEOM.GEOM_Object, containing the created cone.
2978         #
2979         #  @ref tui_creation_cone "Example"
2980         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
2981             """
2982             Create a cone with given height and radiuses at
2983             the origin of coordinate system. Axis of the cone will
2984             be collinear to the OZ axis of the coordinate system.
2985
2986             Parameters: 
2987                 theR1 Radius of the first cone base.
2988                 theR2 Radius of the second cone base.
2989                 theH Cone height.
2990                 theName Object name; when specified, this parameter is used
2991                         for result publication in the study. Otherwise, if automatic
2992                         publication is switched on, default value is used for result name.
2993
2994             Note:
2995                 If both radiuses are non-zero, the cone will be truncated.
2996                 If the radiuses are equal, a cylinder will be created instead.
2997
2998             Returns:
2999                 New GEOM.GEOM_Object, containing the created cone.
3000             """
3001             # Example: see GEOM_TestAll.py
3002             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3003             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3004             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3005             anObj.SetParameters(Parameters)
3006             self._autoPublish(anObj, theName, "cone")
3007             return anObj
3008
3009         ## Create a torus with given center, normal vector and radiuses.
3010         #  @param thePnt Torus central point.
3011         #  @param theVec Torus axis of symmetry.
3012         #  @param theRMajor Torus major radius.
3013         #  @param theRMinor Torus minor radius.
3014         #  @param theName Object name; when specified, this parameter is used
3015         #         for result publication in the study. Otherwise, if automatic
3016         #         publication is switched on, default value is used for result name.
3017         #
3018         #  @return New GEOM.GEOM_Object, containing the created torus.
3019         #
3020         #  @ref tui_creation_torus "Example"
3021         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3022             """
3023             Create a torus with given center, normal vector and radiuses.
3024
3025             Parameters: 
3026                 thePnt Torus central point.
3027                 theVec Torus axis of symmetry.
3028                 theRMajor Torus major radius.
3029                 theRMinor Torus minor radius.
3030                 theName Object name; when specified, this parameter is used
3031                         for result publication in the study. Otherwise, if automatic
3032                         publication is switched on, default value is used for result name.
3033
3034            Returns:
3035                 New GEOM.GEOM_Object, containing the created torus.
3036             """
3037             # Example: see GEOM_TestAll.py
3038             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3039             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3040             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3041             anObj.SetParameters(Parameters)
3042             self._autoPublish(anObj, theName, "torus")
3043             return anObj
3044
3045         ## Create a torus with given radiuses at the origin of coordinate system.
3046         #  @param theRMajor Torus major radius.
3047         #  @param theRMinor Torus minor radius.
3048         #  @param theName Object name; when specified, this parameter is used
3049         #         for result publication in the study. Otherwise, if automatic
3050         #         publication is switched on, default value is used for result name.
3051         #
3052         #  @return New GEOM.GEOM_Object, containing the created torus.
3053         #
3054         #  @ref tui_creation_torus "Example"
3055         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3056             """
3057            Create a torus with given radiuses at the origin of coordinate system.
3058
3059            Parameters: 
3060                 theRMajor Torus major radius.
3061                 theRMinor Torus minor radius.
3062                 theName Object name; when specified, this parameter is used
3063                         for result publication in the study. Otherwise, if automatic
3064                         publication is switched on, default value is used for result name.
3065
3066            Returns:
3067                 New GEOM.GEOM_Object, containing the created torus.            
3068             """
3069             # Example: see GEOM_TestAll.py
3070             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3071             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3072             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3073             anObj.SetParameters(Parameters)
3074             self._autoPublish(anObj, theName, "torus")
3075             return anObj
3076
3077         # end of l3_3d_primitives
3078         ## @}
3079
3080         ## @addtogroup l3_complex
3081         ## @{
3082
3083         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3084         #  @param theBase Base shape to be extruded.
3085         #  @param thePoint1 First end of extrusion vector.
3086         #  @param thePoint2 Second end of extrusion vector.
3087         #  @param theScaleFactor Use it to make prism with scaled second base.
3088         #                        Nagative value means not scaled second base.
3089         #  @param theName Object name; when specified, this parameter is used
3090         #         for result publication in the study. Otherwise, if automatic
3091         #         publication is switched on, default value is used for result name.
3092         #
3093         #  @return New GEOM.GEOM_Object, containing the created prism.
3094         #
3095         #  @ref tui_creation_prism "Example"
3096         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3097             """
3098             Create a shape by extrusion of the base shape along a vector, defined by two points.
3099
3100             Parameters: 
3101                 theBase Base shape to be extruded.
3102                 thePoint1 First end of extrusion vector.
3103                 thePoint2 Second end of extrusion vector.
3104                 theScaleFactor Use it to make prism with scaled second base.
3105                                Nagative value means not scaled second base.
3106                 theName Object name; when specified, this parameter is used
3107                         for result publication in the study. Otherwise, if automatic
3108                         publication is switched on, default value is used for result name.
3109
3110             Returns:
3111                 New GEOM.GEOM_Object, containing the created prism.
3112             """
3113             # Example: see GEOM_TestAll.py
3114             anObj = None
3115             Parameters = ""
3116             if theScaleFactor > 0:
3117                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3118                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3119             else:
3120                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3121             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3122             anObj.SetParameters(Parameters)
3123             self._autoPublish(anObj, theName, "prism")
3124             return anObj
3125
3126         ## Create a shape by extrusion of the base shape along a
3127         #  vector, defined by two points, in 2 Ways (forward/backward).
3128         #  @param theBase Base shape to be extruded.
3129         #  @param thePoint1 First end of extrusion vector.
3130         #  @param thePoint2 Second end of extrusion vector.
3131         #  @param theName Object name; when specified, this parameter is used
3132         #         for result publication in the study. Otherwise, if automatic
3133         #         publication is switched on, default value is used for result name.
3134         #
3135         #  @return New GEOM.GEOM_Object, containing the created prism.
3136         #
3137         #  @ref tui_creation_prism "Example"
3138         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3139             """
3140             Create a shape by extrusion of the base shape along a
3141             vector, defined by two points, in 2 Ways (forward/backward).
3142
3143             Parameters: 
3144                 theBase Base shape to be extruded.
3145                 thePoint1 First end of extrusion vector.
3146                 thePoint2 Second end of extrusion vector.
3147                 theName Object name; when specified, this parameter is used
3148                         for result publication in the study. Otherwise, if automatic
3149                         publication is switched on, default value is used for result name.
3150
3151             Returns:
3152                 New GEOM.GEOM_Object, containing the created prism.
3153             """
3154             # Example: see GEOM_TestAll.py
3155             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3156             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3157             self._autoPublish(anObj, theName, "prism")
3158             return anObj
3159
3160         ## Create a shape by extrusion of the base shape along the vector,
3161         #  i.e. all the space, transfixed by the base shape during its translation
3162         #  along the vector on the given distance.
3163         #  @param theBase Base shape to be extruded.
3164         #  @param theVec Direction of extrusion.
3165         #  @param theH Prism dimension along theVec.
3166         #  @param theScaleFactor Use it to make prism with scaled second base.
3167         #                        Negative value means not scaled second base.
3168         #  @param theName Object name; when specified, this parameter is used
3169         #         for result publication in the study. Otherwise, if automatic
3170         #         publication is switched on, default value is used for result name.
3171         #
3172         #  @return New GEOM.GEOM_Object, containing the created prism.
3173         #
3174         #  @ref tui_creation_prism "Example"
3175         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3176             """
3177             Create a shape by extrusion of the base shape along the vector,
3178             i.e. all the space, transfixed by the base shape during its translation
3179             along the vector on the given distance.
3180
3181             Parameters: 
3182                 theBase Base shape to be extruded.
3183                 theVec Direction of extrusion.
3184                 theH Prism dimension along theVec.
3185                 theScaleFactor Use it to make prism with scaled second base.
3186                                Negative value means not scaled second base.
3187                 theName Object name; when specified, this parameter is used
3188                         for result publication in the study. Otherwise, if automatic
3189                         publication is switched on, default value is used for result name.
3190
3191             Returns:
3192                 New GEOM.GEOM_Object, containing the created prism.
3193             """
3194             # Example: see GEOM_TestAll.py
3195             anObj = None
3196             Parameters = ""
3197             if theScaleFactor > 0:
3198                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3199                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3200             else:
3201                 theH,Parameters = ParseParameters(theH)
3202                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3203             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3204             anObj.SetParameters(Parameters)
3205             self._autoPublish(anObj, theName, "prism")
3206             return anObj
3207
3208         ## Create a shape by extrusion of the base shape along the vector,
3209         #  i.e. all the space, transfixed by the base shape during its translation
3210         #  along the vector on the given distance in 2 Ways (forward/backward).
3211         #  @param theBase Base shape to be extruded.
3212         #  @param theVec Direction of extrusion.
3213         #  @param theH Prism dimension along theVec in forward direction.
3214         #  @param theName Object name; when specified, this parameter is used
3215         #         for result publication in the study. Otherwise, if automatic
3216         #         publication is switched on, default value is used for result name.
3217         #
3218         #  @return New GEOM.GEOM_Object, containing the created prism.
3219         #
3220         #  @ref tui_creation_prism "Example"
3221         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3222             """
3223             Create a shape by extrusion of the base shape along the vector,
3224             i.e. all the space, transfixed by the base shape during its translation
3225             along the vector on the given distance in 2 Ways (forward/backward).
3226
3227             Parameters:
3228                 theBase Base shape to be extruded.
3229                 theVec Direction of extrusion.
3230                 theH Prism dimension along theVec in forward direction.
3231                 theName Object name; when specified, this parameter is used
3232                         for result publication in the study. Otherwise, if automatic
3233                         publication is switched on, default value is used for result name.
3234
3235             Returns:
3236                 New GEOM.GEOM_Object, containing the created prism.
3237             """
3238             # Example: see GEOM_TestAll.py
3239             theH,Parameters = ParseParameters(theH)
3240             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3241             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3242             anObj.SetParameters(Parameters)
3243             self._autoPublish(anObj, theName, "prism")
3244             return anObj
3245
3246         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3247         #  @param theBase Base shape to be extruded.
3248         #  @param theDX, theDY, theDZ Directions of extrusion.
3249         #  @param theScaleFactor Use it to make prism with scaled second base.
3250         #                        Nagative value means not scaled second base.
3251         #  @param theName Object name; when specified, this parameter is used
3252         #         for result publication in the study. Otherwise, if automatic
3253         #         publication is switched on, default value is used for result name.
3254         #
3255         #  @return New GEOM.GEOM_Object, containing the created prism.
3256         #
3257         #  @ref tui_creation_prism "Example"
3258         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3259             """
3260             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3261
3262             Parameters:
3263                 theBase Base shape to be extruded.
3264                 theDX, theDY, theDZ Directions of extrusion.
3265                 theScaleFactor Use it to make prism with scaled second base.
3266                                Nagative value means not scaled second base.
3267                 theName Object name; when specified, this parameter is used
3268                         for result publication in the study. Otherwise, if automatic
3269                         publication is switched on, default value is used for result name.
3270
3271             Returns: 
3272                 New GEOM.GEOM_Object, containing the created prism.
3273             """
3274             # Example: see GEOM_TestAll.py
3275             anObj = None
3276             Parameters = ""
3277             if theScaleFactor > 0:
3278                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3279                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3280             else:
3281                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3282                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3283             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3284             anObj.SetParameters(Parameters)
3285             self._autoPublish(anObj, theName, "prism")
3286             return anObj
3287
3288         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3289         #  i.e. all the space, transfixed by the base shape during its translation
3290         #  along the vector on the given distance in 2 Ways (forward/backward).
3291         #  @param theBase Base shape to be extruded.
3292         #  @param theDX, theDY, theDZ Directions of extrusion.
3293         #  @param theName Object name; when specified, this parameter is used
3294         #         for result publication in the study. Otherwise, if automatic
3295         #         publication is switched on, default value is used for result name.
3296         #
3297         #  @return New GEOM.GEOM_Object, containing the created prism.
3298         #
3299         #  @ref tui_creation_prism "Example"
3300         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3301             """
3302             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3303             i.e. all the space, transfixed by the base shape during its translation
3304             along the vector on the given distance in 2 Ways (forward/backward).
3305
3306             Parameters:
3307                 theBase Base shape to be extruded.
3308                 theDX, theDY, theDZ Directions of extrusion.
3309                 theName Object name; when specified, this parameter is used
3310                         for result publication in the study. Otherwise, if automatic
3311                         publication is switched on, default value is used for result name.
3312
3313             Returns:
3314                 New GEOM.GEOM_Object, containing the created prism.
3315             """
3316             # Example: see GEOM_TestAll.py
3317             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3318             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3319             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3320             anObj.SetParameters(Parameters)
3321             self._autoPublish(anObj, theName, "prism")
3322             return anObj
3323
3324         ## Create a shape by revolution of the base shape around the axis
3325         #  on the given angle, i.e. all the space, transfixed by the base
3326         #  shape during its rotation around the axis on the given angle.
3327         #  @param theBase Base shape to be rotated.
3328         #  @param theAxis Rotation axis.
3329         #  @param theAngle Rotation angle in radians.
3330         #  @param theName Object name; when specified, this parameter is used
3331         #         for result publication in the study. Otherwise, if automatic
3332         #         publication is switched on, default value is used for result name.
3333         #
3334         #  @return New GEOM.GEOM_Object, containing the created revolution.
3335         #
3336         #  @ref tui_creation_revolution "Example"
3337         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3338             """
3339             Create a shape by revolution of the base shape around the axis
3340             on the given angle, i.e. all the space, transfixed by the base
3341             shape during its rotation around the axis on the given angle.
3342
3343             Parameters:
3344                 theBase Base shape to be rotated.
3345                 theAxis Rotation axis.
3346                 theAngle Rotation angle in radians.
3347                 theName Object name; when specified, this parameter is used
3348                         for result publication in the study. Otherwise, if automatic
3349                         publication is switched on, default value is used for result name.
3350
3351             Returns: 
3352                 New GEOM.GEOM_Object, containing the created revolution.
3353             """
3354             # Example: see GEOM_TestAll.py
3355             theAngle,Parameters = ParseParameters(theAngle)
3356             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3357             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3358             anObj.SetParameters(Parameters)
3359             self._autoPublish(anObj, theName, "revolution")
3360             return anObj
3361
3362         ## Create a shape by revolution of the base shape around the axis
3363         #  on the given angle, i.e. all the space, transfixed by the base
3364         #  shape during its rotation around the axis on the given angle in
3365         #  both directions (forward/backward)
3366         #  @param theBase Base shape to be rotated.
3367         #  @param theAxis Rotation axis.
3368         #  @param theAngle Rotation angle in radians.
3369         #  @param theName Object name; when specified, this parameter is used
3370         #         for result publication in the study. Otherwise, if automatic
3371         #         publication is switched on, default value is used for result name.
3372         #
3373         #  @return New GEOM.GEOM_Object, containing the created revolution.
3374         #
3375         #  @ref tui_creation_revolution "Example"
3376         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3377             """
3378             Create a shape by revolution of the base shape around the axis
3379             on the given angle, i.e. all the space, transfixed by the base
3380             shape during its rotation around the axis on the given angle in
3381             both directions (forward/backward).
3382
3383             Parameters:
3384                 theBase Base shape to be rotated.
3385                 theAxis Rotation axis.
3386                 theAngle Rotation angle in radians.
3387                 theName Object name; when specified, this parameter is used
3388                         for result publication in the study. Otherwise, if automatic
3389                         publication is switched on, default value is used for result name.
3390
3391             Returns: 
3392                 New GEOM.GEOM_Object, containing the created revolution.
3393             """
3394             theAngle,Parameters = ParseParameters(theAngle)
3395             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3396             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3397             anObj.SetParameters(Parameters)
3398             self._autoPublish(anObj, theName, "revolution")
3399             return anObj
3400
3401         ## Create a filling from the given compound of contours.
3402         #  @param theShape the compound of contours
3403         #  @param theMinDeg a minimal degree of BSpline surface to create
3404         #  @param theMaxDeg a maximal degree of BSpline surface to create
3405         #  @param theTol2D a 2d tolerance to be reached
3406         #  @param theTol3D a 3d tolerance to be reached
3407         #  @param theNbIter a number of iteration of approximation algorithm
3408         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3409         #  @param isApprox if True, BSpline curves are generated in the process
3410         #                  of surface construction. By default it is False, that means
3411         #                  the surface is created using given curves. The usage of
3412         #                  Approximation makes the algorithm work slower, but allows
3413         #                  building the surface for rather complex cases.
3414         #  @param theName Object name; when specified, this parameter is used
3415         #         for result publication in the study. Otherwise, if automatic
3416         #         publication is switched on, default value is used for result name.
3417         #
3418         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3419         #
3420         #  @ref tui_creation_filling "Example"
3421         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3422                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3423             """
3424             Create a filling from the given compound of contours.
3425
3426             Parameters:
3427                 theShape the compound of contours
3428                 theMinDeg a minimal degree of BSpline surface to create
3429                 theMaxDeg a maximal degree of BSpline surface to create
3430                 theTol2D a 2d tolerance to be reached
3431                 theTol3D a 3d tolerance to be reached
3432                 theNbIter a number of iteration of approximation algorithm
3433                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3434                 isApprox if True, BSpline curves are generated in the process
3435                          of surface construction. By default it is False, that means
3436                          the surface is created using given curves. The usage of
3437                          Approximation makes the algorithm work slower, but allows
3438                          building the surface for rather complex cases
3439                 theName Object name; when specified, this parameter is used
3440                         for result publication in the study. Otherwise, if automatic
3441                         publication is switched on, default value is used for result name.
3442
3443             Returns: 
3444                 New GEOM.GEOM_Object, containing the created filling surface.
3445
3446             Example of usage:
3447                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3448             """
3449             # Example: see GEOM_TestAll.py
3450             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3451             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3452                                             theTol2D, theTol3D, theNbIter,
3453                                             theMethod, isApprox)
3454             RaiseIfFailed("MakeFilling", self.PrimOp)
3455             anObj.SetParameters(Parameters)
3456             self._autoPublish(anObj, theName, "filling")
3457             return anObj
3458
3459
3460         ## Create a filling from the given compound of contours.
3461         #  This method corresponds to MakeFilling with isApprox=True
3462         #  @param theShape the compound of contours
3463         #  @param theMinDeg a minimal degree of BSpline surface to create
3464         #  @param theMaxDeg a maximal degree of BSpline surface to create
3465         #  @param theTol3D a 3d tolerance to be reached
3466         #  @param theName Object name; when specified, this parameter is used
3467         #         for result publication in the study. Otherwise, if automatic
3468         #         publication is switched on, default value is used for result name.
3469         #
3470         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3471         #
3472         #  @ref tui_creation_filling "Example"
3473         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3474             """
3475             Create a filling from the given compound of contours.
3476             This method corresponds to MakeFilling with isApprox=True
3477
3478             Parameters:
3479                 theShape the compound of contours
3480                 theMinDeg a minimal degree of BSpline surface to create
3481                 theMaxDeg a maximal degree of BSpline surface to create
3482                 theTol3D a 3d tolerance to be reached
3483                 theName Object name; when specified, this parameter is used
3484                         for result publication in the study. Otherwise, if automatic
3485                         publication is switched on, default value is used for result name.
3486
3487             Returns: 
3488                 New GEOM.GEOM_Object, containing the created filling surface.
3489
3490             Example of usage:
3491                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3492             """
3493             # Example: see GEOM_TestAll.py
3494             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3495             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3496                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3497             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3498             anObj.SetParameters(Parameters)
3499             self._autoPublish(anObj, theName, "filling")
3500             return anObj
3501
3502         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3503         #  @param theSeqSections - set of specified sections.
3504         #  @param theModeSolid - mode defining building solid or shell
3505         #  @param thePreci - precision 3D used for smoothing
3506         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3507         #  @param theName Object name; when specified, this parameter is used
3508         #         for result publication in the study. Otherwise, if automatic
3509         #         publication is switched on, default value is used for result name.
3510         #
3511         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3512         #
3513         #  @ref swig_todo "Example"
3514         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3515             """
3516             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3517
3518             Parameters:
3519                 theSeqSections - set of specified sections.
3520                 theModeSolid - mode defining building solid or shell
3521                 thePreci - precision 3D used for smoothing
3522                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
3523                 theName Object name; when specified, this parameter is used
3524                         for result publication in the study. Otherwise, if automatic
3525                         publication is switched on, default value is used for result name.
3526
3527             Returns:
3528                 New GEOM.GEOM_Object, containing the created shell or solid.
3529             """
3530             # Example: see GEOM_TestAll.py
3531             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3532             RaiseIfFailed("MakeThruSections", self.PrimOp)
3533             self._autoPublish(anObj, theName, "filling")
3534             return anObj
3535
3536         ## Create a shape by extrusion of the base shape along
3537         #  the path shape. The path shape can be a wire or an edge.
3538         #  @param theBase Base shape to be extruded.
3539         #  @param thePath Path shape to extrude the base shape along it.
3540         #  @param theName Object name; when specified, this parameter is used
3541         #         for result publication in the study. Otherwise, if automatic
3542         #         publication is switched on, default value is used for result name.
3543         #
3544         #  @return New GEOM.GEOM_Object, containing the created pipe.
3545         #
3546         #  @ref tui_creation_pipe "Example"
3547         def MakePipe(self, theBase, thePath, theName=None):
3548             """
3549             Create a shape by extrusion of the base shape along
3550             the path shape. The path shape can be a wire or an edge.
3551
3552             Parameters:
3553                 theBase Base shape to be extruded.
3554                 thePath Path shape to extrude the base shape along it.
3555                 theName Object name; when specified, this parameter is used
3556                         for result publication in the study. Otherwise, if automatic
3557                         publication is switched on, default value is used for result name.
3558
3559             Returns:
3560                 New GEOM.GEOM_Object, containing the created pipe.
3561             """
3562             # Example: see GEOM_TestAll.py
3563             anObj = self.PrimOp.MakePipe(theBase, thePath)
3564             RaiseIfFailed("MakePipe", self.PrimOp)
3565             self._autoPublish(anObj, theName, "pipe")
3566             return anObj
3567
3568         ## Create a shape by extrusion of the profile shape along
3569         #  the path shape. The path shape can be a wire or an edge.
3570         #  the several profiles can be specified in the several locations of path.
3571         #  @param theSeqBases - list of  Bases shape to be extruded.
3572         #  @param theLocations - list of locations on the path corresponding
3573         #                        specified list of the Bases shapes. Number of locations
3574         #                        should be equal to number of bases or list of locations can be empty.
3575         #  @param thePath - Path shape to extrude the base shape along it.
3576         #  @param theWithContact - the mode defining that the section is translated to be in
3577         #                          contact with the spine.
3578         #  @param theWithCorrection - defining that the section is rotated to be
3579         #                             orthogonal to the spine tangent in the correspondent point
3580         #  @param theName Object name; when specified, this parameter is used
3581         #         for result publication in the study. Otherwise, if automatic
3582         #         publication is switched on, default value is used for result name.
3583         #
3584         #  @return New GEOM.GEOM_Object, containing the created pipe.
3585         #
3586         #  @ref tui_creation_pipe_with_diff_sec "Example"
3587         def MakePipeWithDifferentSections(self, theSeqBases,
3588                                           theLocations, thePath,
3589                                           theWithContact, theWithCorrection, theName=None):
3590             """
3591             Create a shape by extrusion of the profile shape along
3592             the path shape. The path shape can be a wire or an edge.
3593             the several profiles can be specified in the several locations of path.
3594
3595             Parameters:
3596                 theSeqBases - list of  Bases shape to be extruded.
3597                 theLocations - list of locations on the path corresponding
3598                                specified list of the Bases shapes. Number of locations
3599                                should be equal to number of bases or list of locations can be empty.
3600                 thePath - Path shape to extrude the base shape along it.
3601                 theWithContact - the mode defining that the section is translated to be in
3602                                  contact with the spine(0/1)
3603                 theWithCorrection - defining that the section is rotated to be
3604                                     orthogonal to the spine tangent in the correspondent point (0/1)
3605                 theName Object name; when specified, this parameter is used
3606                         for result publication in the study. Otherwise, if automatic
3607                         publication is switched on, default value is used for result name.
3608
3609             Returns:
3610                 New GEOM.GEOM_Object, containing the created pipe.
3611             """
3612             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3613                                                               theLocations, thePath,
3614                                                               theWithContact, theWithCorrection)
3615             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3616             self._autoPublish(anObj, theName, "pipe")
3617             return anObj
3618
3619         ## Create a shape by extrusion of the profile shape along
3620         #  the path shape. The path shape can be a wire or a edge.
3621         #  the several profiles can be specified in the several locations of path.
3622         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3623         #                       shell or face. If number of faces in neighbour sections
3624         #                       aren't coincided result solid between such sections will
3625         #                       be created using external boundaries of this shells.
3626         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3627         #                          This list is used for searching correspondences between
3628         #                          faces in the sections. Size of this list must be equal
3629         #                          to size of list of base shapes.
3630         #  @param theLocations - list of locations on the path corresponding
3631         #                        specified list of the Bases shapes. Number of locations
3632         #                        should be equal to number of bases. First and last
3633         #                        locations must be coincided with first and last vertexes
3634         #                        of path correspondingly.
3635         #  @param thePath - Path shape to extrude the base shape along it.
3636         #  @param theWithContact - the mode defining that the section is translated to be in
3637         #                          contact with the spine.
3638         #  @param theWithCorrection - defining that the section is rotated to be
3639         #                             orthogonal to the spine tangent in the correspondent point
3640         #  @param theName Object name; when specified, this parameter is used
3641         #         for result publication in the study. Otherwise, if automatic
3642         #         publication is switched on, default value is used for result name.
3643         #
3644         #  @return New GEOM.GEOM_Object, containing the created solids.
3645         #
3646         #  @ref tui_creation_pipe_with_shell_sec "Example"
3647         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3648                                       theLocations, thePath,
3649                                       theWithContact, theWithCorrection, theName=None):
3650             """
3651             Create a shape by extrusion of the profile shape along
3652             the path shape. The path shape can be a wire or a edge.
3653             the several profiles can be specified in the several locations of path.
3654
3655             Parameters:
3656                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3657                               shell or face. If number of faces in neighbour sections
3658                               aren't coincided result solid between such sections will
3659                               be created using external boundaries of this shells.
3660                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3661                                  This list is used for searching correspondences between
3662                                  faces in the sections. Size of this list must be equal
3663                                  to size of list of base shapes.
3664                 theLocations - list of locations on the path corresponding
3665                                specified list of the Bases shapes. Number of locations
3666                                should be equal to number of bases. First and last
3667                                locations must be coincided with first and last vertexes
3668                                of path correspondingly.
3669                 thePath - Path shape to extrude the base shape along it.
3670                 theWithContact - the mode defining that the section is translated to be in
3671                                  contact with the spine (0/1)
3672                 theWithCorrection - defining that the section is rotated to be
3673                                     orthogonal to the spine tangent in the correspondent point (0/1)
3674                 theName Object name; when specified, this parameter is used
3675                         for result publication in the study. Otherwise, if automatic
3676                         publication is switched on, default value is used for result name.
3677
3678             Returns:                           
3679                 New GEOM.GEOM_Object, containing the created solids.
3680             """
3681             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3682                                                           theLocations, thePath,
3683                                                           theWithContact, theWithCorrection)
3684             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3685             self._autoPublish(anObj, theName, "pipe")
3686             return anObj
3687
3688         ## Create a shape by extrusion of the profile shape along
3689         #  the path shape. This function is used only for debug pipe
3690         #  functionality - it is a version of function MakePipeWithShellSections()
3691         #  which give a possibility to recieve information about
3692         #  creating pipe between each pair of sections step by step.
3693         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3694                                              theLocations, thePath,
3695                                              theWithContact, theWithCorrection, theName=None):
3696             """
3697             Create a shape by extrusion of the profile shape along
3698             the path shape. This function is used only for debug pipe
3699             functionality - it is a version of previous function
3700             geompy.MakePipeWithShellSections() which give a possibility to
3701             recieve information about creating pipe between each pair of
3702             sections step by step.
3703             """
3704             res = []
3705             nbsect = len(theSeqBases)
3706             nbsubsect = len(theSeqSubBases)
3707             #print "nbsect = ",nbsect
3708             for i in range(1,nbsect):
3709                 #print "  i = ",i
3710                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3711                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3712                 tmpSeqSubBases = []
3713                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3714                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3715                                                               tmpLocations, thePath,
3716                                                               theWithContact, theWithCorrection)
3717                 if self.PrimOp.IsDone() == 0:
3718                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3719                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3720                     break
3721                 else:
3722                     print "Pipe between ",i," and ",i+1," sections is OK"
3723                     res.append(anObj)
3724                     pass
3725                 pass
3726
3727             resc = self.MakeCompound(res)
3728             #resc = self.MakeSewing(res, 0.001)
3729             #print "resc: ",resc
3730             self._autoPublish(resc, theName, "pipe")
3731             return resc
3732
3733         ## Create solids between given sections
3734         #  @param theSeqBases - list of sections (shell or face).
3735         #  @param theLocations - list of corresponding vertexes
3736         #  @param theName Object name; when specified, this parameter is used
3737         #         for result publication in the study. Otherwise, if automatic
3738         #         publication is switched on, default value is used for result name.
3739         #
3740         #  @return New GEOM.GEOM_Object, containing the created solids.
3741         #
3742         #  @ref tui_creation_pipe_without_path "Example"
3743         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3744             """
3745             Create solids between given sections
3746
3747             Parameters:
3748                 theSeqBases - list of sections (shell or face).
3749                 theLocations - list of corresponding vertexes
3750                 theName Object name; when specified, this parameter is used
3751                         for result publication in the study. Otherwise, if automatic
3752                         publication is switched on, default value is used for result name.
3753
3754             Returns:
3755                 New GEOM.GEOM_Object, containing the created solids.
3756             """
3757             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3758             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3759             self._autoPublish(anObj, theName, "pipe")
3760             return anObj
3761
3762         ## Create a shape by extrusion of the base shape along
3763         #  the path shape with constant bi-normal direction along the given vector.
3764         #  The path shape can be a wire or an edge.
3765         #  @param theBase Base shape to be extruded.
3766         #  @param thePath Path shape to extrude the base shape along it.
3767         #  @param theVec Vector defines a constant binormal direction to keep the
3768         #                same angle beetween the direction and the sections
3769         #                along the sweep surface.
3770         #  @param theName Object name; when specified, this parameter is used
3771         #         for result publication in the study. Otherwise, if automatic
3772         #         publication is switched on, default value is used for result name.
3773         #
3774         #  @return New GEOM.GEOM_Object, containing the created pipe.
3775         #
3776         #  @ref tui_creation_pipe "Example"
3777         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
3778             """
3779             Create a shape by extrusion of the base shape along
3780             the path shape with constant bi-normal direction along the given vector.
3781             The path shape can be a wire or an edge.
3782
3783             Parameters:
3784                 theBase Base shape to be extruded.
3785                 thePath Path shape to extrude the base shape along it.
3786                 theVec Vector defines a constant binormal direction to keep the
3787                        same angle beetween the direction and the sections
3788                        along the sweep surface.
3789                 theName Object name; when specified, this parameter is used
3790                         for result publication in the study. Otherwise, if automatic
3791                         publication is switched on, default value is used for result name.
3792
3793             Returns:              
3794                 New GEOM.GEOM_Object, containing the created pipe.
3795             """
3796             # Example: see GEOM_TestAll.py
3797             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
3798             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
3799             self._autoPublish(anObj, theName, "pipe")
3800             return anObj
3801               
3802         ## Makes a thick solid from a face or a shell
3803         #  @param theShape Face or Shell to be thicken
3804         #  @param theThickness Thickness of the resulting solid
3805         #  @param theName Object name; when specified, this parameter is used
3806         #         for result publication in the study. Otherwise, if automatic
3807         #         publication is switched on, default value is used for result name.
3808         #
3809         #  @return New GEOM.GEOM_Object, containing the created solid
3810         #
3811         def MakeThickSolid(self, theShape, theThickness, theName=None):
3812             """
3813             Make a thick solid from a face or a shell
3814
3815             Parameters:
3816                  theShape Face or Shell to be thicken
3817                  theThickness Thickness of the resulting solid
3818                  theName Object name; when specified, this parameter is used
3819                  for result publication in the study. Otherwise, if automatic
3820                  publication is switched on, default value is used for result name.
3821                  
3822             Returns:
3823                 New GEOM.GEOM_Object, containing the created solid
3824             """
3825             # Example: see GEOM_TestAll.py
3826             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
3827             RaiseIfFailed("MakeThickening", self.PrimOp)
3828             self._autoPublish(anObj, theName, "pipe")
3829             return anObj
3830             
3831
3832         ## Modifies a face or a shell to make it a thick solid
3833         #  @param theShape Face or Shell to be thicken
3834         #  @param theThickness Thickness of the resulting solid
3835         #
3836         #  @return The modified shape
3837         #
3838         def Thicken(self, theShape, theThickness):
3839             """
3840             Modifies a face or a shell to make it a thick solid
3841
3842             Parameters:
3843                 theBase Base shape to be extruded.
3844                 thePath Path shape to extrude the base shape along it.
3845                 theName Object name; when specified, this parameter is used
3846                         for result publication in the study. Otherwise, if automatic
3847                         publication is switched on, default value is used for result name.
3848
3849             Returns:
3850                 The modified shape
3851             """
3852             # Example: see GEOM_TestAll.py
3853             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
3854             RaiseIfFailed("MakeThickening", self.PrimOp)
3855             return anObj
3856
3857         ## Build a middle path of a pipe-like shape.
3858         #  The path shape can be a wire or an edge.
3859         #  @param theShape It can be closed or unclosed pipe-like shell
3860         #                  or a pipe-like solid.
3861         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
3862         #                            should be wires or faces of theShape.
3863         #  @param theName Object name; when specified, this parameter is used
3864         #         for result publication in the study. Otherwise, if automatic
3865         #         publication is switched on, default value is used for result name.
3866         #
3867         #  @note It is not assumed that exact or approximate copy of theShape
3868         #        can be obtained by applying existing Pipe operation on the
3869         #        resulting "Path" wire taking theBase1 as the base - it is not
3870         #        always possible; though in some particular cases it might work
3871         #        it is not guaranteed. Thus, RestorePath function should not be
3872         #        considered as an exact reverse operation of the Pipe.
3873         #
3874         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3875         #                                source pipe's "path".
3876         #
3877         #  @ref tui_creation_pipe_path "Example"
3878         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
3879             """
3880             Build a middle path of a pipe-like shape.
3881             The path shape can be a wire or an edge.
3882
3883             Parameters:
3884                 theShape It can be closed or unclosed pipe-like shell
3885                          or a pipe-like solid.
3886                 theBase1, theBase2 Two bases of the supposed pipe. This
3887                                    should be wires or faces of theShape.
3888                 theName Object name; when specified, this parameter is used
3889                         for result publication in the study. Otherwise, if automatic
3890                         publication is switched on, default value is used for result name.
3891
3892             Returns:
3893                 New GEOM_Object, containing an edge or wire that represent
3894                                  source pipe's path.
3895             """
3896             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
3897             RaiseIfFailed("RestorePath", self.PrimOp)
3898             self._autoPublish(anObj, theName, "path")
3899             return anObj
3900
3901         ## Build a middle path of a pipe-like shape.
3902         #  The path shape can be a wire or an edge.
3903         #  @param theShape It can be closed or unclosed pipe-like shell
3904         #                  or a pipe-like solid.
3905         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
3906         #                                should be lists of edges of theShape.
3907         #  @param theName Object name; when specified, this parameter is used
3908         #         for result publication in the study. Otherwise, if automatic
3909         #         publication is switched on, default value is used for result name.
3910         #
3911         #  @note It is not assumed that exact or approximate copy of theShape
3912         #        can be obtained by applying existing Pipe operation on the
3913         #        resulting "Path" wire taking theBase1 as the base - it is not
3914         #        always possible; though in some particular cases it might work
3915         #        it is not guaranteed. Thus, RestorePath function should not be
3916         #        considered as an exact reverse operation of the Pipe.
3917         #
3918         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
3919         #                                source pipe's "path".
3920         #
3921         #  @ref tui_creation_pipe_path "Example"
3922         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
3923             """
3924             Build a middle path of a pipe-like shape.
3925             The path shape can be a wire or an edge.
3926
3927             Parameters:
3928                 theShape It can be closed or unclosed pipe-like shell
3929                          or a pipe-like solid.
3930                 listEdges1, listEdges2 Two bases of the supposed pipe. This
3931                                        should be lists of edges of theShape.
3932                 theName Object name; when specified, this parameter is used
3933                         for result publication in the study. Otherwise, if automatic
3934                         publication is switched on, default value is used for result name.
3935
3936             Returns:
3937                 New GEOM_Object, containing an edge or wire that represent
3938                                  source pipe's path.
3939             """
3940             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
3941             RaiseIfFailed("RestorePath", self.PrimOp)
3942             self._autoPublish(anObj, theName, "path")
3943             return anObj
3944
3945         # end of l3_complex
3946         ## @}
3947
3948         ## @addtogroup l3_advanced
3949         ## @{
3950
3951         ## Create a linear edge with specified ends.
3952         #  @param thePnt1 Point for the first end of edge.
3953         #  @param thePnt2 Point for the second end of edge.
3954         #  @param theName Object name; when specified, this parameter is used
3955         #         for result publication in the study. Otherwise, if automatic
3956         #         publication is switched on, default value is used for result name.
3957         #
3958         #  @return New GEOM.GEOM_Object, containing the created edge.
3959         #
3960         #  @ref tui_creation_edge "Example"
3961         def MakeEdge(self, thePnt1, thePnt2, theName=None):
3962             """
3963             Create a linear edge with specified ends.
3964
3965             Parameters:
3966                 thePnt1 Point for the first end of edge.
3967                 thePnt2 Point for the second end of edge.
3968                 theName Object name; when specified, this parameter is used
3969                         for result publication in the study. Otherwise, if automatic
3970                         publication is switched on, default value is used for result name.
3971
3972             Returns:           
3973                 New GEOM.GEOM_Object, containing the created edge.
3974             """
3975             # Example: see GEOM_TestAll.py
3976             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
3977             RaiseIfFailed("MakeEdge", self.ShapesOp)
3978             self._autoPublish(anObj, theName, "edge")
3979             return anObj
3980
3981         ## Create a new edge, corresponding to the given length on the given curve.
3982         #  @param theRefCurve The referenced curve (edge).
3983         #  @param theLength Length on the referenced curve. It can be negative.
3984         #  @param theStartPoint Any point can be selected for it, the new edge will begin
3985         #                       at the end of \a theRefCurve, close to the selected point.
3986         #                       If None, start from the first point of \a theRefCurve.
3987         #  @param theName Object name; when specified, this parameter is used
3988         #         for result publication in the study. Otherwise, if automatic
3989         #         publication is switched on, default value is used for result name.
3990         #
3991         #  @return New GEOM.GEOM_Object, containing the created edge.
3992         #
3993         #  @ref tui_creation_edge "Example"
3994         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
3995             """
3996             Create a new edge, corresponding to the given length on the given curve.
3997
3998             Parameters:
3999                 theRefCurve The referenced curve (edge).
4000                 theLength Length on the referenced curve. It can be negative.
4001                 theStartPoint Any point can be selected for it, the new edge will begin
4002                               at the end of theRefCurve, close to the selected point.
4003                               If None, start from the first point of theRefCurve.
4004                 theName Object name; when specified, this parameter is used
4005                         for result publication in the study. Otherwise, if automatic
4006                         publication is switched on, default value is used for result name.
4007
4008             Returns:              
4009                 New GEOM.GEOM_Object, containing the created edge.
4010             """
4011             # Example: see GEOM_TestAll.py
4012             theLength, Parameters = ParseParameters(theLength)
4013             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4014             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4015             anObj.SetParameters(Parameters)
4016             self._autoPublish(anObj, theName, "edge")
4017             return anObj
4018
4019         ## Create an edge from specified wire.
4020         #  @param theWire source Wire
4021         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4022         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4023         #  @param theName Object name; when specified, this parameter is used
4024         #         for result publication in the study. Otherwise, if automatic
4025         #         publication is switched on, default value is used for result name.
4026         #
4027         #  @return New GEOM.GEOM_Object, containing the created edge.
4028         #
4029         #  @ref tui_creation_edge "Example"
4030         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4031             """
4032             Create an edge from specified wire.
4033
4034             Parameters:
4035                 theWire source Wire
4036                 theLinearTolerance linear tolerance value (default = 1e-07)
4037                 theAngularTolerance angular tolerance value (default = 1e-12)
4038                 theName Object name; when specified, this parameter is used
4039                         for result publication in the study. Otherwise, if automatic
4040                         publication is switched on, default value is used for result name.
4041
4042             Returns:
4043                 New GEOM.GEOM_Object, containing the created edge.
4044             """
4045             # Example: see GEOM_TestAll.py
4046             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4047             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4048             self._autoPublish(anObj, theName, "edge")
4049             return anObj
4050
4051         ## Create a wire from the set of edges and wires.
4052         #  @param theEdgesAndWires List of edges and/or wires.
4053         #  @param theTolerance Maximum distance between vertices, that will be merged.
4054         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4055         #  @param theName Object name; when specified, this parameter is used
4056         #         for result publication in the study. Otherwise, if automatic
4057         #         publication is switched on, default value is used for result name.
4058         #
4059         #  @return New GEOM.GEOM_Object, containing the created wire.
4060         #
4061         #  @ref tui_creation_wire "Example"
4062         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4063             """
4064             Create a wire from the set of edges and wires.
4065
4066             Parameters:
4067                 theEdgesAndWires List of edges and/or wires.
4068                 theTolerance Maximum distance between vertices, that will be merged.
4069                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4070                 theName Object name; when specified, this parameter is used
4071                         for result publication in the study. Otherwise, if automatic
4072                         publication is switched on, default value is used for result name.
4073
4074             Returns:                    
4075                 New GEOM.GEOM_Object, containing the created wire.
4076             """
4077             # Example: see GEOM_TestAll.py
4078             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4079             RaiseIfFailed("MakeWire", self.ShapesOp)
4080             self._autoPublish(anObj, theName, "wire")
4081             return anObj
4082
4083         ## Create a face on the given wire.
4084         #  @param theWire closed Wire or Edge to build the face on.
4085         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4086         #                        If the tolerance of the obtained planar face is less
4087         #                        than 1e-06, this face will be returned, otherwise the
4088         #                        algorithm tries to build any suitable face on the given
4089         #                        wire and prints a warning message.
4090         #  @param theName Object name; when specified, this parameter is used
4091         #         for result publication in the study. Otherwise, if automatic
4092         #         publication is switched on, default value is used for result name.
4093         #
4094         #  @return New GEOM.GEOM_Object, containing the created face.
4095         #
4096         #  @ref tui_creation_face "Example"
4097         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4098             """
4099             Create a face on the given wire.
4100
4101             Parameters:
4102                 theWire closed Wire or Edge to build the face on.
4103                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4104                                If the tolerance of the obtained planar face is less
4105                                than 1e-06, this face will be returned, otherwise the
4106                                algorithm tries to build any suitable face on the given
4107                                wire and prints a warning message.
4108                 theName Object name; when specified, this parameter is used
4109                         for result publication in the study. Otherwise, if automatic
4110                         publication is switched on, default value is used for result name.
4111
4112             Returns:
4113                 New GEOM.GEOM_Object, containing the created face.
4114             """
4115             # Example: see GEOM_TestAll.py
4116             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4117             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4118                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4119             else:
4120                 RaiseIfFailed("MakeFace", self.ShapesOp)
4121             self._autoPublish(anObj, theName, "face")
4122             return anObj
4123
4124         ## Create a face on the given wires set.
4125         #  @param theWires List of closed wires or edges to build the face on.
4126         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4127         #                        If the tolerance of the obtained planar face is less
4128         #                        than 1e-06, this face will be returned, otherwise the
4129         #                        algorithm tries to build any suitable face on the given
4130         #                        wire and prints a warning message.
4131         #  @param theName Object name; when specified, this parameter is used
4132         #         for result publication in the study. Otherwise, if automatic
4133         #         publication is switched on, default value is used for result name.
4134         #
4135         #  @return New GEOM.GEOM_Object, containing the created face.
4136         #
4137         #  @ref tui_creation_face "Example"
4138         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4139             """
4140             Create a face on the given wires set.
4141
4142             Parameters:
4143                 theWires List of closed wires or edges to build the face on.
4144                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4145                                If the tolerance of the obtained planar face is less
4146                                than 1e-06, this face will be returned, otherwise the
4147                                algorithm tries to build any suitable face on the given
4148                                wire and prints a warning message.
4149                 theName Object name; when specified, this parameter is used
4150                         for result publication in the study. Otherwise, if automatic
4151                         publication is switched on, default value is used for result name.
4152
4153             Returns: 
4154                 New GEOM.GEOM_Object, containing the created face.
4155             """
4156             # Example: see GEOM_TestAll.py
4157             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4158             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4159                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4160             else:
4161                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4162             self._autoPublish(anObj, theName, "face")
4163             return anObj
4164
4165         ## See MakeFaceWires() method for details.
4166         #
4167         #  @ref tui_creation_face "Example 1"
4168         #  \n @ref swig_MakeFaces  "Example 2"
4169         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4170             """
4171             See geompy.MakeFaceWires() method for details.
4172             """
4173             # Example: see GEOM_TestOthers.py
4174             # note: auto-publishing is done in self.MakeFaceWires()
4175             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4176             return anObj
4177
4178         ## Create a shell from the set of faces and shells.
4179         #  @param theFacesAndShells List of faces and/or shells.
4180         #  @param theName Object name; when specified, this parameter is used
4181         #         for result publication in the study. Otherwise, if automatic
4182         #         publication is switched on, default value is used for result name.
4183         #
4184         #  @return New GEOM.GEOM_Object, containing the created shell.
4185         #
4186         #  @ref tui_creation_shell "Example"
4187         def MakeShell(self, theFacesAndShells, theName=None):
4188             """
4189             Create a shell from the set of faces and shells.
4190
4191             Parameters:
4192                 theFacesAndShells List of faces and/or shells.
4193                 theName Object name; when specified, this parameter is used
4194                         for result publication in the study. Otherwise, if automatic
4195                         publication is switched on, default value is used for result name.
4196
4197             Returns:
4198                 New GEOM.GEOM_Object, containing the created shell.
4199             """
4200             # Example: see GEOM_TestAll.py
4201             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4202             RaiseIfFailed("MakeShell", self.ShapesOp)
4203             self._autoPublish(anObj, theName, "shell")
4204             return anObj
4205
4206         ## Create a solid, bounded by the given shells.
4207         #  @param theShells Sequence of bounding shells.
4208         #  @param theName Object name; when specified, this parameter is used
4209         #         for result publication in the study. Otherwise, if automatic
4210         #         publication is switched on, default value is used for result name.
4211         #
4212         #  @return New GEOM.GEOM_Object, containing the created solid.
4213         #
4214         #  @ref tui_creation_solid "Example"
4215         def MakeSolid(self, theShells, theName=None):
4216             """
4217             Create a solid, bounded by the given shells.
4218
4219             Parameters:
4220                 theShells Sequence of bounding shells.
4221                 theName Object name; when specified, this parameter is used
4222                         for result publication in the study. Otherwise, if automatic
4223                         publication is switched on, default value is used for result name.
4224
4225             Returns:
4226                 New GEOM.GEOM_Object, containing the created solid.
4227             """
4228             # Example: see GEOM_TestAll.py
4229             if len(theShells) == 1:
4230                 descr = self.MeasuOp.IsGoodForSolid(theShells[0])
4231                 #if len(descr) > 0:
4232                 #    raise RuntimeError, "MakeSolidShells : " + descr
4233                 if descr == "WRN_SHAPE_UNCLOSED":
4234                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4235             anObj = self.ShapesOp.MakeSolidShells(theShells)
4236             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4237             self._autoPublish(anObj, theName, "solid")
4238             return anObj
4239
4240         ## Create a compound of the given shapes.
4241         #  @param theShapes List of shapes to put in compound.
4242         #  @param theName Object name; when specified, this parameter is used
4243         #         for result publication in the study. Otherwise, if automatic
4244         #         publication is switched on, default value is used for result name.
4245         #
4246         #  @return New GEOM.GEOM_Object, containing the created compound.
4247         #
4248         #  @ref tui_creation_compound "Example"
4249         def MakeCompound(self, theShapes, theName=None):
4250             """
4251             Create a compound of the given shapes.
4252
4253             Parameters:
4254                 theShapes List of shapes to put in compound.
4255                 theName Object name; when specified, this parameter is used
4256                         for result publication in the study. Otherwise, if automatic
4257                         publication is switched on, default value is used for result name.
4258
4259             Returns:
4260                 New GEOM.GEOM_Object, containing the created compound.
4261             """
4262             # Example: see GEOM_TestAll.py
4263             anObj = self.ShapesOp.MakeCompound(theShapes)
4264             RaiseIfFailed("MakeCompound", self.ShapesOp)
4265             self._autoPublish(anObj, theName, "compound")
4266             return anObj
4267
4268         # end of l3_advanced
4269         ## @}
4270
4271         ## @addtogroup l2_measure
4272         ## @{
4273
4274         ## Gives quantity of faces in the given shape.
4275         #  @param theShape Shape to count faces of.
4276         #  @return Quantity of faces.
4277         #
4278         #  @ref swig_NumberOf "Example"
4279         def NumberOfFaces(self, theShape):
4280             """
4281             Gives quantity of faces in the given shape.
4282
4283             Parameters:
4284                 theShape Shape to count faces of.
4285
4286             Returns:    
4287                 Quantity of faces.
4288             """
4289             # Example: see GEOM_TestOthers.py
4290             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4291             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4292             return nb_faces
4293
4294         ## Gives quantity of edges in the given shape.
4295         #  @param theShape Shape to count edges of.
4296         #  @return Quantity of edges.
4297         #
4298         #  @ref swig_NumberOf "Example"
4299         def NumberOfEdges(self, theShape):
4300             """
4301             Gives quantity of edges in the given shape.
4302
4303             Parameters:
4304                 theShape Shape to count edges of.
4305
4306             Returns:    
4307                 Quantity of edges.
4308             """
4309             # Example: see GEOM_TestOthers.py
4310             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4311             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4312             return nb_edges
4313
4314         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4315         #  @param theShape Shape to count sub-shapes of.
4316         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4317         #  @return Quantity of sub-shapes of given type.
4318         #
4319         #  @ref swig_NumberOf "Example"
4320         def NumberOfSubShapes(self, theShape, theShapeType):
4321             """
4322             Gives quantity of sub-shapes of type theShapeType in the given shape.
4323
4324             Parameters:
4325                 theShape Shape to count sub-shapes of.
4326                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4327
4328             Returns:
4329                 Quantity of sub-shapes of given type.
4330             """
4331             # Example: see GEOM_TestOthers.py
4332             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4333             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4334             return nb_ss
4335
4336         ## Gives quantity of solids in the given shape.
4337         #  @param theShape Shape to count solids in.
4338         #  @return Quantity of solids.
4339         #
4340         #  @ref swig_NumberOf "Example"
4341         def NumberOfSolids(self, theShape):
4342             """
4343             Gives quantity of solids in the given shape.
4344
4345             Parameters:
4346                 theShape Shape to count solids in.
4347
4348             Returns:
4349                 Quantity of solids.
4350             """
4351             # Example: see GEOM_TestOthers.py
4352             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4353             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4354             return nb_solids
4355
4356         # end of l2_measure
4357         ## @}
4358
4359         ## @addtogroup l3_healing
4360         ## @{
4361
4362         ## Reverses an orientation the given shape.
4363         #  @param theShape Shape to be reversed.
4364         #  @param theName Object name; when specified, this parameter is used
4365         #         for result publication in the study. Otherwise, if automatic
4366         #         publication is switched on, default value is used for result name.
4367         #
4368         #  @return The reversed copy of theShape.
4369         #
4370         #  @ref swig_ChangeOrientation "Example"
4371         def ChangeOrientation(self, theShape, theName=None):
4372             """
4373             Reverses an orientation the given shape.
4374
4375             Parameters:
4376                 theShape Shape to be reversed.
4377                 theName Object name; when specified, this parameter is used
4378                         for result publication in the study. Otherwise, if automatic
4379                         publication is switched on, default value is used for result name.
4380
4381             Returns:   
4382                 The reversed copy of theShape.
4383             """
4384             # Example: see GEOM_TestAll.py
4385             anObj = self.ShapesOp.ChangeOrientation(theShape)
4386             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4387             self._autoPublish(anObj, theName, "reversed")
4388             return anObj
4389
4390         ## See ChangeOrientation() method for details.
4391         #
4392         #  @ref swig_OrientationChange "Example"
4393         def OrientationChange(self, theShape, theName=None):
4394             """
4395             See geompy.ChangeOrientation method for details.
4396             """
4397             # Example: see GEOM_TestOthers.py
4398             # note: auto-publishing is done in self.ChangeOrientation()
4399             anObj = self.ChangeOrientation(theShape, theName)
4400             return anObj
4401
4402         # end of l3_healing
4403         ## @}
4404
4405         ## @addtogroup l4_obtain
4406         ## @{
4407
4408         ## Retrieve all free faces from the given shape.
4409         #  Free face is a face, which is not shared between two shells of the shape.
4410         #  @param theShape Shape to find free faces in.
4411         #  @return List of IDs of all free faces, contained in theShape.
4412         #
4413         #  @ref tui_measurement_tools_page "Example"
4414         def GetFreeFacesIDs(self,theShape):
4415             """
4416             Retrieve all free faces from the given shape.
4417             Free face is a face, which is not shared between two shells of the shape.
4418
4419             Parameters:
4420                 theShape Shape to find free faces in.
4421
4422             Returns:
4423                 List of IDs of all free faces, contained in theShape.
4424             """
4425             # Example: see GEOM_TestOthers.py
4426             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4427             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4428             return anIDs
4429
4430         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4431         #  @param theShape1 Shape to find sub-shapes in.
4432         #  @param theShape2 Shape to find shared sub-shapes with.
4433         #  @param theShapeType Type of sub-shapes to be retrieved.
4434         #  @param theName Object name; when specified, this parameter is used
4435         #         for result publication in the study. Otherwise, if automatic
4436         #         publication is switched on, default value is used for result name.
4437         #
4438         #  @return List of sub-shapes of theShape1, shared with theShape2.
4439         #
4440         #  @ref swig_GetSharedShapes "Example"
4441         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4442             """
4443             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4444
4445             Parameters:
4446                 theShape1 Shape to find sub-shapes in.
4447                 theShape2 Shape to find shared sub-shapes with.
4448                 theShapeType Type of sub-shapes to be retrieved.
4449                 theName Object name; when specified, this parameter is used
4450                         for result publication in the study. Otherwise, if automatic
4451                         publication is switched on, default value is used for result name.
4452
4453             Returns:
4454                 List of sub-shapes of theShape1, shared with theShape2.
4455             """
4456             # Example: see GEOM_TestOthers.py
4457             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4458             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4459             self._autoPublish(aList, theName, "shared")
4460             return aList
4461
4462         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4463         #  @param theShapes Shapes to find common sub-shapes of.
4464         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4465         #  @param theName Object name; when specified, this parameter is used
4466         #         for result publication in the study. Otherwise, if automatic
4467         #         publication is switched on, default value is used for result name.
4468         #
4469         #  @return List of objects, that are sub-shapes of all given shapes.
4470         #
4471         #  @ref swig_GetSharedShapes "Example"
4472         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4473             """
4474             Get all sub-shapes, shared by all shapes in the list theShapes.
4475
4476             Parameters:
4477                 theShapes Shapes to find common sub-shapes of.
4478                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4479                 theName Object name; when specified, this parameter is used
4480                         for result publication in the study. Otherwise, if automatic
4481                         publication is switched on, default value is used for result name.
4482
4483             Returns:    
4484                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4485             """
4486             # Example: see GEOM_TestOthers.py
4487             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4488             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4489             self._autoPublish(aList, theName, "shared")
4490             return aList
4491
4492         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4493         #  situated relatively the specified plane by the certain way,
4494         #  defined through <VAR>theState</VAR> parameter.
4495         #  @param theShape Shape to find sub-shapes of.
4496         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4497         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4498         #                direction and location of the plane to find shapes on.
4499         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4500         #  @param theName Object name; when specified, this parameter is used
4501         #         for result publication in the study. Otherwise, if automatic
4502         #         publication is switched on, default value is used for result name.
4503         #
4504         #  @return List of all found sub-shapes.
4505         #
4506         #  @ref swig_GetShapesOnPlane "Example"
4507         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4508             """
4509             Find in theShape all sub-shapes of type theShapeType,
4510             situated relatively the specified plane by the certain way,
4511             defined through theState parameter.
4512
4513             Parameters:
4514                 theShape Shape to find sub-shapes of.
4515                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4516                 theAx1 Vector (or line, or linear edge), specifying normal
4517                        direction and location of the plane to find shapes on.
4518                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4519                 theName Object name; when specified, this parameter is used
4520                         for result publication in the study. Otherwise, if automatic
4521                         publication is switched on, default value is used for result name.
4522
4523             Returns:
4524                 List of all found sub-shapes.
4525             """
4526             # Example: see GEOM_TestOthers.py
4527             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4528             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4529             self._autoPublish(aList, theName, "shapeOnPlane")
4530             return aList
4531
4532         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4533         #  situated relatively the specified plane by the certain way,
4534         #  defined through <VAR>theState</VAR> parameter.
4535         #  @param theShape Shape to find sub-shapes of.
4536         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4537         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4538         #                direction and location of the plane to find shapes on.
4539         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4540         #
4541         #  @return List of all found sub-shapes indices.
4542         #
4543         #  @ref swig_GetShapesOnPlaneIDs "Example"
4544         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4545             """
4546             Find in theShape all sub-shapes of type theShapeType,
4547             situated relatively the specified plane by the certain way,
4548             defined through theState parameter.
4549
4550             Parameters:
4551                 theShape Shape to find sub-shapes of.
4552                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4553                 theAx1 Vector (or line, or linear edge), specifying normal
4554                        direction and location of the plane to find shapes on.
4555                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4556
4557             Returns:
4558                 List of all found sub-shapes indices.
4559             """
4560             # Example: see GEOM_TestOthers.py
4561             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4562             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4563             return aList
4564
4565         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4566         #  situated relatively the specified plane by the certain way,
4567         #  defined through <VAR>theState</VAR> parameter.
4568         #  @param theShape Shape to find sub-shapes of.
4569         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4570         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4571         #                direction of the plane to find shapes on.
4572         #  @param thePnt Point specifying location of the plane to find shapes on.
4573         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4574         #  @param theName Object name; when specified, this parameter is used
4575         #         for result publication in the study. Otherwise, if automatic
4576         #         publication is switched on, default value is used for result name.
4577         #
4578         #  @return List of all found sub-shapes.
4579         #
4580         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4581         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4582             """
4583             Find in theShape all sub-shapes of type theShapeType,
4584             situated relatively the specified plane by the certain way,
4585             defined through theState parameter.
4586
4587             Parameters:
4588                 theShape Shape to find sub-shapes of.
4589                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4590                 theAx1 Vector (or line, or linear edge), specifying normal
4591                        direction and location of the plane to find shapes on.
4592                 thePnt Point specifying location of the plane to find shapes on.
4593                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4594                 theName Object name; when specified, this parameter is used
4595                         for result publication in the study. Otherwise, if automatic
4596                         publication is switched on, default value is used for result name.
4597
4598             Returns:
4599                 List of all found sub-shapes.
4600             """
4601             # Example: see GEOM_TestOthers.py
4602             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4603                                                                theAx1, thePnt, theState)
4604             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4605             self._autoPublish(aList, theName, "shapeOnPlane")
4606             return aList
4607
4608         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4609         #  situated relatively the specified plane by the certain way,
4610         #  defined through <VAR>theState</VAR> parameter.
4611         #  @param theShape Shape to find sub-shapes of.
4612         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4613         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4614         #                direction of the plane to find shapes on.
4615         #  @param thePnt Point specifying location of the plane to find shapes on.
4616         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4617         #
4618         #  @return List of all found sub-shapes indices.
4619         #
4620         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4621         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4622             """
4623             Find in theShape all sub-shapes of type theShapeType,
4624             situated relatively the specified plane by the certain way,
4625             defined through theState parameter.
4626
4627             Parameters:
4628                 theShape Shape to find sub-shapes of.
4629                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4630                 theAx1 Vector (or line, or linear edge), specifying normal
4631                        direction and location of the plane to find shapes on.
4632                 thePnt Point specifying location of the plane to find shapes on.
4633                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4634
4635             Returns:
4636                 List of all found sub-shapes indices.
4637             """
4638             # Example: see GEOM_TestOthers.py
4639             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4640                                                                   theAx1, thePnt, theState)
4641             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4642             return aList
4643
4644         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4645         #  the specified cylinder by the certain way, defined through \a theState parameter.
4646         #  @param theShape Shape to find sub-shapes of.
4647         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4648         #  @param theAxis Vector (or line, or linear edge), specifying
4649         #                 axis of the cylinder to find shapes on.
4650         #  @param theRadius Radius of the cylinder to find shapes on.
4651         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4652         #  @param theName Object name; when specified, this parameter is used
4653         #         for result publication in the study. Otherwise, if automatic
4654         #         publication is switched on, default value is used for result name.
4655         #
4656         #  @return List of all found sub-shapes.
4657         #
4658         #  @ref swig_GetShapesOnCylinder "Example"
4659         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4660             """
4661             Find in theShape all sub-shapes of type theShapeType, situated relatively
4662             the specified cylinder by the certain way, defined through theState parameter.
4663
4664             Parameters:
4665                 theShape Shape to find sub-shapes of.
4666                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4667                 theAxis Vector (or line, or linear edge), specifying
4668                         axis of the cylinder to find shapes on.
4669                 theRadius Radius of the cylinder to find shapes on.
4670                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4671                 theName Object name; when specified, this parameter is used
4672                         for result publication in the study. Otherwise, if automatic
4673                         publication is switched on, default value is used for result name.
4674
4675             Returns:
4676                 List of all found sub-shapes.
4677             """
4678             # Example: see GEOM_TestOthers.py
4679             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4680             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4681             self._autoPublish(aList, theName, "shapeOnCylinder")
4682             return aList
4683
4684         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4685         #  the specified cylinder by the certain way, defined through \a theState parameter.
4686         #  @param theShape Shape to find sub-shapes of.
4687         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4688         #  @param theAxis Vector (or line, or linear edge), specifying
4689         #                 axis of the cylinder to find shapes on.
4690         #  @param theRadius Radius of the cylinder to find shapes on.
4691         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4692         #
4693         #  @return List of all found sub-shapes indices.
4694         #
4695         #  @ref swig_GetShapesOnCylinderIDs "Example"
4696         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4697             """
4698             Find in theShape all sub-shapes of type theShapeType, situated relatively
4699             the specified cylinder by the certain way, defined through theState parameter.
4700
4701             Parameters:
4702                 theShape Shape to find sub-shapes of.
4703                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4704                 theAxis Vector (or line, or linear edge), specifying
4705                         axis of the cylinder to find shapes on.
4706                 theRadius Radius of the cylinder to find shapes on.
4707                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4708
4709             Returns:
4710                 List of all found sub-shapes indices.
4711             """
4712             # Example: see GEOM_TestOthers.py
4713             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4714             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4715             return aList
4716
4717         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4718         #  the specified cylinder by the certain way, defined through \a theState parameter.
4719         #  @param theShape Shape to find sub-shapes of.
4720         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4721         #  @param theAxis Vector (or line, or linear edge), specifying
4722         #                 axis of the cylinder to find shapes on.
4723         #  @param thePnt Point specifying location of the bottom of the cylinder.
4724         #  @param theRadius Radius of the cylinder to find shapes on.
4725         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4726         #  @param theName Object name; when specified, this parameter is used
4727         #         for result publication in the study. Otherwise, if automatic
4728         #         publication is switched on, default value is used for result name.
4729         #
4730         #  @return List of all found sub-shapes.
4731         #
4732         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4733         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4734             """
4735             Find in theShape all sub-shapes of type theShapeType, situated relatively
4736             the specified cylinder by the certain way, defined through theState parameter.
4737
4738             Parameters:
4739                 theShape Shape to find sub-shapes of.
4740                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4741                 theAxis Vector (or line, or linear edge), specifying
4742                         axis of the cylinder to find shapes on.
4743                 theRadius Radius of the cylinder to find shapes on.
4744                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4745                 theName Object name; when specified, this parameter is used
4746                         for result publication in the study. Otherwise, if automatic
4747                         publication is switched on, default value is used for result name.
4748
4749             Returns:
4750                 List of all found sub-shapes.
4751             """
4752             # Example: see GEOM_TestOthers.py
4753             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4754             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
4755             self._autoPublish(aList, theName, "shapeOnCylinder")
4756             return aList
4757
4758         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4759         #  the specified cylinder by the certain way, defined through \a theState parameter.
4760         #  @param theShape Shape to find sub-shapes of.
4761         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4762         #  @param theAxis Vector (or line, or linear edge), specifying
4763         #                 axis of the cylinder to find shapes on.
4764         #  @param thePnt Point specifying location of the bottom of the cylinder.
4765         #  @param theRadius Radius of the cylinder to find shapes on.
4766         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4767         #
4768         #  @return List of all found sub-shapes indices
4769         #
4770         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
4771         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
4772             """
4773             Find in theShape all sub-shapes of type theShapeType, situated relatively
4774             the specified cylinder by the certain way, defined through theState parameter.
4775
4776             Parameters:
4777                 theShape Shape to find sub-shapes of.
4778                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4779                 theAxis Vector (or line, or linear edge), specifying
4780                         axis of the cylinder to find shapes on.
4781                 theRadius Radius of the cylinder to find shapes on.
4782                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4783
4784             Returns:
4785                 List of all found sub-shapes indices.            
4786             """
4787             # Example: see GEOM_TestOthers.py
4788             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
4789             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
4790             return aList
4791
4792         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4793         #  the specified sphere by the certain way, defined through \a theState parameter.
4794         #  @param theShape Shape to find sub-shapes of.
4795         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4796         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4797         #  @param theRadius Radius of the sphere to find shapes on.
4798         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4799         #  @param theName Object name; when specified, this parameter is used
4800         #         for result publication in the study. Otherwise, if automatic
4801         #         publication is switched on, default value is used for result name.
4802         #
4803         #  @return List of all found sub-shapes.
4804         #
4805         #  @ref swig_GetShapesOnSphere "Example"
4806         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
4807             """
4808             Find in theShape all sub-shapes of type theShapeType, situated relatively
4809             the specified sphere by the certain way, defined through theState parameter.
4810
4811             Parameters:
4812                 theShape Shape to find sub-shapes of.
4813                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4814                 theCenter Point, specifying center of the sphere to find shapes on.
4815                 theRadius Radius of the sphere to find shapes on.
4816                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4817                 theName Object name; when specified, this parameter is used
4818                         for result publication in the study. Otherwise, if automatic
4819                         publication is switched on, default value is used for result name.
4820
4821             Returns:
4822                 List of all found sub-shapes.
4823             """
4824             # Example: see GEOM_TestOthers.py
4825             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
4826             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
4827             self._autoPublish(aList, theName, "shapeOnSphere")
4828             return aList
4829
4830         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4831         #  the specified sphere by the certain way, defined through \a theState parameter.
4832         #  @param theShape Shape to find sub-shapes of.
4833         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4834         #  @param theCenter Point, specifying center of the sphere to find shapes on.
4835         #  @param theRadius Radius of the sphere to find shapes on.
4836         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4837         #
4838         #  @return List of all found sub-shapes indices.
4839         #
4840         #  @ref swig_GetShapesOnSphereIDs "Example"
4841         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
4842             """
4843             Find in theShape all sub-shapes of type theShapeType, situated relatively
4844             the specified sphere by the certain way, defined through theState parameter.
4845
4846             Parameters:
4847                 theShape Shape to find sub-shapes of.
4848                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4849                 theCenter Point, specifying center of the sphere to find shapes on.
4850                 theRadius Radius of the sphere to find shapes on.
4851                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4852
4853             Returns:
4854                 List of all found sub-shapes indices.
4855             """
4856             # Example: see GEOM_TestOthers.py
4857             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
4858             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
4859             return aList
4860
4861         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4862         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4863         #  @param theShape Shape to find sub-shapes of.
4864         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4865         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4866         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4867         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4868         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4869         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4870         #  @param theName Object name; when specified, this parameter is used
4871         #         for result publication in the study. Otherwise, if automatic
4872         #         publication is switched on, default value is used for result name.
4873         #
4874         #  @return List of all found sub-shapes.
4875         #
4876         #  @ref swig_GetShapesOnQuadrangle "Example"
4877         def GetShapesOnQuadrangle(self, theShape, theShapeType,
4878                                   theTopLeftPoint, theTopRigthPoint,
4879                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
4880             """
4881             Find in theShape all sub-shapes of type theShapeType, situated relatively
4882             the specified quadrangle by the certain way, defined through theState parameter.
4883
4884             Parameters:
4885                 theShape Shape to find sub-shapes of.
4886                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4887                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4888                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4889                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4890                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4891                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4892                 theName Object name; when specified, this parameter is used
4893                         for result publication in the study. Otherwise, if automatic
4894                         publication is switched on, default value is used for result name.
4895
4896             Returns:
4897                 List of all found sub-shapes.
4898             """
4899             # Example: see GEOM_TestOthers.py
4900             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
4901                                                         theTopLeftPoint, theTopRigthPoint,
4902                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
4903             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
4904             self._autoPublish(aList, theName, "shapeOnQuadrangle")
4905             return aList
4906
4907         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4908         #  the specified quadrangle by the certain way, defined through \a theState parameter.
4909         #  @param theShape Shape to find sub-shapes of.
4910         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4911         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
4912         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
4913         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4914         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4915         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4916         #
4917         #  @return List of all found sub-shapes indices.
4918         #
4919         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
4920         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
4921                                      theTopLeftPoint, theTopRigthPoint,
4922                                      theBottomLeftPoint, theBottomRigthPoint, theState):
4923             """
4924             Find in theShape all sub-shapes of type theShapeType, situated relatively
4925             the specified quadrangle by the certain way, defined through theState parameter.
4926
4927             Parameters:
4928                 theShape Shape to find sub-shapes of.
4929                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4930                 theTopLeftPoint Point, specifying top left corner of a quadrangle
4931                 theTopRigthPoint Point, specifying top right corner of a quadrangle
4932                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
4933                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
4934                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4935
4936             Returns:
4937                 List of all found sub-shapes indices.
4938             """
4939
4940             # Example: see GEOM_TestOthers.py
4941             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
4942                                                            theTopLeftPoint, theTopRigthPoint,
4943                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
4944             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
4945             return aList
4946
4947         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4948         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4949         #  @param theBox Shape for relative comparing.
4950         #  @param theShape Shape to find sub-shapes of.
4951         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4952         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4953         #  @param theName Object name; when specified, this parameter is used
4954         #         for result publication in the study. Otherwise, if automatic
4955         #         publication is switched on, default value is used for result name.
4956         #
4957         #  @return List of all found sub-shapes.
4958         #
4959         #  @ref swig_GetShapesOnBox "Example"
4960         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
4961             """
4962             Find in theShape all sub-shapes of type theShapeType, situated relatively
4963             the specified theBox by the certain way, defined through theState parameter.
4964
4965             Parameters:
4966                 theBox Shape for relative comparing.
4967                 theShape Shape to find sub-shapes of.
4968                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4969                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4970                 theName Object name; when specified, this parameter is used
4971                         for result publication in the study. Otherwise, if automatic
4972                         publication is switched on, default value is used for result name.
4973
4974             Returns:
4975                 List of all found sub-shapes.
4976             """
4977             # Example: see GEOM_TestOthers.py
4978             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
4979             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
4980             self._autoPublish(aList, theName, "shapeOnBox")
4981             return aList
4982
4983         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4984         #  the specified \a theBox by the certain way, defined through \a theState parameter.
4985         #  @param theBox Shape for relative comparing.
4986         #  @param theShape Shape to find sub-shapes of.
4987         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4988         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4989         #
4990         #  @return List of all found sub-shapes indices.
4991         #
4992         #  @ref swig_GetShapesOnBoxIDs "Example"
4993         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
4994             """
4995             Find in theShape all sub-shapes of type theShapeType, situated relatively
4996             the specified theBox by the certain way, defined through theState parameter.
4997
4998             Parameters:
4999                 theBox Shape for relative comparing.
5000                 theShape Shape to find sub-shapes of.
5001                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5002                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5003
5004             Returns:
5005                 List of all found sub-shapes indices.
5006             """
5007             # Example: see GEOM_TestOthers.py
5008             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5009             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5010             return aList
5011
5012         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5013         #  situated relatively the specified \a theCheckShape by the
5014         #  certain way, defined through \a theState parameter.
5015         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5016         #  @param theShape Shape to find sub-shapes of.
5017         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType()) 
5018         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5019         #  @param theName Object name; when specified, this parameter is used
5020         #         for result publication in the study. Otherwise, if automatic
5021         #         publication is switched on, default value is used for result name.
5022         #
5023         #  @return List of all found sub-shapes.
5024         #
5025         #  @ref swig_GetShapesOnShape "Example"
5026         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5027             """
5028             Find in theShape all sub-shapes of type theShapeType,
5029             situated relatively the specified theCheckShape by the
5030             certain way, defined through theState parameter.
5031
5032             Parameters:
5033                 theCheckShape Shape for relative comparing. It must be a solid.
5034                 theShape Shape to find sub-shapes of.
5035                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5036                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5037                 theName Object name; when specified, this parameter is used
5038                         for result publication in the study. Otherwise, if automatic
5039                         publication is switched on, default value is used for result name.
5040
5041             Returns:
5042                 List of all found sub-shapes.
5043             """
5044             # Example: see GEOM_TestOthers.py
5045             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5046                                                    theShapeType, theState)
5047             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5048             self._autoPublish(aList, theName, "shapeOnShape")
5049             return aList
5050
5051         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5052         #  situated relatively the specified \a theCheckShape by the
5053         #  certain way, defined through \a theState parameter.
5054         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5055         #  @param theShape Shape to find sub-shapes of.
5056         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5057         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5058         #  @param theName Object name; when specified, this parameter is used
5059         #         for result publication in the study. Otherwise, if automatic
5060         #         publication is switched on, default value is used for result name.
5061         #
5062         #  @return All found sub-shapes as compound.
5063         #
5064         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5065         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5066             """
5067             Find in theShape all sub-shapes of type theShapeType,
5068             situated relatively the specified theCheckShape by the
5069             certain way, defined through theState parameter.
5070
5071             Parameters:
5072                 theCheckShape Shape for relative comparing. It must be a solid.
5073                 theShape Shape to find sub-shapes of.
5074                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5075                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5076                 theName Object name; when specified, this parameter is used
5077                         for result publication in the study. Otherwise, if automatic
5078                         publication is switched on, default value is used for result name.
5079
5080             Returns:
5081                 All found sub-shapes as compound.
5082             """
5083             # Example: see GEOM_TestOthers.py
5084             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5085                                                              theShapeType, theState)
5086             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5087             self._autoPublish(anObj, theName, "shapeOnShape")
5088             return anObj
5089
5090         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5091         #  situated relatively the specified \a theCheckShape by the
5092         #  certain way, defined through \a theState parameter.
5093         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5094         #  @param theShape Shape to find sub-shapes of.
5095         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5096         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5097         #
5098         #  @return List of all found sub-shapes indices.
5099         #
5100         #  @ref swig_GetShapesOnShapeIDs "Example"
5101         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5102             """
5103             Find in theShape all sub-shapes of type theShapeType,
5104             situated relatively the specified theCheckShape by the
5105             certain way, defined through theState parameter.
5106
5107             Parameters:
5108                 theCheckShape Shape for relative comparing. It must be a solid.
5109                 theShape Shape to find sub-shapes of.
5110                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5111                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5112
5113             Returns:
5114                 List of all found sub-shapes indices.
5115             """
5116             # Example: see GEOM_TestOthers.py
5117             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5118                                                       theShapeType, theState)
5119             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5120             return aList
5121
5122         ## Get sub-shape(s) of theShapeWhere, which are
5123         #  coincident with \a theShapeWhat or could be a part of it.
5124         #  @param theShapeWhere Shape to find sub-shapes of.
5125         #  @param theShapeWhat Shape, specifying what to find.
5126         #  @param isNewImplementation implementation of GetInPlace functionality
5127         #             (default = False, old alghorithm based on shape properties)
5128         #  @param theName Object name; when specified, this parameter is used
5129         #         for result publication in the study. Otherwise, if automatic
5130         #         publication is switched on, default value is used for result name.
5131         #
5132         #  @return Group of all found sub-shapes or a single found sub-shape.
5133         #
5134         #  @note This function has a restriction on argument shapes.
5135         #        If \a theShapeWhere has curved parts with significantly
5136         #        outstanding centres (i.e. the mass centre of a part is closer to
5137         #        \a theShapeWhat than to the part), such parts will not be found.
5138         #        @image html get_in_place_lost_part.png
5139         #
5140         #  @ref swig_GetInPlace "Example"
5141         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5142             """
5143             Get sub-shape(s) of theShapeWhere, which are
5144             coincident with  theShapeWhat or could be a part of it.
5145
5146             Parameters:
5147                 theShapeWhere Shape to find sub-shapes of.
5148                 theShapeWhat Shape, specifying what to find.
5149                 isNewImplementation Implementation of GetInPlace functionality
5150                                     (default = False, old alghorithm based on shape properties)
5151                 theName Object name; when specified, this parameter is used
5152                         for result publication in the study. Otherwise, if automatic
5153                         publication is switched on, default value is used for result name.
5154
5155             Returns:
5156                 Group of all found sub-shapes or a single found sub-shape.
5157
5158                 
5159             Note:
5160                 This function has a restriction on argument shapes.
5161                 If theShapeWhere has curved parts with significantly
5162                 outstanding centres (i.e. the mass centre of a part is closer to
5163                 theShapeWhat than to the part), such parts will not be found.
5164             """
5165             # Example: see GEOM_TestOthers.py
5166             anObj = None
5167             if isNewImplementation:
5168                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5169             else:
5170                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5171                 pass
5172             RaiseIfFailed("GetInPlace", self.ShapesOp)
5173             self._autoPublish(anObj, theName, "inplace")
5174             return anObj
5175
5176         ## Get sub-shape(s) of \a theShapeWhere, which are
5177         #  coincident with \a theShapeWhat or could be a part of it.
5178         #
5179         #  Implementation of this method is based on a saved history of an operation,
5180         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5181         #  arguments (an argument shape or a sub-shape of an argument shape).
5182         #  The operation could be the Partition or one of boolean operations,
5183         #  performed on simple shapes (not on compounds).
5184         #
5185         #  @param theShapeWhere Shape to find sub-shapes of.
5186         #  @param theShapeWhat Shape, specifying what to find (must be in the
5187         #                      building history of the ShapeWhere).
5188         #  @param theName Object name; when specified, this parameter is used
5189         #         for result publication in the study. Otherwise, if automatic
5190         #         publication is switched on, default value is used for result name.
5191         #
5192         #  @return Group of all found sub-shapes or a single found sub-shape.
5193         #
5194         #  @ref swig_GetInPlace "Example"
5195         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5196             """
5197             Implementation of this method is based on a saved history of an operation,
5198             produced theShapeWhere. The theShapeWhat must be among this operation's
5199             arguments (an argument shape or a sub-shape of an argument shape).
5200             The operation could be the Partition or one of boolean operations,
5201             performed on simple shapes (not on compounds).
5202
5203             Parameters:
5204                 theShapeWhere Shape to find sub-shapes of.
5205                 theShapeWhat Shape, specifying what to find (must be in the
5206                                 building history of the ShapeWhere).
5207                 theName Object name; when specified, this parameter is used
5208                         for result publication in the study. Otherwise, if automatic
5209                         publication is switched on, default value is used for result name.
5210
5211             Returns:
5212                 Group of all found sub-shapes or a single found sub-shape.
5213             """
5214             # Example: see GEOM_TestOthers.py
5215             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5216             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5217             self._autoPublish(anObj, theName, "inplace")
5218             return anObj
5219
5220         ## Get sub-shape of theShapeWhere, which is
5221         #  equal to \a theShapeWhat.
5222         #  @param theShapeWhere Shape to find sub-shape of.
5223         #  @param theShapeWhat Shape, specifying what to find.
5224         #  @param theName Object name; when specified, this parameter is used
5225         #         for result publication in the study. Otherwise, if automatic
5226         #         publication is switched on, default value is used for result name.
5227         #
5228         #  @return New GEOM.GEOM_Object for found sub-shape.
5229         #
5230         #  @ref swig_GetSame "Example"
5231         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5232             """
5233             Get sub-shape of theShapeWhere, which is
5234             equal to theShapeWhat.
5235
5236             Parameters:
5237                 theShapeWhere Shape to find sub-shape of.
5238                 theShapeWhat Shape, specifying what to find.
5239                 theName Object name; when specified, this parameter is used
5240                         for result publication in the study. Otherwise, if automatic
5241                         publication is switched on, default value is used for result name.
5242
5243             Returns:
5244                 New GEOM.GEOM_Object for found sub-shape.
5245             """
5246             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5247             RaiseIfFailed("GetSame", self.ShapesOp)
5248             self._autoPublish(anObj, theName, "sameShape")
5249             return anObj
5250
5251
5252         ## Get sub-shape indices of theShapeWhere, which is
5253         #  equal to \a theShapeWhat.
5254         #  @param theShapeWhere Shape to find sub-shape of.
5255         #  @param theShapeWhat Shape, specifying what to find.
5256         #  @return List of all found sub-shapes indices. 
5257         #
5258         #  @ref swig_GetSame "Example"
5259         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5260             """
5261             Get sub-shape indices of theShapeWhere, which is
5262             equal to theShapeWhat.
5263
5264             Parameters:
5265                 theShapeWhere Shape to find sub-shape of.
5266                 theShapeWhat Shape, specifying what to find.
5267
5268             Returns:
5269                 List of all found sub-shapes indices.
5270             """
5271             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5272             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5273             return anObj
5274
5275
5276         # end of l4_obtain
5277         ## @}
5278
5279         ## @addtogroup l4_access
5280         ## @{
5281
5282         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5283         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5284         #  @param aShape Shape to get sub-shape of.
5285         #  @param ListOfID List of sub-shapes indices.
5286         #  @param theName Object name; when specified, this parameter is used
5287         #         for result publication in the study. Otherwise, if automatic
5288         #         publication is switched on, default value is used for result name.
5289         #
5290         #  @return Found sub-shape.
5291         #
5292         #  @ref swig_all_decompose "Example"
5293         def GetSubShape(self, aShape, ListOfID, theName=None):
5294             """
5295             Obtain a composite sub-shape of aShape, composed from sub-shapes
5296             of aShape, selected by their unique IDs inside aShape
5297
5298             Parameters:
5299                 aShape Shape to get sub-shape of.
5300                 ListOfID List of sub-shapes indices.
5301                 theName Object name; when specified, this parameter is used
5302                         for result publication in the study. Otherwise, if automatic
5303                         publication is switched on, default value is used for result name.
5304
5305             Returns:
5306                 Found sub-shape.
5307             """
5308             # Example: see GEOM_TestAll.py
5309             anObj = self.AddSubShape(aShape,ListOfID)
5310             self._autoPublish(anObj, theName, "subshape")
5311             return anObj
5312
5313         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5314         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5315         #  @param aShape Shape to get sub-shape of.
5316         #  @param aSubShape Sub-shapes of aShape.
5317         #  @return ID of found sub-shape.
5318         #
5319         #  @ref swig_all_decompose "Example"
5320         def GetSubShapeID(self, aShape, aSubShape):
5321             """
5322             Obtain unique ID of sub-shape aSubShape inside aShape
5323             of aShape, selected by their unique IDs inside aShape
5324
5325             Parameters:
5326                aShape Shape to get sub-shape of.
5327                aSubShape Sub-shapes of aShape.
5328
5329             Returns:
5330                ID of found sub-shape.
5331             """
5332             # Example: see GEOM_TestAll.py
5333             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5334             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5335             return anID
5336             
5337         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5338         #  This function is provided for performance purpose. The complexity is O(n) with n
5339         #  the number of subobjects of aShape
5340         #  @param aShape Shape to get sub-shape of.
5341         #  @param aSubShapes Sub-shapes of aShape.
5342         #  @return list of IDs of found sub-shapes.
5343         #
5344         #  @ref swig_all_decompose "Example"
5345         def GetSubShapesIDs(self, aShape, aSubShapes):
5346             """
5347             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5348             This function is provided for performance purpose. The complexity is O(n) with n
5349             the number of subobjects of aShape
5350
5351             Parameters:
5352                aShape Shape to get sub-shape of.
5353                aSubShapes Sub-shapes of aShape.
5354
5355             Returns:
5356                List of IDs of found sub-shape.
5357             """
5358             # Example: see GEOM_TestAll.py
5359             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5360             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5361             return anIDs
5362
5363         # end of l4_access
5364         ## @}
5365
5366         ## @addtogroup l4_decompose
5367         ## @{
5368
5369         ## Get all sub-shapes and groups of \a theShape,
5370         #  that were created already by any other methods.
5371         #  @param theShape Any shape.
5372         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5373         #                       returned, else all found sub-shapes and groups.
5374         #  @return List of existing sub-objects of \a theShape.
5375         #
5376         #  @ref swig_all_decompose "Example"
5377         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5378             """
5379             Get all sub-shapes and groups of theShape,
5380             that were created already by any other methods.
5381
5382             Parameters:
5383                 theShape Any shape.
5384                 theGroupsOnly If this parameter is TRUE, only groups will be
5385                                  returned, else all found sub-shapes and groups.
5386
5387             Returns:
5388                 List of existing sub-objects of theShape.
5389             """
5390             # Example: see GEOM_TestAll.py
5391             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5392             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5393             return ListObj
5394
5395         ## Get all groups of \a theShape,
5396         #  that were created already by any other methods.
5397         #  @param theShape Any shape.
5398         #  @return List of existing groups of \a theShape.
5399         #
5400         #  @ref swig_all_decompose "Example"
5401         def GetGroups(self, theShape):
5402             """
5403             Get all groups of theShape,
5404             that were created already by any other methods.
5405
5406             Parameters:
5407                 theShape Any shape.
5408
5409             Returns:
5410                 List of existing groups of theShape.
5411             """
5412             # Example: see GEOM_TestAll.py
5413             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5414             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5415             return ListObj
5416
5417         ## Explode a shape on sub-shapes of a given type.
5418         #  If the shape itself matches the type, it is also returned.
5419         #  @param aShape Shape to be exploded.
5420         #  @param aType Type of sub-shapes to be retrieved (see ShapeType()) 
5421         #  @param theName Object name; when specified, this parameter is used
5422         #         for result publication in the study. Otherwise, if automatic
5423         #         publication is switched on, default value is used for result name.
5424         #
5425         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5426         #
5427         #  @ref swig_all_decompose "Example"
5428         def SubShapeAll(self, aShape, aType, theName=None):
5429             """
5430             Explode a shape on sub-shapes of a given type.
5431             If the shape itself matches the type, it is also returned.
5432
5433             Parameters:
5434                 aShape Shape to be exploded.
5435                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType) 
5436                 theName Object name; when specified, this parameter is used
5437                         for result publication in the study. Otherwise, if automatic
5438                         publication is switched on, default value is used for result name.
5439
5440             Returns:
5441                 List of sub-shapes of type theShapeType, contained in theShape.
5442             """
5443             # Example: see GEOM_TestAll.py
5444             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5445             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5446             self._autoPublish(ListObj, theName, "subshape")
5447             return ListObj
5448
5449         ## Explode a shape on sub-shapes of a given type.
5450         #  @param aShape Shape to be exploded.
5451         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5452         #  @return List of IDs of sub-shapes.
5453         #
5454         #  @ref swig_all_decompose "Example"
5455         def SubShapeAllIDs(self, aShape, aType):
5456             """
5457             Explode a shape on sub-shapes of a given type.
5458
5459             Parameters:
5460                 aShape Shape to be exploded (see geompy.ShapeType)
5461                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5462
5463             Returns:
5464                 List of IDs of sub-shapes.
5465             """
5466             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5467             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5468             return ListObj
5469
5470         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5471         #  selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
5472         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5473         #  @param aShape Shape to get sub-shape of.
5474         #  @param ListOfInd List of sub-shapes indices.
5475         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5476         #  @param theName Object name; when specified, this parameter is used
5477         #         for result publication in the study. Otherwise, if automatic
5478         #         publication is switched on, default value is used for result name.
5479         #
5480         #  @return A compound of sub-shapes of aShape.
5481         #
5482         #  @ref swig_all_decompose "Example"
5483         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5484             """
5485             Obtain a compound of sub-shapes of aShape,
5486             selected by they indices in list of all sub-shapes of type aType.
5487             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5488             
5489             Parameters:
5490                 aShape Shape to get sub-shape of.
5491                 ListOfID List of sub-shapes indices.
5492                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5493                 theName Object name; when specified, this parameter is used
5494                         for result publication in the study. Otherwise, if automatic
5495                         publication is switched on, default value is used for result name.
5496
5497             Returns:
5498                 A compound of sub-shapes of aShape.
5499             """
5500             # Example: see GEOM_TestAll.py
5501             ListOfIDs = []
5502             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5503             for ind in ListOfInd:
5504                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5505             # note: auto-publishing is done in self.GetSubShape()
5506             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5507             return anObj
5508
5509         ## Explode a shape on sub-shapes of a given type.
5510         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5511         #  If the shape itself matches the type, it is also returned.
5512         #  @param aShape Shape to be exploded.
5513         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5514         #  @param theName Object name; when specified, this parameter is used
5515         #         for result publication in the study. Otherwise, if automatic
5516         #         publication is switched on, default value is used for result name.
5517         #
5518         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5519         #
5520         #  @ref swig_SubShapeAllSorted "Example"
5521         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5522             """
5523             Explode a shape on sub-shapes of a given type.
5524             Sub-shapes will be sorted by coordinates of their gravity centers.
5525             If the shape itself matches the type, it is also returned.
5526
5527             Parameters: 
5528                 aShape Shape to be exploded.
5529                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5530                 theName Object name; when specified, this parameter is used
5531                         for result publication in the study. Otherwise, if automatic
5532                         publication is switched on, default value is used for result name.
5533
5534             Returns: 
5535                 List of sub-shapes of type theShapeType, contained in theShape.
5536             """
5537             # Example: see GEOM_TestAll.py
5538             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5539             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5540             self._autoPublish(ListObj, theName, "subshape")
5541             return ListObj
5542
5543         ## Explode a shape on sub-shapes of a given type.
5544         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5545         #  @param aShape Shape to be exploded.
5546         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5547         #  @return List of IDs of sub-shapes.
5548         #
5549         #  @ref swig_all_decompose "Example"
5550         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5551             """
5552             Explode a shape on sub-shapes of a given type.
5553             Sub-shapes will be sorted by coordinates of their gravity centers.
5554
5555             Parameters: 
5556                 aShape Shape to be exploded.
5557                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5558
5559             Returns: 
5560                 List of IDs of sub-shapes.
5561             """
5562             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5563             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5564             return ListIDs
5565
5566         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5567         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5568         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5569         #  @param aShape Shape to get sub-shape of.
5570         #  @param ListOfInd List of sub-shapes indices.
5571         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5572         #  @param theName Object name; when specified, this parameter is used
5573         #         for result publication in the study. Otherwise, if automatic
5574         #         publication is switched on, default value is used for result name.
5575         #
5576         #  @return A compound of sub-shapes of aShape.
5577         #
5578         #  @ref swig_all_decompose "Example"
5579         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5580             """
5581             Obtain a compound of sub-shapes of aShape,
5582             selected by they indices in sorted list of all sub-shapes of type aType.
5583             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5584
5585             Parameters:
5586                 aShape Shape to get sub-shape of.
5587                 ListOfID List of sub-shapes indices.
5588                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5589                 theName Object name; when specified, this parameter is used
5590                         for result publication in the study. Otherwise, if automatic
5591                         publication is switched on, default value is used for result name.
5592
5593             Returns:
5594                 A compound of sub-shapes of aShape.
5595             """
5596             # Example: see GEOM_TestAll.py
5597             ListOfIDs = []
5598             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5599             for ind in ListOfInd:
5600                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5601             # note: auto-publishing is done in self.GetSubShape()
5602             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5603             return anObj
5604
5605         ## Extract shapes (excluding the main shape) of given type.
5606         #  @param aShape The shape.
5607         #  @param aType  The shape type (see ShapeType())
5608         #  @param isSorted Boolean flag to switch sorting on/off.
5609         #  @param theName Object name; when specified, this parameter is used
5610         #         for result publication in the study. Otherwise, if automatic
5611         #         publication is switched on, default value is used for result name.
5612         #
5613         #  @return List of sub-shapes of type aType, contained in aShape.
5614         #
5615         #  @ref swig_FilletChamfer "Example"
5616         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5617             """
5618             Extract shapes (excluding the main shape) of given type.
5619
5620             Parameters:
5621                 aShape The shape.
5622                 aType  The shape type (see geompy.ShapeType)
5623                 isSorted Boolean flag to switch sorting on/off.
5624                 theName Object name; when specified, this parameter is used
5625                         for result publication in the study. Otherwise, if automatic
5626                         publication is switched on, default value is used for result name.
5627
5628             Returns:     
5629                 List of sub-shapes of type aType, contained in aShape.
5630             """
5631             # Example: see GEOM_TestAll.py
5632             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5633             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5634             self._autoPublish(ListObj, theName, "subshape")
5635             return ListObj
5636
5637         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5638         #  @param aShape Main shape.
5639         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5640         #  @param theName Object name; when specified, this parameter is used
5641         #         for result publication in the study. Otherwise, if automatic
5642         #         publication is switched on, default value is used for result name.
5643         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5644         #
5645         #  @ref swig_all_decompose "Example"
5646         def SubShapes(self, aShape, anIDs, theName=None):
5647             """
5648             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5649
5650             Parameters:
5651                 aShape Main shape.
5652                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5653                 theName Object name; when specified, this parameter is used
5654                         for result publication in the study. Otherwise, if automatic
5655                         publication is switched on, default value is used for result name.
5656
5657             Returns:      
5658                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5659             """
5660             # Example: see GEOM_TestAll.py
5661             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5662             RaiseIfFailed("SubShapes", self.ShapesOp)
5663             self._autoPublish(ListObj, theName, "subshape")
5664             return ListObj
5665
5666         # end of l4_decompose
5667         ## @}
5668
5669         ## @addtogroup l4_decompose_d
5670         ## @{
5671
5672         ## Deprecated method
5673         #  It works like SubShapeAllSortedCentres(), but wrongly
5674         #  defines centres of faces, shells and solids.
5675         def SubShapeAllSorted(self, aShape, aType, theName=None):
5676             """
5677             Deprecated method
5678             It works like geompy.SubShapeAllSortedCentres, but wrongly
5679             defines centres of faces, shells and solids.
5680             """
5681             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5682             RaiseIfFailed("MakeExplode", self.ShapesOp)
5683             self._autoPublish(ListObj, theName, "subshape")
5684             return ListObj
5685
5686         ## Deprecated method
5687         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5688         #  defines centres of faces, shells and solids.
5689         def SubShapeAllSortedIDs(self, aShape, aType):
5690             """
5691             Deprecated method
5692             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5693             defines centres of faces, shells and solids.
5694             """
5695             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5696             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5697             return ListIDs
5698
5699         ## Deprecated method
5700         #  It works like SubShapeSortedCentres(), but has a bug
5701         #  (wrongly defines centres of faces, shells and solids).
5702         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5703             """
5704             Deprecated method
5705             It works like geompy.SubShapeSortedCentres, but has a bug
5706             (wrongly defines centres of faces, shells and solids).
5707             """
5708             ListOfIDs = []
5709             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5710             for ind in ListOfInd:
5711                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5712             # note: auto-publishing is done in self.GetSubShape()
5713             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5714             return anObj
5715
5716         # end of l4_decompose_d
5717         ## @}
5718
5719         ## @addtogroup l3_healing
5720         ## @{
5721
5722         ## Apply a sequence of Shape Healing operators to the given object.
5723         #  @param theShape Shape to be processed.
5724         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5725         #  @param theParameters List of names of parameters
5726         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5727         #  @param theValues List of values of parameters, in the same order
5728         #                    as parameters are listed in <VAR>theParameters</VAR> list.
5729         #  @param theName Object name; when specified, this parameter is used
5730         #         for result publication in the study. Otherwise, if automatic
5731         #         publication is switched on, default value is used for result name.
5732         #
5733         #  <b> Operators and Parameters: </b> \n
5734         #
5735         #  * \b FixShape - corrects invalid shapes. \n
5736         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
5737         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
5738         #
5739         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
5740         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
5741         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
5742         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
5743         #
5744         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
5745         #    surfaces in segments using a certain angle. \n
5746         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5747         #    if Angle=180, four if Angle=90, etc). \n
5748         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
5749         #
5750         #  * \b SplitClosedFaces - splits closed faces in segments.
5751         #    The number of segments depends on the number of splitting points.\n
5752         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
5753         #
5754         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
5755         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
5756         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
5757         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
5758         #   This and the previous parameters can take the following values:\n
5759         #   \b Parametric \b Continuity \n
5760         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
5761         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
5762         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
5763         #    ruling out sharp edges).\n
5764         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces 
5765         #       are of the same magnitude).\n
5766         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
5767         #    or surfaces (d/du C(u)) are the same at junction. \n
5768         #   \b Geometric \b Continuity \n
5769         #   \b G1: first derivatives are proportional at junction.\n
5770         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
5771         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
5772         #   \b G2: first and second derivatives are proportional at junction.
5773         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
5774         #    continuity requires that the underlying parameterization was continuous as well.
5775         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
5776         #
5777         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
5778         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
5779         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
5780         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
5781         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
5782         #       with the specified parameters.\n
5783         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
5784         #       with the specified parameters.\n
5785         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
5786         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
5787         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
5788         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
5789         #
5790         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
5791         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
5792         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
5793         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
5794         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
5795         #
5796         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
5797         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
5798         #
5799         #
5800         #  @return New GEOM.GEOM_Object, containing processed shape.
5801         #
5802         #  \n @ref tui_shape_processing "Example"
5803         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
5804             """
5805             Apply a sequence of Shape Healing operators to the given object.
5806
5807             Parameters:
5808                 theShape Shape to be processed.
5809                 theValues List of values of parameters, in the same order
5810                           as parameters are listed in theParameters list.
5811                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
5812                 theParameters List of names of parameters
5813                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
5814                 theName Object name; when specified, this parameter is used
5815                         for result publication in the study. Otherwise, if automatic
5816                         publication is switched on, default value is used for result name.
5817
5818                 Operators and Parameters:
5819
5820                  * FixShape - corrects invalid shapes.
5821                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
5822                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
5823                  * FixFaceSize - removes small faces, such as spots and strips.
5824                      * FixFaceSize.Tolerance - defines minimum possible face size.
5825                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
5826                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
5827                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
5828                                 in segments using a certain angle.
5829                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
5830                                           if Angle=180, four if Angle=90, etc).
5831                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
5832                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
5833                                       splitting points.
5834                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
5835                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
5836                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
5837                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
5838                      * SplitContinuity.CurveContinuity - required continuity for curves.
5839                        This and the previous parameters can take the following values:
5840                        
5841                        Parametric Continuity:
5842                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
5843                                                    coincidental. The curves or surfaces may still meet at an angle,
5844                                                    giving rise to a sharp corner or edge).
5845                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
5846                                                    are parallel, ruling out sharp edges).
5847                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
5848                                                   or surfaces are of the same magnitude).
5849                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
5850                           curves or surfaces (d/du C(u)) are the same at junction.
5851                           
5852                        Geometric Continuity:
5853                        G1: first derivatives are proportional at junction.
5854                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
5855                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
5856                        G2: first and second derivatives are proportional at junction. As the names imply,
5857                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
5858                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
5859                            geometric continuity of order n, but not vice-versa.
5860                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
5861                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
5862                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
5863                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
5864                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
5865                                                         the specified parameters.
5866                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
5867                                                         the specified parameters.
5868                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
5869                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
5870                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
5871                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
5872                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
5873                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
5874                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
5875                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
5876                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
5877                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
5878                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
5879
5880             Returns:
5881                 New GEOM.GEOM_Object, containing processed shape.
5882
5883             Note: For more information look through SALOME Geometry User's Guide->
5884                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
5885             """
5886             # Example: see GEOM_TestHealing.py
5887             theValues,Parameters = ParseList(theValues)
5888             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
5889             # To avoid script failure in case of good argument shape
5890             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
5891                 return theShape
5892             RaiseIfFailed("ProcessShape", self.HealOp)
5893             for string in (theOperators + theParameters):
5894                 Parameters = ":" + Parameters
5895                 pass
5896             anObj.SetParameters(Parameters)
5897             self._autoPublish(anObj, theName, "healed")
5898             return anObj
5899
5900         ## Remove faces from the given object (shape).
5901         #  @param theObject Shape to be processed.
5902         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
5903         #                  removes ALL faces of the given object.
5904         #  @param theName Object name; when specified, this parameter is used
5905         #         for result publication in the study. Otherwise, if automatic
5906         #         publication is switched on, default value is used for result name.
5907         #
5908         #  @return New GEOM.GEOM_Object, containing processed shape.
5909         #
5910         #  @ref tui_suppress_faces "Example"
5911         def SuppressFaces(self, theObject, theFaces, theName=None):
5912             """
5913             Remove faces from the given object (shape).
5914
5915             Parameters:
5916                 theObject Shape to be processed.
5917                 theFaces Indices of faces to be removed, if EMPTY then the method
5918                          removes ALL faces of the given object.
5919                 theName Object name; when specified, this parameter is used
5920                         for result publication in the study. Otherwise, if automatic
5921                         publication is switched on, default value is used for result name.
5922
5923             Returns:
5924                 New GEOM.GEOM_Object, containing processed shape.
5925             """
5926             # Example: see GEOM_TestHealing.py
5927             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
5928             RaiseIfFailed("SuppressFaces", self.HealOp)
5929             self._autoPublish(anObj, theName, "suppressFaces")
5930             return anObj
5931
5932         ## Sewing of some shapes into single shape.
5933         #  @param ListShape Shapes to be processed.
5934         #  @param theTolerance Required tolerance value.
5935         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5936         #  @param theName Object name; when specified, this parameter is used
5937         #         for result publication in the study. Otherwise, if automatic
5938         #         publication is switched on, default value is used for result name.
5939         #
5940         #  @return New GEOM.GEOM_Object, containing processed shape.
5941         #
5942         #  @ref tui_sewing "Example"
5943         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
5944             """
5945             Sewing of some shapes into single shape.
5946
5947             Parameters:
5948                 ListShape Shapes to be processed.
5949                 theTolerance Required tolerance value.
5950                 AllowNonManifold Flag that allows non-manifold sewing.
5951                 theName Object name; when specified, this parameter is used
5952                         for result publication in the study. Otherwise, if automatic
5953                         publication is switched on, default value is used for result name.
5954
5955             Returns:
5956                 New GEOM.GEOM_Object, containing processed shape.
5957             """
5958             # Example: see GEOM_TestHealing.py
5959             comp = self.MakeCompound(ListShape)
5960             # note: auto-publishing is done in self.Sew()
5961             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
5962             return anObj
5963
5964         ## Sewing of the given object.
5965         #  @param theObject Shape to be processed.
5966         #  @param theTolerance Required tolerance value.
5967         #  @param AllowNonManifold Flag that allows non-manifold sewing.
5968         #  @param theName Object name; when specified, this parameter is used
5969         #         for result publication in the study. Otherwise, if automatic
5970         #         publication is switched on, default value is used for result name.
5971         #
5972         #  @return New GEOM.GEOM_Object, containing processed shape.
5973         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
5974             """
5975             Sewing of the given object.
5976
5977             Parameters:
5978                 theObject Shape to be processed.
5979                 theTolerance Required tolerance value.
5980                 AllowNonManifold Flag that allows non-manifold sewing.
5981                 theName Object name; when specified, this parameter is used
5982                         for result publication in the study. Otherwise, if automatic
5983                         publication is switched on, default value is used for result name.
5984
5985             Returns:
5986                 New GEOM.GEOM_Object, containing processed shape.
5987             """
5988             # Example: see MakeSewing() above
5989             theTolerance,Parameters = ParseParameters(theTolerance)
5990             if AllowNonManifold:
5991                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
5992             else:
5993                 anObj = self.HealOp.Sew(theObject, theTolerance)
5994             RaiseIfFailed("Sew", self.HealOp)
5995             anObj.SetParameters(Parameters)
5996             self._autoPublish(anObj, theName, "sewed")
5997             return anObj
5998
5999         ## Remove internal wires and edges from the given object (face).
6000         #  @param theObject Shape to be processed.
6001         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6002         #                  removes ALL internal wires of the given object.
6003         #  @param theName Object name; when specified, this parameter is used
6004         #         for result publication in the study. Otherwise, if automatic
6005         #         publication is switched on, default value is used for result name.
6006         #
6007         #  @return New GEOM.GEOM_Object, containing processed shape.
6008         #
6009         #  @ref tui_suppress_internal_wires "Example"
6010         def SuppressInternalWires(self, theObject, theWires, theName=None):
6011             """
6012             Remove internal wires and edges from the given object (face).
6013
6014             Parameters:
6015                 theObject Shape to be processed.
6016                 theWires Indices of wires to be removed, if EMPTY then the method
6017                          removes ALL internal wires of the given object.
6018                 theName Object name; when specified, this parameter is used
6019                         for result publication in the study. Otherwise, if automatic
6020                         publication is switched on, default value is used for result name.
6021
6022             Returns:                
6023                 New GEOM.GEOM_Object, containing processed shape.
6024             """
6025             # Example: see GEOM_TestHealing.py
6026             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6027             RaiseIfFailed("RemoveIntWires", self.HealOp)
6028             self._autoPublish(anObj, theName, "suppressWires")
6029             return anObj
6030
6031         ## Remove internal closed contours (holes) from the given object.
6032         #  @param theObject Shape to be processed.
6033         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6034         #                  removes ALL internal holes of the given object
6035         #  @param theName Object name; when specified, this parameter is used
6036         #         for result publication in the study. Otherwise, if automatic
6037         #         publication is switched on, default value is used for result name.
6038         #
6039         #  @return New GEOM.GEOM_Object, containing processed shape.
6040         #
6041         #  @ref tui_suppress_holes "Example"
6042         def SuppressHoles(self, theObject, theWires, theName=None):
6043             """
6044             Remove internal closed contours (holes) from the given object.
6045
6046             Parameters:
6047                 theObject Shape to be processed.
6048                 theWires Indices of wires to be removed, if EMPTY then the method
6049                          removes ALL internal holes of the given object
6050                 theName Object name; when specified, this parameter is used
6051                         for result publication in the study. Otherwise, if automatic
6052                         publication is switched on, default value is used for result name.
6053
6054             Returns:    
6055                 New GEOM.GEOM_Object, containing processed shape.
6056             """
6057             # Example: see GEOM_TestHealing.py
6058             anObj = self.HealOp.FillHoles(theObject, theWires)
6059             RaiseIfFailed("FillHoles", self.HealOp)
6060             self._autoPublish(anObj, theName, "suppressHoles")
6061             return anObj
6062
6063         ## Close an open wire.
6064         #  @param theObject Shape to be processed.
6065         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6066         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6067         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6068         #                        If False : closure by creation of an edge between ends.
6069         #  @param theName Object name; when specified, this parameter is used
6070         #         for result publication in the study. Otherwise, if automatic
6071         #         publication is switched on, default value is used for result name.
6072         #
6073         #  @return New GEOM.GEOM_Object, containing processed shape.
6074         #
6075         #  @ref tui_close_contour "Example"
6076         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6077             """
6078             Close an open wire.
6079
6080             Parameters: 
6081                 theObject Shape to be processed.
6082                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6083                          if [ ], then theObject itself is a wire.
6084                 isCommonVertex If True  : closure by creation of a common vertex,
6085                                If False : closure by creation of an edge between ends.
6086                 theName Object name; when specified, this parameter is used
6087                         for result publication in the study. Otherwise, if automatic
6088                         publication is switched on, default value is used for result name.
6089
6090             Returns:                      
6091                 New GEOM.GEOM_Object, containing processed shape. 
6092             """
6093             # Example: see GEOM_TestHealing.py
6094             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6095             RaiseIfFailed("CloseContour", self.HealOp)
6096             self._autoPublish(anObj, theName, "closeContour")
6097             return anObj
6098
6099         ## Addition of a point to a given edge object.
6100         #  @param theObject Shape to be processed.
6101         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6102         #                      if -1, then theObject itself is the edge.
6103         #  @param theValue Value of parameter on edge or length parameter,
6104         #                  depending on \a isByParameter.
6105         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6106         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6107         #  @param theName Object name; when specified, this parameter is used
6108         #         for result publication in the study. Otherwise, if automatic
6109         #         publication is switched on, default value is used for result name.
6110         #
6111         #  @return New GEOM.GEOM_Object, containing processed shape.
6112         #
6113         #  @ref tui_add_point_on_edge "Example"
6114         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6115             """
6116             Addition of a point to a given edge object.
6117
6118             Parameters: 
6119                 theObject Shape to be processed.
6120                 theEdgeIndex Index of edge to be divided within theObject's shape,
6121                              if -1, then theObject itself is the edge.
6122                 theValue Value of parameter on edge or length parameter,
6123                          depending on isByParameter.
6124                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6125                               if FALSE : theValue is treated as a length parameter [0..1]
6126                 theName Object name; when specified, this parameter is used
6127                         for result publication in the study. Otherwise, if automatic
6128                         publication is switched on, default value is used for result name.
6129
6130             Returns:  
6131                 New GEOM.GEOM_Object, containing processed shape.
6132             """
6133             # Example: see GEOM_TestHealing.py
6134             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6135             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6136             RaiseIfFailed("DivideEdge", self.HealOp)
6137             anObj.SetParameters(Parameters)
6138             self._autoPublish(anObj, theName, "divideEdge")
6139             return anObj
6140
6141         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6142         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6143         #  @param theVertices A list of vertices to suppress. If the list
6144         #                     is empty, all vertices in a wire will be assumed.
6145         #  @param theName Object name; when specified, this parameter is used
6146         #         for result publication in the study. Otherwise, if automatic
6147         #         publication is switched on, default value is used for result name.
6148         #
6149         #  @return New GEOM.GEOM_Object with modified wire.
6150         #
6151         #  @ref tui_fuse_collinear_edges "Example"
6152         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6153             """
6154             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6155
6156             Parameters: 
6157                 theWire Wire to minimize the number of C1 continuous edges in.
6158                 theVertices A list of vertices to suppress. If the list
6159                             is empty, all vertices in a wire will be assumed.
6160                 theName Object name; when specified, this parameter is used
6161                         for result publication in the study. Otherwise, if automatic
6162                         publication is switched on, default value is used for result name.
6163
6164             Returns:  
6165                 New GEOM.GEOM_Object with modified wire.
6166             """
6167             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6168             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6169             self._autoPublish(anObj, theName, "fuseEdges")
6170             return anObj
6171
6172         ## Change orientation of the given object. Updates given shape.
6173         #  @param theObject Shape to be processed.
6174         #  @return Updated <var>theObject</var>
6175         #
6176         #  @ref swig_todo "Example"
6177         def ChangeOrientationShell(self,theObject):
6178             """
6179             Change orientation of the given object. Updates given shape.
6180
6181             Parameters: 
6182                 theObject Shape to be processed.
6183
6184             Returns:  
6185                 Updated theObject
6186             """
6187             theObject = self.HealOp.ChangeOrientation(theObject)
6188             RaiseIfFailed("ChangeOrientation", self.HealOp)
6189             pass
6190
6191         ## Change orientation of the given object.
6192         #  @param theObject Shape to be processed.
6193         #  @param theName Object name; when specified, this parameter is used
6194         #         for result publication in the study. Otherwise, if automatic
6195         #         publication is switched on, default value is used for result name.
6196         #
6197         #  @return New GEOM.GEOM_Object, containing processed shape.
6198         #
6199         #  @ref swig_todo "Example"
6200         def ChangeOrientationShellCopy(self, theObject, theName=None):
6201             """
6202             Change orientation of the given object.
6203
6204             Parameters:
6205                 theObject Shape to be processed.
6206                 theName Object name; when specified, this parameter is used
6207                         for result publication in the study. Otherwise, if automatic
6208                         publication is switched on, default value is used for result name.
6209
6210             Returns:   
6211                 New GEOM.GEOM_Object, containing processed shape.
6212             """
6213             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6214             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6215             self._autoPublish(anObj, theName, "reversed")
6216             return anObj
6217
6218         ## Try to limit tolerance of the given object by value \a theTolerance.
6219         #  @param theObject Shape to be processed.
6220         #  @param theTolerance Required tolerance value.
6221         #  @param theName Object name; when specified, this parameter is used
6222         #         for result publication in the study. Otherwise, if automatic
6223         #         publication is switched on, default value is used for result name.
6224         #
6225         #  @return New GEOM.GEOM_Object, containing processed shape.
6226         #
6227         #  @ref tui_limit_tolerance "Example"
6228         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6229             """
6230             Try to limit tolerance of the given object by value theTolerance.
6231
6232             Parameters:
6233                 theObject Shape to be processed.
6234                 theTolerance Required tolerance value.
6235                 theName Object name; when specified, this parameter is used
6236                         for result publication in the study. Otherwise, if automatic
6237                         publication is switched on, default value is used for result name.
6238
6239             Returns:   
6240                 New GEOM.GEOM_Object, containing processed shape.
6241             """
6242             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6243             RaiseIfFailed("LimitTolerance", self.HealOp)
6244             self._autoPublish(anObj, theName, "limitTolerance")
6245             return anObj
6246
6247         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6248         #  that constitute a free boundary of the given shape.
6249         #  @param theObject Shape to get free boundary of.
6250         #  @param theName Object name; when specified, this parameter is used
6251         #         for result publication in the study. Otherwise, if automatic
6252         #         publication is switched on, default value is used for result name.
6253         #
6254         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6255         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6256         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6257         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6258         #
6259         #  @ref tui_measurement_tools_page "Example"
6260         def GetFreeBoundary(self, theObject, theName=None):
6261             """
6262             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6263             that constitute a free boundary of the given shape.
6264
6265             Parameters:
6266                 theObject Shape to get free boundary of.
6267                 theName Object name; when specified, this parameter is used
6268                         for result publication in the study. Otherwise, if automatic
6269                         publication is switched on, default value is used for result name.
6270
6271             Returns: 
6272                 [status, theClosedWires, theOpenWires]
6273                  status: FALSE, if an error(s) occured during the method execution.
6274                  theClosedWires: Closed wires on the free boundary of the given shape.
6275                  theOpenWires: Open wires on the free boundary of the given shape.
6276             """
6277             # Example: see GEOM_TestHealing.py
6278             anObj = self.HealOp.GetFreeBoundary(theObject)
6279             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6280             self._autoPublish(anObj[1], theName, "closedWire")
6281             self._autoPublish(anObj[2], theName, "openWire")
6282             return anObj
6283
6284         ## Replace coincident faces in theShape by one face.
6285         #  @param theShape Initial shape.
6286         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6287         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6288         #                         otherwise all initial shapes.
6289         #  @param theName Object name; when specified, this parameter is used
6290         #         for result publication in the study. Otherwise, if automatic
6291         #         publication is switched on, default value is used for result name.
6292         #
6293         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6294         #
6295         #  @ref tui_glue_faces "Example"
6296         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6297             """
6298             Replace coincident faces in theShape by one face.
6299
6300             Parameters:
6301                 theShape Initial shape.
6302                 theTolerance Maximum distance between faces, which can be considered as coincident.
6303                 doKeepNonSolids If FALSE, only solids will present in the result,
6304                                 otherwise all initial shapes.
6305                 theName Object name; when specified, this parameter is used
6306                         for result publication in the study. Otherwise, if automatic
6307                         publication is switched on, default value is used for result name.
6308
6309             Returns:
6310                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6311             """
6312             # Example: see GEOM_Spanner.py
6313             theTolerance,Parameters = ParseParameters(theTolerance)
6314             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6315             if anObj is None:
6316                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6317             anObj.SetParameters(Parameters)
6318             self._autoPublish(anObj, theName, "glueFaces")
6319             return anObj
6320
6321         ## Find coincident faces in theShape for possible gluing.
6322         #  @param theShape Initial shape.
6323         #  @param theTolerance Maximum distance between faces,
6324         #                      which can be considered as coincident.
6325         #  @param theName Object name; when specified, this parameter is used
6326         #         for result publication in the study. Otherwise, if automatic
6327         #         publication is switched on, default value is used for result name.
6328         #
6329         #  @return GEOM.ListOfGO
6330         #
6331         #  @ref tui_glue_faces "Example"
6332         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6333             """
6334             Find coincident faces in theShape for possible gluing.
6335
6336             Parameters:
6337                 theShape Initial shape.
6338                 theTolerance Maximum distance between faces,
6339                              which can be considered as coincident.
6340                 theName Object name; when specified, this parameter is used
6341                         for result publication in the study. Otherwise, if automatic
6342                         publication is switched on, default value is used for result name.
6343
6344             Returns:                    
6345                 GEOM.ListOfGO
6346             """
6347             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6348             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6349             self._autoPublish(anObj, theName, "facesToGlue")
6350             return anObj
6351
6352         ## Replace coincident faces in theShape by one face
6353         #  in compliance with given list of faces
6354         #  @param theShape Initial shape.
6355         #  @param theTolerance Maximum distance between faces,
6356         #                      which can be considered as coincident.
6357         #  @param theFaces List of faces for gluing.
6358         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6359         #                         otherwise all initial shapes.
6360         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6361         #                        will be glued, otherwise only the edges,
6362         #                        belonging to <VAR>theFaces</VAR>.
6363         #  @param theName Object name; when specified, this parameter is used
6364         #         for result publication in the study. Otherwise, if automatic
6365         #         publication is switched on, default value is used for result name.
6366         #
6367         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6368         #          without some faces.
6369         #
6370         #  @ref tui_glue_faces "Example"
6371         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6372                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6373             """
6374             Replace coincident faces in theShape by one face
6375             in compliance with given list of faces
6376
6377             Parameters:
6378                 theShape Initial shape.
6379                 theTolerance Maximum distance between faces,
6380                              which can be considered as coincident.
6381                 theFaces List of faces for gluing.
6382                 doKeepNonSolids If FALSE, only solids will present in the result,
6383                                 otherwise all initial shapes.
6384                 doGlueAllEdges If TRUE, all coincident edges of theShape
6385                                will be glued, otherwise only the edges,
6386                                belonging to theFaces.
6387                 theName Object name; when specified, this parameter is used
6388                         for result publication in the study. Otherwise, if automatic
6389                         publication is switched on, default value is used for result name.
6390
6391             Returns:
6392                 New GEOM.GEOM_Object, containing a copy of theShape
6393                     without some faces.
6394             """
6395             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6396                                                       doKeepNonSolids, doGlueAllEdges)
6397             if anObj is None:
6398                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6399             self._autoPublish(anObj, theName, "glueFaces")
6400             return anObj
6401
6402         ## Replace coincident edges in theShape by one edge.
6403         #  @param theShape Initial shape.
6404         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6405         #  @param theName Object name; when specified, this parameter is used
6406         #         for result publication in the study. Otherwise, if automatic
6407         #         publication is switched on, default value is used for result name.
6408         #
6409         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6410         #
6411         #  @ref tui_glue_edges "Example"
6412         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6413             """
6414             Replace coincident edges in theShape by one edge.
6415
6416             Parameters:
6417                 theShape Initial shape.
6418                 theTolerance Maximum distance between edges, which can be considered as coincident.
6419                 theName Object name; when specified, this parameter is used
6420                         for result publication in the study. Otherwise, if automatic
6421                         publication is switched on, default value is used for result name.
6422
6423             Returns:    
6424                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6425             """
6426             theTolerance,Parameters = ParseParameters(theTolerance)
6427             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6428             if anObj is None:
6429                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6430             anObj.SetParameters(Parameters)
6431             self._autoPublish(anObj, theName, "glueEdges")
6432             return anObj
6433
6434         ## Find coincident edges in theShape for possible gluing.
6435         #  @param theShape Initial shape.
6436         #  @param theTolerance Maximum distance between edges,
6437         #                      which can be considered as coincident.
6438         #  @param theName Object name; when specified, this parameter is used
6439         #         for result publication in the study. Otherwise, if automatic
6440         #         publication is switched on, default value is used for result name.
6441         #
6442         #  @return GEOM.ListOfGO
6443         #
6444         #  @ref tui_glue_edges "Example"
6445         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6446             """
6447             Find coincident edges in theShape for possible gluing.
6448
6449             Parameters:
6450                 theShape Initial shape.
6451                 theTolerance Maximum distance between edges,
6452                              which can be considered as coincident.
6453                 theName Object name; when specified, this parameter is used
6454                         for result publication in the study. Otherwise, if automatic
6455                         publication is switched on, default value is used for result name.
6456
6457             Returns:                         
6458                 GEOM.ListOfGO
6459             """
6460             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6461             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6462             self._autoPublish(anObj, theName, "edgesToGlue")
6463             return anObj
6464
6465         ## Replace coincident edges in theShape by one edge
6466         #  in compliance with given list of edges.
6467         #  @param theShape Initial shape.
6468         #  @param theTolerance Maximum distance between edges,
6469         #                      which can be considered as coincident.
6470         #  @param theEdges List of edges for gluing.
6471         #  @param theName Object name; when specified, this parameter is used
6472         #         for result publication in the study. Otherwise, if automatic
6473         #         publication is switched on, default value is used for result name.
6474         #
6475         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6476         #          without some edges.
6477         #
6478         #  @ref tui_glue_edges "Example"
6479         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6480             """
6481             Replace coincident edges in theShape by one edge
6482             in compliance with given list of edges.
6483
6484             Parameters:
6485                 theShape Initial shape.
6486                 theTolerance Maximum distance between edges,
6487                              which can be considered as coincident.
6488                 theEdges List of edges for gluing.
6489                 theName Object name; when specified, this parameter is used
6490                         for result publication in the study. Otherwise, if automatic
6491                         publication is switched on, default value is used for result name.
6492
6493             Returns:  
6494                 New GEOM.GEOM_Object, containing a copy of theShape
6495                 without some edges.
6496             """
6497             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6498             if anObj is None:
6499                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6500             self._autoPublish(anObj, theName, "glueEdges")
6501             return anObj
6502
6503         # end of l3_healing
6504         ## @}
6505
6506         ## @addtogroup l3_boolean Boolean Operations
6507         ## @{
6508
6509         # -----------------------------------------------------------------------------
6510         # Boolean (Common, Cut, Fuse, Section)
6511         # -----------------------------------------------------------------------------
6512
6513         ## Perform one of boolean operations on two given shapes.
6514         #  @param theShape1 First argument for boolean operation.
6515         #  @param theShape2 Second argument for boolean operation.
6516         #  @param theOperation Indicates the operation to be done:\n
6517         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6518         #  @param theName Object name; when specified, this parameter is used
6519         #         for result publication in the study. Otherwise, if automatic
6520         #         publication is switched on, default value is used for result name.
6521         #
6522         #  @return New GEOM.GEOM_Object, containing the result shape.
6523         #
6524         #  @ref tui_fuse "Example"
6525         def MakeBoolean(self, theShape1, theShape2, theOperation, theName=None):
6526             """
6527             Perform one of boolean operations on two given shapes.
6528
6529             Parameters: 
6530                 theShape1 First argument for boolean operation.
6531                 theShape2 Second argument for boolean operation.
6532                 theOperation Indicates the operation to be done:
6533                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6534                 theName Object name; when specified, this parameter is used
6535                         for result publication in the study. Otherwise, if automatic
6536                         publication is switched on, default value is used for result name.
6537
6538             Returns:   
6539                 New GEOM.GEOM_Object, containing the result shape.
6540             """
6541             # Example: see GEOM_TestAll.py
6542             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
6543             RaiseIfFailed("MakeBoolean", self.BoolOp)
6544             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6545             self._autoPublish(anObj, theName, def_names[theOperation])
6546             return anObj
6547
6548         ## Perform Common boolean operation on two given shapes.
6549         #  @param theShape1 First argument for boolean operation.
6550         #  @param theShape2 Second argument for boolean operation.
6551         #  @param theName Object name; when specified, this parameter is used
6552         #         for result publication in the study. Otherwise, if automatic
6553         #         publication is switched on, default value is used for result name.
6554         #
6555         #  @return New GEOM.GEOM_Object, containing the result shape.
6556         #
6557         #  @ref tui_common "Example 1"
6558         #  \n @ref swig_MakeCommon "Example 2"
6559         def MakeCommon(self, theShape1, theShape2, theName=None):
6560             """
6561             Perform Common boolean operation on two given shapes.
6562
6563             Parameters: 
6564                 theShape1 First argument for boolean operation.
6565                 theShape2 Second argument for boolean operation.
6566                 theName Object name; when specified, this parameter is used
6567                         for result publication in the study. Otherwise, if automatic
6568                         publication is switched on, default value is used for result name.
6569
6570             Returns:   
6571                 New GEOM.GEOM_Object, containing the result shape.
6572             """
6573             # Example: see GEOM_TestOthers.py
6574             # note: auto-publishing is done in self.MakeBoolean()
6575             return self.MakeBoolean(theShape1, theShape2, 1, theName)
6576
6577         ## Perform Cut boolean operation on two given shapes.
6578         #  @param theShape1 First argument for boolean operation.
6579         #  @param theShape2 Second argument for boolean operation.
6580         #  @param theName Object name; when specified, this parameter is used
6581         #         for result publication in the study. Otherwise, if automatic
6582         #         publication is switched on, default value is used for result name.
6583         #
6584         #  @return New GEOM.GEOM_Object, containing the result shape.
6585         #
6586         #  @ref tui_cut "Example 1"
6587         #  \n @ref swig_MakeCommon "Example 2"
6588         def MakeCut(self, theShape1, theShape2, theName=None):
6589             """
6590             Perform Cut boolean operation on two given shapes.
6591
6592             Parameters: 
6593                 theShape1 First argument for boolean operation.
6594                 theShape2 Second argument for boolean operation.
6595                 theName Object name; when specified, this parameter is used
6596                         for result publication in the study. Otherwise, if automatic
6597                         publication is switched on, default value is used for result name.
6598
6599             Returns:   
6600                 New GEOM.GEOM_Object, containing the result shape.
6601             
6602             """
6603             # Example: see GEOM_TestOthers.py
6604             # note: auto-publishing is done in self.MakeBoolean()
6605             return self.MakeBoolean(theShape1, theShape2, 2, theName)
6606
6607         ## Perform Fuse boolean operation on two given shapes.
6608         #  @param theShape1 First argument for boolean operation.
6609         #  @param theShape2 Second argument for boolean operation.
6610         #  @param theName Object name; when specified, this parameter is used
6611         #         for result publication in the study. Otherwise, if automatic
6612         #         publication is switched on, default value is used for result name.
6613         #
6614         #  @return New GEOM.GEOM_Object, containing the result shape.
6615         #
6616         #  @ref tui_fuse "Example 1"
6617         #  \n @ref swig_MakeCommon "Example 2"
6618         def MakeFuse(self, theShape1, theShape2, theName=None):
6619             """
6620             Perform Fuse boolean operation on two given shapes.
6621
6622             Parameters: 
6623                 theShape1 First argument for boolean operation.
6624                 theShape2 Second argument for boolean operation.
6625                 theName Object name; when specified, this parameter is used
6626                         for result publication in the study. Otherwise, if automatic
6627                         publication is switched on, default value is used for result name.
6628
6629             Returns:   
6630                 New GEOM.GEOM_Object, containing the result shape.
6631             
6632             """
6633             # Example: see GEOM_TestOthers.py
6634             # note: auto-publishing is done in self.MakeBoolean()
6635             return self.MakeBoolean(theShape1, theShape2, 3, theName)
6636
6637         ## Perform Section boolean operation on two given shapes.
6638         #  @param theShape1 First argument for boolean operation.
6639         #  @param theShape2 Second argument for boolean operation.
6640         #  @param theName Object name; when specified, this parameter is used
6641         #         for result publication in the study. Otherwise, if automatic
6642         #         publication is switched on, default value is used for result name.
6643         #
6644         #  @return New GEOM.GEOM_Object, containing the result shape.
6645         #
6646         #  @ref tui_section "Example 1"
6647         #  \n @ref swig_MakeCommon "Example 2"
6648         def MakeSection(self, theShape1, theShape2, theName=None):
6649             """
6650             Perform Section boolean operation on two given shapes.
6651
6652             Parameters: 
6653                 theShape1 First argument for boolean operation.
6654                 theShape2 Second argument for boolean operation.
6655                 theName Object name; when specified, this parameter is used
6656                         for result publication in the study. Otherwise, if automatic
6657                         publication is switched on, default value is used for result name.
6658
6659             Returns:   
6660                 New GEOM.GEOM_Object, containing the result shape.
6661             
6662             """
6663             # Example: see GEOM_TestOthers.py
6664             # note: auto-publishing is done in self.MakeBoolean()
6665             return self.MakeBoolean(theShape1, theShape2, 4, theName)
6666
6667         ## Perform Fuse boolean operation on the list of shapes.
6668         #  @param theShapesList Shapes to be fused.
6669         #  @param theName Object name; when specified, this parameter is used
6670         #         for result publication in the study. Otherwise, if automatic
6671         #         publication is switched on, default value is used for result name.
6672         #
6673         #  @return New GEOM.GEOM_Object, containing the result shape.
6674         #
6675         #  @ref tui_fuse "Example 1"
6676         #  \n @ref swig_MakeCommon "Example 2"
6677         def MakeFuseList(self, theShapesList, theName=None):
6678             """
6679             Perform Fuse boolean operation on the list of shapes.
6680
6681             Parameters: 
6682                 theShapesList Shapes to be fused.
6683                 theName Object name; when specified, this parameter is used
6684                         for result publication in the study. Otherwise, if automatic
6685                         publication is switched on, default value is used for result name.
6686
6687             Returns:   
6688                 New GEOM.GEOM_Object, containing the result shape.
6689             
6690             """
6691             # Example: see GEOM_TestOthers.py
6692             anObj = self.BoolOp.MakeFuseList(theShapesList)
6693             RaiseIfFailed("MakeFuseList", self.BoolOp)
6694             self._autoPublish(anObj, theName, "fuse")
6695             return anObj
6696
6697         ## Perform Common boolean operation on the list of shapes.
6698         #  @param theShapesList Shapes for Common operation.
6699         #  @param theName Object name; when specified, this parameter is used
6700         #         for result publication in the study. Otherwise, if automatic
6701         #         publication is switched on, default value is used for result name.
6702         #
6703         #  @return New GEOM.GEOM_Object, containing the result shape.
6704         #
6705         #  @ref tui_common "Example 1"
6706         #  \n @ref swig_MakeCommon "Example 2"
6707         def MakeCommonList(self, theShapesList, theName=None):
6708             """
6709             Perform Common boolean operation on the list of shapes.
6710
6711             Parameters: 
6712                 theShapesList Shapes for Common operation.
6713                 theName Object name; when specified, this parameter is used
6714                         for result publication in the study. Otherwise, if automatic
6715                         publication is switched on, default value is used for result name.
6716
6717             Returns:   
6718                 New GEOM.GEOM_Object, containing the result shape.
6719             
6720             """
6721             # Example: see GEOM_TestOthers.py
6722             anObj = self.BoolOp.MakeCommonList(theShapesList)
6723             RaiseIfFailed("MakeCommonList", self.BoolOp)
6724             self._autoPublish(anObj, theName, "common")
6725             return anObj
6726
6727         ## Perform Cut boolean operation on one object and the list of tools.
6728         #  @param theMainShape The object of the operation.
6729         #  @param theShapesList The list of tools of the operation.
6730         #  @param theName Object name; when specified, this parameter is used
6731         #         for result publication in the study. Otherwise, if automatic
6732         #         publication is switched on, default value is used for result name.
6733         #
6734         #  @return New GEOM.GEOM_Object, containing the result shape.
6735         #
6736         #  @ref tui_cut "Example 1"
6737         #  \n @ref swig_MakeCommon "Example 2"
6738         def MakeCutList(self, theMainShape, theShapesList, theName=None):
6739             """
6740             Perform Cut boolean operation on one object and the list of tools.
6741
6742             Parameters: 
6743                 theMainShape The object of the operation.
6744                 theShapesList The list of tools of the operation.
6745                 theName Object name; when specified, this parameter is used
6746                         for result publication in the study. Otherwise, if automatic
6747                         publication is switched on, default value is used for result name.
6748
6749             Returns:   
6750                 New GEOM.GEOM_Object, containing the result shape.
6751             
6752             """
6753             # Example: see GEOM_TestOthers.py
6754             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList)
6755             RaiseIfFailed("MakeCutList", self.BoolOp)
6756             self._autoPublish(anObj, theName, "cut")
6757             return anObj
6758
6759         # end of l3_boolean
6760         ## @}
6761
6762         ## @addtogroup l3_basic_op
6763         ## @{
6764
6765         ## Perform partition operation.
6766         #  @param ListShapes Shapes to be intersected.
6767         #  @param ListTools Shapes to intersect theShapes.
6768         #  @param Limit Type of resulting shapes (see ShapeType()).\n
6769         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
6770         #         type will be detected automatically.
6771         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
6772         #                             target type (equal to Limit) are kept in the result,
6773         #                             else standalone shapes of lower dimension
6774         #                             are kept also (if they exist).
6775         #  @param theName Object name; when specified, this parameter is used
6776         #         for result publication in the study. Otherwise, if automatic
6777         #         publication is switched on, default value is used for result name.
6778         #
6779         #  @note Each compound from ListShapes and ListTools will be exploded
6780         #        in order to avoid possible intersection between shapes from this compound.
6781         #
6782         #  After implementation new version of PartitionAlgo (October 2006)
6783         #  other parameters are ignored by current functionality. They are kept
6784         #  in this function only for support old versions.
6785         #      @param ListKeepInside Shapes, outside which the results will be deleted.
6786         #         Each shape from theKeepInside must belong to theShapes also.
6787         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
6788         #         Each shape from theRemoveInside must belong to theShapes also.
6789         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
6790         #      @param ListMaterials Material indices for each shape. Make sence,
6791         #         only if theRemoveWebs is TRUE.
6792         #
6793         #  @return New GEOM.GEOM_Object, containing the result shapes.
6794         #
6795         #  @ref tui_partition "Example"
6796         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6797                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6798                           KeepNonlimitShapes=0, theName=None):
6799             """
6800             Perform partition operation.
6801
6802             Parameters: 
6803                 ListShapes Shapes to be intersected.
6804                 ListTools Shapes to intersect theShapes.
6805                 Limit Type of resulting shapes (see geompy.ShapeType)
6806                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
6807                       type will be detected automatically.
6808                 KeepNonlimitShapes if this parameter == 0, then only shapes of
6809                                     target type (equal to Limit) are kept in the result,
6810                                     else standalone shapes of lower dimension
6811                                     are kept also (if they exist).
6812                 theName Object name; when specified, this parameter is used
6813                         for result publication in the study. Otherwise, if automatic
6814                         publication is switched on, default value is used for result name.
6815             Note:
6816                     Each compound from ListShapes and ListTools will be exploded
6817                     in order to avoid possible intersection between shapes from
6818                     this compound.
6819                     
6820             After implementation new version of PartitionAlgo (October 2006) other
6821             parameters are ignored by current functionality. They are kept in this
6822             function only for support old versions.
6823             
6824             Ignored parameters:
6825                 ListKeepInside Shapes, outside which the results will be deleted.
6826                                Each shape from theKeepInside must belong to theShapes also.
6827                 ListRemoveInside Shapes, inside which the results will be deleted.
6828                                  Each shape from theRemoveInside must belong to theShapes also.
6829                 RemoveWebs If TRUE, perform Glue 3D algorithm.
6830                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
6831
6832             Returns:   
6833                 New GEOM.GEOM_Object, containing the result shapes.
6834             """
6835             # Example: see GEOM_TestAll.py
6836             if Limit == self.ShapeType["AUTO"]:
6837                 # automatic detection of the most appropriate shape limit type
6838                 lim = GEOM.SHAPE
6839                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6840                 Limit = EnumToLong(lim)
6841                 pass
6842             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
6843                                               ListKeepInside, ListRemoveInside,
6844                                               Limit, RemoveWebs, ListMaterials,
6845                                               KeepNonlimitShapes);
6846             RaiseIfFailed("MakePartition", self.BoolOp)
6847             self._autoPublish(anObj, theName, "partition")
6848             return anObj
6849
6850         ## Perform partition operation.
6851         #  This method may be useful if it is needed to make a partition for
6852         #  compound contains nonintersected shapes. Performance will be better
6853         #  since intersection between shapes from compound is not performed.
6854         #
6855         #  Description of all parameters as in previous method MakePartition()
6856         #
6857         #  @note Passed compounds (via ListShapes or via ListTools)
6858         #           have to consist of nonintersecting shapes.
6859         #
6860         #  @return New GEOM.GEOM_Object, containing the result shapes.
6861         #
6862         #  @ref swig_todo "Example"
6863         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
6864                                                  ListKeepInside=[], ListRemoveInside=[],
6865                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
6866                                                  ListMaterials=[], KeepNonlimitShapes=0,
6867                                                  theName=None):
6868             """
6869             Perform partition operation.
6870             This method may be useful if it is needed to make a partition for
6871             compound contains nonintersected shapes. Performance will be better
6872             since intersection between shapes from compound is not performed.
6873
6874             Parameters: 
6875                 Description of all parameters as in method geompy.MakePartition
6876         
6877             NOTE:
6878                 Passed compounds (via ListShapes or via ListTools)
6879                 have to consist of nonintersecting shapes.
6880
6881             Returns:   
6882                 New GEOM.GEOM_Object, containing the result shapes.
6883             """
6884             if Limit == self.ShapeType["AUTO"]:
6885                 # automatic detection of the most appropriate shape limit type
6886                 lim = GEOM.SHAPE
6887                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
6888                 Limit = EnumToLong(lim)
6889                 pass
6890             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
6891                                                                      ListKeepInside, ListRemoveInside,
6892                                                                      Limit, RemoveWebs, ListMaterials,
6893                                                                      KeepNonlimitShapes);
6894             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
6895             self._autoPublish(anObj, theName, "partition")
6896             return anObj
6897
6898         ## See method MakePartition() for more information.
6899         #
6900         #  @ref tui_partition "Example 1"
6901         #  \n @ref swig_Partition "Example 2"
6902         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
6903                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
6904                       KeepNonlimitShapes=0, theName=None):
6905             """
6906             See method geompy.MakePartition for more information.
6907             """
6908             # Example: see GEOM_TestOthers.py
6909             # note: auto-publishing is done in self.MakePartition()
6910             anObj = self.MakePartition(ListShapes, ListTools,
6911                                        ListKeepInside, ListRemoveInside,
6912                                        Limit, RemoveWebs, ListMaterials,
6913                                        KeepNonlimitShapes, theName);
6914             return anObj
6915
6916         ## Perform partition of the Shape with the Plane
6917         #  @param theShape Shape to be intersected.
6918         #  @param thePlane Tool shape, to intersect theShape.
6919         #  @param theName Object name; when specified, this parameter is used
6920         #         for result publication in the study. Otherwise, if automatic
6921         #         publication is switched on, default value is used for result name.
6922         #
6923         #  @return New GEOM.GEOM_Object, containing the result shape.
6924         #
6925         #  @ref tui_partition "Example"
6926         def MakeHalfPartition(self, theShape, thePlane, theName=None):
6927             """
6928             Perform partition of the Shape with the Plane
6929
6930             Parameters: 
6931                 theShape Shape to be intersected.
6932                 thePlane Tool shape, to intersect theShape.
6933                 theName Object name; when specified, this parameter is used
6934                         for result publication in the study. Otherwise, if automatic
6935                         publication is switched on, default value is used for result name.
6936
6937             Returns:  
6938                 New GEOM.GEOM_Object, containing the result shape.
6939             """
6940             # Example: see GEOM_TestAll.py
6941             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
6942             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
6943             self._autoPublish(anObj, theName, "partition")
6944             return anObj
6945
6946         # end of l3_basic_op
6947         ## @}
6948
6949         ## @addtogroup l3_transform
6950         ## @{
6951
6952         ## Translate the given object along the vector, specified
6953         #  by its end points.
6954         #  @param theObject The object to be translated.
6955         #  @param thePoint1 Start point of translation vector.
6956         #  @param thePoint2 End point of translation vector.
6957         #  @param theCopy Flag used to translate object itself or create a copy.
6958         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
6959         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
6960         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
6961             """
6962             Translate the given object along the vector, specified by its end points.
6963
6964             Parameters: 
6965                 theObject The object to be translated.
6966                 thePoint1 Start point of translation vector.
6967                 thePoint2 End point of translation vector.
6968                 theCopy Flag used to translate object itself or create a copy.
6969
6970             Returns: 
6971                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
6972                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
6973             """
6974             if theCopy:
6975                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
6976             else:
6977                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
6978             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
6979             return anObj
6980
6981         ## Translate the given object along the vector, specified
6982         #  by its end points, creating its copy before the translation.
6983         #  @param theObject The object to be translated.
6984         #  @param thePoint1 Start point of translation vector.
6985         #  @param thePoint2 End point of translation vector.
6986         #  @param theName Object name; when specified, this parameter is used
6987         #         for result publication in the study. Otherwise, if automatic
6988         #         publication is switched on, default value is used for result name.
6989         #
6990         #  @return New GEOM.GEOM_Object, containing the translated object.
6991         #
6992         #  @ref tui_translation "Example 1"
6993         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
6994         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
6995             """
6996             Translate the given object along the vector, specified
6997             by its end points, creating its copy before the translation.
6998
6999             Parameters: 
7000                 theObject The object to be translated.
7001                 thePoint1 Start point of translation vector.
7002                 thePoint2 End point of translation vector.
7003                 theName Object name; when specified, this parameter is used
7004                         for result publication in the study. Otherwise, if automatic
7005                         publication is switched on, default value is used for result name.
7006
7007             Returns:  
7008                 New GEOM.GEOM_Object, containing the translated object.
7009             """
7010             # Example: see GEOM_TestAll.py
7011             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7012             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7013             self._autoPublish(anObj, theName, "translated")
7014             return anObj
7015
7016         ## Translate the given object along the vector, specified by its components.
7017         #  @param theObject The object to be translated.
7018         #  @param theDX,theDY,theDZ Components of translation vector.
7019         #  @param theCopy Flag used to translate object itself or create a copy.
7020         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7021         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7022         #
7023         #  @ref tui_translation "Example"
7024         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7025             """
7026             Translate the given object along the vector, specified by its components.
7027
7028             Parameters: 
7029                 theObject The object to be translated.
7030                 theDX,theDY,theDZ Components of translation vector.
7031                 theCopy Flag used to translate object itself or create a copy.
7032
7033             Returns: 
7034                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7035                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7036             """
7037             # Example: see GEOM_TestAll.py
7038             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7039             if theCopy:
7040                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7041             else:
7042                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7043             anObj.SetParameters(Parameters)
7044             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7045             return anObj
7046
7047         ## Translate the given object along the vector, specified
7048         #  by its components, creating its copy before the translation.
7049         #  @param theObject The object to be translated.
7050         #  @param theDX,theDY,theDZ Components of translation vector.
7051         #  @param theName Object name; when specified, this parameter is used
7052         #         for result publication in the study. Otherwise, if automatic
7053         #         publication is switched on, default value is used for result name.
7054         #
7055         #  @return New GEOM.GEOM_Object, containing the translated object.
7056         #
7057         #  @ref tui_translation "Example"
7058         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7059             """
7060             Translate the given object along the vector, specified
7061             by its components, creating its copy before the translation.
7062
7063             Parameters: 
7064                 theObject The object to be translated.
7065                 theDX,theDY,theDZ Components of translation vector.
7066                 theName Object name; when specified, this parameter is used
7067                         for result publication in the study. Otherwise, if automatic
7068                         publication is switched on, default value is used for result name.
7069
7070             Returns: 
7071                 New GEOM.GEOM_Object, containing the translated object.
7072             """
7073             # Example: see GEOM_TestAll.py
7074             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7075             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7076             anObj.SetParameters(Parameters)
7077             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7078             self._autoPublish(anObj, theName, "translated")
7079             return anObj
7080
7081         ## Translate the given object along the given vector.
7082         #  @param theObject The object to be translated.
7083         #  @param theVector The translation vector.
7084         #  @param theCopy Flag used to translate object itself or create a copy.
7085         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7086         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7087         def TranslateVector(self, theObject, theVector, theCopy=False):
7088             """
7089             Translate the given object along the given vector.
7090
7091             Parameters: 
7092                 theObject The object to be translated.
7093                 theVector The translation vector.
7094                 theCopy Flag used to translate object itself or create a copy.
7095
7096             Returns: 
7097                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7098                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7099             """
7100             if theCopy:
7101                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7102             else:
7103                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7104             RaiseIfFailed("TranslateVector", self.TrsfOp)
7105             return anObj
7106
7107         ## Translate the given object along the given vector,
7108         #  creating its copy before the translation.
7109         #  @param theObject The object to be translated.
7110         #  @param theVector The translation vector.
7111         #  @param theName Object name; when specified, this parameter is used
7112         #         for result publication in the study. Otherwise, if automatic
7113         #         publication is switched on, default value is used for result name.
7114         #
7115         #  @return New GEOM.GEOM_Object, containing the translated object.
7116         #
7117         #  @ref tui_translation "Example"
7118         def MakeTranslationVector(self, theObject, theVector, theName=None):
7119             """
7120             Translate the given object along the given vector,
7121             creating its copy before the translation.
7122
7123             Parameters: 
7124                 theObject The object to be translated.
7125                 theVector The translation vector.
7126                 theName Object name; when specified, this parameter is used
7127                         for result publication in the study. Otherwise, if automatic
7128                         publication is switched on, default value is used for result name.
7129
7130             Returns: 
7131                 New GEOM.GEOM_Object, containing the translated object.
7132             """
7133             # Example: see GEOM_TestAll.py
7134             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7135             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7136             self._autoPublish(anObj, theName, "translated")
7137             return anObj
7138
7139         ## Translate the given object along the given vector on given distance.
7140         #  @param theObject The object to be translated.
7141         #  @param theVector The translation vector.
7142         #  @param theDistance The translation distance.
7143         #  @param theCopy Flag used to translate object itself or create a copy.
7144         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7145         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7146         #
7147         #  @ref tui_translation "Example"
7148         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7149             """
7150             Translate the given object along the given vector on given distance.
7151
7152             Parameters: 
7153                 theObject The object to be translated.
7154                 theVector The translation vector.
7155                 theDistance The translation distance.
7156                 theCopy Flag used to translate object itself or create a copy.
7157
7158             Returns: 
7159                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7160                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7161             """
7162             # Example: see GEOM_TestAll.py
7163             theDistance,Parameters = ParseParameters(theDistance)
7164             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7165             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7166             anObj.SetParameters(Parameters)
7167             return anObj
7168
7169         ## Translate the given object along the given vector on given distance,
7170         #  creating its copy before the translation.
7171         #  @param theObject The object to be translated.
7172         #  @param theVector The translation vector.
7173         #  @param theDistance The translation distance.
7174         #  @param theName Object name; when specified, this parameter is used
7175         #         for result publication in the study. Otherwise, if automatic
7176         #         publication is switched on, default value is used for result name.
7177         #
7178         #  @return New GEOM.GEOM_Object, containing the translated object.
7179         #
7180         #  @ref tui_translation "Example"
7181         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7182             """
7183             Translate the given object along the given vector on given distance,
7184             creating its copy before the translation.
7185
7186             Parameters:
7187                 theObject The object to be translated.
7188                 theVector The translation vector.
7189                 theDistance The translation distance.
7190                 theName Object name; when specified, this parameter is used
7191                         for result publication in the study. Otherwise, if automatic
7192                         publication is switched on, default value is used for result name.
7193
7194             Returns: 
7195                 New GEOM.GEOM_Object, containing the translated object.
7196             """
7197             # Example: see GEOM_TestAll.py
7198             theDistance,Parameters = ParseParameters(theDistance)
7199             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7200             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7201             anObj.SetParameters(Parameters)
7202             self._autoPublish(anObj, theName, "translated")
7203             return anObj
7204
7205         ## Rotate the given object around the given axis on the given angle.
7206         #  @param theObject The object to be rotated.
7207         #  @param theAxis Rotation axis.
7208         #  @param theAngle Rotation angle in radians.
7209         #  @param theCopy Flag used to rotate object itself or create a copy.
7210         #
7211         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7212         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7213         #
7214         #  @ref tui_rotation "Example"
7215         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7216             """
7217             Rotate the given object around the given axis on the given angle.
7218
7219             Parameters:
7220                 theObject The object to be rotated.
7221                 theAxis Rotation axis.
7222                 theAngle Rotation angle in radians.
7223                 theCopy Flag used to rotate object itself or create a copy.
7224
7225             Returns:
7226                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7227                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7228             """
7229             # Example: see GEOM_TestAll.py
7230             flag = False
7231             if isinstance(theAngle,str):
7232                 flag = True
7233             theAngle, Parameters = ParseParameters(theAngle)
7234             if flag:
7235                 theAngle = theAngle*math.pi/180.0
7236             if theCopy:
7237                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7238             else:
7239                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7240             RaiseIfFailed("Rotate", self.TrsfOp)
7241             anObj.SetParameters(Parameters)
7242             return anObj
7243
7244         ## Rotate the given object around the given axis
7245         #  on the given angle, creating its copy before the rotatation.
7246         #  @param theObject The object to be rotated.
7247         #  @param theAxis Rotation axis.
7248         #  @param theAngle Rotation angle in radians.
7249         #  @param theName Object name; when specified, this parameter is used
7250         #         for result publication in the study. Otherwise, if automatic
7251         #         publication is switched on, default value is used for result name.
7252         #
7253         #  @return New GEOM.GEOM_Object, containing the rotated object.
7254         #
7255         #  @ref tui_rotation "Example"
7256         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7257             """
7258             Rotate the given object around the given axis
7259             on the given angle, creating its copy before the rotatation.
7260
7261             Parameters:
7262                 theObject The object to be rotated.
7263                 theAxis Rotation axis.
7264                 theAngle Rotation angle in radians.
7265                 theName Object name; when specified, this parameter is used
7266                         for result publication in the study. Otherwise, if automatic
7267                         publication is switched on, default value is used for result name.
7268
7269             Returns:
7270                 New GEOM.GEOM_Object, containing the rotated object.
7271             """
7272             # Example: see GEOM_TestAll.py
7273             flag = False
7274             if isinstance(theAngle,str):
7275                 flag = True
7276             theAngle, Parameters = ParseParameters(theAngle)
7277             if flag:
7278                 theAngle = theAngle*math.pi/180.0
7279             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7280             RaiseIfFailed("RotateCopy", self.TrsfOp)
7281             anObj.SetParameters(Parameters)
7282             self._autoPublish(anObj, theName, "rotated")
7283             return anObj
7284
7285         ## Rotate given object around vector perpendicular to plane
7286         #  containing three points.
7287         #  @param theObject The object to be rotated.
7288         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7289         #  containing the three points.
7290         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7291         #  @param theCopy Flag used to rotate object itself or create a copy.
7292         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7293         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7294         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7295             """
7296             Rotate given object around vector perpendicular to plane
7297             containing three points.
7298
7299             Parameters:
7300                 theObject The object to be rotated.
7301                 theCentPoint central point  the axis is the vector perpendicular to the plane
7302                              containing the three points.
7303                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7304                 theCopy Flag used to rotate object itself or create a copy.
7305
7306             Returns:
7307                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7308                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7309             """
7310             if theCopy:
7311                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7312             else:
7313                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7314             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7315             return anObj
7316
7317         ## Rotate given object around vector perpendicular to plane
7318         #  containing three points, creating its copy before the rotatation.
7319         #  @param theObject The object to be rotated.
7320         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7321         #  containing the three points.
7322         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7323         #  @param theName Object name; when specified, this parameter is used
7324         #         for result publication in the study. Otherwise, if automatic
7325         #         publication is switched on, default value is used for result name.
7326         #
7327         #  @return New GEOM.GEOM_Object, containing the rotated object.
7328         #
7329         #  @ref tui_rotation "Example"
7330         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7331             """
7332             Rotate given object around vector perpendicular to plane
7333             containing three points, creating its copy before the rotatation.
7334
7335             Parameters:
7336                 theObject The object to be rotated.
7337                 theCentPoint central point  the axis is the vector perpendicular to the plane
7338                              containing the three points.
7339                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7340                 theName Object name; when specified, this parameter is used
7341                         for result publication in the study. Otherwise, if automatic
7342                         publication is switched on, default value is used for result name.
7343
7344             Returns:
7345                 New GEOM.GEOM_Object, containing the rotated object.
7346             """
7347             # Example: see GEOM_TestAll.py
7348             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7349             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7350             self._autoPublish(anObj, theName, "rotated")
7351             return anObj
7352
7353         ## Scale the given object by the specified factor.
7354         #  @param theObject The object to be scaled.
7355         #  @param thePoint Center point for scaling.
7356         #                  Passing None for it means scaling relatively the origin of global CS.
7357         #  @param theFactor Scaling factor value.
7358         #  @param theCopy Flag used to scale object itself or create a copy.
7359         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7360         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7361         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7362             """
7363             Scale the given object by the specified factor.
7364
7365             Parameters:
7366                 theObject The object to be scaled.
7367                 thePoint Center point for scaling.
7368                          Passing None for it means scaling relatively the origin of global CS.
7369                 theFactor Scaling factor value.
7370                 theCopy Flag used to scale object itself or create a copy.
7371
7372             Returns:    
7373                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7374                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7375             """
7376             # Example: see GEOM_TestAll.py
7377             theFactor, Parameters = ParseParameters(theFactor)
7378             if theCopy:
7379                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7380             else:
7381                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7382             RaiseIfFailed("Scale", self.TrsfOp)
7383             anObj.SetParameters(Parameters)
7384             return anObj
7385
7386         ## Scale the given object by the factor, creating its copy before the scaling.
7387         #  @param theObject The object to be scaled.
7388         #  @param thePoint Center point for scaling.
7389         #                  Passing None for it means scaling relatively the origin of global CS.
7390         #  @param theFactor Scaling factor value.
7391         #  @param theName Object name; when specified, this parameter is used
7392         #         for result publication in the study. Otherwise, if automatic
7393         #         publication is switched on, default value is used for result name.
7394         #
7395         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7396         #
7397         #  @ref tui_scale "Example"
7398         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7399             """
7400             Scale the given object by the factor, creating its copy before the scaling.
7401
7402             Parameters:
7403                 theObject The object to be scaled.
7404                 thePoint Center point for scaling.
7405                          Passing None for it means scaling relatively the origin of global CS.
7406                 theFactor Scaling factor value.
7407                 theName Object name; when specified, this parameter is used
7408                         for result publication in the study. Otherwise, if automatic
7409                         publication is switched on, default value is used for result name.
7410
7411             Returns:    
7412                 New GEOM.GEOM_Object, containing the scaled shape.
7413             """
7414             # Example: see GEOM_TestAll.py
7415             theFactor, Parameters = ParseParameters(theFactor)
7416             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7417             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7418             anObj.SetParameters(Parameters)
7419             self._autoPublish(anObj, theName, "scaled")
7420             return anObj
7421
7422         ## Scale the given object by different factors along coordinate axes.
7423         #  @param theObject The object to be scaled.
7424         #  @param thePoint Center point for scaling.
7425         #                  Passing None for it means scaling relatively the origin of global CS.
7426         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7427         #  @param theCopy Flag used to scale object itself or create a copy.
7428         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7429         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7430         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
7431             """
7432             Scale the given object by different factors along coordinate axes.
7433
7434             Parameters:
7435                 theObject The object to be scaled.
7436                 thePoint Center point for scaling.
7437                             Passing None for it means scaling relatively the origin of global CS.
7438                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7439                 theCopy Flag used to scale object itself or create a copy.
7440
7441             Returns:    
7442                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7443                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7444             """
7445             # Example: see GEOM_TestAll.py
7446             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7447             if theCopy:
7448                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7449                                                             theFactorX, theFactorY, theFactorZ)
7450             else:
7451                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
7452                                                         theFactorX, theFactorY, theFactorZ)
7453             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
7454             anObj.SetParameters(Parameters)
7455             return anObj
7456
7457         ## Scale the given object by different factors along coordinate axes,
7458         #  creating its copy before the scaling.
7459         #  @param theObject The object to be scaled.
7460         #  @param thePoint Center point for scaling.
7461         #                  Passing None for it means scaling relatively the origin of global CS.
7462         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7463         #  @param theName Object name; when specified, this parameter is used
7464         #         for result publication in the study. Otherwise, if automatic
7465         #         publication is switched on, default value is used for result name.
7466         #
7467         #  @return New GEOM.GEOM_Object, containing the scaled shape.
7468         #
7469         #  @ref swig_scale "Example"
7470         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
7471             """
7472             Scale the given object by different factors along coordinate axes,
7473             creating its copy before the scaling.
7474
7475             Parameters:
7476                 theObject The object to be scaled.
7477                 thePoint Center point for scaling.
7478                             Passing None for it means scaling relatively the origin of global CS.
7479                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
7480                 theName Object name; when specified, this parameter is used
7481                         for result publication in the study. Otherwise, if automatic
7482                         publication is switched on, default value is used for result name.
7483
7484             Returns:
7485                 New GEOM.GEOM_Object, containing the scaled shape.
7486             """
7487             # Example: see GEOM_TestAll.py
7488             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
7489             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
7490                                                         theFactorX, theFactorY, theFactorZ)
7491             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
7492             anObj.SetParameters(Parameters)
7493             self._autoPublish(anObj, theName, "scaled")
7494             return anObj
7495
7496         ## Mirror an object relatively the given plane.
7497         #  @param theObject The object to be mirrored.
7498         #  @param thePlane Plane of symmetry.
7499         #  @param theCopy Flag used to mirror object itself or create a copy.
7500         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7501         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7502         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
7503             """
7504             Mirror an object relatively the given plane.
7505
7506             Parameters:
7507                 theObject The object to be mirrored.
7508                 thePlane Plane of symmetry.
7509                 theCopy Flag used to mirror object itself or create a copy.
7510
7511             Returns:
7512                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7513                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7514             """
7515             if theCopy:
7516                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7517             else:
7518                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
7519             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
7520             return anObj
7521
7522         ## Create an object, symmetrical
7523         #  to the given one relatively the given plane.
7524         #  @param theObject The object to be mirrored.
7525         #  @param thePlane Plane of symmetry.
7526         #  @param theName Object name; when specified, this parameter is used
7527         #         for result publication in the study. Otherwise, if automatic
7528         #         publication is switched on, default value is used for result name.
7529         #
7530         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7531         #
7532         #  @ref tui_mirror "Example"
7533         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
7534             """
7535             Create an object, symmetrical to the given one relatively the given plane.
7536
7537             Parameters:
7538                 theObject The object to be mirrored.
7539                 thePlane Plane of symmetry.
7540                 theName Object name; when specified, this parameter is used
7541                         for result publication in the study. Otherwise, if automatic
7542                         publication is switched on, default value is used for result name.
7543
7544             Returns:
7545                 New GEOM.GEOM_Object, containing the mirrored shape.
7546             """
7547             # Example: see GEOM_TestAll.py
7548             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
7549             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
7550             self._autoPublish(anObj, theName, "mirrored")
7551             return anObj
7552
7553         ## Mirror an object relatively the given axis.
7554         #  @param theObject The object to be mirrored.
7555         #  @param theAxis Axis of symmetry.
7556         #  @param theCopy Flag used to mirror object itself or create a copy.
7557         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7558         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7559         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
7560             """
7561             Mirror an object relatively the given axis.
7562
7563             Parameters:
7564                 theObject The object to be mirrored.
7565                 theAxis Axis of symmetry.
7566                 theCopy Flag used to mirror object itself or create a copy.
7567
7568             Returns:
7569                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7570                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7571             """
7572             if theCopy:
7573                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7574             else:
7575                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
7576             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
7577             return anObj
7578
7579         ## Create an object, symmetrical
7580         #  to the given one relatively the given axis.
7581         #  @param theObject The object to be mirrored.
7582         #  @param theAxis Axis of symmetry.
7583         #  @param theName Object name; when specified, this parameter is used
7584         #         for result publication in the study. Otherwise, if automatic
7585         #         publication is switched on, default value is used for result name.
7586         #
7587         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7588         #
7589         #  @ref tui_mirror "Example"
7590         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
7591             """
7592             Create an object, symmetrical to the given one relatively the given axis.
7593
7594             Parameters:
7595                 theObject The object to be mirrored.
7596                 theAxis Axis of symmetry.
7597                 theName Object name; when specified, this parameter is used
7598                         for result publication in the study. Otherwise, if automatic
7599                         publication is switched on, default value is used for result name.
7600
7601             Returns: 
7602                 New GEOM.GEOM_Object, containing the mirrored shape.
7603             """
7604             # Example: see GEOM_TestAll.py
7605             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
7606             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
7607             self._autoPublish(anObj, theName, "mirrored")
7608             return anObj
7609
7610         ## Mirror an object relatively the given point.
7611         #  @param theObject The object to be mirrored.
7612         #  @param thePoint Point of symmetry.
7613         #  @param theCopy Flag used to mirror object itself or create a copy.
7614         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7615         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
7616         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
7617             """
7618             Mirror an object relatively the given point.
7619
7620             Parameters:
7621                 theObject The object to be mirrored.
7622                 thePoint Point of symmetry.
7623                 theCopy Flag used to mirror object itself or create a copy.
7624
7625             Returns:
7626                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7627                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
7628             """
7629             # Example: see GEOM_TestAll.py
7630             if theCopy:
7631                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7632             else:
7633                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
7634             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
7635             return anObj
7636
7637         ## Create an object, symmetrical
7638         #  to the given one relatively the given point.
7639         #  @param theObject The object to be mirrored.
7640         #  @param thePoint Point of symmetry.
7641         #  @param theName Object name; when specified, this parameter is used
7642         #         for result publication in the study. Otherwise, if automatic
7643         #         publication is switched on, default value is used for result name.
7644         #
7645         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
7646         #
7647         #  @ref tui_mirror "Example"
7648         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
7649             """
7650             Create an object, symmetrical
7651             to the given one relatively the given point.
7652
7653             Parameters:
7654                 theObject The object to be mirrored.
7655                 thePoint Point of symmetry.
7656                 theName Object name; when specified, this parameter is used
7657                         for result publication in the study. Otherwise, if automatic
7658                         publication is switched on, default value is used for result name.
7659
7660             Returns:  
7661                 New GEOM.GEOM_Object, containing the mirrored shape.
7662             """
7663             # Example: see GEOM_TestAll.py
7664             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
7665             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
7666             self._autoPublish(anObj, theName, "mirrored")
7667             return anObj
7668
7669         ## Modify the location of the given object.
7670         #  @param theObject The object to be displaced.
7671         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7672         #                     If \a theStartLCS is NULL, displacement
7673         #                     will be performed from global CS.\n
7674         #                     If \a theObject itself is used as \a theStartLCS,
7675         #                     its location will be changed to \a theEndLCS.
7676         #  @param theEndLCS Coordinate system to perform displacement to it.
7677         #  @param theCopy Flag used to displace object itself or create a copy.
7678         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7679         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
7680         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
7681             """
7682             Modify the Location of the given object by LCS, creating its copy before the setting.
7683
7684             Parameters:
7685                 theObject The object to be displaced.
7686                 theStartLCS Coordinate system to perform displacement from it.
7687                             If theStartLCS is NULL, displacement
7688                             will be performed from global CS.
7689                             If theObject itself is used as theStartLCS,
7690                             its location will be changed to theEndLCS.
7691                 theEndLCS Coordinate system to perform displacement to it.
7692                 theCopy Flag used to displace object itself or create a copy.
7693
7694             Returns:
7695                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7696                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
7697             """
7698             # Example: see GEOM_TestAll.py
7699             if theCopy:
7700                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7701             else:
7702                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
7703             RaiseIfFailed("Displace", self.TrsfOp)
7704             return anObj
7705
7706         ## Modify the Location of the given object by LCS,
7707         #  creating its copy before the setting.
7708         #  @param theObject The object to be displaced.
7709         #  @param theStartLCS Coordinate system to perform displacement from it.\n
7710         #                     If \a theStartLCS is NULL, displacement
7711         #                     will be performed from global CS.\n
7712         #                     If \a theObject itself is used as \a theStartLCS,
7713         #                     its location will be changed to \a theEndLCS.
7714         #  @param theEndLCS Coordinate system to perform displacement to it.
7715         #  @param theName Object name; when specified, this parameter is used
7716         #         for result publication in the study. Otherwise, if automatic
7717         #         publication is switched on, default value is used for result name.
7718         #
7719         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7720         #
7721         #  @ref tui_modify_location "Example"
7722         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
7723             """
7724             Modify the Location of the given object by LCS, creating its copy before the setting.
7725
7726             Parameters:
7727                 theObject The object to be displaced.
7728                 theStartLCS Coordinate system to perform displacement from it.
7729                             If theStartLCS is NULL, displacement
7730                             will be performed from global CS.
7731                             If theObject itself is used as theStartLCS,
7732                             its location will be changed to theEndLCS.
7733                 theEndLCS Coordinate system to perform displacement to it.
7734                 theName Object name; when specified, this parameter is used
7735                         for result publication in the study. Otherwise, if automatic
7736                         publication is switched on, default value is used for result name.
7737
7738             Returns:  
7739                 New GEOM.GEOM_Object, containing the displaced shape.
7740
7741             Example of usage:
7742                 # create local coordinate systems
7743                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
7744                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
7745                 # modify the location of the given object
7746                 position = geompy.MakePosition(cylinder, cs1, cs2)
7747             """
7748             # Example: see GEOM_TestAll.py
7749             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
7750             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
7751             self._autoPublish(anObj, theName, "displaced")
7752             return anObj
7753
7754         ## Modify the Location of the given object by Path.
7755         #  @param  theObject The object to be displaced.
7756         #  @param  thePath Wire or Edge along that the object will be translated.
7757         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
7758         #  @param  theCopy is to create a copy objects if true.
7759         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
7760         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
7761         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
7762         #
7763         #  @ref tui_modify_location "Example"
7764         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
7765             """
7766             Modify the Location of the given object by Path.
7767
7768             Parameters:
7769                  theObject The object to be displaced.
7770                  thePath Wire or Edge along that the object will be translated.
7771                  theDistance progress of Path (0 = start location, 1 = end of path location).
7772                  theCopy is to create a copy objects if true.
7773                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7774
7775             Returns:  
7776                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
7777                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
7778
7779             Example of usage:
7780                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
7781             """
7782             # Example: see GEOM_TestAll.py
7783             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
7784             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7785             return anObj
7786
7787         ## Modify the Location of the given object by Path, creating its copy before the operation.
7788         #  @param theObject The object to be displaced.
7789         #  @param thePath Wire or Edge along that the object will be translated.
7790         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
7791         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
7792         #  @param theName Object name; when specified, this parameter is used
7793         #         for result publication in the study. Otherwise, if automatic
7794         #         publication is switched on, default value is used for result name.
7795         #
7796         #  @return New GEOM.GEOM_Object, containing the displaced shape.
7797         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
7798             """
7799             Modify the Location of the given object by Path, creating its copy before the operation.
7800
7801             Parameters:
7802                  theObject The object to be displaced.
7803                  thePath Wire or Edge along that the object will be translated.
7804                  theDistance progress of Path (0 = start location, 1 = end of path location).
7805                  theReverse  0 - for usual direction, 1 - to reverse path direction.
7806                  theName Object name; when specified, this parameter is used
7807                          for result publication in the study. Otherwise, if automatic
7808                          publication is switched on, default value is used for result name.
7809
7810             Returns:  
7811                 New GEOM.GEOM_Object, containing the displaced shape.
7812             """
7813             # Example: see GEOM_TestAll.py
7814             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
7815             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
7816             self._autoPublish(anObj, theName, "displaced")
7817             return anObj
7818
7819         ## Offset given shape.
7820         #  @param theObject The base object for the offset.
7821         #  @param theOffset Offset value.
7822         #  @param theCopy Flag used to offset object itself or create a copy.
7823         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7824         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
7825         def Offset(self, theObject, theOffset, theCopy=False):
7826             """
7827             Offset given shape.
7828
7829             Parameters:
7830                 theObject The base object for the offset.
7831                 theOffset Offset value.
7832                 theCopy Flag used to offset object itself or create a copy.
7833
7834             Returns: 
7835                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7836                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
7837             """
7838             theOffset, Parameters = ParseParameters(theOffset)
7839             if theCopy:
7840                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7841             else:
7842                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
7843             RaiseIfFailed("Offset", self.TrsfOp)
7844             anObj.SetParameters(Parameters)
7845             return anObj
7846
7847         ## Create new object as offset of the given one.
7848         #  @param theObject The base object for the offset.
7849         #  @param theOffset Offset value.
7850         #  @param theName Object name; when specified, this parameter is used
7851         #         for result publication in the study. Otherwise, if automatic
7852         #         publication is switched on, default value is used for result name.
7853         #
7854         #  @return New GEOM.GEOM_Object, containing the offset object.
7855         #
7856         #  @ref tui_offset "Example"
7857         def MakeOffset(self, theObject, theOffset, theName=None):
7858             """
7859             Create new object as offset of the given one.
7860
7861             Parameters:
7862                 theObject The base object for the offset.
7863                 theOffset Offset value.
7864                 theName Object name; when specified, this parameter is used
7865                         for result publication in the study. Otherwise, if automatic
7866                         publication is switched on, default value is used for result name.
7867
7868             Returns:  
7869                 New GEOM.GEOM_Object, containing the offset object.
7870
7871             Example of usage:
7872                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
7873                  # create a new object as offset of the given object
7874                  offset = geompy.MakeOffset(box, 70.)
7875             """
7876             # Example: see GEOM_TestAll.py
7877             theOffset, Parameters = ParseParameters(theOffset)
7878             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
7879             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
7880             anObj.SetParameters(Parameters)
7881             self._autoPublish(anObj, theName, "offset")
7882             return anObj
7883
7884         ## Create new object as projection of the given one on a 2D surface.
7885         #  @param theSource The source object for the projection. It can be a point, edge or wire.
7886         #  @param theTarget The target object. It can be planar or cylindrical face.
7887         #  @param theName Object name; when specified, this parameter is used
7888         #         for result publication in the study. Otherwise, if automatic
7889         #         publication is switched on, default value is used for result name.
7890         #
7891         #  @return New GEOM.GEOM_Object, containing the projection.
7892         #
7893         #  @ref tui_projection "Example"
7894         def MakeProjection(self, theSource, theTarget, theName=None):
7895             """
7896             Create new object as projection of the given one on a 2D surface.
7897
7898             Parameters:
7899                 theSource The source object for the projection. It can be a point, edge or wire.
7900                 theTarget The target object. It can be planar or cylindrical face.
7901                 theName Object name; when specified, this parameter is used
7902                         for result publication in the study. Otherwise, if automatic
7903                         publication is switched on, default value is used for result name.
7904
7905             Returns:  
7906                 New GEOM.GEOM_Object, containing the projection.
7907             """
7908             # Example: see GEOM_TestAll.py
7909             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
7910             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
7911             self._autoPublish(anObj, theName, "projection")
7912             return anObj
7913
7914         # -----------------------------------------------------------------------------
7915         # Patterns
7916         # -----------------------------------------------------------------------------
7917
7918         ## Translate the given object along the given vector a given number times
7919         #  @param theObject The object to be translated.
7920         #  @param theVector Direction of the translation. DX if None.
7921         #  @param theStep Distance to translate on.
7922         #  @param theNbTimes Quantity of translations to be done.
7923         #  @param theName Object name; when specified, this parameter is used
7924         #         for result publication in the study. Otherwise, if automatic
7925         #         publication is switched on, default value is used for result name.
7926         #
7927         #  @return New GEOM.GEOM_Object, containing compound of all
7928         #          the shapes, obtained after each translation.
7929         #
7930         #  @ref tui_multi_translation "Example"
7931         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
7932             """
7933             Translate the given object along the given vector a given number times
7934
7935             Parameters:
7936                 theObject The object to be translated.
7937                 theVector Direction of the translation. DX if None.
7938                 theStep Distance to translate on.
7939                 theNbTimes Quantity of translations to be done.
7940                 theName Object name; when specified, this parameter is used
7941                         for result publication in the study. Otherwise, if automatic
7942                         publication is switched on, default value is used for result name.
7943
7944             Returns:     
7945                 New GEOM.GEOM_Object, containing compound of all
7946                 the shapes, obtained after each translation.
7947
7948             Example of usage:
7949                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
7950             """
7951             # Example: see GEOM_TestAll.py
7952             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
7953             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
7954             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
7955             anObj.SetParameters(Parameters)
7956             self._autoPublish(anObj, theName, "multitranslation")
7957             return anObj
7958
7959         ## Conseqently apply two specified translations to theObject specified number of times.
7960         #  @param theObject The object to be translated.
7961         #  @param theVector1 Direction of the first translation. DX if None.
7962         #  @param theStep1 Step of the first translation.
7963         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
7964         #  @param theVector2 Direction of the second translation. DY if None.
7965         #  @param theStep2 Step of the second translation.
7966         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
7967         #  @param theName Object name; when specified, this parameter is used
7968         #         for result publication in the study. Otherwise, if automatic
7969         #         publication is switched on, default value is used for result name.
7970         #
7971         #  @return New GEOM.GEOM_Object, containing compound of all
7972         #          the shapes, obtained after each translation.
7973         #
7974         #  @ref tui_multi_translation "Example"
7975         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
7976                                    theVector2, theStep2, theNbTimes2, theName=None):
7977             """
7978             Conseqently apply two specified translations to theObject specified number of times.
7979
7980             Parameters:
7981                 theObject The object to be translated.
7982                 theVector1 Direction of the first translation. DX if None.
7983                 theStep1 Step of the first translation.
7984                 theNbTimes1 Quantity of translations to be done along theVector1.
7985                 theVector2 Direction of the second translation. DY if None.
7986                 theStep2 Step of the second translation.
7987                 theNbTimes2 Quantity of translations to be done along theVector2.
7988                 theName Object name; when specified, this parameter is used
7989                         for result publication in the study. Otherwise, if automatic
7990                         publication is switched on, default value is used for result name.
7991
7992             Returns:
7993                 New GEOM.GEOM_Object, containing compound of all
7994                 the shapes, obtained after each translation.
7995
7996             Example of usage:
7997                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
7998             """
7999             # Example: see GEOM_TestAll.py
8000             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8001             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8002                                                  theVector2, theStep2, theNbTimes2)
8003             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8004             anObj.SetParameters(Parameters)
8005             self._autoPublish(anObj, theName, "multitranslation")
8006             return anObj
8007
8008         ## Rotate the given object around the given axis a given number times.
8009         #  Rotation angle will be 2*PI/theNbTimes.
8010         #  @param theObject The object to be rotated.
8011         #  @param theAxis The rotation axis. DZ if None.
8012         #  @param theNbTimes Quantity of rotations to be done.
8013         #  @param theName Object name; when specified, this parameter is used
8014         #         for result publication in the study. Otherwise, if automatic
8015         #         publication is switched on, default value is used for result name.
8016         #
8017         #  @return New GEOM.GEOM_Object, containing compound of all the
8018         #          shapes, obtained after each rotation.
8019         #
8020         #  @ref tui_multi_rotation "Example"
8021         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8022             """
8023             Rotate the given object around the given axis a given number times.
8024             Rotation angle will be 2*PI/theNbTimes.
8025
8026             Parameters:
8027                 theObject The object to be rotated.
8028                 theAxis The rotation axis. DZ if None.
8029                 theNbTimes Quantity of rotations to be done.
8030                 theName Object name; when specified, this parameter is used
8031                         for result publication in the study. Otherwise, if automatic
8032                         publication is switched on, default value is used for result name.
8033
8034             Returns:     
8035                 New GEOM.GEOM_Object, containing compound of all the
8036                 shapes, obtained after each rotation.
8037
8038             Example of usage:
8039                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8040             """
8041             # Example: see GEOM_TestAll.py
8042             theNbTimes, Parameters = ParseParameters(theNbTimes)
8043             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8044             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8045             anObj.SetParameters(Parameters)
8046             self._autoPublish(anObj, theName, "multirotation")
8047             return anObj
8048
8049         ## Rotate the given object around the given axis
8050         #  a given number times on the given angle.
8051         #  @param theObject The object to be rotated.
8052         #  @param theAxis The rotation axis. DZ if None.
8053         #  @param theAngleStep Rotation angle in radians.
8054         #  @param theNbTimes Quantity of rotations to be done.
8055         #  @param theName Object name; when specified, this parameter is used
8056         #         for result publication in the study. Otherwise, if automatic
8057         #         publication is switched on, default value is used for result name.
8058         #
8059         #  @return New GEOM.GEOM_Object, containing compound of all the
8060         #          shapes, obtained after each rotation.
8061         #
8062         #  @ref tui_multi_rotation "Example"
8063         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8064             """
8065             Rotate the given object around the given axis
8066             a given number times on the given angle.
8067
8068             Parameters:
8069                 theObject The object to be rotated.
8070                 theAxis The rotation axis. DZ if None.
8071                 theAngleStep Rotation angle in radians.
8072                 theNbTimes Quantity of rotations to be done.
8073                 theName Object name; when specified, this parameter is used
8074                         for result publication in the study. Otherwise, if automatic
8075                         publication is switched on, default value is used for result name.
8076
8077             Returns:     
8078                 New GEOM.GEOM_Object, containing compound of all the
8079                 shapes, obtained after each rotation.
8080
8081             Example of usage:
8082                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8083             """
8084             # Example: see GEOM_TestAll.py
8085             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8086             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8087             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8088             anObj.SetParameters(Parameters)
8089             self._autoPublish(anObj, theName, "multirotation")
8090             return anObj
8091
8092         ## Rotate the given object around the given axis a given
8093         #  number times and multi-translate each rotation result.
8094         #  Rotation angle will be 2*PI/theNbTimes1.
8095         #  Translation direction passes through center of gravity
8096         #  of rotated shape and its projection on the rotation axis.
8097         #  @param theObject The object to be rotated.
8098         #  @param theAxis Rotation axis. DZ if None.
8099         #  @param theNbTimes1 Quantity of rotations to be done.
8100         #  @param theRadialStep Translation distance.
8101         #  @param theNbTimes2 Quantity of translations to be done.
8102         #  @param theName Object name; when specified, this parameter is used
8103         #         for result publication in the study. Otherwise, if automatic
8104         #         publication is switched on, default value is used for result name.
8105         #
8106         #  @return New GEOM.GEOM_Object, containing compound of all the
8107         #          shapes, obtained after each transformation.
8108         #
8109         #  @ref tui_multi_rotation "Example"
8110         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8111             """
8112             Rotate the given object around the
8113             given axis on the given angle a given number
8114             times and multi-translate each rotation result.
8115             Translation direction passes through center of gravity
8116             of rotated shape and its projection on the rotation axis.
8117
8118             Parameters:
8119                 theObject The object to be rotated.
8120                 theAxis Rotation axis. DZ if None.
8121                 theNbTimes1 Quantity of rotations to be done.
8122                 theRadialStep Translation distance.
8123                 theNbTimes2 Quantity of translations to be done.
8124                 theName Object name; when specified, this parameter is used
8125                         for result publication in the study. Otherwise, if automatic
8126                         publication is switched on, default value is used for result name.
8127
8128             Returns:    
8129                 New GEOM.GEOM_Object, containing compound of all the
8130                 shapes, obtained after each transformation.
8131
8132             Example of usage:
8133                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8134             """
8135             # Example: see GEOM_TestAll.py
8136             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8137             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8138             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8139             anObj.SetParameters(Parameters)
8140             self._autoPublish(anObj, theName, "multirotation")
8141             return anObj
8142
8143         ## Rotate the given object around the
8144         #  given axis on the given angle a given number
8145         #  times and multi-translate each rotation result.
8146         #  Translation direction passes through center of gravity
8147         #  of rotated shape and its projection on the rotation axis.
8148         #  @param theObject The object to be rotated.
8149         #  @param theAxis Rotation axis. DZ if None.
8150         #  @param theAngleStep Rotation angle in radians.
8151         #  @param theNbTimes1 Quantity of rotations to be done.
8152         #  @param theRadialStep Translation distance.
8153         #  @param theNbTimes2 Quantity of translations to be done.
8154         #  @param theName Object name; when specified, this parameter is used
8155         #         for result publication in the study. Otherwise, if automatic
8156         #         publication is switched on, default value is used for result name.
8157         #
8158         #  @return New GEOM.GEOM_Object, containing compound of all the
8159         #          shapes, obtained after each transformation.
8160         #
8161         #  @ref tui_multi_rotation "Example"
8162         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8163             """
8164             Rotate the given object around the
8165             given axis on the given angle a given number
8166             times and multi-translate each rotation result.
8167             Translation direction passes through center of gravity
8168             of rotated shape and its projection on the rotation axis.
8169
8170             Parameters:
8171                 theObject The object to be rotated.
8172                 theAxis Rotation axis. DZ if None.
8173                 theAngleStep Rotation angle in radians.
8174                 theNbTimes1 Quantity of rotations to be done.
8175                 theRadialStep Translation distance.
8176                 theNbTimes2 Quantity of translations to be done.
8177                 theName Object name; when specified, this parameter is used
8178                         for result publication in the study. Otherwise, if automatic
8179                         publication is switched on, default value is used for result name.
8180
8181             Returns:    
8182                 New GEOM.GEOM_Object, containing compound of all the
8183                 shapes, obtained after each transformation.
8184
8185             Example of usage:
8186                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8187             """
8188             # Example: see GEOM_TestAll.py
8189             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8190             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8191             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8192             anObj.SetParameters(Parameters)
8193             self._autoPublish(anObj, theName, "multirotation")
8194             return anObj
8195
8196         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8197         #
8198         #  @ref swig_MakeMultiRotation "Example"
8199         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8200             """
8201             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8202
8203             Example of usage:
8204                 pz = geompy.MakeVertex(0, 0, 100)
8205                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8206                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8207             """
8208             # Example: see GEOM_TestOthers.py
8209             aVec = self.MakeLine(aPoint,aDir)
8210             # note: auto-publishing is done in self.MultiRotate1D()
8211             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8212             return anObj
8213
8214         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8215         #
8216         #  @ref swig_MakeMultiRotation "Example"
8217         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8218             """
8219             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8220
8221             Example of usage:
8222                 pz = geompy.MakeVertex(0, 0, 100)
8223                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8224                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8225             """
8226             # Example: see GEOM_TestOthers.py
8227             aVec = self.MakeLine(aPoint,aDir)
8228             # note: auto-publishing is done in self.MultiRotate1D()
8229             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8230             return anObj
8231
8232         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8233         #
8234         #  @ref swig_MakeMultiRotation "Example"
8235         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8236             """
8237             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8238             
8239             Example of usage:
8240                 pz = geompy.MakeVertex(0, 0, 100)
8241                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8242                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8243             """
8244             # Example: see GEOM_TestOthers.py
8245             aVec = self.MakeLine(aPoint,aDir)
8246             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8247             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8248             return anObj
8249
8250         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8251         #
8252         #  @ref swig_MakeMultiRotation "Example"
8253         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8254             """
8255             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8256             
8257             Example of usage:
8258                 pz = geompy.MakeVertex(0, 0, 100)
8259                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8260                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8261             """
8262             # Example: see GEOM_TestOthers.py
8263             aVec = self.MakeLine(aPoint,aDir)
8264             # note: auto-publishing is done in self.MultiRotate2D()
8265             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8266             return anObj
8267
8268         # end of l3_transform
8269         ## @}
8270
8271         ## @addtogroup l3_transform_d
8272         ## @{
8273
8274         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8275         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8276             """
8277             Deprecated method. Use MultiRotate1DNbTimes instead.
8278             """
8279             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8280             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8281
8282         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8283         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8284         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8285             """
8286             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8287             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8288
8289             Example of usage:
8290                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8291             """
8292             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8293             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8294             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8295             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8296             anObj.SetParameters(Parameters)
8297             self._autoPublish(anObj, theName, "multirotation")
8298             return anObj
8299
8300         ## The same, as MultiRotate1D(), but axis is given by direction and point
8301         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8302         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8303             """
8304             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8305             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8306
8307             Example of usage:
8308                 pz = geompy.MakeVertex(0, 0, 100)
8309                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8310                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8311             """
8312             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8313             aVec = self.MakeLine(aPoint,aDir)
8314             # note: auto-publishing is done in self.MultiRotate1D()
8315             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8316             return anObj
8317
8318         ## The same, as MultiRotate2D(), but axis is given by direction and point
8319         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8320         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8321             """
8322             The same, as MultiRotate2D(), but axis is given by direction and point
8323             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8324             
8325             Example of usage:
8326                 pz = geompy.MakeVertex(0, 0, 100)
8327                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8328                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8329             """
8330             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8331             aVec = self.MakeLine(aPoint,aDir)
8332             # note: auto-publishing is done in self.MultiRotate2D()
8333             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8334             return anObj
8335
8336         # end of l3_transform_d
8337         ## @}
8338
8339         ## @addtogroup l3_local
8340         ## @{
8341
8342         ## Perform a fillet on all edges of the given shape.
8343         #  @param theShape Shape, to perform fillet on.
8344         #  @param theR Fillet radius.
8345         #  @param theName Object name; when specified, this parameter is used
8346         #         for result publication in the study. Otherwise, if automatic
8347         #         publication is switched on, default value is used for result name.
8348         #
8349         #  @return New GEOM.GEOM_Object, containing the result shape.
8350         #
8351         #  @ref tui_fillet "Example 1"
8352         #  \n @ref swig_MakeFilletAll "Example 2"
8353         def MakeFilletAll(self, theShape, theR, theName=None):
8354             """
8355             Perform a fillet on all edges of the given shape.
8356
8357             Parameters:
8358                 theShape Shape, to perform fillet on.
8359                 theR Fillet radius.
8360                 theName Object name; when specified, this parameter is used
8361                         for result publication in the study. Otherwise, if automatic
8362                         publication is switched on, default value is used for result name.
8363
8364             Returns: 
8365                 New GEOM.GEOM_Object, containing the result shape.
8366
8367             Example of usage: 
8368                filletall = geompy.MakeFilletAll(prism, 10.)
8369             """
8370             # Example: see GEOM_TestOthers.py
8371             theR,Parameters = ParseParameters(theR)
8372             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
8373             RaiseIfFailed("MakeFilletAll", self.LocalOp)
8374             anObj.SetParameters(Parameters)
8375             self._autoPublish(anObj, theName, "fillet")
8376             return anObj
8377
8378         ## Perform a fillet on the specified edges/faces of the given shape
8379         #  @param theShape Shape, to perform fillet on.
8380         #  @param theR Fillet radius.
8381         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
8382         #  @param theListShapes Global indices of edges/faces to perform fillet on.
8383         #  @param theName Object name; when specified, this parameter is used
8384         #         for result publication in the study. Otherwise, if automatic
8385         #         publication is switched on, default value is used for result name.
8386         #
8387         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8388         #
8389         #  @return New GEOM.GEOM_Object, containing the result shape.
8390         #
8391         #  @ref tui_fillet "Example"
8392         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
8393             """
8394             Perform a fillet on the specified edges/faces of the given shape
8395
8396             Parameters:
8397                 theShape Shape, to perform fillet on.
8398                 theR Fillet radius.
8399                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
8400                 theListShapes Global indices of edges/faces to perform fillet on.
8401                 theName Object name; when specified, this parameter is used
8402                         for result publication in the study. Otherwise, if automatic
8403                         publication is switched on, default value is used for result name.
8404
8405             Note:
8406                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8407
8408             Returns: 
8409                 New GEOM.GEOM_Object, containing the result shape.
8410
8411             Example of usage:
8412                 # get the list of IDs (IDList) for the fillet
8413                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8414                 IDlist_e = []
8415                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8416                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8417                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8418                 # make a fillet on the specified edges of the given shape
8419                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
8420             """
8421             # Example: see GEOM_TestAll.py
8422             theR,Parameters = ParseParameters(theR)
8423             anObj = None
8424             if theShapeType == self.ShapeType["EDGE"]:
8425                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
8426                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
8427             else:
8428                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
8429                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
8430             anObj.SetParameters(Parameters)
8431             self._autoPublish(anObj, theName, "fillet")
8432             return anObj
8433
8434         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
8435         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
8436             """
8437             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
8438
8439             Example of usage:
8440                 # get the list of IDs (IDList) for the fillet
8441                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
8442                 IDlist_e = []
8443                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
8444                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
8445                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
8446                 # make a fillet on the specified edges of the given shape
8447                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
8448             """
8449             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
8450             anObj = None
8451             if theShapeType == self.ShapeType["EDGE"]:
8452                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
8453                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
8454             else:
8455                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
8456                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
8457             anObj.SetParameters(Parameters)
8458             self._autoPublish(anObj, theName, "fillet")
8459             return anObj
8460
8461         ## Perform a fillet on the specified edges of the given shape
8462         #  @param theShape  Wire Shape to perform fillet on.
8463         #  @param theR  Fillet radius.
8464         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8465         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
8466         #    \note The list of vertices could be empty,
8467         #          in this case fillet will done done at all vertices in wire
8468         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
8469         #         by the length of the edges, nearest to the fillet vertex.
8470         #         But sometimes the next edge is C1 continuous with the one, nearest to
8471         #         the fillet point, and such two (or more) edges can be united to allow
8472         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
8473         #         thus ignoring the secant vertex (vertices).
8474         #  @param theName Object name; when specified, this parameter is used
8475         #         for result publication in the study. Otherwise, if automatic
8476         #         publication is switched on, default value is used for result name.
8477         #
8478         #  @return New GEOM.GEOM_Object, containing the result shape.
8479         #
8480         #  @ref tui_fillet2d "Example"
8481         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
8482             """
8483             Perform a fillet on the specified edges of the given shape
8484
8485             Parameters:
8486                 theShape  Wire Shape to perform fillet on.
8487                 theR  Fillet radius.
8488                 theListOfVertexes Global indices of vertexes to perform fillet on.
8489                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
8490                     by the length of the edges, nearest to the fillet vertex.
8491                     But sometimes the next edge is C1 continuous with the one, nearest to
8492                     the fillet point, and such two (or more) edges can be united to allow
8493                     bigger radius. Set this flag to TRUE to allow collinear edges union,
8494                     thus ignoring the secant vertex (vertices).
8495                 theName Object name; when specified, this parameter is used
8496                         for result publication in the study. Otherwise, if automatic
8497                         publication is switched on, default value is used for result name.
8498             Note:
8499                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8500
8501                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
8502
8503             Returns: 
8504                 New GEOM.GEOM_Object, containing the result shape.
8505
8506             Example of usage:  
8507                 # create wire
8508                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
8509                 # make fillet at given wire vertices with giver radius
8510                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
8511             """
8512             # Example: see GEOM_TestAll.py
8513             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
8514             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
8515             RaiseIfFailed("MakeFillet1D", self.LocalOp)
8516             anObj.SetParameters(Parameters)
8517             self._autoPublish(anObj, theName, "fillet")
8518             return anObj
8519
8520         ## Perform a fillet at the specified vertices of the given face/shell.
8521         #  @param theShape Face or Shell shape to perform fillet on.
8522         #  @param theR Fillet radius.
8523         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
8524         #  @param theName Object name; when specified, this parameter is used
8525         #         for result publication in the study. Otherwise, if automatic
8526         #         publication is switched on, default value is used for result name.
8527         #
8528         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8529         #
8530         #  @return New GEOM.GEOM_Object, containing the result shape.
8531         #
8532         #  @ref tui_fillet2d "Example"
8533         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
8534             """
8535             Perform a fillet at the specified vertices of the given face/shell.
8536
8537             Parameters:
8538                 theShape  Face or Shell shape to perform fillet on.
8539                 theR  Fillet radius.
8540                 theListOfVertexes Global indices of vertexes to perform fillet on.
8541                 theName Object name; when specified, this parameter is used
8542                         for result publication in the study. Otherwise, if automatic
8543                         publication is switched on, default value is used for result name.
8544             Note:
8545                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8546
8547             Returns: 
8548                 New GEOM.GEOM_Object, containing the result shape.
8549
8550             Example of usage:
8551                 face = geompy.MakeFaceHW(100, 100, 1)
8552                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
8553             """
8554             # Example: see GEOM_TestAll.py
8555             theR,Parameters = ParseParameters(theR)
8556             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
8557             RaiseIfFailed("MakeFillet2D", self.LocalOp)
8558             anObj.SetParameters(Parameters)
8559             self._autoPublish(anObj, theName, "fillet")
8560             return anObj
8561
8562         ## Perform a symmetric chamfer on all edges of the given shape.
8563         #  @param theShape Shape, to perform chamfer on.
8564         #  @param theD Chamfer size along each face.
8565         #  @param theName Object name; when specified, this parameter is used
8566         #         for result publication in the study. Otherwise, if automatic
8567         #         publication is switched on, default value is used for result name.
8568         #
8569         #  @return New GEOM.GEOM_Object, containing the result shape.
8570         #
8571         #  @ref tui_chamfer "Example 1"
8572         #  \n @ref swig_MakeChamferAll "Example 2"
8573         def MakeChamferAll(self, theShape, theD, theName=None):
8574             """
8575             Perform a symmetric chamfer on all edges of the given shape.
8576
8577             Parameters:
8578                 theShape Shape, to perform chamfer on.
8579                 theD Chamfer size along each face.
8580                 theName Object name; when specified, this parameter is used
8581                         for result publication in the study. Otherwise, if automatic
8582                         publication is switched on, default value is used for result name.
8583
8584             Returns:     
8585                 New GEOM.GEOM_Object, containing the result shape.
8586
8587             Example of usage:
8588                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
8589             """
8590             # Example: see GEOM_TestOthers.py
8591             theD,Parameters = ParseParameters(theD)
8592             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
8593             RaiseIfFailed("MakeChamferAll", self.LocalOp)
8594             anObj.SetParameters(Parameters)
8595             self._autoPublish(anObj, theName, "chamfer")
8596             return anObj
8597
8598         ## Perform a chamfer on edges, common to the specified faces,
8599         #  with distance D1 on the Face1
8600         #  @param theShape Shape, to perform chamfer on.
8601         #  @param theD1 Chamfer size along \a theFace1.
8602         #  @param theD2 Chamfer size along \a theFace2.
8603         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8604         #  @param theName Object name; when specified, this parameter is used
8605         #         for result publication in the study. Otherwise, if automatic
8606         #         publication is switched on, default value is used for result name.
8607         #
8608         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8609         #
8610         #  @return New GEOM.GEOM_Object, containing the result shape.
8611         #
8612         #  @ref tui_chamfer "Example"
8613         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
8614             """
8615             Perform a chamfer on edges, common to the specified faces,
8616             with distance D1 on the Face1
8617
8618             Parameters:
8619                 theShape Shape, to perform chamfer on.
8620                 theD1 Chamfer size along theFace1.
8621                 theD2 Chamfer size along theFace2.
8622                 theFace1,theFace2 Global indices of two faces of theShape.
8623                 theName Object name; when specified, this parameter is used
8624                         for result publication in the study. Otherwise, if automatic
8625                         publication is switched on, default value is used for result name.
8626
8627             Note:
8628                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8629
8630             Returns:      
8631                 New GEOM.GEOM_Object, containing the result shape.
8632
8633             Example of usage:
8634                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8635                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8636                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8637                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
8638             """
8639             # Example: see GEOM_TestAll.py
8640             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8641             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
8642             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
8643             anObj.SetParameters(Parameters)
8644             self._autoPublish(anObj, theName, "chamfer")
8645             return anObj
8646
8647         ## Perform a chamfer on edges
8648         #  @param theShape Shape, to perform chamfer on.
8649         #  @param theD Chamfer length
8650         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8651         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
8652         #  @param theName Object name; when specified, this parameter is used
8653         #         for result publication in the study. Otherwise, if automatic
8654         #         publication is switched on, default value is used for result name.
8655         #
8656         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8657         #
8658         #  @return New GEOM.GEOM_Object, containing the result shape.
8659         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
8660             """
8661             Perform a chamfer on edges
8662
8663             Parameters:
8664                 theShape Shape, to perform chamfer on.
8665                 theD1 Chamfer size along theFace1.
8666                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
8667                 theFace1,theFace2 Global indices of two faces of theShape.
8668                 theName Object name; when specified, this parameter is used
8669                         for result publication in the study. Otherwise, if automatic
8670                         publication is switched on, default value is used for result name.
8671
8672             Note:
8673                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
8674
8675             Returns:      
8676                 New GEOM.GEOM_Object, containing the result shape.
8677
8678             Example of usage:
8679                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
8680                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
8681                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
8682                 ang = 30
8683                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
8684             """
8685             flag = False
8686             if isinstance(theAngle,str):
8687                 flag = True
8688             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8689             if flag:
8690                 theAngle = theAngle*math.pi/180.0
8691             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
8692             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
8693             anObj.SetParameters(Parameters)
8694             self._autoPublish(anObj, theName, "chamfer")
8695             return anObj
8696
8697         ## Perform a chamfer on all edges of the specified faces,
8698         #  with distance D1 on the first specified face (if several for one edge)
8699         #  @param theShape Shape, to perform chamfer on.
8700         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
8701         #               connected to the edge, are in \a theFaces, \a theD1
8702         #               will be get along face, which is nearer to \a theFaces beginning.
8703         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
8704         #  @param theFaces Sequence of global indices of faces of \a theShape.
8705         #  @param theName Object name; when specified, this parameter is used
8706         #         for result publication in the study. Otherwise, if automatic
8707         #         publication is switched on, default value is used for result name.
8708         #
8709         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
8710         #
8711         #  @return New GEOM.GEOM_Object, containing the result shape.
8712         #
8713         #  @ref tui_chamfer "Example"
8714         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
8715             """
8716             Perform a chamfer on all edges of the specified faces,
8717             with distance D1 on the first specified face (if several for one edge)
8718
8719             Parameters:
8720                 theShape Shape, to perform chamfer on.
8721                 theD1 Chamfer size along face from  theFaces. If both faces,
8722                       connected to the edge, are in theFaces, theD1
8723                       will be get along face, which is nearer to theFaces beginning.
8724                 theD2 Chamfer size along another of two faces, connected to the edge.
8725                 theFaces Sequence of global indices of faces of theShape.
8726                 theName Object name; when specified, this parameter is used
8727                         for result publication in the study. Otherwise, if automatic
8728                         publication is switched on, default value is used for result name.
8729                 
8730             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
8731
8732             Returns:  
8733                 New GEOM.GEOM_Object, containing the result shape.
8734             """
8735             # Example: see GEOM_TestAll.py
8736             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8737             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
8738             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
8739             anObj.SetParameters(Parameters)
8740             self._autoPublish(anObj, theName, "chamfer")
8741             return anObj
8742
8743         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
8744         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8745         #
8746         #  @ref swig_FilletChamfer "Example"
8747         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
8748             """
8749             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
8750             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8751             """
8752             flag = False
8753             if isinstance(theAngle,str):
8754                 flag = True
8755             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8756             if flag:
8757                 theAngle = theAngle*math.pi/180.0
8758             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
8759             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
8760             anObj.SetParameters(Parameters)
8761             self._autoPublish(anObj, theName, "chamfer")
8762             return anObj
8763
8764         ## Perform a chamfer on edges,
8765         #  with distance D1 on the first specified face (if several for one edge)
8766         #  @param theShape Shape, to perform chamfer on.
8767         #  @param theD1,theD2 Chamfer size
8768         #  @param theEdges Sequence of edges of \a theShape.
8769         #  @param theName Object name; when specified, this parameter is used
8770         #         for result publication in the study. Otherwise, if automatic
8771         #         publication is switched on, default value is used for result name.
8772         #
8773         #  @return New GEOM.GEOM_Object, containing the result shape.
8774         #
8775         #  @ref swig_FilletChamfer "Example"
8776         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
8777             """
8778             Perform a chamfer on edges,
8779             with distance D1 on the first specified face (if several for one edge)
8780             
8781             Parameters:
8782                 theShape Shape, to perform chamfer on.
8783                 theD1,theD2 Chamfer size
8784                 theEdges Sequence of edges of theShape.
8785                 theName Object name; when specified, this parameter is used
8786                         for result publication in the study. Otherwise, if automatic
8787                         publication is switched on, default value is used for result name.
8788
8789             Returns:
8790                 New GEOM.GEOM_Object, containing the result shape.
8791             """
8792             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
8793             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
8794             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
8795             anObj.SetParameters(Parameters)
8796             self._autoPublish(anObj, theName, "chamfer")
8797             return anObj
8798
8799         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
8800         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8801         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
8802             """
8803             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
8804             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
8805             """
8806             flag = False
8807             if isinstance(theAngle,str):
8808                 flag = True
8809             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
8810             if flag:
8811                 theAngle = theAngle*math.pi/180.0
8812             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
8813             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
8814             anObj.SetParameters(Parameters)
8815             self._autoPublish(anObj, theName, "chamfer")
8816             return anObj
8817
8818         ## @sa MakeChamferEdge(), MakeChamferFaces()
8819         #
8820         #  @ref swig_MakeChamfer "Example"
8821         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
8822             """
8823             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
8824             """
8825             # Example: see GEOM_TestOthers.py
8826             anObj = None
8827             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
8828             if aShapeType == self.ShapeType["EDGE"]:
8829                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
8830             else:
8831                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
8832             return anObj
8833             
8834         ## Remove material from a solid by extrusion of the base shape on the given distance.
8835         #  @param theInit Shape to remove material from. It must be a solid or 
8836         #  a compound made of a single solid.
8837         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8838         #  @param theH Prism dimension along the normal to theBase
8839         #  @param theAngle Draft angle in degrees.
8840         #  @param theName Object name; when specified, this parameter is used
8841         #         for result publication in the study. Otherwise, if automatic
8842         #         publication is switched on, default value is used for result name.
8843         #
8844         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material 
8845         #
8846         #  @ref tui_creation_prism "Example"
8847         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
8848             """
8849             Add material to a solid by extrusion of the base shape on the given distance.
8850
8851             Parameters:
8852                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
8853                 theBase Closed edge or wire defining the base shape to be extruded.
8854                 theH Prism dimension along the normal  to theBase
8855                 theAngle Draft angle in degrees.
8856                 theName Object name; when specified, this parameter is used
8857                         for result publication in the study. Otherwise, if automatic
8858                         publication is switched on, default value is used for result name.
8859
8860             Returns:
8861                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
8862             """
8863             # Example: see GEOM_TestAll.py
8864             #theH,Parameters = ParseParameters(theH)
8865             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
8866             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8867             #anObj.SetParameters(Parameters)
8868             self._autoPublish(anObj, theName, "extrudedCut")
8869             return anObj   
8870             
8871         ## Add material to a solid by extrusion of the base shape on the given distance.
8872         #  @param theInit Shape to add material to. It must be a solid or 
8873         #  a compound made of a single solid.
8874         #  @param theBase Closed edge or wire defining the base shape to be extruded.
8875         #  @param theH Prism dimension along the normal to theBase
8876         #  @param theAngle Draft angle in degrees.
8877         #  @param theName Object name; when specified, this parameter is used
8878         #         for result publication in the study. Otherwise, if automatic
8879         #         publication is switched on, default value is used for result name.
8880         #
8881         #  @return New GEOM.GEOM_Object, containing the initial shape with added material 
8882         #
8883         #  @ref tui_creation_prism "Example"
8884         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
8885             """
8886             Add material to a solid by extrusion of the base shape on the given distance.
8887
8888             Parameters:
8889                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
8890                 theBase Closed edge or wire defining the base shape to be extruded.
8891                 theH Prism dimension along the normal  to theBase
8892                 theAngle Draft angle in degrees.
8893                 theName Object name; when specified, this parameter is used
8894                         for result publication in the study. Otherwise, if automatic
8895                         publication is switched on, default value is used for result name.
8896
8897             Returns:
8898                 New GEOM.GEOM_Object,  containing the initial shape with added material.
8899             """
8900             # Example: see GEOM_TestAll.py
8901             #theH,Parameters = ParseParameters(theH)
8902             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
8903             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
8904             #anObj.SetParameters(Parameters)
8905             self._autoPublish(anObj, theName, "extrudedBoss")
8906             return anObj   
8907
8908         # end of l3_local
8909         ## @}
8910
8911         ## @addtogroup l3_basic_op
8912         ## @{
8913
8914         ## Perform an Archimde operation on the given shape with given parameters.
8915         #  The object presenting the resulting face is returned.
8916         #  @param theShape Shape to be put in water.
8917         #  @param theWeight Weight og the shape.
8918         #  @param theWaterDensity Density of the water.
8919         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
8920         #  @param theName Object name; when specified, this parameter is used
8921         #         for result publication in the study. Otherwise, if automatic
8922         #         publication is switched on, default value is used for result name.
8923         #
8924         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
8925         #          by a plane, corresponding to water level.
8926         #
8927         #  @ref tui_archimede "Example"
8928         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
8929             """
8930             Perform an Archimde operation on the given shape with given parameters.
8931             The object presenting the resulting face is returned.
8932
8933             Parameters: 
8934                 theShape Shape to be put in water.
8935                 theWeight Weight og the shape.
8936                 theWaterDensity Density of the water.
8937                 theMeshDeflection Deflection of the mesh, using to compute the section.
8938                 theName Object name; when specified, this parameter is used
8939                         for result publication in the study. Otherwise, if automatic
8940                         publication is switched on, default value is used for result name.
8941
8942             Returns: 
8943                 New GEOM.GEOM_Object, containing a section of theShape
8944                 by a plane, corresponding to water level.
8945             """
8946             # Example: see GEOM_TestAll.py
8947             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
8948               theWeight,theWaterDensity,theMeshDeflection)
8949             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
8950             RaiseIfFailed("MakeArchimede", self.LocalOp)
8951             anObj.SetParameters(Parameters)
8952             self._autoPublish(anObj, theName, "archimede")
8953             return anObj
8954
8955         # end of l3_basic_op
8956         ## @}
8957
8958         ## @addtogroup l2_measure
8959         ## @{
8960
8961         ## Get point coordinates
8962         #  @return [x, y, z]
8963         #
8964         #  @ref tui_measurement_tools_page "Example"
8965         def PointCoordinates(self,Point):
8966             """
8967             Get point coordinates
8968
8969             Returns:
8970                 [x, y, z]
8971             """
8972             # Example: see GEOM_TestMeasures.py
8973             aTuple = self.MeasuOp.PointCoordinates(Point)
8974             RaiseIfFailed("PointCoordinates", self.MeasuOp)
8975             return aTuple 
8976         
8977         ## Get vector coordinates
8978         #  @return [x, y, z]
8979         #
8980         #  @ref tui_measurement_tools_page "Example"
8981         def VectorCoordinates(self,Vector):
8982             """
8983             Get vector coordinates
8984
8985             Returns:
8986                 [x, y, z]
8987             """
8988
8989             p1=self.GetFirstVertex(Vector)
8990             p2=self.GetLastVertex(Vector)
8991             
8992             X1=self.PointCoordinates(p1)
8993             X2=self.PointCoordinates(p2)
8994
8995             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
8996
8997
8998         ## Compute cross product
8999         #  @return vector w=u^v
9000         #
9001         #  @ref tui_measurement_tools_page "Example"
9002         def CrossProduct(self, Vector1, Vector2):
9003             """ 
9004             Compute cross product
9005             
9006             Returns: vector w=u^v
9007             """
9008             u=self.VectorCoordinates(Vector1)
9009             v=self.VectorCoordinates(Vector2)
9010             w=self.MakeVectorDXDYDZ(u[1]*v[2]-u[2]*v[1], u[2]*v[0]-u[0]*v[2], u[0]*v[1]-u[1]*v[0])
9011             
9012             return w
9013         
9014         ## Compute cross product
9015         #  @return dot product  p=u.v
9016         #
9017         #  @ref tui_measurement_tools_page "Example"
9018         def DotProduct(self, Vector1, Vector2):
9019             """ 
9020             Compute cross product
9021             
9022             Returns: dot product  p=u.v
9023             """
9024             u=self.VectorCoordinates(Vector1)
9025             v=self.VectorCoordinates(Vector2)
9026             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9027             
9028             return p
9029
9030
9031         ## Get summarized length of all wires,
9032         #  area of surface and volume of the given shape.
9033         #  @param theShape Shape to define properties of.
9034         #  @return [theLength, theSurfArea, theVolume]\n
9035         #  theLength:   Summarized length of all wires of the given shape.\n
9036         #  theSurfArea: Area of surface of the given shape.\n
9037         #  theVolume:   Volume of the given shape.
9038         #
9039         #  @ref tui_measurement_tools_page "Example"
9040         def BasicProperties(self,theShape):
9041             """
9042             Get summarized length of all wires,
9043             area of surface and volume of the given shape.
9044
9045             Parameters: 
9046                 theShape Shape to define properties of.
9047
9048             Returns:
9049                 [theLength, theSurfArea, theVolume]
9050                  theLength:   Summarized length of all wires of the given shape.
9051                  theSurfArea: Area of surface of the given shape.
9052                  theVolume:   Volume of the given shape.
9053             """
9054             # Example: see GEOM_TestMeasures.py
9055             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9056             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9057             return aTuple
9058
9059         ## Get parameters of bounding box of the given shape
9060         #  @param theShape Shape to obtain bounding box of.
9061         #  @param precise TRUE for precise computation; FALSE for fast one.
9062         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9063         #  Xmin,Xmax: Limits of shape along OX axis.
9064         #  Ymin,Ymax: Limits of shape along OY axis.
9065         #  Zmin,Zmax: Limits of shape along OZ axis.
9066         #
9067         #  @ref tui_measurement_tools_page "Example"
9068         def BoundingBox (self, theShape, precise=False):
9069             """
9070             Get parameters of bounding box of the given shape
9071
9072             Parameters: 
9073                 theShape Shape to obtain bounding box of.
9074                 precise TRUE for precise computation; FALSE for fast one.
9075
9076             Returns:
9077                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9078                  Xmin,Xmax: Limits of shape along OX axis.
9079                  Ymin,Ymax: Limits of shape along OY axis.
9080                  Zmin,Zmax: Limits of shape along OZ axis.
9081             """
9082             # Example: see GEOM_TestMeasures.py
9083             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9084             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9085             return aTuple
9086
9087         ## Get bounding box of the given shape
9088         #  @param theShape Shape to obtain bounding box of.
9089         #  @param precise TRUE for precise computation; FALSE for fast one.
9090         #  @param theName Object name; when specified, this parameter is used
9091         #         for result publication in the study. Otherwise, if automatic
9092         #         publication is switched on, default value is used for result name.
9093         #
9094         #  @return New GEOM.GEOM_Object, containing the created box.
9095         #
9096         #  @ref tui_measurement_tools_page "Example"
9097         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9098             """
9099             Get bounding box of the given shape
9100
9101             Parameters: 
9102                 theShape Shape to obtain bounding box of.
9103                 precise TRUE for precise computation; FALSE for fast one.
9104                 theName Object name; when specified, this parameter is used
9105                         for result publication in the study. Otherwise, if automatic
9106                         publication is switched on, default value is used for result name.
9107
9108             Returns:
9109                 New GEOM.GEOM_Object, containing the created box.
9110             """
9111             # Example: see GEOM_TestMeasures.py
9112             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9113             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9114             self._autoPublish(anObj, theName, "bndbox")
9115             return anObj
9116
9117         ## Get inertia matrix and moments of inertia of theShape.
9118         #  @param theShape Shape to calculate inertia of.
9119         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9120         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9121         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9122         #
9123         #  @ref tui_measurement_tools_page "Example"
9124         def Inertia(self,theShape):
9125             """
9126             Get inertia matrix and moments of inertia of theShape.
9127
9128             Parameters: 
9129                 theShape Shape to calculate inertia of.
9130
9131             Returns:
9132                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9133                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9134                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9135             """
9136             # Example: see GEOM_TestMeasures.py
9137             aTuple = self.MeasuOp.GetInertia(theShape)
9138             RaiseIfFailed("GetInertia", self.MeasuOp)
9139             return aTuple
9140
9141         ## Get if coords are included in the shape (ST_IN or ST_ON)
9142         #  @param theShape Shape
9143         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9144         #  @param tolerance to be used (default is 1.0e-7)
9145         #  @return list_of_boolean = [res1, res2, ...]
9146         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9147             """
9148             Get if coords are included in the shape (ST_IN or ST_ON)
9149             
9150             Parameters: 
9151                 theShape Shape
9152                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9153                 tolerance to be used (default is 1.0e-7)
9154
9155             Returns:
9156                 list_of_boolean = [res1, res2, ...]
9157             """
9158             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9159
9160         ## Get minimal distance between the given shapes.
9161         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9162         #  @return Value of the minimal distance between the given shapes.
9163         #
9164         #  @ref tui_measurement_tools_page "Example"
9165         def MinDistance(self, theShape1, theShape2):
9166             """
9167             Get minimal distance between the given shapes.
9168             
9169             Parameters: 
9170                 theShape1,theShape2 Shapes to find minimal distance between.
9171
9172             Returns:    
9173                 Value of the minimal distance between the given shapes.
9174             """
9175             # Example: see GEOM_TestMeasures.py
9176             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9177             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9178             return aTuple[0]
9179
9180         ## Get minimal distance between the given shapes.
9181         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9182         #  @return Value of the minimal distance between the given shapes, in form of list
9183         #          [Distance, DX, DY, DZ].
9184         #
9185         #  @ref swig_all_measure "Example"
9186         def MinDistanceComponents(self, theShape1, theShape2):
9187             """
9188             Get minimal distance between the given shapes.
9189
9190             Parameters: 
9191                 theShape1,theShape2 Shapes to find minimal distance between.
9192
9193             Returns:  
9194                 Value of the minimal distance between the given shapes, in form of list
9195                 [Distance, DX, DY, DZ]
9196             """
9197             # Example: see GEOM_TestMeasures.py
9198             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9199             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9200             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9201             return aRes
9202
9203         ## Get closest points of the given shapes.
9204         #  @param theShape1,theShape2 Shapes to find closest points of.
9205         #  @return The number of found solutions (-1 in case of infinite number of
9206         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9207         #
9208         #  @ref tui_measurement_tools_page "Example"
9209         def ClosestPoints (self, theShape1, theShape2):
9210             """
9211             Get closest points of the given shapes.
9212
9213             Parameters: 
9214                 theShape1,theShape2 Shapes to find closest points of.
9215
9216             Returns:    
9217                 The number of found solutions (-1 in case of infinite number of
9218                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9219             """
9220             # Example: see GEOM_TestMeasures.py
9221             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9222             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9223             return aTuple
9224
9225         ## Get angle between the given shapes in degrees.
9226         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9227         #  @note If both arguments are vectors, the angle is computed in accordance
9228         #        with their orientations, otherwise the minimum angle is computed.
9229         #  @return Value of the angle between the given shapes in degrees.
9230         #
9231         #  @ref tui_measurement_tools_page "Example"
9232         def GetAngle(self, theShape1, theShape2):
9233             """
9234             Get angle between the given shapes in degrees.
9235
9236             Parameters: 
9237                 theShape1,theShape2 Lines or linear edges to find angle between.
9238
9239             Note:
9240                 If both arguments are vectors, the angle is computed in accordance
9241                 with their orientations, otherwise the minimum angle is computed.
9242
9243             Returns:  
9244                 Value of the angle between the given shapes in degrees.
9245             """
9246             # Example: see GEOM_TestMeasures.py
9247             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9248             RaiseIfFailed("GetAngle", self.MeasuOp)
9249             return anAngle
9250
9251         ## Get angle between the given shapes in radians.
9252         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9253         #  @note If both arguments are vectors, the angle is computed in accordance
9254         #        with their orientations, otherwise the minimum angle is computed.
9255         #  @return Value of the angle between the given shapes in radians.
9256         #
9257         #  @ref tui_measurement_tools_page "Example"
9258         def GetAngleRadians(self, theShape1, theShape2):
9259             """
9260             Get angle between the given shapes in radians.
9261
9262             Parameters: 
9263                 theShape1,theShape2 Lines or linear edges to find angle between.
9264
9265                 
9266             Note:
9267                 If both arguments are vectors, the angle is computed in accordance
9268                 with their orientations, otherwise the minimum angle is computed.
9269
9270             Returns:  
9271                 Value of the angle between the given shapes in radians.
9272             """
9273             # Example: see GEOM_TestMeasures.py
9274             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9275             RaiseIfFailed("GetAngle", self.MeasuOp)
9276             return anAngle
9277
9278         ## Get angle between the given vectors in degrees.
9279         #  @param theShape1,theShape2 Vectors to find angle between.
9280         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9281         #                 if False, the opposite vector to the normal vector is used.
9282         #  @return Value of the angle between the given vectors in degrees.
9283         #
9284         #  @ref tui_measurement_tools_page "Example"
9285         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9286             """
9287             Get angle between the given vectors in degrees.
9288
9289             Parameters: 
9290                 theShape1,theShape2 Vectors to find angle between.
9291                 theFlag If True, the normal vector is defined by the two vectors cross,
9292                         if False, the opposite vector to the normal vector is used.
9293
9294             Returns:  
9295                 Value of the angle between the given vectors in degrees.
9296             """
9297             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9298             if not theFlag:
9299                 anAngle = 360. - anAngle
9300             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9301             return anAngle
9302
9303         ## The same as GetAngleVectors, but the result is in radians.
9304         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9305             """
9306             Get angle between the given vectors in radians.
9307
9308             Parameters: 
9309                 theShape1,theShape2 Vectors to find angle between.
9310                 theFlag If True, the normal vector is defined by the two vectors cross,
9311                         if False, the opposite vector to the normal vector is used.
9312
9313             Returns:  
9314                 Value of the angle between the given vectors in radians.
9315             """
9316             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9317             return anAngle
9318
9319         ## @name Curve Curvature Measurement
9320         #  Methods for receiving radius of curvature of curves
9321         #  in the given point
9322         ## @{
9323
9324         ## Measure curvature of a curve at a point, set by parameter.
9325         #  @param theCurve a curve.
9326         #  @param theParam parameter.
9327         #  @return radius of curvature of \a theCurve.
9328         #
9329         #  @ref swig_todo "Example"
9330         def CurveCurvatureByParam(self, theCurve, theParam):
9331             """
9332             Measure curvature of a curve at a point, set by parameter.
9333
9334             Parameters: 
9335                 theCurve a curve.
9336                 theParam parameter.
9337
9338             Returns: 
9339                 radius of curvature of theCurve.
9340             """
9341             # Example: see GEOM_TestMeasures.py
9342             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
9343             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
9344             return aCurv
9345
9346         ## Measure curvature of a curve at a point.
9347         #  @param theCurve a curve.
9348         #  @param thePoint given point.
9349         #  @return radius of curvature of \a theCurve.
9350         #
9351         #  @ref swig_todo "Example"
9352         def CurveCurvatureByPoint(self, theCurve, thePoint):
9353             """
9354             Measure curvature of a curve at a point.
9355
9356             Parameters: 
9357                 theCurve a curve.
9358                 thePoint given point.
9359
9360             Returns: 
9361                 radius of curvature of theCurve.           
9362             """
9363             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
9364             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
9365             return aCurv
9366         ## @}
9367
9368         ## @name Surface Curvature Measurement
9369         #  Methods for receiving max and min radius of curvature of surfaces
9370         #  in the given point
9371         ## @{
9372
9373         ## Measure max radius of curvature of surface.
9374         #  @param theSurf the given surface.
9375         #  @param theUParam Value of U-parameter on the referenced surface.
9376         #  @param theVParam Value of V-parameter on the referenced surface.
9377         #  @return max radius of curvature of theSurf.
9378         #
9379         ## @ref swig_todo "Example"
9380         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9381             """
9382             Measure max radius of curvature of surface.
9383
9384             Parameters: 
9385                 theSurf the given surface.
9386                 theUParam Value of U-parameter on the referenced surface.
9387                 theVParam Value of V-parameter on the referenced surface.
9388                 
9389             Returns:     
9390                 max radius of curvature of theSurf.
9391             """
9392             # Example: see GEOM_TestMeasures.py
9393             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9394             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
9395             return aSurf
9396
9397         ## Measure max radius of curvature of surface in the given point
9398         #  @param theSurf the given surface.
9399         #  @param thePoint given point.
9400         #  @return max radius of curvature of theSurf.
9401         #
9402         ## @ref swig_todo "Example"
9403         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
9404             """
9405             Measure max radius of curvature of surface in the given point.
9406
9407             Parameters: 
9408                 theSurf the given surface.
9409                 thePoint given point.
9410                 
9411             Returns:     
9412                 max radius of curvature of theSurf.          
9413             """
9414             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
9415             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
9416             return aSurf
9417
9418         ## Measure min radius of curvature of surface.
9419         #  @param theSurf the given surface.
9420         #  @param theUParam Value of U-parameter on the referenced surface.
9421         #  @param theVParam Value of V-parameter on the referenced surface.
9422         #  @return min radius of curvature of theSurf.
9423         #   
9424         ## @ref swig_todo "Example"
9425         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
9426             """
9427             Measure min radius of curvature of surface.
9428
9429             Parameters: 
9430                 theSurf the given surface.
9431                 theUParam Value of U-parameter on the referenced surface.
9432                 theVParam Value of V-parameter on the referenced surface.
9433                 
9434             Returns:     
9435                 Min radius of curvature of theSurf.
9436             """
9437             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
9438             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
9439             return aSurf
9440
9441         ## Measure min radius of curvature of surface in the given point
9442         #  @param theSurf the given surface.
9443         #  @param thePoint given point.
9444         #  @return min radius of curvature of theSurf.
9445         #
9446         ## @ref swig_todo "Example"
9447         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
9448             """
9449             Measure min radius of curvature of surface in the given point.
9450
9451             Parameters: 
9452                 theSurf the given surface.
9453                 thePoint given point.
9454                 
9455             Returns:     
9456                 Min radius of curvature of theSurf.          
9457             """
9458             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
9459             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
9460             return aSurf
9461         ## @}
9462
9463         ## Get min and max tolerances of sub-shapes of theShape
9464         #  @param theShape Shape, to get tolerances of.
9465         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
9466         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
9467         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
9468         #  VertMin,VertMax: Min and max tolerances of the vertices.
9469         #
9470         #  @ref tui_measurement_tools_page "Example"
9471         def Tolerance(self,theShape):
9472             """
9473             Get min and max tolerances of sub-shapes of theShape
9474
9475             Parameters: 
9476                 theShape Shape, to get tolerances of.
9477
9478             Returns:    
9479                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
9480                  FaceMin,FaceMax: Min and max tolerances of the faces.
9481                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
9482                  VertMin,VertMax: Min and max tolerances of the vertices.
9483             """
9484             # Example: see GEOM_TestMeasures.py
9485             aTuple = self.MeasuOp.GetTolerance(theShape)
9486             RaiseIfFailed("GetTolerance", self.MeasuOp)
9487             return aTuple
9488
9489         ## Obtain description of the given shape (number of sub-shapes of each type)
9490         #  @param theShape Shape to be described.
9491         #  @return Description of the given shape.
9492         #
9493         #  @ref tui_measurement_tools_page "Example"
9494         def WhatIs(self,theShape):
9495             """
9496             Obtain description of the given shape (number of sub-shapes of each type)
9497
9498             Parameters:
9499                 theShape Shape to be described.
9500
9501             Returns:
9502                 Description of the given shape.
9503             """
9504             # Example: see GEOM_TestMeasures.py
9505             aDescr = self.MeasuOp.WhatIs(theShape)
9506             RaiseIfFailed("WhatIs", self.MeasuOp)
9507             return aDescr
9508
9509         ## Obtain quantity of shapes of the given type in \a theShape.
9510         #  If \a theShape is of type \a theType, it is also counted.
9511         #  @param theShape Shape to be described.
9512         #  @param theType the given ShapeType().
9513         #  @return Quantity of shapes of type \a theType in \a theShape.
9514         #
9515         #  @ref tui_measurement_tools_page "Example"
9516         def NbShapes (self, theShape, theType):
9517             """
9518             Obtain quantity of shapes of the given type in theShape.
9519             If theShape is of type theType, it is also counted.
9520
9521             Parameters:
9522                 theShape Shape to be described.
9523                 theType the given geompy.ShapeType
9524
9525             Returns:
9526                 Quantity of shapes of type theType in theShape.
9527             """
9528             # Example: see GEOM_TestMeasures.py
9529             listSh = self.SubShapeAllIDs(theShape, theType)
9530             Nb = len(listSh)
9531             t       = EnumToLong(theShape.GetShapeType())
9532             theType = EnumToLong(theType)
9533             if t == theType:
9534                 Nb = Nb + 1
9535                 pass
9536             return Nb
9537
9538         ## Obtain quantity of shapes of each type in \a theShape.
9539         #  The \a theShape is also counted.
9540         #  @param theShape Shape to be described.
9541         #  @return Dictionary of ShapeType() with bound quantities of shapes.
9542         #
9543         #  @ref tui_measurement_tools_page "Example"
9544         def ShapeInfo (self, theShape):
9545             """
9546             Obtain quantity of shapes of each type in theShape.
9547             The theShape is also counted.
9548
9549             Parameters:
9550                 theShape Shape to be described.
9551
9552             Returns:
9553                 Dictionary of geompy.ShapeType with bound quantities of shapes.
9554             """
9555             # Example: see GEOM_TestMeasures.py
9556             aDict = {}
9557             for typeSh in self.ShapeType:
9558                 if typeSh in ( "AUTO", "SHAPE" ): continue
9559                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
9560                 Nb = len(listSh)
9561                 if EnumToLong(theShape.GetShapeType()) == self.ShapeType[typeSh]:
9562                     Nb = Nb + 1
9563                     pass
9564                 aDict[typeSh] = Nb
9565                 pass
9566             return aDict
9567
9568         ## Get a point, situated at the centre of mass of theShape.
9569         #  @param theShape Shape to define centre of mass of.
9570         #  @param theName Object name; when specified, this parameter is used
9571         #         for result publication in the study. Otherwise, if automatic
9572         #         publication is switched on, default value is used for result name.
9573         #
9574         #  @return New GEOM.GEOM_Object, containing the created point.
9575         #
9576         #  @ref tui_measurement_tools_page "Example"
9577         def MakeCDG(self, theShape, theName=None):
9578             """
9579             Get a point, situated at the centre of mass of theShape.
9580
9581             Parameters:
9582                 theShape Shape to define centre of mass of.
9583                 theName Object name; when specified, this parameter is used
9584                         for result publication in the study. Otherwise, if automatic
9585                         publication is switched on, default value is used for result name.
9586
9587             Returns:
9588                 New GEOM.GEOM_Object, containing the created point.
9589             """
9590             # Example: see GEOM_TestMeasures.py
9591             anObj = self.MeasuOp.GetCentreOfMass(theShape)
9592             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
9593             self._autoPublish(anObj, theName, "centerOfMass")
9594             return anObj
9595
9596         ## Get a vertex sub-shape by index depended with orientation.
9597         #  @param theShape Shape to find sub-shape.
9598         #  @param theIndex Index to find vertex by this index (starting from zero)
9599         #  @param theName Object name; when specified, this parameter is used
9600         #         for result publication in the study. Otherwise, if automatic
9601         #         publication is switched on, default value is used for result name.
9602         #
9603         #  @return New GEOM.GEOM_Object, containing the created vertex.
9604         #
9605         #  @ref tui_measurement_tools_page "Example"
9606         def GetVertexByIndex(self, theShape, theIndex, theName=None):
9607             """
9608             Get a vertex sub-shape by index depended with orientation.
9609
9610             Parameters:
9611                 theShape Shape to find sub-shape.
9612                 theIndex Index to find vertex by this index (starting from zero)
9613                 theName Object name; when specified, this parameter is used
9614                         for result publication in the study. Otherwise, if automatic
9615                         publication is switched on, default value is used for result name.
9616
9617             Returns:
9618                 New GEOM.GEOM_Object, containing the created vertex.
9619             """
9620             # Example: see GEOM_TestMeasures.py
9621             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
9622             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
9623             self._autoPublish(anObj, theName, "vertex")
9624             return anObj
9625
9626         ## Get the first vertex of wire/edge depended orientation.
9627         #  @param theShape Shape to find first vertex.
9628         #  @param theName Object name; when specified, this parameter is used
9629         #         for result publication in the study. Otherwise, if automatic
9630         #         publication is switched on, default value is used for result name.
9631         #
9632         #  @return New GEOM.GEOM_Object, containing the created vertex.
9633         #
9634         #  @ref tui_measurement_tools_page "Example"
9635         def GetFirstVertex(self, theShape, theName=None):
9636             """
9637             Get the first vertex of wire/edge depended orientation.
9638
9639             Parameters:
9640                 theShape Shape to find first vertex.
9641                 theName Object name; when specified, this parameter is used
9642                         for result publication in the study. Otherwise, if automatic
9643                         publication is switched on, default value is used for result name.
9644
9645             Returns:    
9646                 New GEOM.GEOM_Object, containing the created vertex.
9647             """
9648             # Example: see GEOM_TestMeasures.py
9649             # note: auto-publishing is done in self.GetVertexByIndex()
9650             anObj = self.GetVertexByIndex(theShape, 0, theName)
9651             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
9652             return anObj
9653
9654         ## Get the last vertex of wire/edge depended orientation.
9655         #  @param theShape Shape to find last vertex.
9656         #  @param theName Object name; when specified, this parameter is used
9657         #         for result publication in the study. Otherwise, if automatic
9658         #         publication is switched on, default value is used for result name.
9659         #
9660         #  @return New GEOM.GEOM_Object, containing the created vertex.
9661         #
9662         #  @ref tui_measurement_tools_page "Example"
9663         def GetLastVertex(self, theShape, theName=None):
9664             """
9665             Get the last vertex of wire/edge depended orientation.
9666
9667             Parameters: 
9668                 theShape Shape to find last vertex.
9669                 theName Object name; when specified, this parameter is used
9670                         for result publication in the study. Otherwise, if automatic
9671                         publication is switched on, default value is used for result name.
9672
9673             Returns:   
9674                 New GEOM.GEOM_Object, containing the created vertex.
9675             """
9676             # Example: see GEOM_TestMeasures.py
9677             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
9678             # note: auto-publishing is done in self.GetVertexByIndex()
9679             anObj = self.GetVertexByIndex(theShape, (nb_vert-1), theName)
9680             RaiseIfFailed("GetLastVertex", self.MeasuOp)
9681             return anObj
9682
9683         ## Get a normale to the given face. If the point is not given,
9684         #  the normale is calculated at the center of mass.
9685         #  @param theFace Face to define normale of.
9686         #  @param theOptionalPoint Point to compute the normale at.
9687         #  @param theName Object name; when specified, this parameter is used
9688         #         for result publication in the study. Otherwise, if automatic
9689         #         publication is switched on, default value is used for result name.
9690         #
9691         #  @return New GEOM.GEOM_Object, containing the created vector.
9692         #
9693         #  @ref swig_todo "Example"
9694         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
9695             """
9696             Get a normale to the given face. If the point is not given,
9697             the normale is calculated at the center of mass.
9698             
9699             Parameters: 
9700                 theFace Face to define normale of.
9701                 theOptionalPoint Point to compute the normale at.
9702                 theName Object name; when specified, this parameter is used
9703                         for result publication in the study. Otherwise, if automatic
9704                         publication is switched on, default value is used for result name.
9705
9706             Returns:   
9707                 New GEOM.GEOM_Object, containing the created vector.
9708             """
9709             # Example: see GEOM_TestMeasures.py
9710             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
9711             RaiseIfFailed("GetNormal", self.MeasuOp)
9712             self._autoPublish(anObj, theName, "normal")
9713             return anObj
9714
9715         ## Check a topology of the given shape.
9716         #  @param theShape Shape to check validity of.
9717         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
9718         #                        if TRUE, the shape's geometry will be checked also.
9719         #  @param theReturnStatus If FALSE and if theShape is invalid, a description \n
9720         #                        of problem is printed.
9721         #                        if TRUE and if theShape is invalid, the description 
9722         #                        of problem is also returned.
9723         #  @return TRUE, if the shape "seems to be valid".
9724         #
9725         #  @ref tui_measurement_tools_page "Example"
9726         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
9727             """
9728             Check a topology of the given shape.
9729
9730             Parameters: 
9731                 theShape Shape to check validity of.
9732                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
9733                                if TRUE, the shape's geometry will be checked also.
9734                 theReturnStatus If FALSE and if theShape is invalid, a description
9735                                 of problem is printed.
9736                                 if TRUE and if theShape is invalid, the description 
9737                                 of problem is returned.
9738
9739             Returns:   
9740                 TRUE, if the shape "seems to be valid".
9741                 If theShape is invalid, prints a description of problem.
9742                 This description can also be returned.
9743             """
9744             # Example: see GEOM_TestMeasures.py
9745             if theIsCheckGeom:
9746                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
9747                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
9748             else:
9749                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
9750                 RaiseIfFailed("CheckShape", self.MeasuOp)
9751             if IsValid == 0:
9752                 if theReturnStatus == 0:
9753                     print Status
9754             if theReturnStatus == 1:
9755               return (IsValid, Status)
9756             return IsValid
9757
9758         ## Detect self-intersections in the given shape.
9759         #  @param theShape Shape to check.
9760         #  @return TRUE, if the shape contains no self-intersections.
9761         #
9762         #  @ref tui_measurement_tools_page "Example"
9763         def CheckSelfIntersections(self, theShape):
9764             """
9765             Detect self-intersections in the given shape.
9766
9767             Parameters: 
9768                 theShape Shape to check.
9769
9770             Returns:   
9771                 TRUE, if the shape contains no self-intersections.
9772             """
9773             # Example: see GEOM_TestMeasures.py
9774             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
9775             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
9776             return IsValid
9777
9778         ## Get position (LCS) of theShape.
9779         #
9780         #  Origin of the LCS is situated at the shape's center of mass.
9781         #  Axes of the LCS are obtained from shape's location or,
9782         #  if the shape is a planar face, from position of its plane.
9783         #
9784         #  @param theShape Shape to calculate position of.
9785         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9786         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
9787         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9788         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9789         #
9790         #  @ref swig_todo "Example"
9791         def GetPosition(self,theShape):
9792             """
9793             Get position (LCS) of theShape.
9794             Origin of the LCS is situated at the shape's center of mass.
9795             Axes of the LCS are obtained from shape's location or,
9796             if the shape is a planar face, from position of its plane.
9797
9798             Parameters: 
9799                 theShape Shape to calculate position of.
9800
9801             Returns:  
9802                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
9803                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
9804                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
9805                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
9806             """
9807             # Example: see GEOM_TestMeasures.py
9808             aTuple = self.MeasuOp.GetPosition(theShape)
9809             RaiseIfFailed("GetPosition", self.MeasuOp)
9810             return aTuple
9811
9812         ## Get kind of theShape.
9813         #
9814         #  @param theShape Shape to get a kind of.
9815         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
9816         #          and a list of parameters, describing the shape.
9817         #  @note  Concrete meaning of each value, returned via \a theIntegers
9818         #         or \a theDoubles list depends on the kind() of the shape.
9819         #
9820         #  @ref swig_todo "Example"
9821         def KindOfShape(self,theShape):
9822             """
9823             Get kind of theShape.
9824          
9825             Parameters: 
9826                 theShape Shape to get a kind of.
9827
9828             Returns:
9829                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
9830                     and a list of parameters, describing the shape.
9831             Note:
9832                 Concrete meaning of each value, returned via theIntegers
9833                 or theDoubles list depends on the geompy.kind of the shape
9834             """
9835             # Example: see GEOM_TestMeasures.py
9836             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
9837             RaiseIfFailed("KindOfShape", self.MeasuOp)
9838
9839             aKind  = aRoughTuple[0]
9840             anInts = aRoughTuple[1]
9841             aDbls  = aRoughTuple[2]
9842
9843             # Now there is no exception from this rule:
9844             aKindTuple = [aKind] + aDbls + anInts
9845
9846             # If they are we will regroup parameters for such kind of shape.
9847             # For example:
9848             #if aKind == kind.SOME_KIND:
9849             #    #  SOME_KIND     int int double int double double
9850             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
9851
9852             return aKindTuple
9853
9854         # end of l2_measure
9855         ## @}
9856
9857         ## @addtogroup l2_import_export
9858         ## @{
9859
9860         ## Import a shape from the BREP or IGES or STEP file
9861         #  (depends on given format) with given name.
9862         #  @param theFileName The file, containing the shape.
9863         #  @param theFormatName Specify format for the file reading.
9864         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
9865         #         If format 'IGES_SCALE' is used instead of 'IGES' or
9866         #            format 'STEP_SCALE' is used instead of 'STEP',
9867         #            length unit will be set to 'meter' and result model will be scaled.
9868         #  @param theName Object name; when specified, this parameter is used
9869         #         for result publication in the study. Otherwise, if automatic
9870         #         publication is switched on, default value is used for result name.
9871         #
9872         #  @return New GEOM.GEOM_Object, containing the imported shape.
9873         #
9874         #  @ref swig_Import_Export "Example"
9875         def ImportFile(self, theFileName, theFormatName, theName=None):
9876             """
9877             Import a shape from the BREP or IGES or STEP file
9878             (depends on given format) with given name.
9879
9880             Parameters: 
9881                 theFileName The file, containing the shape.
9882                 theFormatName Specify format for the file reading.
9883                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
9884                     If format 'IGES_SCALE' is used instead of 'IGES' or
9885                        format 'STEP_SCALE' is used instead of 'STEP',
9886                        length unit will be set to 'meter' and result model will be scaled.
9887                 theName Object name; when specified, this parameter is used
9888                         for result publication in the study. Otherwise, if automatic
9889                         publication is switched on, default value is used for result name.
9890
9891             Returns:
9892                 New GEOM.GEOM_Object, containing the imported shape.
9893             """
9894             # Example: see GEOM_TestOthers.py
9895             anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
9896             RaiseIfFailed("ImportFile", self.InsertOp)
9897             self._autoPublish(anObj, theName, "imported")
9898             return anObj
9899
9900         ## Deprecated analog of ImportFile()
9901         def Import(self, theFileName, theFormatName, theName=None):
9902             """
9903             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
9904             """
9905             print "WARNING: Function Import is deprecated, use ImportFile instead"
9906             # note: auto-publishing is done in self.ImportFile()
9907             return self.ImportFile(theFileName, theFormatName, theName)
9908
9909         ## Shortcut to ImportFile() for BREP format.
9910         #  Import a shape from the BREP file with given name.
9911         #  @param theFileName The file, containing the shape.
9912         #  @param theName Object name; when specified, this parameter is used
9913         #         for result publication in the study. Otherwise, if automatic
9914         #         publication is switched on, default value is used for result name.
9915         #
9916         #  @return New GEOM.GEOM_Object, containing the imported shape.
9917         #
9918         #  @ref swig_Import_Export "Example"
9919         def ImportBREP(self, theFileName, theName=None):
9920             """
9921             geompy.ImportFile(...) function for BREP format
9922             Import a shape from the BREP file with given name.
9923
9924             Parameters: 
9925                 theFileName The file, containing the shape.
9926                 theName Object name; when specified, this parameter is used
9927                         for result publication in the study. Otherwise, if automatic
9928                         publication is switched on, default value is used for result name.
9929
9930             Returns:
9931                 New GEOM.GEOM_Object, containing the imported shape.
9932             """
9933             # Example: see GEOM_TestOthers.py
9934             # note: auto-publishing is done in self.ImportFile()
9935             return self.ImportFile(theFileName, "BREP", theName)
9936
9937         ## Shortcut to ImportFile() for IGES format
9938         #  Import a shape from the IGES file with given name.
9939         #  @param theFileName The file, containing the shape.
9940         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9941         #                     and result model will be scaled, if its units are not meters.
9942         #                     If False (default), file length units will be taken into account.
9943         #  @param theName Object name; when specified, this parameter is used
9944         #         for result publication in the study. Otherwise, if automatic
9945         #         publication is switched on, default value is used for result name.
9946         #
9947         #  @return New GEOM.GEOM_Object, containing the imported shape.
9948         #
9949         #  @ref swig_Import_Export "Example"
9950         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
9951             """
9952             geompy.ImportFile(...) function for IGES format
9953
9954             Parameters:
9955                 theFileName The file, containing the shape.
9956                 ignoreUnits If True, file length units will be ignored (set to 'meter')
9957                             and result model will be scaled, if its units are not meters.
9958                             If False (default), file length units will be taken into account.
9959                 theName Object name; when specified, this parameter is used
9960                         for result publication in the study. Otherwise, if automatic
9961                         publication is switched on, default value is used for result name.
9962
9963             Returns:
9964                 New GEOM.GEOM_Object, containing the imported shape.
9965             """
9966             # Example: see GEOM_TestOthers.py
9967             # note: auto-publishing is done in self.ImportFile()
9968             if ignoreUnits:
9969                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
9970             return self.ImportFile(theFileName, "IGES", theName)
9971
9972         ## Return length unit from given IGES file
9973         #  @param theFileName The file, containing the shape.
9974         #  @return String, containing the units name.
9975         #
9976         #  @ref swig_Import_Export "Example"
9977         def GetIGESUnit(self, theFileName):
9978             """
9979             Return length units from given IGES file
9980
9981             Parameters:
9982                 theFileName The file, containing the shape.
9983
9984             Returns:
9985                 String, containing the units name.
9986             """
9987             # Example: see GEOM_TestOthers.py
9988             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
9989             return aUnitName
9990
9991         ## Shortcut to ImportFile() for STEP format
9992         #  Import a shape from the STEP file with given name.
9993         #  @param theFileName The file, containing the shape.
9994         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
9995         #                     and result model will be scaled, if its units are not meters.
9996         #                     If False (default), file length units will be taken into account.
9997         #  @param theName Object name; when specified, this parameter is used
9998         #         for result publication in the study. Otherwise, if automatic
9999         #         publication is switched on, default value is used for result name.
10000         #
10001         #  @return New GEOM.GEOM_Object, containing the imported shape.
10002         #
10003         #  @ref swig_Import_Export "Example"
10004         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10005             """
10006             geompy.ImportFile(...) function for STEP format
10007
10008             Parameters:
10009                 theFileName The file, containing the shape.
10010                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10011                             and result model will be scaled, if its units are not meters.
10012                             If False (default), file length units will be taken into account.
10013                 theName Object name; when specified, this parameter is used
10014                         for result publication in the study. Otherwise, if automatic
10015                         publication is switched on, default value is used for result name.
10016
10017             Returns:
10018                 New GEOM.GEOM_Object, containing the imported shape.
10019             """
10020             # Example: see GEOM_TestOthers.py
10021             # note: auto-publishing is done in self.ImportFile()
10022             if ignoreUnits:
10023                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10024             return self.ImportFile(theFileName, "STEP", theName)
10025
10026         ## Return length unit from given IGES or STEP file
10027         #  @param theFileName The file, containing the shape.
10028         #  @return String, containing the units name.
10029         #
10030         #  @ref swig_Import_Export "Example"
10031         def GetSTEPUnit(self, theFileName):
10032             """
10033             Return length units from given STEP file
10034
10035             Parameters:
10036                 theFileName The file, containing the shape.
10037
10038             Returns:
10039                 String, containing the units name.
10040             """
10041             # Example: see GEOM_TestOthers.py
10042             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10043             return aUnitName
10044
10045         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10046         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10047         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10048         #  @param theStream The BRep binary stream.
10049         #  @param theName Object name; when specified, this parameter is used
10050         #         for result publication in the study. Otherwise, if automatic
10051         #         publication is switched on, default value is used for result name.
10052         #
10053         #  @return New GEOM_Object, containing the shape, read from theStream.
10054         #
10055         #  @ref swig_Import_Export "Example"
10056         def RestoreShape (self, theStream, theName=None):
10057             """
10058             Read a shape from the binary stream, containing its bounding representation (BRep).
10059
10060             Note:
10061                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10062
10063             Parameters: 
10064                 theStream The BRep binary stream.
10065                 theName Object name; when specified, this parameter is used
10066                         for result publication in the study. Otherwise, if automatic
10067                         publication is switched on, default value is used for result name.
10068
10069             Returns:
10070                 New GEOM_Object, containing the shape, read from theStream.
10071             """
10072             # Example: see GEOM_TestOthers.py
10073             anObj = self.InsertOp.RestoreShape(theStream)
10074             RaiseIfFailed("RestoreShape", self.InsertOp)
10075             self._autoPublish(anObj, theName, "restored")
10076             return anObj
10077
10078         ## Export the given shape into a file with given name.
10079         #  @param theObject Shape to be stored in the file.
10080         #  @param theFileName Name of the file to store the given shape in.
10081         #  @param theFormatName Specify format for the shape storage.
10082         #         Available formats can be obtained with
10083         #         geompy.InsertOp.ExportTranslators()[0] method.
10084         #
10085         #  @ref swig_Import_Export "Example"
10086         def Export(self, theObject, theFileName, theFormatName):
10087             """
10088             Export the given shape into a file with given name.
10089
10090             Parameters: 
10091                 theObject Shape to be stored in the file.
10092                 theFileName Name of the file to store the given shape in.
10093                 theFormatName Specify format for the shape storage.
10094                               Available formats can be obtained with
10095                               geompy.InsertOp.ExportTranslators()[0] method.
10096             """
10097             # Example: see GEOM_TestOthers.py
10098             self.InsertOp.Export(theObject, theFileName, theFormatName)
10099             if self.InsertOp.IsDone() == 0:
10100                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10101                 pass
10102             pass
10103
10104         ## Shortcut to Export() for BREP format
10105         #
10106         #  @ref swig_Import_Export "Example"
10107         def ExportBREP(self,theObject, theFileName):
10108             """
10109             geompy.Export(...) function for BREP format
10110             """
10111             # Example: see GEOM_TestOthers.py
10112             return self.Export(theObject, theFileName, "BREP")
10113
10114         ## Shortcut to Export() for IGES format
10115         #
10116         #  @ref swig_Import_Export "Example"
10117         def ExportIGES(self,theObject, theFileName):
10118             """
10119             geompy.Export(...) function for IGES format
10120             """
10121             # Example: see GEOM_TestOthers.py
10122             return self.Export(theObject, theFileName, "IGES")
10123
10124         ## Shortcut to Export() for STEP format
10125         #
10126         #  @ref swig_Import_Export "Example"
10127         def ExportSTEP(self,theObject, theFileName):
10128             """
10129             geompy.Export(...) function for STEP format
10130             """
10131             # Example: see GEOM_TestOthers.py
10132             return self.Export(theObject, theFileName, "STEP")
10133
10134         # end of l2_import_export
10135         ## @}
10136
10137         ## @addtogroup l3_blocks
10138         ## @{
10139
10140         ## Create a quadrangle face from four edges. Order of Edges is not
10141         #  important. It is  not necessary that edges share the same vertex.
10142         #  @param E1,E2,E3,E4 Edges for the face bound.
10143         #  @param theName Object name; when specified, this parameter is used
10144         #         for result publication in the study. Otherwise, if automatic
10145         #         publication is switched on, default value is used for result name.
10146         #
10147         #  @return New GEOM.GEOM_Object, containing the created face.
10148         #
10149         #  @ref tui_building_by_blocks_page "Example"
10150         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10151             """
10152             Create a quadrangle face from four edges. Order of Edges is not
10153             important. It is  not necessary that edges share the same vertex.
10154
10155             Parameters: 
10156                 E1,E2,E3,E4 Edges for the face bound.
10157                 theName Object name; when specified, this parameter is used
10158                         for result publication in the study. Otherwise, if automatic
10159                         publication is switched on, default value is used for result name.
10160
10161             Returns: 
10162                 New GEOM.GEOM_Object, containing the created face.
10163
10164             Example of usage:               
10165                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10166             """
10167             # Example: see GEOM_Spanner.py
10168             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10169             RaiseIfFailed("MakeQuad", self.BlocksOp)
10170             self._autoPublish(anObj, theName, "quad")
10171             return anObj
10172
10173         ## Create a quadrangle face on two edges.
10174         #  The missing edges will be built by creating the shortest ones.
10175         #  @param E1,E2 Two opposite edges for the face.
10176         #  @param theName Object name; when specified, this parameter is used
10177         #         for result publication in the study. Otherwise, if automatic
10178         #         publication is switched on, default value is used for result name.
10179         #
10180         #  @return New GEOM.GEOM_Object, containing the created face.
10181         #
10182         #  @ref tui_building_by_blocks_page "Example"
10183         def MakeQuad2Edges(self, E1, E2, theName=None):
10184             """
10185             Create a quadrangle face on two edges.
10186             The missing edges will be built by creating the shortest ones.
10187
10188             Parameters: 
10189                 E1,E2 Two opposite edges for the face.
10190                 theName Object name; when specified, this parameter is used
10191                         for result publication in the study. Otherwise, if automatic
10192                         publication is switched on, default value is used for result name.
10193
10194             Returns: 
10195                 New GEOM.GEOM_Object, containing the created face.
10196             
10197             Example of usage:
10198                 # create vertices
10199                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10200                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10201                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10202                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10203                 # create edges
10204                 edge1 = geompy.MakeEdge(p1, p2)
10205                 edge2 = geompy.MakeEdge(p3, p4)
10206                 # create a quadrangle face from two edges
10207                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10208             """
10209             # Example: see GEOM_Spanner.py
10210             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10211             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10212             self._autoPublish(anObj, theName, "quad")
10213             return anObj
10214
10215         ## Create a quadrangle face with specified corners.
10216         #  The missing edges will be built by creating the shortest ones.
10217         #  @param V1,V2,V3,V4 Corner vertices for the face.
10218         #  @param theName Object name; when specified, this parameter is used
10219         #         for result publication in the study. Otherwise, if automatic
10220         #         publication is switched on, default value is used for result name.
10221         #
10222         #  @return New GEOM.GEOM_Object, containing the created face.
10223         #
10224         #  @ref tui_building_by_blocks_page "Example 1"
10225         #  \n @ref swig_MakeQuad4Vertices "Example 2"
10226         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
10227             """
10228             Create a quadrangle face with specified corners.
10229             The missing edges will be built by creating the shortest ones.
10230
10231             Parameters: 
10232                 V1,V2,V3,V4 Corner vertices for the face.
10233                 theName Object name; when specified, this parameter is used
10234                         for result publication in the study. Otherwise, if automatic
10235                         publication is switched on, default value is used for result name.
10236
10237             Returns: 
10238                 New GEOM.GEOM_Object, containing the created face.
10239
10240             Example of usage:
10241                 # create vertices
10242                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10243                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10244                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10245                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10246                 # create a quadrangle from four points in its corners
10247                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
10248             """
10249             # Example: see GEOM_Spanner.py
10250             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
10251             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
10252             self._autoPublish(anObj, theName, "quad")
10253             return anObj
10254
10255         ## Create a hexahedral solid, bounded by the six given faces. Order of
10256         #  faces is not important. It is  not necessary that Faces share the same edge.
10257         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10258         #  @param theName Object name; when specified, this parameter is used
10259         #         for result publication in the study. Otherwise, if automatic
10260         #         publication is switched on, default value is used for result name.
10261         #
10262         #  @return New GEOM.GEOM_Object, containing the created solid.
10263         #
10264         #  @ref tui_building_by_blocks_page "Example 1"
10265         #  \n @ref swig_MakeHexa "Example 2"
10266         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
10267             """
10268             Create a hexahedral solid, bounded by the six given faces. Order of
10269             faces is not important. It is  not necessary that Faces share the same edge.
10270
10271             Parameters: 
10272                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
10273                 theName Object name; when specified, this parameter is used
10274                         for result publication in the study. Otherwise, if automatic
10275                         publication is switched on, default value is used for result name.
10276
10277             Returns:    
10278                 New GEOM.GEOM_Object, containing the created solid.
10279
10280             Example of usage:
10281                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
10282             """
10283             # Example: see GEOM_Spanner.py
10284             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
10285             RaiseIfFailed("MakeHexa", self.BlocksOp)
10286             self._autoPublish(anObj, theName, "hexa")
10287             return anObj
10288
10289         ## Create a hexahedral solid between two given faces.
10290         #  The missing faces will be built by creating the smallest ones.
10291         #  @param F1,F2 Two opposite faces for the hexahedral solid.
10292         #  @param theName Object name; when specified, this parameter is used
10293         #         for result publication in the study. Otherwise, if automatic
10294         #         publication is switched on, default value is used for result name.
10295         #
10296         #  @return New GEOM.GEOM_Object, containing the created solid.
10297         #
10298         #  @ref tui_building_by_blocks_page "Example 1"
10299         #  \n @ref swig_MakeHexa2Faces "Example 2"
10300         def MakeHexa2Faces(self, F1, F2, theName=None):
10301             """
10302             Create a hexahedral solid between two given faces.
10303             The missing faces will be built by creating the smallest ones.
10304
10305             Parameters: 
10306                 F1,F2 Two opposite faces for the hexahedral solid.
10307                 theName Object name; when specified, this parameter is used
10308                         for result publication in the study. Otherwise, if automatic
10309                         publication is switched on, default value is used for result name.
10310
10311             Returns:
10312                 New GEOM.GEOM_Object, containing the created solid.
10313
10314             Example of usage:
10315                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
10316             """
10317             # Example: see GEOM_Spanner.py
10318             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
10319             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
10320             self._autoPublish(anObj, theName, "hexa")
10321             return anObj
10322
10323         # end of l3_blocks
10324         ## @}
10325
10326         ## @addtogroup l3_blocks_op
10327         ## @{
10328
10329         ## Get a vertex, found in the given shape by its coordinates.
10330         #  @param theShape Block or a compound of blocks.
10331         #  @param theX,theY,theZ Coordinates of the sought vertex.
10332         #  @param theEpsilon Maximum allowed distance between the resulting
10333         #                    vertex and point with the given coordinates.
10334         #  @param theName Object name; when specified, this parameter is used
10335         #         for result publication in the study. Otherwise, if automatic
10336         #         publication is switched on, default value is used for result name.
10337         #
10338         #  @return New GEOM.GEOM_Object, containing the found vertex.
10339         #
10340         #  @ref swig_GetPoint "Example"
10341         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
10342             """
10343             Get a vertex, found in the given shape by its coordinates.
10344
10345             Parameters: 
10346                 theShape Block or a compound of blocks.
10347                 theX,theY,theZ Coordinates of the sought vertex.
10348                 theEpsilon Maximum allowed distance between the resulting
10349                            vertex and point with the given coordinates.
10350                 theName Object name; when specified, this parameter is used
10351                         for result publication in the study. Otherwise, if automatic
10352                         publication is switched on, default value is used for result name.
10353
10354             Returns:                  
10355                 New GEOM.GEOM_Object, containing the found vertex.
10356
10357             Example of usage:
10358                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
10359             """
10360             # Example: see GEOM_TestOthers.py
10361             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
10362             RaiseIfFailed("GetPoint", self.BlocksOp)
10363             self._autoPublish(anObj, theName, "vertex")
10364             return anObj
10365
10366         ## Find a vertex of the given shape, which has minimal distance to the given point.
10367         #  @param theShape Any shape.
10368         #  @param thePoint Point, close to the desired vertex.
10369         #  @param theName Object name; when specified, this parameter is used
10370         #         for result publication in the study. Otherwise, if automatic
10371         #         publication is switched on, default value is used for result name.
10372         #
10373         #  @return New GEOM.GEOM_Object, containing the found vertex.
10374         #
10375         #  @ref swig_GetVertexNearPoint "Example"
10376         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
10377             """
10378             Find a vertex of the given shape, which has minimal distance to the given point.
10379
10380             Parameters: 
10381                 theShape Any shape.
10382                 thePoint Point, close to the desired vertex.
10383                 theName Object name; when specified, this parameter is used
10384                         for result publication in the study. Otherwise, if automatic
10385                         publication is switched on, default value is used for result name.
10386
10387             Returns:
10388                 New GEOM.GEOM_Object, containing the found vertex.
10389
10390             Example of usage:
10391                 pmidle = geompy.MakeVertex(50, 0, 50)
10392                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
10393             """
10394             # Example: see GEOM_TestOthers.py
10395             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
10396             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
10397             self._autoPublish(anObj, theName, "vertex")
10398             return anObj
10399
10400         ## Get an edge, found in the given shape by two given vertices.
10401         #  @param theShape Block or a compound of blocks.
10402         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
10403         #  @param theName Object name; when specified, this parameter is used
10404         #         for result publication in the study. Otherwise, if automatic
10405         #         publication is switched on, default value is used for result name.
10406         #
10407         #  @return New GEOM.GEOM_Object, containing the found edge.
10408         #
10409         #  @ref swig_GetEdge "Example"
10410         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
10411             """
10412             Get an edge, found in the given shape by two given vertices.
10413
10414             Parameters: 
10415                 theShape Block or a compound of blocks.
10416                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
10417                 theName Object name; when specified, this parameter is used
10418                         for result publication in the study. Otherwise, if automatic
10419                         publication is switched on, default value is used for result name.
10420
10421             Returns:
10422                 New GEOM.GEOM_Object, containing the found edge.
10423             """
10424             # Example: see GEOM_Spanner.py
10425             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
10426             RaiseIfFailed("GetEdge", self.BlocksOp)
10427             self._autoPublish(anObj, theName, "edge")
10428             return anObj
10429
10430         ## Find an edge of the given shape, which has minimal distance to the given point.
10431         #  @param theShape Block or a compound of blocks.
10432         #  @param thePoint Point, close to the desired edge.
10433         #  @param theName Object name; when specified, this parameter is used
10434         #         for result publication in the study. Otherwise, if automatic
10435         #         publication is switched on, default value is used for result name.
10436         #
10437         #  @return New GEOM.GEOM_Object, containing the found edge.
10438         #
10439         #  @ref swig_GetEdgeNearPoint "Example"
10440         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
10441             """
10442             Find an edge of the given shape, which has minimal distance to the given point.
10443
10444             Parameters: 
10445                 theShape Block or a compound of blocks.
10446                 thePoint Point, close to the desired edge.
10447                 theName Object name; when specified, this parameter is used
10448                         for result publication in the study. Otherwise, if automatic
10449                         publication is switched on, default value is used for result name.
10450
10451             Returns:
10452                 New GEOM.GEOM_Object, containing the found edge.
10453             """
10454             # Example: see GEOM_TestOthers.py
10455             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
10456             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
10457             self._autoPublish(anObj, theName, "edge")
10458             return anObj
10459
10460         ## Returns a face, found in the given shape by four given corner vertices.
10461         #  @param theShape Block or a compound of blocks.
10462         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10463         #  @param theName Object name; when specified, this parameter is used
10464         #         for result publication in the study. Otherwise, if automatic
10465         #         publication is switched on, default value is used for result name.
10466         #
10467         #  @return New GEOM.GEOM_Object, containing the found face.
10468         #
10469         #  @ref swig_todo "Example"
10470         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
10471             """
10472             Returns a face, found in the given shape by four given corner vertices.
10473
10474             Parameters:
10475                 theShape Block or a compound of blocks.
10476                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
10477                 theName Object name; when specified, this parameter is used
10478                         for result publication in the study. Otherwise, if automatic
10479                         publication is switched on, default value is used for result name.
10480
10481             Returns:
10482                 New GEOM.GEOM_Object, containing the found face.
10483             """
10484             # Example: see GEOM_Spanner.py
10485             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
10486             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
10487             self._autoPublish(anObj, theName, "face")
10488             return anObj
10489
10490         ## Get a face of block, found in the given shape by two given edges.
10491         #  @param theShape Block or a compound of blocks.
10492         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
10493         #  @param theName Object name; when specified, this parameter is used
10494         #         for result publication in the study. Otherwise, if automatic
10495         #         publication is switched on, default value is used for result name.
10496         #
10497         #  @return New GEOM.GEOM_Object, containing the found face.
10498         #
10499         #  @ref swig_todo "Example"
10500         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
10501             """
10502             Get a face of block, found in the given shape by two given edges.
10503
10504             Parameters:
10505                 theShape Block or a compound of blocks.
10506                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
10507                 theName Object name; when specified, this parameter is used
10508                         for result publication in the study. Otherwise, if automatic
10509                         publication is switched on, default value is used for result name.
10510
10511             Returns:
10512                 New GEOM.GEOM_Object, containing the found face.
10513             """
10514             # Example: see GEOM_Spanner.py
10515             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
10516             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
10517             self._autoPublish(anObj, theName, "face")
10518             return anObj
10519
10520         ## Find a face, opposite to the given one in the given block.
10521         #  @param theBlock Must be a hexahedral solid.
10522         #  @param theFace Face of \a theBlock, opposite to the desired face.
10523         #  @param theName Object name; when specified, this parameter is used
10524         #         for result publication in the study. Otherwise, if automatic
10525         #         publication is switched on, default value is used for result name.
10526         #
10527         #  @return New GEOM.GEOM_Object, containing the found face.
10528         #
10529         #  @ref swig_GetOppositeFace "Example"
10530         def GetOppositeFace(self, theBlock, theFace, theName=None):
10531             """
10532             Find a face, opposite to the given one in the given block.
10533
10534             Parameters:
10535                 theBlock Must be a hexahedral solid.
10536                 theFace Face of theBlock, opposite to the desired face.
10537                 theName Object name; when specified, this parameter is used
10538                         for result publication in the study. Otherwise, if automatic
10539                         publication is switched on, default value is used for result name.
10540
10541             Returns: 
10542                 New GEOM.GEOM_Object, containing the found face.
10543             """
10544             # Example: see GEOM_Spanner.py
10545             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
10546             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
10547             self._autoPublish(anObj, theName, "face")
10548             return anObj
10549
10550         ## Find a face of the given shape, which has minimal distance to the given point.
10551         #  @param theShape Block or a compound of blocks.
10552         #  @param thePoint Point, close to the desired face.
10553         #  @param theName Object name; when specified, this parameter is used
10554         #         for result publication in the study. Otherwise, if automatic
10555         #         publication is switched on, default value is used for result name.
10556         #
10557         #  @return New GEOM.GEOM_Object, containing the found face.
10558         #
10559         #  @ref swig_GetFaceNearPoint "Example"
10560         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
10561             """
10562             Find a face of the given shape, which has minimal distance to the given point.
10563
10564             Parameters:
10565                 theShape Block or a compound of blocks.
10566                 thePoint Point, close to the desired face.
10567                 theName Object name; when specified, this parameter is used
10568                         for result publication in the study. Otherwise, if automatic
10569                         publication is switched on, default value is used for result name.
10570
10571             Returns:
10572                 New GEOM.GEOM_Object, containing the found face.
10573             """
10574             # Example: see GEOM_Spanner.py
10575             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
10576             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
10577             self._autoPublish(anObj, theName, "face")
10578             return anObj
10579
10580         ## Find a face of block, whose outside normale has minimal angle with the given vector.
10581         #  @param theBlock Block or a compound of blocks.
10582         #  @param theVector Vector, close to the normale of the desired face.
10583         #  @param theName Object name; when specified, this parameter is used
10584         #         for result publication in the study. Otherwise, if automatic
10585         #         publication is switched on, default value is used for result name.
10586         #
10587         #  @return New GEOM.GEOM_Object, containing the found face.
10588         #
10589         #  @ref swig_todo "Example"
10590         def GetFaceByNormale(self, theBlock, theVector, theName=None):
10591             """
10592             Find a face of block, whose outside normale has minimal angle with the given vector.
10593
10594             Parameters:
10595                 theBlock Block or a compound of blocks.
10596                 theVector Vector, close to the normale of the desired face.
10597                 theName Object name; when specified, this parameter is used
10598                         for result publication in the study. Otherwise, if automatic
10599                         publication is switched on, default value is used for result name.
10600
10601             Returns:
10602                 New GEOM.GEOM_Object, containing the found face.
10603             """
10604             # Example: see GEOM_Spanner.py
10605             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
10606             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
10607             self._autoPublish(anObj, theName, "face")
10608             return anObj
10609
10610         ## Find all sub-shapes of type \a theShapeType of the given shape,
10611         #  which have minimal distance to the given point.
10612         #  @param theShape Any shape.
10613         #  @param thePoint Point, close to the desired shape.
10614         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
10615         #  @param theTolerance The tolerance for distances comparison. All shapes
10616         #                      with distances to the given point in interval
10617         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
10618         #  @param theName Object name; when specified, this parameter is used
10619         #         for result publication in the study. Otherwise, if automatic
10620         #         publication is switched on, default value is used for result name.
10621         #
10622         #  @return New GEOM_Object, containing a group of all found shapes.
10623         #
10624         #  @ref swig_GetShapesNearPoint "Example"
10625         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
10626             """
10627             Find all sub-shapes of type theShapeType of the given shape,
10628             which have minimal distance to the given point.
10629
10630             Parameters:
10631                 theShape Any shape.
10632                 thePoint Point, close to the desired shape.
10633                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
10634                 theTolerance The tolerance for distances comparison. All shapes
10635                                 with distances to the given point in interval
10636                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
10637                 theName Object name; when specified, this parameter is used
10638                         for result publication in the study. Otherwise, if automatic
10639                         publication is switched on, default value is used for result name.
10640
10641             Returns:
10642                 New GEOM_Object, containing a group of all found shapes.
10643             """
10644             # Example: see GEOM_TestOthers.py
10645             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
10646             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
10647             self._autoPublish(anObj, theName, "group")
10648             return anObj
10649
10650         # end of l3_blocks_op
10651         ## @}
10652
10653         ## @addtogroup l4_blocks_measure
10654         ## @{
10655
10656         ## Check, if the compound of blocks is given.
10657         #  To be considered as a compound of blocks, the
10658         #  given shape must satisfy the following conditions:
10659         #  - Each element of the compound should be a Block (6 faces and 12 edges).
10660         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10661         #  - The compound should be connexe.
10662         #  - The glue between two quadrangle faces should be applied.
10663         #  @param theCompound The compound to check.
10664         #  @return TRUE, if the given shape is a compound of blocks.
10665         #  If theCompound is not valid, prints all discovered errors.
10666         #
10667         #  @ref tui_measurement_tools_page "Example 1"
10668         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
10669         def CheckCompoundOfBlocks(self,theCompound):
10670             """
10671             Check, if the compound of blocks is given.
10672             To be considered as a compound of blocks, the
10673             given shape must satisfy the following conditions:
10674             - Each element of the compound should be a Block (6 faces and 12 edges).
10675             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
10676             - The compound should be connexe.
10677             - The glue between two quadrangle faces should be applied.
10678
10679             Parameters:
10680                 theCompound The compound to check.
10681
10682             Returns:
10683                 TRUE, if the given shape is a compound of blocks.
10684                 If theCompound is not valid, prints all discovered errors.            
10685             """
10686             # Example: see GEOM_Spanner.py
10687             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
10688             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
10689             if IsValid == 0:
10690                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
10691                 print Descr
10692             return IsValid
10693
10694         ## Retrieve all non blocks solids and faces from \a theShape.
10695         #  @param theShape The shape to explore.
10696         #  @param theName Object name; when specified, this parameter is used
10697         #         for result publication in the study. Otherwise, if automatic
10698         #         publication is switched on, default value is used for result name.
10699         #
10700         #  @return A tuple of two GEOM_Objects. The first object is a group of all
10701         #          non block solids (= not 6 faces, or with 6 faces, but with the
10702         #          presence of non-quadrangular faces). The second object is a
10703         #          group of all non quadrangular faces.
10704         #
10705         #  @ref tui_measurement_tools_page "Example 1"
10706         #  \n @ref swig_GetNonBlocks "Example 2"
10707         def GetNonBlocks (self, theShape, theName=None):
10708             """
10709             Retrieve all non blocks solids and faces from theShape.
10710
10711             Parameters:
10712                 theShape The shape to explore.
10713                 theName Object name; when specified, this parameter is used
10714                         for result publication in the study. Otherwise, if automatic
10715                         publication is switched on, default value is used for result name.
10716
10717             Returns:
10718                 A tuple of two GEOM_Objects. The first object is a group of all
10719                 non block solids (= not 6 faces, or with 6 faces, but with the
10720                 presence of non-quadrangular faces). The second object is a
10721                 group of all non quadrangular faces.
10722
10723             Usage:
10724                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
10725             """
10726             # Example: see GEOM_Spanner.py
10727             aTuple = self.BlocksOp.GetNonBlocks(theShape)
10728             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
10729             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
10730             return aTuple
10731
10732         ## Remove all seam and degenerated edges from \a theShape.
10733         #  Unite faces and edges, sharing one surface. It means that
10734         #  this faces must have references to one C++ surface object (handle).
10735         #  @param theShape The compound or single solid to remove irregular edges from.
10736         #  @param doUnionFaces If True, then unite faces. If False (the default value),
10737         #         do not unite faces.
10738         #  @param theName Object name; when specified, this parameter is used
10739         #         for result publication in the study. Otherwise, if automatic
10740         #         publication is switched on, default value is used for result name.
10741         #
10742         #  @return Improved shape.
10743         #
10744         #  @ref swig_RemoveExtraEdges "Example"
10745         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
10746             """
10747             Remove all seam and degenerated edges from theShape.
10748             Unite faces and edges, sharing one surface. It means that
10749             this faces must have references to one C++ surface object (handle).
10750
10751             Parameters:
10752                 theShape The compound or single solid to remove irregular edges from.
10753                 doUnionFaces If True, then unite faces. If False (the default value),
10754                              do not unite faces.
10755                 theName Object name; when specified, this parameter is used
10756                         for result publication in the study. Otherwise, if automatic
10757                         publication is switched on, default value is used for result name.
10758
10759             Returns: 
10760                 Improved shape.
10761             """
10762             # Example: see GEOM_TestOthers.py
10763             nbFacesOptimum = -1 # -1 means do not unite faces
10764             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
10765             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
10766             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
10767             self._autoPublish(anObj, theName, "removeExtraEdges")
10768             return anObj
10769
10770         ## Performs union faces of \a theShape
10771         #  Unite faces sharing one surface. It means that
10772         #  these faces must have references to one C++ surface object (handle).
10773         #  @param theShape The compound or single solid that contains faces
10774         #         to perform union.
10775         #  @param theName Object name; when specified, this parameter is used
10776         #         for result publication in the study. Otherwise, if automatic
10777         #         publication is switched on, default value is used for result name.
10778         #
10779         #  @return Improved shape.
10780         #
10781         #  @ref swig_UnionFaces "Example"
10782         def UnionFaces(self, theShape, theName=None):
10783             """
10784             Performs union faces of theShape.
10785             Unite faces sharing one surface. It means that
10786             these faces must have references to one C++ surface object (handle).
10787
10788             Parameters:
10789                 theShape The compound or single solid that contains faces
10790                          to perform union.
10791                 theName Object name; when specified, this parameter is used
10792                         for result publication in the study. Otherwise, if automatic
10793                         publication is switched on, default value is used for result name.
10794
10795             Returns: 
10796                 Improved shape.
10797             """
10798             # Example: see GEOM_TestOthers.py
10799             anObj = self.BlocksOp.UnionFaces(theShape)
10800             RaiseIfFailed("UnionFaces", self.BlocksOp)
10801             self._autoPublish(anObj, theName, "unionFaces")
10802             return anObj
10803
10804         ## Check, if the given shape is a blocks compound.
10805         #  Fix all detected errors.
10806         #    \note Single block can be also fixed by this method.
10807         #  @param theShape The compound to check and improve.
10808         #  @param theName Object name; when specified, this parameter is used
10809         #         for result publication in the study. Otherwise, if automatic
10810         #         publication is switched on, default value is used for result name.
10811         #
10812         #  @return Improved compound.
10813         #
10814         #  @ref swig_CheckAndImprove "Example"
10815         def CheckAndImprove(self, theShape, theName=None):
10816             """
10817             Check, if the given shape is a blocks compound.
10818             Fix all detected errors.
10819
10820             Note:
10821                 Single block can be also fixed by this method.
10822
10823             Parameters:
10824                 theShape The compound to check and improve.
10825                 theName Object name; when specified, this parameter is used
10826                         for result publication in the study. Otherwise, if automatic
10827                         publication is switched on, default value is used for result name.
10828
10829             Returns: 
10830                 Improved compound.
10831             """
10832             # Example: see GEOM_TestOthers.py
10833             anObj = self.BlocksOp.CheckAndImprove(theShape)
10834             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
10835             self._autoPublish(anObj, theName, "improved")
10836             return anObj
10837
10838         # end of l4_blocks_measure
10839         ## @}
10840
10841         ## @addtogroup l3_blocks_op
10842         ## @{
10843
10844         ## Get all the blocks, contained in the given compound.
10845         #  @param theCompound The compound to explode.
10846         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
10847         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
10848         #  @param theName Object name; when specified, this parameter is used
10849         #         for result publication in the study. Otherwise, if automatic
10850         #         publication is switched on, default value is used for result name.
10851         #
10852         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10853         #
10854         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
10855         #
10856         #  @ref tui_explode_on_blocks "Example 1"
10857         #  \n @ref swig_MakeBlockExplode "Example 2"
10858         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
10859             """
10860             Get all the blocks, contained in the given compound.
10861
10862             Parameters:
10863                 theCompound The compound to explode.
10864                 theMinNbFaces If solid has lower number of faces, it is not a block.
10865                 theMaxNbFaces If solid has higher number of faces, it is not a block.
10866                 theName Object name; when specified, this parameter is used
10867                         for result publication in the study. Otherwise, if automatic
10868                         publication is switched on, default value is used for result name.
10869
10870             Note:
10871                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
10872
10873             Returns:  
10874                 List of GEOM.GEOM_Object, containing the retrieved blocks.
10875             """
10876             # Example: see GEOM_TestOthers.py
10877             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
10878             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
10879             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
10880             for anObj in aList:
10881                 anObj.SetParameters(Parameters)
10882                 pass
10883             self._autoPublish(aList, theName, "block")
10884             return aList
10885
10886         ## Find block, containing the given point inside its volume or on boundary.
10887         #  @param theCompound Compound, to find block in.
10888         #  @param thePoint Point, close to the desired block. If the point lays on
10889         #         boundary between some blocks, we return block with nearest center.
10890         #  @param theName Object name; when specified, this parameter is used
10891         #         for result publication in the study. Otherwise, if automatic
10892         #         publication is switched on, default value is used for result name.
10893         #
10894         #  @return New GEOM.GEOM_Object, containing the found block.
10895         #
10896         #  @ref swig_todo "Example"
10897         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
10898             """
10899             Find block, containing the given point inside its volume or on boundary.
10900
10901             Parameters:
10902                 theCompound Compound, to find block in.
10903                 thePoint Point, close to the desired block. If the point lays on
10904                          boundary between some blocks, we return block with nearest center.
10905                 theName Object name; when specified, this parameter is used
10906                         for result publication in the study. Otherwise, if automatic
10907                         publication is switched on, default value is used for result name.
10908
10909             Returns:
10910                 New GEOM.GEOM_Object, containing the found block.
10911             """
10912             # Example: see GEOM_Spanner.py
10913             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
10914             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
10915             self._autoPublish(anObj, theName, "block")
10916             return anObj
10917
10918         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10919         #  @param theCompound Compound, to find block in.
10920         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
10921         #  @param theName Object name; when specified, this parameter is used
10922         #         for result publication in the study. Otherwise, if automatic
10923         #         publication is switched on, default value is used for result name.
10924         #
10925         #  @return New GEOM.GEOM_Object, containing the found block.
10926         #
10927         #  @ref swig_GetBlockByParts "Example"
10928         def GetBlockByParts(self, theCompound, theParts, theName=None):
10929             """
10930              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
10931
10932              Parameters:
10933                 theCompound Compound, to find block in.
10934                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
10935                 theName Object name; when specified, this parameter is used
10936                         for result publication in the study. Otherwise, if automatic
10937                         publication is switched on, default value is used for result name.
10938
10939             Returns: 
10940                 New GEOM_Object, containing the found block.
10941             """
10942             # Example: see GEOM_TestOthers.py
10943             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
10944             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
10945             self._autoPublish(anObj, theName, "block")
10946             return anObj
10947
10948         ## Return all blocks, containing all the elements, passed as the parts.
10949         #  @param theCompound Compound, to find blocks in.
10950         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10951         #  @param theName Object name; when specified, this parameter is used
10952         #         for result publication in the study. Otherwise, if automatic
10953         #         publication is switched on, default value is used for result name.
10954         #
10955         #  @return List of GEOM.GEOM_Object, containing the found blocks.
10956         #
10957         #  @ref swig_todo "Example"
10958         def GetBlocksByParts(self, theCompound, theParts, theName=None):
10959             """
10960             Return all blocks, containing all the elements, passed as the parts.
10961
10962             Parameters:
10963                 theCompound Compound, to find blocks in.
10964                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
10965                 theName Object name; when specified, this parameter is used
10966                         for result publication in the study. Otherwise, if automatic
10967                         publication is switched on, default value is used for result name.
10968
10969             Returns:
10970                 List of GEOM.GEOM_Object, containing the found blocks.
10971             """
10972             # Example: see GEOM_Spanner.py
10973             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
10974             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
10975             self._autoPublish(aList, theName, "block")
10976             return aList
10977
10978         ## Multi-transformate block and glue the result.
10979         #  Transformation is defined so, as to superpose direction faces.
10980         #  @param Block Hexahedral solid to be multi-transformed.
10981         #  @param DirFace1 ID of First direction face.
10982         #  @param DirFace2 ID of Second direction face.
10983         #  @param NbTimes Quantity of transformations to be done.
10984         #  @param theName Object name; when specified, this parameter is used
10985         #         for result publication in the study. Otherwise, if automatic
10986         #         publication is switched on, default value is used for result name.
10987         #
10988         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
10989         #
10990         #  @return New GEOM.GEOM_Object, containing the result shape.
10991         #
10992         #  @ref tui_multi_transformation "Example"
10993         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
10994             """
10995             Multi-transformate block and glue the result.
10996             Transformation is defined so, as to superpose direction faces.
10997
10998             Parameters:
10999                 Block Hexahedral solid to be multi-transformed.
11000                 DirFace1 ID of First direction face.
11001                 DirFace2 ID of Second direction face.
11002                 NbTimes Quantity of transformations to be done.
11003                 theName Object name; when specified, this parameter is used
11004                         for result publication in the study. Otherwise, if automatic
11005                         publication is switched on, default value is used for result name.
11006
11007             Note:
11008                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11009
11010             Returns:
11011                 New GEOM.GEOM_Object, containing the result shape.
11012             """
11013             # Example: see GEOM_Spanner.py
11014             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11015             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11016             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11017             anObj.SetParameters(Parameters)
11018             self._autoPublish(anObj, theName, "transformed")
11019             return anObj
11020
11021         ## Multi-transformate block and glue the result.
11022         #  @param Block Hexahedral solid to be multi-transformed.
11023         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11024         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11025         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11026         #  @param theName Object name; when specified, this parameter is used
11027         #         for result publication in the study. Otherwise, if automatic
11028         #         publication is switched on, default value is used for result name.
11029         #
11030         #  @return New GEOM.GEOM_Object, containing the result shape.
11031         #
11032         #  @ref tui_multi_transformation "Example"
11033         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11034                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11035             """
11036             Multi-transformate block and glue the result.
11037
11038             Parameters:
11039                 Block Hexahedral solid to be multi-transformed.
11040                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11041                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11042                 NbTimesU,NbTimesV Quantity of transformations to be done.
11043                 theName Object name; when specified, this parameter is used
11044                         for result publication in the study. Otherwise, if automatic
11045                         publication is switched on, default value is used for result name.
11046
11047             Returns:
11048                 New GEOM.GEOM_Object, containing the result shape.
11049             """
11050             # Example: see GEOM_Spanner.py
11051             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11052               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11053             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11054                                                             DirFace1V, DirFace2V, NbTimesV)
11055             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11056             anObj.SetParameters(Parameters)
11057             self._autoPublish(anObj, theName, "transformed")
11058             return anObj
11059
11060         ## Build all possible propagation groups.
11061         #  Propagation group is a set of all edges, opposite to one (main)
11062         #  edge of this group directly or through other opposite edges.
11063         #  Notion of Opposite Edge make sence only on quadrangle face.
11064         #  @param theShape Shape to build propagation groups on.
11065         #  @param theName Object name; when specified, this parameter is used
11066         #         for result publication in the study. Otherwise, if automatic
11067         #         publication is switched on, default value is used for result name.
11068         #
11069         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11070         #
11071         #  @ref swig_Propagate "Example"
11072         def Propagate(self, theShape, theName=None):
11073             """
11074             Build all possible propagation groups.
11075             Propagation group is a set of all edges, opposite to one (main)
11076             edge of this group directly or through other opposite edges.
11077             Notion of Opposite Edge make sence only on quadrangle face.
11078
11079             Parameters:
11080                 theShape Shape to build propagation groups on.
11081                 theName Object name; when specified, this parameter is used
11082                         for result publication in the study. Otherwise, if automatic
11083                         publication is switched on, default value is used for result name.
11084
11085             Returns:
11086                 List of GEOM.GEOM_Object, each of them is a propagation group.
11087             """
11088             # Example: see GEOM_TestOthers.py
11089             listChains = self.BlocksOp.Propagate(theShape)
11090             RaiseIfFailed("Propagate", self.BlocksOp)
11091             self._autoPublish(listChains, theName, "propagate")
11092             return listChains
11093
11094         # end of l3_blocks_op
11095         ## @}
11096
11097         ## @addtogroup l3_groups
11098         ## @{
11099
11100         ## Creates a new group which will store sub-shapes of theMainShape
11101         #  @param theMainShape is a GEOM object on which the group is selected
11102         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11103         #  @param theName Object name; when specified, this parameter is used
11104         #         for result publication in the study. Otherwise, if automatic
11105         #         publication is switched on, default value is used for result name.
11106         #
11107         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11108         #
11109         #  @ref tui_working_with_groups_page "Example 1"
11110         #  \n @ref swig_CreateGroup "Example 2"
11111         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11112             """
11113             Creates a new group which will store sub-shapes of theMainShape
11114
11115             Parameters:
11116                theMainShape is a GEOM object on which the group is selected
11117                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11118                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11119                 theName Object name; when specified, this parameter is used
11120                         for result publication in the study. Otherwise, if automatic
11121                         publication is switched on, default value is used for result name.
11122
11123             Returns:
11124                a newly created GEOM group
11125
11126             Example of usage:
11127                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11128                 
11129             """
11130             # Example: see GEOM_TestOthers.py
11131             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11132             RaiseIfFailed("CreateGroup", self.GroupOp)
11133             self._autoPublish(anObj, theName, "group")
11134             return anObj
11135
11136         ## Adds a sub-object with ID theSubShapeId to the group
11137         #  @param theGroup is a GEOM group to which the new sub-shape is added
11138         #  @param theSubShapeID is a sub-shape ID in the main object.
11139         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11140         #
11141         #  @ref tui_working_with_groups_page "Example"
11142         def AddObject(self,theGroup, theSubShapeID):
11143             """
11144             Adds a sub-object with ID theSubShapeId to the group
11145
11146             Parameters:
11147                 theGroup       is a GEOM group to which the new sub-shape is added
11148                 theSubShapeID  is a sub-shape ID in the main object.
11149
11150             Note:
11151                 Use method GetSubShapeID() to get an unique ID of the sub-shape 
11152             """
11153             # Example: see GEOM_TestOthers.py
11154             self.GroupOp.AddObject(theGroup, theSubShapeID)
11155             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11156                 RaiseIfFailed("AddObject", self.GroupOp)
11157                 pass
11158             pass
11159
11160         ## Removes a sub-object with ID \a theSubShapeId from the group
11161         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11162         #  @param theSubShapeID is a sub-shape ID in the main object.
11163         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11164         #
11165         #  @ref tui_working_with_groups_page "Example"
11166         def RemoveObject(self,theGroup, theSubShapeID):
11167             """
11168             Removes a sub-object with ID theSubShapeId from the group
11169
11170             Parameters:
11171                 theGroup is a GEOM group from which the new sub-shape is removed
11172                 theSubShapeID is a sub-shape ID in the main object.
11173
11174             Note:
11175                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11176             """
11177             # Example: see GEOM_TestOthers.py
11178             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11179             RaiseIfFailed("RemoveObject", self.GroupOp)
11180             pass
11181
11182         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11183         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11184         #  @param theSubShapes is a list of sub-shapes to be added.
11185         #
11186         #  @ref tui_working_with_groups_page "Example"
11187         def UnionList (self,theGroup, theSubShapes):
11188             """
11189             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11190
11191             Parameters:
11192                 theGroup is a GEOM group to which the new sub-shapes are added.
11193                 theSubShapes is a list of sub-shapes to be added.
11194             """
11195             # Example: see GEOM_TestOthers.py
11196             self.GroupOp.UnionList(theGroup, theSubShapes)
11197             RaiseIfFailed("UnionList", self.GroupOp)
11198             pass
11199
11200         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11201         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11202         #  @param theSubShapes is a list of indices of sub-shapes to be added.
11203         #
11204         #  @ref swig_UnionIDs "Example"
11205         def UnionIDs(self,theGroup, theSubShapes):
11206             """
11207             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11208
11209             Parameters:
11210                 theGroup is a GEOM group to which the new sub-shapes are added.
11211                 theSubShapes is a list of indices of sub-shapes to be added.
11212             """
11213             # Example: see GEOM_TestOthers.py
11214             self.GroupOp.UnionIDs(theGroup, theSubShapes)
11215             RaiseIfFailed("UnionIDs", self.GroupOp)
11216             pass
11217
11218         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11219         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11220         #  @param theSubShapes is a list of sub-shapes to be removed.
11221         #
11222         #  @ref tui_working_with_groups_page "Example"
11223         def DifferenceList (self,theGroup, theSubShapes):
11224             """
11225             Removes from the group all the given shapes. No errors, if some shapes are not included.
11226
11227             Parameters:
11228                 theGroup is a GEOM group from which the sub-shapes are removed.
11229                 theSubShapes is a list of sub-shapes to be removed.
11230             """
11231             # Example: see GEOM_TestOthers.py
11232             self.GroupOp.DifferenceList(theGroup, theSubShapes)
11233             RaiseIfFailed("DifferenceList", self.GroupOp)
11234             pass
11235
11236         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
11237         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
11238         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
11239         #
11240         #  @ref swig_DifferenceIDs "Example"
11241         def DifferenceIDs(self,theGroup, theSubShapes):
11242             """
11243             Removes from the group all the given shapes. No errors, if some shapes are not included.
11244
11245             Parameters:
11246                 theGroup is a GEOM group from which the sub-shapes are removed.
11247                 theSubShapes is a list of indices of sub-shapes to be removed.
11248             """            
11249             # Example: see GEOM_TestOthers.py
11250             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
11251             RaiseIfFailed("DifferenceIDs", self.GroupOp)
11252             pass
11253
11254         ## Union of two groups.
11255         #  New group is created. It will contain all entities
11256         #  which are present in groups theGroup1 and theGroup2.
11257         #  @param theGroup1, theGroup2 are the initial GEOM groups
11258         #                              to create the united group from.
11259         #  @param theName Object name; when specified, this parameter is used
11260         #         for result publication in the study. Otherwise, if automatic
11261         #         publication is switched on, default value is used for result name.
11262         #
11263         #  @return a newly created GEOM group.
11264         #
11265         #  @ref tui_union_groups_anchor "Example"
11266         def UnionGroups (self, theGroup1, theGroup2, theName=None):
11267             """
11268             Union of two groups.
11269             New group is created. It will contain all entities
11270             which are present in groups theGroup1 and theGroup2.
11271
11272             Parameters:
11273                 theGroup1, theGroup2 are the initial GEOM groups
11274                                      to create the united group from.
11275                 theName Object name; when specified, this parameter is used
11276                         for result publication in the study. Otherwise, if automatic
11277                         publication is switched on, default value is used for result name.
11278
11279             Returns:
11280                 a newly created GEOM group.
11281             """
11282             # Example: see GEOM_TestOthers.py
11283             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
11284             RaiseIfFailed("UnionGroups", self.GroupOp)
11285             self._autoPublish(aGroup, theName, "group")
11286             return aGroup
11287
11288         ## Intersection of two groups.
11289         #  New group is created. It will contain only those entities
11290         #  which are present in both groups theGroup1 and theGroup2.
11291         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11292         #  @param theName Object name; when specified, this parameter is used
11293         #         for result publication in the study. Otherwise, if automatic
11294         #         publication is switched on, default value is used for result name.
11295         #
11296         #  @return a newly created GEOM group.
11297         #
11298         #  @ref tui_intersect_groups_anchor "Example"
11299         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
11300             """
11301             Intersection of two groups.
11302             New group is created. It will contain only those entities
11303             which are present in both groups theGroup1 and theGroup2.
11304
11305             Parameters:
11306                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
11307                 theName Object name; when specified, this parameter is used
11308                         for result publication in the study. Otherwise, if automatic
11309                         publication is switched on, default value is used for result name.
11310
11311             Returns:
11312                 a newly created GEOM group.
11313             """
11314             # Example: see GEOM_TestOthers.py
11315             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
11316             RaiseIfFailed("IntersectGroups", self.GroupOp)
11317             self._autoPublish(aGroup, theName, "group")
11318             return aGroup
11319
11320         ## Cut of two groups.
11321         #  New group is created. It will contain entities which are
11322         #  present in group theGroup1 but are not present in group theGroup2.
11323         #  @param theGroup1 is a GEOM group to include elements of.
11324         #  @param theGroup2 is a GEOM group to exclude elements of.
11325         #  @param theName Object name; when specified, this parameter is used
11326         #         for result publication in the study. Otherwise, if automatic
11327         #         publication is switched on, default value is used for result name.
11328         #
11329         #  @return a newly created GEOM group.
11330         #
11331         #  @ref tui_cut_groups_anchor "Example"
11332         def CutGroups (self, theGroup1, theGroup2, theName=None):
11333             """
11334             Cut of two groups.
11335             New group is created. It will contain entities which are
11336             present in group theGroup1 but are not present in group theGroup2.
11337
11338             Parameters:
11339                 theGroup1 is a GEOM group to include elements of.
11340                 theGroup2 is a GEOM group to exclude elements of.
11341                 theName Object name; when specified, this parameter is used
11342                         for result publication in the study. Otherwise, if automatic
11343                         publication is switched on, default value is used for result name.
11344
11345             Returns:
11346                 a newly created GEOM group.
11347             """
11348             # Example: see GEOM_TestOthers.py
11349             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
11350             RaiseIfFailed("CutGroups", self.GroupOp)
11351             self._autoPublish(aGroup, theName, "group")
11352             return aGroup
11353
11354         ## Union of list of groups.
11355         #  New group is created. It will contain all entities that are
11356         #  present in groups listed in theGList.
11357         #  @param theGList is a list of GEOM groups to create the united group from.
11358         #  @param theName Object name; when specified, this parameter is used
11359         #         for result publication in the study. Otherwise, if automatic
11360         #         publication is switched on, default value is used for result name.
11361         #
11362         #  @return a newly created GEOM group.
11363         #
11364         #  @ref tui_union_groups_anchor "Example"
11365         def UnionListOfGroups (self, theGList, theName=None):
11366             """
11367             Union of list of groups.
11368             New group is created. It will contain all entities that are
11369             present in groups listed in theGList.
11370
11371             Parameters:
11372                 theGList is a list of GEOM groups to create the united group from.
11373                 theName Object name; when specified, this parameter is used
11374                         for result publication in the study. Otherwise, if automatic
11375                         publication is switched on, default value is used for result name.
11376
11377             Returns:
11378                 a newly created GEOM group.
11379             """
11380             # Example: see GEOM_TestOthers.py
11381             aGroup = self.GroupOp.UnionListOfGroups(theGList)
11382             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
11383             self._autoPublish(aGroup, theName, "group")
11384             return aGroup
11385
11386         ## Cut of lists of groups.
11387         #  New group is created. It will contain only entities
11388         #  which are present in groups listed in theGList1 but 
11389         #  are not present in groups from theGList2.
11390         #  @param theGList1 is a list of GEOM groups to include elements of.
11391         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11392         #  @param theName Object name; when specified, this parameter is used
11393         #         for result publication in the study. Otherwise, if automatic
11394         #         publication is switched on, default value is used for result name.
11395         #
11396         #  @return a newly created GEOM group.
11397         #
11398         #  @ref tui_intersect_groups_anchor "Example"
11399         def IntersectListOfGroups (self, theGList, theName=None):
11400             """
11401             Cut of lists of groups.
11402             New group is created. It will contain only entities
11403             which are present in groups listed in theGList1 but 
11404             are not present in groups from theGList2.
11405
11406             Parameters:
11407                 theGList1 is a list of GEOM groups to include elements of.
11408                 theGList2 is a list of GEOM groups to exclude elements of.
11409                 theName Object name; when specified, this parameter is used
11410                         for result publication in the study. Otherwise, if automatic
11411                         publication is switched on, default value is used for result name.
11412
11413             Returns:
11414                 a newly created GEOM group.
11415             """
11416             # Example: see GEOM_TestOthers.py
11417             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
11418             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
11419             self._autoPublish(aGroup, theName, "group")
11420             return aGroup
11421
11422         ## Cut of lists of groups.
11423         #  New group is created. It will contain only entities
11424         #  which are present in groups listed in theGList1 but 
11425         #  are not present in groups from theGList2.
11426         #  @param theGList1 is a list of GEOM groups to include elements of.
11427         #  @param theGList2 is a list of GEOM groups to exclude elements of.
11428         #  @param theName Object name; when specified, this parameter is used
11429         #         for result publication in the study. Otherwise, if automatic
11430         #         publication is switched on, default value is used for result name.
11431         #
11432         #  @return a newly created GEOM group.
11433         #
11434         #  @ref tui_cut_groups_anchor "Example"
11435         def CutListOfGroups (self, theGList1, theGList2, theName=None):
11436             """
11437             Cut of lists of groups.
11438             New group is created. It will contain only entities
11439             which are present in groups listed in theGList1 but 
11440             are not present in groups from theGList2.
11441
11442             Parameters:
11443                 theGList1 is a list of GEOM groups to include elements of.
11444                 theGList2 is a list of GEOM groups to exclude elements of.
11445                 theName Object name; when specified, this parameter is used
11446                         for result publication in the study. Otherwise, if automatic
11447                         publication is switched on, default value is used for result name.
11448
11449             Returns:
11450                 a newly created GEOM group.
11451             """
11452             # Example: see GEOM_TestOthers.py
11453             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
11454             RaiseIfFailed("CutListOfGroups", self.GroupOp)
11455             self._autoPublish(aGroup, theName, "group")
11456             return aGroup
11457
11458         ## Returns a list of sub-objects ID stored in the group
11459         #  @param theGroup is a GEOM group for which a list of IDs is requested
11460         #
11461         #  @ref swig_GetObjectIDs "Example"
11462         def GetObjectIDs(self,theGroup):
11463             """
11464             Returns a list of sub-objects ID stored in the group
11465
11466             Parameters:
11467                 theGroup is a GEOM group for which a list of IDs is requested
11468             """
11469             # Example: see GEOM_TestOthers.py
11470             ListIDs = self.GroupOp.GetObjects(theGroup)
11471             RaiseIfFailed("GetObjects", self.GroupOp)
11472             return ListIDs
11473
11474         ## Returns a type of sub-objects stored in the group
11475         #  @param theGroup is a GEOM group which type is returned.
11476         #
11477         #  @ref swig_GetType "Example"
11478         def GetType(self,theGroup):
11479             """
11480             Returns a type of sub-objects stored in the group
11481
11482             Parameters:
11483                 theGroup is a GEOM group which type is returned.
11484             """
11485             # Example: see GEOM_TestOthers.py
11486             aType = self.GroupOp.GetType(theGroup)
11487             RaiseIfFailed("GetType", self.GroupOp)
11488             return aType
11489
11490         ## Convert a type of geom object from id to string value
11491         #  @param theId is a GEOM obect type id.
11492         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11493         #  @ref swig_GetType "Example"
11494         def ShapeIdToType(self, theId):
11495             """
11496             Convert a type of geom object from id to string value
11497
11498             Parameters:
11499                 theId is a GEOM obect type id.
11500                 
11501             Returns:
11502                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
11503             """
11504             if theId == 0:
11505                 return "COPY"
11506             if theId == 1:
11507                 return "IMPORT"
11508             if theId == 2:
11509                 return "POINT"
11510             if theId == 3:
11511                 return "VECTOR"
11512             if theId == 4:
11513                 return "PLANE"
11514             if theId == 5:
11515                 return "LINE"
11516             if theId == 6:
11517                 return "TORUS"
11518             if theId == 7:
11519                 return "BOX"
11520             if theId == 8:
11521                 return "CYLINDER"
11522             if theId == 9:
11523                 return "CONE"
11524             if theId == 10:
11525                 return "SPHERE"
11526             if theId == 11:
11527                 return "PRISM"
11528             if theId == 12:
11529                 return "REVOLUTION"
11530             if theId == 13:
11531                 return "BOOLEAN"
11532             if theId == 14:
11533                 return "PARTITION"
11534             if theId == 15:
11535                 return "POLYLINE"
11536             if theId == 16:
11537                 return "CIRCLE"
11538             if theId == 17:
11539                 return "SPLINE"
11540             if theId == 18:
11541                 return "ELLIPSE"
11542             if theId == 19:
11543                 return "CIRC_ARC"
11544             if theId == 20:
11545                 return "FILLET"
11546             if theId == 21:
11547                 return "CHAMFER"
11548             if theId == 22:
11549                 return "EDGE"
11550             if theId == 23:
11551                 return "WIRE"
11552             if theId == 24:
11553                 return "FACE"
11554             if theId == 25:
11555                 return "SHELL"
11556             if theId == 26:
11557                 return "SOLID"
11558             if theId == 27:
11559                 return "COMPOUND"
11560             if theId == 28:
11561                 return "SUBSHAPE"
11562             if theId == 29:
11563                 return "PIPE"
11564             if theId == 30:
11565                 return "ARCHIMEDE"
11566             if theId == 31:
11567                 return "FILLING"
11568             if theId == 32:
11569                 return "EXPLODE"
11570             if theId == 33:
11571                 return "GLUED"
11572             if theId == 34:
11573                 return "SKETCHER"
11574             if theId == 35:
11575                 return "CDG"
11576             if theId == 36:
11577                 return "FREE_BOUNDS"
11578             if theId == 37:
11579                 return "GROUP"
11580             if theId == 38:
11581                 return "BLOCK"
11582             if theId == 39:
11583                 return "MARKER"
11584             if theId == 40:
11585                 return "THRUSECTIONS"
11586             if theId == 41:
11587                 return "COMPOUNDFILTER"
11588             if theId == 42:
11589                 return "SHAPES_ON_SHAPE"
11590             if theId == 43:
11591                 return "ELLIPSE_ARC"
11592             if theId == 44:
11593                 return "3DSKETCHER"
11594             if theId == 45:
11595                 return "FILLET_2D"
11596             if theId == 46:
11597                 return "FILLET_1D"
11598             if theId == 201:
11599                 return "PIPETSHAPE"
11600             return "Shape Id not exist."
11601
11602         ## Returns a main shape associated with the group
11603         #  @param theGroup is a GEOM group for which a main shape object is requested
11604         #  @return a GEOM object which is a main shape for theGroup
11605         #
11606         #  @ref swig_GetMainShape "Example"
11607         def GetMainShape(self,theGroup):
11608             """
11609             Returns a main shape associated with the group
11610
11611             Parameters:
11612                 theGroup is a GEOM group for which a main shape object is requested
11613
11614             Returns:
11615                 a GEOM object which is a main shape for theGroup
11616
11617             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
11618             """
11619             # Example: see GEOM_TestOthers.py
11620             anObj = self.GroupOp.GetMainShape(theGroup)
11621             RaiseIfFailed("GetMainShape", self.GroupOp)
11622             return anObj
11623
11624         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
11625         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11626         #  @param theShape given shape (see GEOM.GEOM_Object)
11627         #  @param min_length minimum length of edges of theShape
11628         #  @param max_length maximum length of edges of theShape
11629         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11630         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11631         #  @param theName Object name; when specified, this parameter is used
11632         #         for result publication in the study. Otherwise, if automatic
11633         #         publication is switched on, default value is used for result name.
11634         #
11635         #  @return a newly created GEOM group of edges
11636         #
11637         #  @@ref swig_todo "Example"
11638         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
11639             """
11640             Create group of edges of theShape, whose length is in range [min_length, max_length].
11641             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11642
11643             Parameters:
11644                 theShape given shape
11645                 min_length minimum length of edges of theShape
11646                 max_length maximum length of edges of theShape
11647                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11648                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11649                 theName Object name; when specified, this parameter is used
11650                         for result publication in the study. Otherwise, if automatic
11651                         publication is switched on, default value is used for result name.
11652
11653              Returns:
11654                 a newly created GEOM group of edges.
11655             """
11656             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
11657             edges_in_range = []
11658             for edge in edges:
11659                 Props = self.BasicProperties(edge)
11660                 if min_length <= Props[0] and Props[0] <= max_length:
11661                     if (not include_min) and (min_length == Props[0]):
11662                         skip = 1
11663                     else:
11664                         if (not include_max) and (Props[0] == max_length):
11665                             skip = 1
11666                         else:
11667                             edges_in_range.append(edge)
11668
11669             if len(edges_in_range) <= 0:
11670                 print "No edges found by given criteria"
11671                 return None
11672
11673             # note: auto-publishing is done in self.CreateGroup()
11674             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
11675             self.UnionList(group_edges, edges_in_range)
11676
11677             return group_edges
11678
11679         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
11680         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
11681         #  @param min_length minimum length of edges of selected shape
11682         #  @param max_length maximum length of edges of selected shape
11683         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11684         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11685         #  @return a newly created GEOM group of edges
11686         #  @ref swig_todo "Example"
11687         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
11688             """
11689             Create group of edges of selected shape, whose length is in range [min_length, max_length].
11690             If include_min/max == 0, edges with length == min/max_length will not be included in result.
11691
11692             Parameters:
11693                 min_length minimum length of edges of selected shape
11694                 max_length maximum length of edges of selected shape
11695                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
11696                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
11697
11698              Returns:
11699                 a newly created GEOM group of edges.
11700             """
11701             nb_selected = sg.SelectedCount()
11702             if nb_selected < 1:
11703                 print "Select a shape before calling this function, please."
11704                 return 0
11705             if nb_selected > 1:
11706                 print "Only one shape must be selected"
11707                 return 0
11708
11709             id_shape = sg.getSelected(0)
11710             shape = IDToObject( id_shape )
11711
11712             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
11713
11714             left_str  = " < "
11715             right_str = " < "
11716             if include_min: left_str  = " <= "
11717             if include_max: right_str  = " <= "
11718
11719             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
11720                                     + left_str + "length" + right_str + `max_length`)
11721
11722             sg.updateObjBrowser(1)
11723
11724             return group_edges
11725
11726         # end of l3_groups
11727         ## @}
11728
11729         ## @addtogroup l4_advanced
11730         ## @{
11731
11732         ## Create a T-shape object with specified caracteristics for the main
11733         #  and the incident pipes (radius, width, half-length).
11734         #  The extremities of the main pipe are located on junctions points P1 and P2.
11735         #  The extremity of the incident pipe is located on junction point P3.
11736         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11737         #  the main plane of the T-shape is XOY.
11738         #
11739         #  @param theR1 Internal radius of main pipe
11740         #  @param theW1 Width of main pipe
11741         #  @param theL1 Half-length of main pipe
11742         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11743         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11744         #  @param theL2 Half-length of incident pipe
11745         #
11746         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11747         #  @param theP1 1st junction point of main pipe
11748         #  @param theP2 2nd junction point of main pipe
11749         #  @param theP3 Junction point of incident pipe
11750         #
11751         #  @param theRL Internal radius of left thickness reduction
11752         #  @param theWL Width of left thickness reduction
11753         #  @param theLtransL Length of left transition part
11754         #  @param theLthinL Length of left thin part
11755         #
11756         #  @param theRR Internal radius of right thickness reduction
11757         #  @param theWR Width of right thickness reduction
11758         #  @param theLtransR Length of right transition part
11759         #  @param theLthinR Length of right thin part
11760         #
11761         #  @param theRI Internal radius of incident thickness reduction
11762         #  @param theWI Width of incident thickness reduction
11763         #  @param theLtransI Length of incident transition part
11764         #  @param theLthinI Length of incident thin part
11765         #
11766         #  @param theName Object name; when specified, this parameter is used
11767         #         for result publication in the study. Otherwise, if automatic
11768         #         publication is switched on, default value is used for result name.
11769         #
11770         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11771         #
11772         #  @ref tui_creation_pipetshape "Example"
11773         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
11774                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
11775                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11776                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11777                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11778                             theName=None):
11779             """
11780             Create a T-shape object with specified caracteristics for the main
11781             and the incident pipes (radius, width, half-length).
11782             The extremities of the main pipe are located on junctions points P1 and P2.
11783             The extremity of the incident pipe is located on junction point P3.
11784             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11785             the main plane of the T-shape is XOY.
11786
11787             Parameters:
11788                 theR1 Internal radius of main pipe
11789                 theW1 Width of main pipe
11790                 theL1 Half-length of main pipe
11791                 theR2 Internal radius of incident pipe (R2 < R1)
11792                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11793                 theL2 Half-length of incident pipe
11794                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11795                 theP1 1st junction point of main pipe
11796                 theP2 2nd junction point of main pipe
11797                 theP3 Junction point of incident pipe
11798
11799                 theRL Internal radius of left thickness reduction
11800                 theWL Width of left thickness reduction
11801                 theLtransL Length of left transition part
11802                 theLthinL Length of left thin part
11803
11804                 theRR Internal radius of right thickness reduction
11805                 theWR Width of right thickness reduction
11806                 theLtransR Length of right transition part
11807                 theLthinR Length of right thin part
11808
11809                 theRI Internal radius of incident thickness reduction
11810                 theWI Width of incident thickness reduction
11811                 theLtransI Length of incident transition part
11812                 theLthinI Length of incident thin part
11813
11814                 theName Object name; when specified, this parameter is used
11815                         for result publication in the study. Otherwise, if automatic
11816                         publication is switched on, default value is used for result name.
11817
11818             Returns:
11819                 List of GEOM_Object, containing the created shape and propagation groups.
11820
11821             Example of usage:
11822                 # create PipeTShape object
11823                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
11824                 # create PipeTShape object with position
11825                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
11826                 # create PipeTShape object with left thickness reduction
11827                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11828             """
11829             theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11830             if (theP1 and theP2 and theP3):
11831                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11832                                                                 theRL, theWL, theLtransL, theLthinL,
11833                                                                 theRR, theWR, theLtransR, theLthinR,
11834                                                                 theRI, theWI, theLtransI, theLthinI,
11835                                                                 theHexMesh, theP1, theP2, theP3)
11836             else:
11837                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
11838                                                     theRL, theWL, theLtransL, theLthinL,
11839                                                     theRR, theWR, theLtransR, theLthinR,
11840                                                     theRI, theWI, theLtransI, theLthinI,
11841                                                     theHexMesh)
11842             RaiseIfFailed("MakePipeTShape", self.AdvOp)
11843             if Parameters: anObj[0].SetParameters(Parameters)
11844             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11845             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11846             return anObj
11847
11848         ## Create a T-shape object with chamfer and with specified caracteristics for the main
11849         #  and the incident pipes (radius, width, half-length). The chamfer is
11850         #  created on the junction of the pipes.
11851         #  The extremities of the main pipe are located on junctions points P1 and P2.
11852         #  The extremity of the incident pipe is located on junction point P3.
11853         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11854         #  the main plane of the T-shape is XOY.
11855         #  @param theR1 Internal radius of main pipe
11856         #  @param theW1 Width of main pipe
11857         #  @param theL1 Half-length of main pipe
11858         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11859         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11860         #  @param theL2 Half-length of incident pipe
11861         #  @param theH Height of the chamfer.
11862         #  @param theW Width of the chamfer.
11863         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11864         #  @param theP1 1st junction point of main pipe
11865         #  @param theP2 2nd junction point of main pipe
11866         #  @param theP3 Junction point of incident pipe
11867         #
11868         #  @param theRL Internal radius of left thickness reduction
11869         #  @param theWL Width of left thickness reduction
11870         #  @param theLtransL Length of left transition part
11871         #  @param theLthinL Length of left thin part
11872         #
11873         #  @param theRR Internal radius of right thickness reduction
11874         #  @param theWR Width of right thickness reduction
11875         #  @param theLtransR Length of right transition part
11876         #  @param theLthinR Length of right thin part
11877         #
11878         #  @param theRI Internal radius of incident thickness reduction
11879         #  @param theWI Width of incident thickness reduction
11880         #  @param theLtransI Length of incident transition part
11881         #  @param theLthinI Length of incident thin part
11882         #
11883         #  @param theName Object name; when specified, this parameter is used
11884         #         for result publication in the study. Otherwise, if automatic
11885         #         publication is switched on, default value is used for result name.
11886         #
11887         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
11888         #
11889         #  @ref tui_creation_pipetshape "Example"
11890         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
11891                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
11892                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
11893                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
11894                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
11895                                    theName=None):
11896             """
11897             Create a T-shape object with chamfer and with specified caracteristics for the main
11898             and the incident pipes (radius, width, half-length). The chamfer is
11899             created on the junction of the pipes.
11900             The extremities of the main pipe are located on junctions points P1 and P2.
11901             The extremity of the incident pipe is located on junction point P3.
11902             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11903             the main plane of the T-shape is XOY.
11904
11905             Parameters:
11906                 theR1 Internal radius of main pipe
11907                 theW1 Width of main pipe
11908                 theL1 Half-length of main pipe
11909                 theR2 Internal radius of incident pipe (R2 < R1)
11910                 theW2 Width of incident pipe (R2+W2 < R1+W1)
11911                 theL2 Half-length of incident pipe
11912                 theH Height of the chamfer.
11913                 theW Width of the chamfer.
11914                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11915                 theP1 1st junction point of main pipe
11916                 theP2 2nd junction point of main pipe
11917                 theP3 Junction point of incident pipe
11918
11919                 theRL Internal radius of left thickness reduction
11920                 theWL Width of left thickness reduction
11921                 theLtransL Length of left transition part
11922                 theLthinL Length of left thin part
11923
11924                 theRR Internal radius of right thickness reduction
11925                 theWR Width of right thickness reduction
11926                 theLtransR Length of right transition part
11927                 theLthinR Length of right thin part
11928
11929                 theRI Internal radius of incident thickness reduction
11930                 theWI Width of incident thickness reduction
11931                 theLtransI Length of incident transition part
11932                 theLthinI Length of incident thin part
11933
11934                 theName Object name; when specified, this parameter is used
11935                         for result publication in the study. Otherwise, if automatic
11936                         publication is switched on, default value is used for result name.
11937
11938             Returns:
11939                 List of GEOM_Object, containing the created shape and propagation groups.
11940
11941             Example of usage:
11942                 # create PipeTShape with chamfer object
11943                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
11944                 # create PipeTShape with chamfer object with position
11945                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
11946                 # create PipeTShape with chamfer object with left thickness reduction
11947                 pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
11948             """
11949             theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
11950             if (theP1 and theP2 and theP3):
11951               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
11952                                                                      theRL, theWL, theLtransL, theLthinL,
11953                                                                      theRR, theWR, theLtransR, theLthinR,
11954                                                                      theRI, theWI, theLtransI, theLthinI,
11955                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
11956             else:
11957               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
11958                                                          theRL, theWL, theLtransL, theLthinL,
11959                                                          theRR, theWR, theLtransR, theLthinR,
11960                                                          theRI, theWI, theLtransI, theLthinI,
11961                                                          theH, theW, theHexMesh)
11962             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
11963             if Parameters: anObj[0].SetParameters(Parameters)
11964             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
11965             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
11966             return anObj
11967
11968         ## Create a T-shape object with fillet and with specified caracteristics for the main
11969         #  and the incident pipes (radius, width, half-length). The fillet is
11970         #  created on the junction of the pipes.
11971         #  The extremities of the main pipe are located on junctions points P1 and P2.
11972         #  The extremity of the incident pipe is located on junction point P3.
11973         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
11974         #  the main plane of the T-shape is XOY.
11975         #  @param theR1 Internal radius of main pipe
11976         #  @param theW1 Width of main pipe
11977         #  @param theL1 Half-length of main pipe
11978         #  @param theR2 Internal radius of incident pipe (R2 < R1)
11979         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
11980         #  @param theL2 Half-length of incident pipe
11981         #  @param theRF Radius of curvature of fillet.
11982         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
11983         #  @param theP1 1st junction point of main pipe
11984         #  @param theP2 2nd junction point of main pipe
11985         #  @param theP3 Junction point of incident pipe
11986         #
11987         #  @param theRL Internal radius of left thickness reduction
11988         #  @param theWL Width of left thickness reduction
11989         #  @param theLtransL Length of left transition part
11990         #  @param theLthinL Length of left thin part
11991         #
11992         #  @param theRR Internal radius of right thickness reduction
11993         #  @param theWR Width of right thickness reduction
11994         #  @param theLtransR Length of right transition part
11995         #  @param theLthinR Length of right thin part
11996         #
11997         #  @param theRI Internal radius of incident thickness reduction
11998         #  @param theWI Width of incident thickness reduction
11999         #  @param theLtransI Length of incident transition part
12000         #  @param theLthinI Length of incident thin part
12001         #
12002         #  @param theName Object name; when specified, this parameter is used
12003         #         for result publication in the study. Otherwise, if automatic
12004         #         publication is switched on, default value is used for result name.
12005         #
12006         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12007         #
12008         #  @ref tui_creation_pipetshape "Example"
12009         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12010                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12011                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12012                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12013                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12014                                   theName=None):
12015             """
12016             Create a T-shape object with fillet and with specified caracteristics for the main
12017             and the incident pipes (radius, width, half-length). The fillet is
12018             created on the junction of the pipes.
12019             The extremities of the main pipe are located on junctions points P1 and P2.
12020             The extremity of the incident pipe is located on junction point P3.
12021
12022             Parameters:
12023                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12024                 the main plane of the T-shape is XOY.
12025                 theR1 Internal radius of main pipe
12026                 theW1 Width of main pipe
12027                 heL1 Half-length of main pipe
12028                 theR2 Internal radius of incident pipe (R2 < R1)
12029                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12030                 theL2 Half-length of incident pipe
12031                 theRF Radius of curvature of fillet.
12032                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12033                 theP1 1st junction point of main pipe
12034                 theP2 2nd junction point of main pipe
12035                 theP3 Junction point of incident pipe
12036
12037                 theRL Internal radius of left thickness reduction
12038                 theWL Width of left thickness reduction
12039                 theLtransL Length of left transition part
12040                 theLthinL Length of left thin part
12041
12042                 theRR Internal radius of right thickness reduction
12043                 theWR Width of right thickness reduction
12044                 theLtransR Length of right transition part
12045                 theLthinR Length of right thin part
12046
12047                 theRI Internal radius of incident thickness reduction
12048                 theWI Width of incident thickness reduction
12049                 theLtransI Length of incident transition part
12050                 theLthinI Length of incident thin part
12051
12052                 theName Object name; when specified, this parameter is used
12053                         for result publication in the study. Otherwise, if automatic
12054                         publication is switched on, default value is used for result name.
12055                 
12056             Returns:
12057                 List of GEOM_Object, containing the created shape and propagation groups.
12058                 
12059             Example of usage:
12060                 # create PipeTShape with fillet object
12061                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12062                 # create PipeTShape with fillet object with position
12063                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12064                 # create PipeTShape with fillet object with left thickness reduction
12065                 pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12066             """
12067             theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
12068             if (theP1 and theP2 and theP3):
12069               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12070                                                                     theRL, theWL, theLtransL, theLthinL,
12071                                                                     theRR, theWR, theLtransR, theLthinR,
12072                                                                     theRI, theWI, theLtransI, theLthinI,
12073                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12074             else:
12075               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12076                                                         theRL, theWL, theLtransL, theLthinL,
12077                                                         theRR, theWR, theLtransR, theLthinR,
12078                                                         theRI, theWI, theLtransI, theLthinI,
12079                                                         theRF, theHexMesh)
12080             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12081             if Parameters: anObj[0].SetParameters(Parameters)
12082             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12083             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12084             return anObj
12085
12086         ## This function allows creating a disk already divided into blocks. It
12087         #  can be used to create divided pipes for later meshing in hexaedra.
12088         #  @param theR Radius of the disk
12089         #  @param theOrientation Orientation of the plane on which the disk will be built
12090         #         1 = XOY, 2 = OYZ, 3 = OZX
12091         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12092         #  @param theName Object name; when specified, this parameter is used
12093         #         for result publication in the study. Otherwise, if automatic
12094         #         publication is switched on, default value is used for result name.
12095         #
12096         #  @return New GEOM_Object, containing the created shape.
12097         #
12098         #  @ref tui_creation_divideddisk "Example"
12099         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12100             """
12101             Creates a disk, divided into blocks. It can be used to create divided pipes
12102             for later meshing in hexaedra.
12103
12104             Parameters:
12105                 theR Radius of the disk
12106                 theOrientation Orientation of the plane on which the disk will be built:
12107                                1 = XOY, 2 = OYZ, 3 = OZX
12108                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12109                 theName Object name; when specified, this parameter is used
12110                         for result publication in the study. Otherwise, if automatic
12111                         publication is switched on, default value is used for result name.
12112
12113             Returns:
12114                 New GEOM_Object, containing the created shape.
12115             """
12116             theR, Parameters = ParseParameters(theR)
12117             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12118             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12119             if Parameters: anObj.SetParameters(Parameters)
12120             self._autoPublish(anObj, theName, "dividedDisk")
12121             return anObj
12122             
12123         ## This function allows creating a disk already divided into blocks. It
12124         #  can be used to create divided pipes for later meshing in hexaedra.
12125         #  @param theCenter Center of the disk
12126         #  @param theVector Normal vector to the plane of the created disk
12127         #  @param theRadius Radius of the disk
12128         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12129         #  @param theName Object name; when specified, this parameter is used
12130         #         for result publication in the study. Otherwise, if automatic
12131         #         publication is switched on, default value is used for result name.
12132         #
12133         #  @return New GEOM_Object, containing the created shape.
12134         #
12135         #  @ref tui_creation_divideddisk "Example"
12136         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12137             """
12138             Creates a disk already divided into blocks. It can be used to create divided pipes
12139             for later meshing in hexaedra.
12140
12141             Parameters:
12142                 theCenter Center of the disk
12143                 theVector Normal vector to the plane of the created disk
12144                 theRadius Radius of the disk
12145                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12146                 theName Object name; when specified, this parameter is used
12147                         for result publication in the study. Otherwise, if automatic
12148                         publication is switched on, default value is used for result name.
12149
12150             Returns:
12151                 New GEOM_Object, containing the created shape.
12152             """
12153             theRadius, Parameters = ParseParameters(theRadius)
12154             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12155             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12156             if Parameters: anObj.SetParameters(Parameters)
12157             self._autoPublish(anObj, theName, "dividedDisk")
12158             return anObj
12159
12160         ## Builds a cylinder prepared for hexa meshes
12161         #  @param theR Radius of the cylinder
12162         #  @param theH Height of the cylinder
12163         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12164         #  @param theName Object name; when specified, this parameter is used
12165         #         for result publication in the study. Otherwise, if automatic
12166         #         publication is switched on, default value is used for result name.
12167         #
12168         #  @return New GEOM_Object, containing the created shape.
12169         #
12170         #  @ref tui_creation_dividedcylinder "Example"
12171         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12172             """
12173             Builds a cylinder prepared for hexa meshes
12174
12175             Parameters:
12176                 theR Radius of the cylinder
12177                 theH Height of the cylinder
12178                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12179                 theName Object name; when specified, this parameter is used
12180                         for result publication in the study. Otherwise, if automatic
12181                         publication is switched on, default value is used for result name.
12182
12183             Returns:
12184                 New GEOM_Object, containing the created shape.
12185             """
12186             theR, theH, Parameters = ParseParameters(theR, theH)
12187             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
12188             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
12189             if Parameters: anObj.SetParameters(Parameters)
12190             self._autoPublish(anObj, theName, "dividedCylinder")
12191             return anObj
12192
12193         ## 
12194         #  @param thelPoints list of  points
12195         #  @return New GEOM_Object, containing the created shape.
12196         #
12197         #  @ref tui_creation_smoothingsurface "Example"
12198         def MakeSmoothingSurface(self, thelPoints):
12199             thelPoints, Parameters = ParseParameters(thelPoints)
12200             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
12201             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
12202             if Parameters: anObj.SetParameters(Parameters)
12203             return anObj
12204
12205         #@@ insert new functions before this line @@ do not remove this line @@#
12206
12207         # end of l4_advanced
12208         ## @}
12209
12210         ## Create a copy of the given object
12211         #
12212         #  @param theOriginal geometry object for copy
12213         #  @param theName Object name; when specified, this parameter is used
12214         #         for result publication in the study. Otherwise, if automatic
12215         #         publication is switched on, default value is used for result name.
12216         #
12217         #  @return New GEOM_Object, containing the copied shape.
12218         #
12219         #  @ingroup l1_geomBuilder_auxiliary
12220         #  @ref swig_MakeCopy "Example"
12221         def MakeCopy(self, theOriginal, theName=None):
12222             """
12223             Create a copy of the given object
12224
12225             Parameters:
12226                 theOriginal geometry object for copy
12227                 theName Object name; when specified, this parameter is used
12228                         for result publication in the study. Otherwise, if automatic
12229                         publication is switched on, default value is used for result name.
12230
12231             Returns:
12232                 New GEOM_Object, containing the copied shape.
12233
12234             Example of usage: Copy = geompy.MakeCopy(Box)
12235             """
12236             # Example: see GEOM_TestAll.py
12237             anObj = self.InsertOp.MakeCopy(theOriginal)
12238             RaiseIfFailed("MakeCopy", self.InsertOp)
12239             self._autoPublish(anObj, theName, "copy")
12240             return anObj
12241
12242         ## Add Path to load python scripts from
12243         #  @param Path a path to load python scripts from
12244         #  @ingroup l1_geomBuilder_auxiliary
12245         def addPath(self,Path):
12246             """
12247             Add Path to load python scripts from
12248
12249             Parameters:
12250                 Path a path to load python scripts from
12251             """
12252             if (sys.path.count(Path) < 1):
12253                 sys.path.append(Path)
12254                 pass
12255             pass
12256
12257         ## Load marker texture from the file
12258         #  @param Path a path to the texture file
12259         #  @return unique texture identifier
12260         #  @ingroup l1_geomBuilder_auxiliary
12261         def LoadTexture(self, Path):
12262             """
12263             Load marker texture from the file
12264             
12265             Parameters:
12266                 Path a path to the texture file
12267                 
12268             Returns:
12269                 unique texture identifier
12270             """
12271             # Example: see GEOM_TestAll.py
12272             ID = self.InsertOp.LoadTexture(Path)
12273             RaiseIfFailed("LoadTexture", self.InsertOp)
12274             return ID
12275
12276         ## Get internal name of the object based on its study entry
12277         #  @note This method does not provide an unique identifier of the geometry object.
12278         #  @note This is internal function of GEOM component, though it can be used outside it for 
12279         #  appropriate reason (e.g. for identification of geometry object).
12280         #  @param obj geometry object
12281         #  @return unique object identifier
12282         #  @ingroup l1_geomBuilder_auxiliary
12283         def getObjectID(self, obj):
12284             """
12285             Get internal name of the object based on its study entry.
12286             Note: this method does not provide an unique identifier of the geometry object.
12287             It is an internal function of GEOM component, though it can be used outside GEOM for 
12288             appropriate reason (e.g. for identification of geometry object).
12289
12290             Parameters:
12291                 obj geometry object
12292
12293             Returns:
12294                 unique object identifier
12295             """
12296             ID = ""
12297             entry = salome.ObjectToID(obj)
12298             if entry is not None:
12299                 lst = entry.split(":")
12300                 if len(lst) > 0:
12301                     ID = lst[-1] # -1 means last item in the list            
12302                     return "GEOM_" + ID
12303             return ID
12304                 
12305             
12306
12307         ## Add marker texture. @a Width and @a Height parameters
12308         #  specify width and height of the texture in pixels.
12309         #  If @a RowData is @c True, @a Texture parameter should represent texture data
12310         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
12311         #  parameter should be unpacked string, in which '1' symbols represent opaque
12312         #  pixels and '0' represent transparent pixels of the texture bitmap.
12313         #
12314         #  @param Width texture width in pixels
12315         #  @param Height texture height in pixels
12316         #  @param Texture texture data
12317         #  @param RowData if @c True, @a Texture data are packed in the byte stream
12318         #  @return unique texture identifier
12319         #  @ingroup l1_geomBuilder_auxiliary
12320         def AddTexture(self, Width, Height, Texture, RowData=False):
12321             """
12322             Add marker texture. Width and Height parameters
12323             specify width and height of the texture in pixels.
12324             If RowData is True, Texture parameter should represent texture data
12325             packed into the byte array. If RowData is False (default), Texture
12326             parameter should be unpacked string, in which '1' symbols represent opaque
12327             pixels and '0' represent transparent pixels of the texture bitmap.
12328
12329             Parameters:
12330                 Width texture width in pixels
12331                 Height texture height in pixels
12332                 Texture texture data
12333                 RowData if True, Texture data are packed in the byte stream
12334
12335             Returns:
12336                 return unique texture identifier
12337             """
12338             if not RowData: Texture = PackData(Texture)
12339             ID = self.InsertOp.AddTexture(Width, Height, Texture)
12340             RaiseIfFailed("AddTexture", self.InsertOp)
12341             return ID
12342
12343 import omniORB
12344 # Register the new proxy for GEOM_Gen
12345 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
12346
12347 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
12348 #  interface to GEOM operations.
12349 #
12350 #  Typical use is:
12351 #  \code
12352 #    import salome
12353 #    salome.salome_init()
12354 #    from salome.geom import geomBuilder
12355 #    geompy = geomBuilder.New(salome.myStudy)
12356 #  \endcode
12357 #  @param  study     SALOME study, generally obtained by salome.myStudy.
12358 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12359 #  @return geomBuilder instance
12360 def New( study, instance=None):
12361     """
12362     Create a new geomBuilder instance.The geomBuilder class provides the Python
12363     interface to GEOM operations.
12364
12365     Typical use is:
12366         import salome
12367         salome.salome_init()
12368         from salome.geom import geomBuilder
12369         geompy = geomBuilder.New(salome.myStudy)
12370
12371     Parameters:
12372         study     SALOME study, generally obtained by salome.myStudy.
12373         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
12374     Returns:
12375         geomBuilder instance
12376     """
12377     #print "New geomBuilder ", study, instance
12378     global engine
12379     global geom
12380     global doLcc
12381     engine = instance
12382     if engine is None:
12383       doLcc = True
12384     geom = geomBuilder()
12385     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
12386     geom.init_geom(study)
12387     return geom