b311480e |
1 | -- Created on: 1992-09-28 |
2 | -- Created by: Remi GILET |
3 | -- Copyright (c) 1992-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 | class MakePlane from GC inherits Root from GC |
23 | |
24 | ---Purpose : This class implements the following algorithms used |
25 | -- to create a Plane from gp. |
26 | -- * Create a Plane parallel to another and passing |
27 | -- through a point. |
28 | -- * Create a Plane passing through 3 points. |
29 | -- * Create a Plane by its normal |
30 | -- A MakePlane object provides a framework for: |
31 | -- - defining the construction of the plane, |
32 | -- - implementing the construction algorithm, and |
33 | -- - consulting the results. In particular, the Value |
34 | -- function returns the constructed plane. |
35 | |
36 | uses Pnt from gp, |
37 | Pln from gp, |
38 | Ax2 from gp, |
39 | Dir from gp, |
40 | Plane from Geom, |
41 | Ax1 from gp, |
42 | Real from Standard |
43 | |
44 | raises NotDone from StdFail |
45 | |
46 | is |
47 | |
48 | Create (A2 : Ax2) returns MakePlane; |
49 | --- Purpose : |
50 | -- Creates a plane located in 3D space with an axis placement |
51 | -- two axis. The "ZDirection" of "A2" is the direction normal |
52 | -- to the plane. The "Location" point of "A2" is the origin of |
53 | -- the plane. The "XDirection" and "YDirection" of "A2" define |
54 | -- the directions of the U isoparametric and V isoparametric |
55 | -- curves. |
56 | |
57 | Create (Pl : Pln from gp) returns MakePlane; |
58 | --- Purpose : |
59 | -- Creates a plane from a non persistent plane from package gp. |
60 | |
61 | Create (P : Pnt from gp; |
62 | V : Dir from gp) returns MakePlane; |
63 | --- Purpose : |
64 | -- P is the "Location" point or origin of the plane. |
65 | -- V is the direction normal to the plane. |
66 | |
67 | Create (A, B, C ,D : Real from Standard) returns MakePlane; |
68 | --- Purpose : |
69 | -- Creates a plane from its cartesian equation : |
70 | -- Ax + By + Cz + D = 0.0 |
71 | -- Status is "BadEquation" if Sqrt (A*A + B*B + C*C) |
72 | -- <= Resolution from gp |
73 | |
74 | Create(Pln : Pln from gp; |
75 | Point : Pnt from gp) returns MakePlane; |
76 | ---Purpose : Make a Plane from Geom <ThePlane> parallel to another |
77 | -- Pln <Pln> and passing through a Pnt <Point>. |
78 | |
79 | Create(Pln : Pln from gp ; |
80 | Dist : Real from Standard) returns MakePlane; |
81 | ---Purpose : Make a Plane from Geom <ThePlane> parallel to another |
82 | -- Pln <Pln> at the distance <Dist> which can be greater |
83 | -- or lower than zero. |
84 | -- In the first case the result is at the distance |
85 | -- <Dist> to the plane <Pln> in the direction of the |
86 | -- normal to <Pln>. |
87 | -- Otherwize it is in the oposite direction. |
88 | |
89 | Create(P1 : Pnt from gp; |
90 | P2 : Pnt from gp; |
91 | P3 : Pnt from gp) returns MakePlane; |
92 | ---Purpose : Make a Plane from Geom <ThePlane> passing through 3 |
93 | -- Pnt <P1>,<P2>,<P3>. |
94 | -- It returns false if <P1> <P2> <P3> are confused. |
95 | |
96 | Create(Axis : Ax1 from gp) returns MakePlane; |
97 | ---Purpose: Make a Plane passing through the location of <Axis>and |
98 | -- normal to the Direction of <Axis>. |
99 | |
100 | Value(me) returns Plane from Geom |
101 | raises NotDone |
102 | is static; |
103 | ---Purpose: Returns the constructed plane. |
104 | -- Exceptions StdFail_NotDone if no plane is constructed. |
105 | ---C++: return const& |
106 | |
107 | Operator(me) returns Plane from Geom |
108 | is static; |
109 | ---C++: return const& |
110 | ---C++: alias "Standard_EXPORT operator Handle_Geom_Plane() const;" |
111 | |
112 | fields |
113 | |
114 | ThePlane : Plane from Geom; |
115 | --The solution from Geom. |
116 | |
117 | end MakePlane; |
118 | |