1 // Created on: 1992-11-05
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1992-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 #ifndef _BRepPrim_Revolution_HeaderFile
18 #define _BRepPrim_Revolution_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <BRepPrim_OneAxis.hxx>
25 #include <Standard_Real.hxx>
34 //! Implement the OneAxis algorithm for a revolution
36 class BRepPrim_Revolution : public BRepPrim_OneAxis
43 //! Create a revolution body <M> is the meridian nd
44 //! must be in the XZ plane of <A>. <PM> is the
45 //! meridian in the XZ plane.
46 Standard_EXPORT BRepPrim_Revolution(const gp_Ax2& A, const Standard_Real VMin, const Standard_Real VMax, const Handle(Geom_Curve)& M, const Handle(Geom2d_Curve)& PM);
48 //! The surface normal should be directed towards the
50 Standard_EXPORT virtual TopoDS_Face MakeEmptyLateralFace() const;
52 //! Returns an edge with a 3D curve made from the
53 //! meridian in the XZ plane rotated by <Ang> around
54 //! the Z-axis. Ang may be 0 or myAngle.
55 Standard_EXPORT virtual TopoDS_Edge MakeEmptyMeridianEdge (const Standard_Real Ang) const;
57 //! Returns the meridian point at parameter <V> in the
59 Standard_EXPORT virtual gp_Pnt2d MeridianValue (const Standard_Real V) const;
61 //! Sets the parametric urve of the edge <E> in the
62 //! face <F> to be the 2d representation of the
64 Standard_EXPORT virtual void SetMeridianPCurve (TopoDS_Edge& E, const TopoDS_Face& F) const;
72 //! Create a revolution body. The meridian is set
73 //! later. Reserved for derivated classes.
74 Standard_EXPORT BRepPrim_Revolution(const gp_Ax2& A, const Standard_Real VMin, const Standard_Real VMax);
76 Standard_EXPORT void Meridian (const Handle(Geom_Curve)& M, const Handle(Geom2d_Curve)& PM);
85 Handle(Geom_Curve) myMeridian;
86 Handle(Geom2d_Curve) myPMeridian;
97 #endif // _BRepPrim_Revolution_HeaderFile