Salome HOME
13b09a7912aa6a370049fbf19fa64726015b909d
[modules/geom.git] / doc / salome / gui / GEOM / input / partition.doc
1 /*!
2
3 \page partition_page Partition
4
5 <ul>
6 <li>For a detailed description of the Partition operation please refer to
7 <a href="SALOME_BOA_PA.pdf">this document</a>. 
8 It provides a general review of the Partition and Boolean
9 operations algorithms, describes the usage methodology and highlights
10 major limitations of these operations.</li>
11   
12 <li>Perhaps you also ask yourself : \ref partition_explanation "What's the difference between partition, compounds and fuse operation ?"</li>
13 </ul>
14
15 To produce a \b Partition in the <b>Main Menu</b> select <b>Operations - > Partition</b>
16
17 This operation builds a compound by intersection of several shapes
18 with a set of tool objects or with a plane.
19 The \b Result will be a \b GEOM_Object.
20
21 <br><h2>Intersection of two shapes.</h2>
22
23 \image html partition1.png
24
25 <b>Arguments:</b> Name + 2 lists of shapes (the shapes from the
26 first list will be intersected with the shapes from the second list) +
27 Resulting Type of shape.
28
29 As far as the intersection of two objects can produce any type of
30 geometrical objects, <b>Resulting type</b> box allows choosing the
31 preferrable result, i.e. a solid, a shell, a list of faces, etc.
32
33 The <b>Resulting type</b> has to be equal or lower than the type of the
34 \em Objects. In other words, if the \em Objects don't contain any
35 shape of this type, Partition fails.
36
37 <b>Keep shapes of lower type</b> checkbox manages standalone shapes of
38 type other than the \em Limit. If it is checked, lower dimension
39 objects will be preserved, else they will be lost.
40
41 For example, you partition a box (Solid) and a face (Face)
42 without any tool (the box is split in two parts by the shape). If you
43 choose the Resulting Type "Solid", you will
44 obtain a compound of two solids, but if you also check <b>Keep shapes of lower
45 type</b> checkbox, you will obtain a compound of two solids and one
46 face (there will be a hole in the resulting face, where the original
47 face intersects with the box, see the corresponding \ref partition_picture_3 "picture" below).
48
49 <b>No sub-shapes intersection (Compounds only)</b> check box affects
50 only input shapes of the Compound type. If this option is switched off (default
51 behavior) each input compound will be automatically exploded into
52 sub-shapes and the intersection between these shapes will be also
53 computed. If this option is switched on, the intersection between
54 sub-shapes will not be performed. In this case the Partition algorithm
55 will work faster, but the result might differ from the default behavior.
56
57 <b>Detect Self-intersections</b> check box is used to check arguments
58 self-intersections. If this option is switched on (default behavior)
59 each input shape is checked for self-intersection. In case of its detection
60 the operation is aborted. If this option is switched off, the partition
61 algorithm is performed without self-intersection checks.
62
63 \note This algorithm doesn't find all types of self-intersections. It is tuned
64       to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face
65       intersections. Face/face intersections detection is switched off as it
66       is a time-consuming operation that gives an impact on performance. To find
67       all self-intersections please use \ref check_self_intersections_page
68       "Detect Self-intersection tool".
69
70  <b>Advanced option:</b>
71    \ref restore_presentation_parameters_page "Set presentation parameters and sub-shapes from arguments".
72
73 \note Partition is a complex operation, so its result of it depends
74       on the quality of the initial shapes. Sometimes, if partition fails,
75       such healing operations as <b>Shape Processing</b>
76       and <b>Limit Tolerance</b> can help to attune source shapes to obtain correct result of the Partition.
77       See also \ref tui_limit_tolerance "TUI example" of shape healing.
78
79 <b>TUI Command (with sub-shapes intersection):</b>
80
81 <em>geompy.MakePartition(ListOfShapes, ListOfTools, ListOfKeepInside,
82 ListOfRemoveInside, Limit, RemoveWebs, ListOfMaterials,
83 KeepNonlimitShapes, checkSelfInte)</em>
84
85 <b>TUI Command (without sub-shapes intersection):</b>
86
87 <em>geompy.MakePartitionNonSelfIntersectedShape(ListOfShapes,
88 ListOfTools, ListOfKeepInside, ListOfRemoveInside, Limit, RemoveWebs,
89 ListOfMaterials, KeepNonlimitShapes, checkSelfInte)</em>
90
91 Here,
92 - \em ListOfShapes is a list of shapes to be intersected
93 - \em ListOfTools is a list of shapes to intersect the shapes from
94 \em ListOfShapes
95 - \em Limit is a Type of resulting shapes
96 - \em KeepNonlimitShapes is a flag that allows to preserve standalone
97 shapes of low dimension (than \em Limit) in the result.
98 - \em checkSelfInte is a flag that tells if the arguments should
99 be checked for self-intersection prior to the operation.
100 - Other parameters are obsolete and kept only for compatibility with
101 previous versions of SALOME.
102
103 <br><h2>Intersection of a Shape and a Plane.</h2>
104
105 \image html partition2.png
106
107 <b>Arguments:</b> Name + 1 shape to be intersected + 1 cutting plane.
108
109 <b>Advanced option:</b>
110 \ref restore_presentation_parameters_page "Set presentation parameters and sub-shapes from arguments".
111
112 <b>TUI Command:</b>
113
114 <em>geompy.MakeHalfPartition(Shape, Plane, checkSelfInte)</em>, where:
115 - \em Shape is a source shape to be intersected by the \em Plane
116 - \em Plane is a tool shape, to intersect the \em Shape.
117 - \em checkSelfInte is a flag that tells if the arguments should
118 be checked for self-intersection prior to the operation.
119
120 <b>Examples:</b>
121
122 \image html partitionsn1.png "Box intersected by a plane"
123
124 \image html partitionsn2.png "Result of intersection"
125
126 \anchor partition_picture_3
127 \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'"
128
129 Our <b>TUI Scripts</b> provide you with useful examples of \ref tui_partition "Basic Operations".
130
131 */