Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:16

0001 // Created on: 1993-06-22
0002 // Created by: Laurent BOURESCHE
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepSweep_Revol_HeaderFile
0018 #define _BRepSweep_Revol_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepSweep_Rotation.hxx>
0025 #include <Standard_Boolean.hxx>
0026 class TopoDS_Shape;
0027 class gp_Ax1;
0028 class Sweep_NumShape;
0029 class TopLoc_Location;
0030 
0031 
0032 //! Provides natural constructors to build BRepSweep
0033 //! rotated swept Primitives.
0034 class BRepSweep_Revol 
0035 {
0036 public:
0037 
0038   DEFINE_STANDARD_ALLOC
0039 
0040   
0041   //! Builds the Revol of meridian S axis A  and angle D. If
0042   //! C is true S is copied.
0043   Standard_EXPORT BRepSweep_Revol(const TopoDS_Shape& S, const gp_Ax1& A, const Standard_Real D, const Standard_Boolean C = Standard_False);
0044   
0045   //! Builds the Revol of meridian S  axis A and angle 2*Pi.
0046   //! If C is true S is copied.
0047   Standard_EXPORT BRepSweep_Revol(const TopoDS_Shape& S, const gp_Ax1& A, const Standard_Boolean C = Standard_False);
0048   
0049   //! Returns the TopoDS Shape attached to the Revol.
0050   Standard_EXPORT TopoDS_Shape Shape();
0051   
0052   //! Returns    the  TopoDS  Shape   generated  with  aGenS
0053   //! (subShape  of the generating shape).
0054   Standard_EXPORT TopoDS_Shape Shape (const TopoDS_Shape& aGenS);
0055   
0056   //! Returns the first shape of the revol  (coinciding with
0057   //! the generating shape).
0058   Standard_EXPORT TopoDS_Shape FirstShape();
0059   
0060   //! Returns the first shape of the revol  (coinciding with
0061   //! the generating shape).
0062   Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& aGenS);
0063   
0064   //! Returns the TopoDS Shape of the top of the prism.
0065   Standard_EXPORT TopoDS_Shape LastShape();
0066   
0067   //! Returns the  TopoDS  Shape of the top  of  the  prism.
0068   //! generated  with  aGenS  (subShape  of  the  generating
0069   //! shape).
0070   Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& aGenS);
0071   
0072   //! returns the axis
0073   Standard_EXPORT gp_Ax1 Axe() const;
0074   
0075   //! returns the angle.
0076   Standard_EXPORT Standard_Real Angle() const;
0077 
0078   //! Returns true if the aGenS is used in resulting Shape 
0079   Standard_EXPORT Standard_Boolean IsUsed(const TopoDS_Shape& aGenS) const;
0080 
0081 
0082 private:
0083 
0084   //! builds the NumShape.
0085   Standard_EXPORT Sweep_NumShape NumShape (const Standard_Real D) const;
0086   
0087   //! Builds the Location
0088   Standard_EXPORT TopLoc_Location Location (const gp_Ax1& Ax, const Standard_Real D) const;
0089   
0090   //! Builds the axis
0091   Standard_EXPORT gp_Ax1 Axe (const gp_Ax1& Ax, const Standard_Real D) const;
0092   
0093   //! computes the angle.
0094   Standard_EXPORT Standard_Real Angle (const Standard_Real D) const;
0095 
0096 
0097   BRepSweep_Rotation myRotation;
0098 
0099 
0100 };
0101 
0102 #endif // _BRepSweep_Revol_HeaderFile