1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2012 OPEN CASCADE SAS
4 // The content of this file is subject to the Open CASCADE Technology Public
5 // License Version 6.5 (the "License"). You may not use the content of this file
6 // except in compliance with the License. Please obtain a copy of the License
7 // at http://www.opencascade.org and read it completely before using this file.
9 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 // The Original Code and all software distributed under the License is
13 // distributed on an "AS IS" basis, without warranty of any kind, and the
14 // Initial Developer hereby disclaims all such warranties, including without
15 // limitation, any warranties of merchantability, fitness for a particular
16 // purpose or non-infringement. Please see the License for the specific terms
17 // and conditions governing the rights and limitations under the License.
20 #define No_Standard_OutOfRange
22 #include <gp_Hypr2d.ixx>
24 void gp_Hypr2d::Coefficients (Standard_Real& A,
29 Standard_Real& F) const
31 Standard_Real DMin = minorRadius * minorRadius;
32 Standard_Real DMaj = majorRadius * majorRadius;
33 if (DMin <= gp::Resolution() && DMaj <= gp::Resolution()) {
34 A = B = C = D = E = F = 0.0;
38 T.SetTransformation (pos.XAxis());
39 Standard_Real T11 = T.Value (1, 1);
40 Standard_Real T12 = T.Value (1, 2);
41 Standard_Real T13 = T.Value (1, 3);
42 if (DMin <= gp::Resolution()) {
43 A = T11 * T11; B = T12 * T12; C = T11 * T12;
44 D = T11 * T13; E = T12 * T13; F = T13 * T13 - DMaj;
47 Standard_Real T21 = T.Value (2, 1);
48 Standard_Real T22 = T.Value (2, 2);
49 Standard_Real T23 = T.Value (2, 3);
50 A = (T11 * T11 / DMaj) - (T21 * T21 / DMin);
51 B = (T12 * T12 / DMaj) - (T22 * T22 / DMin);
52 C = (T11 * T12 / DMaj) - (T21 * T22 / DMin);
53 D = (T11 * T13 / DMaj) - (T21 * T23 / DMin);
54 E = (T12 * T13 / DMaj) - (T22 * T23 / DMin);
55 F = (T13 * T13 / DMaj) - (T23 * T23 / DMin) - 1.0;
60 void gp_Hypr2d::Mirror (const gp_Pnt2d& P)
63 gp_Hypr2d gp_Hypr2d::Mirrored (const gp_Pnt2d& P) const
70 void gp_Hypr2d::Mirror (const gp_Ax2d& A)
73 gp_Hypr2d gp_Hypr2d::Mirrored (const gp_Ax2d& A) const