Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-26 08:16:44

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 //! Describes functions to build pipes.
0031 //! A pipe is built a basis shape (called the profile) along
0032 //! a wire (called the spine) by sweeping.
0033 //! The profile must not contain solids.
0034 //! A MakePipe object provides a framework for:
0035 //! - defining the construction of a pipe,
0036 //! - implementing the construction algorithm, and
0037 //! - consulting the result.
0038 //! Warning
0039 //! The MakePipe class implements pipe constructions
0040 //! with G1 continuous spines only.
0041 class BRepOffsetAPI_MakePipe : public BRepPrimAPI_MakeSweep
0042 {
0043 public:
0044   DEFINE_STANDARD_ALLOC
0045 
0046   //! Constructs a pipe by sweeping the shape Profile along
0047   //! the wire Spine.The angle made by the spine with the profile is
0048   //! maintained along the length of the pipe.
0049   //! Warning
0050   //! Spine must be G1 continuous; that is, on the connection
0051   //! vertex of two edges of the wire, the tangent vectors on
0052   //! the left and on the right must have the same direction,
0053   //! though not necessarily the same magnitude.
0054   //! Exceptions
0055   //! Standard_DomainError if the profile is a solid or a
0056   //! composite solid.
0057   Standard_EXPORT BRepOffsetAPI_MakePipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile);
0058 
0059   //! the same as previous but with setting of
0060   //! mode of sweep and the flag that indicates attempt
0061   //! to approximate a C1-continuous surface if a swept
0062   //! surface proved to be C0.
0063   Standard_EXPORT BRepOffsetAPI_MakePipe(const TopoDS_Wire&       Spine,
0064                                          const TopoDS_Shape&      Profile,
0065                                          const GeomFill_Trihedron aMode,
0066                                          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(
0072     const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
0073 
0074   //! Returns the  TopoDS  Shape of the bottom of the prism.
0075   Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE;
0076 
0077   //! Returns the TopoDS Shape of the top of the prism.
0078   Standard_EXPORT TopoDS_Shape LastShape() Standard_OVERRIDE;
0079 
0080   Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& S)
0081     Standard_OVERRIDE;
0082 
0083   Standard_EXPORT TopoDS_Shape Generated(const TopoDS_Shape& SSpine, const TopoDS_Shape& SProfile);
0084 
0085   Standard_EXPORT Standard_Real ErrorOnSurface() const;
0086 
0087 protected:
0088 private:
0089   BRepFill_Pipe myPipe;
0090 };
0091 
0092 #endif // _BRepOffsetAPI_MakePipe_HeaderFile