0030346: Modeling Algorithms - BRepPrimAPI_MakeRevol throws "BRepSweep_Translation...
[occt.git] / src / BRepPrimAPI / BRepPrimAPI_MakeCylinder.cxx
1 // Created on: 1993-07-23
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17
18 #include <BRepBuilderAPI.hxx>
19 #include <BRepPrim_Cylinder.hxx>
20 #include <BRepPrimAPI_MakeCylinder.hxx>
21 #include <gp.hxx>
22 #include <gp_Ax2.hxx>
23 #include <gp_Dir.hxx>
24 #include <Standard_DomainError.hxx>
25
26 //=======================================================================
27 //function : BRepPrimAPI_MakeCylinder
28 //purpose  : 
29 //=======================================================================
30
31 BRepPrimAPI_MakeCylinder::BRepPrimAPI_MakeCylinder(const Standard_Real R,
32                                            const Standard_Real H) :
33        myCylinder(gp::XOY(), R , H)
34 {
35 }
36
37
38 //=======================================================================
39 //function : BRepPrimAPI_MakeCylinder
40 //purpose  : 
41 //=======================================================================
42
43 BRepPrimAPI_MakeCylinder::BRepPrimAPI_MakeCylinder(const Standard_Real R, 
44                                            const Standard_Real H, 
45                                            const Standard_Real Angle) :
46        myCylinder( R , H)
47 {
48   myCylinder.Angle(Angle);
49 }
50
51
52 //=======================================================================
53 //function : BRepPrimAPI_MakeCylinder
54 //purpose  : 
55 //=======================================================================
56
57 BRepPrimAPI_MakeCylinder::BRepPrimAPI_MakeCylinder(const gp_Ax2& Axes, 
58                                            const Standard_Real R, 
59                                            const Standard_Real H) :
60        myCylinder( Axes, R , H)
61 {
62 }
63
64
65 //=======================================================================
66 //function : BRepPrimAPI_MakeCylinder
67 //purpose  : 
68 //=======================================================================
69
70 BRepPrimAPI_MakeCylinder::BRepPrimAPI_MakeCylinder(const gp_Ax2& Axes,
71                                            const Standard_Real R, 
72                                            const Standard_Real H,
73                                            const Standard_Real Angle) :
74        myCylinder( Axes, R , H)
75 {
76   myCylinder.Angle(Angle);
77 }
78
79
80 //=======================================================================
81 //function : OneAxis
82 //purpose  : 
83 //=======================================================================
84
85 Standard_Address  BRepPrimAPI_MakeCylinder::OneAxis()
86 {
87   return &myCylinder;
88 }
89
90
91 //=======================================================================
92 //function : Cylinder
93 //purpose  : 
94 //=======================================================================
95
96 BRepPrim_Cylinder&  BRepPrimAPI_MakeCylinder::Cylinder()
97 {
98   return myCylinder;
99 }
100
101
102