Salome HOME
Merge from V5_1_main branch 24/11/2010
[modules/geom.git] / doc / salome / gui / GEOM / input / partition.doc
1 /*!
2
3 \page partition_page Partition
4
5 To produce a \b Partition in the <b>Main Menu</b> select <b>Operations - > Partition</b>
6
7 This operation builds a compound by intersection of several shapes
8 with a set of tool objects or with a plane.
9 The \b Result will be a \b GEOM_Object.
10
11 <br><h2>Intersection of two shapes.</h2>
12
13 \image html partition1.png
14
15 <b>Arguments:</b> Name + 2 lists of shapes (the shapes from the
16 first list will be intersected with the shapes from the second list) +
17 Resulting Type of shape.
18
19 As far as the intersection of two objects can produce any type of
20 geometrical objects, <b>Resulting type</b> box allows choosing the
21 preferrable result, i.e. a solid, a shell, a list of faces, etc.
22
23 The <b>Resulting type</b> has to be equal or lower than the type of the
24 \em Objects. In other words, if the \em Objects don't contain any
25 shape of this type, Partition fails.
26
27 <b>Keep shapes of lower type</b> checkbox manages standalone shapes of
28 type other than the \em Limit. If it is checked, lower dimension
29 objects will be preserved, else they will be lost.
30
31 For example, you partition a box (Solid) and a face (Face)
32 without any tool (the box is split in two parts by the shape). If you
33 choose the Resulting Type "Solid", you will
34 obtain a compound of two solids, but if you also check <b>Keep shapes of lower
35 type</b> checkbox, you will obtain a compound of two solids and one
36 face (there will be a hole in the resulting face, where the original
37 face intersects with the box, see the corresponding \ref partition_picture_3 "picture" below).
38
39 <b>No sub-shapes intersection (Compounds only)</b> check box affects
40 only input shapes of the Compound type. If this option is switched off (default
41 behavior) each input compound will be automatically exploded into
42 sub-shapes and the intersection between these shapes will be also
43 computed. If this option is switched on, the intersection between
44 sub-shapes will not be performed. In this case the Partition algorithm
45 will work faster, but the result might differ from the default behavior.
46
47  <b>Advanced option:</b>
48    \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments".
49
50 \note Partition is a complex operation, so its result of it depends
51       on the quality of the initial shapes. Sometimes, if partition fails,
52       such healing operations as <b>Shape Processing</b>
53       and <b>Limit Tolerance</b> can help to attune source shapes to obtain correct result of the Partition.
54       See also \ref tui_limit_tolerance "TUI example" of shape healing.
55
56 <b>TUI Command (with sub-shapes intersection):</b>
57
58 <em>geompy.MakePartition(ListOfShapes, ListOfTools, ListOfKeepInside,
59 ListOfRemoveInside, Limit, RemoveWebs, ListOfMaterials,
60 KeepNonlimitShapes)</em>
61
62 <b>TUI Command (without sub-shapes intersection):</b>
63
64 <em>geompy.MakePartitionNonSelfIntersectedShape(ListOfShapes,
65 ListOfTools, ListOfKeepInside, ListOfRemoveInside, Limit, RemoveWebs,
66 ListOfMaterials, KeepNonlimitShapes)</em>
67
68 Here,
69 - \em ListOfShapes is a list of shapes to be intersected
70 - \em ListOfTools is a list of shapes to intersect the shapes from
71 \em ListOfShapes
72 - \em Limit is a Type of resulting shapes
73 - \em KeepNonlimitShapes is a flag that allows to preserve standalone
74 shapes of low dimension (than \em Limit) in the result.
75 - Other parameters are obsolete and kept only for compatibility with
76 previous versions of SALOME.
77
78 <br><h2>Intersection of a Shape and a Plane.</h2>
79
80 \image html partition2.png
81
82 <b>Arguments:</b> Name + 1 shape to be intersected + 1 cutting plane.
83
84 <b>Advanced option:</b>
85 \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments".
86
87 <b>TUI Command:</b>
88
89 <em>geompy.MakeHalfPartition(Shape, Plane)</em>, where:
90 - \em Shape is a source shape to be intersected by the \em Plane
91 - \em Plane is a tool shape, to intersect the \em Shape.
92
93 <b>Examples:</b>
94
95 \image html partitionsn1.png "Box intersected by a plane"
96
97 \image html partitionsn2.png "Result of intersection"
98
99 \anchor partition_picture_3
100 \image html partitionsn3.png "Result of intersection of a box and a plane (both as \em Objects, no tools) with the Resulting type \em Solid and checked 'Keep shapes of lower type'"
101
102 Our <b>TUI Scripts</b> provide you with useful examples of \ref tui_partition "Basic Operations".
103
104 */