Salome HOME
[bos #29336] problem in inertia calculus
[modules/geom.git] / doc / salome / gui / GEOM / input / creating_explode.doc
1 /*!
2
3 \page create_explode_page Explode
4
5 To \b Explode an object into sub-shapes, in the <b>Main Menu</b>
6 select <b>New Entity > Explode</b>. This operation opens the
7 <b>Sub Shapes Selection</b> dialog box.
8
9 \image html neo-obj1.png
10
11 To create a list of sub-shapes (vertices, edges, wires etc.) of the
12 given shape using the \b Explode operation, you need to define the <b>Main
13 Object</b>, which will be exploded and the <b>Type of Sub-shapes</b> you wish to
14 obtain from it.
15
16 The \b Result of the operation will be a List of \b GEOM_Objects
17 (vertexes, edges, wires, faces, shells or solids).
18
19 The choices available in the <b>Sub Shapes Type</b> combo box depend on the type
20 of selected <b>Main Object</b>:
21 - \b Compound: to extract compounds;
22 - \b Compsolid: to extract compsolids;
23 - \b Solid: to extract solids;
24 - \b Shell: to extract shells;
25 - \b Face: to extract faces;
26 - \b Wire: to extract wires;
27 - \b Edge: to extract edges;
28 - \b Vertex: to extract vertices;
29 - \b Shape: to extract top-level contents of the compound shape;
30 - \b Flat: to extract "flat" contents of the compound shape.
31
32 Note: "flat" contents means that top-level simple-type sub-shapes are extracted from
33 the compound object recursively (i.e. there are no compounds in the result).
34
35 Let us take, for example, compound C1 that contains solid S1 and another compound C2 that
36 contains solids S2 and S3 (see the picture below):
37 - Explode operation with \b Shape type given as parameter will return S1 and C2;
38 - Explode operation with \b Flat type given as parameter will return S1, S2 and S3.
39
40 \image html flat_contents.png
41
42 Switching on <b>Select Sub-shapes</b> check box allows manual selection of sub-shapes
43 to be extracted from the main object. In this mode it is possible to select sub-shapes
44 directly in 3D viewer.
45
46 When <b>Select Sub-shapes</b> check box is switched on, additional \b Filter controls
47 allow to automatically pick up entities, which satisfy the specified threshold value(s).
48 The numerical functor for each sub-shape that is compared with the threshold value(s)
49 is computed according to the topological properties of the shape:
50 - length for edges and wires;
51 - area for faces and shells;
52 - volume for solids, compounds and compsolids. 
53
54 Filtering capabilities are not available for vertices.
55
56 To filter out some entities it is necessary to do the following:
57 - Activate one or two filtering controls by switching on the corresponding check boxes;
58 - Select the required threshold comparator type; the following choices are available:
59   - <b>Less Than</b> or <b>Equal or Less Than</b> for the first comparator;
60   - <b>Greater Than</b> or <b>Equal or Greater Than</b> for the second comparator;
61 - Enter the required threshold value (values);
62 - Press \b Apply button in the \b Filter group.
63
64 The entities, which correspond to the entered filtering parameters, will be automatically highlighted
65 in the 3D viewer.
66
67 Using <b>TUI Commands</b> you can perform this operation in a
68 variety of ways:
69 - <em>geompy.ExtractShapes(Shape, Type, isSorted)</em> explodes a
70   Shape into sub-shapes of a given Type and returns a List of sub-shapes.
71   This method does not return the Shape itself if it matches the Type.
72 - <em>geompy.SubShapeAll(Shape, Type)</em> explodes a Shape into
73   sub-shapes of a given Type and returns a List of sub-shapes.
74 - <em>geompy.SubShapeAllIDs(Shape, Type)</em> explodes a Shape into sub-shapes of a given Type and returns a List of IDs of sub-shapes.
75 - <em>geompy.SubShapeAllSortedCentres(Shape, Type)</em> explodes a
76   shape into sub-shapes of a given type and sorts them taking into account
77   their gravity centers, to provide a stable order of sub-shapes.
78   It returns a list of sub-shapes.
79 - <em>geompy.SubShapeAllSortedCentresIDs(Shape, Type)</em> explodes
80   a shape into sub-shapes of a given type and sorts them taking into
81   account their gravity centers, to provide a stable order of sub-shapes.
82   It returns a List of IDs of sub-shapes.
83 - <em>geompy.SubShape(Shape, Type, ListOfInd)</em> allows to obtain
84   a compound of sub-shapes of the Shape, selected by their indexes in a
85   list of all sub-shapes of the given Type. Each index is in the range
86   [1, Nb_Sub-Shapes_Of_Given_Type].
87 - <em>geompy.SubShapeSortedCentres(Shape, Type, ListOfInd)</em>
88   allows to obtain a compound of sub-shapes of the Shape, selected by
89   their indexes in a sorted list of all sub-shapes of the given Type. Each
90   index is in the range [1, Nb_Sub-Shapes_Of_Given_Type]
91
92 <b>Arguments: </b>1 SHAPE + 1 type of SubShape.
93
94 <b>Example:</b>
95
96 \image html explode.png "A box exploded into faces"
97
98 */