Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1994-07-12
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1994-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 _BRepOffsetAPI_MakePipe_HeaderFile
0018 #define _BRepOffsetAPI_MakePipe_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepFill_Pipe.hxx>
0025 #include <BRepPrimAPI_MakeSweep.hxx>
0026 #include <GeomFill_Trihedron.hxx>
0027 class TopoDS_Wire;
0028 class TopoDS_Shape;
0029 
0030 
0031 //! Describes functions to build pipes.
0032 //! A pipe is built a basis shape (called the profile) along
0033 //! a wire (called the spine) by sweeping.
0034 //! The profile must not contain solids.
0035 //! A MakePipe object provides a framework for:
0036 //! - defining the construction of a pipe,
0037 //! - implementing the construction algorithm, and
0038 //! - consulting the result.
0039 //! Warning
0040 //! The MakePipe class implements pipe constructions
0041 //! with G1 continuous spines only.
0042 class BRepOffsetAPI_MakePipe  : public BRepPrimAPI_MakeSweep
0043 {
0044 public:
0045 
0046   DEFINE_STANDARD_ALLOC
0047 
0048   
0049   //! Constructs a pipe by sweeping the shape Profile along
0050   //! the wire Spine.The angle made by the spine with the profile is
0051   //! maintained along the length of the pipe.
0052   //! Warning
0053   //! Spine must be G1 continuous; that is, on the connection
0054   //! vertex of two edges of the wire, the tangent vectors on
0055   //! the left and on the right must have the same direction,
0056   //! though not necessarily the same magnitude.
0057   //! Exceptions
0058   //! Standard_DomainError if the profile is a solid or a
0059   //! composite solid.
0060   Standard_EXPORT BRepOffsetAPI_MakePipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile);
0061   
0062   //! the same as previous but with setting of
0063   //! mode of sweep and the flag that indicates attempt
0064   //! to approximate a C1-continuous surface if a swept
0065   //! surface proved to be C0.
0066   Standard_EXPORT BRepOffsetAPI_MakePipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const GeomFill_Trihedron aMode, const Standard_Boolean ForceApproxC1 = Standard_False);
0067   
0068   Standard_EXPORT const BRepFill_Pipe& Pipe() const;
0069   
0070   //! Builds the resulting shape (redefined from MakeShape).
0071   Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
0072   
0073   //! Returns the  TopoDS  Shape of the bottom of the prism.
0074   Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE;
0075   
0076   //! Returns the TopoDS Shape of the top of the prism.
0077   Standard_EXPORT TopoDS_Shape LastShape() Standard_OVERRIDE;
0078   
0079   Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
0080   
0081   Standard_EXPORT TopoDS_Shape Generated(const TopoDS_Shape& SSpine, const TopoDS_Shape& SProfile);
0082   
0083   Standard_EXPORT Standard_Real ErrorOnSurface() const;
0084 
0085 
0086 
0087 
0088 protected:
0089 
0090 
0091 
0092 
0093 
0094 private:
0095 
0096 
0097 
0098   BRepFill_Pipe myPipe;
0099 
0100 
0101 };
0102 
0103 
0104 
0105 
0106 
0107 
0108 
0109 #endif // _BRepOffsetAPI_MakePipe_HeaderFile