Salome HOME
aa97ec32f8489ef571a0b182fa4c19eb71b29bcd
[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 neighbouring 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>Split Angle</b> (SplitAngle) - splits faces based on conical
60 surfaces, surfaces of revolution and cylindrical surfaces in segments
61 using a certain angle.</li>
62 <ul>
63 <li><b>Angle</b> (SplitAngle.Angle) - the central angle of the
64 resulting segments (i.e. we obtain two segments if Angle=180, four if
65 Angle=90, etc).</li>
66 <li><b>Max. Tolerance</b> (SplitAngle.MaxTolerance) - maximum possible
67 tolerance among the resulting segments.</li>
68 </ul>
69 <li><b>Split Closed Faces</b> (SplitClosedFaces) - splits closed faces
70 in segments. The number of segments depends on the number of splitting
71 points.</li>
72 <ul>
73 <li><b>Number of splitting points</b> (SplitClosedFaces.NbSplitPoints) - the number of splitting points.</li>
74 </ul>
75 <li><b>Split Continuity</b> (SplitContinuity) - splits shapes to
76 reduce continuities of curves and surfaces.</li>
77 <ul>
78 <li><b>3D Tolerance</b> (SplitContinuity.Tolerance3d) - 3D tolerance for correction of geometry.</li>
79 <li><b>Surface Continuity</b> (SplitContinuity.SurfaceContinuity) - required continuity for surfaces.</li>
80 <li><b>Curve Continuity</b> (SplitContinuity.CurveContinuity) - required continuity for curves.</li>
81 </ul>
82 \n This and the previous parameters can take the following values:
83 \par
84 <b>Parametric Continuity</b>
85 \n \b C0 (Positional Continuity): curves are joined (the end positions
86 of curves or surfaces are coincidental. The curves or surfaces may
87 still meet at an angle, giving rise to a sharp corner or edge).
88 \n \b C1 (Tangential Continuity): first derivatives are equal (the end
89 vectors of curves or surfaces are parallel, ruling out sharp edges).
90 \n \b C2 (Curvature Continuity): first and second derivatives are
91 equal (the end vectors of curves or surfaces are of the same
92 magnitude).
93 \n \b CN N-th derivatives are equal (both the direction and the
94 magnitude of the Nth derivatives of curves or surfaces (d/du C(u)) are
95 the same at junction.
96 \par
97 <b>Geometric Continuity</b>
98 \n \b G1: first derivatives are proportional at junction.
99 \n The curve tangents thus have the same direction, but not necessarily
100 the same magnitude. i.e., C1'(1) = (a,b,c) and C2'(0) = (k*a, k*b,
101 k*c).
102 \n \b G2: first and second derivatives are proportional at junction.
103 \n As the names imply, geometric continuity requires the geometry to
104 be continuous, while parametric continuity requires that the
105 underlying parameterization was continuous as well.
106 \n Parametric continuity of order n implies geometric continuity of
107 order n, but not vice-versa. 
108
109 <li><b>Bspline Restriction</b> (BsplineRestriction) - converts curves
110 and surfaces to Bsplines and processes them with the following
111 parameters:</li>
112 <ul>
113 <li><b>Surface Mode</b> (BSplineRestriction.SurfaceMode) -
114 approximation of surfaces if restriction is necessary.</li>
115 <li><b>3D Curve Mode</b> (BSplineRestriction.Curve3dMode) - conversion
116 of any 3D curve to BSpline and approximation.</li>
117 <li><b>2D Curve Mode</b> (BSplineRestriction.Curve2dMode) - conversion
118 of any 2D curve to BSpline and approximation.</li>
119 <li><b>3D Tolerance</b> (BSplineRestriction.Tolerance3d) - defines the
120 possibility of surfaces and 3D curves approximation with the specified
121 parameters.</li>
122 <li><b>2D Tolerance</b> (BSplineRestriction.Tolerance2d) - defines the
123 possibility of surfaces and 2D curves approximation with the specified
124 parameters.</li>
125 <li><b>Required Degree</b> (BSplineRestriction.RequiredDegree) -
126 required degree of the resulting BSplines.</li>
127 <li><b>Required number of segments</b>
128 (BSplineRestriction.RequiredNbSegments) - required maximum number of
129 segments of resultant BSplines.</li>
130 <li><b>3D Continuity</b> (BSplineRestriction.Continuity3d) -
131 continuity of the resulting surfaces and 3D curves.</li>
132 <li><b>2D Continuity</b> (BSplineRestriction.Continuity2d) -
133 continuity of the resulting 2D curves.</li>
134 </ul>
135 <li><b>To Bezier</b> (ToBezier) - converts curves and surfaces of any
136 type to Bezier curves and surfaces.</li>
137 <ul>
138 <li><b>Surface Mode</b> (ToBezier.SurfaceMode) - if checked in, allows
139 conversion of surfaces.</li>
140 <li><b>3D Curve Mode</b> (ToBezier.Curve3dMode) - if checked in,
141 allows conversion of 3D curves.</li>
142 <li><b>2D Curve Mode</b> (ToBezier.Curve2dMode) - if checked in,
143 allows conversion of 2D curves.</li>
144 <li><b>Max Tolerance</b> (ToBezier.MaxTolerance) - defines tolerance
145 for detection and correction of problems.</li>
146 </ul>
147 <li><b>Same Parameter</b> (SameParameter) - fixes edges of 2D and 3D
148 curves not having the same parameter.</li>
149 <ul>
150 <li><b>3D Tolerance</b> (SameParameter.Tolerance3d) - defines tolerance for fixing of edges.</li>
151 </ul>
152 </ul>
153
154 \n <b>Example:</b>
155
156 \image html image154.png
157 <center><em>Shape before applying Shape Processing (FixShape
158 operator). View # 1.</em></center>
159
160 \image html image156.png
161 <center><em>Shape before applying Shape Processing (FixShape
162 operator). View # 2.</em></center>
163
164 \image html image160.png
165 <center><em>The same shape after applying Shape
166 Processing.</em></center>
167
168 Our <b>TUI Scripts</b> provide you with useful examples of the use of
169 \ref tui_shape_processing "Repairing Operations".
170
171 */