b311480e |
1 | -- Created on: 1991-03-27 |
2 | -- Created by: Michel CHAUVAT |
3 | -- Copyright (c) 1991-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | package LProp |
24 | |
25 | ---Purpose: Handles local properties of curves and surfaces. |
26 | -- Given a curve and a parameter value the following computations |
27 | -- are available : |
28 | -- - point, |
29 | -- - derivatives, |
30 | -- - tangent, |
31 | -- - normal, |
32 | -- - curvature, |
33 | -- - centre of curvature, |
34 | -- - Locals curvature's extremas, |
35 | -- - Points of inflection, |
36 | -- Given a surface and 2 parameters the following computations |
37 | -- are available : |
38 | -- - for each parameter: |
39 | -- - derivatives, |
40 | -- - tangent line, |
41 | -- - centre of curvature, |
42 | -- - point, |
43 | -- - normal line, |
44 | -- - maximum and minimum curvatures, |
45 | -- - principal directions of curvature, |
46 | -- - mean curvature, |
47 | -- - Gaussian curvature. |
48 | |
49 | |
50 | ---Level : Public. |
51 | -- All methods of all classes will be public. |
52 | |
53 | uses Standard, gp, math, TCollection, TColStd, GeomAbs |
54 | |
55 | is |
56 | |
57 | enumeration Status is Undecided , Undefined, Defined, Computed; |
58 | enumeration CIType is Inflection, MinCur , MaxCur; |
59 | ---Purpose: |
60 | -- Identifies the type of a particular point on a curve: |
61 | -- - LProp_Inflection: a point of inflection |
62 | -- - LProp_MinCur: a minimum of curvature |
63 | -- - LProp_MaxCur: a maximum of curvature. |
64 | |
65 | exception BadContinuity inherits Failure; |
66 | exception NotDefined inherits Failure; |
67 | |
68 | deferred generic class CurveTool; |
69 | ---Purpose: The template class used in CLProps. |
70 | deferred generic class SurfaceTool; |
71 | ---Purpose: The template class used in SLProps. |
72 | |
73 | generic class CLProps; |
74 | ---Purpose: Computation of local properties of a curve. |
75 | generic class SLProps; |
76 | ---Purpose: Computation of local properties of a surface. |
77 | |
78 | |
79 | class CurAndInf; |
80 | ---Purpose: Stores the parameters of a curve 2d or 3d corresponding |
81 | -- to the curvature's extremas and the inflection's points. |
82 | |
83 | class AnalyticCurInf; |
84 | ---Purpose: Computes the locals extremas of curvature of a gp curve. |
85 | |
86 | private generic class FuncCurExt; |
87 | private generic class FuncCurNul; |
88 | generic class NumericCurInf, FCurExt, FCurNul; |
89 | ---Purpose: Computes the locals extremas of curvature and the |
90 | -- inflections of a bounded curve in 2d. |
91 | |
92 | private class SequenceOfCIType instantiates Sequence from TCollection |
93 | (CIType from LProp); |
94 | |
95 | end LProp; |