Salome HOME
22763: [EDF] Shape processing
[modules/geom.git] / doc / salome / gui / GEOM / input / shape_processing_operation.doc
1 /*!
2
3 \page shape_processing_operation_page Shape Processing
4
5 \n To produce a <b>Shape Processing</b> operation in the <b>Main Menu</b> 
6    select <b>Repair - > Shape Processing</b>.
7 \n This operation processes one or more shapes using various operators.
8
9 \n The \b Result will be a \b GEOM.GEOM_Object.
10
11 \n <b>TUI Command:</b> <em>geompy.ProcessShape(Shape, Operators,
12 Parameters, Values),</em> where \em Shape is a processed shape, \em Operators
13 is a list of operators ("FixShape", "SplitClosedFaces", etc.),
14 \em Parameters is a list of parameters ("FixShape.Tolerance3d",
15 etc), \em Values is a list of values of parameters placed in the same
16 order as in the list of Parameters.
17
18 \note <b>Shape Processing</b> is useful not only on invalid shapes,
19       but also on the shapes, that are classified as valid by
20       the <b>Check</b> functionality. Use it, if an operation (for
21       example, <b>Partition</b>) fails.
22       Example of usage:
23       <ol>
24       <li>Try to partition objects obj1 and obj2.</li>
25       <li>Partition fails.</li>
26       <li>Perform Shape Processing on objects obj1 and obj2.</li>
27       <li>Try to partition them again.</li>
28       </ol>
29       See also \ref tui_limit_tolerance "TUI example".
30
31 \n In this dialog box you can select the object that you need to
32 process, define its name and operators applied to it during
33 processing.
34
35 \image html repair1.png
36
37 <b>Operators and Parameters</b> (TUI names are given in brackets):
38
39 <ul>
40 <li><b>Fix Shape</b> (FixShape) - corrects invalid shapes.</li>
41 <ul>
42 <li><b>3D Tolerance</b> (FixShape.Tolerance3d) - work tolerance for
43 detection of the problems and correction of them.</li>
44 <li><b>Max 3D Tolerance</b> (FixShape.MaxTolerance3d)  - maximal
45 possible tolerance of the shape after correction.</li>
46 </ul>
47 <li><b>Fix Face Size</b> (FixFaceSize) - removes small faces, such as
48 spots and strips.</li>
49 <ul>
50 <li><b>Tolerance</b> (FixFaceSize.Tolerance) - defines minimum
51 possible face size.</li>
52 </ul>
53 <li><b>Drop Small Edges</b> (DropSmallEdges) - removes edges, which
54 merge with neighboring edges.</li>
55 <ul>
56 <li><b>3D Tolerance</b> (DropSmallEdges.Tolerance3d) - defines minimum
57 possible distance between two parallel edges.</li>
58 </ul>
59 <li><b>Drop Small Solids</b> (DropSmallSolids) - either removes small
60   solids or merges them with neighboring ones.</li>
61 <ul>
62 <li><b>Width factor tol.</b> (DropSmallSolids.WidthFactorThreshold) -
63   defines maximum value of <em>2V/S</em> of a solid which is
64   considered small, where \a V is volume and \a S is surface area of
65   the solid.</li>
66 <li><b>Volume tol.</b> (DropSmallSolids.VolumeThreshold) - defines
67   maximum volume of a solid which is considered small.</li>
68 <li><b>To merge solids</b> (DropSmallSolids.MergeSolids) - if
69   activated, small solids are removed, else small solids are merged to
70   adjacent non-small solids or left untouched if cannot be merged.
71 </li>
72 </ul>
73 If the both tolerances are activated a solid is considered small if
74 it meets the both criteria.
75 <li><b>Split Angle</b> (SplitAngle) - splits faces based on conical
76 surfaces, surfaces of revolution and cylindrical surfaces in segments
77 using a certain angle.</li>
78 <ul>
79 <li><b>Angle</b> (SplitAngle.Angle) - the central angle of the
80 resulting segments (i.e. we obtain two segments if Angle=180, four if
81 Angle=90, etc).</li>
82 <li><b>Max. Tolerance</b> (SplitAngle.MaxTolerance) - maximum possible
83 tolerance among the resulting segments.</li>
84 </ul>
85 <li><b>Split Closed Faces</b> (SplitClosedFaces) - splits closed faces
86 in segments. The number of segments depends on the number of splitting
87 points.</li>
88 <ul>
89 <li><b>Number of splitting points</b> (SplitClosedFaces.NbSplitPoints) - the number of splitting points.</li>
90 </ul>
91 <li><b>Split Continuity</b> (SplitContinuity) - splits shapes to
92 reduce continuities of curves and surfaces.</li>
93 <ul>
94 <li><b>3D Tolerance</b> (SplitContinuity.Tolerance3d) - 3D tolerance for correction of geometry.</li>
95 <li><b>Surface Continuity</b> (SplitContinuity.SurfaceContinuity) - required continuity for surfaces.</li>
96 <li><b>Curve Continuity</b> (SplitContinuity.CurveContinuity) - required continuity for curves.</li>
97 </ul>
98 \n This and the previous parameters can take the following values:
99 \par
100 <b>Parametric Continuity</b>
101 \n \b C0 (Positional Continuity): curves are joined (the end positions
102 of curves or surfaces are coincidental. The curves or surfaces may
103 still meet at an angle, giving rise to a sharp corner or edge).
104 \n \b C1 (Tangential Continuity): first derivatives are equal (the end
105 vectors of curves or surfaces are parallel, ruling out sharp edges).
106 \n \b C2 (Curvature Continuity): first and second derivatives are
107 equal (the end vectors of curves or surfaces are of the same
108 magnitude).
109 \n \b CN N-th derivatives are equal (both the direction and the
110 magnitude of the Nth derivatives of curves or surfaces (d/du C(u)) are
111 the same at junction.
112 \par
113 <b>Geometric Continuity</b>
114 \n \b G1: first derivatives are proportional at junction.
115 \n The curve tangents thus have the same direction, but not necessarily
116 the same magnitude. i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b,
117 k*c).
118 \n \b G2: first and second derivatives are proportional at junction.
119 \n As the names imply, geometric continuity requires the geometry to
120 be continuous, while parametric continuity requires that the
121 underlying parameterization was continuous as well.
122 \n Parametric continuity of order n implies geometric continuity of
123 order n, but not vice-versa. 
124
125 <li><b>Bspline Restriction</b> (BsplineRestriction) - converts curves
126 and surfaces to Bsplines and processes them with the following
127 parameters:</li>
128 <ul>
129 <li><b>Surface Mode</b> (BSplineRestriction.SurfaceMode) -
130 approximation of surfaces if restriction is necessary.</li>
131 <li><b>3D Curve Mode</b> (BSplineRestriction.Curve3dMode) - conversion
132 of any 3D curve to BSpline and approximation.</li>
133 <li><b>2D Curve Mode</b> (BSplineRestriction.Curve2dMode) - conversion
134 of any 2D curve to BSpline and approximation.</li>
135 <li><b>3D Tolerance</b> (BSplineRestriction.Tolerance3d) - defines the
136 possibility of surfaces and 3D curves approximation with the specified
137 parameters.</li>
138 <li><b>2D Tolerance</b> (BSplineRestriction.Tolerance2d) - defines the
139 possibility of surfaces and 2D curves approximation with the specified
140 parameters.</li>
141 <li><b>Required Degree</b> (BSplineRestriction.RequiredDegree) -
142 required degree of the resulting BSplines.</li>
143 <li><b>Required number of segments</b>
144 (BSplineRestriction.RequiredNbSegments) - required maximum number of
145 segments of resultant BSplines.</li>
146 <li><b>3D Continuity</b> (BSplineRestriction.Continuity3d) -
147 continuity of the resulting surfaces and 3D curves.</li>
148 <li><b>2D Continuity</b> (BSplineRestriction.Continuity2d) -
149 continuity of the resulting 2D curves.</li>
150 </ul>
151 <li><b>To Bezier</b> (ToBezier) - converts curves and surfaces of any
152 type to Bezier curves and surfaces.</li>
153 <ul>
154 <li><b>Surface Mode</b> (ToBezier.SurfaceMode) - if checked in, allows
155 conversion of surfaces.</li>
156 <li><b>3D Curve Mode</b> (ToBezier.Curve3dMode) - if checked in,
157 allows conversion of 3D curves.</li>
158 <li><b>2D Curve Mode</b> (ToBezier.Curve2dMode) - if checked in,
159 allows conversion of 2D curves.</li>
160 <li><b>Max Tolerance</b> (ToBezier.MaxTolerance) - defines tolerance
161 for detection and correction of problems.</li>
162 </ul>
163 <li><b>Same Parameter</b> (SameParameter) - fixes edges of 2D and 3D
164 curves not having the same parameter.</li>
165 <ul>
166 <li><b>3D Tolerance</b> (SameParameter.Tolerance3d) - defines tolerance for fixing of edges.</li>
167 </ul>
168 </ul>
169
170 \n <b>Example:</b>
171
172 \image html image154.png
173 <center><em>Shape before applying Shape Processing (FixShape
174 operator). View # 1.</em></center>
175
176 \image html image156.png
177 <center><em>Shape before applying Shape Processing (FixShape
178 operator). View # 2.</em></center>
179
180 \image html image160.png
181 <center><em>The same shape after applying Shape
182 Processing.</em></center>
183
184 Our <b>TUI Scripts</b> provide you with useful examples of the use of
185 \ref tui_shape_processing "Repairing Operations".
186
187 */