b311480e |
1 | -- Created on: 1993-03-10 |
2 | -- Created by: JCV |
3 | -- Copyright (c) 1993-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 | deferred class ElementarySurface from Geom inherits Surface from Geom |
24 | |
25 | ---Purpose : Describes the common behavior of surfaces which |
26 | -- have a simple parametric equation in a local |
27 | -- coordinate system. The Geom package provides |
28 | -- several implementations of concrete elementary surfaces: |
29 | -- - the plane, and |
30 | -- - four simple surfaces of revolution: the cylinder, the |
31 | -- cone, the sphere and the torus. |
32 | -- An elementary surface inherits the common behavior |
33 | -- of Geom_Surface surfaces. Furthermore, it is located |
34 | -- in 3D space by a coordinate system (a gp_Ax3 |
35 | -- object) which is also its local coordinate system. |
36 | -- Any elementary surface is oriented, i.e. the normal |
37 | -- vector is always defined, and gives the same |
38 | -- orientation to the surface, at any point on the surface. |
39 | -- In topology this property is referred to as the "outside |
40 | -- region of the surface". This orientation is related to |
41 | -- the two parametric directions of the surface. |
42 | -- Rotation of a surface around the "main Axis" of its |
43 | -- coordinate system, in the trigonometric sense given |
44 | -- by the "X Direction" and the "Y Direction" of the |
45 | -- coordinate system, defines the u parametric direction |
46 | -- of that elementary surface of revolution. This is the |
47 | -- default construction mode. |
48 | -- It is also possible, however, to change the orientation |
49 | -- of a surface by reversing one of the two parametric |
50 | -- directions: use the UReverse or VReverse functions |
51 | -- to change the orientation of the normal at any point on the surface. |
52 | -- Warning |
53 | -- The local coordinate system of an elementary surface |
54 | -- is not necessarily direct: |
55 | -- - if it is direct, the trigonometric sense defined by its |
56 | -- "main Direction" is the same as the trigonometric |
57 | -- sense defined by its two vectors "X Direction" and "Y Direction": |
58 | -- "main Direction" = "X Direction" ^ "Y Direction" |
59 | -- - if it is indirect, the two definitions of trigonometric |
60 | -- sense are opposite: |
61 | -- "main Direction" = - "X Direction" ^ "Y Direction" |
62 | |
63 | uses Ax1 from gp, |
64 | Ax2 from gp, |
65 | Ax3 from gp, |
66 | Pnt from gp, |
67 | Vec from gp, |
68 | Shape from GeomAbs |
69 | |
70 | raises ConstructionError from Standard |
71 | |
72 | is |
73 | |
74 | SetAxis (me : mutable; A1 : Ax1) |
75 | ---Purpose : |
76 | -- Changes the main axis (ZAxis) of the elementary surface. |
77 | raises ConstructionError; |
78 | ---Purpose : |
79 | -- Raised if the direction of A1 is parallel to the XAxis of the |
80 | -- coordinate system of the surface. |
81 | |
82 | |
83 | SetLocation (me : mutable; Loc : Pnt); |
84 | ---Purpose : |
85 | -- Changes the location of the local coordinates system of the |
86 | -- surface. |
87 | |
88 | |
89 | SetPosition (me : mutable; A3 : Ax3); |
90 | ---Purpose : |
91 | -- Changes the local coordinates system of the surface. |
92 | |
93 | |
94 | Axis (me) returns Ax1; |
95 | ---Purpose : |
96 | -- Returns the main axis of the surface (ZAxis). |
97 | |
98 | |
99 | Location (me) returns Pnt; |
100 | ---Purpose : |
101 | -- Returns the location point of the local coordinate system of the |
102 | -- surface. |
103 | |
104 | |
105 | Position (me) returns Ax3; |
106 | ---Purpose : Returns the local coordinates system of the surface. |
107 | ---C++: return const& |
108 | |
109 | |
110 | UReverse (me : mutable) |
111 | ---Purpose : |
112 | -- Reverses the U parametric direction of the surface. |
113 | is virtual; |
114 | |
115 | UReversedParameter (me; U : Real) returns Real |
116 | ---Purpose: Return the parameter on the Ureversed surface for |
117 | -- the point of parameter U on <me>. |
118 | -- |
119 | -- me->UReversed()->Value(me->UReversedParameter(U),V) |
120 | -- is the same point as |
121 | -- me->Value(U,V) |
122 | is deferred; |
123 | |
124 | |
125 | VReverse (me : mutable) |
126 | ---Purpose : |
127 | -- Reverses the V parametric direction of the surface. |
128 | is virtual; |
129 | |
130 | |
131 | VReversedParameter (me; V : Real) returns Real |
132 | ---Purpose: Return the parameter on the Vreversed surface for |
133 | -- the point of parameter V on <me>. |
134 | -- |
135 | -- me->VReversed()->Value(U,me->VReversedParameter(V)) |
136 | -- is the same point as |
137 | -- me->Value(U,V) |
138 | is deferred; |
139 | |
140 | |
141 | Continuity (me) returns Shape from GeomAbs; |
142 | ---Purpose : Returns GeomAbs_CN, the global continuity of any elementary surface. |
143 | |
144 | |
145 | IsCNu (me; N : Integer) returns Boolean; |
146 | ---Purpose : Returns True. |
147 | |
148 | |
149 | IsCNv (me; N : Integer) returns Boolean; |
150 | ---Purpose : Returns True. |
151 | |
152 | |
153 | |
154 | fields |
155 | |
156 | pos : Ax3 is protected; |
157 | |
158 | end; |