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