Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Adaptor2d / Adaptor2d.cdl
1 -- File:        Adaptor2d.cdl
2 -- Created:     Thu Oct  8 10:33:07 1992
3 -- Author:      Isabelle GRIGNON
4 --              <isg@sdsun2>
5 ---Copyright:    Matra Davision 1992
6
7
8
9
10 package Adaptor2d 
11
12         ---Purpose: The  Adaptor2d package   is  used to  help  defining
13         --          reusable  geometric  algorithms. i.e.  that can be
14         --          used on curves and surfaces.
15         --          
16         --          It defines general services for  objects :
17         --          
18         --          - the 2d curve.     Curve2d
19         --          
20         --          The services are :
21         --          
22         --           - Usual services found in Geom or Geom2d :
23         --           
24         --               * parameter range, value and derivatives, etc...
25         --               
26         --           - Continuity breakout services :
27         --           
28         --               * Allows to  divide a curve or  a surfaces in
29         --               parts with a given derivation order.
30         --               
31         --           - Special geometries detection services :
32         --           
33         --               * Allows to  test  for special cases that can
34         --               be processed more easily :
35         --                 - Conics, Quadrics, Bezier, BSpline ...
36         --                 
37         --                 And to  get the correponding  data form the
38         --                 package  gp  or   Geom.   The  special type
39         --                 OtherCurve  means  that no special case has
40         --                 been  detected  and the  algorithm  may use
41         --                 only the evaluation methods (D0, D1, ...)
42         --                 
43         --            
44         --          For   each category  Curve2d,  Curve,   Surface we
45         --          define   three  classes,  we  illustrate  now  the
46         --          principles  with the  Curve,  the same  applies to
47         --          Curve2d and Surface.
48         --          
49         --          The  class Curve  is the   abstract root  for  all
50         --          Curves used by algorithms,  it is handled by value
51         --          and   provides as  deferred  methods  the services
52         --          described above.
53         --          
54         --          Some  services  (breakout) requires  to create new
55         --          curves,     this   leads   to   memory  allocation
56         --          considerations (who create  the curve, who deletes
57         --          it ?). To  solve this problem elegantly the  curve
58         --          will  return a  HCurve, the    HCurve is a   curve
59         --          handled by reference   so it will   be deallocated
60         --          automatically when it is not used.
61         --          
62         --          A third class GenHCurve is provided, this class is
63         --          generic and its utility   is to provide  automatic
64         --          generation  of  the  HCurve  class  when you  have
65         --          written the Curve class.
66         --          
67         --             
68         --          * Let us show an example (with 2d curves) :
69         --          
70         --            Imagine an  algorithm to intersect  curves, this
71         --            algorithms  is written to  process  Curve2d from
72         --            Adaptor2d :
73         --            
74         --            A method may look like :
75         --            
76         --            Intersect(C1,C2 : Curve2d from Adaptor2d);
77         --            
78         --            Which will look like in C++
79         --            
80         --            Intersect(const Adaptor2d_Curve2d& C1,
81         --                      const Adaptor2d_Curve2d& C2)
82         --            {
83         --             // you can call any method
84         --             Standard_Real first1 = C1.FirstParameter();
85         --             
86         --             // but avoid  to copy in an Adaptor2d_Curve which
87         --             // is an Abstract class, use a reference or a pointer
88         --            
89         --             const Adaptor2d_Curve& C  = C1;
90         --             const Adaptor2d_Curve *pC = &C1;
91         --             
92         --             // If you  are interseted in Intervals you must
93         --             // store them in a  HCurve to ensure they are kept
94         --             // in memory. Then a referrence may be used.
95         --             
96         --             Handle(Adaptor2d_HCurve) HCI = C1.Interval(1);
97         --             
98         --             const Adaptor2d_Curve& CI = HCI->Curve();
99         --             pC = &(HCI->Curve());
100         --            
101         --            
102         --          *  The   Adaptor2d  provides  also  Generic  classes
103         --          implementing algorithmic curves and surfaces.
104         --          
105         --              - IsoCurve       : Isoparametric curve on a surface.
106         --              - CurveOnSurface :  2D curve in the parametric
107         --              space of a surface.
108         --              
109         --              
110         --              - OffsetCurve2d : 2d offset curve
111         --              - ProjectedCurve : 3d curve projected on a plane
112         --              - SurfaceOfLinearExtrusion 
113         --              - SurfaceOfRevolution
114         --              
115         --              They are instantiated with HCurve, HSurface, HCurved2d
116
117 uses 
118     Standard,
119     MMgt,
120     TColStd,
121     GeomAbs,
122     TopAbs,
123     TColgp,
124     gp,
125     Geom2d,
126     math
127
128 is
129
130       deferred class Curve2d; 
131        ---Purpose: Root of the 2d curve.
132
133       pointer Curve2dPtr to Curve2d from Adaptor2d;
134
135       deferred class HCurve2d;
136         ---Purpose: deferred class for the  2d curves manipulated with
137         --          Handle.
138
139       generic class GenHCurve2d;
140         ---Purpose: Generic  class  used to create a  curve inheriting
141         --          from HCurve2d.
142
143               
144
145       --
146       --  The  following  classes  are  used  to  define  an  abstract
147       --  simplified  "topology"  for  surfaces.   This  is   used  by
148       --  algorithm as mass properties or surface intersections.
149       --  
150
151
152       class Line2d;
153
154       class HLine2d instantiates GenHCurve2d(Line2d from Adaptor2d);
155         ---Purpose: Use by the TopolTool to trim a surface.
156     
157       --
158       --  The   following  classes  provides  algorithmic   curves and
159       --  surface, they are inheriting from  Curve and Surface and the
160       --  correponding HCurve and HSurface is instantiated.
161       --  
162       --  
163
164
165
166 end Adaptor2d;