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