Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / doc / salome / gui / GEOM / input / tui_check_compound_of_blocks.doc
1 /*!
2
3 \page tui_check_compound_of_blocks_page Check Compound of Blocks
4
5 \code
6 import geompy
7 import salome
8 gg = salome.ImportComponentGUI("GEOM")
9
10 # create boxes
11 box1 = geompy.MakeBox(0,0,0,100,50,100)
12 box2 = geompy.MakeBox(100,0,0,250,50,100)
13
14 # make a compound
15 compound = geompy.MakeCompound([box1, box2])
16
17 # glue the faces of the compound
18 tolerance = 1e-5
19 glue = geompy.MakeGlueFaces(compound, tolerance)
20 IsValid = geompy.CheckCompoundOfBlocks(glue)
21 if IsValid == 0:
22     raise RuntimeError, "Invalid compound created"
23 else:
24     print "\nCompound is valid"
25 \endcode
26
27 */