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_Prism_HeaderFile
0018 #define _BRepSweep_Prism_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepSweep_Translation.hxx>
0025 #include <Standard_Boolean.hxx>
0026 class TopoDS_Shape;
0027 class gp_Vec;
0028 class gp_Dir;
0029 class Sweep_NumShape;
0030 class TopLoc_Location;
0031 
0032 
0033 //! Provides natural constructors to build BRepSweep
0034 //! translated swept Primitives.
0035 class BRepSweep_Prism 
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   //! Builds the prism of base S and vector V. If C is true,
0043   //! S is copied. If Canonize is true then generated surfaces
0044   //! are attempted to be canonized in simple types
0045   Standard_EXPORT BRepSweep_Prism(const TopoDS_Shape& S, const gp_Vec& V, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True);
0046   
0047   //! Builds a semi-infinite or an infinite prism of base S.
0048   //! If Copy is true S is copied.  If Inf is true the prism
0049   //! is infinite, if Inf is false the  prism is infinite in
0050   //! the direction D. If Canonize is true then generated surfaces
0051   //! are attempted to be canonized in simple types
0052   Standard_EXPORT BRepSweep_Prism(const TopoDS_Shape& S, const gp_Dir& D, const Standard_Boolean Inf = Standard_True, const Standard_Boolean Copy = Standard_False, const Standard_Boolean Canonize = Standard_True);
0053   
0054   //! Returns the TopoDS Shape attached to the prism.
0055   Standard_EXPORT TopoDS_Shape Shape();
0056   
0057   //! Returns    the  TopoDS  Shape   generated  with  aGenS
0058   //! (subShape  of the generating shape).
0059   Standard_EXPORT TopoDS_Shape Shape (const TopoDS_Shape& aGenS);
0060   
0061   //! Returns the  TopoDS  Shape of the bottom of the prism.
0062   Standard_EXPORT TopoDS_Shape FirstShape();
0063   
0064   //! Returns the TopoDS Shape of the bottom  of the  prism.
0065   //! generated  with  aGenS  (subShape  of  the  generating
0066   //! shape).
0067   Standard_EXPORT TopoDS_Shape FirstShape (const TopoDS_Shape& aGenS);
0068   
0069   //! Returns the TopoDS Shape of the top of the prism.
0070   Standard_EXPORT TopoDS_Shape LastShape();
0071   
0072   //! Returns the  TopoDS  Shape of the top  of  the  prism.
0073   //! generated  with  aGenS  (subShape  of  the  generating
0074   //! shape).
0075   Standard_EXPORT TopoDS_Shape LastShape (const TopoDS_Shape& aGenS);
0076   
0077   //! Returns the Vector of the Prism,  if it is an infinite
0078   //! prism the Vec is unitar.
0079   Standard_EXPORT gp_Vec Vec() const;
0080 
0081 
0082   //! Returns true if the  
0083   //! aGenS is used in resulting shape
0084   Standard_EXPORT Standard_Boolean IsUsed(const TopoDS_Shape& aGenS) const;
0085 
0086   //! Returns true if the shape, generated from theS 
0087   //! is used in result shape
0088   Standard_EXPORT Standard_Boolean GenIsUsed(const TopoDS_Shape& theS) const;
0089 
0090 protected:
0091 
0092 
0093 
0094 
0095 
0096 private:
0097 
0098   
0099   //! used to build the NumShape of a limited prism.
0100   Standard_EXPORT Sweep_NumShape NumShape() const;
0101   
0102   //! used to build the NumShape of an infinite prism.
0103   Standard_EXPORT Sweep_NumShape NumShape (const Standard_Boolean Inf) const;
0104   
0105   //! used to build the Location.
0106   Standard_EXPORT TopLoc_Location Location (const gp_Vec& V) const;
0107 
0108 
0109   BRepSweep_Translation myTranslation;
0110 
0111 
0112 };
0113 
0114 
0115 
0116 
0117 
0118 
0119 
0120 #endif // _BRepSweep_Prism_HeaderFile