Salome HOME
Merge remote branch 'origin/akl/22379'
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2014  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, or (at your option) any later version.
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 geomBuilder geomBuilder Python module
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 ## - Some functions of \ref geomBuilder.geomBuilder "geomBuilder" class do not have
142 ##   \a 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 ## It is possible to customize the representation of the geometrical
148 ## data in the data tree; this can be done by using folders. A folder can
149 ## be created in the study tree using function
150 ## \ref geomBuilder.geomBuilder.NewFolder() "NewFolder()"
151 ## (by default it is created under the "Geometry" root object).
152 ## As soon as folder is created, any published geometry object
153 ## can be moved into it.
154 ##
155 ## For example:
156 ##
157 ## @code
158 ## import salome
159 ## from salome.geom import geomBuilder
160 ## geompy = geomBuilder.New(salome.myStudy)
161 ## box = geompy.MakeBoxDXDYDZ(100, 100, 100, "Box")
162 ## # the box was created and published in the study
163 ## folder = geompy.NewFolder("Primitives")
164 ## # an empty "Primitives" folder was created under default "Geometry" root object
165 ## geompy.PutToFolder(box, folder)
166 ## # the box was moved into "Primitives" folder
167 ## @endcode
168 ##
169 ## Subfolders are also can be created by specifying another folder as a parent:
170 ##
171 ## @code
172 ## subfolder = geompy.NewFolder("3D", folder)
173 ## # "3D" folder was created under "Primitives" folder
174 ## @endcode
175 ##
176 ## @note
177 ## - Folder container is just a representation layer object that
178 ## deals with already published objects only. So, any geometry object
179 ## should be published in the study (for example, with
180 ## \ref geomBuilder.geomBuilder.PutToFolder() "addToStudy()" function)
181 ## BEFORE moving it into any existing folder.
182 ## - \ref geomBuilder.geomBuilder.PutToFolder() "PutToFolder()" function
183 ## does not change physical position of geometry object in the study tree,
184 ## it only affects on the representation of the data tree.
185 ## - It is impossible to publish geometry object using any folder as father.
186 ##
187 ##  \defgroup l1_publish_data
188 ##  \defgroup l1_geomBuilder_auxiliary
189 ##  \defgroup l1_geomBuilder_purpose
190 ## @}
191
192 ## @defgroup l1_publish_data Publishing results in SALOME study
193
194 ## @defgroup l1_geomBuilder_auxiliary Auxiliary data structures and methods
195
196 ## @defgroup l1_geomBuilder_purpose   All package methods, grouped by their purpose
197 ## @{
198 ##   @defgroup l2_import_export Importing/exporting geometrical objects
199 ##   @defgroup l2_creating      Creating geometrical objects
200 ##   @{
201 ##     @defgroup l3_basic_go      Creating Basic Geometric Objects
202 ##     @{
203 ##       @defgroup l4_curves        Creating Curves
204
205 ##     @}
206 ##     @defgroup l3_3d_primitives Creating 3D Primitives
207 ##     @defgroup l3_complex       Creating Complex Objects
208 ##     @defgroup l3_groups        Working with groups
209 ##     @defgroup l3_blocks        Building by blocks
210 ##     @{
211 ##       @defgroup l4_blocks_measure Check and Improve
212
213 ##     @}
214 ##     @defgroup l3_sketcher      Sketcher
215 ##     @defgroup l3_advanced      Creating Advanced Geometrical Objects
216 ##     @{
217 ##       @defgroup l4_decompose     Decompose objects
218 ##       @defgroup l4_decompose_d   Decompose objects deprecated methods
219 ##       @defgroup l4_access        Access to sub-shapes by their unique IDs inside the main shape
220 ##       @defgroup l4_obtain        Access to sub-shapes by a criteria
221 ##       @defgroup l4_advanced      Advanced objects creation functions
222
223 ##     @}
224
225 ##   @}
226 ##   @defgroup l2_transforming  Transforming geometrical objects
227 ##   @{
228 ##     @defgroup l3_basic_op      Basic Operations
229 ##     @defgroup l3_boolean       Boolean Operations
230 ##     @defgroup l3_transform     Transformation Operations
231 ##     @defgroup l3_transform_d   Transformation Operations deprecated methods
232 ##     @defgroup l3_local         Local Operations (Fillet, Chamfer and other Features)
233 ##     @defgroup l3_blocks_op     Blocks Operations
234 ##     @defgroup l3_healing       Repairing Operations
235 ##     @defgroup l3_restore_ss    Restore presentation parameters and a tree of sub-shapes
236
237 ##   @}
238 ##   @defgroup l2_measure       Using measurement tools
239 ##   @defgroup l2_field         Field on Geometry
240
241 ## @}
242
243 # initialize SALOME session in try/except block
244 # to avoid problems in some cases, e.g. when generating documentation
245 try:
246     import salome
247     salome.salome_init()
248     from salome import *
249 except:
250     pass
251
252 from salome_notebook import *
253
254 import GEOM
255 import math
256 import os
257 import functools
258
259 from salome.geom.gsketcher import Sketcher3D, Sketcher2D
260
261 # service function
262 def _toListOfNames(_names, _size=-1):
263     l = []
264     import types
265     if type(_names) in [types.ListType, types.TupleType]:
266         for i in _names: l.append(i)
267     elif _names:
268         l.append(_names)
269     if l and len(l) < _size:
270         for i in range(len(l), _size): l.append("%s_%d"%(l[0],i))
271     return l
272
273 # Decorator function to manage transactions for all geometric operations.
274 def ManageTransactions(theOpeName):
275     def MTDecorator(theFunction):
276         # To keep the original function name an documentation.
277         @functools.wraps(theFunction)
278         def OpenCallClose(self, *args, **kwargs):
279             # Open transaction
280             anOperation = getattr(self, theOpeName)
281             anOperation.StartOperation()
282             try:
283                 # Call the function
284                 res = theFunction(self, *args, **kwargs)
285                 # Commit transaction
286                 anOperation.FinishOperation()
287                 return res
288             except:
289                 # Abort transaction
290                 anOperation.AbortOperation()
291                 raise
292         return OpenCallClose
293     return MTDecorator
294
295 ## Raise an Error, containing the Method_name, if Operation is Failed
296 ## @ingroup l1_geomBuilder_auxiliary
297 def RaiseIfFailed (Method_name, Operation):
298     if Operation.IsDone() == 0 and Operation.GetErrorCode() != "NOT_FOUND_ANY":
299         raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()
300
301 ## Return list of variables value from salome notebook
302 ## @ingroup l1_geomBuilder_auxiliary
303 def ParseParameters(*parameters):
304     Result = []
305     StringResult = []
306     for parameter in parameters:
307         if isinstance(parameter, list):
308             lResults = ParseParameters(*parameter)
309             if len(lResults) > 0:
310                 Result.append(lResults[:-1])
311                 StringResult += lResults[-1].split(":")
312                 pass
313             pass
314         else:
315             if isinstance(parameter,str):
316                 if notebook.isVariable(parameter):
317                     Result.append(notebook.get(parameter))
318                 else:
319                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
320                 pass
321             else:
322                 Result.append(parameter)
323                 pass
324             StringResult.append(str(parameter))
325             pass
326         pass
327     if Result:
328         Result.append(":".join(StringResult))
329     else:
330         Result = ":".join(StringResult)
331     return Result
332
333 ## Return list of variables value from salome notebook
334 ## @ingroup l1_geomBuilder_auxiliary
335 def ParseList(list):
336     Result = []
337     StringResult = ""
338     for parameter in list:
339         if isinstance(parameter,str) and notebook.isVariable(parameter):
340             Result.append(str(notebook.get(parameter)))
341             pass
342         else:
343             Result.append(str(parameter))
344             pass
345
346         StringResult = StringResult + str(parameter)
347         StringResult = StringResult + ":"
348         pass
349     StringResult = StringResult[:len(StringResult)-1]
350     return Result, StringResult
351
352 ## Return list of variables value from salome notebook
353 ## @ingroup l1_geomBuilder_auxiliary
354 def ParseSketcherCommand(command):
355     Result = ""
356     StringResult = ""
357     sections = command.split(":")
358     for section in sections:
359         parameters = section.split(" ")
360         paramIndex = 1
361         for parameter in parameters:
362             if paramIndex > 1 and parameter.find("'") != -1:
363                 parameter = parameter.replace("'","")
364                 if notebook.isVariable(parameter):
365                     Result = Result + str(notebook.get(parameter)) + " "
366                     pass
367                 else:
368                     raise RuntimeError, "Variable with name '" + parameter + "' doesn't exist!!!"
369                     pass
370                 pass
371             else:
372                 Result = Result + str(parameter) + " "
373                 pass
374             if paramIndex > 1:
375                 StringResult = StringResult + parameter
376                 StringResult = StringResult + ":"
377                 pass
378             paramIndex = paramIndex + 1
379             pass
380         Result = Result[:len(Result)-1] + ":"
381         pass
382     Result = Result[:len(Result)-1]
383     return Result, StringResult
384
385 ## Helper function which can be used to pack the passed string to the byte data.
386 ## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
387 ## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
388 ## For example,
389 ## \code
390 ## val = PackData("10001110") # val = 0xAE
391 ## val = PackData("1")        # val = 0x80
392 ## \endcode
393 ## @param data unpacked data - a string containing '1' and '0' symbols
394 ## @return data packed to the byte stream
395 ## @ingroup l1_geomBuilder_auxiliary
396 def PackData(data):
397     """
398     Helper function which can be used to pack the passed string to the byte data.
399     Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
400     If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
401
402     Parameters:
403         data unpacked data - a string containing '1' and '0' symbols
404
405     Returns:
406         data packed to the byte stream
407
408     Example of usage:
409         val = PackData("10001110") # val = 0xAE
410         val = PackData("1")        # val = 0x80
411     """
412     bytes = len(data)/8
413     if len(data)%8: bytes += 1
414     res = ""
415     for b in range(bytes):
416         d = data[b*8:(b+1)*8]
417         val = 0
418         for i in range(8):
419             val *= 2
420             if i < len(d):
421                 if d[i] == "1": val += 1
422                 elif d[i] != "0":
423                     raise "Invalid symbol %s" % d[i]
424                 pass
425             pass
426         res += chr(val)
427         pass
428     return res
429
430 ## Read bitmap texture from the text file.
431 ## In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
432 ## A zero symbol ('0') represents transparent pixel of the texture bitmap.
433 ## The function returns width and height of the pixmap in pixels and byte stream representing
434 ## texture bitmap itself.
435 ##
436 ## This function can be used to read the texture to the byte stream in order to pass it to
437 ## the AddTexture() function of geomBuilder class.
438 ## For example,
439 ## \code
440 ## from salome.geom import geomBuilder
441 ## geompy = geomBuilder.New(salome.myStudy)
442 ## texture = geompy.readtexture('mytexture.dat')
443 ## texture = geompy.AddTexture(*texture)
444 ## obj.SetMarkerTexture(texture)
445 ## \endcode
446 ## @param fname texture file name
447 ## @return sequence of tree values: texture's width, height in pixels and its byte stream
448 ## @ingroup l1_geomBuilder_auxiliary
449 def ReadTexture(fname):
450     """
451     Read bitmap texture from the text file.
452     In that file, any non-zero symbol represents '1' opaque pixel of the bitmap.
453     A zero symbol ('0') represents transparent pixel of the texture bitmap.
454     The function returns width and height of the pixmap in pixels and byte stream representing
455     texture bitmap itself.
456     This function can be used to read the texture to the byte stream in order to pass it to
457     the AddTexture() function of geomBuilder class.
458
459     Parameters:
460         fname texture file name
461
462     Returns:
463         sequence of tree values: texture's width, height in pixels and its byte stream
464
465     Example of usage:
466         from salome.geom import geomBuilder
467         geompy = geomBuilder.New(salome.myStudy)
468         texture = geompy.readtexture('mytexture.dat')
469         texture = geompy.AddTexture(*texture)
470         obj.SetMarkerTexture(texture)
471     """
472     try:
473         f = open(fname)
474         lines = [ l.strip() for l in f.readlines()]
475         f.close()
476         maxlen = 0
477         if lines: maxlen = max([len(x) for x in lines])
478         lenbytes = maxlen/8
479         if maxlen%8: lenbytes += 1
480         bytedata=""
481         for line in lines:
482             if len(line)%8:
483                 lenline = (len(line)/8+1)*8
484                 pass
485             else:
486                 lenline = (len(line)/8)*8
487                 pass
488             for i in range(lenline/8):
489                 byte=""
490                 for j in range(8):
491                     if i*8+j < len(line) and line[i*8+j] != "0": byte += "1"
492                     else: byte += "0"
493                     pass
494                 bytedata += PackData(byte)
495                 pass
496             for i in range(lenline/8, lenbytes):
497                 bytedata += PackData("0")
498             pass
499         return lenbytes*8, len(lines), bytedata
500     except:
501         pass
502     return 0, 0, ""
503
504 ## Returns a long value from enumeration type
505 #  Can be used for CORBA enumerator types like GEOM.shape_type
506 #  @param theItem enumeration type
507 #  @ingroup l1_geomBuilder_auxiliary
508 def EnumToLong(theItem):
509     """
510     Returns a long value from enumeration type
511     Can be used for CORBA enumerator types like geomBuilder.ShapeType
512
513     Parameters:
514         theItem enumeration type
515     """
516     ret = theItem
517     if hasattr(theItem, "_v"): ret = theItem._v
518     return ret
519
520 ## Information about closed/unclosed state of shell or wire
521 #  @ingroup l1_geomBuilder_auxiliary
522 class info:
523     """
524     Information about closed/unclosed state of shell or wire
525     """
526     UNKNOWN  = 0
527     CLOSED   = 1
528     UNCLOSED = 2
529
530 ## Private class used to bind calls of plugin operations to geomBuilder
531 class PluginOperation:
532   def __init__(self, operation, function):
533     self.operation = operation
534     self.function = function
535     pass
536
537   @ManageTransactions("operation")
538   def __call__(self, *args):
539     res = self.function(self.operation, *args)
540     RaiseIfFailed(self.function.__name__, self.operation)
541     return res
542
543 # Warning: geom is a singleton
544 geom = None
545 engine = None
546 doLcc = False
547 created = False
548
549 class geomBuilder(object, GEOM._objref_GEOM_Gen):
550
551         ## Enumeration ShapeType as a dictionary. \n
552         ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details.
553         #  @ingroup l1_geomBuilder_auxiliary
554         ShapeType = {"AUTO":-1, "COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
555
556         ## Kinds of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
557         #  and a list of parameters, describing the shape.
558         #  List of parameters, describing the shape:
559         #  - COMPOUND:            [nb_solids  nb_faces  nb_edges  nb_vertices]
560         #  - COMPSOLID:           [nb_solids  nb_faces  nb_edges  nb_vertices]
561         #
562         #  - SHELL:       [info.CLOSED / info.UNCLOSED  nb_faces  nb_edges  nb_vertices]
563         #
564         #  - WIRE:        [info.CLOSED / info.UNCLOSED nb_edges  nb_vertices]
565         #
566         #  - SPHERE:       [xc yc zc            R]
567         #  - CYLINDER:     [xb yb zb  dx dy dz  R         H]
568         #  - BOX:          [xc yc zc                      ax ay az]
569         #  - ROTATED_BOX:  [xc yc zc  zx zy zz  xx xy xz  ax ay az]
570         #  - TORUS:        [xc yc zc  dx dy dz  R_1  R_2]
571         #  - CONE:         [xb yb zb  dx dy dz  R_1  R_2  H]
572         #  - POLYHEDRON:                       [nb_faces  nb_edges  nb_vertices]
573         #  - SOLID:                            [nb_faces  nb_edges  nb_vertices]
574         #
575         #  - SPHERE2D:     [xc yc zc            R]
576         #  - CYLINDER2D:   [xb yb zb  dx dy dz  R         H]
577         #  - TORUS2D:      [xc yc zc  dx dy dz  R_1  R_2]
578         #  - CONE2D:       [xc yc zc  dx dy dz  R_1  R_2  H]
579         #  - DISK_CIRCLE:  [xc yc zc  dx dy dz  R]
580         #  - DISK_ELLIPSE: [xc yc zc  dx dy dz  R_1  R_2]
581         #  - POLYGON:      [xo yo zo  dx dy dz            nb_edges  nb_vertices]
582         #  - PLANE:        [xo yo zo  dx dy dz]
583         #  - PLANAR:       [xo yo zo  dx dy dz            nb_edges  nb_vertices]
584         #  - FACE:                                       [nb_edges  nb_vertices]
585         #
586         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
587         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
588         #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
589         #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
590         #  - LINE:         [xo yo zo  dx dy dz]
591         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
592         #  - EDGE:                                                 [nb_vertices]
593         #
594         #  - VERTEX:       [x  y  z]
595         #  @ingroup l1_geomBuilder_auxiliary
596         kind = GEOM.GEOM_IKindOfShape
597
598         def __new__(cls):
599             global engine
600             global geom
601             global doLcc
602             global created
603             #print "==== __new__ ", engine, geom, doLcc, created
604             if geom is None:
605                 # geom engine is either retrieved from engine, or created
606                 geom = engine
607                 # Following test avoids a recursive loop
608                 if doLcc:
609                     if geom is not None:
610                         # geom engine not created: existing engine found
611                         doLcc = False
612                     if doLcc and not created:
613                         doLcc = False
614                         # FindOrLoadComponent called:
615                         # 1. CORBA resolution of server
616                         # 2. the __new__ method is called again
617                         #print "==== FindOrLoadComponent ", engine, geom, doLcc, created
618                         geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
619                         #print "====1 ",geom
620                 else:
621                     # FindOrLoadComponent not called
622                     if geom is None:
623                         # geomBuilder instance is created from lcc.FindOrLoadComponent
624                         #print "==== super ", engine, geom, doLcc, created
625                         geom = super(geomBuilder,cls).__new__(cls)
626                         #print "====2 ",geom
627                     else:
628                         # geom engine not created: existing engine found
629                         #print "==== existing ", engine, geom, doLcc, created
630                         pass
631                 #print "return geom 1 ", geom
632                 return geom
633
634             #print "return geom 2 ", geom
635             return geom
636
637         def __init__(self):
638             global created
639             #print "-------- geomBuilder __init__ --- ", created, self
640             if not created:
641               created = True
642               GEOM._objref_GEOM_Gen.__init__(self)
643               self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default
644               self.myBuilder = None
645               self.myStudyId = 0
646               self.father    = None
647
648               self.BasicOp  = None
649               self.CurvesOp = None
650               self.PrimOp   = None
651               self.ShapesOp = None
652               self.HealOp   = None
653               self.InsertOp = None
654               self.BoolOp   = None
655               self.TrsfOp   = None
656               self.LocalOp  = None
657               self.MeasuOp  = None
658               self.BlocksOp = None
659               self.GroupOp  = None
660               self.AdvOp    = None
661               self.FieldOp  = None
662             pass
663
664         ## Process object publication in the study, as follows:
665         #  - if @a theName is specified (not None), the object is published in the study
666         #    with this name, not taking into account "auto-publishing" option;
667         #  - if @a theName is NOT specified, the object is published in the study
668         #    (using default name, which can be customized using @a theDefaultName parameter)
669         #    only if auto-publishing is switched on.
670         #
671         #  @param theObj  object, a subject for publishing
672         #  @param theName object name for study
673         #  @param theDefaultName default name for the auto-publishing
674         #
675         #  @sa addToStudyAuto()
676         def _autoPublish(self, theObj, theName, theDefaultName="noname"):
677             # ---
678             def _item_name(_names, _defname, _idx=-1):
679                 if not _names: _names = _defname
680                 if type(_names) in [types.ListType, types.TupleType]:
681                     if _idx >= 0:
682                         if _idx >= len(_names) or not _names[_idx]:
683                             if type(_defname) not in [types.ListType, types.TupleType]:
684                                 _name = "%s_%d"%(_defname, _idx+1)
685                             elif len(_defname) > 0 and _idx >= 0 and _idx < len(_defname):
686                                 _name = _defname[_idx]
687                             else:
688                                 _name = "%noname_%d"%(dn, _idx+1)
689                             pass
690                         else:
691                             _name = _names[_idx]
692                         pass
693                     else:
694                         # must be wrong  usage
695                         _name = _names[0]
696                     pass
697                 else:
698                     if _idx >= 0:
699                         _name = "%s_%d"%(_names, _idx+1)
700                     else:
701                         _name = _names
702                     pass
703                 return _name
704             # ---
705             def _publish( _name, _obj ):
706                 fatherObj = None
707                 if isinstance( _obj, GEOM._objref_GEOM_Field ):
708                     fatherObj = _obj.GetShape()
709                 elif isinstance( _obj, GEOM._objref_GEOM_FieldStep ):
710                     fatherObj = _obj.GetField()
711                 elif not _obj.IsMainShape():
712                     fatherObj = _obj.GetMainShape()
713                     pass
714                 if fatherObj and fatherObj.GetStudyEntry():
715                     self.addToStudyInFather(fatherObj, _obj, _name)
716                 else:
717                     self.addToStudy(_obj, _name)
718                     pass
719                 return
720             # ---
721             if not theObj:
722                 return # null object
723             if not theName and not self.myMaxNbSubShapesAllowed:
724                 return # nothing to do: auto-publishing is disabled
725             if not theName and not theDefaultName:
726                 return # neither theName nor theDefaultName is given
727             import types
728             if type(theObj) in [types.ListType, types.TupleType]:
729                 # list of objects is being published
730                 idx = 0
731                 for obj in theObj:
732                     if not obj: continue # bad object
733                     name = _item_name(theName, theDefaultName, idx)
734                     _publish( name, obj )
735                     idx = idx+1
736                     if not theName and idx == self.myMaxNbSubShapesAllowed: break
737                     pass
738                 pass
739             else:
740                 # single object is published
741                 name = _item_name(theName, theDefaultName)
742                 _publish( name, theObj )
743             pass
744
745         ## @addtogroup l1_geomBuilder_auxiliary
746         ## @{
747         def init_geom(self,theStudy):
748             self.myStudy = theStudy
749             self.myStudyId = self.myStudy._get_StudyId()
750             self.myBuilder = self.myStudy.NewBuilder()
751             self.father = self.myStudy.FindComponent("GEOM")
752             notebook.myStudy = theStudy
753             if self.father is None:
754                 self.father = self.myBuilder.NewComponent("GEOM")
755                 A1 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributeName")
756                 FName = A1._narrow(SALOMEDS.AttributeName)
757                 FName.SetValue("Geometry")
758                 A2 = self.myBuilder.FindOrCreateAttribute(self.father, "AttributePixMap")
759                 aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
760                 aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
761                 self.myBuilder.DefineComponentInstance(self.father,self)
762                 pass
763             self.BasicOp  = self.GetIBasicOperations    (self.myStudyId)
764             self.CurvesOp = self.GetICurvesOperations   (self.myStudyId)
765             self.PrimOp   = self.GetI3DPrimOperations   (self.myStudyId)
766             self.ShapesOp = self.GetIShapesOperations   (self.myStudyId)
767             self.HealOp   = self.GetIHealingOperations  (self.myStudyId)
768             self.InsertOp = self.GetIInsertOperations   (self.myStudyId)
769             self.BoolOp   = self.GetIBooleanOperations  (self.myStudyId)
770             self.TrsfOp   = self.GetITransformOperations(self.myStudyId)
771             self.LocalOp  = self.GetILocalOperations    (self.myStudyId)
772             self.MeasuOp  = self.GetIMeasureOperations  (self.myStudyId)
773             self.BlocksOp = self.GetIBlocksOperations   (self.myStudyId)
774             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
775             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
776
777             # The below line is a right way to map all plugin functions to geomBuilder,
778             # but AdvancedOperations are already mapped, that is why this line is commented
779             # and presents here only as an axample
780             #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
781
782             # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
783             self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
784
785             # set GEOM as root in the use case tree
786             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
787             self.myUseCaseBuilder.SetRootCurrent()
788             self.myUseCaseBuilder.Append(self.father)
789             pass
790
791         def GetPluginOperations(self, studyID, libraryName):
792             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
793             if op:
794                 # bind methods of operations to self
795                 methods = op.__class__.__dict__['__methods__']
796                 avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
797                 for meth_name in methods:
798                     if not meth_name in avoid_methods: # avoid basic methods
799                         function = getattr(op.__class__, meth_name)
800                         if callable(function):
801                             #self.__dict__[meth_name] = self.__PluginOperation(op, function)
802                             self.__dict__[meth_name] = PluginOperation(op, function)
803             return op
804
805         ## Enable / disable results auto-publishing
806         #
807         #  The automatic publishing is managed in the following way:
808         #  - if @a maxNbSubShapes = 0, automatic publishing is disabled.
809         #  - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
810         #  maximum number of sub-shapes allowed for publishing is unlimited; any negative
811         #  value passed as parameter has the same effect.
812         #  - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
813         #  maximum number of sub-shapes allowed for publishing is set to specified value.
814         #
815         #  @param maxNbSubShapes maximum number of sub-shapes allowed for publishing.
816         #  @ingroup l1_publish_data
817         def addToStudyAuto(self, maxNbSubShapes=-1):
818             """
819             Enable / disable results auto-publishing
820
821             The automatic publishing is managed in the following way:
822             - if @a maxNbSubShapes = 0, automatic publishing is disabled;
823             - if @a maxNbSubShapes = -1 (default), automatic publishing is enabled and
824             maximum number of sub-shapes allowed for publishing is unlimited; any negative
825             value passed as parameter has the same effect.
826             - if @a maxNbSubShapes is any positive value, automatic publishing is enabled and
827             maximum number of sub-shapes allowed for publishing is set to this value.
828
829             Parameters:
830                 maxNbSubShapes maximum number of sub-shapes allowed for publishing.
831
832             Example of usage:
833                 geompy.addToStudyAuto()   # enable auto-publishing
834                 geompy.MakeBoxDXDYDZ(100) # box is created and published with default name
835                 geompy.addToStudyAuto(0)  # disable auto-publishing
836             """
837             self.myMaxNbSubShapesAllowed = max(-1, maxNbSubShapes)
838             pass
839
840         ## Dump component to the Python script
841         #  This method overrides IDL function to allow default values for the parameters.
842         def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
843             """
844             Dump component to the Python script
845             This method overrides IDL function to allow default values for the parameters.
846             """
847             return GEOM._objref_GEOM_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)
848
849         ## Get name for sub-shape aSubObj of shape aMainObj
850         #
851         # @ref swig_SubShapeName "Example"
852         @ManageTransactions("ShapesOp")
853         def SubShapeName(self,aSubObj, aMainObj):
854             """
855             Get name for sub-shape aSubObj of shape aMainObj
856             """
857             # Example: see GEOM_TestAll.py
858
859             #aSubId  = orb.object_to_string(aSubObj)
860             #aMainId = orb.object_to_string(aMainObj)
861             #index = gg.getIndexTopology(aSubId, aMainId)
862             #name = gg.getShapeTypeString(aSubId) + "_%d"%(index)
863             index = self.ShapesOp.GetTopologyIndex(aMainObj, aSubObj)
864             name = self.ShapesOp.GetShapeTypeString(aSubObj) + "_%d"%(index)
865             return name
866
867         ## Publish in study aShape with name aName
868         #
869         #  \param aShape the shape to be published
870         #  \param aName  the name for the shape
871         #  \param doRestoreSubShapes if True, finds and publishes also
872         #         sub-shapes of <VAR>aShape</VAR>, corresponding to its arguments
873         #         and published sub-shapes of arguments
874         #  \param theArgs,theFindMethod,theInheritFirstArg see RestoreSubShapes() for
875         #                                                  these arguments description
876         #  \return study entry of the published shape in form of string
877         #
878         #  @ingroup l1_publish_data
879         #  @ref swig_all_addtostudy "Example"
880         def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
881                        theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
882             """
883             Publish in study aShape with name aName
884
885             Parameters:
886                 aShape the shape to be published
887                 aName  the name for the shape
888                 doRestoreSubShapes if True, finds and publishes also
889                                    sub-shapes of aShape, corresponding to its arguments
890                                    and published sub-shapes of arguments
891                 theArgs,theFindMethod,theInheritFirstArg see geompy.RestoreSubShapes() for
892                                                          these arguments description
893
894             Returns:
895                 study entry of the published shape in form of string
896
897             Example of usage:
898                 id_block1 = geompy.addToStudy(Block1, "Block 1")
899             """
900             # Example: see GEOM_TestAll.py
901             try:
902                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
903                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
904                 if doRestoreSubShapes:
905                     self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
906                                             theFindMethod, theInheritFirstArg, True )
907             except:
908                 print "addToStudy() failed"
909                 return ""
910             return aShape.GetStudyEntry()
911
912         ## Publish in study aShape with name aName as sub-object of previously published aFather
913         #  \param aFather previously published object
914         #  \param aShape the shape to be published as sub-object of <VAR>aFather</VAR>
915         #  \param aName  the name for the shape
916         #
917         #  \return study entry of the published shape in form of string
918         #
919         #  @ingroup l1_publish_data
920         #  @ref swig_all_addtostudyInFather "Example"
921         def addToStudyInFather(self, aFather, aShape, aName):
922             """
923             Publish in study aShape with name aName as sub-object of previously published aFather
924
925             Parameters:
926                 aFather previously published object
927                 aShape the shape to be published as sub-object of aFather
928                 aName  the name for the shape
929
930             Returns:
931                 study entry of the published shape in form of string
932             """
933             # Example: see GEOM_TestAll.py
934             try:
935                 aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
936                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
937             except:
938                 print "addToStudyInFather() failed"
939                 return ""
940             return aShape.GetStudyEntry()
941
942         ## Unpublish object in study
943         #
944         #  \param obj the object to be unpublished
945         def hideInStudy(self, obj):
946             """
947             Unpublish object in study
948
949             Parameters:
950                 obj the object to be unpublished
951             """
952             ior = salome.orb.object_to_string(obj)
953             aSObject = self.myStudy.FindObjectIOR(ior)
954             if aSObject is not None:
955                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
956                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
957                 drwAttribute.SetDrawable(False)
958                 pass
959
960         # end of l1_geomBuilder_auxiliary
961         ## @}
962
963         ## @addtogroup l3_restore_ss
964         ## @{
965
966         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
967         #  To be used from python scripts out of addToStudy() (non-default usage)
968         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
969         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
970         #                   If this list is empty, all operation arguments will be published
971         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
972         #                       their sub-shapes. Value from enumeration GEOM.find_shape_method.
973         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
974         #                            Do not publish sub-shapes in place of arguments, but only
975         #                            in place of sub-shapes of the first argument,
976         #                            because the whole shape corresponds to the first argument.
977         #                            Mainly to be used after transformations, but it also can be
978         #                            usefull after partition with one object shape, and some other
979         #                            operations, where only the first argument has to be considered.
980         #                            If theObject has only one argument shape, this flag is automatically
981         #                            considered as True, not regarding really passed value.
982         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
983         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
984         #  \return list of published sub-shapes
985         #
986         #  @ref tui_restore_prs_params "Example"
987         def RestoreSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
988                               theInheritFirstArg=False, theAddPrefix=True):
989             """
990             Publish sub-shapes, standing for arguments and sub-shapes of arguments
991             To be used from python scripts out of geompy.addToStudy (non-default usage)
992
993             Parameters:
994                 theObject published GEOM.GEOM_Object, arguments of which will be published
995                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
996                           If this list is empty, all operation arguments will be published
997                 theFindMethod method to search sub-shapes, corresponding to arguments and
998                               their sub-shapes. Value from enumeration GEOM.find_shape_method.
999                 theInheritFirstArg set properties of the first argument for theObject.
1000                                    Do not publish sub-shapes in place of arguments, but only
1001                                    in place of sub-shapes of the first argument,
1002                                    because the whole shape corresponds to the first argument.
1003                                    Mainly to be used after transformations, but it also can be
1004                                    usefull after partition with one object shape, and some other
1005                                    operations, where only the first argument has to be considered.
1006                                    If theObject has only one argument shape, this flag is automatically
1007                                    considered as True, not regarding really passed value.
1008                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1009                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1010             Returns:
1011                 list of published sub-shapes
1012             """
1013             # Example: see GEOM_TestAll.py
1014             return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
1015                                           theFindMethod, theInheritFirstArg, theAddPrefix)
1016
1017         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
1018         #  To be used from python scripts out of addToStudy() (non-default usage)
1019         #  \param theObject published GEOM.GEOM_Object, arguments of which will be published
1020         #  \param theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1021         #                   If this list is empty, all operation arguments will be published
1022         #  \param theFindMethod method to search sub-shapes, corresponding to arguments and
1023         #                       their sub-shapes. Value from enumeration GEOM::find_shape_method.
1024         #  \param theInheritFirstArg set properties of the first argument for <VAR>theObject</VAR>.
1025         #                            Do not publish sub-shapes in place of arguments, but only
1026         #                            in place of sub-shapes of the first argument,
1027         #                            because the whole shape corresponds to the first argument.
1028         #                            Mainly to be used after transformations, but it also can be
1029         #                            usefull after partition with one object shape, and some other
1030         #                            operations, where only the first argument has to be considered.
1031         #                            If theObject has only one argument shape, this flag is automatically
1032         #                            considered as True, not regarding really passed value.
1033         #  \param theAddPrefix add prefix "from_" to names of restored sub-shapes,
1034         #                      and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1035         #  \return list of published sub-shapes
1036         #
1037         #  @ref tui_restore_prs_params "Example"
1038         def RestoreGivenSubShapes (self, theObject, theArgs=[], theFindMethod=GEOM.FSM_GetInPlace,
1039                                    theInheritFirstArg=False, theAddPrefix=True):
1040             """
1041             Publish sub-shapes, standing for arguments and sub-shapes of arguments
1042             To be used from python scripts out of geompy.addToStudy() (non-default usage)
1043
1044             Parameters:
1045                 theObject published GEOM.GEOM_Object, arguments of which will be published
1046                 theArgs   list of GEOM.GEOM_Object, operation arguments to be published.
1047                           If this list is empty, all operation arguments will be published
1048                 theFindMethod method to search sub-shapes, corresponding to arguments and
1049                               their sub-shapes. Value from enumeration GEOM::find_shape_method.
1050                 theInheritFirstArg set properties of the first argument for theObject.
1051                                    Do not publish sub-shapes in place of arguments, but only
1052                                    in place of sub-shapes of the first argument,
1053                                    because the whole shape corresponds to the first argument.
1054                                    Mainly to be used after transformations, but it also can be
1055                                    usefull after partition with one object shape, and some other
1056                                    operations, where only the first argument has to be considered.
1057                                    If theObject has only one argument shape, this flag is automatically
1058                                    considered as True, not regarding really passed value.
1059                 theAddPrefix add prefix "from_" to names of restored sub-shapes,
1060                              and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
1061
1062             Returns:
1063                 list of published sub-shapes
1064             """
1065             # Example: see GEOM_TestAll.py
1066             return self.RestoreGivenSubShapesO(self.myStudy, theObject, theArgs,
1067                                                theFindMethod, theInheritFirstArg, theAddPrefix)
1068
1069         # end of l3_restore_ss
1070         ## @}
1071
1072         ## @addtogroup l3_basic_go
1073         ## @{
1074
1075         ## Create point by three coordinates.
1076         #  @param theX The X coordinate of the point.
1077         #  @param theY The Y coordinate of the point.
1078         #  @param theZ The Z coordinate of the point.
1079         #  @param theName Object name; when specified, this parameter is used
1080         #         for result publication in the study. Otherwise, if automatic
1081         #         publication is switched on, default value is used for result name.
1082         #
1083         #  @return New GEOM.GEOM_Object, containing the created point.
1084         #
1085         #  @ref tui_creation_point "Example"
1086         @ManageTransactions("BasicOp")
1087         def MakeVertex(self, theX, theY, theZ, theName=None):
1088             """
1089             Create point by three coordinates.
1090
1091             Parameters:
1092                 theX The X coordinate of the point.
1093                 theY The Y coordinate of the point.
1094                 theZ The Z coordinate of the point.
1095                 theName Object name; when specified, this parameter is used
1096                         for result publication in the study. Otherwise, if automatic
1097                         publication is switched on, default value is used for result name.
1098
1099             Returns:
1100                 New GEOM.GEOM_Object, containing the created point.
1101             """
1102             # Example: see GEOM_TestAll.py
1103             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1104             anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
1105             RaiseIfFailed("MakePointXYZ", self.BasicOp)
1106             anObj.SetParameters(Parameters)
1107             self._autoPublish(anObj, theName, "vertex")
1108             return anObj
1109
1110         ## Create a point, distant from the referenced point
1111         #  on the given distances along the coordinate axes.
1112         #  @param theReference The referenced point.
1113         #  @param theX Displacement from the referenced point along OX axis.
1114         #  @param theY Displacement from the referenced point along OY axis.
1115         #  @param theZ Displacement from the referenced point along OZ axis.
1116         #  @param theName Object name; when specified, this parameter is used
1117         #         for result publication in the study. Otherwise, if automatic
1118         #         publication is switched on, default value is used for result name.
1119         #
1120         #  @return New GEOM.GEOM_Object, containing the created point.
1121         #
1122         #  @ref tui_creation_point "Example"
1123         @ManageTransactions("BasicOp")
1124         def MakeVertexWithRef(self, theReference, theX, theY, theZ, theName=None):
1125             """
1126             Create a point, distant from the referenced point
1127             on the given distances along the coordinate axes.
1128
1129             Parameters:
1130                 theReference The referenced point.
1131                 theX Displacement from the referenced point along OX axis.
1132                 theY Displacement from the referenced point along OY axis.
1133                 theZ Displacement from the referenced point along OZ axis.
1134                 theName Object name; when specified, this parameter is used
1135                         for result publication in the study. Otherwise, if automatic
1136                         publication is switched on, default value is used for result name.
1137
1138             Returns:
1139                 New GEOM.GEOM_Object, containing the created point.
1140             """
1141             # Example: see GEOM_TestAll.py
1142             theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
1143             anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
1144             RaiseIfFailed("MakePointWithReference", self.BasicOp)
1145             anObj.SetParameters(Parameters)
1146             self._autoPublish(anObj, theName, "vertex")
1147             return anObj
1148
1149         ## Create a point, corresponding to the given parameter on the given curve.
1150         #  @param theRefCurve The referenced curve.
1151         #  @param theParameter Value of parameter on the referenced curve.
1152         #  @param theName Object name; when specified, this parameter is used
1153         #         for result publication in the study. Otherwise, if automatic
1154         #         publication is switched on, default value is used for result name.
1155         #
1156         #  @return New GEOM.GEOM_Object, containing the created point.
1157         #
1158         #  @ref tui_creation_point "Example"
1159         @ManageTransactions("BasicOp")
1160         def MakeVertexOnCurve(self, theRefCurve, theParameter, theName=None):
1161             """
1162             Create a point, corresponding to the given parameter on the given curve.
1163
1164             Parameters:
1165                 theRefCurve The referenced curve.
1166                 theParameter Value of parameter on the referenced curve.
1167                 theName Object name; when specified, this parameter is used
1168                         for result publication in the study. Otherwise, if automatic
1169                         publication is switched on, default value is used for result name.
1170
1171             Returns:
1172                 New GEOM.GEOM_Object, containing the created point.
1173
1174             Example of usage:
1175                 p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
1176             """
1177             # Example: see GEOM_TestAll.py
1178             theParameter, Parameters = ParseParameters(theParameter)
1179             anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
1180             RaiseIfFailed("MakePointOnCurve", self.BasicOp)
1181             anObj.SetParameters(Parameters)
1182             self._autoPublish(anObj, theName, "vertex")
1183             return anObj
1184
1185         ## Create a point by projection give coordinates on the given curve
1186         #  @param theRefCurve The referenced curve.
1187         #  @param theX X-coordinate in 3D space
1188         #  @param theY Y-coordinate in 3D space
1189         #  @param theZ Z-coordinate in 3D space
1190         #  @param theName Object name; when specified, this parameter is used
1191         #         for result publication in the study. Otherwise, if automatic
1192         #         publication is switched on, default value is used for result name.
1193         #
1194         #  @return New GEOM.GEOM_Object, containing the created point.
1195         #
1196         #  @ref tui_creation_point "Example"
1197         @ManageTransactions("BasicOp")
1198         def MakeVertexOnCurveByCoord(self, theRefCurve, theX, theY, theZ, theName=None):
1199             """
1200             Create a point by projection give coordinates on the given curve
1201
1202             Parameters:
1203                 theRefCurve The referenced curve.
1204                 theX X-coordinate in 3D space
1205                 theY Y-coordinate in 3D space
1206                 theZ Z-coordinate in 3D space
1207                 theName Object name; when specified, this parameter is used
1208                         for result publication in the study. Otherwise, if automatic
1209                         publication is switched on, default value is used for result name.
1210
1211             Returns:
1212                 New GEOM.GEOM_Object, containing the created point.
1213
1214             Example of usage:
1215                 p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
1216             """
1217             # Example: see GEOM_TestAll.py
1218             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1219             anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
1220             RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
1221             anObj.SetParameters(Parameters)
1222             self._autoPublish(anObj, theName, "vertex")
1223             return anObj
1224
1225         ## Create a point, corresponding to the given length on the given curve.
1226         #  @param theRefCurve The referenced curve.
1227         #  @param theLength Length on the referenced curve. It can be negative.
1228         #  @param theStartPoint Point allowing to choose the direction for the calculation
1229         #                       of the length. If None, start from the first point of theRefCurve.
1230         #  @param theName Object name; when specified, this parameter is used
1231         #         for result publication in the study. Otherwise, if automatic
1232         #         publication is switched on, default value is used for result name.
1233         #
1234         #  @return New GEOM.GEOM_Object, containing the created point.
1235         #
1236         #  @ref tui_creation_point "Example"
1237         @ManageTransactions("BasicOp")
1238         def MakeVertexOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
1239             """
1240             Create a point, corresponding to the given length on the given curve.
1241
1242             Parameters:
1243                 theRefCurve The referenced curve.
1244                 theLength Length on the referenced curve. It can be negative.
1245                 theStartPoint Point allowing to choose the direction for the calculation
1246                               of the length. If None, start from the first point of theRefCurve.
1247                 theName Object name; when specified, this parameter is used
1248                         for result publication in the study. Otherwise, if automatic
1249                         publication is switched on, default value is used for result name.
1250
1251             Returns:
1252                 New GEOM.GEOM_Object, containing the created point.
1253             """
1254             # Example: see GEOM_TestAll.py
1255             theLength, Parameters = ParseParameters(theLength)
1256             anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
1257             RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
1258             anObj.SetParameters(Parameters)
1259             self._autoPublish(anObj, theName, "vertex")
1260             return anObj
1261
1262         ## Create a point, corresponding to the given parameters on the
1263         #    given surface.
1264         #  @param theRefSurf The referenced surface.
1265         #  @param theUParameter Value of U-parameter on the referenced surface.
1266         #  @param theVParameter Value of V-parameter on the referenced surface.
1267         #  @param theName Object name; when specified, this parameter is used
1268         #         for result publication in the study. Otherwise, if automatic
1269         #         publication is switched on, default value is used for result name.
1270         #
1271         #  @return New GEOM.GEOM_Object, containing the created point.
1272         #
1273         #  @ref swig_MakeVertexOnSurface "Example"
1274         @ManageTransactions("BasicOp")
1275         def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter, theName=None):
1276             """
1277             Create a point, corresponding to the given parameters on the
1278             given surface.
1279
1280             Parameters:
1281                 theRefSurf The referenced surface.
1282                 theUParameter Value of U-parameter on the referenced surface.
1283                 theVParameter Value of V-parameter on the referenced surface.
1284                 theName Object name; when specified, this parameter is used
1285                         for result publication in the study. Otherwise, if automatic
1286                         publication is switched on, default value is used for result name.
1287
1288             Returns:
1289                 New GEOM.GEOM_Object, containing the created point.
1290
1291             Example of usage:
1292                 p_on_face = geompy.MakeVertexOnSurface(Face, 0.1, 0.8)
1293             """
1294             theUParameter, theVParameter, Parameters = ParseParameters(theUParameter, theVParameter)
1295             # Example: see GEOM_TestAll.py
1296             anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
1297             RaiseIfFailed("MakePointOnSurface", self.BasicOp)
1298             anObj.SetParameters(Parameters);
1299             self._autoPublish(anObj, theName, "vertex")
1300             return anObj
1301
1302         ## Create a point by projection give coordinates on the given surface
1303         #  @param theRefSurf The referenced surface.
1304         #  @param theX X-coordinate in 3D space
1305         #  @param theY Y-coordinate in 3D space
1306         #  @param theZ Z-coordinate in 3D space
1307         #  @param theName Object name; when specified, this parameter is used
1308         #         for result publication in the study. Otherwise, if automatic
1309         #         publication is switched on, default value is used for result name.
1310         #
1311         #  @return New GEOM.GEOM_Object, containing the created point.
1312         #
1313         #  @ref swig_MakeVertexOnSurfaceByCoord "Example"
1314         @ManageTransactions("BasicOp")
1315         def MakeVertexOnSurfaceByCoord(self, theRefSurf, theX, theY, theZ, theName=None):
1316             """
1317             Create a point by projection give coordinates on the given surface
1318
1319             Parameters:
1320                 theRefSurf The referenced surface.
1321                 theX X-coordinate in 3D space
1322                 theY Y-coordinate in 3D space
1323                 theZ Z-coordinate in 3D space
1324                 theName Object name; when specified, this parameter is used
1325                         for result publication in the study. Otherwise, if automatic
1326                         publication is switched on, default value is used for result name.
1327
1328             Returns:
1329                 New GEOM.GEOM_Object, containing the created point.
1330
1331             Example of usage:
1332                 p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face, 0., 0., 0.)
1333             """
1334             theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
1335             # Example: see GEOM_TestAll.py
1336             anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
1337             RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
1338             anObj.SetParameters(Parameters);
1339             self._autoPublish(anObj, theName, "vertex")
1340             return anObj
1341
1342         ## Create a point, which lays on the given face.
1343         #  The point will lay in arbitrary place of the face.
1344         #  The only condition on it is a non-zero distance to the face boundary.
1345         #  Such point can be used to uniquely identify the face inside any
1346         #  shape in case, when the shape does not contain overlapped faces.
1347         #  @param theFace The referenced face.
1348         #  @param theName Object name; when specified, this parameter is used
1349         #         for result publication in the study. Otherwise, if automatic
1350         #         publication is switched on, default value is used for result name.
1351         #
1352         #  @return New GEOM.GEOM_Object, containing the created point.
1353         #
1354         #  @ref swig_MakeVertexInsideFace "Example"
1355         @ManageTransactions("BasicOp")
1356         def MakeVertexInsideFace (self, theFace, theName=None):
1357             """
1358             Create a point, which lays on the given face.
1359             The point will lay in arbitrary place of the face.
1360             The only condition on it is a non-zero distance to the face boundary.
1361             Such point can be used to uniquely identify the face inside any
1362             shape in case, when the shape does not contain overlapped faces.
1363
1364             Parameters:
1365                 theFace The referenced face.
1366                 theName Object name; when specified, this parameter is used
1367                         for result publication in the study. Otherwise, if automatic
1368                         publication is switched on, default value is used for result name.
1369
1370             Returns:
1371                 New GEOM.GEOM_Object, containing the created point.
1372
1373             Example of usage:
1374                 p_on_face = geompy.MakeVertexInsideFace(Face)
1375             """
1376             # Example: see GEOM_TestAll.py
1377             anObj = self.BasicOp.MakePointOnFace(theFace)
1378             RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
1379             self._autoPublish(anObj, theName, "vertex")
1380             return anObj
1381
1382         ## Create a point on intersection of two lines.
1383         #  @param theRefLine1, theRefLine2 The referenced lines.
1384         #  @param theName Object name; when specified, this parameter is used
1385         #         for result publication in the study. Otherwise, if automatic
1386         #         publication is switched on, default value is used for result name.
1387         #
1388         #  @return New GEOM.GEOM_Object, containing the created point.
1389         #
1390         #  @ref swig_MakeVertexOnLinesIntersection "Example"
1391         @ManageTransactions("BasicOp")
1392         def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2, theName=None):
1393             """
1394             Create a point on intersection of two lines.
1395
1396             Parameters:
1397                 theRefLine1, theRefLine2 The referenced lines.
1398                 theName Object name; when specified, this parameter is used
1399                         for result publication in the study. Otherwise, if automatic
1400                         publication is switched on, default value is used for result name.
1401
1402             Returns:
1403                 New GEOM.GEOM_Object, containing the created point.
1404             """
1405             # Example: see GEOM_TestAll.py
1406             anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
1407             RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
1408             self._autoPublish(anObj, theName, "vertex")
1409             return anObj
1410
1411         ## Create a tangent, corresponding to the given parameter on the given curve.
1412         #  @param theRefCurve The referenced curve.
1413         #  @param theParameter Value of parameter on the referenced curve.
1414         #  @param theName Object name; when specified, this parameter is used
1415         #         for result publication in the study. Otherwise, if automatic
1416         #         publication is switched on, default value is used for result name.
1417         #
1418         #  @return New GEOM.GEOM_Object, containing the created tangent.
1419         #
1420         #  @ref swig_MakeTangentOnCurve "Example"
1421         @ManageTransactions("BasicOp")
1422         def MakeTangentOnCurve(self, theRefCurve, theParameter, theName=None):
1423             """
1424             Create a tangent, corresponding to the given parameter on the given curve.
1425
1426             Parameters:
1427                 theRefCurve The referenced curve.
1428                 theParameter Value of parameter on the referenced curve.
1429                 theName Object name; when specified, this parameter is used
1430                         for result publication in the study. Otherwise, if automatic
1431                         publication is switched on, default value is used for result name.
1432
1433             Returns:
1434                 New GEOM.GEOM_Object, containing the created tangent.
1435
1436             Example of usage:
1437                 tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7)
1438             """
1439             anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
1440             RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
1441             self._autoPublish(anObj, theName, "tangent")
1442             return anObj
1443
1444         ## Create a tangent plane, corresponding to the given parameter on the given face.
1445         #  @param theFace The face for which tangent plane should be built.
1446         #  @param theParameterV vertical value of the center point (0.0 - 1.0).
1447         #  @param theParameterU horisontal value of the center point (0.0 - 1.0).
1448         #  @param theTrimSize the size of plane.
1449         #  @param theName Object name; when specified, this parameter is used
1450         #         for result publication in the study. Otherwise, if automatic
1451         #         publication is switched on, default value is used for result name.
1452         #
1453         #  @return New GEOM.GEOM_Object, containing the created tangent.
1454         #
1455         #  @ref swig_MakeTangentPlaneOnFace "Example"
1456         @ManageTransactions("BasicOp")
1457         def MakeTangentPlaneOnFace(self, theFace, theParameterU, theParameterV, theTrimSize, theName=None):
1458             """
1459             Create a tangent plane, corresponding to the given parameter on the given face.
1460
1461             Parameters:
1462                 theFace The face for which tangent plane should be built.
1463                 theParameterV vertical value of the center point (0.0 - 1.0).
1464                 theParameterU horisontal value of the center point (0.0 - 1.0).
1465                 theTrimSize the size of plane.
1466                 theName Object name; when specified, this parameter is used
1467                         for result publication in the study. Otherwise, if automatic
1468                         publication is switched on, default value is used for result name.
1469
1470            Returns:
1471                 New GEOM.GEOM_Object, containing the created tangent.
1472
1473            Example of usage:
1474                 an_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
1475             """
1476             anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
1477             RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
1478             self._autoPublish(anObj, theName, "tangent")
1479             return anObj
1480
1481         ## Create a vector with the given components.
1482         #  @param theDX X component of the vector.
1483         #  @param theDY Y component of the vector.
1484         #  @param theDZ Z component of the vector.
1485         #  @param theName Object name; when specified, this parameter is used
1486         #         for result publication in the study. Otherwise, if automatic
1487         #         publication is switched on, default value is used for result name.
1488         #
1489         #  @return New GEOM.GEOM_Object, containing the created vector.
1490         #
1491         #  @ref tui_creation_vector "Example"
1492         @ManageTransactions("BasicOp")
1493         def MakeVectorDXDYDZ(self, theDX, theDY, theDZ, theName=None):
1494             """
1495             Create a vector with the given components.
1496
1497             Parameters:
1498                 theDX X component of the vector.
1499                 theDY Y component of the vector.
1500                 theDZ Z component of the vector.
1501                 theName Object name; when specified, this parameter is used
1502                         for result publication in the study. Otherwise, if automatic
1503                         publication is switched on, default value is used for result name.
1504
1505             Returns:
1506                 New GEOM.GEOM_Object, containing the created vector.
1507             """
1508             # Example: see GEOM_TestAll.py
1509             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
1510             anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
1511             RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
1512             anObj.SetParameters(Parameters)
1513             self._autoPublish(anObj, theName, "vector")
1514             return anObj
1515
1516         ## Create a vector between two points.
1517         #  @param thePnt1 Start point for the vector.
1518         #  @param thePnt2 End point for the vector.
1519         #  @param theName Object name; when specified, this parameter is used
1520         #         for result publication in the study. Otherwise, if automatic
1521         #         publication is switched on, default value is used for result name.
1522         #
1523         #  @return New GEOM.GEOM_Object, containing the created vector.
1524         #
1525         #  @ref tui_creation_vector "Example"
1526         @ManageTransactions("BasicOp")
1527         def MakeVector(self, thePnt1, thePnt2, theName=None):
1528             """
1529             Create a vector between two points.
1530
1531             Parameters:
1532                 thePnt1 Start point for the vector.
1533                 thePnt2 End point for the vector.
1534                 theName Object name; when specified, this parameter is used
1535                         for result publication in the study. Otherwise, if automatic
1536                         publication is switched on, default value is used for result name.
1537
1538             Returns:
1539                 New GEOM.GEOM_Object, containing the created vector.
1540             """
1541             # Example: see GEOM_TestAll.py
1542             anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
1543             RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
1544             self._autoPublish(anObj, theName, "vector")
1545             return anObj
1546
1547         ## Create a line, passing through the given point
1548         #  and parrallel to the given direction
1549         #  @param thePnt Point. The resulting line will pass through it.
1550         #  @param theDir Direction. The resulting line will be parallel to it.
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 line.
1556         #
1557         #  @ref tui_creation_line "Example"
1558         @ManageTransactions("BasicOp")
1559         def MakeLine(self, thePnt, theDir, theName=None):
1560             """
1561             Create a line, passing through the given point
1562             and parrallel to the given direction
1563
1564             Parameters:
1565                 thePnt Point. The resulting line will pass through it.
1566                 theDir Direction. The resulting line will be parallel to it.
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 line.
1573             """
1574             # Example: see GEOM_TestAll.py
1575             anObj = self.BasicOp.MakeLine(thePnt, theDir)
1576             RaiseIfFailed("MakeLine", self.BasicOp)
1577             self._autoPublish(anObj, theName, "line")
1578             return anObj
1579
1580         ## Create a line, passing through the given points
1581         #  @param thePnt1 First of two points, defining the line.
1582         #  @param thePnt2 Second of two points, defining the line.
1583         #  @param theName Object name; when specified, this parameter is used
1584         #         for result publication in the study. Otherwise, if automatic
1585         #         publication is switched on, default value is used for result name.
1586         #
1587         #  @return New GEOM.GEOM_Object, containing the created line.
1588         #
1589         #  @ref tui_creation_line "Example"
1590         @ManageTransactions("BasicOp")
1591         def MakeLineTwoPnt(self, thePnt1, thePnt2, theName=None):
1592             """
1593             Create a line, passing through the given points
1594
1595             Parameters:
1596                 thePnt1 First of two points, defining the line.
1597                 thePnt2 Second of two points, defining the line.
1598                 theName Object name; when specified, this parameter is used
1599                         for result publication in the study. Otherwise, if automatic
1600                         publication is switched on, default value is used for result name.
1601
1602             Returns:
1603                 New GEOM.GEOM_Object, containing the created line.
1604             """
1605             # Example: see GEOM_TestAll.py
1606             anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
1607             RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
1608             self._autoPublish(anObj, theName, "line")
1609             return anObj
1610
1611         ## Create a line on two faces intersection.
1612         #  @param theFace1 First of two faces, defining the line.
1613         #  @param theFace2 Second of two faces, defining the line.
1614         #  @param theName Object name; when specified, this parameter is used
1615         #         for result publication in the study. Otherwise, if automatic
1616         #         publication is switched on, default value is used for result name.
1617         #
1618         #  @return New GEOM.GEOM_Object, containing the created line.
1619         #
1620         #  @ref swig_MakeLineTwoFaces "Example"
1621         @ManageTransactions("BasicOp")
1622         def MakeLineTwoFaces(self, theFace1, theFace2, theName=None):
1623             """
1624             Create a line on two faces intersection.
1625
1626             Parameters:
1627                 theFace1 First of two faces, defining the line.
1628                 theFace2 Second of two faces, defining the line.
1629                 theName Object name; when specified, this parameter is used
1630                         for result publication in the study. Otherwise, if automatic
1631                         publication is switched on, default value is used for result name.
1632
1633             Returns:
1634                 New GEOM.GEOM_Object, containing the created line.
1635             """
1636             # Example: see GEOM_TestAll.py
1637             anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
1638             RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
1639             self._autoPublish(anObj, theName, "line")
1640             return anObj
1641
1642         ## Create a plane, passing through the given point
1643         #  and normal to the given vector.
1644         #  @param thePnt Point, the plane has to pass through.
1645         #  @param theVec Vector, defining the plane normal direction.
1646         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1647         #  @param theName Object name; when specified, this parameter is used
1648         #         for result publication in the study. Otherwise, if automatic
1649         #         publication is switched on, default value is used for result name.
1650         #
1651         #  @return New GEOM.GEOM_Object, containing the created plane.
1652         #
1653         #  @ref tui_creation_plane "Example"
1654         @ManageTransactions("BasicOp")
1655         def MakePlane(self, thePnt, theVec, theTrimSize, theName=None):
1656             """
1657             Create a plane, passing through the given point
1658             and normal to the given vector.
1659
1660             Parameters:
1661                 thePnt Point, the plane has to pass through.
1662                 theVec Vector, defining the plane normal direction.
1663                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1664                 theName Object name; when specified, this parameter is used
1665                         for result publication in the study. Otherwise, if automatic
1666                         publication is switched on, default value is used for result name.
1667
1668             Returns:
1669                 New GEOM.GEOM_Object, containing the created plane.
1670             """
1671             # Example: see GEOM_TestAll.py
1672             theTrimSize, Parameters = ParseParameters(theTrimSize);
1673             anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
1674             RaiseIfFailed("MakePlanePntVec", self.BasicOp)
1675             anObj.SetParameters(Parameters)
1676             self._autoPublish(anObj, theName, "plane")
1677             return anObj
1678
1679         ## Create a plane, passing through the three given points
1680         #  @param thePnt1 First of three points, defining the plane.
1681         #  @param thePnt2 Second of three points, defining the plane.
1682         #  @param thePnt3 Fird of three points, defining the plane.
1683         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1684         #  @param theName Object name; when specified, this parameter is used
1685         #         for result publication in the study. Otherwise, if automatic
1686         #         publication is switched on, default value is used for result name.
1687         #
1688         #  @return New GEOM.GEOM_Object, containing the created plane.
1689         #
1690         #  @ref tui_creation_plane "Example"
1691         @ManageTransactions("BasicOp")
1692         def MakePlaneThreePnt(self, thePnt1, thePnt2, thePnt3, theTrimSize, theName=None):
1693             """
1694             Create a plane, passing through the three given points
1695
1696             Parameters:
1697                 thePnt1 First of three points, defining the plane.
1698                 thePnt2 Second of three points, defining the plane.
1699                 thePnt3 Fird of three points, defining the plane.
1700                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1701                 theName Object name; when specified, this parameter is used
1702                         for result publication in the study. Otherwise, if automatic
1703                         publication is switched on, default value is used for result name.
1704
1705             Returns:
1706                 New GEOM.GEOM_Object, containing the created plane.
1707             """
1708             # Example: see GEOM_TestAll.py
1709             theTrimSize, Parameters = ParseParameters(theTrimSize);
1710             anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
1711             RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
1712             anObj.SetParameters(Parameters)
1713             self._autoPublish(anObj, theName, "plane")
1714             return anObj
1715
1716         ## Create a plane, similar to the existing one, but with another size of representing face.
1717         #  @param theFace Referenced plane or LCS(Marker).
1718         #  @param theTrimSize New half size of a side of quadrangle face, representing the plane.
1719         #  @param theName Object name; when specified, this parameter is used
1720         #         for result publication in the study. Otherwise, if automatic
1721         #         publication is switched on, default value is used for result name.
1722         #
1723         #  @return New GEOM.GEOM_Object, containing the created plane.
1724         #
1725         #  @ref tui_creation_plane "Example"
1726         @ManageTransactions("BasicOp")
1727         def MakePlaneFace(self, theFace, theTrimSize, theName=None):
1728             """
1729             Create a plane, similar to the existing one, but with another size of representing face.
1730
1731             Parameters:
1732                 theFace Referenced plane or LCS(Marker).
1733                 theTrimSize New half size of a side of quadrangle face, representing the plane.
1734                 theName Object name; when specified, this parameter is used
1735                         for result publication in the study. Otherwise, if automatic
1736                         publication is switched on, default value is used for result name.
1737
1738             Returns:
1739                 New GEOM.GEOM_Object, containing the created plane.
1740             """
1741             # Example: see GEOM_TestAll.py
1742             theTrimSize, Parameters = ParseParameters(theTrimSize);
1743             anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
1744             RaiseIfFailed("MakePlaneFace", self.BasicOp)
1745             anObj.SetParameters(Parameters)
1746             self._autoPublish(anObj, theName, "plane")
1747             return anObj
1748
1749         ## Create a plane, passing through the 2 vectors
1750         #  with center in a start point of the first vector.
1751         #  @param theVec1 Vector, defining center point and plane direction.
1752         #  @param theVec2 Vector, defining the plane normal direction.
1753         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1754         #  @param theName Object name; when specified, this parameter is used
1755         #         for result publication in the study. Otherwise, if automatic
1756         #         publication is switched on, default value is used for result name.
1757         #
1758         #  @return New GEOM.GEOM_Object, containing the created plane.
1759         #
1760         #  @ref tui_creation_plane "Example"
1761         @ManageTransactions("BasicOp")
1762         def MakePlane2Vec(self, theVec1, theVec2, theTrimSize, theName=None):
1763             """
1764             Create a plane, passing through the 2 vectors
1765             with center in a start point of the first vector.
1766
1767             Parameters:
1768                 theVec1 Vector, defining center point and plane direction.
1769                 theVec2 Vector, defining the plane normal direction.
1770                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1771                 theName Object name; when specified, this parameter is used
1772                         for result publication in the study. Otherwise, if automatic
1773                         publication is switched on, default value is used for result name.
1774
1775             Returns:
1776                 New GEOM.GEOM_Object, containing the created plane.
1777             """
1778             # Example: see GEOM_TestAll.py
1779             theTrimSize, Parameters = ParseParameters(theTrimSize);
1780             anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
1781             RaiseIfFailed("MakePlane2Vec", self.BasicOp)
1782             anObj.SetParameters(Parameters)
1783             self._autoPublish(anObj, theName, "plane")
1784             return anObj
1785
1786         ## Create a plane, based on a Local coordinate system.
1787         #  @param theLCS  coordinate system, defining plane.
1788         #  @param theTrimSize Half size of a side of quadrangle face, representing the plane.
1789         #  @param theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1790         #  @param theName Object name; when specified, this parameter is used
1791         #         for result publication in the study. Otherwise, if automatic
1792         #         publication is switched on, default value is used for result name.
1793         #
1794         #  @return New GEOM.GEOM_Object, containing the created plane.
1795         #
1796         #  @ref tui_creation_plane "Example"
1797         @ManageTransactions("BasicOp")
1798         def MakePlaneLCS(self, theLCS, theTrimSize, theOrientation, theName=None):
1799             """
1800             Create a plane, based on a Local coordinate system.
1801
1802            Parameters:
1803                 theLCS  coordinate system, defining plane.
1804                 theTrimSize Half size of a side of quadrangle face, representing the plane.
1805                 theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
1806                 theName Object name; when specified, this parameter is used
1807                         for result publication in the study. Otherwise, if automatic
1808                         publication is switched on, default value is used for result name.
1809
1810             Returns:
1811                 New GEOM.GEOM_Object, containing the created plane.
1812             """
1813             # Example: see GEOM_TestAll.py
1814             theTrimSize, Parameters = ParseParameters(theTrimSize);
1815             anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
1816             RaiseIfFailed("MakePlaneLCS", self.BasicOp)
1817             anObj.SetParameters(Parameters)
1818             self._autoPublish(anObj, theName, "plane")
1819             return anObj
1820
1821         ## Create a local coordinate system.
1822         #  @param OX,OY,OZ Three coordinates of coordinate system origin.
1823         #  @param XDX,XDY,XDZ Three components of OX direction
1824         #  @param YDX,YDY,YDZ Three components of OY direction
1825         #  @param theName Object name; when specified, this parameter is used
1826         #         for result publication in the study. Otherwise, if automatic
1827         #         publication is switched on, default value is used for result name.
1828         #
1829         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1830         #
1831         #  @ref swig_MakeMarker "Example"
1832         @ManageTransactions("BasicOp")
1833         def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, theName=None):
1834             """
1835             Create a local coordinate system.
1836
1837             Parameters:
1838                 OX,OY,OZ Three coordinates of coordinate system origin.
1839                 XDX,XDY,XDZ Three components of OX direction
1840                 YDX,YDY,YDZ Three components of OY direction
1841                 theName Object name; when specified, this parameter is used
1842                         for result publication in the study. Otherwise, if automatic
1843                         publication is switched on, default value is used for result name.
1844
1845             Returns:
1846                 New GEOM.GEOM_Object, containing the created coordinate system.
1847             """
1848             # Example: see GEOM_TestAll.py
1849             OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
1850             anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
1851             RaiseIfFailed("MakeMarker", self.BasicOp)
1852             anObj.SetParameters(Parameters)
1853             self._autoPublish(anObj, theName, "lcs")
1854             return anObj
1855
1856         ## Create a local coordinate system from shape.
1857         #  @param theShape The initial shape to detect the coordinate system.
1858         #  @param theName Object name; when specified, this parameter is used
1859         #         for result publication in the study. Otherwise, if automatic
1860         #         publication is switched on, default value is used for result name.
1861         #
1862         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1863         #
1864         #  @ref tui_creation_lcs "Example"
1865         @ManageTransactions("BasicOp")
1866         def MakeMarkerFromShape(self, theShape, theName=None):
1867             """
1868             Create a local coordinate system from shape.
1869
1870             Parameters:
1871                 theShape The initial shape to detect the coordinate system.
1872                 theName Object name; when specified, this parameter is used
1873                         for result publication in the study. Otherwise, if automatic
1874                         publication is switched on, default value is used for result name.
1875
1876             Returns:
1877                 New GEOM.GEOM_Object, containing the created coordinate system.
1878             """
1879             anObj = self.BasicOp.MakeMarkerFromShape(theShape)
1880             RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
1881             self._autoPublish(anObj, theName, "lcs")
1882             return anObj
1883
1884         ## Create a local coordinate system from point and two vectors.
1885         #  @param theOrigin Point of coordinate system origin.
1886         #  @param theXVec Vector of X direction
1887         #  @param theYVec Vector of Y direction
1888         #  @param theName Object name; when specified, this parameter is used
1889         #         for result publication in the study. Otherwise, if automatic
1890         #         publication is switched on, default value is used for result name.
1891         #
1892         #  @return New GEOM.GEOM_Object, containing the created coordinate system.
1893         #
1894         #  @ref tui_creation_lcs "Example"
1895         @ManageTransactions("BasicOp")
1896         def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec, theName=None):
1897             """
1898             Create a local coordinate system from point and two vectors.
1899
1900             Parameters:
1901                 theOrigin Point of coordinate system origin.
1902                 theXVec Vector of X direction
1903                 theYVec Vector of Y direction
1904                 theName Object name; when specified, this parameter is used
1905                         for result publication in the study. Otherwise, if automatic
1906                         publication is switched on, default value is used for result name.
1907
1908             Returns:
1909                 New GEOM.GEOM_Object, containing the created coordinate system.
1910
1911             """
1912             anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
1913             RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
1914             self._autoPublish(anObj, theName, "lcs")
1915             return anObj
1916
1917         # end of l3_basic_go
1918         ## @}
1919
1920         ## @addtogroup l4_curves
1921         ## @{
1922
1923         ##  Create an arc of circle, passing through three given points.
1924         #  @param thePnt1 Start point of the arc.
1925         #  @param thePnt2 Middle point of the arc.
1926         #  @param thePnt3 End point of the arc.
1927         #  @param theName Object name; when specified, this parameter is used
1928         #         for result publication in the study. Otherwise, if automatic
1929         #         publication is switched on, default value is used for result name.
1930         #
1931         #  @return New GEOM.GEOM_Object, containing the created arc.
1932         #
1933         #  @ref swig_MakeArc "Example"
1934         @ManageTransactions("CurvesOp")
1935         def MakeArc(self, thePnt1, thePnt2, thePnt3, theName=None):
1936             """
1937             Create an arc of circle, passing through three given points.
1938
1939             Parameters:
1940                 thePnt1 Start point of the arc.
1941                 thePnt2 Middle point of the arc.
1942                 thePnt3 End point of the arc.
1943                 theName Object name; when specified, this parameter is used
1944                         for result publication in the study. Otherwise, if automatic
1945                         publication is switched on, default value is used for result name.
1946
1947             Returns:
1948                 New GEOM.GEOM_Object, containing the created arc.
1949             """
1950             # Example: see GEOM_TestAll.py
1951             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
1952             RaiseIfFailed("MakeArc", self.CurvesOp)
1953             self._autoPublish(anObj, theName, "arc")
1954             return anObj
1955
1956         ##  Create an arc of circle from a center and 2 points.
1957         #  @param thePnt1 Center of the arc
1958         #  @param thePnt2 Start point of the arc. (Gives also the radius of the arc)
1959         #  @param thePnt3 End point of the arc (Gives also a direction)
1960         #  @param theSense Orientation of the arc
1961         #  @param theName Object name; when specified, this parameter is used
1962         #         for result publication in the study. Otherwise, if automatic
1963         #         publication is switched on, default value is used for result name.
1964         #
1965         #  @return New GEOM.GEOM_Object, containing the created arc.
1966         #
1967         #  @ref swig_MakeArc "Example"
1968         @ManageTransactions("CurvesOp")
1969         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False, theName=None):
1970             """
1971             Create an arc of circle from a center and 2 points.
1972
1973             Parameters:
1974                 thePnt1 Center of the arc
1975                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
1976                 thePnt3 End point of the arc (Gives also a direction)
1977                 theSense Orientation of the arc
1978                 theName Object name; when specified, this parameter is used
1979                         for result publication in the study. Otherwise, if automatic
1980                         publication is switched on, default value is used for result name.
1981
1982             Returns:
1983                 New GEOM.GEOM_Object, containing the created arc.
1984             """
1985             # Example: see GEOM_TestAll.py
1986             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
1987             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
1988             self._autoPublish(anObj, theName, "arc")
1989             return anObj
1990
1991         ##  Create an arc of ellipse, of center and two points.
1992         #  @param theCenter Center of the arc.
1993         #  @param thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
1994         #  @param thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
1995         #  @param theName Object name; when specified, this parameter is used
1996         #         for result publication in the study. Otherwise, if automatic
1997         #         publication is switched on, default value is used for result name.
1998         #
1999         #  @return New GEOM.GEOM_Object, containing the created arc.
2000         #
2001         #  @ref swig_MakeArc "Example"
2002         @ManageTransactions("CurvesOp")
2003         def MakeArcOfEllipse(self, theCenter, thePnt1, thePnt2, theName=None):
2004             """
2005             Create an arc of ellipse, of center and two points.
2006
2007             Parameters:
2008                 theCenter Center of the arc.
2009                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
2010                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
2011                 theName Object name; when specified, this parameter is used
2012                         for result publication in the study. Otherwise, if automatic
2013                         publication is switched on, default value is used for result name.
2014
2015             Returns:
2016                 New GEOM.GEOM_Object, containing the created arc.
2017             """
2018             # Example: see GEOM_TestAll.py
2019             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
2020             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
2021             self._autoPublish(anObj, theName, "arc")
2022             return anObj
2023
2024         ## Create a circle with given center, normal vector and radius.
2025         #  @param thePnt Circle center.
2026         #  @param theVec Vector, normal to the plane of the circle.
2027         #  @param theR Circle radius.
2028         #  @param theName Object name; when specified, this parameter is used
2029         #         for result publication in the study. Otherwise, if automatic
2030         #         publication is switched on, default value is used for result name.
2031         #
2032         #  @return New GEOM.GEOM_Object, containing the created circle.
2033         #
2034         #  @ref tui_creation_circle "Example"
2035         @ManageTransactions("CurvesOp")
2036         def MakeCircle(self, thePnt, theVec, theR, theName=None):
2037             """
2038             Create a circle with given center, normal vector and radius.
2039
2040             Parameters:
2041                 thePnt Circle center.
2042                 theVec Vector, normal to the plane of the circle.
2043                 theR Circle radius.
2044                 theName Object name; when specified, this parameter is used
2045                         for result publication in the study. Otherwise, if automatic
2046                         publication is switched on, default value is used for result name.
2047
2048             Returns:
2049                 New GEOM.GEOM_Object, containing the created circle.
2050             """
2051             # Example: see GEOM_TestAll.py
2052             theR, Parameters = ParseParameters(theR)
2053             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
2054             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2055             anObj.SetParameters(Parameters)
2056             self._autoPublish(anObj, theName, "circle")
2057             return anObj
2058
2059         ## Create a circle with given radius.
2060         #  Center of the circle will be in the origin of global
2061         #  coordinate system and normal vector will be codirected with Z axis
2062         #  @param theR Circle radius.
2063         #  @param theName Object name; when specified, this parameter is used
2064         #         for result publication in the study. Otherwise, if automatic
2065         #         publication is switched on, default value is used for result name.
2066         #
2067         #  @return New GEOM.GEOM_Object, containing the created circle.
2068         @ManageTransactions("CurvesOp")
2069         def MakeCircleR(self, theR, theName=None):
2070             """
2071             Create a circle with given radius.
2072             Center of the circle will be in the origin of global
2073             coordinate system and normal vector will be codirected with Z axis
2074
2075             Parameters:
2076                 theR Circle radius.
2077                 theName Object name; when specified, this parameter is used
2078                         for result publication in the study. Otherwise, if automatic
2079                         publication is switched on, default value is used for result name.
2080
2081             Returns:
2082                 New GEOM.GEOM_Object, containing the created circle.
2083             """
2084             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
2085             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
2086             self._autoPublish(anObj, theName, "circle")
2087             return anObj
2088
2089         ## Create a circle, passing through three given points
2090         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2091         #  @param theName Object name; when specified, this parameter is used
2092         #         for result publication in the study. Otherwise, if automatic
2093         #         publication is switched on, default value is used for result name.
2094         #
2095         #  @return New GEOM.GEOM_Object, containing the created circle.
2096         #
2097         #  @ref tui_creation_circle "Example"
2098         @ManageTransactions("CurvesOp")
2099         def MakeCircleThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2100             """
2101             Create a circle, passing through three given points
2102
2103             Parameters:
2104                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2105                 theName Object name; when specified, this parameter is used
2106                         for result publication in the study. Otherwise, if automatic
2107                         publication is switched on, default value is used for result name.
2108
2109             Returns:
2110                 New GEOM.GEOM_Object, containing the created circle.
2111             """
2112             # Example: see GEOM_TestAll.py
2113             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
2114             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
2115             self._autoPublish(anObj, theName, "circle")
2116             return anObj
2117
2118         ## Create a circle, with given point1 as center,
2119         #  passing through the point2 as radius and laying in the plane,
2120         #  defined by all three given points.
2121         #  @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
2122         #  @param theName Object name; when specified, this parameter is used
2123         #         for result publication in the study. Otherwise, if automatic
2124         #         publication is switched on, default value is used for result name.
2125         #
2126         #  @return New GEOM.GEOM_Object, containing the created circle.
2127         #
2128         #  @ref swig_MakeCircle "Example"
2129         @ManageTransactions("CurvesOp")
2130         def MakeCircleCenter2Pnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2131             """
2132             Create a circle, with given point1 as center,
2133             passing through the point2 as radius and laying in the plane,
2134             defined by all three given points.
2135
2136             Parameters:
2137                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
2138                 theName Object name; when specified, this parameter is used
2139                         for result publication in the study. Otherwise, if automatic
2140                         publication is switched on, default value is used for result name.
2141
2142             Returns:
2143                 New GEOM.GEOM_Object, containing the created circle.
2144             """
2145             # Example: see GEOM_example6.py
2146             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
2147             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
2148             self._autoPublish(anObj, theName, "circle")
2149             return anObj
2150
2151         ## Create an ellipse with given center, normal vector and radiuses.
2152         #  @param thePnt Ellipse center.
2153         #  @param theVec Vector, normal to the plane of the ellipse.
2154         #  @param theRMajor Major ellipse radius.
2155         #  @param theRMinor Minor ellipse radius.
2156         #  @param theVecMaj Vector, direction of the ellipse's main axis.
2157         #  @param theName Object name; when specified, this parameter is used
2158         #         for result publication in the study. Otherwise, if automatic
2159         #         publication is switched on, default value is used for result name.
2160         #
2161         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2162         #
2163         #  @ref tui_creation_ellipse "Example"
2164         @ManageTransactions("CurvesOp")
2165         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None, theName=None):
2166             """
2167             Create an ellipse with given center, normal vector and radiuses.
2168
2169             Parameters:
2170                 thePnt Ellipse center.
2171                 theVec Vector, normal to the plane of the ellipse.
2172                 theRMajor Major ellipse radius.
2173                 theRMinor Minor ellipse radius.
2174                 theVecMaj Vector, direction of the ellipse's main axis.
2175                 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             Returns:
2180                 New GEOM.GEOM_Object, containing the created ellipse.
2181             """
2182             # Example: see GEOM_TestAll.py
2183             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
2184             if theVecMaj is not None:
2185                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
2186             else:
2187                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
2188                 pass
2189             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2190             anObj.SetParameters(Parameters)
2191             self._autoPublish(anObj, theName, "ellipse")
2192             return anObj
2193
2194         ## Create an ellipse with given radiuses.
2195         #  Center of the ellipse will be in the origin of global
2196         #  coordinate system and normal vector will be codirected with Z axis
2197         #  @param theRMajor Major ellipse radius.
2198         #  @param theRMinor Minor ellipse radius.
2199         #  @param theName Object name; when specified, this parameter is used
2200         #         for result publication in the study. Otherwise, if automatic
2201         #         publication is switched on, default value is used for result name.
2202         #
2203         #  @return New GEOM.GEOM_Object, containing the created ellipse.
2204         @ManageTransactions("CurvesOp")
2205         def MakeEllipseRR(self, theRMajor, theRMinor, theName=None):
2206             """
2207             Create an ellipse with given radiuses.
2208             Center of the ellipse will be in the origin of global
2209             coordinate system and normal vector will be codirected with Z axis
2210
2211             Parameters:
2212                 theRMajor Major ellipse radius.
2213                 theRMinor Minor ellipse radius.
2214                 theName Object name; when specified, this parameter is used
2215                         for result publication in the study. Otherwise, if automatic
2216                         publication is switched on, default value is used for result name.
2217
2218             Returns:
2219             New GEOM.GEOM_Object, containing the created ellipse.
2220             """
2221             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
2222             RaiseIfFailed("MakeEllipse", self.CurvesOp)
2223             self._autoPublish(anObj, theName, "ellipse")
2224             return anObj
2225
2226         ## Create a polyline on the set of points.
2227         #  @param thePoints Sequence of points for the polyline.
2228         #  @param theIsClosed If True, build a closed wire.
2229         #  @param theName Object name; when specified, this parameter is used
2230         #         for result publication in the study. Otherwise, if automatic
2231         #         publication is switched on, default value is used for result name.
2232         #
2233         #  @return New GEOM.GEOM_Object, containing the created polyline.
2234         #
2235         #  @ref tui_creation_curve "Example"
2236         @ManageTransactions("CurvesOp")
2237         def MakePolyline(self, thePoints, theIsClosed=False, theName=None):
2238             """
2239             Create a polyline on the set of points.
2240
2241             Parameters:
2242                 thePoints Sequence of points for the polyline.
2243                 theIsClosed If True, build a closed wire.
2244                 theName Object name; when specified, this parameter is used
2245                         for result publication in the study. Otherwise, if automatic
2246                         publication is switched on, default value is used for result name.
2247
2248             Returns:
2249                 New GEOM.GEOM_Object, containing the created polyline.
2250             """
2251             # Example: see GEOM_TestAll.py
2252             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
2253             RaiseIfFailed("MakePolyline", self.CurvesOp)
2254             self._autoPublish(anObj, theName, "polyline")
2255             return anObj
2256
2257         ## Create bezier curve on the set of points.
2258         #  @param thePoints Sequence of points for the bezier curve.
2259         #  @param theIsClosed If True, build a closed curve.
2260         #  @param theName Object name; when specified, this parameter is used
2261         #         for result publication in the study. Otherwise, if automatic
2262         #         publication is switched on, default value is used for result name.
2263         #
2264         #  @return New GEOM.GEOM_Object, containing the created bezier curve.
2265         #
2266         #  @ref tui_creation_curve "Example"
2267         @ManageTransactions("CurvesOp")
2268         def MakeBezier(self, thePoints, theIsClosed=False, theName=None):
2269             """
2270             Create bezier curve on the set of points.
2271
2272             Parameters:
2273                 thePoints Sequence of points for the bezier curve.
2274                 theIsClosed If True, build a closed curve.
2275                 theName Object name; when specified, this parameter is used
2276                         for result publication in the study. Otherwise, if automatic
2277                         publication is switched on, default value is used for result name.
2278
2279             Returns:
2280                 New GEOM.GEOM_Object, containing the created bezier curve.
2281             """
2282             # Example: see GEOM_TestAll.py
2283             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
2284             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
2285             self._autoPublish(anObj, theName, "bezier")
2286             return anObj
2287
2288         ## Create B-Spline curve on the set of points.
2289         #  @param thePoints Sequence of points for the B-Spline curve.
2290         #  @param theIsClosed If True, build a closed curve.
2291         #  @param theDoReordering If TRUE, the algo does not follow the order of
2292         #                         \a thePoints but searches for the closest vertex.
2293         #  @param theName Object name; when specified, this parameter is used
2294         #         for result publication in the study. Otherwise, if automatic
2295         #         publication is switched on, default value is used for result name.
2296         #
2297         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2298         #
2299         #  @ref tui_creation_curve "Example"
2300         @ManageTransactions("CurvesOp")
2301         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False, theName=None):
2302             """
2303             Create B-Spline curve on the set of points.
2304
2305             Parameters:
2306                 thePoints Sequence of points for the B-Spline curve.
2307                 theIsClosed If True, build a closed curve.
2308                 theDoReordering If True, the algo does not follow the order of
2309                                 thePoints but searches for the closest vertex.
2310                 theName Object name; when specified, this parameter is used
2311                         for result publication in the study. Otherwise, if automatic
2312                         publication is switched on, default value is used for result name.
2313
2314             Returns:
2315                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2316             """
2317             # Example: see GEOM_TestAll.py
2318             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
2319             RaiseIfFailed("MakeInterpol", self.CurvesOp)
2320             self._autoPublish(anObj, theName, "bspline")
2321             return anObj
2322
2323         ## Create B-Spline curve on the set of points.
2324         #  @param thePoints Sequence of points for the B-Spline curve.
2325         #  @param theFirstVec Vector object, defining the curve direction at its first point.
2326         #  @param theLastVec Vector object, defining the curve direction at its last point.
2327         #  @param theName Object name; when specified, this parameter is used
2328         #         for result publication in the study. Otherwise, if automatic
2329         #         publication is switched on, default value is used for result name.
2330         #
2331         #  @return New GEOM.GEOM_Object, containing the created B-Spline curve.
2332         #
2333         #  @ref tui_creation_curve "Example"
2334         @ManageTransactions("CurvesOp")
2335         def MakeInterpolWithTangents(self, thePoints, theFirstVec, theLastVec, theName=None):
2336             """
2337             Create B-Spline curve on the set of points.
2338
2339             Parameters:
2340                 thePoints Sequence of points for the B-Spline curve.
2341                 theFirstVec Vector object, defining the curve direction at its first point.
2342                 theLastVec Vector object, defining the curve direction at its last point.
2343                 theName Object name; when specified, this parameter is used
2344                         for result publication in the study. Otherwise, if automatic
2345                         publication is switched on, default value is used for result name.
2346
2347             Returns:
2348                 New GEOM.GEOM_Object, containing the created B-Spline curve.
2349             """
2350             # Example: see GEOM_TestAll.py
2351             anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
2352             RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
2353             self._autoPublish(anObj, theName, "bspline")
2354             return anObj
2355
2356         ## Creates a curve using the parametric definition of the basic points.
2357         #  @param thexExpr parametric equation of the coordinates X.
2358         #  @param theyExpr parametric equation of the coordinates Y.
2359         #  @param thezExpr parametric equation of the coordinates Z.
2360         #  @param theParamMin the minimal value of the parameter.
2361         #  @param theParamMax the maximum value of the parameter.
2362         #  @param theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2363         #  @param theCurveType the type of the curve,
2364         #         one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2365         #  @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.
2366         #  @param theName Object name; when specified, this parameter is used
2367         #         for result publication in the study. Otherwise, if automatic
2368         #         publication is switched on, default value is used for result name.
2369         #
2370         #  @return New GEOM.GEOM_Object, containing the created curve.
2371         #
2372         #  @ref tui_creation_curve "Example"
2373         @ManageTransactions("CurvesOp")
2374         def MakeCurveParametric(self, thexExpr, theyExpr, thezExpr,
2375                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False, theName=None ):
2376             """
2377             Creates a curve using the parametric definition of the basic points.
2378
2379             Parameters:
2380                 thexExpr parametric equation of the coordinates X.
2381                 theyExpr parametric equation of the coordinates Y.
2382                 thezExpr parametric equation of the coordinates Z.
2383                 theParamMin the minimal value of the parameter.
2384                 theParamMax the maximum value of the parameter.
2385                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
2386                 theCurveType the type of the curve,
2387                              one of GEOM.Polyline, GEOM.Bezier, GEOM.Interpolation.
2388                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
2389                              method is used which can lead to a bug.
2390                 theName Object name; when specified, this parameter is used
2391                         for result publication in the study. Otherwise, if automatic
2392                         publication is switched on, default value is used for result name.
2393
2394             Returns:
2395                 New GEOM.GEOM_Object, containing the created curve.
2396             """
2397             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
2398             if theNewMethod:
2399               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2400             else:
2401               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
2402             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
2403             anObj.SetParameters(Parameters)
2404             self._autoPublish(anObj, theName, "curve")
2405             return anObj
2406
2407         ## Create an isoline curve on a face.
2408         #  @param theFace the face for which an isoline is created.
2409         #  @param IsUIsoline True for U-isoline creation; False for V-isoline
2410         #         creation.
2411         #  @param theParameter the U parameter for U-isoline or V parameter
2412         #         for V-isoline.
2413         #  @param theName Object name; when specified, this parameter is used
2414         #         for result publication in the study. Otherwise, if automatic
2415         #         publication is switched on, default value is used for result name.
2416         #
2417         #  @return New GEOM.GEOM_Object, containing the created isoline edge or
2418         #          a compound of edges.
2419         #
2420         #  @ref tui_creation_curve "Example"
2421         @ManageTransactions("CurvesOp")
2422         def MakeIsoline(self, theFace, IsUIsoline, theParameter, theName=None):
2423             """
2424             Create an isoline curve on a face.
2425
2426             Parameters:
2427                 theFace the face for which an isoline is created.
2428                 IsUIsoline True for U-isoline creation; False for V-isoline
2429                            creation.
2430                 theParameter the U parameter for U-isoline or V parameter
2431                              for V-isoline.
2432                 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             Returns:
2437                 New GEOM.GEOM_Object, containing the created isoline edge or a
2438                 compound of edges.
2439             """
2440             # Example: see GEOM_TestAll.py
2441             anObj = self.CurvesOp.MakeIsoline(theFace, IsUIsoline, theParameter)
2442             RaiseIfFailed("MakeIsoline", self.CurvesOp)
2443             if IsUIsoline:
2444                 self._autoPublish(anObj, theName, "U-Isoline")
2445             else:
2446                 self._autoPublish(anObj, theName, "V-Isoline")
2447             return anObj
2448
2449         # end of l4_curves
2450         ## @}
2451
2452         ## @addtogroup l3_sketcher
2453         ## @{
2454
2455         ## Create a sketcher (wire or face), following the textual description,
2456         #  passed through <VAR>theCommand</VAR> argument. \n
2457         #  Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n
2458         #  Format of the description string have to be the following:
2459         #
2460         #  "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2461         #
2462         #  Where:
2463         #  - x1, y1 are coordinates of the first sketcher point (zero by default),
2464         #  - CMD is one of
2465         #     - "R angle" : Set the direction by angle
2466         #     - "D dx dy" : Set the direction by DX & DY
2467         #     .
2468         #       \n
2469         #     - "TT x y" : Create segment by point at X & Y
2470         #     - "T dx dy" : Create segment by point with DX & DY
2471         #     - "L length" : Create segment by direction & Length
2472         #     - "IX x" : Create segment by direction & Intersect. X
2473         #     - "IY y" : Create segment by direction & Intersect. Y
2474         #     .
2475         #       \n
2476         #     - "C radius length" : Create arc by direction, radius and length(in degree)
2477         #     - "AA x y": Create arc by point at X & Y
2478         #     - "A dx dy" : Create arc by point with DX & DY
2479         #     - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2480         #     - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2481         #     - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2482         #     - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2483         #     .
2484         #       \n
2485         #     - "WW" : Close Wire (to finish)
2486         #     - "WF" : Close Wire and build face (to finish)
2487         #     .
2488         #        \n
2489         #  - Flag1 (= reverse) is 0 or 2 ...
2490         #     - if 0 the drawn arc is the one of lower angle (< Pi)
2491         #     - if 2 the drawn arc ius the one of greater angle (> Pi)
2492         #     .
2493         #        \n
2494         #  - Flag2 (= control tolerance) is 0 or 1 ...
2495         #     - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2496         #     - if 1 the wire is built only if the end point is on the arc
2497         #       with a tolerance of 10^-7 on the distance else the creation fails
2498         #
2499         #  @param theCommand String, defining the sketcher in local
2500         #                    coordinates of the working plane.
2501         #  @param theWorkingPlane Nine double values, defining origin,
2502         #                         OZ and OX directions of the working plane.
2503         #  @param theName Object name; when specified, this parameter is used
2504         #         for result publication in the study. Otherwise, if automatic
2505         #         publication is switched on, default value is used for result name.
2506         #
2507         #  @return New GEOM.GEOM_Object, containing the created wire.
2508         #
2509         #  @ref tui_sketcher_page "Example"
2510         @ManageTransactions("CurvesOp")
2511         def MakeSketcher(self, theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0], theName=None):
2512             """
2513             Create a sketcher (wire or face), following the textual description, passed
2514             through theCommand argument.
2515             Edges of the resulting wire or face will be arcs of circles and/or linear segments.
2516             Format of the description string have to be the following:
2517                 "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]"
2518             Where:
2519             - x1, y1 are coordinates of the first sketcher point (zero by default),
2520             - CMD is one of
2521                - "R angle" : Set the direction by angle
2522                - "D dx dy" : Set the direction by DX & DY
2523
2524                - "TT x y" : Create segment by point at X & Y
2525                - "T dx dy" : Create segment by point with DX & DY
2526                - "L length" : Create segment by direction & Length
2527                - "IX x" : Create segment by direction & Intersect. X
2528                - "IY y" : Create segment by direction & Intersect. Y
2529
2530                - "C radius length" : Create arc by direction, radius and length(in degree)
2531                - "AA x y": Create arc by point at X & Y
2532                - "A dx dy" : Create arc by point with DX & DY
2533                - "UU x y radius flag1": Create arc by point at X & Y with given radiUs
2534                - "U dx dy radius flag1" : Create arc by point with DX & DY with given radiUs
2535                - "EE x y xc yc flag1 flag2": Create arc by point at X & Y with given cEnter coordinates
2536                - "E dx dy dxc dyc radius flag1 flag2" : Create arc by point with DX & DY with given cEnter coordinates
2537
2538                - "WW" : Close Wire (to finish)
2539                - "WF" : Close Wire and build face (to finish)
2540
2541             - Flag1 (= reverse) is 0 or 2 ...
2542                - if 0 the drawn arc is the one of lower angle (< Pi)
2543                - if 2 the drawn arc ius the one of greater angle (> Pi)
2544
2545             - Flag2 (= control tolerance) is 0 or 1 ...
2546                - if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
2547                - if 1 the wire is built only if the end point is on the arc
2548                  with a tolerance of 10^-7 on the distance else the creation fails
2549
2550             Parameters:
2551                 theCommand String, defining the sketcher in local
2552                            coordinates of the working plane.
2553                 theWorkingPlane Nine double values, defining origin,
2554                                 OZ and OX directions of the working plane.
2555                 theName Object name; when specified, this parameter is used
2556                         for result publication in the study. Otherwise, if automatic
2557                         publication is switched on, default value is used for result name.
2558
2559             Returns:
2560                 New GEOM.GEOM_Object, containing the created wire.
2561             """
2562             # Example: see GEOM_TestAll.py
2563             theCommand,Parameters = ParseSketcherCommand(theCommand)
2564             anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
2565             RaiseIfFailed("MakeSketcher", self.CurvesOp)
2566             anObj.SetParameters(Parameters)
2567             self._autoPublish(anObj, theName, "wire")
2568             return anObj
2569
2570         ## Create a sketcher (wire or face), following the textual description,
2571         #  passed through <VAR>theCommand</VAR> argument. \n
2572         #  For format of the description string see MakeSketcher() method.\n
2573         #  @param theCommand String, defining the sketcher in local
2574         #                    coordinates of the working plane.
2575         #  @param theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2576         #  @param theName Object name; when specified, this parameter is used
2577         #         for result publication in the study. Otherwise, if automatic
2578         #         publication is switched on, default value is used for result name.
2579         #
2580         #  @return New GEOM.GEOM_Object, containing the created wire.
2581         #
2582         #  @ref tui_sketcher_page "Example"
2583         @ManageTransactions("CurvesOp")
2584         def MakeSketcherOnPlane(self, theCommand, theWorkingPlane, theName=None):
2585             """
2586             Create a sketcher (wire or face), following the textual description,
2587             passed through theCommand argument.
2588             For format of the description string see geompy.MakeSketcher() method.
2589
2590             Parameters:
2591                 theCommand String, defining the sketcher in local
2592                            coordinates of the working plane.
2593                 theWorkingPlane Planar Face or LCS(Marker) of the working plane.
2594                 theName Object name; when specified, this parameter is used
2595                         for result publication in the study. Otherwise, if automatic
2596                         publication is switched on, default value is used for result name.
2597
2598             Returns:
2599                 New GEOM.GEOM_Object, containing the created wire.
2600             """
2601             theCommand,Parameters = ParseSketcherCommand(theCommand)
2602             anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
2603             RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
2604             anObj.SetParameters(Parameters)
2605             self._autoPublish(anObj, theName, "wire")
2606             return anObj
2607
2608         ## Obtain a 2D sketcher interface
2609         #  @return An instance of @ref gsketcher.Sketcher2D "Sketcher2D" interface
2610         def Sketcher2D (self):
2611             """
2612             Obtain a 2D sketcher interface.
2613
2614             Example of usage:
2615                sk = geompy.Sketcher2D()
2616                sk.addPoint(20, 20)
2617                sk.addSegmentRelative(15, 70)
2618                sk.addSegmentPerpY(50)
2619                sk.addArcRadiusRelative(25, 15, 14.5, 0)
2620                sk.addArcCenterAbsolute(1, 1, 50, 50, 0, 0)
2621                sk.addArcDirectionRadiusLength(20, 20, 101, 162.13)
2622                sk.close()
2623                Sketch_1 = sk.wire(geomObj_1)
2624             """
2625             sk = Sketcher2D (self)
2626             return sk
2627
2628         ## Create a sketcher wire, following the numerical description,
2629         #  passed through <VAR>theCoordinates</VAR> argument. \n
2630         #  @param theCoordinates double values, defining points to create a wire,
2631         #                                                      passing from it.
2632         #  @param theName Object name; when specified, this parameter is used
2633         #         for result publication in the study. Otherwise, if automatic
2634         #         publication is switched on, default value is used for result name.
2635         #
2636         #  @return New GEOM.GEOM_Object, containing the created wire.
2637         #
2638         #  @ref tui_3dsketcher_page "Example"
2639         @ManageTransactions("CurvesOp")
2640         def Make3DSketcher(self, theCoordinates, theName=None):
2641             """
2642             Create a sketcher wire, following the numerical description,
2643             passed through theCoordinates argument.
2644
2645             Parameters:
2646                 theCoordinates double values, defining points to create a wire,
2647                                passing from it.
2648                 theName Object name; when specified, this parameter is used
2649                         for result publication in the study. Otherwise, if automatic
2650                         publication is switched on, default value is used for result name.
2651
2652             Returns:
2653                 New GEOM_Object, containing the created wire.
2654             """
2655             theCoordinates,Parameters = ParseParameters(theCoordinates)
2656             anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
2657             RaiseIfFailed("Make3DSketcher", self.CurvesOp)
2658             anObj.SetParameters(Parameters)
2659             self._autoPublish(anObj, theName, "wire")
2660             return anObj
2661
2662         ## Obtain a 3D sketcher interface
2663         #  @return An instance of @ref gsketcher.Sketcher3D "Sketcher3D" interface
2664         #
2665         #  @ref tui_3dsketcher_page "Example"
2666         def Sketcher3D (self):
2667             """
2668             Obtain a 3D sketcher interface.
2669
2670             Example of usage:
2671                 sk = geompy.Sketcher3D()
2672                 sk.addPointsAbsolute(0,0,0, 70,0,0)
2673                 sk.addPointsRelative(0, 0, 130)
2674                 sk.addPointAnglesLength("OXY", 50, 0, 100)
2675                 sk.addPointAnglesLength("OXZ", 30, 80, 130)
2676                 sk.close()
2677                 a3D_Sketcher_1 = sk.wire()
2678             """
2679             sk = Sketcher3D (self)
2680             return sk
2681
2682         # end of l3_sketcher
2683         ## @}
2684
2685         ## @addtogroup l3_3d_primitives
2686         ## @{
2687
2688         ## Create a box by coordinates of two opposite vertices.
2689         #
2690         #  @param x1,y1,z1 double values, defining first point it.
2691         #  @param x2,y2,z2 double values, defining first point it.
2692         #  @param theName Object name; when specified, this parameter is used
2693         #         for result publication in the study. Otherwise, if automatic
2694         #         publication is switched on, default value is used for result name.
2695         #
2696         #  @return New GEOM.GEOM_Object, containing the created box.
2697         #
2698         #  @ref tui_creation_box "Example"
2699         def MakeBox(self, x1, y1, z1, x2, y2, z2, theName=None):
2700             """
2701             Create a box by coordinates of two opposite vertices.
2702
2703             Parameters:
2704                 x1,y1,z1 double values, defining first point.
2705                 x2,y2,z2 double values, defining second point.
2706                 theName Object name; when specified, this parameter is used
2707                         for result publication in the study. Otherwise, if automatic
2708                         publication is switched on, default value is used for result name.
2709
2710             Returns:
2711                 New GEOM.GEOM_Object, containing the created box.
2712             """
2713             # Example: see GEOM_TestAll.py
2714             pnt1 = self.MakeVertex(x1,y1,z1)
2715             pnt2 = self.MakeVertex(x2,y2,z2)
2716             # note: auto-publishing is done in self.MakeBoxTwoPnt()
2717             return self.MakeBoxTwoPnt(pnt1, pnt2, theName)
2718
2719         ## Create a box with specified dimensions along the coordinate axes
2720         #  and with edges, parallel to the coordinate axes.
2721         #  Center of the box will be at point (DX/2, DY/2, DZ/2).
2722         #  @param theDX Length of Box edges, parallel to OX axis.
2723         #  @param theDY Length of Box edges, parallel to OY axis.
2724         #  @param theDZ Length of Box edges, parallel to OZ axis.
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 box.
2730         #
2731         #  @ref tui_creation_box "Example"
2732         @ManageTransactions("PrimOp")
2733         def MakeBoxDXDYDZ(self, theDX, theDY, theDZ, theName=None):
2734             """
2735             Create a box with specified dimensions along the coordinate axes
2736             and with edges, parallel to the coordinate axes.
2737             Center of the box will be at point (DX/2, DY/2, DZ/2).
2738
2739             Parameters:
2740                 theDX Length of Box edges, parallel to OX axis.
2741                 theDY Length of Box edges, parallel to OY axis.
2742                 theDZ Length of Box edges, parallel to OZ axis.
2743                 theName Object name; when specified, this parameter is used
2744                         for result publication in the study. Otherwise, if automatic
2745                         publication is switched on, default value is used for result name.
2746
2747             Returns:
2748                 New GEOM.GEOM_Object, containing the created box.
2749             """
2750             # Example: see GEOM_TestAll.py
2751             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
2752             anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
2753             RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
2754             anObj.SetParameters(Parameters)
2755             self._autoPublish(anObj, theName, "box")
2756             return anObj
2757
2758         ## Create a box with two specified opposite vertices,
2759         #  and with edges, parallel to the coordinate axes
2760         #  @param thePnt1 First of two opposite vertices.
2761         #  @param thePnt2 Second of two opposite vertices.
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 box.
2767         #
2768         #  @ref tui_creation_box "Example"
2769         @ManageTransactions("PrimOp")
2770         def MakeBoxTwoPnt(self, thePnt1, thePnt2, theName=None):
2771             """
2772             Create a box with two specified opposite vertices,
2773             and with edges, parallel to the coordinate axes
2774
2775             Parameters:
2776                 thePnt1 First of two opposite vertices.
2777                 thePnt2 Second of two opposite vertices.
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 box.
2784             """
2785             # Example: see GEOM_TestAll.py
2786             anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
2787             RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
2788             self._autoPublish(anObj, theName, "box")
2789             return anObj
2790
2791         ## Create a face with specified dimensions with edges parallel to coordinate axes.
2792         #  @param theH height of Face.
2793         #  @param theW width of Face.
2794         #  @param theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2795         #  @param theName Object name; when specified, this parameter is used
2796         #         for result publication in the study. Otherwise, if automatic
2797         #         publication is switched on, default value is used for result name.
2798         #
2799         #  @return New GEOM.GEOM_Object, containing the created face.
2800         #
2801         #  @ref tui_creation_face "Example"
2802         @ManageTransactions("PrimOp")
2803         def MakeFaceHW(self, theH, theW, theOrientation, theName=None):
2804             """
2805             Create a face with specified dimensions with edges parallel to coordinate axes.
2806
2807             Parameters:
2808                 theH height of Face.
2809                 theW width of Face.
2810                 theOrientation face orientation: 1-OXY, 2-OYZ, 3-OZX
2811                 theName Object name; when specified, this parameter is used
2812                         for result publication in the study. Otherwise, if automatic
2813                         publication is switched on, default value is used for result name.
2814
2815             Returns:
2816                 New GEOM.GEOM_Object, containing the created face.
2817             """
2818             # Example: see GEOM_TestAll.py
2819             theH,theW,Parameters = ParseParameters(theH, theW)
2820             anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
2821             RaiseIfFailed("MakeFaceHW", self.PrimOp)
2822             anObj.SetParameters(Parameters)
2823             self._autoPublish(anObj, theName, "rectangle")
2824             return anObj
2825
2826         ## Create a face from another plane and two sizes,
2827         #  vertical size and horisontal size.
2828         #  @param theObj   Normale vector to the creating face or
2829         #  the face object.
2830         #  @param theH     Height (vertical size).
2831         #  @param theW     Width (horisontal size).
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 face.
2837         #
2838         #  @ref tui_creation_face "Example"
2839         @ManageTransactions("PrimOp")
2840         def MakeFaceObjHW(self, theObj, theH, theW, theName=None):
2841             """
2842             Create a face from another plane and two sizes,
2843             vertical size and horisontal size.
2844
2845             Parameters:
2846                 theObj   Normale vector to the creating face or
2847                          the face object.
2848                 theH     Height (vertical size).
2849                 theW     Width (horisontal size).
2850                 theName Object name; when specified, this parameter is used
2851                         for result publication in the study. Otherwise, if automatic
2852                         publication is switched on, default value is used for result name.
2853
2854             Returns:
2855                 New GEOM_Object, containing the created face.
2856             """
2857             # Example: see GEOM_TestAll.py
2858             theH,theW,Parameters = ParseParameters(theH, theW)
2859             anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
2860             RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
2861             anObj.SetParameters(Parameters)
2862             self._autoPublish(anObj, theName, "rectangle")
2863             return anObj
2864
2865         ## Create a disk with given center, normal vector and radius.
2866         #  @param thePnt Disk center.
2867         #  @param theVec Vector, normal to the plane of the disk.
2868         #  @param theR Disk radius.
2869         #  @param theName Object name; when specified, this parameter is used
2870         #         for result publication in the study. Otherwise, if automatic
2871         #         publication is switched on, default value is used for result name.
2872         #
2873         #  @return New GEOM.GEOM_Object, containing the created disk.
2874         #
2875         #  @ref tui_creation_disk "Example"
2876         @ManageTransactions("PrimOp")
2877         def MakeDiskPntVecR(self, thePnt, theVec, theR, theName=None):
2878             """
2879             Create a disk with given center, normal vector and radius.
2880
2881             Parameters:
2882                 thePnt Disk center.
2883                 theVec Vector, normal to the plane of the disk.
2884                 theR Disk radius.
2885                 theName Object name; when specified, this parameter is used
2886                         for result publication in the study. Otherwise, if automatic
2887                         publication is switched on, default value is used for result name.
2888
2889             Returns:
2890                 New GEOM.GEOM_Object, containing the created disk.
2891             """
2892             # Example: see GEOM_TestAll.py
2893             theR,Parameters = ParseParameters(theR)
2894             anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
2895             RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
2896             anObj.SetParameters(Parameters)
2897             self._autoPublish(anObj, theName, "disk")
2898             return anObj
2899
2900         ## Create a disk, passing through three given points
2901         #  @param thePnt1,thePnt2,thePnt3 Points, defining the disk.
2902         #  @param theName Object name; when specified, this parameter is used
2903         #         for result publication in the study. Otherwise, if automatic
2904         #         publication is switched on, default value is used for result name.
2905         #
2906         #  @return New GEOM.GEOM_Object, containing the created disk.
2907         #
2908         #  @ref tui_creation_disk "Example"
2909         @ManageTransactions("PrimOp")
2910         def MakeDiskThreePnt(self, thePnt1, thePnt2, thePnt3, theName=None):
2911             """
2912             Create a disk, passing through three given points
2913
2914             Parameters:
2915                 thePnt1,thePnt2,thePnt3 Points, defining the disk.
2916                 theName Object name; when specified, this parameter is used
2917                         for result publication in the study. Otherwise, if automatic
2918                         publication is switched on, default value is used for result name.
2919
2920             Returns:
2921                 New GEOM.GEOM_Object, containing the created disk.
2922             """
2923             # Example: see GEOM_TestAll.py
2924             anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
2925             RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
2926             self._autoPublish(anObj, theName, "disk")
2927             return anObj
2928
2929         ## Create a disk with specified dimensions along OX-OY coordinate axes.
2930         #  @param theR Radius of Face.
2931         #  @param theOrientation set the orientation belong axis OXY or OYZ or OZX
2932         #  @param theName Object name; when specified, this parameter is used
2933         #         for result publication in the study. Otherwise, if automatic
2934         #         publication is switched on, default value is used for result name.
2935         #
2936         #  @return New GEOM.GEOM_Object, containing the created disk.
2937         #
2938         #  @ref tui_creation_face "Example"
2939         @ManageTransactions("PrimOp")
2940         def MakeDiskR(self, theR, theOrientation, theName=None):
2941             """
2942             Create a disk with specified dimensions along OX-OY coordinate axes.
2943
2944             Parameters:
2945                 theR Radius of Face.
2946                 theOrientation set the orientation belong axis OXY or OYZ or OZX
2947                 theName Object name; when specified, this parameter is used
2948                         for result publication in the study. Otherwise, if automatic
2949                         publication is switched on, default value is used for result name.
2950
2951             Returns:
2952                 New GEOM.GEOM_Object, containing the created disk.
2953
2954             Example of usage:
2955                 Disk3 = geompy.MakeDiskR(100., 1)
2956             """
2957             # Example: see GEOM_TestAll.py
2958             theR,Parameters = ParseParameters(theR)
2959             anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
2960             RaiseIfFailed("MakeDiskR", self.PrimOp)
2961             anObj.SetParameters(Parameters)
2962             self._autoPublish(anObj, theName, "disk")
2963             return anObj
2964
2965         ## Create a cylinder with given base point, axis, radius and height.
2966         #  @param thePnt Central point of cylinder base.
2967         #  @param theAxis Cylinder axis.
2968         #  @param theR Cylinder radius.
2969         #  @param theH Cylinder height.
2970         #  @param theName Object name; when specified, this parameter is used
2971         #         for result publication in the study. Otherwise, if automatic
2972         #         publication is switched on, default value is used for result name.
2973         #
2974         #  @return New GEOM.GEOM_Object, containing the created cylinder.
2975         #
2976         #  @ref tui_creation_cylinder "Example"
2977         @ManageTransactions("PrimOp")
2978         def MakeCylinder(self, thePnt, theAxis, theR, theH, theName=None):
2979             """
2980             Create a cylinder with given base point, axis, radius and height.
2981
2982             Parameters:
2983                 thePnt Central point of cylinder base.
2984                 theAxis Cylinder axis.
2985                 theR Cylinder radius.
2986                 theH Cylinder height.
2987                 theName Object name; when specified, this parameter is used
2988                         for result publication in the study. Otherwise, if automatic
2989                         publication is switched on, default value is used for result name.
2990
2991             Returns:
2992                 New GEOM.GEOM_Object, containing the created cylinder.
2993             """
2994             # Example: see GEOM_TestAll.py
2995             theR,theH,Parameters = ParseParameters(theR, theH)
2996             anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
2997             RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
2998             anObj.SetParameters(Parameters)
2999             self._autoPublish(anObj, theName, "cylinder")
3000             return anObj
3001
3002         ## Create a cylinder with given radius and height at
3003         #  the origin of coordinate system. Axis of the cylinder
3004         #  will be collinear to the OZ axis of the coordinate system.
3005         #  @param theR Cylinder radius.
3006         #  @param theH Cylinder height.
3007         #  @param theName Object name; when specified, this parameter is used
3008         #         for result publication in the study. Otherwise, if automatic
3009         #         publication is switched on, default value is used for result name.
3010         #
3011         #  @return New GEOM.GEOM_Object, containing the created cylinder.
3012         #
3013         #  @ref tui_creation_cylinder "Example"
3014         @ManageTransactions("PrimOp")
3015         def MakeCylinderRH(self, theR, theH, theName=None):
3016             """
3017             Create a cylinder with given radius and height at
3018             the origin of coordinate system. Axis of the cylinder
3019             will be collinear to the OZ axis of the coordinate system.
3020
3021             Parameters:
3022                 theR Cylinder radius.
3023                 theH Cylinder height.
3024                 theName Object name; when specified, this parameter is used
3025                         for result publication in the study. Otherwise, if automatic
3026                         publication is switched on, default value is used for result name.
3027
3028             Returns:
3029                 New GEOM.GEOM_Object, containing the created cylinder.
3030             """
3031             # Example: see GEOM_TestAll.py
3032             theR,theH,Parameters = ParseParameters(theR, theH)
3033             anObj = self.PrimOp.MakeCylinderRH(theR, theH)
3034             RaiseIfFailed("MakeCylinderRH", self.PrimOp)
3035             anObj.SetParameters(Parameters)
3036             self._autoPublish(anObj, theName, "cylinder")
3037             return anObj
3038
3039         ## Create a sphere with given center and radius.
3040         #  @param thePnt Sphere center.
3041         #  @param theR Sphere radius.
3042         #  @param theName Object name; when specified, this parameter is used
3043         #         for result publication in the study. Otherwise, if automatic
3044         #         publication is switched on, default value is used for result name.
3045         #
3046         #  @return New GEOM.GEOM_Object, containing the created sphere.
3047         #
3048         #  @ref tui_creation_sphere "Example"
3049         @ManageTransactions("PrimOp")
3050         def MakeSpherePntR(self, thePnt, theR, theName=None):
3051             """
3052             Create a sphere with given center and radius.
3053
3054             Parameters:
3055                 thePnt Sphere center.
3056                 theR Sphere radius.
3057                 theName Object name; when specified, this parameter is used
3058                         for result publication in the study. Otherwise, if automatic
3059                         publication is switched on, default value is used for result name.
3060
3061             Returns:
3062                 New GEOM.GEOM_Object, containing the created sphere.
3063             """
3064             # Example: see GEOM_TestAll.py
3065             theR,Parameters = ParseParameters(theR)
3066             anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
3067             RaiseIfFailed("MakeSpherePntR", self.PrimOp)
3068             anObj.SetParameters(Parameters)
3069             self._autoPublish(anObj, theName, "sphere")
3070             return anObj
3071
3072         ## Create a sphere with given center and radius.
3073         #  @param x,y,z Coordinates of sphere center.
3074         #  @param theR Sphere radius.
3075         #  @param theName Object name; when specified, this parameter is used
3076         #         for result publication in the study. Otherwise, if automatic
3077         #         publication is switched on, default value is used for result name.
3078         #
3079         #  @return New GEOM.GEOM_Object, containing the created sphere.
3080         #
3081         #  @ref tui_creation_sphere "Example"
3082         def MakeSphere(self, x, y, z, theR, theName=None):
3083             """
3084             Create a sphere with given center and radius.
3085
3086             Parameters:
3087                 x,y,z Coordinates of sphere center.
3088                 theR Sphere radius.
3089                 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             Returns:
3094                 New GEOM.GEOM_Object, containing the created sphere.
3095             """
3096             # Example: see GEOM_TestAll.py
3097             point = self.MakeVertex(x, y, z)
3098             # note: auto-publishing is done in self.MakeSpherePntR()
3099             anObj = self.MakeSpherePntR(point, theR, theName)
3100             return anObj
3101
3102         ## Create a sphere with given radius at the origin of coordinate system.
3103         #  @param theR Sphere radius.
3104         #  @param theName Object name; when specified, this parameter is used
3105         #         for result publication in the study. Otherwise, if automatic
3106         #         publication is switched on, default value is used for result name.
3107         #
3108         #  @return New GEOM.GEOM_Object, containing the created sphere.
3109         #
3110         #  @ref tui_creation_sphere "Example"
3111         @ManageTransactions("PrimOp")
3112         def MakeSphereR(self, theR, theName=None):
3113             """
3114             Create a sphere with given radius at the origin of coordinate system.
3115
3116             Parameters:
3117                 theR Sphere radius.
3118                 theName Object name; when specified, this parameter is used
3119                         for result publication in the study. Otherwise, if automatic
3120                         publication is switched on, default value is used for result name.
3121
3122             Returns:
3123                 New GEOM.GEOM_Object, containing the created sphere.
3124             """
3125             # Example: see GEOM_TestAll.py
3126             theR,Parameters = ParseParameters(theR)
3127             anObj = self.PrimOp.MakeSphereR(theR)
3128             RaiseIfFailed("MakeSphereR", self.PrimOp)
3129             anObj.SetParameters(Parameters)
3130             self._autoPublish(anObj, theName, "sphere")
3131             return anObj
3132
3133         ## Create a cone with given base point, axis, height and radiuses.
3134         #  @param thePnt Central point of the first cone base.
3135         #  @param theAxis Cone axis.
3136         #  @param theR1 Radius of the first cone base.
3137         #  @param theR2 Radius of the second cone base.
3138         #    \note If both radiuses are non-zero, the cone will be truncated.
3139         #    \note If the radiuses are equal, a cylinder will be created instead.
3140         #  @param theH Cone height.
3141         #  @param theName Object name; when specified, this parameter is used
3142         #         for result publication in the study. Otherwise, if automatic
3143         #         publication is switched on, default value is used for result name.
3144         #
3145         #  @return New GEOM.GEOM_Object, containing the created cone.
3146         #
3147         #  @ref tui_creation_cone "Example"
3148         @ManageTransactions("PrimOp")
3149         def MakeCone(self, thePnt, theAxis, theR1, theR2, theH, theName=None):
3150             """
3151             Create a cone with given base point, axis, height and radiuses.
3152
3153             Parameters:
3154                 thePnt Central point of the first cone base.
3155                 theAxis Cone axis.
3156                 theR1 Radius of the first cone base.
3157                 theR2 Radius of the second cone base.
3158                 theH Cone height.
3159                 theName Object name; when specified, this parameter is used
3160                         for result publication in the study. Otherwise, if automatic
3161                         publication is switched on, default value is used for result name.
3162
3163             Note:
3164                 If both radiuses are non-zero, the cone will be truncated.
3165                 If the radiuses are equal, a cylinder will be created instead.
3166
3167             Returns:
3168                 New GEOM.GEOM_Object, containing the created cone.
3169             """
3170             # Example: see GEOM_TestAll.py
3171             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3172             anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
3173             RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
3174             anObj.SetParameters(Parameters)
3175             self._autoPublish(anObj, theName, "cone")
3176             return anObj
3177
3178         ## Create a cone with given height and radiuses at
3179         #  the origin of coordinate system. Axis of the cone will
3180         #  be collinear to the OZ axis of the coordinate system.
3181         #  @param theR1 Radius of the first cone base.
3182         #  @param theR2 Radius of the second cone base.
3183         #    \note If both radiuses are non-zero, the cone will be truncated.
3184         #    \note If the radiuses are equal, a cylinder will be created instead.
3185         #  @param theH Cone height.
3186         #  @param theName Object name; when specified, this parameter is used
3187         #         for result publication in the study. Otherwise, if automatic
3188         #         publication is switched on, default value is used for result name.
3189         #
3190         #  @return New GEOM.GEOM_Object, containing the created cone.
3191         #
3192         #  @ref tui_creation_cone "Example"
3193         @ManageTransactions("PrimOp")
3194         def MakeConeR1R2H(self, theR1, theR2, theH, theName=None):
3195             """
3196             Create a cone with given height and radiuses at
3197             the origin of coordinate system. Axis of the cone will
3198             be collinear to the OZ axis of the coordinate system.
3199
3200             Parameters:
3201                 theR1 Radius of the first cone base.
3202                 theR2 Radius of the second cone base.
3203                 theH Cone height.
3204                 theName Object name; when specified, this parameter is used
3205                         for result publication in the study. Otherwise, if automatic
3206                         publication is switched on, default value is used for result name.
3207
3208             Note:
3209                 If both radiuses are non-zero, the cone will be truncated.
3210                 If the radiuses are equal, a cylinder will be created instead.
3211
3212             Returns:
3213                 New GEOM.GEOM_Object, containing the created cone.
3214             """
3215             # Example: see GEOM_TestAll.py
3216             theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
3217             anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
3218             RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
3219             anObj.SetParameters(Parameters)
3220             self._autoPublish(anObj, theName, "cone")
3221             return anObj
3222
3223         ## Create a torus with given center, normal vector and radiuses.
3224         #  @param thePnt Torus central point.
3225         #  @param theVec Torus axis of symmetry.
3226         #  @param theRMajor Torus major radius.
3227         #  @param theRMinor Torus minor radius.
3228         #  @param theName Object name; when specified, this parameter is used
3229         #         for result publication in the study. Otherwise, if automatic
3230         #         publication is switched on, default value is used for result name.
3231         #
3232         #  @return New GEOM.GEOM_Object, containing the created torus.
3233         #
3234         #  @ref tui_creation_torus "Example"
3235         @ManageTransactions("PrimOp")
3236         def MakeTorus(self, thePnt, theVec, theRMajor, theRMinor, theName=None):
3237             """
3238             Create a torus with given center, normal vector and radiuses.
3239
3240             Parameters:
3241                 thePnt Torus central point.
3242                 theVec Torus axis of symmetry.
3243                 theRMajor Torus major radius.
3244                 theRMinor Torus minor radius.
3245                 theName Object name; when specified, this parameter is used
3246                         for result publication in the study. Otherwise, if automatic
3247                         publication is switched on, default value is used for result name.
3248
3249            Returns:
3250                 New GEOM.GEOM_Object, containing the created torus.
3251             """
3252             # Example: see GEOM_TestAll.py
3253             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3254             anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
3255             RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
3256             anObj.SetParameters(Parameters)
3257             self._autoPublish(anObj, theName, "torus")
3258             return anObj
3259
3260         ## Create a torus with given radiuses at the origin of coordinate system.
3261         #  @param theRMajor Torus major radius.
3262         #  @param theRMinor Torus minor radius.
3263         #  @param theName Object name; when specified, this parameter is used
3264         #         for result publication in the study. Otherwise, if automatic
3265         #         publication is switched on, default value is used for result name.
3266         #
3267         #  @return New GEOM.GEOM_Object, containing the created torus.
3268         #
3269         #  @ref tui_creation_torus "Example"
3270         @ManageTransactions("PrimOp")
3271         def MakeTorusRR(self, theRMajor, theRMinor, theName=None):
3272             """
3273            Create a torus with given radiuses at the origin of coordinate system.
3274
3275            Parameters:
3276                 theRMajor Torus major radius.
3277                 theRMinor Torus minor radius.
3278                 theName Object name; when specified, this parameter is used
3279                         for result publication in the study. Otherwise, if automatic
3280                         publication is switched on, default value is used for result name.
3281
3282            Returns:
3283                 New GEOM.GEOM_Object, containing the created torus.
3284             """
3285             # Example: see GEOM_TestAll.py
3286             theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
3287             anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
3288             RaiseIfFailed("MakeTorusRR", self.PrimOp)
3289             anObj.SetParameters(Parameters)
3290             self._autoPublish(anObj, theName, "torus")
3291             return anObj
3292
3293         # end of l3_3d_primitives
3294         ## @}
3295
3296         ## @addtogroup l3_complex
3297         ## @{
3298
3299         ## Create a shape by extrusion of the base shape along a vector, defined by two points.
3300         #  @param theBase Base shape to be extruded.
3301         #  @param thePoint1 First end of extrusion vector.
3302         #  @param thePoint2 Second end of extrusion vector.
3303         #  @param theScaleFactor Use it to make prism with scaled second base.
3304         #                        Nagative value means not scaled second base.
3305         #  @param theName Object name; when specified, this parameter is used
3306         #         for result publication in the study. Otherwise, if automatic
3307         #         publication is switched on, default value is used for result name.
3308         #
3309         #  @return New GEOM.GEOM_Object, containing the created prism.
3310         #
3311         #  @ref tui_creation_prism "Example"
3312         @ManageTransactions("PrimOp")
3313         def MakePrism(self, theBase, thePoint1, thePoint2, theScaleFactor = -1.0, theName=None):
3314             """
3315             Create a shape by extrusion of the base shape along a vector, defined by two points.
3316
3317             Parameters:
3318                 theBase Base shape to be extruded.
3319                 thePoint1 First end of extrusion vector.
3320                 thePoint2 Second end of extrusion vector.
3321                 theScaleFactor Use it to make prism with scaled second base.
3322                                Nagative value means not scaled second base.
3323                 theName Object name; when specified, this parameter is used
3324                         for result publication in the study. Otherwise, if automatic
3325                         publication is switched on, default value is used for result name.
3326
3327             Returns:
3328                 New GEOM.GEOM_Object, containing the created prism.
3329             """
3330             # Example: see GEOM_TestAll.py
3331             anObj = None
3332             Parameters = ""
3333             if theScaleFactor > 0:
3334                 theScaleFactor,Parameters = ParseParameters(theScaleFactor)
3335                 anObj = self.PrimOp.MakePrismTwoPntWithScaling(theBase, thePoint1, thePoint2, theScaleFactor)
3336             else:
3337                 anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
3338             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3339             anObj.SetParameters(Parameters)
3340             self._autoPublish(anObj, theName, "prism")
3341             return anObj
3342
3343         ## Create a shape by extrusion of the base shape along a
3344         #  vector, defined by two points, in 2 Ways (forward/backward).
3345         #  @param theBase Base shape to be extruded.
3346         #  @param thePoint1 First end of extrusion vector.
3347         #  @param thePoint2 Second end of extrusion vector.
3348         #  @param theName Object name; when specified, this parameter is used
3349         #         for result publication in the study. Otherwise, if automatic
3350         #         publication is switched on, default value is used for result name.
3351         #
3352         #  @return New GEOM.GEOM_Object, containing the created prism.
3353         #
3354         #  @ref tui_creation_prism "Example"
3355         @ManageTransactions("PrimOp")
3356         def MakePrism2Ways(self, theBase, thePoint1, thePoint2, theName=None):
3357             """
3358             Create a shape by extrusion of the base shape along a
3359             vector, defined by two points, in 2 Ways (forward/backward).
3360
3361             Parameters:
3362                 theBase Base shape to be extruded.
3363                 thePoint1 First end of extrusion vector.
3364                 thePoint2 Second end of extrusion vector.
3365                 theName Object name; when specified, this parameter is used
3366                         for result publication in the study. Otherwise, if automatic
3367                         publication is switched on, default value is used for result name.
3368
3369             Returns:
3370                 New GEOM.GEOM_Object, containing the created prism.
3371             """
3372             # Example: see GEOM_TestAll.py
3373             anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
3374             RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
3375             self._autoPublish(anObj, theName, "prism")
3376             return anObj
3377
3378         ## Create a shape by extrusion of the base shape along the vector,
3379         #  i.e. all the space, transfixed by the base shape during its translation
3380         #  along the vector on the given distance.
3381         #  @param theBase Base shape to be extruded.
3382         #  @param theVec Direction of extrusion.
3383         #  @param theH Prism dimension along theVec.
3384         #  @param theScaleFactor Use it to make prism with scaled second base.
3385         #                        Negative value means not scaled second base.
3386         #  @param theName Object name; when specified, this parameter is used
3387         #         for result publication in the study. Otherwise, if automatic
3388         #         publication is switched on, default value is used for result name.
3389         #
3390         #  @return New GEOM.GEOM_Object, containing the created prism.
3391         #
3392         #  @ref tui_creation_prism "Example"
3393         @ManageTransactions("PrimOp")
3394         def MakePrismVecH(self, theBase, theVec, theH, theScaleFactor = -1.0, theName=None):
3395             """
3396             Create a shape by extrusion of the base shape along the vector,
3397             i.e. all the space, transfixed by the base shape during its translation
3398             along the vector on the given distance.
3399
3400             Parameters:
3401                 theBase Base shape to be extruded.
3402                 theVec Direction of extrusion.
3403                 theH Prism dimension along theVec.
3404                 theScaleFactor Use it to make prism with scaled second base.
3405                                Negative value means not scaled second base.
3406                 theName Object name; when specified, this parameter is used
3407                         for result publication in the study. Otherwise, if automatic
3408                         publication is switched on, default value is used for result name.
3409
3410             Returns:
3411                 New GEOM.GEOM_Object, containing the created prism.
3412             """
3413             # Example: see GEOM_TestAll.py
3414             anObj = None
3415             Parameters = ""
3416             if theScaleFactor > 0:
3417                 theH,theScaleFactor,Parameters = ParseParameters(theH,theScaleFactor)
3418                 anObj = self.PrimOp.MakePrismVecHWithScaling(theBase, theVec, theH, theScaleFactor)
3419             else:
3420                 theH,Parameters = ParseParameters(theH)
3421                 anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
3422             RaiseIfFailed("MakePrismVecH", self.PrimOp)
3423             anObj.SetParameters(Parameters)
3424             self._autoPublish(anObj, theName, "prism")
3425             return anObj
3426
3427         ## Create a shape by extrusion of the base shape along the vector,
3428         #  i.e. all the space, transfixed by the base shape during its translation
3429         #  along the vector on the given distance in 2 Ways (forward/backward).
3430         #  @param theBase Base shape to be extruded.
3431         #  @param theVec Direction of extrusion.
3432         #  @param theH Prism dimension along theVec in forward direction.
3433         #  @param theName Object name; when specified, this parameter is used
3434         #         for result publication in the study. Otherwise, if automatic
3435         #         publication is switched on, default value is used for result name.
3436         #
3437         #  @return New GEOM.GEOM_Object, containing the created prism.
3438         #
3439         #  @ref tui_creation_prism "Example"
3440         @ManageTransactions("PrimOp")
3441         def MakePrismVecH2Ways(self, theBase, theVec, theH, theName=None):
3442             """
3443             Create a shape by extrusion of the base shape along the vector,
3444             i.e. all the space, transfixed by the base shape during its translation
3445             along the vector on the given distance in 2 Ways (forward/backward).
3446
3447             Parameters:
3448                 theBase Base shape to be extruded.
3449                 theVec Direction of extrusion.
3450                 theH Prism dimension along theVec in forward direction.
3451                 theName Object name; when specified, this parameter is used
3452                         for result publication in the study. Otherwise, if automatic
3453                         publication is switched on, default value is used for result name.
3454
3455             Returns:
3456                 New GEOM.GEOM_Object, containing the created prism.
3457             """
3458             # Example: see GEOM_TestAll.py
3459             theH,Parameters = ParseParameters(theH)
3460             anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
3461             RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
3462             anObj.SetParameters(Parameters)
3463             self._autoPublish(anObj, theName, "prism")
3464             return anObj
3465
3466         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3467         #  @param theBase Base shape to be extruded.
3468         #  @param theDX, theDY, theDZ Directions of extrusion.
3469         #  @param theScaleFactor Use it to make prism with scaled second base.
3470         #                        Nagative value means not scaled second base.
3471         #  @param theName Object name; when specified, this parameter is used
3472         #         for result publication in the study. Otherwise, if automatic
3473         #         publication is switched on, default value is used for result name.
3474         #
3475         #  @return New GEOM.GEOM_Object, containing the created prism.
3476         #
3477         #  @ref tui_creation_prism "Example"
3478         @ManageTransactions("PrimOp")
3479         def MakePrismDXDYDZ(self, theBase, theDX, theDY, theDZ, theScaleFactor = -1.0, theName=None):
3480             """
3481             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3482
3483             Parameters:
3484                 theBase Base shape to be extruded.
3485                 theDX, theDY, theDZ Directions of extrusion.
3486                 theScaleFactor Use it to make prism with scaled second base.
3487                                Nagative value means not scaled second base.
3488                 theName Object name; when specified, this parameter is used
3489                         for result publication in the study. Otherwise, if automatic
3490                         publication is switched on, default value is used for result name.
3491
3492             Returns:
3493                 New GEOM.GEOM_Object, containing the created prism.
3494             """
3495             # Example: see GEOM_TestAll.py
3496             anObj = None
3497             Parameters = ""
3498             if theScaleFactor > 0:
3499                 theDX,theDY,theDZ,theScaleFactor,Parameters = ParseParameters(theDX, theDY, theDZ, theScaleFactor)
3500                 anObj = self.PrimOp.MakePrismDXDYDZWithScaling(theBase, theDX, theDY, theDZ, theScaleFactor)
3501             else:
3502                 theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3503                 anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
3504             RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
3505             anObj.SetParameters(Parameters)
3506             self._autoPublish(anObj, theName, "prism")
3507             return anObj
3508
3509         ## Create a shape by extrusion of the base shape along the dx, dy, dz direction
3510         #  i.e. all the space, transfixed by the base shape during its translation
3511         #  along the vector on the given distance in 2 Ways (forward/backward).
3512         #  @param theBase Base shape to be extruded.
3513         #  @param theDX, theDY, theDZ Directions of extrusion.
3514         #  @param theName Object name; when specified, this parameter is used
3515         #         for result publication in the study. Otherwise, if automatic
3516         #         publication is switched on, default value is used for result name.
3517         #
3518         #  @return New GEOM.GEOM_Object, containing the created prism.
3519         #
3520         #  @ref tui_creation_prism "Example"
3521         @ManageTransactions("PrimOp")
3522         def MakePrismDXDYDZ2Ways(self, theBase, theDX, theDY, theDZ, theName=None):
3523             """
3524             Create a shape by extrusion of the base shape along the dx, dy, dz direction
3525             i.e. all the space, transfixed by the base shape during its translation
3526             along the vector on the given distance in 2 Ways (forward/backward).
3527
3528             Parameters:
3529                 theBase Base shape to be extruded.
3530                 theDX, theDY, theDZ Directions of extrusion.
3531                 theName Object name; when specified, this parameter is used
3532                         for result publication in the study. Otherwise, if automatic
3533                         publication is switched on, default value is used for result name.
3534
3535             Returns:
3536                 New GEOM.GEOM_Object, containing the created prism.
3537             """
3538             # Example: see GEOM_TestAll.py
3539             theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
3540             anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
3541             RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
3542             anObj.SetParameters(Parameters)
3543             self._autoPublish(anObj, theName, "prism")
3544             return anObj
3545
3546         ## Create a shape by revolution of the base shape around the axis
3547         #  on the given angle, i.e. all the space, transfixed by the base
3548         #  shape during its rotation around the axis on the given angle.
3549         #  @param theBase Base shape to be rotated.
3550         #  @param theAxis Rotation axis.
3551         #  @param theAngle Rotation angle in radians.
3552         #  @param theName Object name; when specified, this parameter is used
3553         #         for result publication in the study. Otherwise, if automatic
3554         #         publication is switched on, default value is used for result name.
3555         #
3556         #  @return New GEOM.GEOM_Object, containing the created revolution.
3557         #
3558         #  @ref tui_creation_revolution "Example"
3559         @ManageTransactions("PrimOp")
3560         def MakeRevolution(self, theBase, theAxis, theAngle, theName=None):
3561             """
3562             Create a shape by revolution of the base shape around the axis
3563             on the given angle, i.e. all the space, transfixed by the base
3564             shape during its rotation around the axis on the given angle.
3565
3566             Parameters:
3567                 theBase Base shape to be rotated.
3568                 theAxis Rotation axis.
3569                 theAngle Rotation angle in radians.
3570                 theName Object name; when specified, this parameter is used
3571                         for result publication in the study. Otherwise, if automatic
3572                         publication is switched on, default value is used for result name.
3573
3574             Returns:
3575                 New GEOM.GEOM_Object, containing the created revolution.
3576             """
3577             # Example: see GEOM_TestAll.py
3578             theAngle,Parameters = ParseParameters(theAngle)
3579             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
3580             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
3581             anObj.SetParameters(Parameters)
3582             self._autoPublish(anObj, theName, "revolution")
3583             return anObj
3584
3585         ## Create a shape by revolution of the base shape around the axis
3586         #  on the given angle, i.e. all the space, transfixed by the base
3587         #  shape during its rotation around the axis on the given angle in
3588         #  both directions (forward/backward)
3589         #  @param theBase Base shape to be rotated.
3590         #  @param theAxis Rotation axis.
3591         #  @param theAngle Rotation angle in radians.
3592         #  @param theName Object name; when specified, this parameter is used
3593         #         for result publication in the study. Otherwise, if automatic
3594         #         publication is switched on, default value is used for result name.
3595         #
3596         #  @return New GEOM.GEOM_Object, containing the created revolution.
3597         #
3598         #  @ref tui_creation_revolution "Example"
3599         @ManageTransactions("PrimOp")
3600         def MakeRevolution2Ways(self, theBase, theAxis, theAngle, theName=None):
3601             """
3602             Create a shape by revolution of the base shape around the axis
3603             on the given angle, i.e. all the space, transfixed by the base
3604             shape during its rotation around the axis on the given angle in
3605             both directions (forward/backward).
3606
3607             Parameters:
3608                 theBase Base shape to be rotated.
3609                 theAxis Rotation axis.
3610                 theAngle Rotation angle in radians.
3611                 theName Object name; when specified, this parameter is used
3612                         for result publication in the study. Otherwise, if automatic
3613                         publication is switched on, default value is used for result name.
3614
3615             Returns:
3616                 New GEOM.GEOM_Object, containing the created revolution.
3617             """
3618             theAngle,Parameters = ParseParameters(theAngle)
3619             anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
3620             RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
3621             anObj.SetParameters(Parameters)
3622             self._autoPublish(anObj, theName, "revolution")
3623             return anObj
3624
3625         ## Create a filling from the given compound of contours.
3626         #  @param theShape the compound of contours
3627         #  @param theMinDeg a minimal degree of BSpline surface to create
3628         #  @param theMaxDeg a maximal degree of BSpline surface to create
3629         #  @param theTol2D a 2d tolerance to be reached
3630         #  @param theTol3D a 3d tolerance to be reached
3631         #  @param theNbIter a number of iteration of approximation algorithm
3632         #  @param theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3633         #  @param isApprox if True, BSpline curves are generated in the process
3634         #                  of surface construction. By default it is False, that means
3635         #                  the surface is created using given curves. The usage of
3636         #                  Approximation makes the algorithm work slower, but allows
3637         #                  building the surface for rather complex cases.
3638         #  @param theName Object name; when specified, this parameter is used
3639         #         for result publication in the study. Otherwise, if automatic
3640         #         publication is switched on, default value is used for result name.
3641         #
3642         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3643         #
3644         #  @ref tui_creation_filling "Example"
3645         @ManageTransactions("PrimOp")
3646         def MakeFilling(self, theShape, theMinDeg=2, theMaxDeg=5, theTol2D=0.0001,
3647                         theTol3D=0.0001, theNbIter=0, theMethod=GEOM.FOM_Default, isApprox=0, theName=None):
3648             """
3649             Create a filling from the given compound of contours.
3650
3651             Parameters:
3652                 theShape the compound of contours
3653                 theMinDeg a minimal degree of BSpline surface to create
3654                 theMaxDeg a maximal degree of BSpline surface to create
3655                 theTol2D a 2d tolerance to be reached
3656                 theTol3D a 3d tolerance to be reached
3657                 theNbIter a number of iteration of approximation algorithm
3658                 theMethod Kind of method to perform filling operation(see GEOM::filling_oper_method())
3659                 isApprox if True, BSpline curves are generated in the process
3660                          of surface construction. By default it is False, that means
3661                          the surface is created using given curves. The usage of
3662                          Approximation makes the algorithm work slower, but allows
3663                          building the surface for rather complex cases
3664                 theName Object name; when specified, this parameter is used
3665                         for result publication in the study. Otherwise, if automatic
3666                         publication is switched on, default value is used for result name.
3667
3668             Returns:
3669                 New GEOM.GEOM_Object, containing the created filling surface.
3670
3671             Example of usage:
3672                 filling = geompy.MakeFilling(compound, 2, 5, 0.0001, 0.0001, 5)
3673             """
3674             # Example: see GEOM_TestAll.py
3675             theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
3676             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3677                                             theTol2D, theTol3D, theNbIter,
3678                                             theMethod, isApprox)
3679             RaiseIfFailed("MakeFilling", self.PrimOp)
3680             anObj.SetParameters(Parameters)
3681             self._autoPublish(anObj, theName, "filling")
3682             return anObj
3683
3684
3685         ## Create a filling from the given compound of contours.
3686         #  This method corresponds to MakeFilling with isApprox=True
3687         #  @param theShape the compound of contours
3688         #  @param theMinDeg a minimal degree of BSpline surface to create
3689         #  @param theMaxDeg a maximal degree of BSpline surface to create
3690         #  @param theTol3D a 3d tolerance to be reached
3691         #  @param theName Object name; when specified, this parameter is used
3692         #         for result publication in the study. Otherwise, if automatic
3693         #         publication is switched on, default value is used for result name.
3694         #
3695         #  @return New GEOM.GEOM_Object, containing the created filling surface.
3696         #
3697         #  @ref tui_creation_filling "Example"
3698         @ManageTransactions("PrimOp")
3699         def MakeFillingNew(self, theShape, theMinDeg=2, theMaxDeg=5, theTol3D=0.0001, theName=None):
3700             """
3701             Create a filling from the given compound of contours.
3702             This method corresponds to MakeFilling with isApprox=True
3703
3704             Parameters:
3705                 theShape the compound of contours
3706                 theMinDeg a minimal degree of BSpline surface to create
3707                 theMaxDeg a maximal degree of BSpline surface to create
3708                 theTol3D a 3d tolerance to be reached
3709                 theName Object name; when specified, this parameter is used
3710                         for result publication in the study. Otherwise, if automatic
3711                         publication is switched on, default value is used for result name.
3712
3713             Returns:
3714                 New GEOM.GEOM_Object, containing the created filling surface.
3715
3716             Example of usage:
3717                 filling = geompy.MakeFillingNew(compound, 2, 5, 0.0001)
3718             """
3719             # Example: see GEOM_TestAll.py
3720             theMinDeg,theMaxDeg,theTol3D,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol3D)
3721             anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
3722                                             0, theTol3D, 0, GEOM.FOM_Default, True)
3723             RaiseIfFailed("MakeFillingNew", self.PrimOp)
3724             anObj.SetParameters(Parameters)
3725             self._autoPublish(anObj, theName, "filling")
3726             return anObj
3727
3728         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3729         #  @param theSeqSections - set of specified sections.
3730         #  @param theModeSolid - mode defining building solid or shell
3731         #  @param thePreci - precision 3D used for smoothing
3732         #  @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
3733         #  @param theName Object name; when specified, this parameter is used
3734         #         for result publication in the study. Otherwise, if automatic
3735         #         publication is switched on, default value is used for result name.
3736         #
3737         #  @return New GEOM.GEOM_Object, containing the created shell or solid.
3738         #
3739         #  @ref swig_todo "Example"
3740         @ManageTransactions("PrimOp")
3741         def MakeThruSections(self, theSeqSections, theModeSolid, thePreci, theRuled, theName=None):
3742             """
3743             Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
3744
3745             Parameters:
3746                 theSeqSections - set of specified sections.
3747                 theModeSolid - mode defining building solid or shell
3748                 thePreci - precision 3D used for smoothing
3749                 theRuled - mode defining type of the result surfaces (ruled or smoothed).
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 shell or solid.
3756             """
3757             # Example: see GEOM_TestAll.py
3758             anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
3759             RaiseIfFailed("MakeThruSections", self.PrimOp)
3760             self._autoPublish(anObj, theName, "filling")
3761             return anObj
3762
3763         ## Create a shape by extrusion of the base shape along
3764         #  the path shape. 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 theName Object name; when specified, this parameter is used
3768         #         for result publication in the study. Otherwise, if automatic
3769         #         publication is switched on, default value is used for result name.
3770         #
3771         #  @return New GEOM.GEOM_Object, containing the created pipe.
3772         #
3773         #  @ref tui_creation_pipe "Example"
3774         @ManageTransactions("PrimOp")
3775         def MakePipe(self, theBase, thePath, theName=None):
3776             """
3777             Create a shape by extrusion of the base shape along
3778             the path shape. The path shape can be a wire or an edge.
3779
3780             Parameters:
3781                 theBase Base shape to be extruded.
3782                 thePath Path shape to extrude the base shape along it.
3783                 theName Object name; when specified, this parameter is used
3784                         for result publication in the study. Otherwise, if automatic
3785                         publication is switched on, default value is used for result name.
3786
3787             Returns:
3788                 New GEOM.GEOM_Object, containing the created pipe.
3789             """
3790             # Example: see GEOM_TestAll.py
3791             anObj = self.PrimOp.MakePipe(theBase, thePath)
3792             RaiseIfFailed("MakePipe", self.PrimOp)
3793             self._autoPublish(anObj, theName, "pipe")
3794             return anObj
3795
3796         ## Create a shape by extrusion of the profile shape along
3797         #  the path shape. The path shape can be a wire or an edge.
3798         #  the several profiles can be specified in the several locations of path.
3799         #  @param theSeqBases - list of  Bases shape to be extruded.
3800         #  @param theLocations - list of locations on the path corresponding
3801         #                        specified list of the Bases shapes. Number of locations
3802         #                        should be equal to number of bases or list of locations can be empty.
3803         #  @param thePath - Path shape to extrude the base shape along it.
3804         #  @param theWithContact - the mode defining that the section is translated to be in
3805         #                          contact with the spine.
3806         #  @param theWithCorrection - defining that the section is rotated to be
3807         #                             orthogonal to the spine tangent in the correspondent point
3808         #  @param theName Object name; when specified, this parameter is used
3809         #         for result publication in the study. Otherwise, if automatic
3810         #         publication is switched on, default value is used for result name.
3811         #
3812         #  @return New GEOM.GEOM_Object, containing the created pipe.
3813         #
3814         #  @ref tui_creation_pipe_with_diff_sec "Example"
3815         @ManageTransactions("PrimOp")
3816         def MakePipeWithDifferentSections(self, theSeqBases,
3817                                           theLocations, thePath,
3818                                           theWithContact, theWithCorrection, theName=None):
3819             """
3820             Create a shape by extrusion of the profile shape along
3821             the path shape. The path shape can be a wire or an edge.
3822             the several profiles can be specified in the several locations of path.
3823
3824             Parameters:
3825                 theSeqBases - list of  Bases shape to be extruded.
3826                 theLocations - list of locations on the path corresponding
3827                                specified list of the Bases shapes. Number of locations
3828                                should be equal to number of bases or list of locations can be empty.
3829                 thePath - Path shape to extrude the base shape along it.
3830                 theWithContact - the mode defining that the section is translated to be in
3831                                  contact with the spine(0/1)
3832                 theWithCorrection - defining that the section is rotated to be
3833                                     orthogonal to the spine tangent in the correspondent point (0/1)
3834                 theName Object name; when specified, this parameter is used
3835                         for result publication in the study. Otherwise, if automatic
3836                         publication is switched on, default value is used for result name.
3837
3838             Returns:
3839                 New GEOM.GEOM_Object, containing the created pipe.
3840             """
3841             anObj = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
3842                                                               theLocations, thePath,
3843                                                               theWithContact, theWithCorrection)
3844             RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
3845             self._autoPublish(anObj, theName, "pipe")
3846             return anObj
3847
3848         ## Create a shape by extrusion of the profile shape along
3849         #  the path shape. The path shape can be a wire or a edge.
3850         #  the several profiles can be specified in the several locations of path.
3851         #  @param theSeqBases - list of  Bases shape to be extruded. Base shape must be
3852         #                       shell or face. If number of faces in neighbour sections
3853         #                       aren't coincided result solid between such sections will
3854         #                       be created using external boundaries of this shells.
3855         #  @param theSeqSubBases - list of corresponding sub-shapes of section shapes.
3856         #                          This list is used for searching correspondences between
3857         #                          faces in the sections. Size of this list must be equal
3858         #                          to size of list of base shapes.
3859         #  @param theLocations - list of locations on the path corresponding
3860         #                        specified list of the Bases shapes. Number of locations
3861         #                        should be equal to number of bases. First and last
3862         #                        locations must be coincided with first and last vertexes
3863         #                        of path correspondingly.
3864         #  @param thePath - Path shape to extrude the base shape along it.
3865         #  @param theWithContact - the mode defining that the section is translated to be in
3866         #                          contact with the spine.
3867         #  @param theWithCorrection - defining that the section is rotated to be
3868         #                             orthogonal to the spine tangent in the correspondent point
3869         #  @param theName Object name; when specified, this parameter is used
3870         #         for result publication in the study. Otherwise, if automatic
3871         #         publication is switched on, default value is used for result name.
3872         #
3873         #  @return New GEOM.GEOM_Object, containing the created solids.
3874         #
3875         #  @ref tui_creation_pipe_with_shell_sec "Example"
3876         @ManageTransactions("PrimOp")
3877         def MakePipeWithShellSections(self, theSeqBases, theSeqSubBases,
3878                                       theLocations, thePath,
3879                                       theWithContact, theWithCorrection, theName=None):
3880             """
3881             Create a shape by extrusion of the profile shape along
3882             the path shape. The path shape can be a wire or a edge.
3883             the several profiles can be specified in the several locations of path.
3884
3885             Parameters:
3886                 theSeqBases - list of  Bases shape to be extruded. Base shape must be
3887                               shell or face. If number of faces in neighbour sections
3888                               aren't coincided result solid between such sections will
3889                               be created using external boundaries of this shells.
3890                 theSeqSubBases - list of corresponding sub-shapes of section shapes.
3891                                  This list is used for searching correspondences between
3892                                  faces in the sections. Size of this list must be equal
3893                                  to size of list of base shapes.
3894                 theLocations - list of locations on the path corresponding
3895                                specified list of the Bases shapes. Number of locations
3896                                should be equal to number of bases. First and last
3897                                locations must be coincided with first and last vertexes
3898                                of path correspondingly.
3899                 thePath - Path shape to extrude the base shape along it.
3900                 theWithContact - the mode defining that the section is translated to be in
3901                                  contact with the spine (0/1)
3902                 theWithCorrection - defining that the section is rotated to be
3903                                     orthogonal to the spine tangent in the correspondent point (0/1)
3904                 theName Object name; when specified, this parameter is used
3905                         for result publication in the study. Otherwise, if automatic
3906                         publication is switched on, default value is used for result name.
3907
3908             Returns:
3909                 New GEOM.GEOM_Object, containing the created solids.
3910             """
3911             anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
3912                                                           theLocations, thePath,
3913                                                           theWithContact, theWithCorrection)
3914             RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3915             self._autoPublish(anObj, theName, "pipe")
3916             return anObj
3917
3918         ## Create a shape by extrusion of the profile shape along
3919         #  the path shape. This function is used only for debug pipe
3920         #  functionality - it is a version of function MakePipeWithShellSections()
3921         #  which give a possibility to recieve information about
3922         #  creating pipe between each pair of sections step by step.
3923         @ManageTransactions("PrimOp")
3924         def MakePipeWithShellSectionsBySteps(self, theSeqBases, theSeqSubBases,
3925                                              theLocations, thePath,
3926                                              theWithContact, theWithCorrection, theName=None):
3927             """
3928             Create a shape by extrusion of the profile shape along
3929             the path shape. This function is used only for debug pipe
3930             functionality - it is a version of previous function
3931             geompy.MakePipeWithShellSections() which give a possibility to
3932             recieve information about creating pipe between each pair of
3933             sections step by step.
3934             """
3935             res = []
3936             nbsect = len(theSeqBases)
3937             nbsubsect = len(theSeqSubBases)
3938             #print "nbsect = ",nbsect
3939             for i in range(1,nbsect):
3940                 #print "  i = ",i
3941                 tmpSeqBases = [ theSeqBases[i-1], theSeqBases[i] ]
3942                 tmpLocations = [ theLocations[i-1], theLocations[i] ]
3943                 tmpSeqSubBases = []
3944                 if nbsubsect>0: tmpSeqSubBases = [ theSeqSubBases[i-1], theSeqSubBases[i] ]
3945                 anObj = self.PrimOp.MakePipeWithShellSections(tmpSeqBases, tmpSeqSubBases,
3946                                                               tmpLocations, thePath,
3947                                                               theWithContact, theWithCorrection)
3948                 if self.PrimOp.IsDone() == 0:
3949                     print "Problems with pipe creation between ",i," and ",i+1," sections"
3950                     RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
3951                     break
3952                 else:
3953                     print "Pipe between ",i," and ",i+1," sections is OK"
3954                     res.append(anObj)
3955                     pass
3956                 pass
3957
3958             resc = self.MakeCompound(res)
3959             #resc = self.MakeSewing(res, 0.001)
3960             #print "resc: ",resc
3961             self._autoPublish(resc, theName, "pipe")
3962             return resc
3963
3964         ## Create solids between given sections
3965         #  @param theSeqBases - list of sections (shell or face).
3966         #  @param theLocations - list of corresponding vertexes
3967         #  @param theName Object name; when specified, this parameter is used
3968         #         for result publication in the study. Otherwise, if automatic
3969         #         publication is switched on, default value is used for result name.
3970         #
3971         #  @return New GEOM.GEOM_Object, containing the created solids.
3972         #
3973         #  @ref tui_creation_pipe_without_path "Example"
3974         @ManageTransactions("PrimOp")
3975         def MakePipeShellsWithoutPath(self, theSeqBases, theLocations, theName=None):
3976             """
3977             Create solids between given sections
3978
3979             Parameters:
3980                 theSeqBases - list of sections (shell or face).
3981                 theLocations - list of corresponding vertexes
3982                 theName Object name; when specified, this parameter is used
3983                         for result publication in the study. Otherwise, if automatic
3984                         publication is switched on, default value is used for result name.
3985
3986             Returns:
3987                 New GEOM.GEOM_Object, containing the created solids.
3988             """
3989             anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
3990             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
3991             self._autoPublish(anObj, theName, "pipe")
3992             return anObj
3993
3994         ## Create a shape by extrusion of the base shape along
3995         #  the path shape with constant bi-normal direction along the given vector.
3996         #  The path shape can be a wire or an edge.
3997         #  @param theBase Base shape to be extruded.
3998         #  @param thePath Path shape to extrude the base shape along it.
3999         #  @param theVec Vector defines a constant binormal direction to keep the
4000         #                same angle beetween the direction and the sections
4001         #                along the sweep surface.
4002         #  @param theName Object name; when specified, this parameter is used
4003         #         for result publication in the study. Otherwise, if automatic
4004         #         publication is switched on, default value is used for result name.
4005         #
4006         #  @return New GEOM.GEOM_Object, containing the created pipe.
4007         #
4008         #  @ref tui_creation_pipe "Example"
4009         @ManageTransactions("PrimOp")
4010         def MakePipeBiNormalAlongVector(self, theBase, thePath, theVec, theName=None):
4011             """
4012             Create a shape by extrusion of the base shape along
4013             the path shape with constant bi-normal direction along the given vector.
4014             The path shape can be a wire or an edge.
4015
4016             Parameters:
4017                 theBase Base shape to be extruded.
4018                 thePath Path shape to extrude the base shape along it.
4019                 theVec Vector defines a constant binormal direction to keep the
4020                        same angle beetween the direction and the sections
4021                        along the sweep surface.
4022                 theName Object name; when specified, this parameter is used
4023                         for result publication in the study. Otherwise, if automatic
4024                         publication is switched on, default value is used for result name.
4025
4026             Returns:
4027                 New GEOM.GEOM_Object, containing the created pipe.
4028             """
4029             # Example: see GEOM_TestAll.py
4030             anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
4031             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
4032             self._autoPublish(anObj, theName, "pipe")
4033             return anObj
4034
4035         ## Makes a thick solid from a face or a shell
4036         #  @param theShape Face or Shell to be thicken
4037         #  @param theThickness Thickness of the resulting solid
4038         #  @param 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         #  @return New GEOM.GEOM_Object, containing the created solid
4043         #
4044         @ManageTransactions("PrimOp")
4045         def MakeThickSolid(self, theShape, theThickness, theName=None):
4046             """
4047             Make a thick solid from a face or a shell
4048
4049             Parameters:
4050                  theShape Face or Shell to be thicken
4051                  theThickness Thickness of the resulting solid
4052                  theName Object name; when specified, this parameter is used
4053                  for result publication in the study. Otherwise, if automatic
4054                  publication is switched on, default value is used for result name.
4055
4056             Returns:
4057                 New GEOM.GEOM_Object, containing the created solid
4058             """
4059             # Example: see GEOM_TestAll.py
4060             anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
4061             RaiseIfFailed("MakeThickening", self.PrimOp)
4062             self._autoPublish(anObj, theName, "pipe")
4063             return anObj
4064
4065
4066         ## Modifies a face or a shell to make it a thick solid
4067         #  @param theShape Face or Shell to be thicken
4068         #  @param theThickness Thickness of the resulting solid
4069         #
4070         #  @return The modified shape
4071         #
4072         @ManageTransactions("PrimOp")
4073         def Thicken(self, theShape, theThickness):
4074             """
4075             Modifies a face or a shell to make it a thick solid
4076
4077             Parameters:
4078                 theBase Base shape to be extruded.
4079                 thePath Path shape to extrude the base shape along it.
4080                 theName Object name; when specified, this parameter is used
4081                         for result publication in the study. Otherwise, if automatic
4082                         publication is switched on, default value is used for result name.
4083
4084             Returns:
4085                 The modified shape
4086             """
4087             # Example: see GEOM_TestAll.py
4088             anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
4089             RaiseIfFailed("MakeThickening", self.PrimOp)
4090             return anObj
4091
4092         ## Build a middle path of a pipe-like shape.
4093         #  The path shape can be a wire or an edge.
4094         #  @param theShape It can be closed or unclosed pipe-like shell
4095         #                  or a pipe-like solid.
4096         #  @param theBase1, theBase2 Two bases of the supposed pipe. This
4097         #                            should be wires or faces of theShape.
4098         #  @param theName Object name; when specified, this parameter is used
4099         #         for result publication in the study. Otherwise, if automatic
4100         #         publication is switched on, default value is used for result name.
4101         #
4102         #  @note It is not assumed that exact or approximate copy of theShape
4103         #        can be obtained by applying existing Pipe operation on the
4104         #        resulting "Path" wire taking theBase1 as the base - it is not
4105         #        always possible; though in some particular cases it might work
4106         #        it is not guaranteed. Thus, RestorePath function should not be
4107         #        considered as an exact reverse operation of the Pipe.
4108         #
4109         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4110         #                                source pipe's "path".
4111         #
4112         #  @ref tui_creation_pipe_path "Example"
4113         @ManageTransactions("PrimOp")
4114         def RestorePath (self, theShape, theBase1, theBase2, theName=None):
4115             """
4116             Build a middle path of a pipe-like shape.
4117             The path shape can be a wire or an edge.
4118
4119             Parameters:
4120                 theShape It can be closed or unclosed pipe-like shell
4121                          or a pipe-like solid.
4122                 theBase1, theBase2 Two bases of the supposed pipe. This
4123                                    should be wires or faces of theShape.
4124                 theName Object name; when specified, this parameter is used
4125                         for result publication in the study. Otherwise, if automatic
4126                         publication is switched on, default value is used for result name.
4127
4128             Returns:
4129                 New GEOM_Object, containing an edge or wire that represent
4130                                  source pipe's path.
4131             """
4132             anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
4133             RaiseIfFailed("RestorePath", self.PrimOp)
4134             self._autoPublish(anObj, theName, "path")
4135             return anObj
4136
4137         ## Build a middle path of a pipe-like shape.
4138         #  The path shape can be a wire or an edge.
4139         #  @param theShape It can be closed or unclosed pipe-like shell
4140         #                  or a pipe-like solid.
4141         #  @param listEdges1, listEdges2 Two bases of the supposed pipe. This
4142         #                                should be lists of edges of theShape.
4143         #  @param theName Object name; when specified, this parameter is used
4144         #         for result publication in the study. Otherwise, if automatic
4145         #         publication is switched on, default value is used for result name.
4146         #
4147         #  @note It is not assumed that exact or approximate copy of theShape
4148         #        can be obtained by applying existing Pipe operation on the
4149         #        resulting "Path" wire taking theBase1 as the base - it is not
4150         #        always possible; though in some particular cases it might work
4151         #        it is not guaranteed. Thus, RestorePath function should not be
4152         #        considered as an exact reverse operation of the Pipe.
4153         #
4154         #  @return New GEOM.GEOM_Object, containing an edge or wire that represent
4155         #                                source pipe's "path".
4156         #
4157         #  @ref tui_creation_pipe_path "Example"
4158         @ManageTransactions("PrimOp")
4159         def RestorePathEdges (self, theShape, listEdges1, listEdges2, theName=None):
4160             """
4161             Build a middle path of a pipe-like shape.
4162             The path shape can be a wire or an edge.
4163
4164             Parameters:
4165                 theShape It can be closed or unclosed pipe-like shell
4166                          or a pipe-like solid.
4167                 listEdges1, listEdges2 Two bases of the supposed pipe. This
4168                                        should be lists of edges of theShape.
4169                 theName Object name; when specified, this parameter is used
4170                         for result publication in the study. Otherwise, if automatic
4171                         publication is switched on, default value is used for result name.
4172
4173             Returns:
4174                 New GEOM_Object, containing an edge or wire that represent
4175                                  source pipe's path.
4176             """
4177             anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
4178             RaiseIfFailed("RestorePath", self.PrimOp)
4179             self._autoPublish(anObj, theName, "path")
4180             return anObj
4181
4182         # end of l3_complex
4183         ## @}
4184
4185         ## @addtogroup l3_advanced
4186         ## @{
4187
4188         ## Create a linear edge with specified ends.
4189         #  @param thePnt1 Point for the first end of edge.
4190         #  @param thePnt2 Point for the second end of edge.
4191         #  @param theName Object name; when specified, this parameter is used
4192         #         for result publication in the study. Otherwise, if automatic
4193         #         publication is switched on, default value is used for result name.
4194         #
4195         #  @return New GEOM.GEOM_Object, containing the created edge.
4196         #
4197         #  @ref tui_creation_edge "Example"
4198         @ManageTransactions("ShapesOp")
4199         def MakeEdge(self, thePnt1, thePnt2, theName=None):
4200             """
4201             Create a linear edge with specified ends.
4202
4203             Parameters:
4204                 thePnt1 Point for the first end of edge.
4205                 thePnt2 Point for the second end of edge.
4206                 theName Object name; when specified, this parameter is used
4207                         for result publication in the study. Otherwise, if automatic
4208                         publication is switched on, default value is used for result name.
4209
4210             Returns:
4211                 New GEOM.GEOM_Object, containing the created edge.
4212             """
4213             # Example: see GEOM_TestAll.py
4214             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
4215             RaiseIfFailed("MakeEdge", self.ShapesOp)
4216             self._autoPublish(anObj, theName, "edge")
4217             return anObj
4218
4219         ## Create a new edge, corresponding to the given length on the given curve.
4220         #  @param theRefCurve The referenced curve (edge).
4221         #  @param theLength Length on the referenced curve. It can be negative.
4222         #  @param theStartPoint Any point can be selected for it, the new edge will begin
4223         #                       at the end of \a theRefCurve, close to the selected point.
4224         #                       If None, start from the first point of \a theRefCurve.
4225         #  @param theName Object name; when specified, this parameter is used
4226         #         for result publication in the study. Otherwise, if automatic
4227         #         publication is switched on, default value is used for result name.
4228         #
4229         #  @return New GEOM.GEOM_Object, containing the created edge.
4230         #
4231         #  @ref tui_creation_edge "Example"
4232         @ManageTransactions("ShapesOp")
4233         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None, theName=None):
4234             """
4235             Create a new edge, corresponding to the given length on the given curve.
4236
4237             Parameters:
4238                 theRefCurve The referenced curve (edge).
4239                 theLength Length on the referenced curve. It can be negative.
4240                 theStartPoint Any point can be selected for it, the new edge will begin
4241                               at the end of theRefCurve, close to the selected point.
4242                               If None, start from the first point of theRefCurve.
4243                 theName Object name; when specified, this parameter is used
4244                         for result publication in the study. Otherwise, if automatic
4245                         publication is switched on, default value is used for result name.
4246
4247             Returns:
4248                 New GEOM.GEOM_Object, containing the created edge.
4249             """
4250             # Example: see GEOM_TestAll.py
4251             theLength, Parameters = ParseParameters(theLength)
4252             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
4253             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
4254             anObj.SetParameters(Parameters)
4255             self._autoPublish(anObj, theName, "edge")
4256             return anObj
4257
4258         ## Create an edge from specified wire.
4259         #  @param theWire source Wire
4260         #  @param theLinearTolerance linear tolerance value (default = 1e-07)
4261         #  @param theAngularTolerance angular tolerance value (default = 1e-12)
4262         #  @param theName Object name; when specified, this parameter is used
4263         #         for result publication in the study. Otherwise, if automatic
4264         #         publication is switched on, default value is used for result name.
4265         #
4266         #  @return New GEOM.GEOM_Object, containing the created edge.
4267         #
4268         #  @ref tui_creation_edge "Example"
4269         @ManageTransactions("ShapesOp")
4270         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12, theName=None):
4271             """
4272             Create an edge from specified wire.
4273
4274             Parameters:
4275                 theWire source Wire
4276                 theLinearTolerance linear tolerance value (default = 1e-07)
4277                 theAngularTolerance angular tolerance value (default = 1e-12)
4278                 theName Object name; when specified, this parameter is used
4279                         for result publication in the study. Otherwise, if automatic
4280                         publication is switched on, default value is used for result name.
4281
4282             Returns:
4283                 New GEOM.GEOM_Object, containing the created edge.
4284             """
4285             # Example: see GEOM_TestAll.py
4286             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
4287             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
4288             self._autoPublish(anObj, theName, "edge")
4289             return anObj
4290
4291         ## Create a wire from the set of edges and wires.
4292         #  @param theEdgesAndWires List of edges and/or wires.
4293         #  @param theTolerance Maximum distance between vertices, that will be merged.
4294         #                      Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
4295         #  @param theName Object name; when specified, this parameter is used
4296         #         for result publication in the study. Otherwise, if automatic
4297         #         publication is switched on, default value is used for result name.
4298         #
4299         #  @return New GEOM.GEOM_Object, containing the created wire.
4300         #
4301         #  @ref tui_creation_wire "Example"
4302         @ManageTransactions("ShapesOp")
4303         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07, theName=None):
4304             """
4305             Create a wire from the set of edges and wires.
4306
4307             Parameters:
4308                 theEdgesAndWires List of edges and/or wires.
4309                 theTolerance Maximum distance between vertices, that will be merged.
4310                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
4311                 theName Object name; when specified, this parameter is used
4312                         for result publication in the study. Otherwise, if automatic
4313                         publication is switched on, default value is used for result name.
4314
4315             Returns:
4316                 New GEOM.GEOM_Object, containing the created wire.
4317             """
4318             # Example: see GEOM_TestAll.py
4319             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
4320             RaiseIfFailed("MakeWire", self.ShapesOp)
4321             self._autoPublish(anObj, theName, "wire")
4322             return anObj
4323
4324         ## Create a face on the given wire.
4325         #  @param theWire closed Wire or Edge to build the face on.
4326         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4327         #                        If the tolerance of the obtained planar face is less
4328         #                        than 1e-06, this face will be returned, otherwise the
4329         #                        algorithm tries to build any suitable face on the given
4330         #                        wire and prints a warning message.
4331         #  @param theName Object name; when specified, this parameter is used
4332         #         for result publication in the study. Otherwise, if automatic
4333         #         publication is switched on, default value is used for result name.
4334         #
4335         #  @return New GEOM.GEOM_Object, containing the created face.
4336         #
4337         #  @ref tui_creation_face "Example"
4338         @ManageTransactions("ShapesOp")
4339         def MakeFace(self, theWire, isPlanarWanted, theName=None):
4340             """
4341             Create a face on the given wire.
4342
4343             Parameters:
4344                 theWire closed Wire or Edge to build the face on.
4345                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4346                                If the tolerance of the obtained planar face is less
4347                                than 1e-06, this face will be returned, otherwise the
4348                                algorithm tries to build any suitable face on the given
4349                                wire and prints a warning message.
4350                 theName Object name; when specified, this parameter is used
4351                         for result publication in the study. Otherwise, if automatic
4352                         publication is switched on, default value is used for result name.
4353
4354             Returns:
4355                 New GEOM.GEOM_Object, containing the created face.
4356             """
4357             # Example: see GEOM_TestAll.py
4358             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
4359             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4360                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4361             else:
4362                 RaiseIfFailed("MakeFace", self.ShapesOp)
4363             self._autoPublish(anObj, theName, "face")
4364             return anObj
4365
4366         ## Create a face on the given wires set.
4367         #  @param theWires List of closed wires or edges to build the face on.
4368         #  @param isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4369         #                        If the tolerance of the obtained planar face is less
4370         #                        than 1e-06, this face will be returned, otherwise the
4371         #                        algorithm tries to build any suitable face on the given
4372         #                        wire and prints a warning message.
4373         #  @param theName Object name; when specified, this parameter is used
4374         #         for result publication in the study. Otherwise, if automatic
4375         #         publication is switched on, default value is used for result name.
4376         #
4377         #  @return New GEOM.GEOM_Object, containing the created face.
4378         #
4379         #  @ref tui_creation_face "Example"
4380         @ManageTransactions("ShapesOp")
4381         def MakeFaceWires(self, theWires, isPlanarWanted, theName=None):
4382             """
4383             Create a face on the given wires set.
4384
4385             Parameters:
4386                 theWires List of closed wires or edges to build the face on.
4387                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
4388                                If the tolerance of the obtained planar face is less
4389                                than 1e-06, this face will be returned, otherwise the
4390                                algorithm tries to build any suitable face on the given
4391                                wire and prints a warning message.
4392                 theName Object name; when specified, this parameter is used
4393                         for result publication in the study. Otherwise, if automatic
4394                         publication is switched on, default value is used for result name.
4395
4396             Returns:
4397                 New GEOM.GEOM_Object, containing the created face.
4398             """
4399             # Example: see GEOM_TestAll.py
4400             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
4401             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
4402                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
4403             else:
4404                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
4405             self._autoPublish(anObj, theName, "face")
4406             return anObj
4407
4408         ## See MakeFaceWires() method for details.
4409         #
4410         #  @ref tui_creation_face "Example 1"
4411         #  \n @ref swig_MakeFaces  "Example 2"
4412         def MakeFaces(self, theWires, isPlanarWanted, theName=None):
4413             """
4414             See geompy.MakeFaceWires() method for details.
4415             """
4416             # Example: see GEOM_TestOthers.py
4417             # note: auto-publishing is done in self.MakeFaceWires()
4418             anObj = self.MakeFaceWires(theWires, isPlanarWanted, theName)
4419             return anObj
4420
4421         ## Create a shell from the set of faces and shells.
4422         #  @param theFacesAndShells List of faces and/or shells.
4423         #  @param theName Object name; when specified, this parameter is used
4424         #         for result publication in the study. Otherwise, if automatic
4425         #         publication is switched on, default value is used for result name.
4426         #
4427         #  @return New GEOM.GEOM_Object, containing the created shell.
4428         #
4429         #  @ref tui_creation_shell "Example"
4430         @ManageTransactions("ShapesOp")
4431         def MakeShell(self, theFacesAndShells, theName=None):
4432             """
4433             Create a shell from the set of faces and shells.
4434
4435             Parameters:
4436                 theFacesAndShells List of faces and/or shells.
4437                 theName Object name; when specified, this parameter is used
4438                         for result publication in the study. Otherwise, if automatic
4439                         publication is switched on, default value is used for result name.
4440
4441             Returns:
4442                 New GEOM.GEOM_Object, containing the created shell.
4443             """
4444             # Example: see GEOM_TestAll.py
4445             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
4446             RaiseIfFailed("MakeShell", self.ShapesOp)
4447             self._autoPublish(anObj, theName, "shell")
4448             return anObj
4449
4450         ## Create a solid, bounded by the given shells.
4451         #  @param theShells Sequence of bounding shells.
4452         #  @param theName Object name; when specified, this parameter is used
4453         #         for result publication in the study. Otherwise, if automatic
4454         #         publication is switched on, default value is used for result name.
4455         #
4456         #  @return New GEOM.GEOM_Object, containing the created solid.
4457         #
4458         #  @ref tui_creation_solid "Example"
4459         @ManageTransactions("ShapesOp")
4460         def MakeSolid(self, theShells, theName=None):
4461             """
4462             Create a solid, bounded by the given shells.
4463
4464             Parameters:
4465                 theShells Sequence of bounding shells.
4466                 theName Object name; when specified, this parameter is used
4467                         for result publication in the study. Otherwise, if automatic
4468                         publication is switched on, default value is used for result name.
4469
4470             Returns:
4471                 New GEOM.GEOM_Object, containing the created solid.
4472             """
4473             # Example: see GEOM_TestAll.py
4474             if len(theShells) == 1:
4475                 descr = self._IsGoodForSolid(theShells[0])
4476                 #if len(descr) > 0:
4477                 #    raise RuntimeError, "MakeSolidShells : " + descr
4478                 if descr == "WRN_SHAPE_UNCLOSED":
4479                     raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
4480             anObj = self.ShapesOp.MakeSolidShells(theShells)
4481             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
4482             self._autoPublish(anObj, theName, "solid")
4483             return anObj
4484
4485         ## Create a compound of the given shapes.
4486         #  @param theShapes List of shapes to put in compound.
4487         #  @param theName Object name; when specified, this parameter is used
4488         #         for result publication in the study. Otherwise, if automatic
4489         #         publication is switched on, default value is used for result name.
4490         #
4491         #  @return New GEOM.GEOM_Object, containing the created compound.
4492         #
4493         #  @ref tui_creation_compound "Example"
4494         @ManageTransactions("ShapesOp")
4495         def MakeCompound(self, theShapes, theName=None):
4496             """
4497             Create a compound of the given shapes.
4498
4499             Parameters:
4500                 theShapes List of shapes to put in compound.
4501                 theName Object name; when specified, this parameter is used
4502                         for result publication in the study. Otherwise, if automatic
4503                         publication is switched on, default value is used for result name.
4504
4505             Returns:
4506                 New GEOM.GEOM_Object, containing the created compound.
4507             """
4508             # Example: see GEOM_TestAll.py
4509             anObj = self.ShapesOp.MakeCompound(theShapes)
4510             RaiseIfFailed("MakeCompound", self.ShapesOp)
4511             self._autoPublish(anObj, theName, "compound")
4512             return anObj
4513
4514         # end of l3_advanced
4515         ## @}
4516
4517         ## @addtogroup l2_measure
4518         ## @{
4519
4520         ## Gives quantity of faces in the given shape.
4521         #  @param theShape Shape to count faces of.
4522         #  @return Quantity of faces.
4523         #
4524         #  @ref swig_NumberOf "Example"
4525         @ManageTransactions("ShapesOp")
4526         def NumberOfFaces(self, theShape):
4527             """
4528             Gives quantity of faces in the given shape.
4529
4530             Parameters:
4531                 theShape Shape to count faces of.
4532
4533             Returns:
4534                 Quantity of faces.
4535             """
4536             # Example: see GEOM_TestOthers.py
4537             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
4538             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
4539             return nb_faces
4540
4541         ## Gives quantity of edges in the given shape.
4542         #  @param theShape Shape to count edges of.
4543         #  @return Quantity of edges.
4544         #
4545         #  @ref swig_NumberOf "Example"
4546         @ManageTransactions("ShapesOp")
4547         def NumberOfEdges(self, theShape):
4548             """
4549             Gives quantity of edges in the given shape.
4550
4551             Parameters:
4552                 theShape Shape to count edges of.
4553
4554             Returns:
4555                 Quantity of edges.
4556             """
4557             # Example: see GEOM_TestOthers.py
4558             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
4559             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
4560             return nb_edges
4561
4562         ## Gives quantity of sub-shapes of type theShapeType in the given shape.
4563         #  @param theShape Shape to count sub-shapes of.
4564         #  @param theShapeType Type of sub-shapes to count (see ShapeType())
4565         #  @return Quantity of sub-shapes of given type.
4566         #
4567         #  @ref swig_NumberOf "Example"
4568         @ManageTransactions("ShapesOp")
4569         def NumberOfSubShapes(self, theShape, theShapeType):
4570             """
4571             Gives quantity of sub-shapes of type theShapeType in the given shape.
4572
4573             Parameters:
4574                 theShape Shape to count sub-shapes of.
4575                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
4576
4577             Returns:
4578                 Quantity of sub-shapes of given type.
4579             """
4580             # Example: see GEOM_TestOthers.py
4581             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
4582             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
4583             return nb_ss
4584
4585         ## Gives quantity of solids in the given shape.
4586         #  @param theShape Shape to count solids in.
4587         #  @return Quantity of solids.
4588         #
4589         #  @ref swig_NumberOf "Example"
4590         @ManageTransactions("ShapesOp")
4591         def NumberOfSolids(self, theShape):
4592             """
4593             Gives quantity of solids in the given shape.
4594
4595             Parameters:
4596                 theShape Shape to count solids in.
4597
4598             Returns:
4599                 Quantity of solids.
4600             """
4601             # Example: see GEOM_TestOthers.py
4602             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, self.ShapeType["SOLID"])
4603             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
4604             return nb_solids
4605
4606         # end of l2_measure
4607         ## @}
4608
4609         ## @addtogroup l3_healing
4610         ## @{
4611
4612         ## Reverses an orientation the given shape.
4613         #  @param theShape Shape to be reversed.
4614         #  @param theName Object name; when specified, this parameter is used
4615         #         for result publication in the study. Otherwise, if automatic
4616         #         publication is switched on, default value is used for result name.
4617         #
4618         #  @return The reversed copy of theShape.
4619         #
4620         #  @ref swig_ChangeOrientation "Example"
4621         @ManageTransactions("ShapesOp")
4622         def ChangeOrientation(self, theShape, theName=None):
4623             """
4624             Reverses an orientation the given shape.
4625
4626             Parameters:
4627                 theShape Shape to be reversed.
4628                 theName Object name; when specified, this parameter is used
4629                         for result publication in the study. Otherwise, if automatic
4630                         publication is switched on, default value is used for result name.
4631
4632             Returns:
4633                 The reversed copy of theShape.
4634             """
4635             # Example: see GEOM_TestAll.py
4636             anObj = self.ShapesOp.ChangeOrientation(theShape)
4637             RaiseIfFailed("ChangeOrientation", self.ShapesOp)
4638             self._autoPublish(anObj, theName, "reversed")
4639             return anObj
4640
4641         ## See ChangeOrientation() method for details.
4642         #
4643         #  @ref swig_OrientationChange "Example"
4644         def OrientationChange(self, theShape, theName=None):
4645             """
4646             See geompy.ChangeOrientation method for details.
4647             """
4648             # Example: see GEOM_TestOthers.py
4649             # note: auto-publishing is done in self.ChangeOrientation()
4650             anObj = self.ChangeOrientation(theShape, theName)
4651             return anObj
4652
4653         # end of l3_healing
4654         ## @}
4655
4656         ## @addtogroup l4_obtain
4657         ## @{
4658
4659         ## Retrieve all free faces from the given shape.
4660         #  Free face is a face, which is not shared between two shells of the shape.
4661         #  @param theShape Shape to find free faces in.
4662         #  @return List of IDs of all free faces, contained in theShape.
4663         #
4664         #  @ref tui_measurement_tools_page "Example"
4665         @ManageTransactions("ShapesOp")
4666         def GetFreeFacesIDs(self,theShape):
4667             """
4668             Retrieve all free faces from the given shape.
4669             Free face is a face, which is not shared between two shells of the shape.
4670
4671             Parameters:
4672                 theShape Shape to find free faces in.
4673
4674             Returns:
4675                 List of IDs of all free faces, contained in theShape.
4676             """
4677             # Example: see GEOM_TestOthers.py
4678             anIDs = self.ShapesOp.GetFreeFacesIDs(theShape)
4679             RaiseIfFailed("GetFreeFacesIDs", self.ShapesOp)
4680             return anIDs
4681
4682         ## Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4683         #  @param theShape1 Shape to find sub-shapes in.
4684         #  @param theShape2 Shape to find shared sub-shapes with.
4685         #  @param theShapeType Type of sub-shapes to be retrieved.
4686         #  @param theName Object name; when specified, this parameter is used
4687         #         for result publication in the study. Otherwise, if automatic
4688         #         publication is switched on, default value is used for result name.
4689         #
4690         #  @return List of sub-shapes of theShape1, shared with theShape2.
4691         #
4692         #  @ref swig_GetSharedShapes "Example"
4693         @ManageTransactions("ShapesOp")
4694         def GetSharedShapes(self, theShape1, theShape2, theShapeType, theName=None):
4695             """
4696             Get all sub-shapes of theShape1 of the given type, shared with theShape2.
4697
4698             Parameters:
4699                 theShape1 Shape to find sub-shapes in.
4700                 theShape2 Shape to find shared sub-shapes with.
4701                 theShapeType Type of sub-shapes to be retrieved.
4702                 theName Object name; when specified, this parameter is used
4703                         for result publication in the study. Otherwise, if automatic
4704                         publication is switched on, default value is used for result name.
4705
4706             Returns:
4707                 List of sub-shapes of theShape1, shared with theShape2.
4708             """
4709             # Example: see GEOM_TestOthers.py
4710             aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
4711             RaiseIfFailed("GetSharedShapes", self.ShapesOp)
4712             self._autoPublish(aList, theName, "shared")
4713             return aList
4714
4715         ## Get all sub-shapes, shared by all shapes in the list <VAR>theShapes</VAR>.
4716         #  @param theShapes Shapes to find common sub-shapes of.
4717         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4718         #  @param theName Object name; when specified, this parameter is used
4719         #         for result publication in the study. Otherwise, if automatic
4720         #         publication is switched on, default value is used for result name.
4721         #
4722         #  @return List of objects, that are sub-shapes of all given shapes.
4723         #
4724         #  @ref swig_GetSharedShapes "Example"
4725         @ManageTransactions("ShapesOp")
4726         def GetSharedShapesMulti(self, theShapes, theShapeType, theName=None):
4727             """
4728             Get all sub-shapes, shared by all shapes in the list theShapes.
4729
4730             Parameters:
4731                 theShapes Shapes to find common sub-shapes of.
4732                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4733                 theName Object name; when specified, this parameter is used
4734                         for result publication in the study. Otherwise, if automatic
4735                         publication is switched on, default value is used for result name.
4736
4737             Returns:
4738                 List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
4739             """
4740             # Example: see GEOM_TestOthers.py
4741             aList = self.ShapesOp.GetSharedShapesMulti(theShapes, theShapeType)
4742             RaiseIfFailed("GetSharedShapesMulti", self.ShapesOp)
4743             self._autoPublish(aList, theName, "shared")
4744             return aList
4745
4746         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4747         #  situated relatively the specified plane by the certain way,
4748         #  defined through <VAR>theState</VAR> parameter.
4749         #  @param theShape Shape to find sub-shapes of.
4750         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4751         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4752         #                direction and location of the plane to find shapes on.
4753         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4754         #  @param theName Object name; when specified, this parameter is used
4755         #         for result publication in the study. Otherwise, if automatic
4756         #         publication is switched on, default value is used for result name.
4757         #
4758         #  @return List of all found sub-shapes.
4759         #
4760         #  @ref swig_GetShapesOnPlane "Example"
4761         @ManageTransactions("ShapesOp")
4762         def GetShapesOnPlane(self, theShape, theShapeType, theAx1, theState, theName=None):
4763             """
4764             Find in theShape all sub-shapes of type theShapeType,
4765             situated relatively the specified plane by the certain way,
4766             defined through theState parameter.
4767
4768             Parameters:
4769                 theShape Shape to find sub-shapes of.
4770                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4771                 theAx1 Vector (or line, or linear edge), specifying normal
4772                        direction and location of the plane to find shapes on.
4773                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4774                 theName Object name; when specified, this parameter is used
4775                         for result publication in the study. Otherwise, if automatic
4776                         publication is switched on, default value is used for result name.
4777
4778             Returns:
4779                 List of all found sub-shapes.
4780             """
4781             # Example: see GEOM_TestOthers.py
4782             aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
4783             RaiseIfFailed("GetShapesOnPlane", self.ShapesOp)
4784             self._autoPublish(aList, theName, "shapeOnPlane")
4785             return aList
4786
4787         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4788         #  situated relatively the specified plane by the certain way,
4789         #  defined through <VAR>theState</VAR> parameter.
4790         #  @param theShape Shape to find sub-shapes of.
4791         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4792         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4793         #                direction and location of the plane to find shapes on.
4794         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4795         #
4796         #  @return List of all found sub-shapes indices.
4797         #
4798         #  @ref swig_GetShapesOnPlaneIDs "Example"
4799         @ManageTransactions("ShapesOp")
4800         def GetShapesOnPlaneIDs(self, theShape, theShapeType, theAx1, theState):
4801             """
4802             Find in theShape all sub-shapes of type theShapeType,
4803             situated relatively the specified plane by the certain way,
4804             defined through theState parameter.
4805
4806             Parameters:
4807                 theShape Shape to find sub-shapes of.
4808                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4809                 theAx1 Vector (or line, or linear edge), specifying normal
4810                        direction and location of the plane to find shapes on.
4811                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4812
4813             Returns:
4814                 List of all found sub-shapes indices.
4815             """
4816             # Example: see GEOM_TestOthers.py
4817             aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
4818             RaiseIfFailed("GetShapesOnPlaneIDs", self.ShapesOp)
4819             return aList
4820
4821         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4822         #  situated relatively the specified plane by the certain way,
4823         #  defined through <VAR>theState</VAR> parameter.
4824         #  @param theShape Shape to find sub-shapes of.
4825         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4826         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4827         #                direction of the plane to find shapes on.
4828         #  @param thePnt Point specifying location of the plane to find shapes on.
4829         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4830         #  @param theName Object name; when specified, this parameter is used
4831         #         for result publication in the study. Otherwise, if automatic
4832         #         publication is switched on, default value is used for result name.
4833         #
4834         #  @return List of all found sub-shapes.
4835         #
4836         #  @ref swig_GetShapesOnPlaneWithLocation "Example"
4837         @ManageTransactions("ShapesOp")
4838         def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState, theName=None):
4839             """
4840             Find in theShape all sub-shapes of type theShapeType,
4841             situated relatively the specified plane by the certain way,
4842             defined through theState parameter.
4843
4844             Parameters:
4845                 theShape Shape to find sub-shapes of.
4846                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4847                 theAx1 Vector (or line, or linear edge), specifying normal
4848                        direction and location of the plane to find shapes on.
4849                 thePnt Point specifying location of the plane to find shapes on.
4850                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4851                 theName Object name; when specified, this parameter is used
4852                         for result publication in the study. Otherwise, if automatic
4853                         publication is switched on, default value is used for result name.
4854
4855             Returns:
4856                 List of all found sub-shapes.
4857             """
4858             # Example: see GEOM_TestOthers.py
4859             aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
4860                                                                theAx1, thePnt, theState)
4861             RaiseIfFailed("GetShapesOnPlaneWithLocation", self.ShapesOp)
4862             self._autoPublish(aList, theName, "shapeOnPlane")
4863             return aList
4864
4865         ## Find in <VAR>theShape</VAR> all sub-shapes of type <VAR>theShapeType</VAR>,
4866         #  situated relatively the specified plane by the certain way,
4867         #  defined through <VAR>theState</VAR> parameter.
4868         #  @param theShape Shape to find sub-shapes of.
4869         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4870         #  @param theAx1 Vector (or line, or linear edge), specifying normal
4871         #                direction of the plane to find shapes on.
4872         #  @param thePnt Point specifying location of the plane to find shapes on.
4873         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4874         #
4875         #  @return List of all found sub-shapes indices.
4876         #
4877         #  @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
4878         @ManageTransactions("ShapesOp")
4879         def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
4880             """
4881             Find in theShape all sub-shapes of type theShapeType,
4882             situated relatively the specified plane by the certain way,
4883             defined through theState parameter.
4884
4885             Parameters:
4886                 theShape Shape to find sub-shapes of.
4887                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4888                 theAx1 Vector (or line, or linear edge), specifying normal
4889                        direction and location of the plane to find shapes on.
4890                 thePnt Point specifying location of the plane to find shapes on.
4891                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4892
4893             Returns:
4894                 List of all found sub-shapes indices.
4895             """
4896             # Example: see GEOM_TestOthers.py
4897             aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
4898                                                                   theAx1, thePnt, theState)
4899             RaiseIfFailed("GetShapesOnPlaneWithLocationIDs", self.ShapesOp)
4900             return aList
4901
4902         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4903         #  the specified cylinder by the certain way, defined through \a theState parameter.
4904         #  @param theShape Shape to find sub-shapes of.
4905         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4906         #  @param theAxis Vector (or line, or linear edge), specifying
4907         #                 axis of the cylinder to find shapes on.
4908         #  @param theRadius Radius of the cylinder to find shapes on.
4909         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4910         #  @param theName Object name; when specified, this parameter is used
4911         #         for result publication in the study. Otherwise, if automatic
4912         #         publication is switched on, default value is used for result name.
4913         #
4914         #  @return List of all found sub-shapes.
4915         #
4916         #  @ref swig_GetShapesOnCylinder "Example"
4917         @ManageTransactions("ShapesOp")
4918         def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState, theName=None):
4919             """
4920             Find in theShape all sub-shapes of type theShapeType, situated relatively
4921             the specified cylinder by the certain way, defined through theState parameter.
4922
4923             Parameters:
4924                 theShape Shape to find sub-shapes of.
4925                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4926                 theAxis Vector (or line, or linear edge), specifying
4927                         axis of the cylinder to find shapes on.
4928                 theRadius Radius of the cylinder to find shapes on.
4929                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4930                 theName Object name; when specified, this parameter is used
4931                         for result publication in the study. Otherwise, if automatic
4932                         publication is switched on, default value is used for result name.
4933
4934             Returns:
4935                 List of all found sub-shapes.
4936             """
4937             # Example: see GEOM_TestOthers.py
4938             aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
4939             RaiseIfFailed("GetShapesOnCylinder", self.ShapesOp)
4940             self._autoPublish(aList, theName, "shapeOnCylinder")
4941             return aList
4942
4943         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4944         #  the specified cylinder by the certain way, defined through \a theState parameter.
4945         #  @param theShape Shape to find sub-shapes of.
4946         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4947         #  @param theAxis Vector (or line, or linear edge), specifying
4948         #                 axis of the cylinder to find shapes on.
4949         #  @param theRadius Radius of the cylinder to find shapes on.
4950         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4951         #
4952         #  @return List of all found sub-shapes indices.
4953         #
4954         #  @ref swig_GetShapesOnCylinderIDs "Example"
4955         @ManageTransactions("ShapesOp")
4956         def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
4957             """
4958             Find in theShape all sub-shapes of type theShapeType, situated relatively
4959             the specified cylinder by the certain way, defined through theState parameter.
4960
4961             Parameters:
4962                 theShape Shape to find sub-shapes of.
4963                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
4964                 theAxis Vector (or line, or linear edge), specifying
4965                         axis of the cylinder to find shapes on.
4966                 theRadius Radius of the cylinder to find shapes on.
4967                 theState The state of the sub-shapes to find (see GEOM::shape_state)
4968
4969             Returns:
4970                 List of all found sub-shapes indices.
4971             """
4972             # Example: see GEOM_TestOthers.py
4973             aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
4974             RaiseIfFailed("GetShapesOnCylinderIDs", self.ShapesOp)
4975             return aList
4976
4977         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
4978         #  the specified cylinder by the certain way, defined through \a theState parameter.
4979         #  @param theShape Shape to find sub-shapes of.
4980         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
4981         #  @param theAxis Vector (or line, or linear edge), specifying
4982         #                 axis of the cylinder to find shapes on.
4983         #  @param thePnt Point specifying location of the bottom of the cylinder.
4984         #  @param theRadius Radius of the cylinder to find shapes on.
4985         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
4986         #  @param theName Object name; when specified, this parameter is used
4987         #         for result publication in the study. Otherwise, if automatic
4988         #         publication is switched on, default value is used for result name.
4989         #
4990         #  @return List of all found sub-shapes.
4991         #
4992         #  @ref swig_GetShapesOnCylinderWithLocation "Example"
4993         @ManageTransactions("ShapesOp")
4994         def GetShapesOnCylinderWithLocation(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState, theName=None):
4995             """
4996             Find in theShape all sub-shapes of type theShapeType, situated relatively
4997             the specified cylinder by the certain way, defined through theState parameter.
4998
4999             Parameters:
5000                 theShape Shape to find sub-shapes of.
5001                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5002                 theAxis Vector (or line, or linear edge), specifying
5003                         axis of the cylinder to find shapes on.
5004                 theRadius Radius of the cylinder to find shapes on.
5005                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5006                 theName Object name; when specified, this parameter is used
5007                         for result publication in the study. Otherwise, if automatic
5008                         publication is switched on, default value is used for result name.
5009
5010             Returns:
5011                 List of all found sub-shapes.
5012             """
5013             # Example: see GEOM_TestOthers.py
5014             aList = self.ShapesOp.GetShapesOnCylinderWithLocation(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5015             RaiseIfFailed("GetShapesOnCylinderWithLocation", self.ShapesOp)
5016             self._autoPublish(aList, theName, "shapeOnCylinder")
5017             return aList
5018
5019         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5020         #  the specified cylinder by the certain way, defined through \a theState parameter.
5021         #  @param theShape Shape to find sub-shapes of.
5022         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5023         #  @param theAxis Vector (or line, or linear edge), specifying
5024         #                 axis of the cylinder to find shapes on.
5025         #  @param thePnt Point specifying location of the bottom of the cylinder.
5026         #  @param theRadius Radius of the cylinder to find shapes on.
5027         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5028         #
5029         #  @return List of all found sub-shapes indices
5030         #
5031         #  @ref swig_GetShapesOnCylinderWithLocationIDs "Example"
5032         @ManageTransactions("ShapesOp")
5033         def GetShapesOnCylinderWithLocationIDs(self, theShape, theShapeType, theAxis, thePnt, theRadius, theState):
5034             """
5035             Find in theShape all sub-shapes of type theShapeType, situated relatively
5036             the specified cylinder by the certain way, defined through theState parameter.
5037
5038             Parameters:
5039                 theShape Shape to find sub-shapes of.
5040                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5041                 theAxis Vector (or line, or linear edge), specifying
5042                         axis of the cylinder to find shapes on.
5043                 theRadius Radius of the cylinder to find shapes on.
5044                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5045
5046             Returns:
5047                 List of all found sub-shapes indices.
5048             """
5049             # Example: see GEOM_TestOthers.py
5050             aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
5051             RaiseIfFailed("GetShapesOnCylinderWithLocationIDs", self.ShapesOp)
5052             return aList
5053
5054         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5055         #  the specified sphere by the certain way, defined through \a theState parameter.
5056         #  @param theShape Shape to find sub-shapes of.
5057         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5058         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5059         #  @param theRadius Radius of the sphere to find shapes on.
5060         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5061         #  @param theName Object name; when specified, this parameter is used
5062         #         for result publication in the study. Otherwise, if automatic
5063         #         publication is switched on, default value is used for result name.
5064         #
5065         #  @return List of all found sub-shapes.
5066         #
5067         #  @ref swig_GetShapesOnSphere "Example"
5068         @ManageTransactions("ShapesOp")
5069         def GetShapesOnSphere(self, theShape, theShapeType, theCenter, theRadius, theState, theName=None):
5070             """
5071             Find in theShape all sub-shapes of type theShapeType, situated relatively
5072             the specified sphere by the certain way, defined through theState parameter.
5073
5074             Parameters:
5075                 theShape Shape to find sub-shapes of.
5076                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5077                 theCenter Point, specifying center of the sphere to find shapes on.
5078                 theRadius Radius of the sphere to find shapes on.
5079                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5080                 theName Object name; when specified, this parameter is used
5081                         for result publication in the study. Otherwise, if automatic
5082                         publication is switched on, default value is used for result name.
5083
5084             Returns:
5085                 List of all found sub-shapes.
5086             """
5087             # Example: see GEOM_TestOthers.py
5088             aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
5089             RaiseIfFailed("GetShapesOnSphere", self.ShapesOp)
5090             self._autoPublish(aList, theName, "shapeOnSphere")
5091             return aList
5092
5093         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5094         #  the specified sphere by the certain way, defined through \a theState parameter.
5095         #  @param theShape Shape to find sub-shapes of.
5096         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5097         #  @param theCenter Point, specifying center of the sphere to find shapes on.
5098         #  @param theRadius Radius of the sphere to find shapes on.
5099         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5100         #
5101         #  @return List of all found sub-shapes indices.
5102         #
5103         #  @ref swig_GetShapesOnSphereIDs "Example"
5104         @ManageTransactions("ShapesOp")
5105         def GetShapesOnSphereIDs(self, theShape, theShapeType, theCenter, theRadius, theState):
5106             """
5107             Find in theShape all sub-shapes of type theShapeType, situated relatively
5108             the specified sphere by the certain way, defined through theState parameter.
5109
5110             Parameters:
5111                 theShape Shape to find sub-shapes of.
5112                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5113                 theCenter Point, specifying center of the sphere to find shapes on.
5114                 theRadius Radius of the sphere to find shapes on.
5115                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5116
5117             Returns:
5118                 List of all found sub-shapes indices.
5119             """
5120             # Example: see GEOM_TestOthers.py
5121             aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
5122             RaiseIfFailed("GetShapesOnSphereIDs", self.ShapesOp)
5123             return aList
5124
5125         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5126         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5127         #  @param theShape Shape to find sub-shapes of.
5128         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5129         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5130         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5131         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5132         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5133         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5134         #  @param theName Object name; when specified, this parameter is used
5135         #         for result publication in the study. Otherwise, if automatic
5136         #         publication is switched on, default value is used for result name.
5137         #
5138         #  @return List of all found sub-shapes.
5139         #
5140         #  @ref swig_GetShapesOnQuadrangle "Example"
5141         @ManageTransactions("ShapesOp")
5142         def GetShapesOnQuadrangle(self, theShape, theShapeType,
5143                                   theTopLeftPoint, theTopRigthPoint,
5144                                   theBottomLeftPoint, theBottomRigthPoint, theState, theName=None):
5145             """
5146             Find in theShape all sub-shapes of type theShapeType, situated relatively
5147             the specified quadrangle by the certain way, defined through theState parameter.
5148
5149             Parameters:
5150                 theShape Shape to find sub-shapes of.
5151                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5152                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5153                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5154                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5155                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5156                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5157                 theName Object name; when specified, this parameter is used
5158                         for result publication in the study. Otherwise, if automatic
5159                         publication is switched on, default value is used for result name.
5160
5161             Returns:
5162                 List of all found sub-shapes.
5163             """
5164             # Example: see GEOM_TestOthers.py
5165             aList = self.ShapesOp.GetShapesOnQuadrangle(theShape, theShapeType,
5166                                                         theTopLeftPoint, theTopRigthPoint,
5167                                                         theBottomLeftPoint, theBottomRigthPoint, theState)
5168             RaiseIfFailed("GetShapesOnQuadrangle", self.ShapesOp)
5169             self._autoPublish(aList, theName, "shapeOnQuadrangle")
5170             return aList
5171
5172         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5173         #  the specified quadrangle by the certain way, defined through \a theState parameter.
5174         #  @param theShape Shape to find sub-shapes of.
5175         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5176         #  @param theTopLeftPoint Point, specifying top left corner of a quadrangle
5177         #  @param theTopRigthPoint Point, specifying top right corner of a quadrangle
5178         #  @param theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5179         #  @param theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5180         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5181         #
5182         #  @return List of all found sub-shapes indices.
5183         #
5184         #  @ref swig_GetShapesOnQuadrangleIDs "Example"
5185         @ManageTransactions("ShapesOp")
5186         def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
5187                                      theTopLeftPoint, theTopRigthPoint,
5188                                      theBottomLeftPoint, theBottomRigthPoint, theState):
5189             """
5190             Find in theShape all sub-shapes of type theShapeType, situated relatively
5191             the specified quadrangle by the certain way, defined through theState parameter.
5192
5193             Parameters:
5194                 theShape Shape to find sub-shapes of.
5195                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5196                 theTopLeftPoint Point, specifying top left corner of a quadrangle
5197                 theTopRigthPoint Point, specifying top right corner of a quadrangle
5198                 theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
5199                 theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
5200                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5201
5202             Returns:
5203                 List of all found sub-shapes indices.
5204             """
5205
5206             # Example: see GEOM_TestOthers.py
5207             aList = self.ShapesOp.GetShapesOnQuadrangleIDs(theShape, theShapeType,
5208                                                            theTopLeftPoint, theTopRigthPoint,
5209                                                            theBottomLeftPoint, theBottomRigthPoint, theState)
5210             RaiseIfFailed("GetShapesOnQuadrangleIDs", self.ShapesOp)
5211             return aList
5212
5213         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5214         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5215         #  @param theBox Shape for relative comparing.
5216         #  @param theShape Shape to find sub-shapes of.
5217         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5218         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5219         #  @param theName Object name; when specified, this parameter is used
5220         #         for result publication in the study. Otherwise, if automatic
5221         #         publication is switched on, default value is used for result name.
5222         #
5223         #  @return List of all found sub-shapes.
5224         #
5225         #  @ref swig_GetShapesOnBox "Example"
5226         @ManageTransactions("ShapesOp")
5227         def GetShapesOnBox(self, theBox, theShape, theShapeType, theState, theName=None):
5228             """
5229             Find in theShape all sub-shapes of type theShapeType, situated relatively
5230             the specified theBox by the certain way, defined through theState parameter.
5231
5232             Parameters:
5233                 theBox Shape for relative comparing.
5234                 theShape Shape to find sub-shapes of.
5235                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5236                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5237                 theName Object name; when specified, this parameter is used
5238                         for result publication in the study. Otherwise, if automatic
5239                         publication is switched on, default value is used for result name.
5240
5241             Returns:
5242                 List of all found sub-shapes.
5243             """
5244             # Example: see GEOM_TestOthers.py
5245             aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
5246             RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
5247             self._autoPublish(aList, theName, "shapeOnBox")
5248             return aList
5249
5250         ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
5251         #  the specified \a theBox by the certain way, defined through \a theState parameter.
5252         #  @param theBox Shape for relative comparing.
5253         #  @param theShape Shape to find sub-shapes of.
5254         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5255         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5256         #
5257         #  @return List of all found sub-shapes indices.
5258         #
5259         #  @ref swig_GetShapesOnBoxIDs "Example"
5260         @ManageTransactions("ShapesOp")
5261         def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
5262             """
5263             Find in theShape all sub-shapes of type theShapeType, situated relatively
5264             the specified theBox by the certain way, defined through theState parameter.
5265
5266             Parameters:
5267                 theBox Shape for relative comparing.
5268                 theShape Shape to find sub-shapes of.
5269                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5270                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5271
5272             Returns:
5273                 List of all found sub-shapes indices.
5274             """
5275             # Example: see GEOM_TestOthers.py
5276             aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
5277             RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
5278             return aList
5279
5280         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5281         #  situated relatively the specified \a theCheckShape by the
5282         #  certain way, defined through \a theState parameter.
5283         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5284         #  @param theShape Shape to find sub-shapes of.
5285         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5286         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5287         #  @param theName Object name; when specified, this parameter is used
5288         #         for result publication in the study. Otherwise, if automatic
5289         #         publication is switched on, default value is used for result name.
5290         #
5291         #  @return List of all found sub-shapes.
5292         #
5293         #  @ref swig_GetShapesOnShape "Example"
5294         @ManageTransactions("ShapesOp")
5295         def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5296             """
5297             Find in theShape all sub-shapes of type theShapeType,
5298             situated relatively the specified theCheckShape by the
5299             certain way, defined through theState parameter.
5300
5301             Parameters:
5302                 theCheckShape Shape for relative comparing. It must be a solid.
5303                 theShape Shape to find sub-shapes of.
5304                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5305                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5306                 theName Object name; when specified, this parameter is used
5307                         for result publication in the study. Otherwise, if automatic
5308                         publication is switched on, default value is used for result name.
5309
5310             Returns:
5311                 List of all found sub-shapes.
5312             """
5313             # Example: see GEOM_TestOthers.py
5314             aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
5315                                                    theShapeType, theState)
5316             RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
5317             self._autoPublish(aList, theName, "shapeOnShape")
5318             return aList
5319
5320         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5321         #  situated relatively the specified \a theCheckShape by the
5322         #  certain way, defined through \a theState parameter.
5323         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5324         #  @param theShape Shape to find sub-shapes of.
5325         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5326         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5327         #  @param theName Object name; when specified, this parameter is used
5328         #         for result publication in the study. Otherwise, if automatic
5329         #         publication is switched on, default value is used for result name.
5330         #
5331         #  @return All found sub-shapes as compound.
5332         #
5333         #  @ref swig_GetShapesOnShapeAsCompound "Example"
5334         @ManageTransactions("ShapesOp")
5335         def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState, theName=None):
5336             """
5337             Find in theShape all sub-shapes of type theShapeType,
5338             situated relatively the specified theCheckShape by the
5339             certain way, defined through theState parameter.
5340
5341             Parameters:
5342                 theCheckShape Shape for relative comparing. It must be a solid.
5343                 theShape Shape to find sub-shapes of.
5344                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5345                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5346                 theName Object name; when specified, this parameter is used
5347                         for result publication in the study. Otherwise, if automatic
5348                         publication is switched on, default value is used for result name.
5349
5350             Returns:
5351                 All found sub-shapes as compound.
5352             """
5353             # Example: see GEOM_TestOthers.py
5354             anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
5355                                                              theShapeType, theState)
5356             RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
5357             self._autoPublish(anObj, theName, "shapeOnShape")
5358             return anObj
5359
5360         ## Find in \a theShape all sub-shapes of type \a theShapeType,
5361         #  situated relatively the specified \a theCheckShape by the
5362         #  certain way, defined through \a theState parameter.
5363         #  @param theCheckShape Shape for relative comparing. It must be a solid.
5364         #  @param theShape Shape to find sub-shapes of.
5365         #  @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
5366         #  @param theState The state of the sub-shapes to find (see GEOM::shape_state)
5367         #
5368         #  @return List of all found sub-shapes indices.
5369         #
5370         #  @ref swig_GetShapesOnShapeIDs "Example"
5371         @ManageTransactions("ShapesOp")
5372         def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
5373             """
5374             Find in theShape all sub-shapes of type theShapeType,
5375             situated relatively the specified theCheckShape by the
5376             certain way, defined through theState parameter.
5377
5378             Parameters:
5379                 theCheckShape Shape for relative comparing. It must be a solid.
5380                 theShape Shape to find sub-shapes of.
5381                 theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5382                 theState The state of the sub-shapes to find (see GEOM::shape_state)
5383
5384             Returns:
5385                 List of all found sub-shapes indices.
5386             """
5387             # Example: see GEOM_TestOthers.py
5388             aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
5389                                                       theShapeType, theState)
5390             RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
5391             return aList
5392
5393         ## Get sub-shape(s) of theShapeWhere, which are
5394         #  coincident with \a theShapeWhat or could be a part of it.
5395         #  @param theShapeWhere Shape to find sub-shapes of.
5396         #  @param theShapeWhat Shape, specifying what to find.
5397         #  @param isNewImplementation implementation of GetInPlace functionality
5398         #             (default = False, old alghorithm based on shape properties)
5399         #  @param theName Object name; when specified, this parameter is used
5400         #         for result publication in the study. Otherwise, if automatic
5401         #         publication is switched on, default value is used for result name.
5402         #
5403         #  @return Group of all found sub-shapes or a single found sub-shape.
5404         #
5405         #  @note This function has a restriction on argument shapes.
5406         #        If \a theShapeWhere has curved parts with significantly
5407         #        outstanding centres (i.e. the mass centre of a part is closer to
5408         #        \a theShapeWhat than to the part), such parts will not be found.
5409         #        @image html get_in_place_lost_part.png
5410         #
5411         #  @ref swig_GetInPlace "Example"
5412         @ManageTransactions("ShapesOp")
5413         def GetInPlace(self, theShapeWhere, theShapeWhat, isNewImplementation = False, theName=None):
5414             """
5415             Get sub-shape(s) of theShapeWhere, which are
5416             coincident with  theShapeWhat or could be a part of it.
5417
5418             Parameters:
5419                 theShapeWhere Shape to find sub-shapes of.
5420                 theShapeWhat Shape, specifying what to find.
5421                 isNewImplementation Implementation of GetInPlace functionality
5422                                     (default = False, old alghorithm based on shape properties)
5423                 theName Object name; when specified, this parameter is used
5424                         for result publication in the study. Otherwise, if automatic
5425                         publication is switched on, default value is used for result name.
5426
5427             Returns:
5428                 Group of all found sub-shapes or a single found sub-shape.
5429
5430
5431             Note:
5432                 This function has a restriction on argument shapes.
5433                 If theShapeWhere has curved parts with significantly
5434                 outstanding centres (i.e. the mass centre of a part is closer to
5435                 theShapeWhat than to the part), such parts will not be found.
5436             """
5437             # Example: see GEOM_TestOthers.py
5438             anObj = None
5439             if isNewImplementation:
5440                 anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
5441             else:
5442                 anObj = self.ShapesOp.GetInPlaceOld(theShapeWhere, theShapeWhat)
5443                 pass
5444             RaiseIfFailed("GetInPlace", self.ShapesOp)
5445             self._autoPublish(anObj, theName, "inplace")
5446             return anObj
5447
5448         ## Get sub-shape(s) of \a theShapeWhere, which are
5449         #  coincident with \a theShapeWhat or could be a part of it.
5450         #
5451         #  Implementation of this method is based on a saved history of an operation,
5452         #  produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
5453         #  arguments (an argument shape or a sub-shape of an argument shape).
5454         #  The operation could be the Partition or one of boolean operations,
5455         #  performed on simple shapes (not on compounds).
5456         #
5457         #  @param theShapeWhere Shape to find sub-shapes of.
5458         #  @param theShapeWhat Shape, specifying what to find (must be in the
5459         #                      building history of the ShapeWhere).
5460         #  @param theName Object name; when specified, this parameter is used
5461         #         for result publication in the study. Otherwise, if automatic
5462         #         publication is switched on, default value is used for result name.
5463         #
5464         #  @return Group of all found sub-shapes or a single found sub-shape.
5465         #
5466         #  @ref swig_GetInPlace "Example"
5467         @ManageTransactions("ShapesOp")
5468         def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat, theName=None):
5469             """
5470             Implementation of this method is based on a saved history of an operation,
5471             produced theShapeWhere. The theShapeWhat must be among this operation's
5472             arguments (an argument shape or a sub-shape of an argument shape).
5473             The operation could be the Partition or one of boolean operations,
5474             performed on simple shapes (not on compounds).
5475
5476             Parameters:
5477                 theShapeWhere Shape to find sub-shapes of.
5478                 theShapeWhat Shape, specifying what to find (must be in the
5479                                 building history of the ShapeWhere).
5480                 theName Object name; when specified, this parameter is used
5481                         for result publication in the study. Otherwise, if automatic
5482                         publication is switched on, default value is used for result name.
5483
5484             Returns:
5485                 Group of all found sub-shapes or a single found sub-shape.
5486             """
5487             # Example: see GEOM_TestOthers.py
5488             anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
5489             RaiseIfFailed("GetInPlaceByHistory", self.ShapesOp)
5490             self._autoPublish(anObj, theName, "inplace")
5491             return anObj
5492
5493         ## Get sub-shape of theShapeWhere, which is
5494         #  equal to \a theShapeWhat.
5495         #  @param theShapeWhere Shape to find sub-shape of.
5496         #  @param theShapeWhat Shape, specifying what to find.
5497         #  @param theName Object name; when specified, this parameter is used
5498         #         for result publication in the study. Otherwise, if automatic
5499         #         publication is switched on, default value is used for result name.
5500         #
5501         #  @return New GEOM.GEOM_Object for found sub-shape.
5502         #
5503         #  @ref swig_GetSame "Example"
5504         @ManageTransactions("ShapesOp")
5505         def GetSame(self, theShapeWhere, theShapeWhat, theName=None):
5506             """
5507             Get sub-shape of theShapeWhere, which is
5508             equal to theShapeWhat.
5509
5510             Parameters:
5511                 theShapeWhere Shape to find sub-shape of.
5512                 theShapeWhat Shape, specifying what to find.
5513                 theName Object name; when specified, this parameter is used
5514                         for result publication in the study. Otherwise, if automatic
5515                         publication is switched on, default value is used for result name.
5516
5517             Returns:
5518                 New GEOM.GEOM_Object for found sub-shape.
5519             """
5520             anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
5521             RaiseIfFailed("GetSame", self.ShapesOp)
5522             self._autoPublish(anObj, theName, "sameShape")
5523             return anObj
5524
5525
5526         ## Get sub-shape indices of theShapeWhere, which is
5527         #  equal to \a theShapeWhat.
5528         #  @param theShapeWhere Shape to find sub-shape of.
5529         #  @param theShapeWhat Shape, specifying what to find.
5530         #  @return List of all found sub-shapes indices.
5531         #
5532         #  @ref swig_GetSame "Example"
5533         @ManageTransactions("ShapesOp")
5534         def GetSameIDs(self, theShapeWhere, theShapeWhat):
5535             """
5536             Get sub-shape indices of theShapeWhere, which is
5537             equal to theShapeWhat.
5538
5539             Parameters:
5540                 theShapeWhere Shape to find sub-shape of.
5541                 theShapeWhat Shape, specifying what to find.
5542
5543             Returns:
5544                 List of all found sub-shapes indices.
5545             """
5546             anObj = self.ShapesOp.GetSameIDs(theShapeWhere, theShapeWhat)
5547             RaiseIfFailed("GetSameIDs", self.ShapesOp)
5548             return anObj
5549
5550
5551         # end of l4_obtain
5552         ## @}
5553
5554         ## @addtogroup l4_access
5555         ## @{
5556
5557         ## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
5558         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5559         #  @param aShape Shape to get sub-shape of.
5560         #  @param ListOfID List of sub-shapes indices.
5561         #  @param theName Object name; when specified, this parameter is used
5562         #         for result publication in the study. Otherwise, if automatic
5563         #         publication is switched on, default value is used for result name.
5564         #
5565         #  @return Found sub-shape.
5566         #
5567         #  @ref swig_all_decompose "Example"
5568         def GetSubShape(self, aShape, ListOfID, theName=None):
5569             """
5570             Obtain a composite sub-shape of aShape, composed from sub-shapes
5571             of aShape, selected by their unique IDs inside aShape
5572
5573             Parameters:
5574                 aShape Shape to get sub-shape of.
5575                 ListOfID List of sub-shapes indices.
5576                 theName Object name; when specified, this parameter is used
5577                         for result publication in the study. Otherwise, if automatic
5578                         publication is switched on, default value is used for result name.
5579
5580             Returns:
5581                 Found sub-shape.
5582             """
5583             # Example: see GEOM_TestAll.py
5584             anObj = self.AddSubShape(aShape,ListOfID)
5585             self._autoPublish(anObj, theName, "subshape")
5586             return anObj
5587
5588         ## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
5589         #  of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
5590         #  @param aShape Shape to get sub-shape of.
5591         #  @param aSubShape Sub-shapes of aShape.
5592         #  @return ID of found sub-shape.
5593         #
5594         #  @ref swig_all_decompose "Example"
5595         @ManageTransactions("LocalOp")
5596         def GetSubShapeID(self, aShape, aSubShape):
5597             """
5598             Obtain unique ID of sub-shape aSubShape inside aShape
5599             of aShape, selected by their unique IDs inside aShape
5600
5601             Parameters:
5602                aShape Shape to get sub-shape of.
5603                aSubShape Sub-shapes of aShape.
5604
5605             Returns:
5606                ID of found sub-shape.
5607             """
5608             # Example: see GEOM_TestAll.py
5609             anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
5610             RaiseIfFailed("GetSubShapeIndex", self.LocalOp)
5611             return anID
5612
5613         ## Obtain unique IDs of sub-shapes <VAR>aSubShapes</VAR> inside <VAR>aShape</VAR>
5614         #  This function is provided for performance purpose. The complexity is O(n) with n
5615         #  the number of subobjects of aShape
5616         #  @param aShape Shape to get sub-shape of.
5617         #  @param aSubShapes Sub-shapes of aShape.
5618         #  @return list of IDs of found sub-shapes.
5619         #
5620         #  @ref swig_all_decompose "Example"
5621         @ManageTransactions("ShapesOp")
5622         def GetSubShapesIDs(self, aShape, aSubShapes):
5623             """
5624             Obtain a list of IDs of sub-shapes aSubShapes inside aShape
5625             This function is provided for performance purpose. The complexity is O(n) with n
5626             the number of subobjects of aShape
5627
5628             Parameters:
5629                aShape Shape to get sub-shape of.
5630                aSubShapes Sub-shapes of aShape.
5631
5632             Returns:
5633                List of IDs of found sub-shape.
5634             """
5635             # Example: see GEOM_TestAll.py
5636             anIDs = self.ShapesOp.GetSubShapesIndices(aShape, aSubShapes)
5637             RaiseIfFailed("GetSubShapesIndices", self.ShapesOp)
5638             return anIDs
5639
5640         # end of l4_access
5641         ## @}
5642
5643         ## @addtogroup l4_decompose
5644         ## @{
5645
5646         ## Get all sub-shapes and groups of \a theShape,
5647         #  that were created already by any other methods.
5648         #  @param theShape Any shape.
5649         #  @param theGroupsOnly If this parameter is TRUE, only groups will be
5650         #                       returned, else all found sub-shapes and groups.
5651         #  @return List of existing sub-objects of \a theShape.
5652         #
5653         #  @ref swig_all_decompose "Example"
5654         @ManageTransactions("ShapesOp")
5655         def GetExistingSubObjects(self, theShape, theGroupsOnly = False):
5656             """
5657             Get all sub-shapes and groups of theShape,
5658             that were created already by any other methods.
5659
5660             Parameters:
5661                 theShape Any shape.
5662                 theGroupsOnly If this parameter is TRUE, only groups will be
5663                                  returned, else all found sub-shapes and groups.
5664
5665             Returns:
5666                 List of existing sub-objects of theShape.
5667             """
5668             # Example: see GEOM_TestAll.py
5669             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly)
5670             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5671             return ListObj
5672
5673         ## Get all groups of \a theShape,
5674         #  that were created already by any other methods.
5675         #  @param theShape Any shape.
5676         #  @return List of existing groups of \a theShape.
5677         #
5678         #  @ref swig_all_decompose "Example"
5679         @ManageTransactions("ShapesOp")
5680         def GetGroups(self, theShape):
5681             """
5682             Get all groups of theShape,
5683             that were created already by any other methods.
5684
5685             Parameters:
5686                 theShape Any shape.
5687
5688             Returns:
5689                 List of existing groups of theShape.
5690             """
5691             # Example: see GEOM_TestAll.py
5692             ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True)
5693             RaiseIfFailed("GetExistingSubObjects", self.ShapesOp)
5694             return ListObj
5695
5696         ## Explode a shape on sub-shapes of a given type.
5697         #  If the shape itself matches the type, it is also returned.
5698         #  @param aShape Shape to be exploded.
5699         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5700         #  @param theName Object name; when specified, this parameter is used
5701         #         for result publication in the study. Otherwise, if automatic
5702         #         publication is switched on, default value is used for result name.
5703         #
5704         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5705         #
5706         #  @ref swig_all_decompose "Example"
5707         @ManageTransactions("ShapesOp")
5708         def SubShapeAll(self, aShape, aType, theName=None):
5709             """
5710             Explode a shape on sub-shapes of a given type.
5711             If the shape itself matches the type, it is also returned.
5712
5713             Parameters:
5714                 aShape Shape to be exploded.
5715                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5716                 theName Object name; when specified, this parameter is used
5717                         for result publication in the study. Otherwise, if automatic
5718                         publication is switched on, default value is used for result name.
5719
5720             Returns:
5721                 List of sub-shapes of type theShapeType, contained in theShape.
5722             """
5723             # Example: see GEOM_TestAll.py
5724             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), False)
5725             RaiseIfFailed("SubShapeAll", self.ShapesOp)
5726             self._autoPublish(ListObj, theName, "subshape")
5727             return ListObj
5728
5729         ## Explode a shape on sub-shapes of a given type.
5730         #  @param aShape Shape to be exploded.
5731         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5732         #  @return List of IDs of sub-shapes.
5733         #
5734         #  @ref swig_all_decompose "Example"
5735         @ManageTransactions("ShapesOp")
5736         def SubShapeAllIDs(self, aShape, aType):
5737             """
5738             Explode a shape on sub-shapes of a given type.
5739
5740             Parameters:
5741                 aShape Shape to be exploded (see geompy.ShapeType)
5742                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5743
5744             Returns:
5745                 List of IDs of sub-shapes.
5746             """
5747             ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), False)
5748             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5749             return ListObj
5750
5751         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5752         #  selected by their indices in list of all sub-shapes of type <VAR>aType</VAR>.
5753         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5754         #  @param aShape Shape to get sub-shape of.
5755         #  @param ListOfInd List of sub-shapes indices.
5756         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5757         #  @param theName Object name; when specified, this parameter is used
5758         #         for result publication in the study. Otherwise, if automatic
5759         #         publication is switched on, default value is used for result name.
5760         #
5761         #  @return A compound of sub-shapes of aShape.
5762         #
5763         #  @ref swig_all_decompose "Example"
5764         def SubShape(self, aShape, aType, ListOfInd, theName=None):
5765             """
5766             Obtain a compound of sub-shapes of aShape,
5767             selected by their indices in list of all sub-shapes of type aType.
5768             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5769
5770             Parameters:
5771                 aShape Shape to get sub-shape of.
5772                 ListOfID List of sub-shapes indices.
5773                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5774                 theName Object name; when specified, this parameter is used
5775                         for result publication in the study. Otherwise, if automatic
5776                         publication is switched on, default value is used for result name.
5777
5778             Returns:
5779                 A compound of sub-shapes of aShape.
5780             """
5781             # Example: see GEOM_TestAll.py
5782             ListOfIDs = []
5783             AllShapeIDsList = self.SubShapeAllIDs(aShape, EnumToLong( aType ))
5784             for ind in ListOfInd:
5785                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5786             # note: auto-publishing is done in self.GetSubShape()
5787             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5788             return anObj
5789
5790         ## Explode a shape on sub-shapes of a given type.
5791         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5792         #  If the shape itself matches the type, it is also returned.
5793         #  @param aShape Shape to be exploded.
5794         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5795         #  @param theName Object name; when specified, this parameter is used
5796         #         for result publication in the study. Otherwise, if automatic
5797         #         publication is switched on, default value is used for result name.
5798         #
5799         #  @return List of sub-shapes of type theShapeType, contained in theShape.
5800         #
5801         #  @ref swig_SubShapeAllSorted "Example"
5802         @ManageTransactions("ShapesOp")
5803         def SubShapeAllSortedCentres(self, aShape, aType, theName=None):
5804             """
5805             Explode a shape on sub-shapes of a given type.
5806             Sub-shapes will be sorted by coordinates of their gravity centers.
5807             If the shape itself matches the type, it is also returned.
5808
5809             Parameters:
5810                 aShape Shape to be exploded.
5811                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5812                 theName Object name; when specified, this parameter is used
5813                         for result publication in the study. Otherwise, if automatic
5814                         publication is switched on, default value is used for result name.
5815
5816             Returns:
5817                 List of sub-shapes of type theShapeType, contained in theShape.
5818             """
5819             # Example: see GEOM_TestAll.py
5820             ListObj = self.ShapesOp.MakeAllSubShapes(aShape, EnumToLong( aType ), True)
5821             RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp)
5822             self._autoPublish(ListObj, theName, "subshape")
5823             return ListObj
5824
5825         ## Explode a shape on sub-shapes of a given type.
5826         #  Sub-shapes will be sorted by coordinates of their gravity centers.
5827         #  @param aShape Shape to be exploded.
5828         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5829         #  @return List of IDs of sub-shapes.
5830         #
5831         #  @ref swig_all_decompose "Example"
5832         @ManageTransactions("ShapesOp")
5833         def SubShapeAllSortedCentresIDs(self, aShape, aType):
5834             """
5835             Explode a shape on sub-shapes of a given type.
5836             Sub-shapes will be sorted by coordinates of their gravity centers.
5837
5838             Parameters:
5839                 aShape Shape to be exploded.
5840                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5841
5842             Returns:
5843                 List of IDs of sub-shapes.
5844             """
5845             ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
5846             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5847             return ListIDs
5848
5849         ## Obtain a compound of sub-shapes of <VAR>aShape</VAR>,
5850         #  selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
5851         #  Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5852         #  @param aShape Shape to get sub-shape of.
5853         #  @param ListOfInd List of sub-shapes indices.
5854         #  @param aType Type of sub-shapes to be retrieved (see ShapeType())
5855         #  @param theName Object name; when specified, this parameter is used
5856         #         for result publication in the study. Otherwise, if automatic
5857         #         publication is switched on, default value is used for result name.
5858         #
5859         #  @return A compound of sub-shapes of aShape.
5860         #
5861         #  @ref swig_all_decompose "Example"
5862         def SubShapeSortedCentres(self, aShape, aType, ListOfInd, theName=None):
5863             """
5864             Obtain a compound of sub-shapes of aShape,
5865             selected by they indices in sorted list of all sub-shapes of type aType.
5866             Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
5867
5868             Parameters:
5869                 aShape Shape to get sub-shape of.
5870                 ListOfID List of sub-shapes indices.
5871                 aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
5872                 theName Object name; when specified, this parameter is used
5873                         for result publication in the study. Otherwise, if automatic
5874                         publication is switched on, default value is used for result name.
5875
5876             Returns:
5877                 A compound of sub-shapes of aShape.
5878             """
5879             # Example: see GEOM_TestAll.py
5880             ListOfIDs = []
5881             AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, EnumToLong( aType ))
5882             for ind in ListOfInd:
5883                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5884             # note: auto-publishing is done in self.GetSubShape()
5885             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
5886             return anObj
5887
5888         ## Extract shapes (excluding the main shape) of given type.
5889         #  @param aShape The shape.
5890         #  @param aType  The shape type (see ShapeType())
5891         #  @param isSorted Boolean flag to switch sorting on/off.
5892         #  @param theName Object name; when specified, this parameter is used
5893         #         for result publication in the study. Otherwise, if automatic
5894         #         publication is switched on, default value is used for result name.
5895         #
5896         #  @return List of sub-shapes of type aType, contained in aShape.
5897         #
5898         #  @ref swig_FilletChamfer "Example"
5899         @ManageTransactions("ShapesOp")
5900         def ExtractShapes(self, aShape, aType, isSorted = False, theName=None):
5901             """
5902             Extract shapes (excluding the main shape) of given type.
5903
5904             Parameters:
5905                 aShape The shape.
5906                 aType  The shape type (see geompy.ShapeType)
5907                 isSorted Boolean flag to switch sorting on/off.
5908                 theName Object name; when specified, this parameter is used
5909                         for result publication in the study. Otherwise, if automatic
5910                         publication is switched on, default value is used for result name.
5911
5912             Returns:
5913                 List of sub-shapes of type aType, contained in aShape.
5914             """
5915             # Example: see GEOM_TestAll.py
5916             ListObj = self.ShapesOp.ExtractSubShapes(aShape, EnumToLong( aType ), isSorted)
5917             RaiseIfFailed("ExtractSubShapes", self.ShapesOp)
5918             self._autoPublish(ListObj, theName, "subshape")
5919             return ListObj
5920
5921         ## Get a set of sub-shapes defined by their unique IDs inside <VAR>aShape</VAR>
5922         #  @param aShape Main shape.
5923         #  @param anIDs List of unique IDs of sub-shapes inside <VAR>aShape</VAR>.
5924         #  @param theName Object name; when specified, this parameter is used
5925         #         for result publication in the study. Otherwise, if automatic
5926         #         publication is switched on, default value is used for result name.
5927         #  @return List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5928         #
5929         #  @ref swig_all_decompose "Example"
5930         @ManageTransactions("ShapesOp")
5931         def SubShapes(self, aShape, anIDs, theName=None):
5932             """
5933             Get a set of sub-shapes defined by their unique IDs inside theMainShape
5934
5935             Parameters:
5936                 aShape Main shape.
5937                 anIDs List of unique IDs of sub-shapes inside theMainShape.
5938                 theName Object name; when specified, this parameter is used
5939                         for result publication in the study. Otherwise, if automatic
5940                         publication is switched on, default value is used for result name.
5941
5942             Returns:
5943                 List of GEOM.GEOM_Object, corresponding to found sub-shapes.
5944             """
5945             # Example: see GEOM_TestAll.py
5946             ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs)
5947             RaiseIfFailed("SubShapes", self.ShapesOp)
5948             self._autoPublish(ListObj, theName, "subshape")
5949             return ListObj
5950
5951         # end of l4_decompose
5952         ## @}
5953
5954         ## @addtogroup l4_decompose_d
5955         ## @{
5956
5957         ## Deprecated method
5958         #  It works like SubShapeAllSortedCentres(), but wrongly
5959         #  defines centres of faces, shells and solids.
5960         @ManageTransactions("ShapesOp")
5961         def SubShapeAllSorted(self, aShape, aType, theName=None):
5962             """
5963             Deprecated method
5964             It works like geompy.SubShapeAllSortedCentres, but wrongly
5965             defines centres of faces, shells and solids.
5966             """
5967             ListObj = self.ShapesOp.MakeExplode(aShape, EnumToLong( aType ), True)
5968             RaiseIfFailed("MakeExplode", self.ShapesOp)
5969             self._autoPublish(ListObj, theName, "subshape")
5970             return ListObj
5971
5972         ## Deprecated method
5973         #  It works like SubShapeAllSortedCentresIDs(), but wrongly
5974         #  defines centres of faces, shells and solids.
5975         @ManageTransactions("ShapesOp")
5976         def SubShapeAllSortedIDs(self, aShape, aType):
5977             """
5978             Deprecated method
5979             It works like geompy.SubShapeAllSortedCentresIDs, but wrongly
5980             defines centres of faces, shells and solids.
5981             """
5982             ListIDs = self.ShapesOp.SubShapeAllIDs(aShape, EnumToLong( aType ), True)
5983             RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
5984             return ListIDs
5985
5986         ## Deprecated method
5987         #  It works like SubShapeSortedCentres(), but has a bug
5988         #  (wrongly defines centres of faces, shells and solids).
5989         def SubShapeSorted(self, aShape, aType, ListOfInd, theName=None):
5990             """
5991             Deprecated method
5992             It works like geompy.SubShapeSortedCentres, but has a bug
5993             (wrongly defines centres of faces, shells and solids).
5994             """
5995             ListOfIDs = []
5996             AllShapeIDsList = self.SubShapeAllSortedIDs(aShape, EnumToLong( aType ))
5997             for ind in ListOfInd:
5998                 ListOfIDs.append(AllShapeIDsList[ind - 1])
5999             # note: auto-publishing is done in self.GetSubShape()
6000             anObj = self.GetSubShape(aShape, ListOfIDs, theName)
6001             return anObj
6002
6003         # end of l4_decompose_d
6004         ## @}
6005
6006         ## @addtogroup l3_healing
6007         ## @{
6008
6009         ## Apply a sequence of Shape Healing operators to the given object.
6010         #  @param theShape Shape to be processed.
6011         #  @param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6012         #  @param theParameters List of names of parameters
6013         #                    ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6014         #  @param theValues List of values of parameters, in the same order
6015         #                    as parameters are listed in <VAR>theParameters</VAR> list.
6016         #  @param theName Object name; when specified, this parameter is used
6017         #         for result publication in the study. Otherwise, if automatic
6018         #         publication is switched on, default value is used for result name.
6019         #
6020         #  <b> Operators and Parameters: </b> \n
6021         #
6022         #  * \b FixShape - corrects invalid shapes. \n
6023         #  - \b FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them. \n
6024         #  - \b FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction. \n
6025         #
6026         #  * \b FixFaceSize - removes small faces, such as spots and strips.\n
6027         #  - \b FixFaceSize.Tolerance - defines minimum possible face size. \n
6028         #  - \b DropSmallEdges - removes edges, which merge with neighbouring edges. \n
6029         #  - \b DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.\n
6030         #
6031         #  * \b SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical
6032         #    surfaces in segments using a certain angle. \n
6033         #  - \b SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6034         #    if Angle=180, four if Angle=90, etc). \n
6035         #  - \b SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.\n
6036         #
6037         #  * \b SplitClosedFaces - splits closed faces in segments.
6038         #    The number of segments depends on the number of splitting points.\n
6039         #  - \b SplitClosedFaces.NbSplitPoints - the number of splitting points.\n
6040         #
6041         #  * \b SplitContinuity - splits shapes to reduce continuities of curves and surfaces.\n
6042         #  - \b SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.\n
6043         #  - \b SplitContinuity.SurfaceContinuity - required continuity for surfaces.\n
6044         #  - \b SplitContinuity.CurveContinuity - required continuity for curves.\n
6045         #   This and the previous parameters can take the following values:\n
6046         #   \b Parametric \b Continuity \n
6047         #   \b C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces
6048         #   are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
6049         #   \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
6050         #    ruling out sharp edges).\n
6051         #   \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
6052         #       are of the same magnitude).\n
6053         #   \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
6054         #    or surfaces (d/du C(u)) are the same at junction. \n
6055         #   \b Geometric \b Continuity \n
6056         #   \b G1: first derivatives are proportional at junction.\n
6057         #   The curve tangents thus have the same direction, but not necessarily the same magnitude.
6058         #      i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).\n
6059         #   \b G2: first and second derivatives are proportional at junction.
6060         #   As the names imply, geometric continuity requires the geometry to be continuous, while parametric
6061         #    continuity requires that the underlying parameterization was continuous as well.
6062         #   Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.\n
6063         #
6064         #  * \b BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:\n
6065         #  - \b BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.\n
6066         #  - \b BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.\n
6067         #  - \b BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.\n
6068         #  - \b BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation
6069         #       with the specified parameters.\n
6070         #  - \b BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation
6071         #       with the specified parameters.\n
6072         #  - \b BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.\n
6073         #  - \b BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.\n
6074         #  - \b BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.\n
6075         #  - \b BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.\n
6076         #
6077         #  * \b ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.\n
6078         #  - \b ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.\n
6079         #  - \b ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.\n
6080         #  - \b ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.\n
6081         #  - \b ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.\n
6082         #
6083         #  * \b SameParameter - fixes edges of 2D and 3D curves not having the same parameter.\n
6084         #  - \b SameParameter.Tolerance3d - defines tolerance for fixing of edges.\n
6085         #
6086         #
6087         #  @return New GEOM.GEOM_Object, containing processed shape.
6088         #
6089         #  \n @ref tui_shape_processing "Example"
6090         @ManageTransactions("HealOp")
6091         def ProcessShape(self, theShape, theOperators, theParameters, theValues, theName=None):
6092             """
6093             Apply a sequence of Shape Healing operators to the given object.
6094
6095             Parameters:
6096                 theShape Shape to be processed.
6097                 theValues List of values of parameters, in the same order
6098                           as parameters are listed in theParameters list.
6099                 theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.).
6100                 theParameters List of names of parameters
6101                               ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.).
6102                 theName Object name; when specified, this parameter is used
6103                         for result publication in the study. Otherwise, if automatic
6104                         publication is switched on, default value is used for result name.
6105
6106                 Operators and Parameters:
6107
6108                  * FixShape - corrects invalid shapes.
6109                      * FixShape.Tolerance3d - work tolerance for detection of the problems and correction of them.
6110                      * FixShape.MaxTolerance3d - maximal possible tolerance of the shape after correction.
6111                  * FixFaceSize - removes small faces, such as spots and strips.
6112                      * FixFaceSize.Tolerance - defines minimum possible face size.
6113                      * DropSmallEdges - removes edges, which merge with neighbouring edges.
6114                      * DropSmallEdges.Tolerance3d - defines minimum possible distance between two parallel edges.
6115                  * SplitAngle - splits faces based on conical surfaces, surfaces of revolution and cylindrical surfaces
6116                                 in segments using a certain angle.
6117                      * SplitAngle.Angle - the central angle of the resulting segments (i.e. we obtain two segments
6118                                           if Angle=180, four if Angle=90, etc).
6119                      * SplitAngle.MaxTolerance - maximum possible tolerance among the resulting segments.
6120                  * SplitClosedFaces - splits closed faces in segments. The number of segments depends on the number of
6121                                       splitting points.
6122                      * SplitClosedFaces.NbSplitPoints - the number of splitting points.
6123                  * SplitContinuity - splits shapes to reduce continuities of curves and surfaces.
6124                      * SplitContinuity.Tolerance3d - 3D tolerance for correction of geometry.
6125                      * SplitContinuity.SurfaceContinuity - required continuity for surfaces.
6126                      * SplitContinuity.CurveContinuity - required continuity for curves.
6127                        This and the previous parameters can take the following values:
6128
6129                        Parametric Continuity:
6130                        C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
6131                                                    coincidental. The curves or surfaces may still meet at an angle,
6132                                                    giving rise to a sharp corner or edge).
6133                        C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces
6134                                                    are parallel, ruling out sharp edges).
6135                        C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves
6136                                                   or surfaces are of the same magnitude).
6137                        CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
6138                           curves or surfaces (d/du C(u)) are the same at junction.
6139
6140                        Geometric Continuity:
6141                        G1: first derivatives are proportional at junction.
6142                            The curve tangents thus have the same direction, but not necessarily the same magnitude.
6143                            i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b, k*c).
6144                        G2: first and second derivatives are proportional at junction. As the names imply,
6145                            geometric continuity requires the geometry to be continuous, while parametric continuity requires
6146                            that the underlying parameterization was continuous as well. Parametric continuity of order n implies
6147                            geometric continuity of order n, but not vice-versa.
6148                  * BsplineRestriction - converts curves and surfaces to Bsplines and processes them with the following parameters:
6149                      * BSplineRestriction.SurfaceMode - approximation of surfaces if restriction is necessary.
6150                      * BSplineRestriction.Curve3dMode - conversion of any 3D curve to BSpline and approximation.
6151                      * BSplineRestriction.Curve2dMode - conversion of any 2D curve to BSpline and approximation.
6152                      * BSplineRestriction.Tolerance3d - defines the possibility of surfaces and 3D curves approximation with
6153                                                         the specified parameters.
6154                      * BSplineRestriction.Tolerance2d - defines the possibility of surfaces and 2D curves approximation with
6155                                                         the specified parameters.
6156                      * BSplineRestriction.RequiredDegree - required degree of the resulting BSplines.
6157                      * BSplineRestriction.RequiredNbSegments - required maximum number of segments of resultant BSplines.
6158                      * BSplineRestriction.Continuity3d - continuity of the resulting surfaces and 3D curves.
6159                      * BSplineRestriction.Continuity2d - continuity of the resulting 2D curves.
6160                  * ToBezier - converts curves and surfaces of any type to Bezier curves and surfaces.
6161                      * ToBezier.SurfaceMode - if checked in, allows conversion of surfaces.
6162                      * ToBezier.Curve3dMode - if checked in, allows conversion of 3D curves.
6163                      * ToBezier.Curve2dMode - if checked in, allows conversion of 2D curves.
6164                      * ToBezier.MaxTolerance - defines tolerance for detection and correction of problems.
6165                  * SameParameter - fixes edges of 2D and 3D curves not having the same parameter.
6166                      * SameParameter.Tolerance3d - defines tolerance for fixing of edges.
6167
6168             Returns:
6169                 New GEOM.GEOM_Object, containing processed shape.
6170
6171             Note: For more information look through SALOME Geometry User's Guide->
6172                   -> Introduction to Geometry-> Repairing Operations-> Shape Processing
6173             """
6174             # Example: see GEOM_TestHealing.py
6175             theValues,Parameters = ParseList(theValues)
6176             anObj = self.HealOp.ProcessShape(theShape, theOperators, theParameters, theValues)
6177             # To avoid script failure in case of good argument shape
6178             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6179                 return theShape
6180             RaiseIfFailed("ProcessShape", self.HealOp)
6181             for string in (theOperators + theParameters):
6182                 Parameters = ":" + Parameters
6183                 pass
6184             anObj.SetParameters(Parameters)
6185             self._autoPublish(anObj, theName, "healed")
6186             return anObj
6187
6188         ## Remove faces from the given object (shape).
6189         #  @param theObject Shape to be processed.
6190         #  @param theFaces Indices of faces to be removed, if EMPTY then the method
6191         #                  removes ALL faces of the given object.
6192         #  @param theName Object name; when specified, this parameter is used
6193         #         for result publication in the study. Otherwise, if automatic
6194         #         publication is switched on, default value is used for result name.
6195         #
6196         #  @return New GEOM.GEOM_Object, containing processed shape.
6197         #
6198         #  @ref tui_suppress_faces "Example"
6199         @ManageTransactions("HealOp")
6200         def SuppressFaces(self, theObject, theFaces, theName=None):
6201             """
6202             Remove faces from the given object (shape).
6203
6204             Parameters:
6205                 theObject Shape to be processed.
6206                 theFaces Indices of faces to be removed, if EMPTY then the method
6207                          removes ALL faces of the given object.
6208                 theName Object name; when specified, this parameter is used
6209                         for result publication in the study. Otherwise, if automatic
6210                         publication is switched on, default value is used for result name.
6211
6212             Returns:
6213                 New GEOM.GEOM_Object, containing processed shape.
6214             """
6215             # Example: see GEOM_TestHealing.py
6216             anObj = self.HealOp.SuppressFaces(theObject, theFaces)
6217             RaiseIfFailed("SuppressFaces", self.HealOp)
6218             self._autoPublish(anObj, theName, "suppressFaces")
6219             return anObj
6220
6221         ## Sewing of some shapes into single shape.
6222         #  @param ListShape Shapes to be processed.
6223         #  @param theTolerance Required tolerance value.
6224         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6225         #  @param theName Object name; when specified, this parameter is used
6226         #         for result publication in the study. Otherwise, if automatic
6227         #         publication is switched on, default value is used for result name.
6228         #
6229         #  @return New GEOM.GEOM_Object, containing processed shape.
6230         #
6231         #  @ref tui_sewing "Example"
6232         def MakeSewing(self, ListShape, theTolerance, AllowNonManifold=False, theName=None):
6233             """
6234             Sewing of some shapes into single shape.
6235
6236             Parameters:
6237                 ListShape Shapes to be processed.
6238                 theTolerance Required tolerance value.
6239                 AllowNonManifold Flag that allows non-manifold sewing.
6240                 theName Object name; when specified, this parameter is used
6241                         for result publication in the study. Otherwise, if automatic
6242                         publication is switched on, default value is used for result name.
6243
6244             Returns:
6245                 New GEOM.GEOM_Object, containing processed shape.
6246             """
6247             # Example: see GEOM_TestHealing.py
6248             comp = self.MakeCompound(ListShape)
6249             # note: auto-publishing is done in self.Sew()
6250             anObj = self.Sew(comp, theTolerance, AllowNonManifold, theName)
6251             return anObj
6252
6253         ## Sewing of the given object.
6254         #  @param theObject Shape to be processed.
6255         #  @param theTolerance Required tolerance value.
6256         #  @param AllowNonManifold Flag that allows non-manifold sewing.
6257         #  @param theName Object name; when specified, this parameter is used
6258         #         for result publication in the study. Otherwise, if automatic
6259         #         publication is switched on, default value is used for result name.
6260         #
6261         #  @return New GEOM.GEOM_Object, containing processed shape.
6262         @ManageTransactions("HealOp")
6263         def Sew(self, theObject, theTolerance, AllowNonManifold=False, theName=None):
6264             """
6265             Sewing of the given object.
6266
6267             Parameters:
6268                 theObject Shape to be processed.
6269                 theTolerance Required tolerance value.
6270                 AllowNonManifold Flag that allows non-manifold sewing.
6271                 theName Object name; when specified, this parameter is used
6272                         for result publication in the study. Otherwise, if automatic
6273                         publication is switched on, default value is used for result name.
6274
6275             Returns:
6276                 New GEOM.GEOM_Object, containing processed shape.
6277             """
6278             # Example: see MakeSewing() above
6279             theTolerance,Parameters = ParseParameters(theTolerance)
6280             if AllowNonManifold:
6281                 anObj = self.HealOp.SewAllowNonManifold(theObject, theTolerance)
6282             else:
6283                 anObj = self.HealOp.Sew(theObject, theTolerance)
6284             # To avoid script failure in case of good argument shape
6285             if self.HealOp.GetErrorCode() == "ShHealOper_NotError_msg":
6286                 return theObject
6287             RaiseIfFailed("Sew", self.HealOp)
6288             anObj.SetParameters(Parameters)
6289             self._autoPublish(anObj, theName, "sewed")
6290             return anObj
6291
6292         ## Rebuild the topology of theCompound of solids by removing
6293         #  of the faces that are shared by several solids.
6294         #  @param theCompound Shape to be processed.
6295         #  @param theName Object name; when specified, this parameter is used
6296         #         for result publication in the study. Otherwise, if automatic
6297         #         publication is switched on, default value is used for result name.
6298         #
6299         #  @return New GEOM.GEOM_Object, containing processed shape.
6300         #
6301         #  @ref tui_remove_webs "Example"
6302         @ManageTransactions("HealOp")
6303         def RemoveInternalFaces (self, theCompound, theName=None):
6304             """
6305             Rebuild the topology of theCompound of solids by removing
6306             of the faces that are shared by several solids.
6307
6308             Parameters:
6309                 theCompound Shape to be processed.
6310                 theName Object name; when specified, this parameter is used
6311                         for result publication in the study. Otherwise, if automatic
6312                         publication is switched on, default value is used for result name.
6313
6314             Returns:
6315                 New GEOM.GEOM_Object, containing processed shape.
6316             """
6317             # Example: see GEOM_TestHealing.py
6318             anObj = self.HealOp.RemoveInternalFaces(theCompound)
6319             RaiseIfFailed("RemoveInternalFaces", self.HealOp)
6320             self._autoPublish(anObj, theName, "removeWebs")
6321             return anObj
6322
6323         ## Remove internal wires and edges from the given object (face).
6324         #  @param theObject Shape to be processed.
6325         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6326         #                  removes ALL internal wires of the given object.
6327         #  @param theName Object name; when specified, this parameter is used
6328         #         for result publication in the study. Otherwise, if automatic
6329         #         publication is switched on, default value is used for result name.
6330         #
6331         #  @return New GEOM.GEOM_Object, containing processed shape.
6332         #
6333         #  @ref tui_suppress_internal_wires "Example"
6334         @ManageTransactions("HealOp")
6335         def SuppressInternalWires(self, theObject, theWires, theName=None):
6336             """
6337             Remove internal wires and edges from the given object (face).
6338
6339             Parameters:
6340                 theObject Shape to be processed.
6341                 theWires Indices of wires to be removed, if EMPTY then the method
6342                          removes ALL internal wires of the given object.
6343                 theName Object name; when specified, this parameter is used
6344                         for result publication in the study. Otherwise, if automatic
6345                         publication is switched on, default value is used for result name.
6346
6347             Returns:
6348                 New GEOM.GEOM_Object, containing processed shape.
6349             """
6350             # Example: see GEOM_TestHealing.py
6351             anObj = self.HealOp.RemoveIntWires(theObject, theWires)
6352             RaiseIfFailed("RemoveIntWires", self.HealOp)
6353             self._autoPublish(anObj, theName, "suppressWires")
6354             return anObj
6355
6356         ## Remove internal closed contours (holes) from the given object.
6357         #  @param theObject Shape to be processed.
6358         #  @param theWires Indices of wires to be removed, if EMPTY then the method
6359         #                  removes ALL internal holes of the given object
6360         #  @param theName Object name; when specified, this parameter is used
6361         #         for result publication in the study. Otherwise, if automatic
6362         #         publication is switched on, default value is used for result name.
6363         #
6364         #  @return New GEOM.GEOM_Object, containing processed shape.
6365         #
6366         #  @ref tui_suppress_holes "Example"
6367         @ManageTransactions("HealOp")
6368         def SuppressHoles(self, theObject, theWires, theName=None):
6369             """
6370             Remove internal closed contours (holes) from the given object.
6371
6372             Parameters:
6373                 theObject Shape to be processed.
6374                 theWires Indices of wires to be removed, if EMPTY then the method
6375                          removes ALL internal holes of the given object
6376                 theName Object name; when specified, this parameter is used
6377                         for result publication in the study. Otherwise, if automatic
6378                         publication is switched on, default value is used for result name.
6379
6380             Returns:
6381                 New GEOM.GEOM_Object, containing processed shape.
6382             """
6383             # Example: see GEOM_TestHealing.py
6384             anObj = self.HealOp.FillHoles(theObject, theWires)
6385             RaiseIfFailed("FillHoles", self.HealOp)
6386             self._autoPublish(anObj, theName, "suppressHoles")
6387             return anObj
6388
6389         ## Close an open wire.
6390         #  @param theObject Shape to be processed.
6391         #  @param theWires Indexes of edge(s) and wire(s) to be closed within <VAR>theObject</VAR>'s shape,
6392         #                  if [ ], then <VAR>theObject</VAR> itself is a wire.
6393         #  @param isCommonVertex If True  : closure by creation of a common vertex,
6394         #                        If False : closure by creation of an edge between ends.
6395         #  @param theName Object name; when specified, this parameter is used
6396         #         for result publication in the study. Otherwise, if automatic
6397         #         publication is switched on, default value is used for result name.
6398         #
6399         #  @return New GEOM.GEOM_Object, containing processed shape.
6400         #
6401         #  @ref tui_close_contour "Example"
6402         @ManageTransactions("HealOp")
6403         def CloseContour(self,theObject, theWires, isCommonVertex, theName=None):
6404             """
6405             Close an open wire.
6406
6407             Parameters:
6408                 theObject Shape to be processed.
6409                 theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
6410                          if [ ], then theObject itself is a wire.
6411                 isCommonVertex If True  : closure by creation of a common vertex,
6412                                If False : closure by creation of an edge between ends.
6413                 theName Object name; when specified, this parameter is used
6414                         for result publication in the study. Otherwise, if automatic
6415                         publication is switched on, default value is used for result name.
6416
6417             Returns:
6418                 New GEOM.GEOM_Object, containing processed shape.
6419             """
6420             # Example: see GEOM_TestHealing.py
6421             anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
6422             RaiseIfFailed("CloseContour", self.HealOp)
6423             self._autoPublish(anObj, theName, "closeContour")
6424             return anObj
6425
6426         ## Addition of a point to a given edge object.
6427         #  @param theObject Shape to be processed.
6428         #  @param theEdgeIndex Index of edge to be divided within theObject's shape,
6429         #                      if -1, then theObject itself is the edge.
6430         #  @param theValue Value of parameter on edge or length parameter,
6431         #                  depending on \a isByParameter.
6432         #  @param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], \n
6433         #                       if FALSE : \a theValue is treated as a length parameter [0..1]
6434         #  @param theName Object name; when specified, this parameter is used
6435         #         for result publication in the study. Otherwise, if automatic
6436         #         publication is switched on, default value is used for result name.
6437         #
6438         #  @return New GEOM.GEOM_Object, containing processed shape.
6439         #
6440         #  @ref tui_add_point_on_edge "Example"
6441         @ManageTransactions("HealOp")
6442         def DivideEdge(self, theObject, theEdgeIndex, theValue, isByParameter, theName=None):
6443             """
6444             Addition of a point to a given edge object.
6445
6446             Parameters:
6447                 theObject Shape to be processed.
6448                 theEdgeIndex Index of edge to be divided within theObject's shape,
6449                              if -1, then theObject itself is the edge.
6450                 theValue Value of parameter on edge or length parameter,
6451                          depending on isByParameter.
6452                 isByParameter If TRUE :  theValue is treated as a curve parameter [0..1],
6453                               if FALSE : theValue is treated as a length parameter [0..1]
6454                 theName Object name; when specified, this parameter is used
6455                         for result publication in the study. Otherwise, if automatic
6456                         publication is switched on, default value is used for result name.
6457
6458             Returns:
6459                 New GEOM.GEOM_Object, containing processed shape.
6460             """
6461             # Example: see GEOM_TestHealing.py
6462             theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
6463             anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
6464             RaiseIfFailed("DivideEdge", self.HealOp)
6465             anObj.SetParameters(Parameters)
6466             self._autoPublish(anObj, theName, "divideEdge")
6467             return anObj
6468
6469         ## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6470         #  @param theWire Wire to minimize the number of C1 continuous edges in.
6471         #  @param theVertices A list of vertices to suppress. If the list
6472         #                     is empty, all vertices in a wire will be assumed.
6473         #  @param theName Object name; when specified, this parameter is used
6474         #         for result publication in the study. Otherwise, if automatic
6475         #         publication is switched on, default value is used for result name.
6476         #
6477         #  @return New GEOM.GEOM_Object with modified wire.
6478         #
6479         #  @ref tui_fuse_collinear_edges "Example"
6480         @ManageTransactions("HealOp")
6481         def FuseCollinearEdgesWithinWire(self, theWire, theVertices = [], theName=None):
6482             """
6483             Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
6484
6485             Parameters:
6486                 theWire Wire to minimize the number of C1 continuous edges in.
6487                 theVertices A list of vertices to suppress. If the list
6488                             is empty, all vertices in a wire will be assumed.
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 with modified wire.
6495             """
6496             anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
6497             RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
6498             self._autoPublish(anObj, theName, "fuseEdges")
6499             return anObj
6500
6501         ## Change orientation of the given object. Updates given shape.
6502         #  @param theObject Shape to be processed.
6503         #  @return Updated <var>theObject</var>
6504         #
6505         #  @ref swig_todo "Example"
6506         @ManageTransactions("HealOp")
6507         def ChangeOrientationShell(self,theObject):
6508             """
6509             Change orientation of the given object. Updates given shape.
6510
6511             Parameters:
6512                 theObject Shape to be processed.
6513
6514             Returns:
6515                 Updated theObject
6516             """
6517             theObject = self.HealOp.ChangeOrientation(theObject)
6518             RaiseIfFailed("ChangeOrientation", self.HealOp)
6519             pass
6520
6521         ## Change orientation of the given object.
6522         #  @param theObject Shape to be processed.
6523         #  @param theName Object name; when specified, this parameter is used
6524         #         for result publication in the study. Otherwise, if automatic
6525         #         publication is switched on, default value is used for result name.
6526         #
6527         #  @return New GEOM.GEOM_Object, containing processed shape.
6528         #
6529         #  @ref swig_todo "Example"
6530         @ManageTransactions("HealOp")
6531         def ChangeOrientationShellCopy(self, theObject, theName=None):
6532             """
6533             Change orientation of the given object.
6534
6535             Parameters:
6536                 theObject Shape to be processed.
6537                 theName Object name; when specified, this parameter is used
6538                         for result publication in the study. Otherwise, if automatic
6539                         publication is switched on, default value is used for result name.
6540
6541             Returns:
6542                 New GEOM.GEOM_Object, containing processed shape.
6543             """
6544             anObj = self.HealOp.ChangeOrientationCopy(theObject)
6545             RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
6546             self._autoPublish(anObj, theName, "reversed")
6547             return anObj
6548
6549         ## Try to limit tolerance of the given object by value \a theTolerance.
6550         #  @param theObject Shape to be processed.
6551         #  @param theTolerance Required tolerance value.
6552         #  @param theName Object name; when specified, this parameter is used
6553         #         for result publication in the study. Otherwise, if automatic
6554         #         publication is switched on, default value is used for result name.
6555         #
6556         #  @return New GEOM.GEOM_Object, containing processed shape.
6557         #
6558         #  @ref tui_limit_tolerance "Example"
6559         @ManageTransactions("HealOp")
6560         def LimitTolerance(self, theObject, theTolerance = 1e-07, theName=None):
6561             """
6562             Try to limit tolerance of the given object by value theTolerance.
6563
6564             Parameters:
6565                 theObject Shape to be processed.
6566                 theTolerance Required tolerance value.
6567                 theName Object name; when specified, this parameter is used
6568                         for result publication in the study. Otherwise, if automatic
6569                         publication is switched on, default value is used for result name.
6570
6571             Returns:
6572                 New GEOM.GEOM_Object, containing processed shape.
6573             """
6574             anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
6575             RaiseIfFailed("LimitTolerance", self.HealOp)
6576             self._autoPublish(anObj, theName, "limitTolerance")
6577             return anObj
6578
6579         ## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6580         #  that constitute a free boundary of the given shape.
6581         #  @param theObject Shape to get free boundary of.
6582         #  @param theName Object name; when specified, this parameter is used
6583         #         for result publication in the study. Otherwise, if automatic
6584         #         publication is switched on, default value is used for result name.
6585         #
6586         #  @return [\a status, \a theClosedWires, \a theOpenWires]
6587         #  \n \a status: FALSE, if an error(s) occured during the method execution.
6588         #  \n \a theClosedWires: Closed wires on the free boundary of the given shape.
6589         #  \n \a theOpenWires: Open wires on the free boundary of the given shape.
6590         #
6591         #  @ref tui_measurement_tools_page "Example"
6592         @ManageTransactions("HealOp")
6593         def GetFreeBoundary(self, theObject, theName=None):
6594             """
6595             Get a list of wires (wrapped in GEOM.GEOM_Object-s),
6596             that constitute a free boundary of the given shape.
6597
6598             Parameters:
6599                 theObject Shape to get free boundary of.
6600                 theName Object name; when specified, this parameter is used
6601                         for result publication in the study. Otherwise, if automatic
6602                         publication is switched on, default value is used for result name.
6603
6604             Returns:
6605                 [status, theClosedWires, theOpenWires]
6606                  status: FALSE, if an error(s) occured during the method execution.
6607                  theClosedWires: Closed wires on the free boundary of the given shape.
6608                  theOpenWires: Open wires on the free boundary of the given shape.
6609             """
6610             # Example: see GEOM_TestHealing.py
6611             anObj = self.HealOp.GetFreeBoundary(theObject)
6612             RaiseIfFailed("GetFreeBoundary", self.HealOp)
6613             self._autoPublish(anObj[1], theName, "closedWire")
6614             self._autoPublish(anObj[2], theName, "openWire")
6615             return anObj
6616
6617         ## Replace coincident faces in theShape by one face.
6618         #  @param theShape Initial shape.
6619         #  @param theTolerance Maximum distance between faces, which can be considered as coincident.
6620         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6621         #                         otherwise all initial shapes.
6622         #  @param theName Object name; when specified, this parameter is used
6623         #         for result publication in the study. Otherwise, if automatic
6624         #         publication is switched on, default value is used for result name.
6625         #
6626         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6627         #
6628         #  @ref tui_glue_faces "Example"
6629         @ManageTransactions("ShapesOp")
6630         def MakeGlueFaces(self, theShape, theTolerance, doKeepNonSolids=True, theName=None):
6631             """
6632             Replace coincident faces in theShape by one face.
6633
6634             Parameters:
6635                 theShape Initial shape.
6636                 theTolerance Maximum distance between faces, which can be considered as coincident.
6637                 doKeepNonSolids If FALSE, only solids will present in the result,
6638                                 otherwise all initial shapes.
6639                 theName Object name; when specified, this parameter is used
6640                         for result publication in the study. Otherwise, if automatic
6641                         publication is switched on, default value is used for result name.
6642
6643             Returns:
6644                 New GEOM.GEOM_Object, containing a copy of theShape without coincident faces.
6645             """
6646             # Example: see GEOM_Spanner.py
6647             theTolerance,Parameters = ParseParameters(theTolerance)
6648             anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
6649             if anObj is None:
6650                 raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
6651             anObj.SetParameters(Parameters)
6652             self._autoPublish(anObj, theName, "glueFaces")
6653             return anObj
6654
6655         ## Find coincident faces in theShape for possible gluing.
6656         #  @param theShape Initial shape.
6657         #  @param theTolerance Maximum distance between faces,
6658         #                      which can be considered as coincident.
6659         #  @param theName Object name; when specified, this parameter is used
6660         #         for result publication in the study. Otherwise, if automatic
6661         #         publication is switched on, default value is used for result name.
6662         #
6663         #  @return GEOM.ListOfGO
6664         #
6665         #  @ref tui_glue_faces "Example"
6666         @ManageTransactions("ShapesOp")
6667         def GetGlueFaces(self, theShape, theTolerance, theName=None):
6668             """
6669             Find coincident faces in theShape for possible gluing.
6670
6671             Parameters:
6672                 theShape Initial shape.
6673                 theTolerance Maximum distance between faces,
6674                              which can be considered as coincident.
6675                 theName Object name; when specified, this parameter is used
6676                         for result publication in the study. Otherwise, if automatic
6677                         publication is switched on, default value is used for result name.
6678
6679             Returns:
6680                 GEOM.ListOfGO
6681             """
6682             anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
6683             RaiseIfFailed("GetGlueFaces", self.ShapesOp)
6684             self._autoPublish(anObj, theName, "facesToGlue")
6685             return anObj
6686
6687         ## Replace coincident faces in theShape by one face
6688         #  in compliance with given list of faces
6689         #  @param theShape Initial shape.
6690         #  @param theTolerance Maximum distance between faces,
6691         #                      which can be considered as coincident.
6692         #  @param theFaces List of faces for gluing.
6693         #  @param doKeepNonSolids If FALSE, only solids will present in the result,
6694         #                         otherwise all initial shapes.
6695         #  @param doGlueAllEdges If TRUE, all coincident edges of <VAR>theShape</VAR>
6696         #                        will be glued, otherwise only the edges,
6697         #                        belonging to <VAR>theFaces</VAR>.
6698         #  @param theName Object name; when specified, this parameter is used
6699         #         for result publication in the study. Otherwise, if automatic
6700         #         publication is switched on, default value is used for result name.
6701         #
6702         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6703         #          without some faces.
6704         #
6705         #  @ref tui_glue_faces "Example"
6706         @ManageTransactions("ShapesOp")
6707         def MakeGlueFacesByList(self, theShape, theTolerance, theFaces,
6708                                 doKeepNonSolids=True, doGlueAllEdges=True, theName=None):
6709             """
6710             Replace coincident faces in theShape by one face
6711             in compliance with given list of faces
6712
6713             Parameters:
6714                 theShape Initial shape.
6715                 theTolerance Maximum distance between faces,
6716                              which can be considered as coincident.
6717                 theFaces List of faces for gluing.
6718                 doKeepNonSolids If FALSE, only solids will present in the result,
6719                                 otherwise all initial shapes.
6720                 doGlueAllEdges If TRUE, all coincident edges of theShape
6721                                will be glued, otherwise only the edges,
6722                                belonging to theFaces.
6723                 theName Object name; when specified, this parameter is used
6724                         for result publication in the study. Otherwise, if automatic
6725                         publication is switched on, default value is used for result name.
6726
6727             Returns:
6728                 New GEOM.GEOM_Object, containing a copy of theShape
6729                     without some faces.
6730             """
6731             anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces,
6732                                                       doKeepNonSolids, doGlueAllEdges)
6733             if anObj is None:
6734                 raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
6735             self._autoPublish(anObj, theName, "glueFaces")
6736             return anObj
6737
6738         ## Replace coincident edges in theShape by one edge.
6739         #  @param theShape Initial shape.
6740         #  @param theTolerance Maximum distance between edges, which can be considered as coincident.
6741         #  @param theName Object name; when specified, this parameter is used
6742         #         for result publication in the study. Otherwise, if automatic
6743         #         publication is switched on, default value is used for result name.
6744         #
6745         #  @return New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6746         #
6747         #  @ref tui_glue_edges "Example"
6748         @ManageTransactions("ShapesOp")
6749         def MakeGlueEdges(self, theShape, theTolerance, theName=None):
6750             """
6751             Replace coincident edges in theShape by one edge.
6752
6753             Parameters:
6754                 theShape Initial shape.
6755                 theTolerance Maximum distance between edges, which can be considered as coincident.
6756                 theName Object name; when specified, this parameter is used
6757                         for result publication in the study. Otherwise, if automatic
6758                         publication is switched on, default value is used for result name.
6759
6760             Returns:
6761                 New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
6762             """
6763             theTolerance,Parameters = ParseParameters(theTolerance)
6764             anObj = self.ShapesOp.MakeGlueEdges(theShape, theTolerance)
6765             if anObj is None:
6766                 raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
6767             anObj.SetParameters(Parameters)
6768             self._autoPublish(anObj, theName, "glueEdges")
6769             return anObj
6770
6771         ## Find coincident edges in theShape for possible gluing.
6772         #  @param theShape Initial shape.
6773         #  @param theTolerance Maximum distance between edges,
6774         #                      which can be considered as coincident.
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         #  @return GEOM.ListOfGO
6780         #
6781         #  @ref tui_glue_edges "Example"
6782         @ManageTransactions("ShapesOp")
6783         def GetGlueEdges(self, theShape, theTolerance, theName=None):
6784             """
6785             Find coincident edges in theShape for possible gluing.
6786
6787             Parameters:
6788                 theShape Initial shape.
6789                 theTolerance Maximum distance between edges,
6790                              which can be considered as coincident.
6791                 theName Object name; when specified, this parameter is used
6792                         for result publication in the study. Otherwise, if automatic
6793                         publication is switched on, default value is used for result name.
6794
6795             Returns:
6796                 GEOM.ListOfGO
6797             """
6798             anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
6799             RaiseIfFailed("GetGlueEdges", self.ShapesOp)
6800             self._autoPublish(anObj, theName, "edgesToGlue")
6801             return anObj
6802
6803         ## Replace coincident edges in theShape by one edge
6804         #  in compliance with given list of edges.
6805         #  @param theShape Initial shape.
6806         #  @param theTolerance Maximum distance between edges,
6807         #                      which can be considered as coincident.
6808         #  @param theEdges List of edges for gluing.
6809         #  @param theName Object name; when specified, this parameter is used
6810         #         for result publication in the study. Otherwise, if automatic
6811         #         publication is switched on, default value is used for result name.
6812         #
6813         #  @return New GEOM.GEOM_Object, containing a copy of theShape
6814         #          without some edges.
6815         #
6816         #  @ref tui_glue_edges "Example"
6817         @ManageTransactions("ShapesOp")
6818         def MakeGlueEdgesByList(self, theShape, theTolerance, theEdges, theName=None):
6819             """
6820             Replace coincident edges in theShape by one edge
6821             in compliance with given list of edges.
6822
6823             Parameters:
6824                 theShape Initial shape.
6825                 theTolerance Maximum distance between edges,
6826                              which can be considered as coincident.
6827                 theEdges List of edges for gluing.
6828                 theName Object name; when specified, this parameter is used
6829                         for result publication in the study. Otherwise, if automatic
6830                         publication is switched on, default value is used for result name.
6831
6832             Returns:
6833                 New GEOM.GEOM_Object, containing a copy of theShape
6834                 without some edges.
6835             """
6836             anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
6837             if anObj is None:
6838                 raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
6839             self._autoPublish(anObj, theName, "glueEdges")
6840             return anObj
6841
6842         # end of l3_healing
6843         ## @}
6844
6845         ## @addtogroup l3_boolean Boolean Operations
6846         ## @{
6847
6848         # -----------------------------------------------------------------------------
6849         # Boolean (Common, Cut, Fuse, Section)
6850         # -----------------------------------------------------------------------------
6851
6852         ## Perform one of boolean operations on two given shapes.
6853         #  @param theShape1 First argument for boolean operation.
6854         #  @param theShape2 Second argument for boolean operation.
6855         #  @param theOperation Indicates the operation to be done:\n
6856         #                      1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6857         #  @param checkSelfInte The flag that tells if the arguments should
6858         #         be checked for self-intersection prior to the operation.
6859         #  @param theName Object name; when specified, this parameter is used
6860         #         for result publication in the study. Otherwise, if automatic
6861         #         publication is switched on, default value is used for result name.
6862         #
6863         #  @note This algorithm doesn't find all types of self-intersections.
6864         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6865         #        vertex/face and edge/face intersections. Face/face
6866         #        intersections detection is switched off as it is a
6867         #        time-consuming operation that gives an impact on performance.
6868         #        To find all self-intersections please use
6869         #        CheckSelfIntersections() method.
6870         #
6871         #  @return New GEOM.GEOM_Object, containing the result shape.
6872         #
6873         #  @ref tui_fuse "Example"
6874         @ManageTransactions("BoolOp")
6875         def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
6876             """
6877             Perform one of boolean operations on two given shapes.
6878
6879             Parameters:
6880                 theShape1 First argument for boolean operation.
6881                 theShape2 Second argument for boolean operation.
6882                 theOperation Indicates the operation to be done:
6883                              1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
6884                 checkSelfInte The flag that tells if the arguments should
6885                               be checked for self-intersection prior to
6886                               the operation.
6887                 theName Object name; when specified, this parameter is used
6888                         for result publication in the study. Otherwise, if automatic
6889                         publication is switched on, default value is used for result name.
6890
6891             Note:
6892                     This algorithm doesn't find all types of self-intersections.
6893                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6894                     vertex/face and edge/face intersections. Face/face
6895                     intersections detection is switched off as it is a
6896                     time-consuming operation that gives an impact on performance.
6897                     To find all self-intersections please use
6898                     CheckSelfIntersections() method.
6899
6900             Returns:
6901                 New GEOM.GEOM_Object, containing the result shape.
6902             """
6903             # Example: see GEOM_TestAll.py
6904             anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
6905             RaiseIfFailed("MakeBoolean", self.BoolOp)
6906             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
6907             self._autoPublish(anObj, theName, def_names[theOperation])
6908             return anObj
6909
6910         ## Perform Common boolean operation on two given shapes.
6911         #  @param theShape1 First argument for boolean operation.
6912         #  @param theShape2 Second argument for boolean operation.
6913         #  @param checkSelfInte The flag that tells if the arguments should
6914         #         be checked for self-intersection prior to the operation.
6915         #  @param theName Object name; when specified, this parameter is used
6916         #         for result publication in the study. Otherwise, if automatic
6917         #         publication is switched on, default value is used for result name.
6918         #
6919         #  @note This algorithm doesn't find all types of self-intersections.
6920         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6921         #        vertex/face and edge/face intersections. Face/face
6922         #        intersections detection is switched off as it is a
6923         #        time-consuming operation that gives an impact on performance.
6924         #        To find all self-intersections please use
6925         #        CheckSelfIntersections() method.
6926         #
6927         #  @return New GEOM.GEOM_Object, containing the result shape.
6928         #
6929         #  @ref tui_common "Example 1"
6930         #  \n @ref swig_MakeCommon "Example 2"
6931         def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6932             """
6933             Perform Common boolean operation on two given shapes.
6934
6935             Parameters:
6936                 theShape1 First argument for boolean operation.
6937                 theShape2 Second argument for boolean operation.
6938                 checkSelfInte The flag that tells if the arguments should
6939                               be checked for self-intersection prior to
6940                               the operation.
6941                 theName Object name; when specified, this parameter is used
6942                         for result publication in the study. Otherwise, if automatic
6943                         publication is switched on, default value is used for result name.
6944
6945             Note:
6946                     This algorithm doesn't find all types of self-intersections.
6947                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6948                     vertex/face and edge/face intersections. Face/face
6949                     intersections detection is switched off as it is a
6950                     time-consuming operation that gives an impact on performance.
6951                     To find all self-intersections please use
6952                     CheckSelfIntersections() method.
6953
6954             Returns:
6955                 New GEOM.GEOM_Object, containing the result shape.
6956             """
6957             # Example: see GEOM_TestOthers.py
6958             # note: auto-publishing is done in self.MakeBoolean()
6959             return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
6960
6961         ## Perform Cut boolean operation on two given shapes.
6962         #  @param theShape1 First argument for boolean operation.
6963         #  @param theShape2 Second argument for boolean operation.
6964         #  @param checkSelfInte The flag that tells if the arguments should
6965         #         be checked for self-intersection prior to the operation.
6966         #  @param theName Object name; when specified, this parameter is used
6967         #         for result publication in the study. Otherwise, if automatic
6968         #         publication is switched on, default value is used for result name.
6969         #
6970         #  @note This algorithm doesn't find all types of self-intersections.
6971         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6972         #        vertex/face and edge/face intersections. Face/face
6973         #        intersections detection is switched off as it is a
6974         #        time-consuming operation that gives an impact on performance.
6975         #        To find all self-intersections please use
6976         #        CheckSelfIntersections() method.
6977         #
6978         #  @return New GEOM.GEOM_Object, containing the result shape.
6979         #
6980         #  @ref tui_cut "Example 1"
6981         #  \n @ref swig_MakeCommon "Example 2"
6982         def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
6983             """
6984             Perform Cut boolean operation on two given shapes.
6985
6986             Parameters:
6987                 theShape1 First argument for boolean operation.
6988                 theShape2 Second argument for boolean operation.
6989                 checkSelfInte The flag that tells if the arguments should
6990                               be checked for self-intersection prior to
6991                               the operation.
6992                 theName Object name; when specified, this parameter is used
6993                         for result publication in the study. Otherwise, if automatic
6994                         publication is switched on, default value is used for result name.
6995
6996             Note:
6997                     This algorithm doesn't find all types of self-intersections.
6998                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
6999                     vertex/face and edge/face intersections. Face/face
7000                     intersections detection is switched off as it is a
7001                     time-consuming operation that gives an impact on performance.
7002                     To find all self-intersections please use
7003                     CheckSelfIntersections() method.
7004
7005             Returns:
7006                 New GEOM.GEOM_Object, containing the result shape.
7007
7008             """
7009             # Example: see GEOM_TestOthers.py
7010             # note: auto-publishing is done in self.MakeBoolean()
7011             return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
7012
7013         ## Perform Fuse boolean operation on two given shapes.
7014         #  @param theShape1 First argument for boolean operation.
7015         #  @param theShape2 Second argument for boolean operation.
7016         #  @param checkSelfInte The flag that tells if the arguments should
7017         #         be checked for self-intersection prior to the operation.
7018         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7019         #         operation should be performed during the operation.
7020         #  @param theName Object name; when specified, this parameter is used
7021         #         for result publication in the study. Otherwise, if automatic
7022         #         publication is switched on, default value is used for result name.
7023         #
7024         #  @note This algorithm doesn't find all types of self-intersections.
7025         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7026         #        vertex/face and edge/face intersections. Face/face
7027         #        intersections detection is switched off as it is a
7028         #        time-consuming operation that gives an impact on performance.
7029         #        To find all self-intersections please use
7030         #        CheckSelfIntersections() method.
7031         #
7032         #  @return New GEOM.GEOM_Object, containing the result shape.
7033         #
7034         #  @ref tui_fuse "Example 1"
7035         #  \n @ref swig_MakeCommon "Example 2"
7036         @ManageTransactions("BoolOp")
7037         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
7038                      rmExtraEdges=False, theName=None):
7039             """
7040             Perform Fuse boolean operation on two given shapes.
7041
7042             Parameters:
7043                 theShape1 First argument for boolean operation.
7044                 theShape2 Second argument for boolean operation.
7045                 checkSelfInte The flag that tells if the arguments should
7046                               be checked for self-intersection prior to
7047                               the operation.
7048                 rmExtraEdges The flag that tells if Remove Extra Edges
7049                              operation should be performed during the operation.
7050                 theName Object name; when specified, this parameter is used
7051                         for result publication in the study. Otherwise, if automatic
7052                         publication is switched on, default value is used for result name.
7053
7054             Note:
7055                     This algorithm doesn't find all types of self-intersections.
7056                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7057                     vertex/face and edge/face intersections. Face/face
7058                     intersections detection is switched off as it is a
7059                     time-consuming operation that gives an impact on performance.
7060                     To find all self-intersections please use
7061                     CheckSelfIntersections() method.
7062
7063             Returns:
7064                 New GEOM.GEOM_Object, containing the result shape.
7065
7066             """
7067             # Example: see GEOM_TestOthers.py
7068             anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
7069                                          checkSelfInte, rmExtraEdges)
7070             RaiseIfFailed("MakeFuse", self.BoolOp)
7071             self._autoPublish(anObj, theName, "fuse")
7072             return anObj
7073
7074         ## Perform Section boolean operation on two given shapes.
7075         #  @param theShape1 First argument for boolean operation.
7076         #  @param theShape2 Second argument for boolean operation.
7077         #  @param checkSelfInte The flag that tells if the arguments should
7078         #         be checked for self-intersection prior to the operation.
7079         #  @param theName Object name; when specified, this parameter is used
7080         #         for result publication in the study. Otherwise, if automatic
7081         #         publication is switched on, default value is used for result name.
7082         #
7083         #  @note This algorithm doesn't find all types of self-intersections.
7084         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7085         #        vertex/face and edge/face intersections. Face/face
7086         #        intersections detection is switched off as it is a
7087         #        time-consuming operation that gives an impact on performance.
7088         #        To find all self-intersections please use
7089         #        CheckSelfIntersections() method.
7090         #
7091         #  @return New GEOM.GEOM_Object, containing the result shape.
7092         #
7093         #  @ref tui_section "Example 1"
7094         #  \n @ref swig_MakeCommon "Example 2"
7095         def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
7096             """
7097             Perform Section boolean operation on two given shapes.
7098
7099             Parameters:
7100                 theShape1 First argument for boolean operation.
7101                 theShape2 Second argument for boolean operation.
7102                 checkSelfInte The flag that tells if the arguments should
7103                               be checked for self-intersection prior to
7104                               the operation.
7105                 theName Object name; when specified, this parameter is used
7106                         for result publication in the study. Otherwise, if automatic
7107                         publication is switched on, default value is used for result name.
7108
7109             Note:
7110                     This algorithm doesn't find all types of self-intersections.
7111                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7112                     vertex/face and edge/face intersections. Face/face
7113                     intersections detection is switched off as it is a
7114                     time-consuming operation that gives an impact on performance.
7115                     To find all self-intersections please use
7116                     CheckSelfIntersections() method.
7117
7118             Returns:
7119                 New GEOM.GEOM_Object, containing the result shape.
7120
7121             """
7122             # Example: see GEOM_TestOthers.py
7123             # note: auto-publishing is done in self.MakeBoolean()
7124             return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
7125
7126         ## Perform Fuse boolean operation on the list of shapes.
7127         #  @param theShapesList Shapes to be fused.
7128         #  @param checkSelfInte The flag that tells if the arguments should
7129         #         be checked for self-intersection prior to the operation.
7130         #  @param rmExtraEdges The flag that tells if Remove Extra Edges
7131         #         operation should be performed during the operation.
7132         #  @param theName Object name; when specified, this parameter is used
7133         #         for result publication in the study. Otherwise, if automatic
7134         #         publication is switched on, default value is used for result name.
7135         #
7136         #  @note This algorithm doesn't find all types of self-intersections.
7137         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7138         #        vertex/face and edge/face intersections. Face/face
7139         #        intersections detection is switched off as it is a
7140         #        time-consuming operation that gives an impact on performance.
7141         #        To find all self-intersections please use
7142         #        CheckSelfIntersections() method.
7143         #
7144         #  @return New GEOM.GEOM_Object, containing the result shape.
7145         #
7146         #  @ref tui_fuse "Example 1"
7147         #  \n @ref swig_MakeCommon "Example 2"
7148         @ManageTransactions("BoolOp")
7149         def MakeFuseList(self, theShapesList, checkSelfInte=False,
7150                          rmExtraEdges=False, theName=None):
7151             """
7152             Perform Fuse boolean operation on the list of shapes.
7153
7154             Parameters:
7155                 theShapesList Shapes to be fused.
7156                 checkSelfInte The flag that tells if the arguments should
7157                               be checked for self-intersection prior to
7158                               the operation.
7159                 rmExtraEdges The flag that tells if Remove Extra Edges
7160                              operation should be performed during the operation.
7161                 theName Object name; when specified, this parameter is used
7162                         for result publication in the study. Otherwise, if automatic
7163                         publication is switched on, default value is used for result name.
7164
7165             Note:
7166                     This algorithm doesn't find all types of self-intersections.
7167                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7168                     vertex/face and edge/face intersections. Face/face
7169                     intersections detection is switched off as it is a
7170                     time-consuming operation that gives an impact on performance.
7171                     To find all self-intersections please use
7172                     CheckSelfIntersections() method.
7173
7174             Returns:
7175                 New GEOM.GEOM_Object, containing the result shape.
7176
7177             """
7178             # Example: see GEOM_TestOthers.py
7179             anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
7180                                              rmExtraEdges)
7181             RaiseIfFailed("MakeFuseList", self.BoolOp)
7182             self._autoPublish(anObj, theName, "fuse")
7183             return anObj
7184
7185         ## Perform Common boolean operation on the list of shapes.
7186         #  @param theShapesList Shapes for Common operation.
7187         #  @param checkSelfInte The flag that tells if the arguments should
7188         #         be checked for self-intersection prior to the operation.
7189         #  @param theName Object name; when specified, this parameter is used
7190         #         for result publication in the study. Otherwise, if automatic
7191         #         publication is switched on, default value is used for result name.
7192         #
7193         #  @note This algorithm doesn't find all types of self-intersections.
7194         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7195         #        vertex/face and edge/face intersections. Face/face
7196         #        intersections detection is switched off as it is a
7197         #        time-consuming operation that gives an impact on performance.
7198         #        To find all self-intersections please use
7199         #        CheckSelfIntersections() method.
7200         #
7201         #  @return New GEOM.GEOM_Object, containing the result shape.
7202         #
7203         #  @ref tui_common "Example 1"
7204         #  \n @ref swig_MakeCommon "Example 2"
7205         @ManageTransactions("BoolOp")
7206         def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
7207             """
7208             Perform Common boolean operation on the list of shapes.
7209
7210             Parameters:
7211                 theShapesList Shapes for Common operation.
7212                 checkSelfInte The flag that tells if the arguments should
7213                               be checked for self-intersection prior to
7214                               the operation.
7215                 theName Object name; when specified, this parameter is used
7216                         for result publication in the study. Otherwise, if automatic
7217                         publication is switched on, default value is used for result name.
7218
7219             Note:
7220                     This algorithm doesn't find all types of self-intersections.
7221                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7222                     vertex/face and edge/face intersections. Face/face
7223                     intersections detection is switched off as it is a
7224                     time-consuming operation that gives an impact on performance.
7225                     To find all self-intersections please use
7226                     CheckSelfIntersections() method.
7227
7228             Returns:
7229                 New GEOM.GEOM_Object, containing the result shape.
7230
7231             """
7232             # Example: see GEOM_TestOthers.py
7233             anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
7234             RaiseIfFailed("MakeCommonList", self.BoolOp)
7235             self._autoPublish(anObj, theName, "common")
7236             return anObj
7237
7238         ## Perform Cut boolean operation on one object and the list of tools.
7239         #  @param theMainShape The object of the operation.
7240         #  @param theShapesList The list of tools of the operation.
7241         #  @param checkSelfInte The flag that tells if the arguments should
7242         #         be checked for self-intersection prior to the operation.
7243         #  @param theName Object name; when specified, this parameter is used
7244         #         for result publication in the study. Otherwise, if automatic
7245         #         publication is switched on, default value is used for result name.
7246         #
7247         #  @note This algorithm doesn't find all types of self-intersections.
7248         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7249         #        vertex/face and edge/face intersections. Face/face
7250         #        intersections detection is switched off as it is a
7251         #        time-consuming operation that gives an impact on performance.
7252         #        To find all self-intersections please use
7253         #        CheckSelfIntersections() method.
7254         #
7255         #  @return New GEOM.GEOM_Object, containing the result shape.
7256         #
7257         #  @ref tui_cut "Example 1"
7258         #  \n @ref swig_MakeCommon "Example 2"
7259         @ManageTransactions("BoolOp")
7260         def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
7261             """
7262             Perform Cut boolean operation on one object and the list of tools.
7263
7264             Parameters:
7265                 theMainShape The object of the operation.
7266                 theShapesList The list of tools of the operation.
7267                 checkSelfInte The flag that tells if the arguments should
7268                               be checked for self-intersection prior to
7269                               the operation.
7270                 theName Object name; when specified, this parameter is used
7271                         for result publication in the study. Otherwise, if automatic
7272                         publication is switched on, default value is used for result name.
7273
7274             Note:
7275                     This algorithm doesn't find all types of self-intersections.
7276                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7277                     vertex/face and edge/face intersections. Face/face
7278                     intersections detection is switched off as it is a
7279                     time-consuming operation that gives an impact on performance.
7280                     To find all self-intersections please use
7281                     CheckSelfIntersections() method.
7282
7283             Returns:
7284                 New GEOM.GEOM_Object, containing the result shape.
7285
7286             """
7287             # Example: see GEOM_TestOthers.py
7288             anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
7289             RaiseIfFailed("MakeCutList", self.BoolOp)
7290             self._autoPublish(anObj, theName, "cut")
7291             return anObj
7292
7293         # end of l3_boolean
7294         ## @}
7295
7296         ## @addtogroup l3_basic_op
7297         ## @{
7298
7299         ## Perform partition operation.
7300         #  @param ListShapes Shapes to be intersected.
7301         #  @param ListTools Shapes to intersect theShapes.
7302         #  @param Limit Type of resulting shapes (see ShapeType()).\n
7303         #         If this parameter is set to -1 ("Auto"), most appropriate shape limit
7304         #         type will be detected automatically.
7305         #  @param KeepNonlimitShapes if this parameter == 0, then only shapes of
7306         #                             target type (equal to Limit) are kept in the result,
7307         #                             else standalone shapes of lower dimension
7308         #                             are kept also (if they exist).
7309         #
7310         #  @param theName Object name; when specified, this parameter is used
7311         #         for result publication in the study. Otherwise, if automatic
7312         #         publication is switched on, default value is used for result name.
7313         #
7314         #  @note Each compound from ListShapes and ListTools will be exploded
7315         #        in order to avoid possible intersection between shapes from this compound.
7316         #
7317         #  After implementation new version of PartitionAlgo (October 2006)
7318         #  other parameters are ignored by current functionality. They are kept
7319         #  in this function only for support old versions.
7320         #      @param ListKeepInside Shapes, outside which the results will be deleted.
7321         #         Each shape from theKeepInside must belong to theShapes also.
7322         #      @param ListRemoveInside Shapes, inside which the results will be deleted.
7323         #         Each shape from theRemoveInside must belong to theShapes also.
7324         #      @param RemoveWebs If TRUE, perform Glue 3D algorithm.
7325         #      @param ListMaterials Material indices for each shape. Make sence,
7326         #         only if theRemoveWebs is TRUE.
7327         #
7328         #  @return New GEOM.GEOM_Object, containing the result shapes.
7329         #
7330         #  @ref tui_partition "Example"
7331         @ManageTransactions("BoolOp")
7332         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7333                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7334                           KeepNonlimitShapes=0, theName=None):
7335             """
7336             Perform partition operation.
7337
7338             Parameters:
7339                 ListShapes Shapes to be intersected.
7340                 ListTools Shapes to intersect theShapes.
7341                 Limit Type of resulting shapes (see geompy.ShapeType)
7342                       If this parameter is set to -1 ("Auto"), most appropriate shape limit
7343                       type will be detected automatically.
7344                 KeepNonlimitShapes if this parameter == 0, then only shapes of
7345                                     target type (equal to Limit) are kept in the result,
7346                                     else standalone shapes of lower dimension
7347                                     are kept also (if they exist).
7348
7349                 theName Object name; when specified, this parameter is used
7350                         for result publication in the study. Otherwise, if automatic
7351                         publication is switched on, default value is used for result name.
7352             Note:
7353                     Each compound from ListShapes and ListTools will be exploded
7354                     in order to avoid possible intersection between shapes from
7355                     this compound.
7356
7357             After implementation new version of PartitionAlgo (October 2006) other
7358             parameters are ignored by current functionality. They are kept in this
7359             function only for support old versions.
7360
7361             Ignored parameters:
7362                 ListKeepInside Shapes, outside which the results will be deleted.
7363                                Each shape from theKeepInside must belong to theShapes also.
7364                 ListRemoveInside Shapes, inside which the results will be deleted.
7365                                  Each shape from theRemoveInside must belong to theShapes also.
7366                 RemoveWebs If TRUE, perform Glue 3D algorithm.
7367                 ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
7368
7369             Returns:
7370                 New GEOM.GEOM_Object, containing the result shapes.
7371             """
7372             # Example: see GEOM_TestAll.py
7373             if Limit == self.ShapeType["AUTO"]:
7374                 # automatic detection of the most appropriate shape limit type
7375                 lim = GEOM.SHAPE
7376                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7377                 Limit = EnumToLong(lim)
7378                 pass
7379             anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
7380                                               ListKeepInside, ListRemoveInside,
7381                                               Limit, RemoveWebs, ListMaterials,
7382                                               KeepNonlimitShapes);
7383             RaiseIfFailed("MakePartition", self.BoolOp)
7384             self._autoPublish(anObj, theName, "partition")
7385             return anObj
7386
7387         ## Perform partition operation.
7388         #  This method may be useful if it is needed to make a partition for
7389         #  compound contains nonintersected shapes. Performance will be better
7390         #  since intersection between shapes from compound is not performed.
7391         #
7392         #  Description of all parameters as in previous method MakePartition().
7393         #  One additional parameter is provided:
7394         #  @param checkSelfInte The flag that tells if the arguments should
7395         #         be checked for self-intersection prior to the operation.
7396         #
7397         #  @note This algorithm doesn't find all types of self-intersections.
7398         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7399         #        vertex/face and edge/face intersections. Face/face
7400         #        intersections detection is switched off as it is a
7401         #        time-consuming operation that gives an impact on performance.
7402         #        To find all self-intersections please use
7403         #        CheckSelfIntersections() method.
7404         #
7405         #  @note Passed compounds (via ListShapes or via ListTools)
7406         #           have to consist of nonintersecting shapes.
7407         #
7408         #  @return New GEOM.GEOM_Object, containing the result shapes.
7409         #
7410         #  @ref swig_todo "Example"
7411         @ManageTransactions("BoolOp")
7412         def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
7413                                                  ListKeepInside=[], ListRemoveInside=[],
7414                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
7415                                                  ListMaterials=[], KeepNonlimitShapes=0,
7416                                                  checkSelfInte=False, theName=None):
7417             """
7418             Perform partition operation.
7419             This method may be useful if it is needed to make a partition for
7420             compound contains nonintersected shapes. Performance will be better
7421             since intersection between shapes from compound is not performed.
7422
7423             Parameters:
7424                 Description of all parameters as in method geompy.MakePartition.
7425                 One additional parameter is provided:
7426                 checkSelfInte The flag that tells if the arguments should
7427                               be checked for self-intersection prior to
7428                               the operation.
7429
7430             Note:
7431                     This algorithm doesn't find all types of self-intersections.
7432                     It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
7433                     vertex/face and edge/face intersections. Face/face
7434                     intersections detection is switched off as it is a
7435                     time-consuming operation that gives an impact on performance.
7436                     To find all self-intersections please use
7437                     CheckSelfIntersections() method.
7438
7439             NOTE:
7440                 Passed compounds (via ListShapes or via ListTools)
7441                 have to consist of nonintersecting shapes.
7442
7443             Returns:
7444                 New GEOM.GEOM_Object, containing the result shapes.
7445             """
7446             if Limit == self.ShapeType["AUTO"]:
7447                 # automatic detection of the most appropriate shape limit type
7448                 lim = GEOM.SHAPE
7449                 for s in ListShapes: lim = min( lim, s.GetMaxShapeType() )
7450                 Limit = EnumToLong(lim)
7451                 pass
7452             anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
7453                                                                      ListKeepInside, ListRemoveInside,
7454                                                                      Limit, RemoveWebs, ListMaterials,
7455                                                                      KeepNonlimitShapes, checkSelfInte);
7456             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
7457             self._autoPublish(anObj, theName, "partition")
7458             return anObj
7459
7460         ## See method MakePartition() for more information.
7461         #
7462         #  @ref tui_partition "Example 1"
7463         #  \n @ref swig_Partition "Example 2"
7464         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
7465                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
7466                       KeepNonlimitShapes=0, theName=None):
7467             """
7468             See method geompy.MakePartition for more information.
7469             """
7470             # Example: see GEOM_TestOthers.py
7471             # note: auto-publishing is done in self.MakePartition()
7472             anObj = self.MakePartition(ListShapes, ListTools,
7473                                        ListKeepInside, ListRemoveInside,
7474                                        Limit, RemoveWebs, ListMaterials,
7475                                        KeepNonlimitShapes, theName);
7476             return anObj
7477
7478         ## Perform partition of the Shape with the Plane
7479         #  @param theShape Shape to be intersected.
7480         #  @param thePlane Tool shape, to intersect theShape.
7481         #  @param theName Object name; when specified, this parameter is used
7482         #         for result publication in the study. Otherwise, if automatic
7483         #         publication is switched on, default value is used for result name.
7484         #
7485         #  @return New GEOM.GEOM_Object, containing the result shape.
7486         #
7487         #  @ref tui_partition "Example"
7488         @ManageTransactions("BoolOp")
7489         def MakeHalfPartition(self, theShape, thePlane, theName=None):
7490             """
7491             Perform partition of the Shape with the Plane
7492
7493             Parameters:
7494                 theShape Shape to be intersected.
7495                 thePlane Tool shape, to intersect theShape.
7496                 theName Object name; when specified, this parameter is used
7497                         for result publication in the study. Otherwise, if automatic
7498                         publication is switched on, default value is used for result name.
7499
7500             Returns:
7501                 New GEOM.GEOM_Object, containing the result shape.
7502             """
7503             # Example: see GEOM_TestAll.py
7504             anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
7505             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
7506             self._autoPublish(anObj, theName, "partition")
7507             return anObj
7508
7509         # end of l3_basic_op
7510         ## @}
7511
7512         ## @addtogroup l3_transform
7513         ## @{
7514
7515         ## Translate the given object along the vector, specified
7516         #  by its end points.
7517         #  @param theObject The object to be translated.
7518         #  @param thePoint1 Start point of translation vector.
7519         #  @param thePoint2 End point of translation vector.
7520         #  @param theCopy Flag used to translate object itself or create a copy.
7521         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7522         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7523         @ManageTransactions("TrsfOp")
7524         def TranslateTwoPoints(self, theObject, thePoint1, thePoint2, theCopy=False):
7525             """
7526             Translate the given object along the vector, specified by its end points.
7527
7528             Parameters:
7529                 theObject The object to be translated.
7530                 thePoint1 Start point of translation vector.
7531                 thePoint2 End point of translation vector.
7532                 theCopy Flag used to translate object itself or create a copy.
7533
7534             Returns:
7535                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7536                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7537             """
7538             if theCopy:
7539                 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7540             else:
7541                 anObj = self.TrsfOp.TranslateTwoPoints(theObject, thePoint1, thePoint2)
7542             RaiseIfFailed("TranslateTwoPoints", self.TrsfOp)
7543             return anObj
7544
7545         ## Translate the given object along the vector, specified
7546         #  by its end points, creating its copy before the translation.
7547         #  @param theObject The object to be translated.
7548         #  @param thePoint1 Start point of translation vector.
7549         #  @param thePoint2 End point of translation vector.
7550         #  @param theName Object name; when specified, this parameter is used
7551         #         for result publication in the study. Otherwise, if automatic
7552         #         publication is switched on, default value is used for result name.
7553         #
7554         #  @return New GEOM.GEOM_Object, containing the translated object.
7555         #
7556         #  @ref tui_translation "Example 1"
7557         #  \n @ref swig_MakeTranslationTwoPoints "Example 2"
7558         @ManageTransactions("TrsfOp")
7559         def MakeTranslationTwoPoints(self, theObject, thePoint1, thePoint2, theName=None):
7560             """
7561             Translate the given object along the vector, specified
7562             by its end points, creating its copy before the translation.
7563
7564             Parameters:
7565                 theObject The object to be translated.
7566                 thePoint1 Start point of translation vector.
7567                 thePoint2 End point of translation vector.
7568                 theName Object name; when specified, this parameter is used
7569                         for result publication in the study. Otherwise, if automatic
7570                         publication is switched on, default value is used for result name.
7571
7572             Returns:
7573                 New GEOM.GEOM_Object, containing the translated object.
7574             """
7575             # Example: see GEOM_TestAll.py
7576             anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
7577             RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
7578             self._autoPublish(anObj, theName, "translated")
7579             return anObj
7580
7581         ## Translate the given object along the vector, specified by its components.
7582         #  @param theObject The object to be translated.
7583         #  @param theDX,theDY,theDZ Components of translation vector.
7584         #  @param theCopy Flag used to translate object itself or create a copy.
7585         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7586         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7587         #
7588         #  @ref tui_translation "Example"
7589         @ManageTransactions("TrsfOp")
7590         def TranslateDXDYDZ(self, theObject, theDX, theDY, theDZ, theCopy=False):
7591             """
7592             Translate the given object along the vector, specified by its components.
7593
7594             Parameters:
7595                 theObject The object to be translated.
7596                 theDX,theDY,theDZ Components of translation vector.
7597                 theCopy Flag used to translate object itself or create a copy.
7598
7599             Returns:
7600                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7601                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7602             """
7603             # Example: see GEOM_TestAll.py
7604             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7605             if theCopy:
7606                 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7607             else:
7608                 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
7609             anObj.SetParameters(Parameters)
7610             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7611             return anObj
7612
7613         ## Translate the given object along the vector, specified
7614         #  by its components, creating its copy before the translation.
7615         #  @param theObject The object to be translated.
7616         #  @param theDX,theDY,theDZ Components of translation vector.
7617         #  @param theName Object name; when specified, this parameter is used
7618         #         for result publication in the study. Otherwise, if automatic
7619         #         publication is switched on, default value is used for result name.
7620         #
7621         #  @return New GEOM.GEOM_Object, containing the translated object.
7622         #
7623         #  @ref tui_translation "Example"
7624         @ManageTransactions("TrsfOp")
7625         def MakeTranslation(self,theObject, theDX, theDY, theDZ, theName=None):
7626             """
7627             Translate the given object along the vector, specified
7628             by its components, creating its copy before the translation.
7629
7630             Parameters:
7631                 theObject The object to be translated.
7632                 theDX,theDY,theDZ Components of translation vector.
7633                 theName Object name; when specified, this parameter is used
7634                         for result publication in the study. Otherwise, if automatic
7635                         publication is switched on, default value is used for result name.
7636
7637             Returns:
7638                 New GEOM.GEOM_Object, containing the translated object.
7639             """
7640             # Example: see GEOM_TestAll.py
7641             theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
7642             anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
7643             anObj.SetParameters(Parameters)
7644             RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
7645             self._autoPublish(anObj, theName, "translated")
7646             return anObj
7647
7648         ## Translate the given object along the given vector.
7649         #  @param theObject The object to be translated.
7650         #  @param theVector The translation vector.
7651         #  @param theCopy Flag used to translate object itself or create a copy.
7652         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7653         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7654         @ManageTransactions("TrsfOp")
7655         def TranslateVector(self, theObject, theVector, theCopy=False):
7656             """
7657             Translate the given object along the given vector.
7658
7659             Parameters:
7660                 theObject The object to be translated.
7661                 theVector The translation vector.
7662                 theCopy Flag used to translate object itself or create a copy.
7663
7664             Returns:
7665                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7666                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7667             """
7668             if theCopy:
7669                 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7670             else:
7671                 anObj = self.TrsfOp.TranslateVector(theObject, theVector)
7672             RaiseIfFailed("TranslateVector", self.TrsfOp)
7673             return anObj
7674
7675         ## Translate the given object along the given vector,
7676         #  creating its copy before the translation.
7677         #  @param theObject The object to be translated.
7678         #  @param theVector The translation vector.
7679         #  @param theName Object name; when specified, this parameter is used
7680         #         for result publication in the study. Otherwise, if automatic
7681         #         publication is switched on, default value is used for result name.
7682         #
7683         #  @return New GEOM.GEOM_Object, containing the translated object.
7684         #
7685         #  @ref tui_translation "Example"
7686         @ManageTransactions("TrsfOp")
7687         def MakeTranslationVector(self, theObject, theVector, theName=None):
7688             """
7689             Translate the given object along the given vector,
7690             creating its copy before the translation.
7691
7692             Parameters:
7693                 theObject The object to be translated.
7694                 theVector The translation vector.
7695                 theName Object name; when specified, this parameter is used
7696                         for result publication in the study. Otherwise, if automatic
7697                         publication is switched on, default value is used for result name.
7698
7699             Returns:
7700                 New GEOM.GEOM_Object, containing the translated object.
7701             """
7702             # Example: see GEOM_TestAll.py
7703             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
7704             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
7705             self._autoPublish(anObj, theName, "translated")
7706             return anObj
7707
7708         ## Translate the given object along the given vector on given distance.
7709         #  @param theObject The object to be translated.
7710         #  @param theVector The translation vector.
7711         #  @param theDistance The translation distance.
7712         #  @param theCopy Flag used to translate object itself or create a copy.
7713         #  @return Translated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7714         #  new GEOM.GEOM_Object, containing the translated object if @a theCopy flag is @c True.
7715         #
7716         #  @ref tui_translation "Example"
7717         @ManageTransactions("TrsfOp")
7718         def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy=False):
7719             """
7720             Translate the given object along the given vector on given distance.
7721
7722             Parameters:
7723                 theObject The object to be translated.
7724                 theVector The translation vector.
7725                 theDistance The translation distance.
7726                 theCopy Flag used to translate object itself or create a copy.
7727
7728             Returns:
7729                 Translated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7730                 new GEOM.GEOM_Object, containing the translated object if theCopy flag is True.
7731             """
7732             # Example: see GEOM_TestAll.py
7733             theDistance,Parameters = ParseParameters(theDistance)
7734             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
7735             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7736             anObj.SetParameters(Parameters)
7737             return anObj
7738
7739         ## Translate the given object along the given vector on given distance,
7740         #  creating its copy before the translation.
7741         #  @param theObject The object to be translated.
7742         #  @param theVector The translation vector.
7743         #  @param theDistance The translation distance.
7744         #  @param theName Object name; when specified, this parameter is used
7745         #         for result publication in the study. Otherwise, if automatic
7746         #         publication is switched on, default value is used for result name.
7747         #
7748         #  @return New GEOM.GEOM_Object, containing the translated object.
7749         #
7750         #  @ref tui_translation "Example"
7751         @ManageTransactions("TrsfOp")
7752         def MakeTranslationVectorDistance(self, theObject, theVector, theDistance, theName=None):
7753             """
7754             Translate the given object along the given vector on given distance,
7755             creating its copy before the translation.
7756
7757             Parameters:
7758                 theObject The object to be translated.
7759                 theVector The translation vector.
7760                 theDistance The translation distance.
7761                 theName Object name; when specified, this parameter is used
7762                         for result publication in the study. Otherwise, if automatic
7763                         publication is switched on, default value is used for result name.
7764
7765             Returns:
7766                 New GEOM.GEOM_Object, containing the translated object.
7767             """
7768             # Example: see GEOM_TestAll.py
7769             theDistance,Parameters = ParseParameters(theDistance)
7770             anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
7771             RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
7772             anObj.SetParameters(Parameters)
7773             self._autoPublish(anObj, theName, "translated")
7774             return anObj
7775
7776         ## Rotate the given object around the given axis on the given angle.
7777         #  @param theObject The object to be rotated.
7778         #  @param theAxis Rotation axis.
7779         #  @param theAngle Rotation angle in radians.
7780         #  @param theCopy Flag used to rotate object itself or create a copy.
7781         #
7782         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7783         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7784         #
7785         #  @ref tui_rotation "Example"
7786         @ManageTransactions("TrsfOp")
7787         def Rotate(self, theObject, theAxis, theAngle, theCopy=False):
7788             """
7789             Rotate the given object around the given axis on the given angle.
7790
7791             Parameters:
7792                 theObject The object to be rotated.
7793                 theAxis Rotation axis.
7794                 theAngle Rotation angle in radians.
7795                 theCopy Flag used to rotate object itself or create a copy.
7796
7797             Returns:
7798                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7799                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7800             """
7801             # Example: see GEOM_TestAll.py
7802             flag = False
7803             if isinstance(theAngle,str):
7804                 flag = True
7805             theAngle, Parameters = ParseParameters(theAngle)
7806             if flag:
7807                 theAngle = theAngle*math.pi/180.0
7808             if theCopy:
7809                 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7810             else:
7811                 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
7812             RaiseIfFailed("Rotate", self.TrsfOp)
7813             anObj.SetParameters(Parameters)
7814             return anObj
7815
7816         ## Rotate the given object around the given axis
7817         #  on the given angle, creating its copy before the rotatation.
7818         #  @param theObject The object to be rotated.
7819         #  @param theAxis Rotation axis.
7820         #  @param theAngle Rotation angle in radians.
7821         #  @param theName Object name; when specified, this parameter is used
7822         #         for result publication in the study. Otherwise, if automatic
7823         #         publication is switched on, default value is used for result name.
7824         #
7825         #  @return New GEOM.GEOM_Object, containing the rotated object.
7826         #
7827         #  @ref tui_rotation "Example"
7828         @ManageTransactions("TrsfOp")
7829         def MakeRotation(self, theObject, theAxis, theAngle, theName=None):
7830             """
7831             Rotate the given object around the given axis
7832             on the given angle, creating its copy before the rotatation.
7833
7834             Parameters:
7835                 theObject The object to be rotated.
7836                 theAxis Rotation axis.
7837                 theAngle Rotation angle in radians.
7838                 theName Object name; when specified, this parameter is used
7839                         for result publication in the study. Otherwise, if automatic
7840                         publication is switched on, default value is used for result name.
7841
7842             Returns:
7843                 New GEOM.GEOM_Object, containing the rotated object.
7844             """
7845             # Example: see GEOM_TestAll.py
7846             flag = False
7847             if isinstance(theAngle,str):
7848                 flag = True
7849             theAngle, Parameters = ParseParameters(theAngle)
7850             if flag:
7851                 theAngle = theAngle*math.pi/180.0
7852             anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
7853             RaiseIfFailed("RotateCopy", self.TrsfOp)
7854             anObj.SetParameters(Parameters)
7855             self._autoPublish(anObj, theName, "rotated")
7856             return anObj
7857
7858         ## Rotate given object around vector perpendicular to plane
7859         #  containing three points.
7860         #  @param theObject The object to be rotated.
7861         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7862         #  containing the three points.
7863         #  @param thePoint1,thePoint2 points in a perpendicular plane of the axis.
7864         #  @param theCopy Flag used to rotate object itself or create a copy.
7865         #  @return Rotated @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7866         #  new GEOM.GEOM_Object, containing the rotated object if @a theCopy flag is @c True.
7867         @ManageTransactions("TrsfOp")
7868         def RotateThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theCopy=False):
7869             """
7870             Rotate given object around vector perpendicular to plane
7871             containing three points.
7872
7873             Parameters:
7874                 theObject The object to be rotated.
7875                 theCentPoint central point  the axis is the vector perpendicular to the plane
7876                              containing the three points.
7877                 thePoint1,thePoint2 points in a perpendicular plane of the axis.
7878                 theCopy Flag used to rotate object itself or create a copy.
7879
7880             Returns:
7881                 Rotated theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7882                 new GEOM.GEOM_Object, containing the rotated object if theCopy flag is True.
7883             """
7884             if theCopy:
7885                 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7886             else:
7887                 anObj = self.TrsfOp.RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2)
7888             RaiseIfFailed("RotateThreePoints", self.TrsfOp)
7889             return anObj
7890
7891         ## Rotate given object around vector perpendicular to plane
7892         #  containing three points, creating its copy before the rotatation.
7893         #  @param theObject The object to be rotated.
7894         #  @param theCentPoint central point the axis is the vector perpendicular to the plane
7895         #  containing the three points.
7896         #  @param thePoint1,thePoint2 in a perpendicular plane of the axis.
7897         #  @param theName Object name; when specified, this parameter is used
7898         #         for result publication in the study. Otherwise, if automatic
7899         #         publication is switched on, default value is used for result name.
7900         #
7901         #  @return New GEOM.GEOM_Object, containing the rotated object.
7902         #
7903         #  @ref tui_rotation "Example"
7904         @ManageTransactions("TrsfOp")
7905         def MakeRotationThreePoints(self, theObject, theCentPoint, thePoint1, thePoint2, theName=None):
7906             """
7907             Rotate given object around vector perpendicular to plane
7908             containing three points, creating its copy before the rotatation.
7909
7910             Parameters:
7911                 theObject The object to be rotated.
7912                 theCentPoint central point  the axis is the vector perpendicular to the plane
7913                              containing the three points.
7914                 thePoint1,thePoint2  in a perpendicular plane of the axis.
7915                 theName Object name; when specified, this parameter is used
7916                         for result publication in the study. Otherwise, if automatic
7917                         publication is switched on, default value is used for result name.
7918
7919             Returns:
7920                 New GEOM.GEOM_Object, containing the rotated object.
7921             """
7922             # Example: see GEOM_TestAll.py
7923             anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
7924             RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
7925             self._autoPublish(anObj, theName, "rotated")
7926             return anObj
7927
7928         ## Scale the given object by the specified factor.
7929         #  @param theObject The object to be scaled.
7930         #  @param thePoint Center point for scaling.
7931         #                  Passing None for it means scaling relatively the origin of global CS.
7932         #  @param theFactor Scaling factor value.
7933         #  @param theCopy Flag used to scale object itself or create a copy.
7934         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
7935         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
7936         @ManageTransactions("TrsfOp")
7937         def Scale(self, theObject, thePoint, theFactor, theCopy=False):
7938             """
7939             Scale the given object by the specified factor.
7940
7941             Parameters:
7942                 theObject The object to be scaled.
7943                 thePoint Center point for scaling.
7944                          Passing None for it means scaling relatively the origin of global CS.
7945                 theFactor Scaling factor value.
7946                 theCopy Flag used to scale object itself or create a copy.
7947
7948             Returns:
7949                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
7950                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
7951             """
7952             # Example: see GEOM_TestAll.py
7953             theFactor, Parameters = ParseParameters(theFactor)
7954             if theCopy:
7955                 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7956             else:
7957                 anObj = self.TrsfOp.ScaleShape(theObject, thePoint, theFactor)
7958             RaiseIfFailed("Scale", self.TrsfOp)
7959             anObj.SetParameters(Parameters)
7960             return anObj
7961
7962         ## Scale the given object by the factor, creating its copy before the scaling.
7963         #  @param theObject The object to be scaled.
7964         #  @param thePoint Center point for scaling.
7965         #                  Passing None for it means scaling relatively the origin of global CS.
7966         #  @param theFactor Scaling factor value.
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 the scaled shape.
7972         #
7973         #  @ref tui_scale "Example"
7974         @ManageTransactions("TrsfOp")
7975         def MakeScaleTransform(self, theObject, thePoint, theFactor, theName=None):
7976             """
7977             Scale the given object by the factor, creating its copy before the scaling.
7978
7979             Parameters:
7980                 theObject The object to be scaled.
7981                 thePoint Center point for scaling.
7982                          Passing None for it means scaling relatively the origin of global CS.
7983                 theFactor Scaling factor value.
7984                 theName Object name; when specified, this parameter is used
7985                         for result publication in the study. Otherwise, if automatic
7986                         publication is switched on, default value is used for result name.
7987
7988             Returns:
7989                 New GEOM.GEOM_Object, containing the scaled shape.
7990             """
7991             # Example: see GEOM_TestAll.py
7992             theFactor, Parameters = ParseParameters(theFactor)
7993             anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
7994             RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
7995             anObj.SetParameters(Parameters)
7996             self._autoPublish(anObj, theName, "scaled")
7997             return anObj
7998
7999         ## Scale the given object by different factors along coordinate axes.
8000         #  @param theObject The object to be scaled.
8001         #  @param thePoint Center point for scaling.
8002         #                  Passing None for it means scaling relatively the origin of global CS.
8003         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8004         #  @param theCopy Flag used to scale object itself or create a copy.
8005         #  @return Scaled @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8006         #  new GEOM.GEOM_Object, containing the scaled object if @a theCopy flag is @c True.
8007         @ManageTransactions("TrsfOp")
8008         def ScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theCopy=False):
8009             """
8010             Scale the given object by different factors along coordinate axes.
8011
8012             Parameters:
8013                 theObject The object to be scaled.
8014                 thePoint Center point for scaling.
8015                             Passing None for it means scaling relatively the origin of global CS.
8016                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8017                 theCopy Flag used to scale object itself or create a copy.
8018
8019             Returns:
8020                 Scaled theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8021                 new GEOM.GEOM_Object, containing the scaled object if theCopy flag is True.
8022             """
8023             # Example: see GEOM_TestAll.py
8024             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8025             if theCopy:
8026                 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8027                                                             theFactorX, theFactorY, theFactorZ)
8028             else:
8029                 anObj = self.TrsfOp.ScaleShapeAlongAxes(theObject, thePoint,
8030                                                         theFactorX, theFactorY, theFactorZ)
8031             RaiseIfFailed("ScaleAlongAxes", self.TrsfOp)
8032             anObj.SetParameters(Parameters)
8033             return anObj
8034
8035         ## Scale the given object by different factors along coordinate axes,
8036         #  creating its copy before the scaling.
8037         #  @param theObject The object to be scaled.
8038         #  @param thePoint Center point for scaling.
8039         #                  Passing None for it means scaling relatively the origin of global CS.
8040         #  @param theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8041         #  @param theName Object name; when specified, this parameter is used
8042         #         for result publication in the study. Otherwise, if automatic
8043         #         publication is switched on, default value is used for result name.
8044         #
8045         #  @return New GEOM.GEOM_Object, containing the scaled shape.
8046         #
8047         #  @ref swig_scale "Example"
8048         @ManageTransactions("TrsfOp")
8049         def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ, theName=None):
8050             """
8051             Scale the given object by different factors along coordinate axes,
8052             creating its copy before the scaling.
8053
8054             Parameters:
8055                 theObject The object to be scaled.
8056                 thePoint Center point for scaling.
8057                             Passing None for it means scaling relatively the origin of global CS.
8058                 theFactorX,theFactorY,theFactorZ Scaling factors along each axis.
8059                 theName Object name; when specified, this parameter is used
8060                         for result publication in the study. Otherwise, if automatic
8061                         publication is switched on, default value is used for result name.
8062
8063             Returns:
8064                 New GEOM.GEOM_Object, containing the scaled shape.
8065             """
8066             # Example: see GEOM_TestAll.py
8067             theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ)
8068             anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
8069                                                         theFactorX, theFactorY, theFactorZ)
8070             RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
8071             anObj.SetParameters(Parameters)
8072             self._autoPublish(anObj, theName, "scaled")
8073             return anObj
8074
8075         ## Mirror an object relatively the given plane.
8076         #  @param theObject The object to be mirrored.
8077         #  @param thePlane Plane of symmetry.
8078         #  @param theCopy Flag used to mirror object itself or create a copy.
8079         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8080         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8081         @ManageTransactions("TrsfOp")
8082         def MirrorByPlane(self, theObject, thePlane, theCopy=False):
8083             """
8084             Mirror an object relatively the given plane.
8085
8086             Parameters:
8087                 theObject The object to be mirrored.
8088                 thePlane Plane of symmetry.
8089                 theCopy Flag used to mirror object itself or create a copy.
8090
8091             Returns:
8092                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8093                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8094             """
8095             if theCopy:
8096                 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8097             else:
8098                 anObj = self.TrsfOp.MirrorPlane(theObject, thePlane)
8099             RaiseIfFailed("MirrorByPlane", self.TrsfOp)
8100             return anObj
8101
8102         ## Create an object, symmetrical
8103         #  to the given one relatively the given plane.
8104         #  @param theObject The object to be mirrored.
8105         #  @param thePlane Plane of symmetry.
8106         #  @param theName Object name; when specified, this parameter is used
8107         #         for result publication in the study. Otherwise, if automatic
8108         #         publication is switched on, default value is used for result name.
8109         #
8110         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8111         #
8112         #  @ref tui_mirror "Example"
8113         @ManageTransactions("TrsfOp")
8114         def MakeMirrorByPlane(self, theObject, thePlane, theName=None):
8115             """
8116             Create an object, symmetrical to the given one relatively the given plane.
8117
8118             Parameters:
8119                 theObject The object to be mirrored.
8120                 thePlane Plane of symmetry.
8121                 theName Object name; when specified, this parameter is used
8122                         for result publication in the study. Otherwise, if automatic
8123                         publication is switched on, default value is used for result name.
8124
8125             Returns:
8126                 New GEOM.GEOM_Object, containing the mirrored shape.
8127             """
8128             # Example: see GEOM_TestAll.py
8129             anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
8130             RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
8131             self._autoPublish(anObj, theName, "mirrored")
8132             return anObj
8133
8134         ## Mirror an object relatively the given axis.
8135         #  @param theObject The object to be mirrored.
8136         #  @param theAxis Axis of symmetry.
8137         #  @param theCopy Flag used to mirror object itself or create a copy.
8138         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8139         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8140         @ManageTransactions("TrsfOp")
8141         def MirrorByAxis(self, theObject, theAxis, theCopy=False):
8142             """
8143             Mirror an object relatively the given axis.
8144
8145             Parameters:
8146                 theObject The object to be mirrored.
8147                 theAxis Axis of symmetry.
8148                 theCopy Flag used to mirror object itself or create a copy.
8149
8150             Returns:
8151                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8152                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8153             """
8154             if theCopy:
8155                 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8156             else:
8157                 anObj = self.TrsfOp.MirrorAxis(theObject, theAxis)
8158             RaiseIfFailed("MirrorByAxis", self.TrsfOp)
8159             return anObj
8160
8161         ## Create an object, symmetrical
8162         #  to the given one relatively the given axis.
8163         #  @param theObject The object to be mirrored.
8164         #  @param theAxis Axis of symmetry.
8165         #  @param theName Object name; when specified, this parameter is used
8166         #         for result publication in the study. Otherwise, if automatic
8167         #         publication is switched on, default value is used for result name.
8168         #
8169         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8170         #
8171         #  @ref tui_mirror "Example"
8172         @ManageTransactions("TrsfOp")
8173         def MakeMirrorByAxis(self, theObject, theAxis, theName=None):
8174             """
8175             Create an object, symmetrical to the given one relatively the given axis.
8176
8177             Parameters:
8178                 theObject The object to be mirrored.
8179                 theAxis Axis of symmetry.
8180                 theName Object name; when specified, this parameter is used
8181                         for result publication in the study. Otherwise, if automatic
8182                         publication is switched on, default value is used for result name.
8183
8184             Returns:
8185                 New GEOM.GEOM_Object, containing the mirrored shape.
8186             """
8187             # Example: see GEOM_TestAll.py
8188             anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
8189             RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
8190             self._autoPublish(anObj, theName, "mirrored")
8191             return anObj
8192
8193         ## Mirror an object relatively the given point.
8194         #  @param theObject The object to be mirrored.
8195         #  @param thePoint Point of symmetry.
8196         #  @param theCopy Flag used to mirror object itself or create a copy.
8197         #  @return Mirrored @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8198         #  new GEOM.GEOM_Object, containing the mirrored object if @a theCopy flag is @c True.
8199         @ManageTransactions("TrsfOp")
8200         def MirrorByPoint(self, theObject, thePoint, theCopy=False):
8201             """
8202             Mirror an object relatively the given point.
8203
8204             Parameters:
8205                 theObject The object to be mirrored.
8206                 thePoint Point of symmetry.
8207                 theCopy Flag used to mirror object itself or create a copy.
8208
8209             Returns:
8210                 Mirrored theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8211                 new GEOM.GEOM_Object, containing the mirrored object if theCopy flag is True.
8212             """
8213             # Example: see GEOM_TestAll.py
8214             if theCopy:
8215                 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8216             else:
8217                 anObj = self.TrsfOp.MirrorPoint(theObject, thePoint)
8218             RaiseIfFailed("MirrorByPoint", self.TrsfOp)
8219             return anObj
8220
8221         ## Create an object, symmetrical
8222         #  to the given one relatively the given point.
8223         #  @param theObject The object to be mirrored.
8224         #  @param thePoint Point of symmetry.
8225         #  @param theName Object name; when specified, this parameter is used
8226         #         for result publication in the study. Otherwise, if automatic
8227         #         publication is switched on, default value is used for result name.
8228         #
8229         #  @return New GEOM.GEOM_Object, containing the mirrored shape.
8230         #
8231         #  @ref tui_mirror "Example"
8232         @ManageTransactions("TrsfOp")
8233         def MakeMirrorByPoint(self, theObject, thePoint, theName=None):
8234             """
8235             Create an object, symmetrical
8236             to the given one relatively the given point.
8237
8238             Parameters:
8239                 theObject The object to be mirrored.
8240                 thePoint Point of symmetry.
8241                 theName Object name; when specified, this parameter is used
8242                         for result publication in the study. Otherwise, if automatic
8243                         publication is switched on, default value is used for result name.
8244
8245             Returns:
8246                 New GEOM.GEOM_Object, containing the mirrored shape.
8247             """
8248             # Example: see GEOM_TestAll.py
8249             anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
8250             RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
8251             self._autoPublish(anObj, theName, "mirrored")
8252             return anObj
8253
8254         ## Modify the location of the given object.
8255         #  @param theObject The object to be displaced.
8256         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8257         #                     If \a theStartLCS is NULL, displacement
8258         #                     will be performed from global CS.\n
8259         #                     If \a theObject itself is used as \a theStartLCS,
8260         #                     its location will be changed to \a theEndLCS.
8261         #  @param theEndLCS Coordinate system to perform displacement to it.
8262         #  @param theCopy Flag used to displace object itself or create a copy.
8263         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8264         #  new GEOM.GEOM_Object, containing the displaced object if @a theCopy flag is @c True.
8265         @ManageTransactions("TrsfOp")
8266         def Position(self, theObject, theStartLCS, theEndLCS, theCopy=False):
8267             """
8268             Modify the Location of the given object by LCS, creating its copy before the setting.
8269
8270             Parameters:
8271                 theObject The object to be displaced.
8272                 theStartLCS Coordinate system to perform displacement from it.
8273                             If theStartLCS is NULL, displacement
8274                             will be performed from global CS.
8275                             If theObject itself is used as theStartLCS,
8276                             its location will be changed to theEndLCS.
8277                 theEndLCS Coordinate system to perform displacement to it.
8278                 theCopy Flag used to displace object itself or create a copy.
8279
8280             Returns:
8281                 Displaced theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8282                 new GEOM.GEOM_Object, containing the displaced object if theCopy flag is True.
8283             """
8284             # Example: see GEOM_TestAll.py
8285             if theCopy:
8286                 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8287             else:
8288                 anObj = self.TrsfOp.PositionShape(theObject, theStartLCS, theEndLCS)
8289             RaiseIfFailed("Displace", self.TrsfOp)
8290             return anObj
8291
8292         ## Modify the Location of the given object by LCS,
8293         #  creating its copy before the setting.
8294         #  @param theObject The object to be displaced.
8295         #  @param theStartLCS Coordinate system to perform displacement from it.\n
8296         #                     If \a theStartLCS is NULL, displacement
8297         #                     will be performed from global CS.\n
8298         #                     If \a theObject itself is used as \a theStartLCS,
8299         #                     its location will be changed to \a theEndLCS.
8300         #  @param theEndLCS Coordinate system to perform displacement to it.
8301         #  @param theName Object name; when specified, this parameter is used
8302         #         for result publication in the study. Otherwise, if automatic
8303         #         publication is switched on, default value is used for result name.
8304         #
8305         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8306         #
8307         #  @ref tui_modify_location "Example"
8308         @ManageTransactions("TrsfOp")
8309         def MakePosition(self, theObject, theStartLCS, theEndLCS, theName=None):
8310             """
8311             Modify the Location of the given object by LCS, creating its copy before the setting.
8312
8313             Parameters:
8314                 theObject The object to be displaced.
8315                 theStartLCS Coordinate system to perform displacement from it.
8316                             If theStartLCS is NULL, displacement
8317                             will be performed from global CS.
8318                             If theObject itself is used as theStartLCS,
8319                             its location will be changed to theEndLCS.
8320                 theEndLCS Coordinate system to perform displacement to it.
8321                 theName Object name; when specified, this parameter is used
8322                         for result publication in the study. Otherwise, if automatic
8323                         publication is switched on, default value is used for result name.
8324
8325             Returns:
8326                 New GEOM.GEOM_Object, containing the displaced shape.
8327
8328             Example of usage:
8329                 # create local coordinate systems
8330                 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
8331                 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
8332                 # modify the location of the given object
8333                 position = geompy.MakePosition(cylinder, cs1, cs2)
8334             """
8335             # Example: see GEOM_TestAll.py
8336             anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
8337             RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
8338             self._autoPublish(anObj, theName, "displaced")
8339             return anObj
8340
8341         ## Modify the Location of the given object by Path.
8342         #  @param  theObject The object to be displaced.
8343         #  @param  thePath Wire or Edge along that the object will be translated.
8344         #  @param  theDistance progress of Path (0 = start location, 1 = end of path location).
8345         #  @param  theCopy is to create a copy objects if true.
8346         #  @param  theReverse  0 - for usual direction, 1 - to reverse path direction.
8347         #  @return Displaced @a theObject (GEOM.GEOM_Object) if @a theCopy is @c False or
8348         #          new GEOM.GEOM_Object, containing the displaced shape if @a theCopy is @c True.
8349         #
8350         #  @ref tui_modify_location "Example"
8351         @ManageTransactions("TrsfOp")
8352         def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse):
8353             """
8354             Modify the Location of the given object by Path.
8355
8356             Parameters:
8357                  theObject The object to be displaced.
8358                  thePath Wire or Edge along that the object will be translated.
8359                  theDistance progress of Path (0 = start location, 1 = end of path location).
8360                  theCopy is to create a copy objects if true.
8361                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8362
8363             Returns:
8364                  Displaced theObject (GEOM.GEOM_Object) if theCopy is False or
8365                  new GEOM.GEOM_Object, containing the displaced shape if theCopy is True.
8366
8367             Example of usage:
8368                 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
8369             """
8370             # Example: see GEOM_TestAll.py
8371             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse)
8372             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8373             return anObj
8374
8375         ## Modify the Location of the given object by Path, creating its copy before the operation.
8376         #  @param theObject The object to be displaced.
8377         #  @param thePath Wire or Edge along that the object will be translated.
8378         #  @param theDistance progress of Path (0 = start location, 1 = end of path location).
8379         #  @param theReverse  0 - for usual direction, 1 - to reverse path direction.
8380         #  @param theName Object name; when specified, this parameter is used
8381         #         for result publication in the study. Otherwise, if automatic
8382         #         publication is switched on, default value is used for result name.
8383         #
8384         #  @return New GEOM.GEOM_Object, containing the displaced shape.
8385         @ManageTransactions("TrsfOp")
8386         def MakePositionAlongPath(self, theObject, thePath, theDistance, theReverse, theName=None):
8387             """
8388             Modify the Location of the given object by Path, creating its copy before the operation.
8389
8390             Parameters:
8391                  theObject The object to be displaced.
8392                  thePath Wire or Edge along that the object will be translated.
8393                  theDistance progress of Path (0 = start location, 1 = end of path location).
8394                  theReverse  0 - for usual direction, 1 - to reverse path direction.
8395                  theName Object name; when specified, this parameter is used
8396                          for result publication in the study. Otherwise, if automatic
8397                          publication is switched on, default value is used for result name.
8398
8399             Returns:
8400                 New GEOM.GEOM_Object, containing the displaced shape.
8401             """
8402             # Example: see GEOM_TestAll.py
8403             anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
8404             RaiseIfFailed("PositionAlongPath", self.TrsfOp)
8405             self._autoPublish(anObj, theName, "displaced")
8406             return anObj
8407
8408         ## Offset given shape.
8409         #  @param theObject The base object for the offset.
8410         #  @param theOffset Offset value.
8411         #  @param theCopy Flag used to offset object itself or create a copy.
8412         #  @return Modified @a theObject (GEOM.GEOM_Object) if @a theCopy flag is @c False (default) or
8413         #  new GEOM.GEOM_Object, containing the result of offset operation if @a theCopy flag is @c True.
8414         @ManageTransactions("TrsfOp")
8415         def Offset(self, theObject, theOffset, theCopy=False):
8416             """
8417             Offset given shape.
8418
8419             Parameters:
8420                 theObject The base object for the offset.
8421                 theOffset Offset value.
8422                 theCopy Flag used to offset object itself or create a copy.
8423
8424             Returns:
8425                 Modified theObject (GEOM.GEOM_Object) if theCopy flag is False (default) or
8426                 new GEOM.GEOM_Object, containing the result of offset operation if theCopy flag is True.
8427             """
8428             theOffset, Parameters = ParseParameters(theOffset)
8429             if theCopy:
8430                 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8431             else:
8432                 anObj = self.TrsfOp.OffsetShape(theObject, theOffset)
8433             RaiseIfFailed("Offset", self.TrsfOp)
8434             anObj.SetParameters(Parameters)
8435             return anObj
8436
8437         ## Create new object as offset of the given one.
8438         #  @param theObject The base object for the offset.
8439         #  @param theOffset Offset value.
8440         #  @param theName Object name; when specified, this parameter is used
8441         #         for result publication in the study. Otherwise, if automatic
8442         #         publication is switched on, default value is used for result name.
8443         #
8444         #  @return New GEOM.GEOM_Object, containing the offset object.
8445         #
8446         #  @ref tui_offset "Example"
8447         @ManageTransactions("TrsfOp")
8448         def MakeOffset(self, theObject, theOffset, theName=None):
8449             """
8450             Create new object as offset of the given one.
8451
8452             Parameters:
8453                 theObject The base object for the offset.
8454                 theOffset Offset value.
8455                 theName Object name; when specified, this parameter is used
8456                         for result publication in the study. Otherwise, if automatic
8457                         publication is switched on, default value is used for result name.
8458
8459             Returns:
8460                 New GEOM.GEOM_Object, containing the offset object.
8461
8462             Example of usage:
8463                  box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
8464                  # create a new object as offset of the given object
8465                  offset = geompy.MakeOffset(box, 70.)
8466             """
8467             # Example: see GEOM_TestAll.py
8468             theOffset, Parameters = ParseParameters(theOffset)
8469             anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
8470             RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
8471             anObj.SetParameters(Parameters)
8472             self._autoPublish(anObj, theName, "offset")
8473             return anObj
8474
8475         ## Create new object as projection of the given one on a 2D surface.
8476         #  @param theSource The source object for the projection. It can be a point, edge or wire.
8477         #  @param theTarget The target object. It can be planar or cylindrical face.
8478         #  @param theName Object name; when specified, this parameter is used
8479         #         for result publication in the study. Otherwise, if automatic
8480         #         publication is switched on, default value is used for result name.
8481         #
8482         #  @return New GEOM.GEOM_Object, containing the projection.
8483         #
8484         #  @ref tui_projection "Example"
8485         @ManageTransactions("TrsfOp")
8486         def MakeProjection(self, theSource, theTarget, theName=None):
8487             """
8488             Create new object as projection of the given one on a 2D surface.
8489
8490             Parameters:
8491                 theSource The source object for the projection. It can be a point, edge or wire.
8492                 theTarget The target object. It can be planar or cylindrical face.
8493                 theName Object name; when specified, this parameter is used
8494                         for result publication in the study. Otherwise, if automatic
8495                         publication is switched on, default value is used for result name.
8496
8497             Returns:
8498                 New GEOM.GEOM_Object, containing the projection.
8499             """
8500             # Example: see GEOM_TestAll.py
8501             anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
8502             RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
8503             self._autoPublish(anObj, theName, "projection")
8504             return anObj
8505
8506         ## Create a projection projection of the given point on a wire or an edge.
8507         #  If there are no solutions or there are 2 or more solutions It throws an
8508         #  exception.
8509         #  @param thePoint the point to be projected.
8510         #  @param theWire the wire. The edge is accepted as well.
8511         #  @param theName Object name; when specified, this parameter is used
8512         #         for result publication in the study. Otherwise, if automatic
8513         #         publication is switched on, default value is used for result name.
8514         #
8515         #  @return [\a u, \a PointOnEdge, \a EdgeInWireIndex]
8516         #  \n \a u: The parameter of projection point on edge.
8517         #  \n \a PointOnEdge: The projection point.
8518         #  \n \a EdgeInWireIndex: The index of an edge in a wire.
8519         #
8520         #  @ref tui_projection "Example"
8521         @ManageTransactions("TrsfOp")
8522         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
8523             """
8524             Create a projection projection of the given point on a wire or an edge.
8525             If there are no solutions or there are 2 or more solutions It throws an
8526             exception.
8527
8528             Parameters:
8529                 thePoint the point to be projected.
8530                 theWire the wire. The edge is accepted as well.
8531                 theName Object name; when specified, this parameter is used
8532                         for result publication in the study. Otherwise, if automatic
8533                         publication is switched on, default value is used for result name.
8534
8535             Returns:
8536                 [u, PointOnEdge, EdgeInWireIndex]
8537                  u: The parameter of projection point on edge.
8538                  PointOnEdge: The projection point.
8539                  EdgeInWireIndex: The index of an edge in a wire.
8540             """
8541             # Example: see GEOM_TestAll.py
8542             anObj = self.TrsfOp.ProjectPointOnWire(thePoint, theWire)
8543             RaiseIfFailed("ProjectPointOnWire", self.TrsfOp)
8544             self._autoPublish(anObj[1], theName, "projection")
8545             return anObj
8546
8547         # -----------------------------------------------------------------------------
8548         # Patterns
8549         # -----------------------------------------------------------------------------
8550
8551         ## Translate the given object along the given vector a given number times
8552         #  @param theObject The object to be translated.
8553         #  @param theVector Direction of the translation. DX if None.
8554         #  @param theStep Distance to translate on.
8555         #  @param theNbTimes Quantity of translations to be done.
8556         #  @param theName Object name; when specified, this parameter is used
8557         #         for result publication in the study. Otherwise, if automatic
8558         #         publication is switched on, default value is used for result name.
8559         #
8560         #  @return New GEOM.GEOM_Object, containing compound of all
8561         #          the shapes, obtained after each translation.
8562         #
8563         #  @ref tui_multi_translation "Example"
8564         @ManageTransactions("TrsfOp")
8565         def MakeMultiTranslation1D(self, theObject, theVector, theStep, theNbTimes, theName=None):
8566             """
8567             Translate the given object along the given vector a given number times
8568
8569             Parameters:
8570                 theObject The object to be translated.
8571                 theVector Direction of the translation. DX if None.
8572                 theStep Distance to translate on.
8573                 theNbTimes Quantity of translations to be done.
8574                 theName Object name; when specified, this parameter is used
8575                         for result publication in the study. Otherwise, if automatic
8576                         publication is switched on, default value is used for result name.
8577
8578             Returns:
8579                 New GEOM.GEOM_Object, containing compound of all
8580                 the shapes, obtained after each translation.
8581
8582             Example of usage:
8583                 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
8584             """
8585             # Example: see GEOM_TestAll.py
8586             theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
8587             anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
8588             RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
8589             anObj.SetParameters(Parameters)
8590             self._autoPublish(anObj, theName, "multitranslation")
8591             return anObj
8592
8593         ## Conseqently apply two specified translations to theObject specified number of times.
8594         #  @param theObject The object to be translated.
8595         #  @param theVector1 Direction of the first translation. DX if None.
8596         #  @param theStep1 Step of the first translation.
8597         #  @param theNbTimes1 Quantity of translations to be done along theVector1.
8598         #  @param theVector2 Direction of the second translation. DY if None.
8599         #  @param theStep2 Step of the second translation.
8600         #  @param theNbTimes2 Quantity of translations to be done along theVector2.
8601         #  @param theName Object name; when specified, this parameter is used
8602         #         for result publication in the study. Otherwise, if automatic
8603         #         publication is switched on, default value is used for result name.
8604         #
8605         #  @return New GEOM.GEOM_Object, containing compound of all
8606         #          the shapes, obtained after each translation.
8607         #
8608         #  @ref tui_multi_translation "Example"
8609         @ManageTransactions("TrsfOp")
8610         def MakeMultiTranslation2D(self, theObject, theVector1, theStep1, theNbTimes1,
8611                                    theVector2, theStep2, theNbTimes2, theName=None):
8612             """
8613             Conseqently apply two specified translations to theObject specified number of times.
8614
8615             Parameters:
8616                 theObject The object to be translated.
8617                 theVector1 Direction of the first translation. DX if None.
8618                 theStep1 Step of the first translation.
8619                 theNbTimes1 Quantity of translations to be done along theVector1.
8620                 theVector2 Direction of the second translation. DY if None.
8621                 theStep2 Step of the second translation.
8622                 theNbTimes2 Quantity of translations to be done along theVector2.
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             Returns:
8628                 New GEOM.GEOM_Object, containing compound of all
8629                 the shapes, obtained after each translation.
8630
8631             Example of usage:
8632                 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
8633             """
8634             # Example: see GEOM_TestAll.py
8635             theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2)
8636             anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
8637                                                  theVector2, theStep2, theNbTimes2)
8638             RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
8639             anObj.SetParameters(Parameters)
8640             self._autoPublish(anObj, theName, "multitranslation")
8641             return anObj
8642
8643         ## Rotate the given object around the given axis a given number times.
8644         #  Rotation angle will be 2*PI/theNbTimes.
8645         #  @param theObject The object to be rotated.
8646         #  @param theAxis The rotation axis. DZ if None.
8647         #  @param theNbTimes Quantity of rotations to be done.
8648         #  @param theName Object name; when specified, this parameter is used
8649         #         for result publication in the study. Otherwise, if automatic
8650         #         publication is switched on, default value is used for result name.
8651         #
8652         #  @return New GEOM.GEOM_Object, containing compound of all the
8653         #          shapes, obtained after each rotation.
8654         #
8655         #  @ref tui_multi_rotation "Example"
8656         @ManageTransactions("TrsfOp")
8657         def MultiRotate1DNbTimes (self, theObject, theAxis, theNbTimes, theName=None):
8658             """
8659             Rotate the given object around the given axis a given number times.
8660             Rotation angle will be 2*PI/theNbTimes.
8661
8662             Parameters:
8663                 theObject The object to be rotated.
8664                 theAxis The rotation axis. DZ if None.
8665                 theNbTimes Quantity of rotations to be done.
8666                 theName Object name; when specified, this parameter is used
8667                         for result publication in the study. Otherwise, if automatic
8668                         publication is switched on, default value is used for result name.
8669
8670             Returns:
8671                 New GEOM.GEOM_Object, containing compound of all the
8672                 shapes, obtained after each rotation.
8673
8674             Example of usage:
8675                 rot1d = geompy.MultiRotate1DNbTimes(prism, vect, 4)
8676             """
8677             # Example: see GEOM_TestAll.py
8678             theNbTimes, Parameters = ParseParameters(theNbTimes)
8679             anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
8680             RaiseIfFailed("MultiRotate1DNbTimes", self.TrsfOp)
8681             anObj.SetParameters(Parameters)
8682             self._autoPublish(anObj, theName, "multirotation")
8683             return anObj
8684
8685         ## Rotate the given object around the given axis
8686         #  a given number times on the given angle.
8687         #  @param theObject The object to be rotated.
8688         #  @param theAxis The rotation axis. DZ if None.
8689         #  @param theAngleStep Rotation angle in radians.
8690         #  @param theNbTimes Quantity of rotations to be done.
8691         #  @param theName Object name; when specified, this parameter is used
8692         #         for result publication in the study. Otherwise, if automatic
8693         #         publication is switched on, default value is used for result name.
8694         #
8695         #  @return New GEOM.GEOM_Object, containing compound of all the
8696         #          shapes, obtained after each rotation.
8697         #
8698         #  @ref tui_multi_rotation "Example"
8699         @ManageTransactions("TrsfOp")
8700         def MultiRotate1DByStep(self, theObject, theAxis, theAngleStep, theNbTimes, theName=None):
8701             """
8702             Rotate the given object around the given axis
8703             a given number times on the given angle.
8704
8705             Parameters:
8706                 theObject The object to be rotated.
8707                 theAxis The rotation axis. DZ if None.
8708                 theAngleStep Rotation angle in radians.
8709                 theNbTimes Quantity of rotations to be done.
8710                 theName Object name; when specified, this parameter is used
8711                         for result publication in the study. Otherwise, if automatic
8712                         publication is switched on, default value is used for result name.
8713
8714             Returns:
8715                 New GEOM.GEOM_Object, containing compound of all the
8716                 shapes, obtained after each rotation.
8717
8718             Example of usage:
8719                 rot1d = geompy.MultiRotate1DByStep(prism, vect, math.pi/4, 4)
8720             """
8721             # Example: see GEOM_TestAll.py
8722             theAngleStep, theNbTimes, Parameters = ParseParameters(theAngleStep, theNbTimes)
8723             anObj = self.TrsfOp.MultiRotate1DByStep(theObject, theAxis, theAngleStep, theNbTimes)
8724             RaiseIfFailed("MultiRotate1DByStep", self.TrsfOp)
8725             anObj.SetParameters(Parameters)
8726             self._autoPublish(anObj, theName, "multirotation")
8727             return anObj
8728
8729         ## Rotate the given object around the given axis a given
8730         #  number times and multi-translate each rotation result.
8731         #  Rotation angle will be 2*PI/theNbTimes1.
8732         #  Translation direction passes through center of gravity
8733         #  of rotated shape and its projection on the rotation axis.
8734         #  @param theObject The object to be rotated.
8735         #  @param theAxis Rotation axis. DZ if None.
8736         #  @param theNbTimes1 Quantity of rotations to be done.
8737         #  @param theRadialStep Translation distance.
8738         #  @param theNbTimes2 Quantity of translations to be done.
8739         #  @param theName Object name; when specified, this parameter is used
8740         #         for result publication in the study. Otherwise, if automatic
8741         #         publication is switched on, default value is used for result name.
8742         #
8743         #  @return New GEOM.GEOM_Object, containing compound of all the
8744         #          shapes, obtained after each transformation.
8745         #
8746         #  @ref tui_multi_rotation "Example"
8747         @ManageTransactions("TrsfOp")
8748         def MultiRotate2DNbTimes(self, theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8749             """
8750             Rotate the given object around the
8751             given axis on the given angle a given number
8752             times and multi-translate each rotation result.
8753             Translation direction passes through center of gravity
8754             of rotated shape and its projection on the rotation axis.
8755
8756             Parameters:
8757                 theObject The object to be rotated.
8758                 theAxis Rotation axis. DZ if None.
8759                 theNbTimes1 Quantity of rotations to be done.
8760                 theRadialStep Translation distance.
8761                 theNbTimes2 Quantity of translations to be done.
8762                 theName Object name; when specified, this parameter is used
8763                         for result publication in the study. Otherwise, if automatic
8764                         publication is switched on, default value is used for result name.
8765
8766             Returns:
8767                 New GEOM.GEOM_Object, containing compound of all the
8768                 shapes, obtained after each transformation.
8769
8770             Example of usage:
8771                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8772             """
8773             # Example: see GEOM_TestAll.py
8774             theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theNbTimes1, theRadialStep, theNbTimes2)
8775             anObj = self.TrsfOp.MultiRotate2DNbTimes(theObject, theAxis, theNbTimes1, theRadialStep, theNbTimes2)
8776             RaiseIfFailed("MultiRotate2DNbTimes", self.TrsfOp)
8777             anObj.SetParameters(Parameters)
8778             self._autoPublish(anObj, theName, "multirotation")
8779             return anObj
8780
8781         ## Rotate the given object around the
8782         #  given axis on the given angle a given number
8783         #  times and multi-translate each rotation result.
8784         #  Translation direction passes through center of gravity
8785         #  of rotated shape and its projection on the rotation axis.
8786         #  @param theObject The object to be rotated.
8787         #  @param theAxis Rotation axis. DZ if None.
8788         #  @param theAngleStep Rotation angle in radians.
8789         #  @param theNbTimes1 Quantity of rotations to be done.
8790         #  @param theRadialStep Translation distance.
8791         #  @param theNbTimes2 Quantity of translations to be done.
8792         #  @param theName Object name; when specified, this parameter is used
8793         #         for result publication in the study. Otherwise, if automatic
8794         #         publication is switched on, default value is used for result name.
8795         #
8796         #  @return New GEOM.GEOM_Object, containing compound of all the
8797         #          shapes, obtained after each transformation.
8798         #
8799         #  @ref tui_multi_rotation "Example"
8800         @ManageTransactions("TrsfOp")
8801         def MultiRotate2DByStep (self, theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, theName=None):
8802             """
8803             Rotate the given object around the
8804             given axis on the given angle a given number
8805             times and multi-translate each rotation result.
8806             Translation direction passes through center of gravity
8807             of rotated shape and its projection on the rotation axis.
8808
8809             Parameters:
8810                 theObject The object to be rotated.
8811                 theAxis Rotation axis. DZ if None.
8812                 theAngleStep Rotation angle in radians.
8813                 theNbTimes1 Quantity of rotations to be done.
8814                 theRadialStep Translation distance.
8815                 theNbTimes2 Quantity of translations to be done.
8816                 theName Object name; when specified, this parameter is used
8817                         for result publication in the study. Otherwise, if automatic
8818                         publication is switched on, default value is used for result name.
8819
8820             Returns:
8821                 New GEOM.GEOM_Object, containing compound of all the
8822                 shapes, obtained after each transformation.
8823
8824             Example of usage:
8825                 rot2d = geompy.MultiRotate2D(prism, vect, math.pi/3, 4, 50, 5)
8826             """
8827             # Example: see GEOM_TestAll.py
8828             theAngleStep, theNbTimes1, theRadialStep, theNbTimes2, Parameters = ParseParameters(theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8829             anObj = self.TrsfOp.MultiRotate2DByStep(theObject, theAxis, theAngleStep, theNbTimes1, theRadialStep, theNbTimes2)
8830             RaiseIfFailed("MultiRotate2DByStep", self.TrsfOp)
8831             anObj.SetParameters(Parameters)
8832             self._autoPublish(anObj, theName, "multirotation")
8833             return anObj
8834
8835         ## The same, as MultiRotate1DNbTimes(), but axis is given by direction and point
8836         #
8837         #  @ref swig_MakeMultiRotation "Example"
8838         def MakeMultiRotation1DNbTimes(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8839             """
8840             The same, as geompy.MultiRotate1DNbTimes, but axis is given by direction and point
8841
8842             Example of usage:
8843                 pz = geompy.MakeVertex(0, 0, 100)
8844                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8845                 MultiRot1D = geompy.MakeMultiRotation1DNbTimes(prism, vy, pz, 6)
8846             """
8847             # Example: see GEOM_TestOthers.py
8848             aVec = self.MakeLine(aPoint,aDir)
8849             # note: auto-publishing is done in self.MultiRotate1D()
8850             anObj = self.MultiRotate1DNbTimes(aShape, aVec, aNbTimes, theName)
8851             return anObj
8852
8853         ## The same, as MultiRotate1DByStep(), but axis is given by direction and point
8854         #
8855         #  @ref swig_MakeMultiRotation "Example"
8856         def MakeMultiRotation1DByStep(self, aShape, aDir, aPoint, anAngle, aNbTimes, theName=None):
8857             """
8858             The same, as geompy.MultiRotate1D, but axis is given by direction and point
8859
8860             Example of usage:
8861                 pz = geompy.MakeVertex(0, 0, 100)
8862                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8863                 MultiRot1D = geompy.MakeMultiRotation1DByStep(prism, vy, pz, math.pi/3, 6)
8864             """
8865             # Example: see GEOM_TestOthers.py
8866             aVec = self.MakeLine(aPoint,aDir)
8867             # note: auto-publishing is done in self.MultiRotate1D()
8868             anObj = self.MultiRotate1DByStep(aShape, aVec, anAngle, aNbTimes, theName)
8869             return anObj
8870
8871         ## The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8872         #
8873         #  @ref swig_MakeMultiRotation "Example"
8874         def MakeMultiRotation2DNbTimes(self, aShape, aDir, aPoint, nbtimes1, aStep, nbtimes2, theName=None):
8875             """
8876             The same, as MultiRotate2DNbTimes(), but axis is given by direction and point
8877
8878             Example of usage:
8879                 pz = geompy.MakeVertex(0, 0, 100)
8880                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8881                 MultiRot2D = geompy.MakeMultiRotation2DNbTimes(f12, vy, pz, 6, 30, 3)
8882             """
8883             # Example: see GEOM_TestOthers.py
8884             aVec = self.MakeLine(aPoint,aDir)
8885             # note: auto-publishing is done in self.MultiRotate2DNbTimes()
8886             anObj = self.MultiRotate2DNbTimes(aShape, aVec, nbtimes1, aStep, nbtimes2, theName)
8887             return anObj
8888
8889         ## The same, as MultiRotate2DByStep(), but axis is given by direction and point
8890         #
8891         #  @ref swig_MakeMultiRotation "Example"
8892         def MakeMultiRotation2DByStep(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8893             """
8894             The same, as MultiRotate2DByStep(), but axis is given by direction and point
8895
8896             Example of usage:
8897                 pz = geompy.MakeVertex(0, 0, 100)
8898                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8899                 MultiRot2D = geompy.MakeMultiRotation2DByStep(f12, vy, pz, math.pi/4, 6, 30, 3)
8900             """
8901             # Example: see GEOM_TestOthers.py
8902             aVec = self.MakeLine(aPoint,aDir)
8903             # note: auto-publishing is done in self.MultiRotate2D()
8904             anObj = self.MultiRotate2DByStep(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8905             return anObj
8906
8907         # end of l3_transform
8908         ## @}
8909
8910         ## @addtogroup l3_transform_d
8911         ## @{
8912
8913         ## Deprecated method. Use MultiRotate1DNbTimes instead.
8914         def MultiRotate1D(self, theObject, theAxis, theNbTimes, theName=None):
8915             """
8916             Deprecated method. Use MultiRotate1DNbTimes instead.
8917             """
8918             print "The method MultiRotate1D is DEPRECATED. Use MultiRotate1DNbTimes instead."
8919             return self.MultiRotate1DNbTimes(theObject, theAxis, theNbTimes, theName)
8920
8921         ## The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8922         #  This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8923         @ManageTransactions("TrsfOp")
8924         def MultiRotate2D(self, theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2, theName=None):
8925             """
8926             The same, as MultiRotate2DByStep(), but theAngle is in degrees.
8927             This method is DEPRECATED. Use MultiRotate2DByStep() instead.
8928
8929             Example of usage:
8930                 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
8931             """
8932             print "The method MultiRotate2D is DEPRECATED. Use MultiRotate2DByStep instead."
8933             theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
8934             anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
8935             RaiseIfFailed("MultiRotate2D", self.TrsfOp)
8936             anObj.SetParameters(Parameters)
8937             self._autoPublish(anObj, theName, "multirotation")
8938             return anObj
8939
8940         ## The same, as MultiRotate1D(), but axis is given by direction and point
8941         #  This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8942         def MakeMultiRotation1D(self, aShape, aDir, aPoint, aNbTimes, theName=None):
8943             """
8944             The same, as geompy.MultiRotate1D, but axis is given by direction and point.
8945             This method is DEPRECATED. Use MakeMultiRotation1DNbTimes instead.
8946
8947             Example of usage:
8948                 pz = geompy.MakeVertex(0, 0, 100)
8949                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8950                 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
8951             """
8952             print "The method MakeMultiRotation1D is DEPRECATED. Use MakeMultiRotation1DNbTimes instead."
8953             aVec = self.MakeLine(aPoint,aDir)
8954             # note: auto-publishing is done in self.MultiRotate1D()
8955             anObj = self.MultiRotate1D(aShape, aVec, aNbTimes, theName)
8956             return anObj
8957
8958         ## The same, as MultiRotate2D(), but axis is given by direction and point
8959         #  This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8960         def MakeMultiRotation2D(self, aShape, aDir, aPoint, anAngle, nbtimes1, aStep, nbtimes2, theName=None):
8961             """
8962             The same, as MultiRotate2D(), but axis is given by direction and point
8963             This method is DEPRECATED. Use MakeMultiRotation2DByStep instead.
8964
8965             Example of usage:
8966                 pz = geompy.MakeVertex(0, 0, 100)
8967                 vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
8968                 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
8969             """
8970             print "The method MakeMultiRotation2D is DEPRECATED. Use MakeMultiRotation2DByStep instead."
8971             aVec = self.MakeLine(aPoint,aDir)
8972             # note: auto-publishing is done in self.MultiRotate2D()
8973             anObj = self.MultiRotate2D(aShape, aVec, anAngle, nbtimes1, aStep, nbtimes2, theName)
8974             return anObj
8975
8976         # end of l3_transform_d
8977         ## @}
8978
8979         ## @addtogroup l3_local
8980         ## @{
8981
8982         ## Perform a fillet on all edges of the given shape.
8983         #  @param theShape Shape, to perform fillet on.
8984         #  @param theR Fillet radius.
8985         #  @param theName Object name; when specified, this parameter is used
8986         #         for result publication in the study. Otherwise, if automatic
8987         #         publication is switched on, default value is used for result name.
8988         #
8989         #  @return New GEOM.GEOM_Object, containing the result shape.
8990         #
8991         #  @ref tui_fillet "Example 1"
8992         #  \n @ref swig_MakeFilletAll "Example 2"
8993         @ManageTransactions("LocalOp")
8994         def MakeFilletAll(self, theShape, theR, theName=None):
8995             """
8996             Perform a fillet on all edges of the given shape.
8997
8998             Parameters:
8999                 theShape Shape, to perform fillet on.
9000                 theR Fillet radius.
9001                 theName Object name; when specified, this parameter is used
9002                         for result publication in the study. Otherwise, if automatic
9003                         publication is switched on, default value is used for result name.
9004
9005             Returns:
9006                 New GEOM.GEOM_Object, containing the result shape.
9007
9008             Example of usage:
9009                filletall = geompy.MakeFilletAll(prism, 10.)
9010             """
9011             # Example: see GEOM_TestOthers.py
9012             theR,Parameters = ParseParameters(theR)
9013             anObj = self.LocalOp.MakeFilletAll(theShape, theR)
9014             RaiseIfFailed("MakeFilletAll", self.LocalOp)
9015             anObj.SetParameters(Parameters)
9016             self._autoPublish(anObj, theName, "fillet")
9017             return anObj
9018
9019         ## Perform a fillet on the specified edges/faces of the given shape
9020         #  @param theShape Shape, to perform fillet on.
9021         #  @param theR Fillet radius.
9022         #  @param theShapeType Type of shapes in <VAR>theListShapes</VAR> (see ShapeType())
9023         #  @param theListShapes Global indices of edges/faces to perform fillet on.
9024         #  @param theName Object name; when specified, this parameter is used
9025         #         for result publication in the study. Otherwise, if automatic
9026         #         publication is switched on, default value is used for result name.
9027         #
9028         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9029         #
9030         #  @return New GEOM.GEOM_Object, containing the result shape.
9031         #
9032         #  @ref tui_fillet "Example"
9033         @ManageTransactions("LocalOp")
9034         def MakeFillet(self, theShape, theR, theShapeType, theListShapes, theName=None):
9035             """
9036             Perform a fillet on the specified edges/faces of the given shape
9037
9038             Parameters:
9039                 theShape Shape, to perform fillet on.
9040                 theR Fillet radius.
9041                 theShapeType Type of shapes in theListShapes (see geompy.ShapeTypes)
9042                 theListShapes Global indices of edges/faces to perform fillet on.
9043                 theName Object name; when specified, this parameter is used
9044                         for result publication in the study. Otherwise, if automatic
9045                         publication is switched on, default value is used for result name.
9046
9047             Note:
9048                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9049
9050             Returns:
9051                 New GEOM.GEOM_Object, containing the result shape.
9052
9053             Example of usage:
9054                 # get the list of IDs (IDList) for the fillet
9055                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9056                 IDlist_e = []
9057                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9058                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9059                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9060                 # make a fillet on the specified edges of the given shape
9061                 fillet = geompy.MakeFillet(prism, 10., geompy.ShapeType["EDGE"], IDlist_e)
9062             """
9063             # Example: see GEOM_TestAll.py
9064             theR,Parameters = ParseParameters(theR)
9065             anObj = None
9066             if theShapeType == self.ShapeType["EDGE"]:
9067                 anObj = self.LocalOp.MakeFilletEdges(theShape, theR, theListShapes)
9068                 RaiseIfFailed("MakeFilletEdges", self.LocalOp)
9069             else:
9070                 anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
9071                 RaiseIfFailed("MakeFilletFaces", self.LocalOp)
9072             anObj.SetParameters(Parameters)
9073             self._autoPublish(anObj, theName, "fillet")
9074             return anObj
9075
9076         ## The same that MakeFillet() but with two Fillet Radius R1 and R2
9077         @ManageTransactions("LocalOp")
9078         def MakeFilletR1R2(self, theShape, theR1, theR2, theShapeType, theListShapes, theName=None):
9079             """
9080             The same that geompy.MakeFillet but with two Fillet Radius R1 and R2
9081
9082             Example of usage:
9083                 # get the list of IDs (IDList) for the fillet
9084                 prism_edges = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["EDGE"])
9085                 IDlist_e = []
9086                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
9087                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
9088                 IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
9089                 # make a fillet on the specified edges of the given shape
9090                 fillet = geompy.MakeFillet(prism, 10., 15., geompy.ShapeType["EDGE"], IDlist_e)
9091             """
9092             theR1,theR2,Parameters = ParseParameters(theR1,theR2)
9093             anObj = None
9094             if theShapeType == self.ShapeType["EDGE"]:
9095                 anObj = self.LocalOp.MakeFilletEdgesR1R2(theShape, theR1, theR2, theListShapes)
9096                 RaiseIfFailed("MakeFilletEdgesR1R2", self.LocalOp)
9097             else:
9098                 anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
9099                 RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
9100             anObj.SetParameters(Parameters)
9101             self._autoPublish(anObj, theName, "fillet")
9102             return anObj
9103
9104         ## Perform a fillet on the specified edges of the given shape
9105         #  @param theShape  Wire Shape to perform fillet on.
9106         #  @param theR  Fillet radius.
9107         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9108         #    \note Global index of sub-shape can be obtained, using method GetSubShapeID()
9109         #    \note The list of vertices could be empty,
9110         #          in this case fillet will done done at all vertices in wire
9111         #  @param doIgnoreSecantVertices If FALSE, fillet radius is always limited
9112         #         by the length of the edges, nearest to the fillet vertex.
9113         #         But sometimes the next edge is C1 continuous with the one, nearest to
9114         #         the fillet point, and such two (or more) edges can be united to allow
9115         #         bigger radius. Set this flag to TRUE to allow collinear edges union,
9116         #         thus ignoring the secant vertex (vertices).
9117         #  @param theName Object name; when specified, this parameter is used
9118         #         for result publication in the study. Otherwise, if automatic
9119         #         publication is switched on, default value is used for result name.
9120         #
9121         #  @return New GEOM.GEOM_Object, containing the result shape.
9122         #
9123         #  @ref tui_fillet2d "Example"
9124         @ManageTransactions("LocalOp")
9125         def MakeFillet1D(self, theShape, theR, theListOfVertexes, doIgnoreSecantVertices = True, theName=None):
9126             """
9127             Perform a fillet on the specified edges of the given shape
9128
9129             Parameters:
9130                 theShape  Wire Shape to perform fillet on.
9131                 theR  Fillet radius.
9132                 theListOfVertexes Global indices of vertexes to perform fillet on.
9133                 doIgnoreSecantVertices If FALSE, fillet radius is always limited
9134                     by the length of the edges, nearest to the fillet vertex.
9135                     But sometimes the next edge is C1 continuous with the one, nearest to
9136                     the fillet point, and such two (or more) edges can be united to allow
9137                     bigger radius. Set this flag to TRUE to allow collinear edges union,
9138                     thus ignoring the secant vertex (vertices).
9139                 theName Object name; when specified, this parameter is used
9140                         for result publication in the study. Otherwise, if automatic
9141                         publication is switched on, default value is used for result name.
9142             Note:
9143                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9144
9145                 The list of vertices could be empty,in this case fillet will done done at all vertices in wire
9146
9147             Returns:
9148                 New GEOM.GEOM_Object, containing the result shape.
9149
9150             Example of usage:
9151                 # create wire
9152                 Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
9153                 # make fillet at given wire vertices with giver radius
9154                 Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
9155             """
9156             # Example: see GEOM_TestAll.py
9157             theR,doIgnoreSecantVertices,Parameters = ParseParameters(theR,doIgnoreSecantVertices)
9158             anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
9159             RaiseIfFailed("MakeFillet1D", self.LocalOp)
9160             anObj.SetParameters(Parameters)
9161             self._autoPublish(anObj, theName, "fillet")
9162             return anObj
9163
9164         ## Perform a fillet at the specified vertices of the given face/shell.
9165         #  @param theShape Face or Shell shape to perform fillet on.
9166         #  @param theR Fillet radius.
9167         #  @param theListOfVertexes Global indices of vertexes to perform fillet on.
9168         #  @param theName Object name; when specified, this parameter is used
9169         #         for result publication in the study. Otherwise, if automatic
9170         #         publication is switched on, default value is used for result name.
9171         #
9172         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9173         #
9174         #  @return New GEOM.GEOM_Object, containing the result shape.
9175         #
9176         #  @ref tui_fillet2d "Example"
9177         @ManageTransactions("LocalOp")
9178         def MakeFillet2D(self, theShape, theR, theListOfVertexes, theName=None):
9179             """
9180             Perform a fillet at the specified vertices of the given face/shell.
9181
9182             Parameters:
9183                 theShape  Face or Shell shape to perform fillet on.
9184                 theR  Fillet radius.
9185                 theListOfVertexes Global indices of vertexes to perform fillet on.
9186                 theName Object name; when specified, this parameter is used
9187                         for result publication in the study. Otherwise, if automatic
9188                         publication is switched on, default value is used for result name.
9189             Note:
9190                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9191
9192             Returns:
9193                 New GEOM.GEOM_Object, containing the result shape.
9194
9195             Example of usage:
9196                 face = geompy.MakeFaceHW(100, 100, 1)
9197                 fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
9198             """
9199             # Example: see GEOM_TestAll.py
9200             theR,Parameters = ParseParameters(theR)
9201             anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
9202             RaiseIfFailed("MakeFillet2D", self.LocalOp)
9203             anObj.SetParameters(Parameters)
9204             self._autoPublish(anObj, theName, "fillet")
9205             return anObj
9206
9207         ## Perform a symmetric chamfer on all edges of the given shape.
9208         #  @param theShape Shape, to perform chamfer on.
9209         #  @param theD Chamfer size along each face.
9210         #  @param theName Object name; when specified, this parameter is used
9211         #         for result publication in the study. Otherwise, if automatic
9212         #         publication is switched on, default value is used for result name.
9213         #
9214         #  @return New GEOM.GEOM_Object, containing the result shape.
9215         #
9216         #  @ref tui_chamfer "Example 1"
9217         #  \n @ref swig_MakeChamferAll "Example 2"
9218         @ManageTransactions("LocalOp")
9219         def MakeChamferAll(self, theShape, theD, theName=None):
9220             """
9221             Perform a symmetric chamfer on all edges of the given shape.
9222
9223             Parameters:
9224                 theShape Shape, to perform chamfer on.
9225                 theD Chamfer size along each face.
9226                 theName Object name; when specified, this parameter is used
9227                         for result publication in the study. Otherwise, if automatic
9228                         publication is switched on, default value is used for result name.
9229
9230             Returns:
9231                 New GEOM.GEOM_Object, containing the result shape.
9232
9233             Example of usage:
9234                 chamfer_all = geompy.MakeChamferAll(prism, 10.)
9235             """
9236             # Example: see GEOM_TestOthers.py
9237             theD,Parameters = ParseParameters(theD)
9238             anObj = self.LocalOp.MakeChamferAll(theShape, theD)
9239             RaiseIfFailed("MakeChamferAll", self.LocalOp)
9240             anObj.SetParameters(Parameters)
9241             self._autoPublish(anObj, theName, "chamfer")
9242             return anObj
9243
9244         ## Perform a chamfer on edges, common to the specified faces,
9245         #  with distance D1 on the Face1
9246         #  @param theShape Shape, to perform chamfer on.
9247         #  @param theD1 Chamfer size along \a theFace1.
9248         #  @param theD2 Chamfer size along \a theFace2.
9249         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9250         #  @param theName Object name; when specified, this parameter is used
9251         #         for result publication in the study. Otherwise, if automatic
9252         #         publication is switched on, default value is used for result name.
9253         #
9254         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9255         #
9256         #  @return New GEOM.GEOM_Object, containing the result shape.
9257         #
9258         #  @ref tui_chamfer "Example"
9259         @ManageTransactions("LocalOp")
9260         def MakeChamferEdge(self, theShape, theD1, theD2, theFace1, theFace2, theName=None):
9261             """
9262             Perform a chamfer on edges, common to the specified faces,
9263             with distance D1 on the Face1
9264
9265             Parameters:
9266                 theShape Shape, to perform chamfer on.
9267                 theD1 Chamfer size along theFace1.
9268                 theD2 Chamfer size along theFace2.
9269                 theFace1,theFace2 Global indices of two faces of theShape.
9270                 theName Object name; when specified, this parameter is used
9271                         for result publication in the study. Otherwise, if automatic
9272                         publication is switched on, default value is used for result name.
9273
9274             Note:
9275                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9276
9277             Returns:
9278                 New GEOM.GEOM_Object, containing the result shape.
9279
9280             Example of usage:
9281                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9282                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9283                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9284                 chamfer_e = geompy.MakeChamferEdge(prism, 10., 10., f_ind_1, f_ind_2)
9285             """
9286             # Example: see GEOM_TestAll.py
9287             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9288             anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
9289             RaiseIfFailed("MakeChamferEdge", self.LocalOp)
9290             anObj.SetParameters(Parameters)
9291             self._autoPublish(anObj, theName, "chamfer")
9292             return anObj
9293
9294         ## Perform a chamfer on edges
9295         #  @param theShape Shape, to perform chamfer on.
9296         #  @param theD Chamfer length
9297         #  @param theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9298         #  @param theFace1,theFace2 Global indices of two faces of \a theShape.
9299         #  @param theName Object name; when specified, this parameter is used
9300         #         for result publication in the study. Otherwise, if automatic
9301         #         publication is switched on, default value is used for result name.
9302         #
9303         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9304         #
9305         #  @return New GEOM.GEOM_Object, containing the result shape.
9306         @ManageTransactions("LocalOp")
9307         def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2, theName=None):
9308             """
9309             Perform a chamfer on edges
9310
9311             Parameters:
9312                 theShape Shape, to perform chamfer on.
9313                 theD1 Chamfer size along theFace1.
9314                 theAngle Angle of chamfer (angle in radians or a name of variable which defines angle in degrees).
9315                 theFace1,theFace2 Global indices of two faces of theShape.
9316                 theName Object name; when specified, this parameter is used
9317                         for result publication in the study. Otherwise, if automatic
9318                         publication is switched on, default value is used for result name.
9319
9320             Note:
9321                 Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
9322
9323             Returns:
9324                 New GEOM.GEOM_Object, containing the result shape.
9325
9326             Example of usage:
9327                 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
9328                 f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
9329                 f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
9330                 ang = 30
9331                 chamfer_e = geompy.MakeChamferEdge(prism, 10., ang, f_ind_1, f_ind_2)
9332             """
9333             flag = False
9334             if isinstance(theAngle,str):
9335                 flag = True
9336             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9337             if flag:
9338                 theAngle = theAngle*math.pi/180.0
9339             anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
9340             RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
9341             anObj.SetParameters(Parameters)
9342             self._autoPublish(anObj, theName, "chamfer")
9343             return anObj
9344
9345         ## Perform a chamfer on all edges of the specified faces,
9346         #  with distance D1 on the first specified face (if several for one edge)
9347         #  @param theShape Shape, to perform chamfer on.
9348         #  @param theD1 Chamfer size along face from \a theFaces. If both faces,
9349         #               connected to the edge, are in \a theFaces, \a theD1
9350         #               will be get along face, which is nearer to \a theFaces beginning.
9351         #  @param theD2 Chamfer size along another of two faces, connected to the edge.
9352         #  @param theFaces Sequence of global indices of faces of \a theShape.
9353         #  @param theName Object name; when specified, this parameter is used
9354         #         for result publication in the study. Otherwise, if automatic
9355         #         publication is switched on, default value is used for result name.
9356         #
9357         #  @note Global index of sub-shape can be obtained, using method GetSubShapeID().
9358         #
9359         #  @return New GEOM.GEOM_Object, containing the result shape.
9360         #
9361         #  @ref tui_chamfer "Example"
9362         @ManageTransactions("LocalOp")
9363         def MakeChamferFaces(self, theShape, theD1, theD2, theFaces, theName=None):
9364             """
9365             Perform a chamfer on all edges of the specified faces,
9366             with distance D1 on the first specified face (if several for one edge)
9367
9368             Parameters:
9369                 theShape Shape, to perform chamfer on.
9370                 theD1 Chamfer size along face from  theFaces. If both faces,
9371                       connected to the edge, are in theFaces, theD1
9372                       will be get along face, which is nearer to theFaces beginning.
9373                 theD2 Chamfer size along another of two faces, connected to the edge.
9374                 theFaces Sequence of global indices of faces of theShape.
9375                 theName Object name; when specified, this parameter is used
9376                         for result publication in the study. Otherwise, if automatic
9377                         publication is switched on, default value is used for result name.
9378
9379             Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
9380
9381             Returns:
9382                 New GEOM.GEOM_Object, containing the result shape.
9383             """
9384             # Example: see GEOM_TestAll.py
9385             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9386             anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
9387             RaiseIfFailed("MakeChamferFaces", self.LocalOp)
9388             anObj.SetParameters(Parameters)
9389             self._autoPublish(anObj, theName, "chamfer")
9390             return anObj
9391
9392         ## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
9393         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9394         #
9395         #  @ref swig_FilletChamfer "Example"
9396         @ManageTransactions("LocalOp")
9397         def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces, theName=None):
9398             """
9399             The Same that geompy.MakeChamferFaces but with params theD is chamfer lenght and
9400             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9401             """
9402             flag = False
9403             if isinstance(theAngle,str):
9404                 flag = True
9405             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9406             if flag:
9407                 theAngle = theAngle*math.pi/180.0
9408             anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
9409             RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
9410             anObj.SetParameters(Parameters)
9411             self._autoPublish(anObj, theName, "chamfer")
9412             return anObj
9413
9414         ## Perform a chamfer on edges,
9415         #  with distance D1 on the first specified face (if several for one edge)
9416         #  @param theShape Shape, to perform chamfer on.
9417         #  @param theD1,theD2 Chamfer size
9418         #  @param theEdges Sequence of edges of \a theShape.
9419         #  @param theName Object name; when specified, this parameter is used
9420         #         for result publication in the study. Otherwise, if automatic
9421         #         publication is switched on, default value is used for result name.
9422         #
9423         #  @return New GEOM.GEOM_Object, containing the result shape.
9424         #
9425         #  @ref swig_FilletChamfer "Example"
9426         @ManageTransactions("LocalOp")
9427         def MakeChamferEdges(self, theShape, theD1, theD2, theEdges, theName=None):
9428             """
9429             Perform a chamfer on edges,
9430             with distance D1 on the first specified face (if several for one edge)
9431
9432             Parameters:
9433                 theShape Shape, to perform chamfer on.
9434                 theD1,theD2 Chamfer size
9435                 theEdges Sequence of edges of theShape.
9436                 theName Object name; when specified, this parameter is used
9437                         for result publication in the study. Otherwise, if automatic
9438                         publication is switched on, default value is used for result name.
9439
9440             Returns:
9441                 New GEOM.GEOM_Object, containing the result shape.
9442             """
9443             theD1,theD2,Parameters = ParseParameters(theD1,theD2)
9444             anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
9445             RaiseIfFailed("MakeChamferEdges", self.LocalOp)
9446             anObj.SetParameters(Parameters)
9447             self._autoPublish(anObj, theName, "chamfer")
9448             return anObj
9449
9450         ## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
9451         #  theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9452         @ManageTransactions("LocalOp")
9453         def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges, theName=None):
9454             """
9455             The Same that geompy.MakeChamferEdges but with params theD is chamfer lenght and
9456             theAngle is Angle of chamfer (angle in radians or a name of variable which defines angle in degrees)
9457             """
9458             flag = False
9459             if isinstance(theAngle,str):
9460                 flag = True
9461             theD,theAngle,Parameters = ParseParameters(theD,theAngle)
9462             if flag:
9463                 theAngle = theAngle*math.pi/180.0
9464             anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
9465             RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
9466             anObj.SetParameters(Parameters)
9467             self._autoPublish(anObj, theName, "chamfer")
9468             return anObj
9469
9470         ## @sa MakeChamferEdge(), MakeChamferFaces()
9471         #
9472         #  @ref swig_MakeChamfer "Example"
9473         def MakeChamfer(self, aShape, d1, d2, aShapeType, ListShape, theName=None):
9474             """
9475             See geompy.MakeChamferEdge() and geompy.MakeChamferFaces() functions for more information.
9476             """
9477             # Example: see GEOM_TestOthers.py
9478             anObj = None
9479             # note: auto-publishing is done in self.MakeChamferEdge() or self.MakeChamferFaces()
9480             if aShapeType == self.ShapeType["EDGE"]:
9481                 anObj = self.MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1],theName)
9482             else:
9483                 anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape,theName)
9484             return anObj
9485
9486         ## Remove material from a solid by extrusion of the base shape on the given distance.
9487         #  @param theInit Shape to remove material from. It must be a solid or
9488         #  a compound made of a single solid.
9489         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9490         #  @param theH Prism dimension along the normal to theBase
9491         #  @param theAngle Draft angle in degrees.
9492         #  @param theName Object name; when specified, this parameter is used
9493         #         for result publication in the study. Otherwise, if automatic
9494         #         publication is switched on, default value is used for result name.
9495         #
9496         #  @return New GEOM.GEOM_Object, containing the initial shape with removed material
9497         #
9498         #  @ref tui_creation_prism "Example"
9499         @ManageTransactions("PrimOp")
9500         def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
9501             """
9502             Add material to a solid by extrusion of the base shape on the given distance.
9503
9504             Parameters:
9505                 theInit Shape to remove material from. It must be a solid or a compound made of a single solid.
9506                 theBase Closed edge or wire defining the base shape to be extruded.
9507                 theH Prism dimension along the normal  to theBase
9508                 theAngle Draft angle in degrees.
9509                 theName Object name; when specified, this parameter is used
9510                         for result publication in the study. Otherwise, if automatic
9511                         publication is switched on, default value is used for result name.
9512
9513             Returns:
9514                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
9515             """
9516             # Example: see GEOM_TestAll.py
9517             #theH,Parameters = ParseParameters(theH)
9518             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
9519             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9520             #anObj.SetParameters(Parameters)
9521             self._autoPublish(anObj, theName, "extrudedCut")
9522             return anObj
9523
9524         ## Add material to a solid by extrusion of the base shape on the given distance.
9525         #  @param theInit Shape to add material to. It must be a solid or
9526         #  a compound made of a single solid.
9527         #  @param theBase Closed edge or wire defining the base shape to be extruded.
9528         #  @param theH Prism dimension along the normal to theBase
9529         #  @param theAngle Draft angle in degrees.
9530         #  @param theName Object name; when specified, this parameter is used
9531         #         for result publication in the study. Otherwise, if automatic
9532         #         publication is switched on, default value is used for result name.
9533         #
9534         #  @return New GEOM.GEOM_Object, containing the initial shape with added material
9535         #
9536         #  @ref tui_creation_prism "Example"
9537         @ManageTransactions("PrimOp")
9538         def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
9539             """
9540             Add material to a solid by extrusion of the base shape on the given distance.
9541
9542             Parameters:
9543                 theInit Shape to add material to. It must be a solid or a compound made of a single solid.
9544                 theBase Closed edge or wire defining the base shape to be extruded.
9545                 theH Prism dimension along the normal  to theBase
9546                 theAngle Draft angle in degrees.
9547                 theName Object name; when specified, this parameter is used
9548                         for result publication in the study. Otherwise, if automatic
9549                         publication is switched on, default value is used for result name.
9550
9551             Returns:
9552                 New GEOM.GEOM_Object,  containing the initial shape with added material.
9553             """
9554             # Example: see GEOM_TestAll.py
9555             #theH,Parameters = ParseParameters(theH)
9556             anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
9557             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
9558             #anObj.SetParameters(Parameters)
9559             self._autoPublish(anObj, theName, "extrudedBoss")
9560             return anObj
9561
9562         # end of l3_local
9563         ## @}
9564
9565         ## @addtogroup l3_basic_op
9566         ## @{
9567
9568         ## Perform an Archimde operation on the given shape with given parameters.
9569         #  The object presenting the resulting face is returned.
9570         #  @param theShape Shape to be put in water.
9571         #  @param theWeight Weight og the shape.
9572         #  @param theWaterDensity Density of the water.
9573         #  @param theMeshDeflection Deflection of the mesh, using to compute the section.
9574         #  @param theName Object name; when specified, this parameter is used
9575         #         for result publication in the study. Otherwise, if automatic
9576         #         publication is switched on, default value is used for result name.
9577         #
9578         #  @return New GEOM.GEOM_Object, containing a section of \a theShape
9579         #          by a plane, corresponding to water level.
9580         #
9581         #  @ref tui_archimede "Example"
9582         @ManageTransactions("LocalOp")
9583         def Archimede(self, theShape, theWeight, theWaterDensity, theMeshDeflection, theName=None):
9584             """
9585             Perform an Archimde operation on the given shape with given parameters.
9586             The object presenting the resulting face is returned.
9587
9588             Parameters:
9589                 theShape Shape to be put in water.
9590                 theWeight Weight og the shape.
9591                 theWaterDensity Density of the water.
9592                 theMeshDeflection Deflection of the mesh, using to compute the section.
9593                 theName Object name; when specified, this parameter is used
9594                         for result publication in the study. Otherwise, if automatic
9595                         publication is switched on, default value is used for result name.
9596
9597             Returns:
9598                 New GEOM.GEOM_Object, containing a section of theShape
9599                 by a plane, corresponding to water level.
9600             """
9601             # Example: see GEOM_TestAll.py
9602             theWeight,theWaterDensity,theMeshDeflection,Parameters = ParseParameters(
9603               theWeight,theWaterDensity,theMeshDeflection)
9604             anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
9605             RaiseIfFailed("MakeArchimede", self.LocalOp)
9606             anObj.SetParameters(Parameters)
9607             self._autoPublish(anObj, theName, "archimede")
9608             return anObj
9609
9610         # end of l3_basic_op
9611         ## @}
9612
9613         ## @addtogroup l2_measure
9614         ## @{
9615
9616         ## Get point coordinates
9617         #  @return [x, y, z]
9618         #
9619         #  @ref tui_measurement_tools_page "Example"
9620         @ManageTransactions("MeasuOp")
9621         def PointCoordinates(self,Point):
9622             """
9623             Get point coordinates
9624
9625             Returns:
9626                 [x, y, z]
9627             """
9628             # Example: see GEOM_TestMeasures.py
9629             aTuple = self.MeasuOp.PointCoordinates(Point)
9630             RaiseIfFailed("PointCoordinates", self.MeasuOp)
9631             return aTuple
9632
9633         ## Get vector coordinates
9634         #  @return [x, y, z]
9635         #
9636         #  @ref tui_measurement_tools_page "Example"
9637         def VectorCoordinates(self,Vector):
9638             """
9639             Get vector coordinates
9640
9641             Returns:
9642                 [x, y, z]
9643             """
9644
9645             p1=self.GetFirstVertex(Vector)
9646             p2=self.GetLastVertex(Vector)
9647
9648             X1=self.PointCoordinates(p1)
9649             X2=self.PointCoordinates(p2)
9650
9651             return (X2[0]-X1[0],X2[1]-X1[1],X2[2]-X1[2])
9652
9653
9654         ## Compute cross product
9655         #  @return vector w=u^v
9656         #
9657         #  @ref tui_measurement_tools_page "Example"
9658         def CrossProduct(self, Vector1, Vector2):
9659             """
9660             Compute cross product
9661
9662             Returns: vector w=u^v
9663             """
9664             u=self.VectorCoordinates(Vector1)
9665             v=self.VectorCoordinates(Vector2)
9666             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])
9667
9668             return w
9669
9670         ## Compute cross product
9671         #  @return dot product  p=u.v
9672         #
9673         #  @ref tui_measurement_tools_page "Example"
9674         def DotProduct(self, Vector1, Vector2):
9675             """
9676             Compute cross product
9677
9678             Returns: dot product  p=u.v
9679             """
9680             u=self.VectorCoordinates(Vector1)
9681             v=self.VectorCoordinates(Vector2)
9682             p=u[0]*v[0]+u[1]*v[1]+u[2]*v[2]
9683
9684             return p
9685
9686
9687         ## Get summarized length of all wires,
9688         #  area of surface and volume of the given shape.
9689         #  @param theShape Shape to define properties of.
9690         #  @return [theLength, theSurfArea, theVolume]\n
9691         #  theLength:   Summarized length of all wires of the given shape.\n
9692         #  theSurfArea: Area of surface of the given shape.\n
9693         #  theVolume:   Volume of the given shape.
9694         #
9695         #  @ref tui_measurement_tools_page "Example"
9696         @ManageTransactions("MeasuOp")
9697         def BasicProperties(self,theShape):
9698             """
9699             Get summarized length of all wires,
9700             area of surface and volume of the given shape.
9701
9702             Parameters:
9703                 theShape Shape to define properties of.
9704
9705             Returns:
9706                 [theLength, theSurfArea, theVolume]
9707                  theLength:   Summarized length of all wires of the given shape.
9708                  theSurfArea: Area of surface of the given shape.
9709                  theVolume:   Volume of the given shape.
9710             """
9711             # Example: see GEOM_TestMeasures.py
9712             aTuple = self.MeasuOp.GetBasicProperties(theShape)
9713             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
9714             return aTuple
9715
9716         ## Get parameters of bounding box of the given shape
9717         #  @param theShape Shape to obtain bounding box of.
9718         #  @param precise TRUE for precise computation; FALSE for fast one.
9719         #  @return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9720         #  Xmin,Xmax: Limits of shape along OX axis.
9721         #  Ymin,Ymax: Limits of shape along OY axis.
9722         #  Zmin,Zmax: Limits of shape along OZ axis.
9723         #
9724         #  @ref tui_measurement_tools_page "Example"
9725         @ManageTransactions("MeasuOp")
9726         def BoundingBox (self, theShape, precise=False):
9727             """
9728             Get parameters of bounding box of the given shape
9729
9730             Parameters:
9731                 theShape Shape to obtain bounding box of.
9732                 precise TRUE for precise computation; FALSE for fast one.
9733
9734             Returns:
9735                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
9736                  Xmin,Xmax: Limits of shape along OX axis.
9737                  Ymin,Ymax: Limits of shape along OY axis.
9738                  Zmin,Zmax: Limits of shape along OZ axis.
9739             """
9740             # Example: see GEOM_TestMeasures.py
9741             aTuple = self.MeasuOp.GetBoundingBox(theShape, precise)
9742             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
9743             return aTuple
9744
9745         ## Get bounding box of the given shape
9746         #  @param theShape Shape to obtain bounding box of.
9747         #  @param precise TRUE for precise computation; FALSE for fast one.
9748         #  @param theName Object name; when specified, this parameter is used
9749         #         for result publication in the study. Otherwise, if automatic
9750         #         publication is switched on, default value is used for result name.
9751         #
9752         #  @return New GEOM.GEOM_Object, containing the created box.
9753         #
9754         #  @ref tui_measurement_tools_page "Example"
9755         @ManageTransactions("MeasuOp")
9756         def MakeBoundingBox (self, theShape, precise=False, theName=None):
9757             """
9758             Get bounding box of the given shape
9759
9760             Parameters:
9761                 theShape Shape to obtain bounding box of.
9762                 precise TRUE for precise computation; FALSE for fast one.
9763                 theName Object name; when specified, this parameter is used
9764                         for result publication in the study. Otherwise, if automatic
9765                         publication is switched on, default value is used for result name.
9766
9767             Returns:
9768                 New GEOM.GEOM_Object, containing the created box.
9769             """
9770             # Example: see GEOM_TestMeasures.py
9771             anObj = self.MeasuOp.MakeBoundingBox(theShape, precise)
9772             RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
9773             self._autoPublish(anObj, theName, "bndbox")
9774             return anObj
9775
9776         ## Get inertia matrix and moments of inertia of theShape.
9777         #  @param theShape Shape to calculate inertia of.
9778         #  @return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9779         #  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9780         #  Ix,Iy,Iz:    Moments of inertia of the given shape.
9781         #
9782         #  @ref tui_measurement_tools_page "Example"
9783         @ManageTransactions("MeasuOp")
9784         def Inertia(self,theShape):
9785             """
9786             Get inertia matrix and moments of inertia of theShape.
9787
9788             Parameters:
9789                 theShape Shape to calculate inertia of.
9790
9791             Returns:
9792                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
9793                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
9794                  Ix,Iy,Iz:    Moments of inertia of the given shape.
9795             """
9796             # Example: see GEOM_TestMeasures.py
9797             aTuple = self.MeasuOp.GetInertia(theShape)
9798             RaiseIfFailed("GetInertia", self.MeasuOp)
9799             return aTuple
9800
9801         ## Get if coords are included in the shape (ST_IN or ST_ON)
9802         #  @param theShape Shape
9803         #  @param coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9804         #  @param tolerance to be used (default is 1.0e-7)
9805         #  @return list_of_boolean = [res1, res2, ...]
9806         @ManageTransactions("MeasuOp")
9807         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
9808             """
9809             Get if coords are included in the shape (ST_IN or ST_ON)
9810
9811             Parameters:
9812                 theShape Shape
9813                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
9814                 tolerance to be used (default is 1.0e-7)
9815
9816             Returns:
9817                 list_of_boolean = [res1, res2, ...]
9818             """
9819             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)
9820
9821         ## Get minimal distance between the given shapes.
9822         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9823         #  @return Value of the minimal distance between the given shapes.
9824         #
9825         #  @ref tui_measurement_tools_page "Example"
9826         @ManageTransactions("MeasuOp")
9827         def MinDistance(self, theShape1, theShape2):
9828             """
9829             Get minimal distance between the given shapes.
9830
9831             Parameters:
9832                 theShape1,theShape2 Shapes to find minimal distance between.
9833
9834             Returns:
9835                 Value of the minimal distance between the given shapes.
9836             """
9837             # Example: see GEOM_TestMeasures.py
9838             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9839             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9840             return aTuple[0]
9841
9842         ## Get minimal distance between the given shapes.
9843         #  @param theShape1,theShape2 Shapes to find minimal distance between.
9844         #  @return Value of the minimal distance between the given shapes, in form of list
9845         #          [Distance, DX, DY, DZ].
9846         #
9847         #  @ref swig_all_measure "Example"
9848         @ManageTransactions("MeasuOp")
9849         def MinDistanceComponents(self, theShape1, theShape2):
9850             """
9851             Get minimal distance between the given shapes.
9852
9853             Parameters:
9854                 theShape1,theShape2 Shapes to find minimal distance between.
9855
9856             Returns:
9857                 Value of the minimal distance between the given shapes, in form of list
9858                 [Distance, DX, DY, DZ]
9859             """
9860             # Example: see GEOM_TestMeasures.py
9861             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
9862             RaiseIfFailed("GetMinDistance", self.MeasuOp)
9863             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
9864             return aRes
9865
9866         ## Get closest points of the given shapes.
9867         #  @param theShape1,theShape2 Shapes to find closest points of.
9868         #  @return The number of found solutions (-1 in case of infinite number of
9869         #          solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9870         #
9871         #  @ref tui_measurement_tools_page "Example"
9872         @ManageTransactions("MeasuOp")
9873         def ClosestPoints (self, theShape1, theShape2):
9874             """
9875             Get closest points of the given shapes.
9876
9877             Parameters:
9878                 theShape1,theShape2 Shapes to find closest points of.
9879
9880             Returns:
9881                 The number of found solutions (-1 in case of infinite number of
9882                 solutions) and a list of (X, Y, Z) coordinates for all couples of points.
9883             """
9884             # Example: see GEOM_TestMeasures.py
9885             aTuple = self.MeasuOp.ClosestPoints(theShape1, theShape2)
9886             RaiseIfFailed("ClosestPoints", self.MeasuOp)
9887             return aTuple
9888
9889         ## Get angle between the given shapes in degrees.
9890         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9891         #  @note If both arguments are vectors, the angle is computed in accordance
9892         #        with their orientations, otherwise the minimum angle is computed.
9893         #  @return Value of the angle between the given shapes in degrees.
9894         #
9895         #  @ref tui_measurement_tools_page "Example"
9896         @ManageTransactions("MeasuOp")
9897         def GetAngle(self, theShape1, theShape2):
9898             """
9899             Get angle between the given shapes in degrees.
9900
9901             Parameters:
9902                 theShape1,theShape2 Lines or linear edges to find angle between.
9903
9904             Note:
9905                 If both arguments are vectors, the angle is computed in accordance
9906                 with their orientations, otherwise the minimum angle is computed.
9907
9908             Returns:
9909                 Value of the angle between the given shapes in degrees.
9910             """
9911             # Example: see GEOM_TestMeasures.py
9912             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
9913             RaiseIfFailed("GetAngle", self.MeasuOp)
9914             return anAngle
9915
9916         ## Get angle between the given shapes in radians.
9917         #  @param theShape1,theShape2 Lines or linear edges to find angle between.
9918         #  @note If both arguments are vectors, the angle is computed in accordance
9919         #        with their orientations, otherwise the minimum angle is computed.
9920         #  @return Value of the angle between the given shapes in radians.
9921         #
9922         #  @ref tui_measurement_tools_page "Example"
9923         @ManageTransactions("MeasuOp")
9924         def GetAngleRadians(self, theShape1, theShape2):
9925             """
9926             Get angle between the given shapes in radians.
9927
9928             Parameters:
9929                 theShape1,theShape2 Lines or linear edges to find angle between.
9930
9931
9932             Note:
9933                 If both arguments are vectors, the angle is computed in accordance
9934                 with their orientations, otherwise the minimum angle is computed.
9935
9936             Returns:
9937                 Value of the angle between the given shapes in radians.
9938             """
9939             # Example: see GEOM_TestMeasures.py
9940             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
9941             RaiseIfFailed("GetAngle", self.MeasuOp)
9942             return anAngle
9943
9944         ## Get angle between the given vectors in degrees.
9945         #  @param theShape1,theShape2 Vectors to find angle between.
9946         #  @param theFlag If True, the normal vector is defined by the two vectors cross,
9947         #                 if False, the opposite vector to the normal vector is used.
9948         #  @return Value of the angle between the given vectors in degrees.
9949         #
9950         #  @ref tui_measurement_tools_page "Example"
9951         @ManageTransactions("MeasuOp")
9952         def GetAngleVectors(self, theShape1, theShape2, theFlag = True):
9953             """
9954             Get angle between the given vectors in degrees.
9955
9956             Parameters:
9957                 theShape1,theShape2 Vectors to find angle between.
9958                 theFlag If True, the normal vector is defined by the two vectors cross,
9959                         if False, the opposite vector to the normal vector is used.
9960
9961             Returns:
9962                 Value of the angle between the given vectors in degrees.
9963             """
9964             anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
9965             if not theFlag:
9966                 anAngle = 360. - anAngle
9967             RaiseIfFailed("GetAngleVectors", self.MeasuOp)
9968             return anAngle
9969
9970         ## The same as GetAngleVectors, but the result is in radians.
9971         def GetAngleRadiansVectors(self, theShape1, theShape2, theFlag = True):
9972             """
9973             Get angle between the given vectors in radians.
9974
9975             Parameters:
9976                 theShape1,theShape2 Vectors to find angle between.
9977                 theFlag If True, the normal vector is defined by the two vectors cross,
9978                         if False, the opposite vector to the normal vector is used.
9979
9980             Returns:
9981                 Value of the angle between the given vectors in radians.
9982             """
9983             anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
9984             return anAngle
9985
9986         ## @name Curve Curvature Measurement
9987         #  Methods for receiving radius of curvature of curves
9988         #  in the given point
9989         ## @{
9990
9991         ## Measure curvature of a curve at a point, set by parameter.
9992         #  @param theCurve a curve.
9993         #  @param theParam parameter.
9994         #  @return radius of curvature of \a theCurve.
9995         #
9996         #  @ref swig_todo "Example"
9997         @ManageTransactions("MeasuOp")
9998         def CurveCurvatureByParam(self, theCurve, theParam):
9999             """
10000             Measure curvature of a curve at a point, set by parameter.
10001
10002             Parameters:
10003                 theCurve a curve.
10004                 theParam parameter.
10005
10006             Returns:
10007                 radius of curvature of theCurve.
10008             """
10009             # Example: see GEOM_TestMeasures.py
10010             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
10011             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
10012             return aCurv
10013
10014         ## Measure curvature of a curve at a point.
10015         #  @param theCurve a curve.
10016         #  @param thePoint given point.
10017         #  @return radius of curvature of \a theCurve.
10018         #
10019         #  @ref swig_todo "Example"
10020         @ManageTransactions("MeasuOp")
10021         def CurveCurvatureByPoint(self, theCurve, thePoint):
10022             """
10023             Measure curvature of a curve at a point.
10024
10025             Parameters:
10026                 theCurve a curve.
10027                 thePoint given point.
10028
10029             Returns:
10030                 radius of curvature of theCurve.
10031             """
10032             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
10033             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
10034             return aCurv
10035         ## @}
10036
10037         ## @name Surface Curvature Measurement
10038         #  Methods for receiving max and min radius of curvature of surfaces
10039         #  in the given point
10040         ## @{
10041
10042         ## Measure max radius of curvature of surface.
10043         #  @param theSurf the given surface.
10044         #  @param theUParam Value of U-parameter on the referenced surface.
10045         #  @param theVParam Value of V-parameter on the referenced surface.
10046         #  @return max radius of curvature of theSurf.
10047         #
10048         ## @ref swig_todo "Example"
10049         @ManageTransactions("MeasuOp")
10050         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10051             """
10052             Measure max radius of curvature of surface.
10053
10054             Parameters:
10055                 theSurf the given surface.
10056                 theUParam Value of U-parameter on the referenced surface.
10057                 theVParam Value of V-parameter on the referenced surface.
10058
10059             Returns:
10060                 max radius of curvature of theSurf.
10061             """
10062             # Example: see GEOM_TestMeasures.py
10063             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10064             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
10065             return aSurf
10066
10067         ## Measure max radius of curvature of surface in the given point
10068         #  @param theSurf the given surface.
10069         #  @param thePoint given point.
10070         #  @return max radius of curvature of theSurf.
10071         #
10072         ## @ref swig_todo "Example"
10073         @ManageTransactions("MeasuOp")
10074         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
10075             """
10076             Measure max radius of curvature of surface in the given point.
10077
10078             Parameters:
10079                 theSurf the given surface.
10080                 thePoint given point.
10081
10082             Returns:
10083                 max radius of curvature of theSurf.
10084             """
10085             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
10086             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
10087             return aSurf
10088
10089         ## Measure min radius of curvature of surface.
10090         #  @param theSurf the given surface.
10091         #  @param theUParam Value of U-parameter on the referenced surface.
10092         #  @param theVParam Value of V-parameter on the referenced surface.
10093         #  @return min radius of curvature of theSurf.
10094         #
10095         ## @ref swig_todo "Example"
10096         @ManageTransactions("MeasuOp")
10097         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
10098             """
10099             Measure min radius of curvature of surface.
10100
10101             Parameters:
10102                 theSurf the given surface.
10103                 theUParam Value of U-parameter on the referenced surface.
10104                 theVParam Value of V-parameter on the referenced surface.
10105
10106             Returns:
10107                 Min radius of curvature of theSurf.
10108             """
10109             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
10110             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
10111             return aSurf
10112
10113         ## Measure min radius of curvature of surface in the given point
10114         #  @param theSurf the given surface.
10115         #  @param thePoint given point.
10116         #  @return min radius of curvature of theSurf.
10117         #
10118         ## @ref swig_todo "Example"
10119         @ManageTransactions("MeasuOp")
10120         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
10121             """
10122             Measure min radius of curvature of surface in the given point.
10123
10124             Parameters:
10125                 theSurf the given surface.
10126                 thePoint given point.
10127
10128             Returns:
10129                 Min radius of curvature of theSurf.
10130             """
10131             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
10132             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
10133             return aSurf
10134         ## @}
10135
10136         ## Get min and max tolerances of sub-shapes of theShape
10137         #  @param theShape Shape, to get tolerances of.
10138         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
10139         #  FaceMin,FaceMax: Min and max tolerances of the faces.\n
10140         #  EdgeMin,EdgeMax: Min and max tolerances of the edges.\n
10141         #  VertMin,VertMax: Min and max tolerances of the vertices.
10142         #
10143         #  @ref tui_measurement_tools_page "Example"
10144         @ManageTransactions("MeasuOp")
10145         def Tolerance(self,theShape):
10146             """
10147             Get min and max tolerances of sub-shapes of theShape
10148
10149             Parameters:
10150                 theShape Shape, to get tolerances of.
10151
10152             Returns:
10153                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
10154                  FaceMin,FaceMax: Min and max tolerances of the faces.
10155                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
10156                  VertMin,VertMax: Min and max tolerances of the vertices.
10157             """
10158             # Example: see GEOM_TestMeasures.py
10159             aTuple = self.MeasuOp.GetTolerance(theShape)
10160             RaiseIfFailed("GetTolerance", self.MeasuOp)
10161             return aTuple
10162
10163         ## Obtain description of the given shape (number of sub-shapes of each type)
10164         #  @param theShape Shape to be described.
10165         #  @return Description of the given shape.
10166         #
10167         #  @ref tui_measurement_tools_page "Example"
10168         @ManageTransactions("MeasuOp")
10169         def WhatIs(self,theShape):
10170             """
10171             Obtain description of the given shape (number of sub-shapes of each type)
10172
10173             Parameters:
10174                 theShape Shape to be described.
10175
10176             Returns:
10177                 Description of the given shape.
10178             """
10179             # Example: see GEOM_TestMeasures.py
10180             aDescr = self.MeasuOp.WhatIs(theShape)
10181             RaiseIfFailed("WhatIs", self.MeasuOp)
10182             return aDescr
10183
10184         ## Obtain quantity of shapes of the given type in \a theShape.
10185         #  If \a theShape is of type \a theType, it is also counted.
10186         #  @param theShape Shape to be described.
10187         #  @param theType the given ShapeType().
10188         #  @return Quantity of shapes of type \a theType in \a theShape.
10189         #
10190         #  @ref tui_measurement_tools_page "Example"
10191         def NbShapes (self, theShape, theType):
10192             """
10193             Obtain quantity of shapes of the given type in theShape.
10194             If theShape is of type theType, it is also counted.
10195
10196             Parameters:
10197                 theShape Shape to be described.
10198                 theType the given geompy.ShapeType
10199
10200             Returns:
10201                 Quantity of shapes of type theType in theShape.
10202             """
10203             # Example: see GEOM_TestMeasures.py
10204             listSh = self.SubShapeAllIDs(theShape, theType)
10205             Nb = len(listSh)
10206             return Nb
10207
10208         ## Obtain quantity of shapes of each type in \a theShape.
10209         #  The \a theShape is also counted.
10210         #  @param theShape Shape to be described.
10211         #  @return Dictionary of ShapeType() with bound quantities of shapes.
10212         #
10213         #  @ref tui_measurement_tools_page "Example"
10214         def ShapeInfo (self, theShape):
10215             """
10216             Obtain quantity of shapes of each type in theShape.
10217             The theShape is also counted.
10218
10219             Parameters:
10220                 theShape Shape to be described.
10221
10222             Returns:
10223                 Dictionary of geompy.ShapeType with bound quantities of shapes.
10224             """
10225             # Example: see GEOM_TestMeasures.py
10226             aDict = {}
10227             for typeSh in self.ShapeType:
10228                 if typeSh in ( "AUTO", "SHAPE" ): continue
10229                 listSh = self.SubShapeAllIDs(theShape, self.ShapeType[typeSh])
10230                 Nb = len(listSh)
10231                 aDict[typeSh] = Nb
10232                 pass
10233             return aDict
10234
10235         def GetCreationInformation(self, theShape):
10236             info = theShape.GetCreationInformation()
10237             # operationName
10238             opName = info.operationName
10239             if not opName: opName = "no info available"
10240             res = "Operation: " + opName
10241             # parameters
10242             for parVal in info.params:
10243                 res += " \n %s = %s" % ( parVal.name, parVal.value )
10244             return res
10245
10246         ## Get a point, situated at the centre of mass of theShape.
10247         #  @param theShape Shape to define centre of mass of.
10248         #  @param theName Object name; when specified, this parameter is used
10249         #         for result publication in the study. Otherwise, if automatic
10250         #         publication is switched on, default value is used for result name.
10251         #
10252         #  @return New GEOM.GEOM_Object, containing the created point.
10253         #
10254         #  @ref tui_measurement_tools_page "Example"
10255         @ManageTransactions("MeasuOp")
10256         def MakeCDG(self, theShape, theName=None):
10257             """
10258             Get a point, situated at the centre of mass of theShape.
10259
10260             Parameters:
10261                 theShape Shape to define centre of mass of.
10262                 theName Object name; when specified, this parameter is used
10263                         for result publication in the study. Otherwise, if automatic
10264                         publication is switched on, default value is used for result name.
10265
10266             Returns:
10267                 New GEOM.GEOM_Object, containing the created point.
10268             """
10269             # Example: see GEOM_TestMeasures.py
10270             anObj = self.MeasuOp.GetCentreOfMass(theShape)
10271             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
10272             self._autoPublish(anObj, theName, "centerOfMass")
10273             return anObj
10274
10275         ## Get a vertex sub-shape by index depended with orientation.
10276         #  @param theShape Shape to find sub-shape.
10277         #  @param theIndex Index to find vertex by this index (starting from zero)
10278         #  @param theName Object name; when specified, this parameter is used
10279         #         for result publication in the study. Otherwise, if automatic
10280         #         publication is switched on, default value is used for result name.
10281         #
10282         #  @return New GEOM.GEOM_Object, containing the created vertex.
10283         #
10284         #  @ref tui_measurement_tools_page "Example"
10285         @ManageTransactions("MeasuOp")
10286         def GetVertexByIndex(self, theShape, theIndex, theName=None):
10287             """
10288             Get a vertex sub-shape by index depended with orientation.
10289
10290             Parameters:
10291                 theShape Shape to find sub-shape.
10292                 theIndex Index to find vertex by this index (starting from zero)
10293                 theName Object name; when specified, this parameter is used
10294                         for result publication in the study. Otherwise, if automatic
10295                         publication is switched on, default value is used for result name.
10296
10297             Returns:
10298                 New GEOM.GEOM_Object, containing the created vertex.
10299             """
10300             # Example: see GEOM_TestMeasures.py
10301             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
10302             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
10303             self._autoPublish(anObj, theName, "vertex")
10304             return anObj
10305
10306         ## Get the first vertex of wire/edge depended orientation.
10307         #  @param theShape Shape to find first vertex.
10308         #  @param theName Object name; when specified, this parameter is used
10309         #         for result publication in the study. Otherwise, if automatic
10310         #         publication is switched on, default value is used for result name.
10311         #
10312         #  @return New GEOM.GEOM_Object, containing the created vertex.
10313         #
10314         #  @ref tui_measurement_tools_page "Example"
10315         def GetFirstVertex(self, theShape, theName=None):
10316             """
10317             Get the first vertex of wire/edge depended orientation.
10318
10319             Parameters:
10320                 theShape Shape to find first vertex.
10321                 theName Object name; when specified, this parameter is used
10322                         for result publication in the study. Otherwise, if automatic
10323                         publication is switched on, default value is used for result name.
10324
10325             Returns:
10326                 New GEOM.GEOM_Object, containing the created vertex.
10327             """
10328             # Example: see GEOM_TestMeasures.py
10329             # note: auto-publishing is done in self.GetVertexByIndex()
10330             return self.GetVertexByIndex(theShape, 0, theName)
10331
10332         ## Get the last vertex of wire/edge depended orientation.
10333         #  @param theShape Shape to find last vertex.
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 created vertex.
10339         #
10340         #  @ref tui_measurement_tools_page "Example"
10341         def GetLastVertex(self, theShape, theName=None):
10342             """
10343             Get the last vertex of wire/edge depended orientation.
10344
10345             Parameters:
10346                 theShape Shape to find last vertex.
10347                 theName Object name; when specified, this parameter is used
10348                         for result publication in the study. Otherwise, if automatic
10349                         publication is switched on, default value is used for result name.
10350
10351             Returns:
10352                 New GEOM.GEOM_Object, containing the created vertex.
10353             """
10354             # Example: see GEOM_TestMeasures.py
10355             nb_vert =  self.NumberOfSubShapes(theShape, self.ShapeType["VERTEX"])
10356             # note: auto-publishing is done in self.GetVertexByIndex()
10357             return self.GetVertexByIndex(theShape, (nb_vert-1), theName)
10358
10359         ## Get a normale to the given face. If the point is not given,
10360         #  the normale is calculated at the center of mass.
10361         #  @param theFace Face to define normale of.
10362         #  @param theOptionalPoint Point to compute the normale at.
10363         #  @param theName Object name; when specified, this parameter is used
10364         #         for result publication in the study. Otherwise, if automatic
10365         #         publication is switched on, default value is used for result name.
10366         #
10367         #  @return New GEOM.GEOM_Object, containing the created vector.
10368         #
10369         #  @ref swig_todo "Example"
10370         @ManageTransactions("MeasuOp")
10371         def GetNormal(self, theFace, theOptionalPoint = None, theName=None):
10372             """
10373             Get a normale to the given face. If the point is not given,
10374             the normale is calculated at the center of mass.
10375
10376             Parameters:
10377                 theFace Face to define normale of.
10378                 theOptionalPoint Point to compute the normale at.
10379                 theName Object name; when specified, this parameter is used
10380                         for result publication in the study. Otherwise, if automatic
10381                         publication is switched on, default value is used for result name.
10382
10383             Returns:
10384                 New GEOM.GEOM_Object, containing the created vector.
10385             """
10386             # Example: see GEOM_TestMeasures.py
10387             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
10388             RaiseIfFailed("GetNormal", self.MeasuOp)
10389             self._autoPublish(anObj, theName, "normal")
10390             return anObj
10391
10392         ## Print shape errors obtained from CheckShape.
10393         #  @param theShape Shape that was checked.
10394         #  @param theShapeErrors the shape errors obtained by CheckShape.
10395         #  @param theReturnStatus If 0 the description of problem is printed.
10396         #                         If 1 the description of problem is returned.
10397         #  @return If theReturnStatus is equal to 1 the description is returned.
10398         #          Otherwise doesn't return anything.
10399         #
10400         #  @ref tui_measurement_tools_page "Example"
10401         @ManageTransactions("MeasuOp")
10402         def PrintShapeErrors(self, theShape, theShapeErrors, theReturnStatus = 0):
10403             """
10404             Print shape errors obtained from CheckShape.
10405
10406             Parameters:
10407                 theShape Shape that was checked.
10408                 theShapeErrors the shape errors obtained by CheckShape.
10409                 theReturnStatus If 0 the description of problem is printed.
10410                                 If 1 the description of problem is returned.
10411
10412             Returns:
10413                 If theReturnStatus is equal to 1 the description is returned.
10414                   Otherwise doesn't return anything.
10415             """
10416             # Example: see GEOM_TestMeasures.py
10417             Descr = self.MeasuOp.PrintShapeErrors(theShape, theShapeErrors)
10418             if theReturnStatus == 1:
10419                 return Descr
10420             print Descr
10421             pass
10422
10423         ## Check a topology of the given shape.
10424         #  @param theShape Shape to check validity of.
10425         #  @param theIsCheckGeom If FALSE, only the shape's topology will be checked, \n
10426         #                        if TRUE, the shape's geometry will be checked also.
10427         #  @param theReturnStatus If 0 and if theShape is invalid, a description
10428         #                         of problem is printed.
10429         #                         If 1 isValid flag and the description of
10430         #                         problem is returned.
10431         #                         If 2 isValid flag and the list of error data
10432         #                         is returned.
10433         #  @return TRUE, if the shape "seems to be valid".
10434         #          If theShape is invalid, prints a description of problem.
10435         #          If theReturnStatus is equal to 1 the description is returned
10436         #          along with IsValid flag.
10437         #          If theReturnStatus is equal to 2 the list of error data is
10438         #          returned along with IsValid flag.
10439         #
10440         #  @ref tui_measurement_tools_page "Example"
10441         @ManageTransactions("MeasuOp")
10442         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
10443             """
10444             Check a topology of the given shape.
10445
10446             Parameters:
10447                 theShape Shape to check validity of.
10448                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
10449                                if TRUE, the shape's geometry will be checked also.
10450                 theReturnStatus If 0 and if theShape is invalid, a description
10451                                 of problem is printed.
10452                                 If 1 IsValid flag and the description of
10453                                 problem is returned.
10454                                 If 2 IsValid flag and the list of error data
10455                                 is returned.
10456
10457             Returns:
10458                 TRUE, if the shape "seems to be valid".
10459                 If theShape is invalid, prints a description of problem.
10460                 If theReturnStatus is equal to 1 the description is returned
10461                 along with IsValid flag.
10462                 If theReturnStatus is equal to 2 the list of error data is
10463                 returned along with IsValid flag.
10464             """
10465             # Example: see GEOM_TestMeasures.py
10466             if theIsCheckGeom:
10467                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShapeWithGeometry(theShape)
10468                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
10469             else:
10470                 (IsValid, ShapeErrors) = self.MeasuOp.CheckShape(theShape)
10471                 RaiseIfFailed("CheckShape", self.MeasuOp)
10472             if IsValid == 0:
10473                 if theReturnStatus == 0:
10474                     Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10475                     print Descr
10476             if theReturnStatus == 1:
10477               Descr = self.MeasuOp.PrintShapeErrors(theShape, ShapeErrors)
10478               return (IsValid, Descr)
10479             elif theReturnStatus == 2:
10480               return (IsValid, ShapeErrors)
10481             return IsValid
10482
10483         ## Detect self-intersections in the given shape.
10484         #  @param theShape Shape to check.
10485         #  @return TRUE, if the shape contains no self-intersections.
10486         #
10487         #  @ref tui_measurement_tools_page "Example"
10488         @ManageTransactions("MeasuOp")
10489         def CheckSelfIntersections(self, theShape):
10490             """
10491             Detect self-intersections in the given shape.
10492
10493             Parameters:
10494                 theShape Shape to check.
10495
10496             Returns:
10497                 TRUE, if the shape contains no self-intersections.
10498             """
10499             # Example: see GEOM_TestMeasures.py
10500             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
10501             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
10502             return IsValid
10503
10504         ## Get position (LCS) of theShape.
10505         #
10506         #  Origin of the LCS is situated at the shape's center of mass.
10507         #  Axes of the LCS are obtained from shape's location or,
10508         #  if the shape is a planar face, from position of its plane.
10509         #
10510         #  @param theShape Shape to calculate position of.
10511         #  @return [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10512         #          Ox,Oy,Oz: Coordinates of shape's LCS origin.
10513         #          Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10514         #          Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10515         #
10516         #  @ref swig_todo "Example"
10517         @ManageTransactions("MeasuOp")
10518         def GetPosition(self,theShape):
10519             """
10520             Get position (LCS) of theShape.
10521             Origin of the LCS is situated at the shape's center of mass.
10522             Axes of the LCS are obtained from shape's location or,
10523             if the shape is a planar face, from position of its plane.
10524
10525             Parameters:
10526                 theShape Shape to calculate position of.
10527
10528             Returns:
10529                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
10530                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
10531                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
10532                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
10533             """
10534             # Example: see GEOM_TestMeasures.py
10535             aTuple = self.MeasuOp.GetPosition(theShape)
10536             RaiseIfFailed("GetPosition", self.MeasuOp)
10537             return aTuple
10538
10539         ## Get kind of theShape.
10540         #
10541         #  @param theShape Shape to get a kind of.
10542         #  @return Returns a kind of shape in terms of <VAR>GEOM.GEOM_IKindOfShape.shape_kind</VAR> enumeration
10543         #          and a list of parameters, describing the shape.
10544         #  @note  Concrete meaning of each value, returned via \a theIntegers
10545         #         or \a theDoubles list depends on the kind() of the shape.
10546         #
10547         #  @ref swig_todo "Example"
10548         @ManageTransactions("MeasuOp")
10549         def KindOfShape(self,theShape):
10550             """
10551             Get kind of theShape.
10552
10553             Parameters:
10554                 theShape Shape to get a kind of.
10555
10556             Returns:
10557                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
10558                     and a list of parameters, describing the shape.
10559             Note:
10560                 Concrete meaning of each value, returned via theIntegers
10561                 or theDoubles list depends on the geompy.kind of the shape
10562             """
10563             # Example: see GEOM_TestMeasures.py
10564             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
10565             RaiseIfFailed("KindOfShape", self.MeasuOp)
10566
10567             aKind  = aRoughTuple[0]
10568             anInts = aRoughTuple[1]
10569             aDbls  = aRoughTuple[2]
10570
10571             # Now there is no exception from this rule:
10572             aKindTuple = [aKind] + aDbls + anInts
10573
10574             # If they are we will regroup parameters for such kind of shape.
10575             # For example:
10576             #if aKind == kind.SOME_KIND:
10577             #    #  SOME_KIND     int int double int double double
10578             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
10579
10580             return aKindTuple
10581
10582         ## Returns the string that describes if the shell is good for solid.
10583         #  This is a support method for MakeSolid.
10584         #
10585         #  @param theShell the shell to be checked.
10586         #  @return Returns a string that describes the shell validity for
10587         #          solid construction.
10588         @ManageTransactions("MeasuOp")
10589         def _IsGoodForSolid(self, theShell):
10590             """
10591             Returns the string that describes if the shell is good for solid.
10592             This is a support method for MakeSolid.
10593
10594             Parameter:
10595                 theShell the shell to be checked.
10596
10597             Returns:
10598                 Returns a string that describes the shell validity for
10599                 solid construction.
10600             """
10601             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
10602             return aDescr
10603
10604         # end of l2_measure
10605         ## @}
10606
10607         ## @addtogroup l2_import_export
10608         ## @{
10609
10610         ## Import a shape from the BREP or IGES or STEP file
10611         #  (depends on given format) with given name.
10612         #  @param theFileName The file, containing the shape.
10613         #  @param theFormatName Specify format for the file reading.
10614         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
10615         #         If format 'IGES_SCALE' is used instead of 'IGES' or
10616         #            format 'STEP_SCALE' is used instead of 'STEP',
10617         #            length unit will be set to 'meter' and result model will be scaled.
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.GEOM_Object, containing the imported shape.
10623         #          If material names are imported it returns the list of
10624         #          objects. The first one is the imported object followed by
10625         #          material groups.
10626         #  @note Auto publishing is allowed for the shape itself. Imported
10627         #        material groups are not automatically published.
10628         #
10629         #  @ref swig_Import_Export "Example"
10630         @ManageTransactions("InsertOp")
10631         def ImportFile(self, theFileName, theFormatName, theName=None):
10632             """
10633             Import a shape from the BREP or IGES or STEP file
10634             (depends on given format) with given name.
10635
10636             Parameters:
10637                 theFileName The file, containing the shape.
10638                 theFormatName Specify format for the file reading.
10639                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
10640                     If format 'IGES_SCALE' is used instead of 'IGES' or
10641                        format 'STEP_SCALE' is used instead of 'STEP',
10642                        length unit will be set to 'meter' and result model will be scaled.
10643                 theName Object name; when specified, this parameter is used
10644                         for result publication in the study. Otherwise, if automatic
10645                         publication is switched on, default value is used for result name.
10646
10647             Returns:
10648                 New GEOM.GEOM_Object, containing the imported shape.
10649                 If material names are imported it returns the list of
10650                 objects. The first one is the imported object followed by
10651                 material groups.
10652             Note:
10653                 Auto publishing is allowed for the shape itself. Imported
10654                 material groups are not automatically published.
10655             """
10656             # Example: see GEOM_TestOthers.py
10657             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
10658             RaiseIfFailed("ImportFile", self.InsertOp)
10659             aNbObj = len(aListObj)
10660             if aNbObj > 0:
10661                 self._autoPublish(aListObj[0], theName, "imported")
10662             if aNbObj == 1:
10663                 return aListObj[0]
10664             return aListObj
10665
10666         ## Deprecated analog of ImportFile()
10667         def Import(self, theFileName, theFormatName, theName=None):
10668             """
10669             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
10670             """
10671             print "WARNING: Function Import is deprecated, use ImportFile instead"
10672             # note: auto-publishing is done in self.ImportFile()
10673             return self.ImportFile(theFileName, theFormatName, theName)
10674
10675         ## Shortcut to ImportFile() for BREP format.
10676         #  Import a shape from the BREP file with given name.
10677         #  @param theFileName The file, containing the shape.
10678         #  @param theName Object name; when specified, this parameter is used
10679         #         for result publication in the study. Otherwise, if automatic
10680         #         publication is switched on, default value is used for result name.
10681         #
10682         #  @return New GEOM.GEOM_Object, containing the imported shape.
10683         #
10684         #  @ref swig_Import_Export "Example"
10685         def ImportBREP(self, theFileName, theName=None):
10686             """
10687             geompy.ImportFile(...) function for BREP format
10688             Import a shape from the BREP file with given name.
10689
10690             Parameters:
10691                 theFileName The file, containing the shape.
10692                 theName Object name; when specified, this parameter is used
10693                         for result publication in the study. Otherwise, if automatic
10694                         publication is switched on, default value is used for result name.
10695
10696             Returns:
10697                 New GEOM.GEOM_Object, containing the imported shape.
10698             """
10699             # Example: see GEOM_TestOthers.py
10700             # note: auto-publishing is done in self.ImportFile()
10701             return self.ImportFile(theFileName, "BREP", theName)
10702
10703         ## Shortcut to ImportFile() for IGES format
10704         #  Import a shape from the IGES file with given name.
10705         #  @param theFileName The file, containing the shape.
10706         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10707         #                     and result model will be scaled, if its units are not meters.
10708         #                     If False (default), file length units will be taken into account.
10709         #  @param theName Object name; when specified, this parameter is used
10710         #         for result publication in the study. Otherwise, if automatic
10711         #         publication is switched on, default value is used for result name.
10712         #
10713         #  @return New GEOM.GEOM_Object, containing the imported shape.
10714         #
10715         #  @ref swig_Import_Export "Example"
10716         def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
10717             """
10718             geompy.ImportFile(...) function for IGES format
10719
10720             Parameters:
10721                 theFileName The file, containing the shape.
10722                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10723                             and result model will be scaled, if its units are not meters.
10724                             If False (default), file length units will be taken into account.
10725                 theName Object name; when specified, this parameter is used
10726                         for result publication in the study. Otherwise, if automatic
10727                         publication is switched on, default value is used for result name.
10728
10729             Returns:
10730                 New GEOM.GEOM_Object, containing the imported shape.
10731             """
10732             # Example: see GEOM_TestOthers.py
10733             # note: auto-publishing is done in self.ImportFile()
10734             if ignoreUnits:
10735                 return self.ImportFile(theFileName, "IGES_SCALE", theName)
10736             return self.ImportFile(theFileName, "IGES", theName)
10737
10738         ## Return length unit from given IGES file
10739         #  @param theFileName The file, containing the shape.
10740         #  @return String, containing the units name.
10741         #
10742         #  @ref swig_Import_Export "Example"
10743         @ManageTransactions("InsertOp")
10744         def GetIGESUnit(self, theFileName):
10745             """
10746             Return length units from given IGES file
10747
10748             Parameters:
10749                 theFileName The file, containing the shape.
10750
10751             Returns:
10752                 String, containing the units name.
10753             """
10754             # Example: see GEOM_TestOthers.py
10755             aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
10756             return aUnitName
10757
10758         ## Shortcut to ImportFile() for STEP format
10759         #  Import a shape from the STEP file with given name.
10760         #  @param theFileName The file, containing the shape.
10761         #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
10762         #                     and result model will be scaled, if its units are not meters.
10763         #                     If False (default), file length units will be taken into account.
10764         #  @param theName Object name; when specified, this parameter is used
10765         #         for result publication in the study. Otherwise, if automatic
10766         #         publication is switched on, default value is used for result name.
10767         #
10768         #  @return New GEOM.GEOM_Object, containing the imported shape.
10769         #          If material names are imported it returns the list of
10770         #          objects. The first one is the imported object followed by
10771         #          material groups.
10772         #  @note Auto publishing is allowed for the shape itself. Imported
10773         #        material groups are not automatically published.
10774         #
10775         #  @ref swig_Import_Export "Example"
10776         def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
10777             """
10778             geompy.ImportFile(...) function for STEP format
10779
10780             Parameters:
10781                 theFileName The file, containing the shape.
10782                 ignoreUnits If True, file length units will be ignored (set to 'meter')
10783                             and result model will be scaled, if its units are not meters.
10784                             If False (default), file length units will be taken into account.
10785                 theName Object name; when specified, this parameter is used
10786                         for result publication in the study. Otherwise, if automatic
10787                         publication is switched on, default value is used for result name.
10788
10789             Returns:
10790                 New GEOM.GEOM_Object, containing the imported shape.
10791                 If material names are imported it returns the list of
10792                 objects. The first one is the imported object followed by
10793                 material groups.
10794             Note:
10795                 Auto publishing is allowed for the shape itself. Imported
10796                 material groups are not automatically published.
10797             """
10798             # Example: see GEOM_TestOthers.py
10799             # note: auto-publishing is done in self.ImportFile()
10800             if ignoreUnits:
10801                 return self.ImportFile(theFileName, "STEP_SCALE", theName)
10802             return self.ImportFile(theFileName, "STEP", theName)
10803
10804         ## Return length unit from given IGES or STEP file
10805         #  @param theFileName The file, containing the shape.
10806         #  @return String, containing the units name.
10807         #
10808         #  @ref swig_Import_Export "Example"
10809         @ManageTransactions("InsertOp")
10810         def GetSTEPUnit(self, theFileName):
10811             """
10812             Return length units from given STEP file
10813
10814             Parameters:
10815                 theFileName The file, containing the shape.
10816
10817             Returns:
10818                 String, containing the units name.
10819             """
10820             # Example: see GEOM_TestOthers.py
10821             aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
10822             return aUnitName
10823
10824         ## Read a shape from the binary stream, containing its bounding representation (BRep).
10825         #  @note This method will not be dumped to the python script by DumpStudy functionality.
10826         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
10827         #  @param theStream The BRep binary stream.
10828         #  @param theName Object name; when specified, this parameter is used
10829         #         for result publication in the study. Otherwise, if automatic
10830         #         publication is switched on, default value is used for result name.
10831         #
10832         #  @return New GEOM_Object, containing the shape, read from theStream.
10833         #
10834         #  @ref swig_Import_Export "Example"
10835         @ManageTransactions("InsertOp")
10836         def RestoreShape (self, theStream, theName=None):
10837             """
10838             Read a shape from the binary stream, containing its bounding representation (BRep).
10839
10840             Note:
10841                 shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
10842
10843             Parameters:
10844                 theStream The BRep binary stream.
10845                 theName Object name; when specified, this parameter is used
10846                         for result publication in the study. Otherwise, if automatic
10847                         publication is switched on, default value is used for result name.
10848
10849             Returns:
10850                 New GEOM_Object, containing the shape, read from theStream.
10851             """
10852             # Example: see GEOM_TestOthers.py
10853             anObj = self.InsertOp.RestoreShape(theStream)
10854             RaiseIfFailed("RestoreShape", self.InsertOp)
10855             self._autoPublish(anObj, theName, "restored")
10856             return anObj
10857
10858         ## Export the given shape into a file with given name.
10859         #  @param theObject Shape to be stored in the file.
10860         #  @param theFileName Name of the file to store the given shape in.
10861         #  @param theFormatName Specify format for the shape storage.
10862         #         Available formats can be obtained with
10863         #         geompy.InsertOp.ExportTranslators()[0] method.
10864         #
10865         #  @ref swig_Import_Export "Example"
10866         @ManageTransactions("InsertOp")
10867         def Export(self, theObject, theFileName, theFormatName):
10868             """
10869             Export the given shape into a file with given name.
10870
10871             Parameters:
10872                 theObject Shape to be stored in the file.
10873                 theFileName Name of the file to store the given shape in.
10874                 theFormatName Specify format for the shape storage.
10875                               Available formats can be obtained with
10876                               geompy.InsertOp.ExportTranslators()[0] method.
10877             """
10878             # Example: see GEOM_TestOthers.py
10879             self.InsertOp.Export(theObject, theFileName, theFormatName)
10880             if self.InsertOp.IsDone() == 0:
10881                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
10882                 pass
10883             pass
10884
10885         ## Shortcut to Export() for BREP format
10886         #
10887         #  @ref swig_Import_Export "Example"
10888         def ExportBREP(self,theObject, theFileName):
10889             """
10890             geompy.Export(...) function for BREP format
10891             """
10892             # Example: see GEOM_TestOthers.py
10893             return self.Export(theObject, theFileName, "BREP")
10894
10895         ## Shortcut to Export() for IGES format
10896         #
10897         #  @ref swig_Import_Export "Example"
10898         def ExportIGES(self,theObject, theFileName):
10899             """
10900             geompy.Export(...) function for IGES format
10901             """
10902             # Example: see GEOM_TestOthers.py
10903             return self.Export(theObject, theFileName, "IGES")
10904
10905         ## Shortcut to Export() for STEP format
10906         #
10907         #  @ref swig_Import_Export "Example"
10908         def ExportSTEP(self,theObject, theFileName):
10909             """
10910             geompy.Export(...) function for STEP format
10911             """
10912             # Example: see GEOM_TestOthers.py
10913             return self.Export(theObject, theFileName, "STEP")
10914
10915         # end of l2_import_export
10916         ## @}
10917
10918         ## @addtogroup l3_blocks
10919         ## @{
10920
10921         ## Create a quadrangle face from four edges. Order of Edges is not
10922         #  important. It is  not necessary that edges share the same vertex.
10923         #  @param E1,E2,E3,E4 Edges for the face bound.
10924         #  @param theName Object name; when specified, this parameter is used
10925         #         for result publication in the study. Otherwise, if automatic
10926         #         publication is switched on, default value is used for result name.
10927         #
10928         #  @return New GEOM.GEOM_Object, containing the created face.
10929         #
10930         #  @ref tui_building_by_blocks_page "Example"
10931         @ManageTransactions("BlocksOp")
10932         def MakeQuad(self, E1, E2, E3, E4, theName=None):
10933             """
10934             Create a quadrangle face from four edges. Order of Edges is not
10935             important. It is  not necessary that edges share the same vertex.
10936
10937             Parameters:
10938                 E1,E2,E3,E4 Edges for the face bound.
10939                 theName Object name; when specified, this parameter is used
10940                         for result publication in the study. Otherwise, if automatic
10941                         publication is switched on, default value is used for result name.
10942
10943             Returns:
10944                 New GEOM.GEOM_Object, containing the created face.
10945
10946             Example of usage:
10947                 qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
10948             """
10949             # Example: see GEOM_Spanner.py
10950             anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
10951             RaiseIfFailed("MakeQuad", self.BlocksOp)
10952             self._autoPublish(anObj, theName, "quad")
10953             return anObj
10954
10955         ## Create a quadrangle face on two edges.
10956         #  The missing edges will be built by creating the shortest ones.
10957         #  @param E1,E2 Two opposite edges for the face.
10958         #  @param theName Object name; when specified, this parameter is used
10959         #         for result publication in the study. Otherwise, if automatic
10960         #         publication is switched on, default value is used for result name.
10961         #
10962         #  @return New GEOM.GEOM_Object, containing the created face.
10963         #
10964         #  @ref tui_building_by_blocks_page "Example"
10965         @ManageTransactions("BlocksOp")
10966         def MakeQuad2Edges(self, E1, E2, theName=None):
10967             """
10968             Create a quadrangle face on two edges.
10969             The missing edges will be built by creating the shortest ones.
10970
10971             Parameters:
10972                 E1,E2 Two opposite edges for the face.
10973                 theName Object name; when specified, this parameter is used
10974                         for result publication in the study. Otherwise, if automatic
10975                         publication is switched on, default value is used for result name.
10976
10977             Returns:
10978                 New GEOM.GEOM_Object, containing the created face.
10979
10980             Example of usage:
10981                 # create vertices
10982                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
10983                 p2 = geompy.MakeVertex(150.,  30.,   0.)
10984                 p3 = geompy.MakeVertex(  0., 120.,  50.)
10985                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
10986                 # create edges
10987                 edge1 = geompy.MakeEdge(p1, p2)
10988                 edge2 = geompy.MakeEdge(p3, p4)
10989                 # create a quadrangle face from two edges
10990                 qface2 = geompy.MakeQuad2Edges(edge1, edge2)
10991             """
10992             # Example: see GEOM_Spanner.py
10993             anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
10994             RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
10995             self._autoPublish(anObj, theName, "quad")
10996             return anObj
10997
10998         ## Create a quadrangle face with specified corners.
10999         #  The missing edges will be built by creating the shortest ones.
11000         #  @param V1,V2,V3,V4 Corner vertices for the face.
11001         #  @param theName Object name; when specified, this parameter is used
11002         #         for result publication in the study. Otherwise, if automatic
11003         #         publication is switched on, default value is used for result name.
11004         #
11005         #  @return New GEOM.GEOM_Object, containing the created face.
11006         #
11007         #  @ref tui_building_by_blocks_page "Example 1"
11008         #  \n @ref swig_MakeQuad4Vertices "Example 2"
11009         @ManageTransactions("BlocksOp")
11010         def MakeQuad4Vertices(self, V1, V2, V3, V4, theName=None):
11011             """
11012             Create a quadrangle face with specified corners.
11013             The missing edges will be built by creating the shortest ones.
11014
11015             Parameters:
11016                 V1,V2,V3,V4 Corner vertices for the face.
11017                 theName Object name; when specified, this parameter is used
11018                         for result publication in the study. Otherwise, if automatic
11019                         publication is switched on, default value is used for result name.
11020
11021             Returns:
11022                 New GEOM.GEOM_Object, containing the created face.
11023
11024             Example of usage:
11025                 # create vertices
11026                 p1 = geompy.MakeVertex(  0.,   0.,   0.)
11027                 p2 = geompy.MakeVertex(150.,  30.,   0.)
11028                 p3 = geompy.MakeVertex(  0., 120.,  50.)
11029                 p4 = geompy.MakeVertex(  0.,  40.,  70.)
11030                 # create a quadrangle from four points in its corners
11031                 qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
11032             """
11033             # Example: see GEOM_Spanner.py
11034             anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
11035             RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
11036             self._autoPublish(anObj, theName, "quad")
11037             return anObj
11038
11039         ## Create a hexahedral solid, bounded by the six given faces. Order of
11040         #  faces is not important. It is  not necessary that Faces share the same edge.
11041         #  @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11042         #  @param theName Object name; when specified, this parameter is used
11043         #         for result publication in the study. Otherwise, if automatic
11044         #         publication is switched on, default value is used for result name.
11045         #
11046         #  @return New GEOM.GEOM_Object, containing the created solid.
11047         #
11048         #  @ref tui_building_by_blocks_page "Example 1"
11049         #  \n @ref swig_MakeHexa "Example 2"
11050         @ManageTransactions("BlocksOp")
11051         def MakeHexa(self, F1, F2, F3, F4, F5, F6, theName=None):
11052             """
11053             Create a hexahedral solid, bounded by the six given faces. Order of
11054             faces is not important. It is  not necessary that Faces share the same edge.
11055
11056             Parameters:
11057                 F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
11058                 theName Object name; when specified, this parameter is used
11059                         for result publication in the study. Otherwise, if automatic
11060                         publication is switched on, default value is used for result name.
11061
11062             Returns:
11063                 New GEOM.GEOM_Object, containing the created solid.
11064
11065             Example of usage:
11066                 solid = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
11067             """
11068             # Example: see GEOM_Spanner.py
11069             anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
11070             RaiseIfFailed("MakeHexa", self.BlocksOp)
11071             self._autoPublish(anObj, theName, "hexa")
11072             return anObj
11073
11074         ## Create a hexahedral solid between two given faces.
11075         #  The missing faces will be built by creating the smallest ones.
11076         #  @param F1,F2 Two opposite faces for the hexahedral solid.
11077         #  @param theName Object name; when specified, this parameter is used
11078         #         for result publication in the study. Otherwise, if automatic
11079         #         publication is switched on, default value is used for result name.
11080         #
11081         #  @return New GEOM.GEOM_Object, containing the created solid.
11082         #
11083         #  @ref tui_building_by_blocks_page "Example 1"
11084         #  \n @ref swig_MakeHexa2Faces "Example 2"
11085         @ManageTransactions("BlocksOp")
11086         def MakeHexa2Faces(self, F1, F2, theName=None):
11087             """
11088             Create a hexahedral solid between two given faces.
11089             The missing faces will be built by creating the smallest ones.
11090
11091             Parameters:
11092                 F1,F2 Two opposite faces for the hexahedral solid.
11093                 theName Object name; when specified, this parameter is used
11094                         for result publication in the study. Otherwise, if automatic
11095                         publication is switched on, default value is used for result name.
11096
11097             Returns:
11098                 New GEOM.GEOM_Object, containing the created solid.
11099
11100             Example of usage:
11101                 solid1 = geompy.MakeHexa2Faces(qface1, qface2)
11102             """
11103             # Example: see GEOM_Spanner.py
11104             anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
11105             RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
11106             self._autoPublish(anObj, theName, "hexa")
11107             return anObj
11108
11109         # end of l3_blocks
11110         ## @}
11111
11112         ## @addtogroup l3_blocks_op
11113         ## @{
11114
11115         ## Get a vertex, found in the given shape by its coordinates.
11116         #  @param theShape Block or a compound of blocks.
11117         #  @param theX,theY,theZ Coordinates of the sought vertex.
11118         #  @param theEpsilon Maximum allowed distance between the resulting
11119         #                    vertex and point with the given coordinates.
11120         #  @param theName Object name; when specified, this parameter is used
11121         #         for result publication in the study. Otherwise, if automatic
11122         #         publication is switched on, default value is used for result name.
11123         #
11124         #  @return New GEOM.GEOM_Object, containing the found vertex.
11125         #
11126         #  @ref swig_GetPoint "Example"
11127         @ManageTransactions("BlocksOp")
11128         def GetPoint(self, theShape, theX, theY, theZ, theEpsilon, theName=None):
11129             """
11130             Get a vertex, found in the given shape by its coordinates.
11131
11132             Parameters:
11133                 theShape Block or a compound of blocks.
11134                 theX,theY,theZ Coordinates of the sought vertex.
11135                 theEpsilon Maximum allowed distance between the resulting
11136                            vertex and point with the given coordinates.
11137                 theName Object name; when specified, this parameter is used
11138                         for result publication in the study. Otherwise, if automatic
11139                         publication is switched on, default value is used for result name.
11140
11141             Returns:
11142                 New GEOM.GEOM_Object, containing the found vertex.
11143
11144             Example of usage:
11145                 pnt = geompy.GetPoint(shape, -50,  50,  50, 0.01)
11146             """
11147             # Example: see GEOM_TestOthers.py
11148             anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
11149             RaiseIfFailed("GetPoint", self.BlocksOp)
11150             self._autoPublish(anObj, theName, "vertex")
11151             return anObj
11152
11153         ## Find a vertex of the given shape, which has minimal distance to the given point.
11154         #  @param theShape Any shape.
11155         #  @param thePoint Point, close to the desired vertex.
11156         #  @param theName Object name; when specified, this parameter is used
11157         #         for result publication in the study. Otherwise, if automatic
11158         #         publication is switched on, default value is used for result name.
11159         #
11160         #  @return New GEOM.GEOM_Object, containing the found vertex.
11161         #
11162         #  @ref swig_GetVertexNearPoint "Example"
11163         @ManageTransactions("BlocksOp")
11164         def GetVertexNearPoint(self, theShape, thePoint, theName=None):
11165             """
11166             Find a vertex of the given shape, which has minimal distance to the given point.
11167
11168             Parameters:
11169                 theShape Any shape.
11170                 thePoint Point, close to the desired vertex.
11171                 theName Object name; when specified, this parameter is used
11172                         for result publication in the study. Otherwise, if automatic
11173                         publication is switched on, default value is used for result name.
11174
11175             Returns:
11176                 New GEOM.GEOM_Object, containing the found vertex.
11177
11178             Example of usage:
11179                 pmidle = geompy.MakeVertex(50, 0, 50)
11180                 edge1 = geompy.GetEdgeNearPoint(blocksComp, pmidle)
11181             """
11182             # Example: see GEOM_TestOthers.py
11183             anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
11184             RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
11185             self._autoPublish(anObj, theName, "vertex")
11186             return anObj
11187
11188         ## Get an edge, found in the given shape by two given vertices.
11189         #  @param theShape Block or a compound of blocks.
11190         #  @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
11191         #  @param theName Object name; when specified, this parameter is used
11192         #         for result publication in the study. Otherwise, if automatic
11193         #         publication is switched on, default value is used for result name.
11194         #
11195         #  @return New GEOM.GEOM_Object, containing the found edge.
11196         #
11197         #  @ref swig_GetEdge "Example"
11198         @ManageTransactions("BlocksOp")
11199         def GetEdge(self, theShape, thePoint1, thePoint2, theName=None):
11200             """
11201             Get an edge, found in the given shape by two given vertices.
11202
11203             Parameters:
11204                 theShape Block or a compound of blocks.
11205                 thePoint1,thePoint2 Points, close to the ends of the desired edge.
11206                 theName Object name; when specified, this parameter is used
11207                         for result publication in the study. Otherwise, if automatic
11208                         publication is switched on, default value is used for result name.
11209
11210             Returns:
11211                 New GEOM.GEOM_Object, containing the found edge.
11212             """
11213             # Example: see GEOM_Spanner.py
11214             anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
11215             RaiseIfFailed("GetEdge", self.BlocksOp)
11216             self._autoPublish(anObj, theName, "edge")
11217             return anObj
11218
11219         ## Find an edge of the given shape, which has minimal distance to the given point.
11220         #  @param theShape Block or a compound of blocks.
11221         #  @param thePoint Point, close to the desired edge.
11222         #  @param theName Object name; when specified, this parameter is used
11223         #         for result publication in the study. Otherwise, if automatic
11224         #         publication is switched on, default value is used for result name.
11225         #
11226         #  @return New GEOM.GEOM_Object, containing the found edge.
11227         #
11228         #  @ref swig_GetEdgeNearPoint "Example"
11229         @ManageTransactions("BlocksOp")
11230         def GetEdgeNearPoint(self, theShape, thePoint, theName=None):
11231             """
11232             Find an edge of the given shape, which has minimal distance to the given point.
11233
11234             Parameters:
11235                 theShape Block or a compound of blocks.
11236                 thePoint Point, close to the desired edge.
11237                 theName Object name; when specified, this parameter is used
11238                         for result publication in the study. Otherwise, if automatic
11239                         publication is switched on, default value is used for result name.
11240
11241             Returns:
11242                 New GEOM.GEOM_Object, containing the found edge.
11243             """
11244             # Example: see GEOM_TestOthers.py
11245             anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
11246             RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
11247             self._autoPublish(anObj, theName, "edge")
11248             return anObj
11249
11250         ## Returns a face, found in the given shape by four given corner vertices.
11251         #  @param theShape Block or a compound of blocks.
11252         #  @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11253         #  @param theName Object name; when specified, this parameter is used
11254         #         for result publication in the study. Otherwise, if automatic
11255         #         publication is switched on, default value is used for result name.
11256         #
11257         #  @return New GEOM.GEOM_Object, containing the found face.
11258         #
11259         #  @ref swig_todo "Example"
11260         @ManageTransactions("BlocksOp")
11261         def GetFaceByPoints(self, theShape, thePoint1, thePoint2, thePoint3, thePoint4, theName=None):
11262             """
11263             Returns a face, found in the given shape by four given corner vertices.
11264
11265             Parameters:
11266                 theShape Block or a compound of blocks.
11267                 thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
11268                 theName Object name; when specified, this parameter is used
11269                         for result publication in the study. Otherwise, if automatic
11270                         publication is switched on, default value is used for result name.
11271
11272             Returns:
11273                 New GEOM.GEOM_Object, containing the found face.
11274             """
11275             # Example: see GEOM_Spanner.py
11276             anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
11277             RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
11278             self._autoPublish(anObj, theName, "face")
11279             return anObj
11280
11281         ## Get a face of block, found in the given shape by two given edges.
11282         #  @param theShape Block or a compound of blocks.
11283         #  @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
11284         #  @param theName Object name; when specified, this parameter is used
11285         #         for result publication in the study. Otherwise, if automatic
11286         #         publication is switched on, default value is used for result name.
11287         #
11288         #  @return New GEOM.GEOM_Object, containing the found face.
11289         #
11290         #  @ref swig_todo "Example"
11291         @ManageTransactions("BlocksOp")
11292         def GetFaceByEdges(self, theShape, theEdge1, theEdge2, theName=None):
11293             """
11294             Get a face of block, found in the given shape by two given edges.
11295
11296             Parameters:
11297                 theShape Block or a compound of blocks.
11298                 theEdge1,theEdge2 Edges, close to the edges of the desired face.
11299                 theName Object name; when specified, this parameter is used
11300                         for result publication in the study. Otherwise, if automatic
11301                         publication is switched on, default value is used for result name.
11302
11303             Returns:
11304                 New GEOM.GEOM_Object, containing the found face.
11305             """
11306             # Example: see GEOM_Spanner.py
11307             anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
11308             RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
11309             self._autoPublish(anObj, theName, "face")
11310             return anObj
11311
11312         ## Find a face, opposite to the given one in the given block.
11313         #  @param theBlock Must be a hexahedral solid.
11314         #  @param theFace Face of \a theBlock, opposite to the desired face.
11315         #  @param theName Object name; when specified, this parameter is used
11316         #         for result publication in the study. Otherwise, if automatic
11317         #         publication is switched on, default value is used for result name.
11318         #
11319         #  @return New GEOM.GEOM_Object, containing the found face.
11320         #
11321         #  @ref swig_GetOppositeFace "Example"
11322         @ManageTransactions("BlocksOp")
11323         def GetOppositeFace(self, theBlock, theFace, theName=None):
11324             """
11325             Find a face, opposite to the given one in the given block.
11326
11327             Parameters:
11328                 theBlock Must be a hexahedral solid.
11329                 theFace Face of theBlock, opposite to the desired face.
11330                 theName Object name; when specified, this parameter is used
11331                         for result publication in the study. Otherwise, if automatic
11332                         publication is switched on, default value is used for result name.
11333
11334             Returns:
11335                 New GEOM.GEOM_Object, containing the found face.
11336             """
11337             # Example: see GEOM_Spanner.py
11338             anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
11339             RaiseIfFailed("GetOppositeFace", self.BlocksOp)
11340             self._autoPublish(anObj, theName, "face")
11341             return anObj
11342
11343         ## Find a face of the given shape, which has minimal distance to the given point.
11344         #  @param theShape Block or a compound of blocks.
11345         #  @param thePoint Point, close to the desired face.
11346         #  @param theName Object name; when specified, this parameter is used
11347         #         for result publication in the study. Otherwise, if automatic
11348         #         publication is switched on, default value is used for result name.
11349         #
11350         #  @return New GEOM.GEOM_Object, containing the found face.
11351         #
11352         #  @ref swig_GetFaceNearPoint "Example"
11353         @ManageTransactions("BlocksOp")
11354         def GetFaceNearPoint(self, theShape, thePoint, theName=None):
11355             """
11356             Find a face of the given shape, which has minimal distance to the given point.
11357
11358             Parameters:
11359                 theShape Block or a compound of blocks.
11360                 thePoint Point, close to the desired face.
11361                 theName Object name; when specified, this parameter is used
11362                         for result publication in the study. Otherwise, if automatic
11363                         publication is switched on, default value is used for result name.
11364
11365             Returns:
11366                 New GEOM.GEOM_Object, containing the found face.
11367             """
11368             # Example: see GEOM_Spanner.py
11369             anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
11370             RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
11371             self._autoPublish(anObj, theName, "face")
11372             return anObj
11373
11374         ## Find a face of block, whose outside normale has minimal angle with the given vector.
11375         #  @param theBlock Block or a compound of blocks.
11376         #  @param theVector Vector, close to the normale of the desired face.
11377         #  @param theName Object name; when specified, this parameter is used
11378         #         for result publication in the study. Otherwise, if automatic
11379         #         publication is switched on, default value is used for result name.
11380         #
11381         #  @return New GEOM.GEOM_Object, containing the found face.
11382         #
11383         #  @ref swig_todo "Example"
11384         @ManageTransactions("BlocksOp")
11385         def GetFaceByNormale(self, theBlock, theVector, theName=None):
11386             """
11387             Find a face of block, whose outside normale has minimal angle with the given vector.
11388
11389             Parameters:
11390                 theBlock Block or a compound of blocks.
11391                 theVector Vector, close to the normale of the desired face.
11392                 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             Returns:
11397                 New GEOM.GEOM_Object, containing the found face.
11398             """
11399             # Example: see GEOM_Spanner.py
11400             anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
11401             RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
11402             self._autoPublish(anObj, theName, "face")
11403             return anObj
11404
11405         ## Find all sub-shapes of type \a theShapeType of the given shape,
11406         #  which have minimal distance to the given point.
11407         #  @param theShape Any shape.
11408         #  @param thePoint Point, close to the desired shape.
11409         #  @param theShapeType Defines what kind of sub-shapes is searched GEOM::shape_type
11410         #  @param theTolerance The tolerance for distances comparison. All shapes
11411         #                      with distances to the given point in interval
11412         #                      [minimal_distance, minimal_distance + theTolerance] will be gathered.
11413         #  @param theName Object name; when specified, this parameter is used
11414         #         for result publication in the study. Otherwise, if automatic
11415         #         publication is switched on, default value is used for result name.
11416         #
11417         #  @return New GEOM_Object, containing a group of all found shapes.
11418         #
11419         #  @ref swig_GetShapesNearPoint "Example"
11420         @ManageTransactions("BlocksOp")
11421         def GetShapesNearPoint(self, theShape, thePoint, theShapeType, theTolerance = 1e-07, theName=None):
11422             """
11423             Find all sub-shapes of type theShapeType of the given shape,
11424             which have minimal distance to the given point.
11425
11426             Parameters:
11427                 theShape Any shape.
11428                 thePoint Point, close to the desired shape.
11429                 theShapeType Defines what kind of sub-shapes is searched (see GEOM::shape_type)
11430                 theTolerance The tolerance for distances comparison. All shapes
11431                                 with distances to the given point in interval
11432                                 [minimal_distance, minimal_distance + theTolerance] will be gathered.
11433                 theName Object name; when specified, this parameter is used
11434                         for result publication in the study. Otherwise, if automatic
11435                         publication is switched on, default value is used for result name.
11436
11437             Returns:
11438                 New GEOM_Object, containing a group of all found shapes.
11439             """
11440             # Example: see GEOM_TestOthers.py
11441             anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
11442             RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
11443             self._autoPublish(anObj, theName, "group")
11444             return anObj
11445
11446         # end of l3_blocks_op
11447         ## @}
11448
11449         ## @addtogroup l4_blocks_measure
11450         ## @{
11451
11452         ## Check, if the compound of blocks is given.
11453         #  To be considered as a compound of blocks, the
11454         #  given shape must satisfy the following conditions:
11455         #  - Each element of the compound should be a Block (6 faces and 12 edges).
11456         #  - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11457         #  - The compound should be connexe.
11458         #  - The glue between two quadrangle faces should be applied.
11459         #  @param theCompound The compound to check.
11460         #  @return TRUE, if the given shape is a compound of blocks.
11461         #  If theCompound is not valid, prints all discovered errors.
11462         #
11463         #  @ref tui_measurement_tools_page "Example 1"
11464         #  \n @ref swig_CheckCompoundOfBlocks "Example 2"
11465         @ManageTransactions("BlocksOp")
11466         def CheckCompoundOfBlocks(self,theCompound):
11467             """
11468             Check, if the compound of blocks is given.
11469             To be considered as a compound of blocks, the
11470             given shape must satisfy the following conditions:
11471             - Each element of the compound should be a Block (6 faces and 12 edges).
11472             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
11473             - The compound should be connexe.
11474             - The glue between two quadrangle faces should be applied.
11475
11476             Parameters:
11477                 theCompound The compound to check.
11478
11479             Returns:
11480                 TRUE, if the given shape is a compound of blocks.
11481                 If theCompound is not valid, prints all discovered errors.
11482             """
11483             # Example: see GEOM_Spanner.py
11484             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
11485             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
11486             if IsValid == 0:
11487                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
11488                 print Descr
11489             return IsValid
11490
11491         ## Retrieve all non blocks solids and faces from \a theShape.
11492         #  @param theShape The shape to explore.
11493         #  @param theName Object name; when specified, this parameter is used
11494         #         for result publication in the study. Otherwise, if automatic
11495         #         publication is switched on, default value is used for result name.
11496         #
11497         #  @return A tuple of two GEOM_Objects. The first object is a group of all
11498         #          non block solids (= not 6 faces, or with 6 faces, but with the
11499         #          presence of non-quadrangular faces). The second object is a
11500         #          group of all non quadrangular faces.
11501         #
11502         #  @ref tui_measurement_tools_page "Example 1"
11503         #  \n @ref swig_GetNonBlocks "Example 2"
11504         @ManageTransactions("BlocksOp")
11505         def GetNonBlocks (self, theShape, theName=None):
11506             """
11507             Retrieve all non blocks solids and faces from theShape.
11508
11509             Parameters:
11510                 theShape The shape to explore.
11511                 theName Object name; when specified, this parameter is used
11512                         for result publication in the study. Otherwise, if automatic
11513                         publication is switched on, default value is used for result name.
11514
11515             Returns:
11516                 A tuple of two GEOM_Objects. The first object is a group of all
11517                 non block solids (= not 6 faces, or with 6 faces, but with the
11518                 presence of non-quadrangular faces). The second object is a
11519                 group of all non quadrangular faces.
11520
11521             Usage:
11522                 (res_sols, res_faces) = geompy.GetNonBlocks(myShape1)
11523             """
11524             # Example: see GEOM_Spanner.py
11525             aTuple = self.BlocksOp.GetNonBlocks(theShape)
11526             RaiseIfFailed("GetNonBlocks", self.BlocksOp)
11527             self._autoPublish(aTuple, theName, ("groupNonHexas", "groupNonQuads"))
11528             return aTuple
11529
11530         ## Remove all seam and degenerated edges from \a theShape.
11531         #  Unite faces and edges, sharing one surface. It means that
11532         #  this faces must have references to one C++ surface object (handle).
11533         #  @param theShape The compound or single solid to remove irregular edges from.
11534         #  @param doUnionFaces If True, then unite faces. If False (the default value),
11535         #         do not unite faces.
11536         #  @param theName Object name; when specified, this parameter is used
11537         #         for result publication in the study. Otherwise, if automatic
11538         #         publication is switched on, default value is used for result name.
11539         #
11540         #  @return Improved shape.
11541         #
11542         #  @ref swig_RemoveExtraEdges "Example"
11543         @ManageTransactions("BlocksOp")
11544         def RemoveExtraEdges(self, theShape, doUnionFaces=False, theName=None):
11545             """
11546             Remove all seam and degenerated edges from theShape.
11547             Unite faces and edges, sharing one surface. It means that
11548             this faces must have references to one C++ surface object (handle).
11549
11550             Parameters:
11551                 theShape The compound or single solid to remove irregular edges from.
11552                 doUnionFaces If True, then unite faces. If False (the default value),
11553                              do not unite faces.
11554                 theName Object name; when specified, this parameter is used
11555                         for result publication in the study. Otherwise, if automatic
11556                         publication is switched on, default value is used for result name.
11557
11558             Returns:
11559                 Improved shape.
11560             """
11561             # Example: see GEOM_TestOthers.py
11562             nbFacesOptimum = -1 # -1 means do not unite faces
11563             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
11564             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
11565             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
11566             self._autoPublish(anObj, theName, "removeExtraEdges")
11567             return anObj
11568
11569         ## Performs union faces of \a theShape
11570         #  Unite faces sharing one surface. It means that
11571         #  these faces must have references to one C++ surface object (handle).
11572         #  @param theShape The compound or single solid that contains faces
11573         #         to perform union.
11574         #  @param theName Object name; when specified, this parameter is used
11575         #         for result publication in the study. Otherwise, if automatic
11576         #         publication is switched on, default value is used for result name.
11577         #
11578         #  @return Improved shape.
11579         #
11580         #  @ref swig_UnionFaces "Example"
11581         @ManageTransactions("BlocksOp")
11582         def UnionFaces(self, theShape, theName=None):
11583             """
11584             Performs union faces of theShape.
11585             Unite faces sharing one surface. It means that
11586             these faces must have references to one C++ surface object (handle).
11587
11588             Parameters:
11589                 theShape The compound or single solid that contains faces
11590                          to perform union.
11591                 theName Object name; when specified, this parameter is used
11592                         for result publication in the study. Otherwise, if automatic
11593                         publication is switched on, default value is used for result name.
11594
11595             Returns:
11596                 Improved shape.
11597             """
11598             # Example: see GEOM_TestOthers.py
11599             anObj = self.BlocksOp.UnionFaces(theShape)
11600             RaiseIfFailed("UnionFaces", self.BlocksOp)
11601             self._autoPublish(anObj, theName, "unionFaces")
11602             return anObj
11603
11604         ## Check, if the given shape is a blocks compound.
11605         #  Fix all detected errors.
11606         #    \note Single block can be also fixed by this method.
11607         #  @param theShape The compound to check and improve.
11608         #  @param theName Object name; when specified, this parameter is used
11609         #         for result publication in the study. Otherwise, if automatic
11610         #         publication is switched on, default value is used for result name.
11611         #
11612         #  @return Improved compound.
11613         #
11614         #  @ref swig_CheckAndImprove "Example"
11615         @ManageTransactions("BlocksOp")
11616         def CheckAndImprove(self, theShape, theName=None):
11617             """
11618             Check, if the given shape is a blocks compound.
11619             Fix all detected errors.
11620
11621             Note:
11622                 Single block can be also fixed by this method.
11623
11624             Parameters:
11625                 theShape The compound to check and improve.
11626                 theName Object name; when specified, this parameter is used
11627                         for result publication in the study. Otherwise, if automatic
11628                         publication is switched on, default value is used for result name.
11629
11630             Returns:
11631                 Improved compound.
11632             """
11633             # Example: see GEOM_TestOthers.py
11634             anObj = self.BlocksOp.CheckAndImprove(theShape)
11635             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
11636             self._autoPublish(anObj, theName, "improved")
11637             return anObj
11638
11639         # end of l4_blocks_measure
11640         ## @}
11641
11642         ## @addtogroup l3_blocks_op
11643         ## @{
11644
11645         ## Get all the blocks, contained in the given compound.
11646         #  @param theCompound The compound to explode.
11647         #  @param theMinNbFaces If solid has lower number of faces, it is not a block.
11648         #  @param theMaxNbFaces If solid has higher number of faces, it is not a block.
11649         #  @param 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         #  @note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11654         #
11655         #  @return List of GEOM.GEOM_Object, containing the retrieved blocks.
11656         #
11657         #  @ref tui_explode_on_blocks "Example 1"
11658         #  \n @ref swig_MakeBlockExplode "Example 2"
11659         @ManageTransactions("BlocksOp")
11660         def MakeBlockExplode(self, theCompound, theMinNbFaces, theMaxNbFaces, theName=None):
11661             """
11662             Get all the blocks, contained in the given compound.
11663
11664             Parameters:
11665                 theCompound The compound to explode.
11666                 theMinNbFaces If solid has lower number of faces, it is not a block.
11667                 theMaxNbFaces If solid has higher number of faces, it is not a block.
11668                 theName Object name; when specified, this parameter is used
11669                         for result publication in the study. Otherwise, if automatic
11670                         publication is switched on, default value is used for result name.
11671
11672             Note:
11673                 If theMaxNbFaces = 0, the maximum number of faces is not restricted.
11674
11675             Returns:
11676                 List of GEOM.GEOM_Object, containing the retrieved blocks.
11677             """
11678             # Example: see GEOM_TestOthers.py
11679             theMinNbFaces,theMaxNbFaces,Parameters = ParseParameters(theMinNbFaces,theMaxNbFaces)
11680             aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
11681             RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
11682             for anObj in aList:
11683                 anObj.SetParameters(Parameters)
11684                 pass
11685             self._autoPublish(aList, theName, "block")
11686             return aList
11687
11688         ## Find block, containing the given point inside its volume or on boundary.
11689         #  @param theCompound Compound, to find block in.
11690         #  @param thePoint Point, close to the desired block. If the point lays on
11691         #         boundary between some blocks, we return block with nearest center.
11692         #  @param theName Object name; when specified, this parameter is used
11693         #         for result publication in the study. Otherwise, if automatic
11694         #         publication is switched on, default value is used for result name.
11695         #
11696         #  @return New GEOM.GEOM_Object, containing the found block.
11697         #
11698         #  @ref swig_todo "Example"
11699         @ManageTransactions("BlocksOp")
11700         def GetBlockNearPoint(self, theCompound, thePoint, theName=None):
11701             """
11702             Find block, containing the given point inside its volume or on boundary.
11703
11704             Parameters:
11705                 theCompound Compound, to find block in.
11706                 thePoint Point, close to the desired block. If the point lays on
11707                          boundary between some blocks, we return block with nearest center.
11708                 theName Object name; when specified, this parameter is used
11709                         for result publication in the study. Otherwise, if automatic
11710                         publication is switched on, default value is used for result name.
11711
11712             Returns:
11713                 New GEOM.GEOM_Object, containing the found block.
11714             """
11715             # Example: see GEOM_Spanner.py
11716             anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
11717             RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
11718             self._autoPublish(anObj, theName, "block")
11719             return anObj
11720
11721         ## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11722         #  @param theCompound Compound, to find block in.
11723         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
11724         #  @param theName Object name; when specified, this parameter is used
11725         #         for result publication in the study. Otherwise, if automatic
11726         #         publication is switched on, default value is used for result name.
11727         #
11728         #  @return New GEOM.GEOM_Object, containing the found block.
11729         #
11730         #  @ref swig_GetBlockByParts "Example"
11731         @ManageTransactions("BlocksOp")
11732         def GetBlockByParts(self, theCompound, theParts, theName=None):
11733             """
11734              Find block, containing all the elements, passed as the parts, or maximum quantity of them.
11735
11736              Parameters:
11737                 theCompound Compound, to find block in.
11738                 theParts List of faces and/or edges and/or vertices to be parts of the found block.
11739                 theName Object name; when specified, this parameter is used
11740                         for result publication in the study. Otherwise, if automatic
11741                         publication is switched on, default value is used for result name.
11742
11743             Returns:
11744                 New GEOM_Object, containing the found block.
11745             """
11746             # Example: see GEOM_TestOthers.py
11747             anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
11748             RaiseIfFailed("GetBlockByParts", self.BlocksOp)
11749             self._autoPublish(anObj, theName, "block")
11750             return anObj
11751
11752         ## Return all blocks, containing all the elements, passed as the parts.
11753         #  @param theCompound Compound, to find blocks in.
11754         #  @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11755         #  @param theName Object name; when specified, this parameter is used
11756         #         for result publication in the study. Otherwise, if automatic
11757         #         publication is switched on, default value is used for result name.
11758         #
11759         #  @return List of GEOM.GEOM_Object, containing the found blocks.
11760         #
11761         #  @ref swig_todo "Example"
11762         @ManageTransactions("BlocksOp")
11763         def GetBlocksByParts(self, theCompound, theParts, theName=None):
11764             """
11765             Return all blocks, containing all the elements, passed as the parts.
11766
11767             Parameters:
11768                 theCompound Compound, to find blocks in.
11769                 theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
11770                 theName Object name; when specified, this parameter is used
11771                         for result publication in the study. Otherwise, if automatic
11772                         publication is switched on, default value is used for result name.
11773
11774             Returns:
11775                 List of GEOM.GEOM_Object, containing the found blocks.
11776             """
11777             # Example: see GEOM_Spanner.py
11778             aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
11779             RaiseIfFailed("GetBlocksByParts", self.BlocksOp)
11780             self._autoPublish(aList, theName, "block")
11781             return aList
11782
11783         ## Multi-transformate block and glue the result.
11784         #  Transformation is defined so, as to superpose direction faces.
11785         #  @param Block Hexahedral solid to be multi-transformed.
11786         #  @param DirFace1 ID of First direction face.
11787         #  @param DirFace2 ID of Second direction face.
11788         #  @param NbTimes Quantity of transformations to be done.
11789         #  @param theName Object name; when specified, this parameter is used
11790         #         for result publication in the study. Otherwise, if automatic
11791         #         publication is switched on, default value is used for result name.
11792         #
11793         #  @note Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11794         #
11795         #  @return New GEOM.GEOM_Object, containing the result shape.
11796         #
11797         #  @ref tui_multi_transformation "Example"
11798         @ManageTransactions("BlocksOp")
11799         def MakeMultiTransformation1D(self, Block, DirFace1, DirFace2, NbTimes, theName=None):
11800             """
11801             Multi-transformate block and glue the result.
11802             Transformation is defined so, as to superpose direction faces.
11803
11804             Parameters:
11805                 Block Hexahedral solid to be multi-transformed.
11806                 DirFace1 ID of First direction face.
11807                 DirFace2 ID of Second direction face.
11808                 NbTimes Quantity of transformations to be done.
11809                 theName Object name; when specified, this parameter is used
11810                         for result publication in the study. Otherwise, if automatic
11811                         publication is switched on, default value is used for result name.
11812
11813             Note:
11814                 Unique ID of sub-shape can be obtained, using method GetSubShapeID().
11815
11816             Returns:
11817                 New GEOM.GEOM_Object, containing the result shape.
11818             """
11819             # Example: see GEOM_Spanner.py
11820             DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
11821             anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
11822             RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
11823             anObj.SetParameters(Parameters)
11824             self._autoPublish(anObj, theName, "transformed")
11825             return anObj
11826
11827         ## Multi-transformate block and glue the result.
11828         #  @param Block Hexahedral solid to be multi-transformed.
11829         #  @param DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11830         #  @param DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11831         #  @param NbTimesU,NbTimesV Quantity of transformations to be done.
11832         #  @param theName Object name; when specified, this parameter is used
11833         #         for result publication in the study. Otherwise, if automatic
11834         #         publication is switched on, default value is used for result name.
11835         #
11836         #  @return New GEOM.GEOM_Object, containing the result shape.
11837         #
11838         #  @ref tui_multi_transformation "Example"
11839         @ManageTransactions("BlocksOp")
11840         def MakeMultiTransformation2D(self, Block, DirFace1U, DirFace2U, NbTimesU,
11841                                       DirFace1V, DirFace2V, NbTimesV, theName=None):
11842             """
11843             Multi-transformate block and glue the result.
11844
11845             Parameters:
11846                 Block Hexahedral solid to be multi-transformed.
11847                 DirFace1U,DirFace2U IDs of Direction faces for the first transformation.
11848                 DirFace1V,DirFace2V IDs of Direction faces for the second transformation.
11849                 NbTimesU,NbTimesV Quantity of transformations to be done.
11850                 theName Object name; when specified, this parameter is used
11851                         for result publication in the study. Otherwise, if automatic
11852                         publication is switched on, default value is used for result name.
11853
11854             Returns:
11855                 New GEOM.GEOM_Object, containing the result shape.
11856             """
11857             # Example: see GEOM_Spanner.py
11858             DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV,Parameters = ParseParameters(
11859               DirFace1U,DirFace2U,NbTimesU,DirFace1V,DirFace2V,NbTimesV)
11860             anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
11861                                                             DirFace1V, DirFace2V, NbTimesV)
11862             RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
11863             anObj.SetParameters(Parameters)
11864             self._autoPublish(anObj, theName, "transformed")
11865             return anObj
11866
11867         ## Build all possible propagation groups.
11868         #  Propagation group is a set of all edges, opposite to one (main)
11869         #  edge of this group directly or through other opposite edges.
11870         #  Notion of Opposite Edge make sence only on quadrangle face.
11871         #  @param theShape Shape to build propagation groups on.
11872         #  @param theName Object name; when specified, this parameter is used
11873         #         for result publication in the study. Otherwise, if automatic
11874         #         publication is switched on, default value is used for result name.
11875         #
11876         #  @return List of GEOM.GEOM_Object, each of them is a propagation group.
11877         #
11878         #  @ref swig_Propagate "Example"
11879         @ManageTransactions("BlocksOp")
11880         def Propagate(self, theShape, theName=None):
11881             """
11882             Build all possible propagation groups.
11883             Propagation group is a set of all edges, opposite to one (main)
11884             edge of this group directly or through other opposite edges.
11885             Notion of Opposite Edge make sence only on quadrangle face.
11886
11887             Parameters:
11888                 theShape Shape to build propagation groups on.
11889                 theName Object name; when specified, this parameter is used
11890                         for result publication in the study. Otherwise, if automatic
11891                         publication is switched on, default value is used for result name.
11892
11893             Returns:
11894                 List of GEOM.GEOM_Object, each of them is a propagation group.
11895             """
11896             # Example: see GEOM_TestOthers.py
11897             listChains = self.BlocksOp.Propagate(theShape)
11898             RaiseIfFailed("Propagate", self.BlocksOp)
11899             self._autoPublish(listChains, theName, "propagate")
11900             return listChains
11901
11902         # end of l3_blocks_op
11903         ## @}
11904
11905         ## @addtogroup l3_groups
11906         ## @{
11907
11908         ## Creates a new group which will store sub-shapes of theMainShape
11909         #  @param theMainShape is a GEOM object on which the group is selected
11910         #  @param theShapeType defines a shape type of the group (see GEOM::shape_type)
11911         #  @param theName Object name; when specified, this parameter is used
11912         #         for result publication in the study. Otherwise, if automatic
11913         #         publication is switched on, default value is used for result name.
11914         #
11915         #  @return a newly created GEOM group (GEOM.GEOM_Object)
11916         #
11917         #  @ref tui_working_with_groups_page "Example 1"
11918         #  \n @ref swig_CreateGroup "Example 2"
11919         @ManageTransactions("GroupOp")
11920         def CreateGroup(self, theMainShape, theShapeType, theName=None):
11921             """
11922             Creates a new group which will store sub-shapes of theMainShape
11923
11924             Parameters:
11925                theMainShape is a GEOM object on which the group is selected
11926                theShapeType defines a shape type of the group:"COMPOUND", "COMPSOLID",
11927                             "SOLID", "SHELL", "FACE", "WIRE", "EDGE", "VERTEX", "SHAPE".
11928                 theName Object name; when specified, this parameter is used
11929                         for result publication in the study. Otherwise, if automatic
11930                         publication is switched on, default value is used for result name.
11931
11932             Returns:
11933                a newly created GEOM group
11934
11935             Example of usage:
11936                 group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
11937
11938             """
11939             # Example: see GEOM_TestOthers.py
11940             anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
11941             RaiseIfFailed("CreateGroup", self.GroupOp)
11942             self._autoPublish(anObj, theName, "group")
11943             return anObj
11944
11945         ## Adds a sub-object with ID theSubShapeId to the group
11946         #  @param theGroup is a GEOM group to which the new sub-shape is added
11947         #  @param theSubShapeID is a sub-shape ID in the main object.
11948         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11949         #
11950         #  @ref tui_working_with_groups_page "Example"
11951         @ManageTransactions("GroupOp")
11952         def AddObject(self,theGroup, theSubShapeID):
11953             """
11954             Adds a sub-object with ID theSubShapeId to the group
11955
11956             Parameters:
11957                 theGroup       is a GEOM group to which the new sub-shape is added
11958                 theSubShapeID  is a sub-shape ID in the main object.
11959
11960             Note:
11961                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11962             """
11963             # Example: see GEOM_TestOthers.py
11964             self.GroupOp.AddObject(theGroup, theSubShapeID)
11965             if self.GroupOp.GetErrorCode() != "PAL_ELEMENT_ALREADY_PRESENT":
11966                 RaiseIfFailed("AddObject", self.GroupOp)
11967                 pass
11968             pass
11969
11970         ## Removes a sub-object with ID \a theSubShapeId from the group
11971         #  @param theGroup is a GEOM group from which the new sub-shape is removed
11972         #  @param theSubShapeID is a sub-shape ID in the main object.
11973         #  \note Use method GetSubShapeID() to get an unique ID of the sub-shape
11974         #
11975         #  @ref tui_working_with_groups_page "Example"
11976         @ManageTransactions("GroupOp")
11977         def RemoveObject(self,theGroup, theSubShapeID):
11978             """
11979             Removes a sub-object with ID theSubShapeId from the group
11980
11981             Parameters:
11982                 theGroup is a GEOM group from which the new sub-shape is removed
11983                 theSubShapeID is a sub-shape ID in the main object.
11984
11985             Note:
11986                 Use method GetSubShapeID() to get an unique ID of the sub-shape
11987             """
11988             # Example: see GEOM_TestOthers.py
11989             self.GroupOp.RemoveObject(theGroup, theSubShapeID)
11990             RaiseIfFailed("RemoveObject", self.GroupOp)
11991             pass
11992
11993         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
11994         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
11995         #  @param theSubShapes is a list of sub-shapes to be added.
11996         #
11997         #  @ref tui_working_with_groups_page "Example"
11998         @ManageTransactions("GroupOp")
11999         def UnionList (self,theGroup, theSubShapes):
12000             """
12001             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12002
12003             Parameters:
12004                 theGroup is a GEOM group to which the new sub-shapes are added.
12005                 theSubShapes is a list of sub-shapes to be added.
12006             """
12007             # Example: see GEOM_TestOthers.py
12008             self.GroupOp.UnionList(theGroup, theSubShapes)
12009             RaiseIfFailed("UnionList", self.GroupOp)
12010             pass
12011
12012         ## Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12013         #  @param theGroup is a GEOM group to which the new sub-shapes are added.
12014         #  @param theSubShapes is a list of indices of sub-shapes to be added.
12015         #
12016         #  @ref swig_UnionIDs "Example"
12017         @ManageTransactions("GroupOp")
12018         def UnionIDs(self,theGroup, theSubShapes):
12019             """
12020             Adds to the group all the given shapes. No errors, if some shapes are alredy included.
12021
12022             Parameters:
12023                 theGroup is a GEOM group to which the new sub-shapes are added.
12024                 theSubShapes is a list of indices of sub-shapes to be added.
12025             """
12026             # Example: see GEOM_TestOthers.py
12027             self.GroupOp.UnionIDs(theGroup, theSubShapes)
12028             RaiseIfFailed("UnionIDs", self.GroupOp)
12029             pass
12030
12031         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12032         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12033         #  @param theSubShapes is a list of sub-shapes to be removed.
12034         #
12035         #  @ref tui_working_with_groups_page "Example"
12036         @ManageTransactions("GroupOp")
12037         def DifferenceList (self,theGroup, theSubShapes):
12038             """
12039             Removes from the group all the given shapes. No errors, if some shapes are not included.
12040
12041             Parameters:
12042                 theGroup is a GEOM group from which the sub-shapes are removed.
12043                 theSubShapes is a list of sub-shapes to be removed.
12044             """
12045             # Example: see GEOM_TestOthers.py
12046             self.GroupOp.DifferenceList(theGroup, theSubShapes)
12047             RaiseIfFailed("DifferenceList", self.GroupOp)
12048             pass
12049
12050         ## Removes from the group all the given shapes. No errors, if some shapes are not included.
12051         #  @param theGroup is a GEOM group from which the sub-shapes are removed.
12052         #  @param theSubShapes is a list of indices of sub-shapes to be removed.
12053         #
12054         #  @ref swig_DifferenceIDs "Example"
12055         @ManageTransactions("GroupOp")
12056         def DifferenceIDs(self,theGroup, theSubShapes):
12057             """
12058             Removes from the group all the given shapes. No errors, if some shapes are not included.
12059
12060             Parameters:
12061                 theGroup is a GEOM group from which the sub-shapes are removed.
12062                 theSubShapes is a list of indices of sub-shapes to be removed.
12063             """
12064             # Example: see GEOM_TestOthers.py
12065             self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
12066             RaiseIfFailed("DifferenceIDs", self.GroupOp)
12067             pass
12068
12069         ## Union of two groups.
12070         #  New group is created. It will contain all entities
12071         #  which are present in groups theGroup1 and theGroup2.
12072         #  @param theGroup1, theGroup2 are the initial GEOM groups
12073         #                              to create the united group from.
12074         #  @param theName Object name; when specified, this parameter is used
12075         #         for result publication in the study. Otherwise, if automatic
12076         #         publication is switched on, default value is used for result name.
12077         #
12078         #  @return a newly created GEOM group.
12079         #
12080         #  @ref tui_union_groups_anchor "Example"
12081         @ManageTransactions("GroupOp")
12082         def UnionGroups (self, theGroup1, theGroup2, theName=None):
12083             """
12084             Union of two groups.
12085             New group is created. It will contain all entities
12086             which are present in groups theGroup1 and theGroup2.
12087
12088             Parameters:
12089                 theGroup1, theGroup2 are the initial GEOM groups
12090                                      to create the united group from.
12091                 theName Object name; when specified, this parameter is used
12092                         for result publication in the study. Otherwise, if automatic
12093                         publication is switched on, default value is used for result name.
12094
12095             Returns:
12096                 a newly created GEOM group.
12097             """
12098             # Example: see GEOM_TestOthers.py
12099             aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
12100             RaiseIfFailed("UnionGroups", self.GroupOp)
12101             self._autoPublish(aGroup, theName, "group")
12102             return aGroup
12103
12104         ## Intersection of two groups.
12105         #  New group is created. It will contain only those entities
12106         #  which are present in both groups theGroup1 and theGroup2.
12107         #  @param theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12108         #  @param theName Object name; when specified, this parameter is used
12109         #         for result publication in the study. Otherwise, if automatic
12110         #         publication is switched on, default value is used for result name.
12111         #
12112         #  @return a newly created GEOM group.
12113         #
12114         #  @ref tui_intersect_groups_anchor "Example"
12115         @ManageTransactions("GroupOp")
12116         def IntersectGroups (self, theGroup1, theGroup2, theName=None):
12117             """
12118             Intersection of two groups.
12119             New group is created. It will contain only those entities
12120             which are present in both groups theGroup1 and theGroup2.
12121
12122             Parameters:
12123                 theGroup1, theGroup2 are the initial GEOM groups to get common part of.
12124                 theName Object name; when specified, this parameter is used
12125                         for result publication in the study. Otherwise, if automatic
12126                         publication is switched on, default value is used for result name.
12127
12128             Returns:
12129                 a newly created GEOM group.
12130             """
12131             # Example: see GEOM_TestOthers.py
12132             aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
12133             RaiseIfFailed("IntersectGroups", self.GroupOp)
12134             self._autoPublish(aGroup, theName, "group")
12135             return aGroup
12136
12137         ## Cut of two groups.
12138         #  New group is created. It will contain entities which are
12139         #  present in group theGroup1 but are not present in group theGroup2.
12140         #  @param theGroup1 is a GEOM group to include elements of.
12141         #  @param theGroup2 is a GEOM group to exclude elements of.
12142         #  @param theName Object name; when specified, this parameter is used
12143         #         for result publication in the study. Otherwise, if automatic
12144         #         publication is switched on, default value is used for result name.
12145         #
12146         #  @return a newly created GEOM group.
12147         #
12148         #  @ref tui_cut_groups_anchor "Example"
12149         @ManageTransactions("GroupOp")
12150         def CutGroups (self, theGroup1, theGroup2, theName=None):
12151             """
12152             Cut of two groups.
12153             New group is created. It will contain entities which are
12154             present in group theGroup1 but are not present in group theGroup2.
12155
12156             Parameters:
12157                 theGroup1 is a GEOM group to include elements of.
12158                 theGroup2 is a GEOM group to exclude elements of.
12159                 theName Object name; when specified, this parameter is used
12160                         for result publication in the study. Otherwise, if automatic
12161                         publication is switched on, default value is used for result name.
12162
12163             Returns:
12164                 a newly created GEOM group.
12165             """
12166             # Example: see GEOM_TestOthers.py
12167             aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
12168             RaiseIfFailed("CutGroups", self.GroupOp)
12169             self._autoPublish(aGroup, theName, "group")
12170             return aGroup
12171
12172         ## Union of list of groups.
12173         #  New group is created. It will contain all entities that are
12174         #  present in groups listed in theGList.
12175         #  @param theGList is a list of GEOM groups to create the united group from.
12176         #  @param theName Object name; when specified, this parameter is used
12177         #         for result publication in the study. Otherwise, if automatic
12178         #         publication is switched on, default value is used for result name.
12179         #
12180         #  @return a newly created GEOM group.
12181         #
12182         #  @ref tui_union_groups_anchor "Example"
12183         @ManageTransactions("GroupOp")
12184         def UnionListOfGroups (self, theGList, theName=None):
12185             """
12186             Union of list of groups.
12187             New group is created. It will contain all entities that are
12188             present in groups listed in theGList.
12189
12190             Parameters:
12191                 theGList is a list of GEOM groups to create the united group from.
12192                 theName Object name; when specified, this parameter is used
12193                         for result publication in the study. Otherwise, if automatic
12194                         publication is switched on, default value is used for result name.
12195
12196             Returns:
12197                 a newly created GEOM group.
12198             """
12199             # Example: see GEOM_TestOthers.py
12200             aGroup = self.GroupOp.UnionListOfGroups(theGList)
12201             RaiseIfFailed("UnionListOfGroups", self.GroupOp)
12202             self._autoPublish(aGroup, theName, "group")
12203             return aGroup
12204
12205         ## Cut of lists of groups.
12206         #  New group is created. It will contain only entities
12207         #  which are present in groups listed in theGList.
12208         #  @param theGList is a list of GEOM groups to include elements of.
12209         #  @param theName Object name; when specified, this parameter is used
12210         #         for result publication in the study. Otherwise, if automatic
12211         #         publication is switched on, default value is used for result name.
12212         #
12213         #  @return a newly created GEOM group.
12214         #
12215         #  @ref tui_intersect_groups_anchor "Example"
12216         @ManageTransactions("GroupOp")
12217         def IntersectListOfGroups (self, theGList, theName=None):
12218             """
12219             Cut of lists of groups.
12220             New group is created. It will contain only entities
12221             which are present in groups listed in theGList.
12222
12223             Parameters:
12224                 theGList is a list of GEOM groups to include elements of.
12225                 theName Object name; when specified, this parameter is used
12226                         for result publication in the study. Otherwise, if automatic
12227                         publication is switched on, default value is used for result name.
12228
12229             Returns:
12230                 a newly created GEOM group.
12231             """
12232             # Example: see GEOM_TestOthers.py
12233             aGroup = self.GroupOp.IntersectListOfGroups(theGList)
12234             RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
12235             self._autoPublish(aGroup, theName, "group")
12236             return aGroup
12237
12238         ## Cut of lists of groups.
12239         #  New group is created. It will contain only entities
12240         #  which are present in groups listed in theGList1 but
12241         #  are not present in groups from theGList2.
12242         #  @param theGList1 is a list of GEOM groups to include elements of.
12243         #  @param theGList2 is a list of GEOM groups to exclude elements of.
12244         #  @param theName Object name; when specified, this parameter is used
12245         #         for result publication in the study. Otherwise, if automatic
12246         #         publication is switched on, default value is used for result name.
12247         #
12248         #  @return a newly created GEOM group.
12249         #
12250         #  @ref tui_cut_groups_anchor "Example"
12251         @ManageTransactions("GroupOp")
12252         def CutListOfGroups (self, theGList1, theGList2, theName=None):
12253             """
12254             Cut of lists of groups.
12255             New group is created. It will contain only entities
12256             which are present in groups listed in theGList1 but
12257             are not present in groups from theGList2.
12258
12259             Parameters:
12260                 theGList1 is a list of GEOM groups to include elements of.
12261                 theGList2 is a list of GEOM groups to exclude elements of.
12262                 theName Object name; when specified, this parameter is used
12263                         for result publication in the study. Otherwise, if automatic
12264                         publication is switched on, default value is used for result name.
12265
12266             Returns:
12267                 a newly created GEOM group.
12268             """
12269             # Example: see GEOM_TestOthers.py
12270             aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
12271             RaiseIfFailed("CutListOfGroups", self.GroupOp)
12272             self._autoPublish(aGroup, theName, "group")
12273             return aGroup
12274
12275         ## Returns a list of sub-objects ID stored in the group
12276         #  @param theGroup is a GEOM group for which a list of IDs is requested
12277         #
12278         #  @ref swig_GetObjectIDs "Example"
12279         @ManageTransactions("GroupOp")
12280         def GetObjectIDs(self,theGroup):
12281             """
12282             Returns a list of sub-objects ID stored in the group
12283
12284             Parameters:
12285                 theGroup is a GEOM group for which a list of IDs is requested
12286             """
12287             # Example: see GEOM_TestOthers.py
12288             ListIDs = self.GroupOp.GetObjects(theGroup)
12289             RaiseIfFailed("GetObjects", self.GroupOp)
12290             return ListIDs
12291
12292         ## Returns a type of sub-objects stored in the group
12293         #  @param theGroup is a GEOM group which type is returned.
12294         #
12295         #  @ref swig_GetType "Example"
12296         @ManageTransactions("GroupOp")
12297         def GetType(self,theGroup):
12298             """
12299             Returns a type of sub-objects stored in the group
12300
12301             Parameters:
12302                 theGroup is a GEOM group which type is returned.
12303             """
12304             # Example: see GEOM_TestOthers.py
12305             aType = self.GroupOp.GetType(theGroup)
12306             RaiseIfFailed("GetType", self.GroupOp)
12307             return aType
12308
12309         ## Convert a type of geom object from id to string value
12310         #  @param theId is a GEOM obect type id.
12311         #  @return type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12312         #  @ref swig_GetType "Example"
12313         def ShapeIdToType(self, theId):
12314             """
12315             Convert a type of geom object from id to string value
12316
12317             Parameters:
12318                 theId is a GEOM obect type id.
12319
12320             Returns:
12321                 type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
12322             """
12323             if theId == 0:
12324                 return "COPY"
12325             if theId == 1:
12326                 return "IMPORT"
12327             if theId == 2:
12328                 return "POINT"
12329             if theId == 3:
12330                 return "VECTOR"
12331             if theId == 4:
12332                 return "PLANE"
12333             if theId == 5:
12334                 return "LINE"
12335             if theId == 6:
12336                 return "TORUS"
12337             if theId == 7:
12338                 return "BOX"
12339             if theId == 8:
12340                 return "CYLINDER"
12341             if theId == 9:
12342                 return "CONE"
12343             if theId == 10:
12344                 return "SPHERE"
12345             if theId == 11:
12346                 return "PRISM"
12347             if theId == 12:
12348                 return "REVOLUTION"
12349             if theId == 13:
12350                 return "BOOLEAN"
12351             if theId == 14:
12352                 return "PARTITION"
12353             if theId == 15:
12354                 return "POLYLINE"
12355             if theId == 16:
12356                 return "CIRCLE"
12357             if theId == 17:
12358                 return "SPLINE"
12359             if theId == 18:
12360                 return "ELLIPSE"
12361             if theId == 19:
12362                 return "CIRC_ARC"
12363             if theId == 20:
12364                 return "FILLET"
12365             if theId == 21:
12366                 return "CHAMFER"
12367             if theId == 22:
12368                 return "EDGE"
12369             if theId == 23:
12370                 return "WIRE"
12371             if theId == 24:
12372                 return "FACE"
12373             if theId == 25:
12374                 return "SHELL"
12375             if theId == 26:
12376                 return "SOLID"
12377             if theId == 27:
12378                 return "COMPOUND"
12379             if theId == 28:
12380                 return "SUBSHAPE"
12381             if theId == 29:
12382                 return "PIPE"
12383             if theId == 30:
12384                 return "ARCHIMEDE"
12385             if theId == 31:
12386                 return "FILLING"
12387             if theId == 32:
12388                 return "EXPLODE"
12389             if theId == 33:
12390                 return "GLUED"
12391             if theId == 34:
12392                 return "SKETCHER"
12393             if theId == 35:
12394                 return "CDG"
12395             if theId == 36:
12396                 return "FREE_BOUNDS"
12397             if theId == 37:
12398                 return "GROUP"
12399             if theId == 38:
12400                 return "BLOCK"
12401             if theId == 39:
12402                 return "MARKER"
12403             if theId == 40:
12404                 return "THRUSECTIONS"
12405             if theId == 41:
12406                 return "COMPOUNDFILTER"
12407             if theId == 42:
12408                 return "SHAPES_ON_SHAPE"
12409             if theId == 43:
12410                 return "ELLIPSE_ARC"
12411             if theId == 44:
12412                 return "3DSKETCHER"
12413             if theId == 45:
12414                 return "FILLET_2D"
12415             if theId == 46:
12416                 return "FILLET_1D"
12417             if theId == 201:
12418                 return "PIPETSHAPE"
12419             return "Shape Id not exist."
12420
12421         ## Returns a main shape associated with the group
12422         #  @param theGroup is a GEOM group for which a main shape object is requested
12423         #  @return a GEOM object which is a main shape for theGroup
12424         #
12425         #  @ref swig_GetMainShape "Example"
12426         @ManageTransactions("GroupOp")
12427         def GetMainShape(self,theGroup):
12428             """
12429             Returns a main shape associated with the group
12430
12431             Parameters:
12432                 theGroup is a GEOM group for which a main shape object is requested
12433
12434             Returns:
12435                 a GEOM object which is a main shape for theGroup
12436
12437             Example of usage: BoxCopy = geompy.GetMainShape(CreateGroup)
12438             """
12439             # Example: see GEOM_TestOthers.py
12440             anObj = self.GroupOp.GetMainShape(theGroup)
12441             RaiseIfFailed("GetMainShape", self.GroupOp)
12442             return anObj
12443
12444         ## Create group of edges of theShape, whose length is in range [min_length, max_length].
12445         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12446         #  @param theShape given shape (see GEOM.GEOM_Object)
12447         #  @param min_length minimum length of edges of theShape
12448         #  @param max_length maximum length of edges of theShape
12449         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12450         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12451         #  @param theName Object name; when specified, this parameter is used
12452         #         for result publication in the study. Otherwise, if automatic
12453         #         publication is switched on, default value is used for result name.
12454         #
12455         #  @return a newly created GEOM group of edges
12456         #
12457         #  @@ref swig_todo "Example"
12458         def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1, theName=None):
12459             """
12460             Create group of edges of theShape, whose length is in range [min_length, max_length].
12461             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12462
12463             Parameters:
12464                 theShape given shape
12465                 min_length minimum length of edges of theShape
12466                 max_length maximum length of edges of theShape
12467                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12468                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12469                 theName Object name; when specified, this parameter is used
12470                         for result publication in the study. Otherwise, if automatic
12471                         publication is switched on, default value is used for result name.
12472
12473              Returns:
12474                 a newly created GEOM group of edges.
12475             """
12476             edges = self.SubShapeAll(theShape, self.ShapeType["EDGE"])
12477             edges_in_range = []
12478             for edge in edges:
12479                 Props = self.BasicProperties(edge)
12480                 if min_length <= Props[0] and Props[0] <= max_length:
12481                     if (not include_min) and (min_length == Props[0]):
12482                         skip = 1
12483                     else:
12484                         if (not include_max) and (Props[0] == max_length):
12485                             skip = 1
12486                         else:
12487                             edges_in_range.append(edge)
12488
12489             if len(edges_in_range) <= 0:
12490                 print "No edges found by given criteria"
12491                 return None
12492
12493             # note: auto-publishing is done in self.CreateGroup()
12494             group_edges = self.CreateGroup(theShape, self.ShapeType["EDGE"], theName)
12495             self.UnionList(group_edges, edges_in_range)
12496
12497             return group_edges
12498
12499         ## Create group of edges of selected shape, whose length is in range [min_length, max_length].
12500         #  If include_min/max == 0, edges with length == min/max_length will not be included in result.
12501         #  @param min_length minimum length of edges of selected shape
12502         #  @param max_length maximum length of edges of selected shape
12503         #  @param include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12504         #  @param include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12505         #  @return a newly created GEOM group of edges
12506         #  @ref swig_todo "Example"
12507         def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
12508             """
12509             Create group of edges of selected shape, whose length is in range [min_length, max_length].
12510             If include_min/max == 0, edges with length == min/max_length will not be included in result.
12511
12512             Parameters:
12513                 min_length minimum length of edges of selected shape
12514                 max_length maximum length of edges of selected shape
12515                 include_max indicating if edges with length == max_length should be included in result, 1-yes, 0-no (default=1)
12516                 include_min indicating if edges with length == min_length should be included in result, 1-yes, 0-no (default=1)
12517
12518              Returns:
12519                 a newly created GEOM group of edges.
12520             """
12521             nb_selected = sg.SelectedCount()
12522             if nb_selected < 1:
12523                 print "Select a shape before calling this function, please."
12524                 return 0
12525             if nb_selected > 1:
12526                 print "Only one shape must be selected"
12527                 return 0
12528
12529             id_shape = sg.getSelected(0)
12530             shape = IDToObject( id_shape )
12531
12532             group_edges = self.GetEdgesByLength(shape, min_length, max_length, include_min, include_max)
12533
12534             left_str  = " < "
12535             right_str = " < "
12536             if include_min: left_str  = " <= "
12537             if include_max: right_str  = " <= "
12538
12539             self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
12540                                     + left_str + "length" + right_str + `max_length`)
12541
12542             sg.updateObjBrowser(1)
12543
12544             return group_edges
12545
12546         # end of l3_groups
12547         ## @}
12548
12549         ## @addtogroup l4_advanced
12550         ## @{
12551
12552         ## Create a T-shape object with specified caracteristics for the main
12553         #  and the incident pipes (radius, width, half-length).
12554         #  The extremities of the main pipe are located on junctions points P1 and P2.
12555         #  The extremity of the incident pipe is located on junction point P3.
12556         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12557         #  the main plane of the T-shape is XOY.
12558         #
12559         #  @param theR1 Internal radius of main pipe
12560         #  @param theW1 Width of main pipe
12561         #  @param theL1 Half-length of main pipe
12562         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12563         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12564         #  @param theL2 Half-length of incident pipe
12565         #
12566         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12567         #  @param theP1 1st junction point of main pipe
12568         #  @param theP2 2nd junction point of main pipe
12569         #  @param theP3 Junction point of incident pipe
12570         #
12571         #  @param theRL Internal radius of left thickness reduction
12572         #  @param theWL Width of left thickness reduction
12573         #  @param theLtransL Length of left transition part
12574         #  @param theLthinL Length of left thin part
12575         #
12576         #  @param theRR Internal radius of right thickness reduction
12577         #  @param theWR Width of right thickness reduction
12578         #  @param theLtransR Length of right transition part
12579         #  @param theLthinR Length of right thin part
12580         #
12581         #  @param theRI Internal radius of incident thickness reduction
12582         #  @param theWI Width of incident thickness reduction
12583         #  @param theLtransI Length of incident transition part
12584         #  @param theLthinI Length of incident thin part
12585         #
12586         #  @param theName Object name; when specified, this parameter is used
12587         #         for result publication in the study. Otherwise, if automatic
12588         #         publication is switched on, default value is used for result name.
12589         #
12590         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12591         #
12592         #  @ref tui_creation_pipetshape "Example"
12593         @ManageTransactions("AdvOp")
12594         def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
12595                             theHexMesh=True, theP1=None, theP2=None, theP3=None,
12596                             theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12597                             theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12598                             theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12599                             theName=None):
12600             """
12601             Create a T-shape object with specified caracteristics for the main
12602             and the incident pipes (radius, width, half-length).
12603             The extremities of the main pipe are located on junctions points P1 and P2.
12604             The extremity of the incident pipe is located on junction point P3.
12605             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12606             the main plane of the T-shape is XOY.
12607
12608             Parameters:
12609                 theR1 Internal radius of main pipe
12610                 theW1 Width of main pipe
12611                 theL1 Half-length of main pipe
12612                 theR2 Internal radius of incident pipe (R2 < R1)
12613                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12614                 theL2 Half-length of incident pipe
12615                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12616                 theP1 1st junction point of main pipe
12617                 theP2 2nd junction point of main pipe
12618                 theP3 Junction point of incident pipe
12619
12620                 theRL Internal radius of left thickness reduction
12621                 theWL Width of left thickness reduction
12622                 theLtransL Length of left transition part
12623                 theLthinL Length of left thin part
12624
12625                 theRR Internal radius of right thickness reduction
12626                 theWR Width of right thickness reduction
12627                 theLtransR Length of right transition part
12628                 theLthinR Length of right thin part
12629
12630                 theRI Internal radius of incident thickness reduction
12631                 theWI Width of incident thickness reduction
12632                 theLtransI Length of incident transition part
12633                 theLthinI Length of incident thin part
12634
12635                 theName Object name; when specified, this parameter is used
12636                         for result publication in the study. Otherwise, if automatic
12637                         publication is switched on, default value is used for result name.
12638
12639             Returns:
12640                 List of GEOM_Object, containing the created shape and propagation groups.
12641
12642             Example of usage:
12643                 # create PipeTShape object
12644                 pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
12645                 # create PipeTShape object with position
12646                 pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
12647                 # create PipeTShape object with left thickness reduction
12648                 pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
12649             """
12650             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)
12651             if (theP1 and theP2 and theP3):
12652                 anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12653                                                                 theRL, theWL, theLtransL, theLthinL,
12654                                                                 theRR, theWR, theLtransR, theLthinR,
12655                                                                 theRI, theWI, theLtransI, theLthinI,
12656                                                                 theHexMesh, theP1, theP2, theP3)
12657             else:
12658                 anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
12659                                                     theRL, theWL, theLtransL, theLthinL,
12660                                                     theRR, theWR, theLtransR, theLthinR,
12661                                                     theRI, theWI, theLtransI, theLthinI,
12662                                                     theHexMesh)
12663             RaiseIfFailed("MakePipeTShape", self.AdvOp)
12664             if Parameters: anObj[0].SetParameters(Parameters)
12665             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12666             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12667             return anObj
12668
12669         ## Create a T-shape object with chamfer and with specified caracteristics for the main
12670         #  and the incident pipes (radius, width, half-length). The chamfer is
12671         #  created on the junction of the pipes.
12672         #  The extremities of the main pipe are located on junctions points P1 and P2.
12673         #  The extremity of the incident pipe is located on junction point P3.
12674         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12675         #  the main plane of the T-shape is XOY.
12676         #  @param theR1 Internal radius of main pipe
12677         #  @param theW1 Width of main pipe
12678         #  @param theL1 Half-length of main pipe
12679         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12680         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12681         #  @param theL2 Half-length of incident pipe
12682         #  @param theH Height of the chamfer.
12683         #  @param theW Width of the chamfer.
12684         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12685         #  @param theP1 1st junction point of main pipe
12686         #  @param theP2 2nd junction point of main pipe
12687         #  @param theP3 Junction point of incident pipe
12688         #
12689         #  @param theRL Internal radius of left thickness reduction
12690         #  @param theWL Width of left thickness reduction
12691         #  @param theLtransL Length of left transition part
12692         #  @param theLthinL Length of left thin part
12693         #
12694         #  @param theRR Internal radius of right thickness reduction
12695         #  @param theWR Width of right thickness reduction
12696         #  @param theLtransR Length of right transition part
12697         #  @param theLthinR Length of right thin part
12698         #
12699         #  @param theRI Internal radius of incident thickness reduction
12700         #  @param theWI Width of incident thickness reduction
12701         #  @param theLtransI Length of incident transition part
12702         #  @param theLthinI Length of incident thin part
12703         #
12704         #  @param theName Object name; when specified, this parameter is used
12705         #         for result publication in the study. Otherwise, if automatic
12706         #         publication is switched on, default value is used for result name.
12707         #
12708         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12709         #
12710         #  @ref tui_creation_pipetshape "Example"
12711         @ManageTransactions("AdvOp")
12712         def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
12713                                    theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12714                                    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12715                                    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12716                                    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12717                                    theName=None):
12718             """
12719             Create a T-shape object with chamfer and with specified caracteristics for the main
12720             and the incident pipes (radius, width, half-length). The chamfer is
12721             created on the junction of the pipes.
12722             The extremities of the main pipe are located on junctions points P1 and P2.
12723             The extremity of the incident pipe is located on junction point P3.
12724             If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12725             the main plane of the T-shape is XOY.
12726
12727             Parameters:
12728                 theR1 Internal radius of main pipe
12729                 theW1 Width of main pipe
12730                 theL1 Half-length of main pipe
12731                 theR2 Internal radius of incident pipe (R2 < R1)
12732                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12733                 theL2 Half-length of incident pipe
12734                 theH Height of the chamfer.
12735                 theW Width of the chamfer.
12736                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12737                 theP1 1st junction point of main pipe
12738                 theP2 2nd junction point of main pipe
12739                 theP3 Junction point of incident pipe
12740
12741                 theRL Internal radius of left thickness reduction
12742                 theWL Width of left thickness reduction
12743                 theLtransL Length of left transition part
12744                 theLthinL Length of left thin part
12745
12746                 theRR Internal radius of right thickness reduction
12747                 theWR Width of right thickness reduction
12748                 theLtransR Length of right transition part
12749                 theLthinR Length of right thin part
12750
12751                 theRI Internal radius of incident thickness reduction
12752                 theWI Width of incident thickness reduction
12753                 theLtransI Length of incident transition part
12754                 theLthinI Length of incident thin part
12755
12756                 theName Object name; when specified, this parameter is used
12757                         for result publication in the study. Otherwise, if automatic
12758                         publication is switched on, default value is used for result name.
12759
12760             Returns:
12761                 List of GEOM_Object, containing the created shape and propagation groups.
12762
12763             Example of usage:
12764                 # create PipeTShape with chamfer object
12765                 pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
12766                 # create PipeTShape with chamfer object with position
12767                 pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
12768                 # create PipeTShape with chamfer object with left thickness reduction
12769                 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)
12770             """
12771             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)
12772             if (theP1 and theP2 and theP3):
12773               anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12774                                                                      theRL, theWL, theLtransL, theLthinL,
12775                                                                      theRR, theWR, theLtransR, theLthinR,
12776                                                                      theRI, theWI, theLtransI, theLthinI,
12777                                                                      theH, theW, theHexMesh, theP1, theP2, theP3)
12778             else:
12779               anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
12780                                                          theRL, theWL, theLtransL, theLthinL,
12781                                                          theRR, theWR, theLtransR, theLthinR,
12782                                                          theRI, theWI, theLtransI, theLthinI,
12783                                                          theH, theW, theHexMesh)
12784             RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
12785             if Parameters: anObj[0].SetParameters(Parameters)
12786             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12787             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12788             return anObj
12789
12790         ## Create a T-shape object with fillet and with specified caracteristics for the main
12791         #  and the incident pipes (radius, width, half-length). The fillet is
12792         #  created on the junction of the pipes.
12793         #  The extremities of the main pipe are located on junctions points P1 and P2.
12794         #  The extremity of the incident pipe is located on junction point P3.
12795         #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12796         #  the main plane of the T-shape is XOY.
12797         #  @param theR1 Internal radius of main pipe
12798         #  @param theW1 Width of main pipe
12799         #  @param theL1 Half-length of main pipe
12800         #  @param theR2 Internal radius of incident pipe (R2 < R1)
12801         #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
12802         #  @param theL2 Half-length of incident pipe
12803         #  @param theRF Radius of curvature of fillet.
12804         #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12805         #  @param theP1 1st junction point of main pipe
12806         #  @param theP2 2nd junction point of main pipe
12807         #  @param theP3 Junction point of incident pipe
12808         #
12809         #  @param theRL Internal radius of left thickness reduction
12810         #  @param theWL Width of left thickness reduction
12811         #  @param theLtransL Length of left transition part
12812         #  @param theLthinL Length of left thin part
12813         #
12814         #  @param theRR Internal radius of right thickness reduction
12815         #  @param theWR Width of right thickness reduction
12816         #  @param theLtransR Length of right transition part
12817         #  @param theLthinR Length of right thin part
12818         #
12819         #  @param theRI Internal radius of incident thickness reduction
12820         #  @param theWI Width of incident thickness reduction
12821         #  @param theLtransI Length of incident transition part
12822         #  @param theLthinI Length of incident thin part
12823         #
12824         #  @param theName Object name; when specified, this parameter is used
12825         #         for result publication in the study. Otherwise, if automatic
12826         #         publication is switched on, default value is used for result name.
12827         #
12828         #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
12829         #
12830         #  @ref tui_creation_pipetshape "Example"
12831         @ManageTransactions("AdvOp")
12832         def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
12833                                   theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
12834                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
12835                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
12836                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
12837                                   theName=None):
12838             """
12839             Create a T-shape object with fillet and with specified caracteristics for the main
12840             and the incident pipes (radius, width, half-length). The fillet is
12841             created on the junction of the pipes.
12842             The extremities of the main pipe are located on junctions points P1 and P2.
12843             The extremity of the incident pipe is located on junction point P3.
12844
12845             Parameters:
12846                 If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
12847                 the main plane of the T-shape is XOY.
12848                 theR1 Internal radius of main pipe
12849                 theW1 Width of main pipe
12850                 heL1 Half-length of main pipe
12851                 theR2 Internal radius of incident pipe (R2 < R1)
12852                 theW2 Width of incident pipe (R2+W2 < R1+W1)
12853                 theL2 Half-length of incident pipe
12854                 theRF Radius of curvature of fillet.
12855                 theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
12856                 theP1 1st junction point of main pipe
12857                 theP2 2nd junction point of main pipe
12858                 theP3 Junction point of incident pipe
12859
12860                 theRL Internal radius of left thickness reduction
12861                 theWL Width of left thickness reduction
12862                 theLtransL Length of left transition part
12863                 theLthinL Length of left thin part
12864
12865                 theRR Internal radius of right thickness reduction
12866                 theWR Width of right thickness reduction
12867                 theLtransR Length of right transition part
12868                 theLthinR Length of right thin part
12869
12870                 theRI Internal radius of incident thickness reduction
12871                 theWI Width of incident thickness reduction
12872                 theLtransI Length of incident transition part
12873                 theLthinI Length of incident thin part
12874
12875                 theName Object name; when specified, this parameter is used
12876                         for result publication in the study. Otherwise, if automatic
12877                         publication is switched on, default value is used for result name.
12878
12879             Returns:
12880                 List of GEOM_Object, containing the created shape and propagation groups.
12881
12882             Example of usage:
12883                 # create PipeTShape with fillet object
12884                 pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
12885                 # create PipeTShape with fillet object with position
12886                 pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
12887                 # create PipeTShape with fillet object with left thickness reduction
12888                 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)
12889             """
12890             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)
12891             if (theP1 and theP2 and theP3):
12892               anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
12893                                                                     theRL, theWL, theLtransL, theLthinL,
12894                                                                     theRR, theWR, theLtransR, theLthinR,
12895                                                                     theRI, theWI, theLtransI, theLthinI,
12896                                                                     theRF, theHexMesh, theP1, theP2, theP3)
12897             else:
12898               anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
12899                                                         theRL, theWL, theLtransL, theLthinL,
12900                                                         theRR, theWR, theLtransR, theLthinR,
12901                                                         theRI, theWI, theLtransI, theLthinI,
12902                                                         theRF, theHexMesh)
12903             RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
12904             if Parameters: anObj[0].SetParameters(Parameters)
12905             def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
12906             self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
12907             return anObj
12908
12909         ## This function allows creating a disk already divided into blocks. It
12910         #  can be used to create divided pipes for later meshing in hexaedra.
12911         #  @param theR Radius of the disk
12912         #  @param theOrientation Orientation of the plane on which the disk will be built
12913         #         1 = XOY, 2 = OYZ, 3 = OZX
12914         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12915         #  @param theName Object name; when specified, this parameter is used
12916         #         for result publication in the study. Otherwise, if automatic
12917         #         publication is switched on, default value is used for result name.
12918         #
12919         #  @return New GEOM_Object, containing the created shape.
12920         #
12921         #  @ref tui_creation_divideddisk "Example"
12922         @ManageTransactions("AdvOp")
12923         def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
12924             """
12925             Creates a disk, divided into blocks. It can be used to create divided pipes
12926             for later meshing in hexaedra.
12927
12928             Parameters:
12929                 theR Radius of the disk
12930                 theOrientation Orientation of the plane on which the disk will be built:
12931                                1 = XOY, 2 = OYZ, 3 = OZX
12932                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12933                 theName Object name; when specified, this parameter is used
12934                         for result publication in the study. Otherwise, if automatic
12935                         publication is switched on, default value is used for result name.
12936
12937             Returns:
12938                 New GEOM_Object, containing the created shape.
12939             """
12940             theR, Parameters = ParseParameters(theR)
12941             anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
12942             RaiseIfFailed("MakeDividedDisk", self.AdvOp)
12943             if Parameters: anObj.SetParameters(Parameters)
12944             self._autoPublish(anObj, theName, "dividedDisk")
12945             return anObj
12946
12947         ## This function allows creating a disk already divided into blocks. It
12948         #  can be used to create divided pipes for later meshing in hexaedra.
12949         #  @param theCenter Center of the disk
12950         #  @param theVector Normal vector to the plane of the created disk
12951         #  @param theRadius Radius of the disk
12952         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12953         #  @param theName Object name; when specified, this parameter is used
12954         #         for result publication in the study. Otherwise, if automatic
12955         #         publication is switched on, default value is used for result name.
12956         #
12957         #  @return New GEOM_Object, containing the created shape.
12958         #
12959         #  @ref tui_creation_divideddisk "Example"
12960         @ManageTransactions("AdvOp")
12961         def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
12962             """
12963             Creates a disk already divided into blocks. It can be used to create divided pipes
12964             for later meshing in hexaedra.
12965
12966             Parameters:
12967                 theCenter Center of the disk
12968                 theVector Normal vector to the plane of the created disk
12969                 theRadius Radius of the disk
12970                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12971                 theName Object name; when specified, this parameter is used
12972                         for result publication in the study. Otherwise, if automatic
12973                         publication is switched on, default value is used for result name.
12974
12975             Returns:
12976                 New GEOM_Object, containing the created shape.
12977             """
12978             theRadius, Parameters = ParseParameters(theRadius)
12979             anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
12980             RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
12981             if Parameters: anObj.SetParameters(Parameters)
12982             self._autoPublish(anObj, theName, "dividedDisk")
12983             return anObj
12984
12985         ## Builds a cylinder prepared for hexa meshes
12986         #  @param theR Radius of the cylinder
12987         #  @param theH Height of the cylinder
12988         #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
12989         #  @param theName Object name; when specified, this parameter is used
12990         #         for result publication in the study. Otherwise, if automatic
12991         #         publication is switched on, default value is used for result name.
12992         #
12993         #  @return New GEOM_Object, containing the created shape.
12994         #
12995         #  @ref tui_creation_dividedcylinder "Example"
12996         @ManageTransactions("AdvOp")
12997         def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
12998             """
12999             Builds a cylinder prepared for hexa meshes
13000
13001             Parameters:
13002                 theR Radius of the cylinder
13003                 theH Height of the cylinder
13004                 thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
13005                 theName Object name; when specified, this parameter is used
13006                         for result publication in the study. Otherwise, if automatic
13007                         publication is switched on, default value is used for result name.
13008
13009             Returns:
13010                 New GEOM_Object, containing the created shape.
13011             """
13012             theR, theH, Parameters = ParseParameters(theR, theH)
13013             anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
13014             RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
13015             if Parameters: anObj.SetParameters(Parameters)
13016             self._autoPublish(anObj, theName, "dividedCylinder")
13017             return anObj
13018
13019         ## Create a surface from a cloud of points
13020         #  @param thelPoints list of points. Compounds of points are
13021         #         accepted as well.
13022         #  @param theNbMax maximum number of Bezier pieces in the resulting
13023         #         surface.
13024         #  @param theDegMax maximum degree of the resulting BSpline surface.
13025         #  @param theDMax 3D tolerance of initial approximation.
13026         #  @param theName Object name; when specified, this parameter is used
13027         #         for result publication in the study. Otherwise, if automatic
13028         #         publication is switched on, default value is used for result name.
13029         #  @return New GEOM_Object, containing the created shape.
13030         #  @note 3D tolerance of initial approximation represents a tolerance of
13031         #        initial plate surface approximation. If this parameter is equal
13032         #        to 0 (default value) it is computed. In this case an error of
13033         #        initial plate surface computation is used as the approximation
13034         #        tolerance. This error represents a maximal distance between
13035         #        computed plate surface and given points.
13036         #
13037         #  @ref tui_creation_smoothingsurface "Example"
13038         @ManageTransactions("AdvOp")
13039         def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
13040                                  theDMax=0.0, theName=None):
13041             """
13042             Create a surface from a cloud of points
13043
13044             Parameters:
13045                 thelPoints list of points. Compounds of points are
13046                            accepted as well.
13047                 theNbMax maximum number of Bezier pieces in the resulting
13048                          surface.
13049                 theDegMax maximum degree of the resulting BSpline surface.
13050                 theDMax 3D tolerance of initial approximation.
13051                 theName Object name; when specified, this parameter is used
13052                         for result publication in the study. Otherwise, if automatic
13053                         publication is switched on, default value is used for result name.
13054
13055             Returns:
13056                 New GEOM_Object, containing the created shape.
13057
13058             Note:
13059                 3D tolerance of initial approximation represents a tolerance of
13060                 initial plate surface approximation. If this parameter is equal
13061                 to 0 (default value) it is computed. In this case an error of
13062                 initial plate surface computation is used as the approximation
13063                 tolerance. This error represents a maximal distance between
13064                 computed plate surface and given points.
13065             """
13066             anObj = self.AdvOp.MakeSmoothingSurface(thelPoints, theNbMax,
13067                                                     theDegMax, theDMax)
13068             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
13069             self._autoPublish(anObj, theName, "smoothing")
13070             return anObj
13071
13072         ## Export a shape to XAO format
13073         #  @param shape The shape to export
13074         #  @param groups The list of groups to export
13075         #  @param fields The list of fields to export
13076         #  @param author The author of the export
13077         #  @param fileName The name of the file to export
13078         #  @return boolean
13079         #
13080         #  @ref tui_exportxao "Example"
13081         @ManageTransactions("InsertOp")
13082         def ExportXAO(self, shape, groups, fields, author, fileName):
13083             res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
13084             RaiseIfFailed("ExportXAO", self.InsertOp)
13085             return res
13086
13087         ## Import a shape from XAO format
13088         #  @param shape Shape to export
13089         #  @param fileName The name of the file to import
13090         #  @return tuple (res, shape, subShapes, groups, fields)
13091         #       res Flag indicating if the import was successful
13092         #       shape The imported shape
13093         #       subShapes The list of imported subShapes
13094         #       groups The list of imported groups
13095         #       fields The list of imported fields
13096         #
13097         #  @ref tui_importxao "Example"
13098         @ManageTransactions("InsertOp")
13099         def ImportXAO(self, fileName):
13100             res = self.InsertOp.ImportXAO(fileName)
13101             RaiseIfFailed("ImportXAO", self.InsertOp)
13102             return res
13103
13104         #@@ insert new functions before this line @@ do not remove this line @@#
13105
13106         # end of l4_advanced
13107         ## @}
13108
13109         ## Create a copy of the given object
13110         #
13111         #  @param theOriginal geometry object for copy
13112         #  @param theName Object name; when specified, this parameter is used
13113         #         for result publication in the study. Otherwise, if automatic
13114         #         publication is switched on, default value is used for result name.
13115         #
13116         #  @return New GEOM_Object, containing the copied shape.
13117         #
13118         #  @ingroup l1_geomBuilder_auxiliary
13119         #  @ref swig_MakeCopy "Example"
13120         @ManageTransactions("InsertOp")
13121         def MakeCopy(self, theOriginal, theName=None):
13122             """
13123             Create a copy of the given object
13124
13125             Parameters:
13126                 theOriginal geometry object for copy
13127                 theName Object name; when specified, this parameter is used
13128                         for result publication in the study. Otherwise, if automatic
13129                         publication is switched on, default value is used for result name.
13130
13131             Returns:
13132                 New GEOM_Object, containing the copied shape.
13133
13134             Example of usage: Copy = geompy.MakeCopy(Box)
13135             """
13136             # Example: see GEOM_TestAll.py
13137             anObj = self.InsertOp.MakeCopy(theOriginal)
13138             RaiseIfFailed("MakeCopy", self.InsertOp)
13139             self._autoPublish(anObj, theName, "copy")
13140             return anObj
13141
13142         ## Add Path to load python scripts from
13143         #  @param Path a path to load python scripts from
13144         #  @ingroup l1_geomBuilder_auxiliary
13145         def addPath(self,Path):
13146             """
13147             Add Path to load python scripts from
13148
13149             Parameters:
13150                 Path a path to load python scripts from
13151             """
13152             if (sys.path.count(Path) < 1):
13153                 sys.path.append(Path)
13154                 pass
13155             pass
13156
13157         ## Load marker texture from the file
13158         #  @param Path a path to the texture file
13159         #  @return unique texture identifier
13160         #  @ingroup l1_geomBuilder_auxiliary
13161         @ManageTransactions("InsertOp")
13162         def LoadTexture(self, Path):
13163             """
13164             Load marker texture from the file
13165
13166             Parameters:
13167                 Path a path to the texture file
13168
13169             Returns:
13170                 unique texture identifier
13171             """
13172             # Example: see GEOM_TestAll.py
13173             ID = self.InsertOp.LoadTexture(Path)
13174             RaiseIfFailed("LoadTexture", self.InsertOp)
13175             return ID
13176
13177         ## Get internal name of the object based on its study entry
13178         #  @note This method does not provide an unique identifier of the geometry object.
13179         #  @note This is internal function of GEOM component, though it can be used outside it for
13180         #  appropriate reason (e.g. for identification of geometry object).
13181         #  @param obj geometry object
13182         #  @return unique object identifier
13183         #  @ingroup l1_geomBuilder_auxiliary
13184         def getObjectID(self, obj):
13185             """
13186             Get internal name of the object based on its study entry.
13187             Note: this method does not provide an unique identifier of the geometry object.
13188             It is an internal function of GEOM component, though it can be used outside GEOM for
13189             appropriate reason (e.g. for identification of geometry object).
13190
13191             Parameters:
13192                 obj geometry object
13193
13194             Returns:
13195                 unique object identifier
13196             """
13197             ID = ""
13198             entry = salome.ObjectToID(obj)
13199             if entry is not None:
13200                 lst = entry.split(":")
13201                 if len(lst) > 0:
13202                     ID = lst[-1] # -1 means last item in the list
13203                     return "GEOM_" + ID
13204             return ID
13205
13206
13207
13208         ## Add marker texture. @a Width and @a Height parameters
13209         #  specify width and height of the texture in pixels.
13210         #  If @a RowData is @c True, @a Texture parameter should represent texture data
13211         #  packed into the byte array. If @a RowData is @c False (default), @a Texture
13212         #  parameter should be unpacked string, in which '1' symbols represent opaque
13213         #  pixels and '0' represent transparent pixels of the texture bitmap.
13214         #
13215         #  @param Width texture width in pixels
13216         #  @param Height texture height in pixels
13217         #  @param Texture texture data
13218         #  @param RowData if @c True, @a Texture data are packed in the byte stream
13219         #  @return unique texture identifier
13220         #  @ingroup l1_geomBuilder_auxiliary
13221         @ManageTransactions("InsertOp")
13222         def AddTexture(self, Width, Height, Texture, RowData=False):
13223             """
13224             Add marker texture. Width and Height parameters
13225             specify width and height of the texture in pixels.
13226             If RowData is True, Texture parameter should represent texture data
13227             packed into the byte array. If RowData is False (default), Texture
13228             parameter should be unpacked string, in which '1' symbols represent opaque
13229             pixels and '0' represent transparent pixels of the texture bitmap.
13230
13231             Parameters:
13232                 Width texture width in pixels
13233                 Height texture height in pixels
13234                 Texture texture data
13235                 RowData if True, Texture data are packed in the byte stream
13236
13237             Returns:
13238                 return unique texture identifier
13239             """
13240             if not RowData: Texture = PackData(Texture)
13241             ID = self.InsertOp.AddTexture(Width, Height, Texture)
13242             RaiseIfFailed("AddTexture", self.InsertOp)
13243             return ID
13244
13245         ## Creates a new folder object. It is a container for any GEOM objects.
13246         #  @param Name name of the container
13247         #  @param Father parent object. If None,
13248         #         folder under 'Geometry' root object will be created.
13249         #  @return a new created folder
13250         #  @ingroup l1_publish_data
13251         def NewFolder(self, Name, Father=None):
13252             """
13253             Create a new folder object. It is an auxiliary container for any GEOM objects.
13254
13255             Parameters:
13256                 Name name of the container
13257                 Father parent object. If None,
13258                 folder under 'Geometry' root object will be created.
13259
13260             Returns:
13261                 a new created folder
13262             """
13263             if not Father: Father = self.father
13264             return self.CreateFolder(Name, Father)
13265
13266         ## Move object to the specified folder
13267         #  @param Object object to move
13268         #  @param Folder target folder
13269         #  @ingroup l1_publish_data
13270         def PutToFolder(self, Object, Folder):
13271             """
13272             Move object to the specified folder
13273
13274             Parameters:
13275                 Object object to move
13276                 Folder target folder
13277             """
13278             self.MoveToFolder(Object, Folder)
13279             pass
13280
13281         ## Move list of objects to the specified folder
13282         #  @param ListOfSO list of objects to move
13283         #  @param Folder target folder
13284         #  @ingroup l1_publish_data
13285         def PutListToFolder(self, ListOfSO, Folder):
13286             """
13287             Move list of objects to the specified folder
13288
13289             Parameters:
13290                 ListOfSO list of objects to move
13291                 Folder target folder
13292             """
13293             self.MoveListToFolder(ListOfSO, Folder)
13294             pass
13295
13296         ## @addtogroup l2_field
13297         ## @{
13298
13299         ## Creates a field
13300         #  @param shape the shape the field lies on
13301         #  @param name the field name
13302         #  @param type type of field data: 0 - bool, 1 - int, 2 - double, 3 - string
13303         #  @param dimension dimension of the shape the field lies on
13304         #         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13305         #  @param componentNames names of components
13306         #  @return a created field
13307         @ManageTransactions("FieldOp")
13308         def CreateField(self, shape, name, type, dimension, componentNames):
13309             """
13310             Creates a field
13311
13312             Parameters:
13313                 shape the shape the field lies on
13314                 name  the field name
13315                 type  type of field data
13316                 dimension dimension of the shape the field lies on
13317                           0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13318                 componentNames names of components
13319
13320             Returns:
13321                 a created field
13322             """
13323             if isinstance( type, int ):
13324                 if type < 0 or type > 3:
13325                     raise RuntimeError, "CreateField : Error: data type must be within [0-3] range"
13326                 type = [GEOM.FDT_Bool,GEOM.FDT_Int,GEOM.FDT_Double,GEOM.FDT_String][type]
13327
13328             f = self.FieldOp.CreateField( shape, name, type, dimension, componentNames)
13329             RaiseIfFailed("CreateField", self.FieldOp)
13330             global geom
13331             geom._autoPublish( f, "", name)
13332             return f
13333
13334         ## Removes a field from the GEOM component
13335         #  @param field the field to remove
13336         def RemoveField(self, field):
13337             "Removes a field from the GEOM component"
13338             global geom
13339             if isinstance( field, GEOM._objref_GEOM_Field ):
13340                 geom.RemoveObject( field )
13341             elif isinstance( field, geomField ):
13342                 geom.RemoveObject( field.field )
13343             else:
13344                 raise RuntimeError, "RemoveField() : the object is not a field"
13345             return
13346
13347         ## Returns number of fields on a shape
13348         @ManageTransactions("FieldOp")
13349         def CountFields(self, shape):
13350             "Returns number of fields on a shape"
13351             nb = self.FieldOp.CountFields( shape )
13352             RaiseIfFailed("CountFields", self.FieldOp)
13353             return nb
13354
13355         ## Returns all fields on a shape
13356         @ManageTransactions("FieldOp")
13357         def GetFields(self, shape):
13358             "Returns all fields on a shape"
13359             ff = self.FieldOp.GetFields( shape )
13360             RaiseIfFailed("GetFields", self.FieldOp)
13361             return ff
13362
13363         ## Returns a field on a shape by its name
13364         @ManageTransactions("FieldOp")
13365         def GetField(self, shape, name):
13366             "Returns a field on a shape by its name"
13367             f = self.FieldOp.GetField( shape, name )
13368             RaiseIfFailed("GetField", self.FieldOp)
13369             return f
13370
13371         # end of l2_field
13372         ## @}
13373
13374
13375 import omniORB
13376 # Register the new proxy for GEOM_Gen
13377 omniORB.registerObjref(GEOM._objref_GEOM_Gen._NP_RepositoryId, geomBuilder)
13378
13379
13380 ## Field on Geometry
13381 #  @ingroup l2_field
13382 class geomField( GEOM._objref_GEOM_Field ):
13383
13384     def __init__(self):
13385         GEOM._objref_GEOM_Field.__init__(self)
13386         self.field = GEOM._objref_GEOM_Field
13387         return
13388
13389     ## Returns the shape the field lies on
13390     def getShape(self):
13391         "Returns the shape the field lies on"
13392         return self.field.GetShape(self)
13393
13394     ## Returns the field name
13395     def getName(self):
13396         "Returns the field name"
13397         return self.field.GetName(self)
13398
13399     ## Returns type of field data as integer [0-3]
13400     def getType(self):
13401         "Returns type of field data"
13402         return self.field.GetDataType(self)._v
13403
13404     ## Returns type of field data:
13405     #  one of GEOM.FDT_Bool, GEOM.FDT_Int, GEOM.FDT_Double, GEOM.FDT_String
13406     def getTypeEnum(self):
13407         "Returns type of field data"
13408         return self.field.GetDataType(self)
13409
13410     ## Returns dimension of the shape the field lies on:
13411     #  0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape
13412     def getDimension(self):
13413         """Returns dimension of the shape the field lies on:
13414         0 - VERTEX, 1 - EDGE, 2 - FACE, 3 - SOLID, -1 - whole shape"""
13415         return self.field.GetDimension(self)
13416
13417     ## Returns names of components
13418     def getComponents(self):
13419         "Returns names of components"
13420         return self.field.GetComponents(self)
13421
13422     ## Adds a time step to the field
13423     #  @param step the time step number further used as the step identifier
13424     #  @param stamp the time step time
13425     #  @param values the values of the time step
13426     def addStep(self, step, stamp, values):
13427         "Adds a time step to the field"
13428         stp = self.field.AddStep( self, step, stamp )
13429         if not stp:
13430             raise RuntimeError, \
13431                   "Field.addStep() : Error: step %s already exists in this field"%step
13432         global geom
13433         geom._autoPublish( stp, "", "Step %s, %s"%(step,stamp))
13434         self.setValues( step, values )
13435         return stp
13436
13437     ## Remove a time step from the field
13438     def removeStep(self,step):
13439         "Remove a time step from the field"
13440         stepSO = None
13441         try:
13442             stepObj = self.field.GetStep( self, step )
13443             if stepObj:
13444                 stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
13445         except:
13446             #import traceback
13447             #traceback.print_exc()
13448             pass
13449         self.field.RemoveStep( self, step )
13450         if stepSO:
13451             geom.myBuilder.RemoveObjectWithChildren( stepSO )
13452         return
13453
13454     ## Returns number of time steps in the field
13455     def countSteps(self):
13456         "Returns number of time steps in the field"
13457         return self.field.CountSteps(self)
13458
13459     ## Returns a list of time step IDs in the field
13460     def getSteps(self):
13461         "Returns a list of time step IDs in the field"
13462         return self.field.GetSteps(self)
13463
13464     ## Returns a time step by its ID
13465     def getStep(self,step):
13466         "Returns a time step by its ID"
13467         stp = self.field.GetStep(self, step)
13468         if not stp:
13469             raise RuntimeError, "Step %s is missing from this field"%step
13470         return stp
13471
13472     ## Returns the time of the field step
13473     def getStamp(self,step):
13474         "Returns the time of the field step"
13475         return self.getStep(step).GetStamp()
13476
13477     ## Changes the time of the field step
13478     def setStamp(self, step, stamp):
13479         "Changes the time of the field step"
13480         return self.getStep(step).SetStamp(stamp)
13481
13482     ## Returns values of the field step
13483     def getValues(self, step):
13484         "Returns values of the field step"
13485         return self.getStep(step).GetValues()
13486
13487     ## Changes values of the field step
13488     def setValues(self, step, values):
13489         "Changes values of the field step"
13490         stp = self.getStep(step)
13491         errBeg = "Field.setValues(values) : Error: "
13492         try:
13493             ok = stp.SetValues( values )
13494         except Exception, e:
13495             excStr = str(e)
13496             if excStr.find("WrongPythonType") > 0:
13497                 raise RuntimeError, errBeg +\
13498                       "wrong type of values, %s values are expected"%str(self.getTypeEnum())[4:]
13499             raise RuntimeError, errBeg + str(e)
13500         if not ok:
13501             nbOK = self.field.GetArraySize(self)
13502             nbKO = len(values)
13503             if nbOK != nbKO:
13504                 raise RuntimeError, errBeg + "len(values) must be %s but not %s"%(nbOK,nbKO)
13505             else:
13506                 raise RuntimeError, errBeg + "failed"
13507         return
13508
13509     pass # end of class geomField
13510
13511 # Register the new proxy for GEOM_Field
13512 omniORB.registerObjref(GEOM._objref_GEOM_Field._NP_RepositoryId, geomField)
13513
13514
13515 ## Create a new geomBuilder instance.The geomBuilder class provides the Python
13516 #  interface to GEOM operations.
13517 #
13518 #  Typical use is:
13519 #  \code
13520 #    import salome
13521 #    salome.salome_init()
13522 #    from salome.geom import geomBuilder
13523 #    geompy = geomBuilder.New(salome.myStudy)
13524 #  \endcode
13525 #  @param  study     SALOME study, generally obtained by salome.myStudy.
13526 #  @param  instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13527 #  @return geomBuilder instance
13528 def New( study, instance=None):
13529     """
13530     Create a new geomBuilder instance.The geomBuilder class provides the Python
13531     interface to GEOM operations.
13532
13533     Typical use is:
13534         import salome
13535         salome.salome_init()
13536         from salome.geom import geomBuilder
13537         geompy = geomBuilder.New(salome.myStudy)
13538
13539     Parameters:
13540         study     SALOME study, generally obtained by salome.myStudy.
13541         instance  CORBA proxy of GEOM Engine. If None, the default Engine is used.
13542     Returns:
13543         geomBuilder instance
13544     """
13545     #print "New geomBuilder ", study, instance
13546     global engine
13547     global geom
13548     global doLcc
13549     engine = instance
13550     if engine is None:
13551       doLcc = True
13552     geom = geomBuilder()
13553     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
13554     geom.init_geom(study)
13555     return geom