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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <BRepPrimAPI_MakeCone.ixx>
18 #include <BRepBuilderAPI.hxx>
28 static gp_Ax2 ConeComputeAxes() {
29 static Standard_Integer firsttime=1;
30 static Standard_Integer modif=0;
31 static Standard_Real cosa=cos(0.122);
32 static Standard_Real sina=sin(0.122);
33 static Standard_Real ux=1.0;
34 static Standard_Real uy=0.0;
37 modif = getenv("PRIM_CONE") != NULL;
41 Standard_Real nux = cosa*ux+sina*uy;
42 Standard_Real nuy =-sina*ux+cosa*uy;
44 return(gp_Ax2(gp::Origin(),gp::DZ(),gp_Dir(ux,uy,0.0)));
53 //=======================================================================
54 //function : BRepPrimAPI_MakeCone
56 //=======================================================================
58 BRepPrimAPI_MakeCone::BRepPrimAPI_MakeCone(const Standard_Real R1,
59 const Standard_Real R2,
60 const Standard_Real H) :
61 myCone(ConeComputeAxes(),R1, R2, H)
66 //=======================================================================
67 //function : BRepPrimAPI_MakeCone
69 //=======================================================================
71 BRepPrimAPI_MakeCone::BRepPrimAPI_MakeCone(const Standard_Real R1,
72 const Standard_Real R2,
73 const Standard_Real H,
74 const Standard_Real angle) :
81 //=======================================================================
82 //function : BRepPrimAPI_MakeCone
84 //=======================================================================
86 BRepPrimAPI_MakeCone::BRepPrimAPI_MakeCone(const gp_Ax2& Axes,
87 const Standard_Real R1,
88 const Standard_Real R2,
89 const Standard_Real H) :
90 myCone( Axes, R1, R2, H)
95 //=======================================================================
96 //function : BRepPrimAPI_MakeCone
98 //=======================================================================
100 BRepPrimAPI_MakeCone::BRepPrimAPI_MakeCone(const gp_Ax2& Axes,
101 const Standard_Real R1,
102 const Standard_Real R2,
103 const Standard_Real H,
104 const Standard_Real angle) :
105 myCone( Axes, R1, R2, H)
111 //=======================================================================
114 //=======================================================================
116 Standard_Address BRepPrimAPI_MakeCone::OneAxis()
122 //=======================================================================
125 //=======================================================================
127 BRepPrim_Cone& BRepPrimAPI_MakeCone::Cone()