2008-03-07 12:45:34 +05:00
/*!
\page partition_page Partition
2013-12-18 20:23:59 +06:00
For a detailed description of the Partition operation please refer to <a href="SALOME_BOA_PA.pdf">this document</a>.
It provides a general review of the Partition and Boolean operations algorithms, describes the usage methodology and highlights
major limitations of these operations.
2015-03-02 20:42:11 +05:00
Perhaps you also ask yourself : \ref partition_explanation "What's the difference between partition, compounds and fuse operation?"
2008-03-07 12:45:34 +05:00
2015-03-02 20:42:11 +05:00
To produce a \b Partition in the <b>Main Menu</b> select <b>Operations -> Partition</b>
2012-08-09 13:58:02 +06:00
2015-04-03 19:01:27 +05:00
This operation builds a compound by partitioning a set of input objects by a set of tool objects.
2008-03-07 12:45:34 +05:00
2015-04-03 19:01:27 +05:00
The \b Result of the operation is a \b GEOM_Object.
2008-03-07 12:45:34 +05:00
2012-08-09 13:58:02 +06:00
\image html partition1.png
<b>Arguments:</b> Name + 2 lists of shapes (the shapes from the
first list will be intersected with the shapes from the second list) +
Resulting Type of shape.
2015-04-03 19:01:27 +05:00
As far as the partition of two objects can produce any type of
2009-02-13 17:16:39 +05:00
geometrical objects, <b>Resulting type</b> box allows choosing the
2013-12-18 20:23:59 +06:00
preferable result, i.e. a solid, a shell, a list of faces, etc.
2008-03-07 12:45:34 +05:00
2012-08-09 13:58:02 +06:00
The <b>Resulting type</b> has to be equal or lower than the type of the
\em Objects. In other words, if the \em Objects don't contain any
shape of this type, Partition fails.
2008-03-07 12:45:34 +05:00
2012-08-09 13:58:02 +06:00
<b>Keep shapes of lower type</b> checkbox manages standalone shapes of
type other than the \em Limit. If it is checked, lower dimension
objects will be preserved, else they will be lost.
2008-03-07 12:45:34 +05:00
2012-08-09 13:58:02 +06:00
For example, you partition a box (Solid) and a face (Face)
without any tool (the box is split in two parts by the shape). If you
choose the Resulting Type "Solid", you will
obtain a compound of two solids, but if you also check <b>Keep shapes of lower
type</b> checkbox, you will obtain a compound of two solids and one
face (there will be a hole in the resulting face, where the original
face intersects with the box, see the corresponding \ref partition_picture_3 "picture" below).
2008-03-07 12:45:34 +05:00
2012-08-09 13:58:02 +06:00
<b>No sub-shapes intersection (Compounds only)</b> check box affects
2013-12-18 20:23:59 +06:00
only input shapes of the Compound type.
- If this option is switched off (default behavior) each input compound will be automatically
2015-04-03 19:01:27 +05:00
exploded into sub-shapes and the partition between these shapes will be also computed.
- If this option is switched on, the partition between sub-shapes will not be performed.
2013-12-18 20:23:59 +06:00
In this case the Partition algorithm will work faster, but the result might differ from the
default behavior.
<b>Detect Self-intersections</b> check box is used to check self-intersection of arguments.
2014-02-26 15:13:55 +06:00
It is enabled only if <b>No sub-shapes intersection (Compounds only)</b> is checked.
- If this option is switched off (by default), the partition algorithm is
performed without self-intersection checks.
- If this option is switched on, each input shape is checked for self-intersection.
2013-12-18 20:23:59 +06:00
If self-intersection is detected, the operation is aborted.
\note This algorithm does not find all types of self-intersections. It is tuned
2013-11-27 14:27:46 +06:00
to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face
2015-04-03 19:01:27 +05:00
interferences. Face/face interference detection is switched off as it
2013-11-27 14:27:46 +06:00
is a time-consuming operation that gives an impact on performance. To find
all self-intersections please use \ref check_self_intersections_page
"Detect Self-intersection tool".
2024-03-09 03:36:58 +05:00
<b>Use Fuzzy Parameter</b> check box is used to enable the usage of the fuzzy tolerance
inside the partition algorithm. The fuzzy tolerance itself can be given in the Fuzzy
Parameter input box.
2013-12-18 20:23:59 +06:00
- Activate \ref restore_presentation_parameters_page "Advanced options" if required.
2012-08-09 13:58:02 +06:00
\note Partition is a complex operation, so its result of it depends
on the quality of the initial shapes. Sometimes, if partition fails,
such healing operations as <b>Shape Processing</b>
and <b>Limit Tolerance</b> can help to attune source shapes to obtain correct result of the Partition.
See also \ref tui_limit_tolerance "TUI example" of shape healing.
2008-03-07 12:45:34 +05:00
2012-08-09 13:58:02 +06:00
<b>TUI Command (with sub-shapes intersection):</b>
<em>geompy.MakePartition(ListOfShapes, ListOfTools, ListOfKeepInside,
ListOfRemoveInside, Limit, RemoveWebs, ListOfMaterials,
2024-03-09 03:36:58 +05:00
KeepNonlimitShapes, fuzzyParam)</em>
2012-08-09 13:58:02 +06:00
<b>TUI Command (without sub-shapes intersection):</b>
<em>geompy.MakePartitionNonSelfIntersectedShape(ListOfShapes,
ListOfTools, ListOfKeepInside, ListOfRemoveInside, Limit, RemoveWebs,
2024-03-09 03:36:58 +05:00
ListOfMaterials, KeepNonlimitShapes, checkSelfInte, fuzzyParam)</em>
2012-08-09 13:58:02 +06:00
Here,
- \em ListOfShapes is a list of shapes to be intersected
- \em ListOfTools is a list of shapes to intersect the shapes from
\em ListOfShapes
- \em Limit is a Type of resulting shapes
- \em KeepNonlimitShapes is a flag that allows to preserve standalone
shapes of low dimension (than \em Limit) in the result.
2013-12-18 20:23:59 +06:00
- \em checkSelfInte is a flag that indicates if the arguments should
2013-11-26 13:06:56 +06:00
be checked for self-intersection prior to the operation.
2024-03-09 03:36:58 +05:00
- \em fuzzyParam is the used fuzzy tolerance inside the partition algorithm.
This tolerance is ignored, if this parameter is omitted or not positive.
2012-08-09 13:58:02 +06:00
- Other parameters are obsolete and kept only for compatibility with
previous versions of SALOME.
<b>Examples:</b>
2008-03-07 12:45:34 +05:00
2015-04-03 19:01:27 +05:00
\anchor partition_picture_1
\image html partitionsn1.png "Input data: box intersected by plane"
2008-03-07 12:45:34 +05:00
2015-04-03 19:01:27 +05:00
\anchor partition_picture_2
\image html partitionsn2.png "Result: box partitioned by plane"
2008-03-07 12:45:34 +05:00
2012-08-09 13:58:02 +06:00
\anchor partition_picture_3
2015-04-03 19:01:27 +05:00
\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"
2012-08-09 13:58:02 +06:00
Our <b>TUI Scripts</b> provide you with useful examples of \ref tui_partition "Basic Operations".
2008-03-07 12:45:34 +05:00
2009-02-13 17:16:39 +05:00
*/