b311480e |
1 | // Created on: 1993-07-23 |
2 | // Created by: Remi LEQUETTE |
3 | // Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
7fd59977 |
17 | |
42cf5bc1 |
18 | #include <BRepBuilderAPI.hxx> |
19 | #include <BRepPrim_Cone.hxx> |
20 | #include <BRepPrimAPI_MakeCone.hxx> |
7fd59977 |
21 | #include <gp.hxx> |
7fd59977 |
22 | #include <gp_Ax2.hxx> |
42cf5bc1 |
23 | #include <gp_Dir.hxx> |
24 | #include <Standard_DomainError.hxx> |
0d969553 |
25 | |
7fd59977 |
26 | //======================================================================= |
27 | //function : BRepPrimAPI_MakeCone |
28 | //purpose : |
29 | //======================================================================= |
30 | |
31 | BRepPrimAPI_MakeCone::BRepPrimAPI_MakeCone(const Standard_Real R1, |
32 | const Standard_Real R2, |
33 | const Standard_Real H) : |
742cc8b0 |
34 | myCone(gp::XOY(),R1, R2, H) |
7fd59977 |
35 | { |
36 | } |
37 | |
38 | |
39 | //======================================================================= |
40 | //function : BRepPrimAPI_MakeCone |
41 | //purpose : |
42 | //======================================================================= |
43 | |
44 | BRepPrimAPI_MakeCone::BRepPrimAPI_MakeCone(const Standard_Real R1, |
45 | const Standard_Real R2, |
46 | const Standard_Real H, |
47 | const Standard_Real angle) : |
48 | myCone( R1, R2, H) |
49 | { |
50 | myCone.Angle(angle); |
51 | } |
52 | |
53 | |
54 | //======================================================================= |
55 | //function : BRepPrimAPI_MakeCone |
56 | //purpose : |
57 | //======================================================================= |
58 | |
59 | BRepPrimAPI_MakeCone::BRepPrimAPI_MakeCone(const gp_Ax2& Axes, |
60 | const Standard_Real R1, |
61 | const Standard_Real R2, |
62 | const Standard_Real H) : |
63 | myCone( Axes, R1, R2, H) |
64 | { |
65 | } |
66 | |
67 | |
68 | //======================================================================= |
69 | //function : BRepPrimAPI_MakeCone |
70 | //purpose : |
71 | //======================================================================= |
72 | |
73 | BRepPrimAPI_MakeCone::BRepPrimAPI_MakeCone(const gp_Ax2& Axes, |
74 | const Standard_Real R1, |
75 | const Standard_Real R2, |
76 | const Standard_Real H, |
77 | const Standard_Real angle) : |
78 | myCone( Axes, R1, R2, H) |
79 | { |
80 | myCone.Angle(angle); |
81 | } |
82 | |
83 | |
84 | //======================================================================= |
85 | //function : OneAxis |
86 | //purpose : |
87 | //======================================================================= |
88 | |
89 | Standard_Address BRepPrimAPI_MakeCone::OneAxis() |
90 | { |
91 | return &myCone; |
92 | } |
93 | |
94 | |
95 | //======================================================================= |
96 | //function : Cone |
97 | //purpose : |
98 | //======================================================================= |
99 | |
100 | BRepPrim_Cone& BRepPrimAPI_MakeCone::Cone() |
101 | { |
102 | return myCone; |
103 | } |
104 | |
105 | |
106 | |