Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1994-06-07
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 _BRepFill_Pipe_HeaderFile
0018 #define _BRepFill_Pipe_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopoDS_Wire.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <gp_Trsf.hxx>
0027 #include <TopTools_MapOfShape.hxx>
0028 #include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
0029 #include <TopTools_DataMapOfShapeListOfShape.hxx>
0030 #include <Standard_Integer.hxx>
0031 #include <GeomAbs_Shape.hxx>
0032 #include <GeomFill_Trihedron.hxx>
0033 class BRepFill_LocationLaw;
0034 class TopoDS_Face;
0035 class TopoDS_Edge;
0036 class TopoDS_Vertex;
0037 class gp_Pnt;
0038 class BRepFill_Sweep;
0039 
0040 
0041 //! Create a  shape by sweeping a shape  (the profile)
0042 //! along a wire (the spine).
0043 //!
0044 //! For each edge  or vertex from the spine  the  user
0045 //! may ask for the shape generated from each subshape
0046 //! of the profile.
0047 class BRepFill_Pipe 
0048 {
0049 public:
0050 
0051   DEFINE_STANDARD_ALLOC
0052 
0053   
0054   Standard_EXPORT BRepFill_Pipe();
0055   
0056   Standard_EXPORT BRepFill_Pipe(const TopoDS_Wire& Spine,
0057                                 const TopoDS_Shape& Profile,
0058                                 const GeomFill_Trihedron aMode = GeomFill_IsCorrectedFrenet,
0059                                 const Standard_Boolean ForceApproxC1 = Standard_False,
0060                                 const Standard_Boolean GeneratePartCase = Standard_False);
0061   
0062   Standard_EXPORT void Perform (const TopoDS_Wire& Spine,
0063                                 const TopoDS_Shape& Profile,
0064                                 const Standard_Boolean GeneratePartCase = Standard_False);
0065   
0066   Standard_EXPORT const TopoDS_Shape& Spine() const;
0067   
0068   Standard_EXPORT const TopoDS_Shape& Profile() const;
0069   
0070   Standard_EXPORT const TopoDS_Shape& Shape() const;
0071   
0072   Standard_EXPORT Standard_Real ErrorOnSurface() const;
0073   
0074   Standard_EXPORT const TopoDS_Shape& FirstShape() const;
0075   
0076   Standard_EXPORT const TopoDS_Shape& LastShape() const;
0077   
0078   //! Returns the  list   of shapes generated   from the
0079   //! shape <S>.
0080   Standard_EXPORT void Generated (const TopoDS_Shape& S, TopTools_ListOfShape& L);
0081   
0082   //! Returns the face created from an edge of the spine
0083   //! and an edge of the profile.
0084   //! if the edges are not in the spine or the profile
0085   Standard_EXPORT TopoDS_Face Face (const TopoDS_Edge& ESpine, const TopoDS_Edge& EProfile);
0086   
0087   //! Returns the edge created from an edge of the spine
0088   //! and a vertex of the profile.
0089   //! if the edge or the vertex are not in  the spine or
0090   //! the profile.
0091   Standard_EXPORT TopoDS_Edge Edge (const TopoDS_Edge& ESpine, const TopoDS_Vertex& VProfile);
0092   
0093   //! Returns  the shape created from the profile at the
0094   //! position of the vertex VSpine.
0095   //! if the vertex is not in the Spine
0096   Standard_EXPORT TopoDS_Shape Section (const TopoDS_Vertex& VSpine) const;
0097   
0098   //! Create a Wire by sweeping the Point along the <spine>
0099   //! if the <Spine> is undefined
0100   Standard_EXPORT TopoDS_Wire PipeLine (const gp_Pnt& Point);
0101 
0102 
0103 
0104 
0105 protected:
0106 
0107 
0108 
0109 
0110 
0111 private:
0112 
0113   
0114   //! Auxiliary  recursive  method  used  to  build  the
0115   //! result.
0116   Standard_EXPORT TopoDS_Shape MakeShape (const TopoDS_Shape& S,
0117                                           const TopoDS_Shape& theOriginalS,
0118                                           const TopoDS_Shape& FirstShape,
0119                                           const TopoDS_Shape& LastShape);
0120   
0121   //! Auxiliary recursive method used to find the edge's index
0122   Standard_EXPORT Standard_Integer FindEdge (const TopoDS_Shape& S,
0123                                              const TopoDS_Edge& E,
0124                                              Standard_Integer& Init) const;
0125   
0126   Standard_EXPORT Standard_Integer FindVertex (const TopoDS_Shape& S, const
0127                                                TopoDS_Vertex& V,
0128                                                Standard_Integer& Init) const;
0129   
0130   Standard_EXPORT void DefineRealSegmax();
0131   
0132   Standard_EXPORT void RebuildTopOrBottomFace (const TopoDS_Shape& aFace,
0133                                                const Standard_Boolean IsTop) const;
0134   
0135   Standard_EXPORT void BuildHistory (const BRepFill_Sweep& theSweep,
0136                                      const TopoDS_Shape&   theSection);
0137 
0138 
0139   TopoDS_Wire mySpine;
0140   TopoDS_Shape myProfile;
0141   TopoDS_Shape myShape;
0142   gp_Trsf myTrsf;
0143   Handle(BRepFill_LocationLaw) myLoc;
0144   Handle(TopTools_HArray2OfShape) mySections;
0145   Handle(TopTools_HArray2OfShape) myFaces;
0146   Handle(TopTools_HArray2OfShape) myEdges;
0147   TopTools_MapOfShape myReversedEdges;
0148   BRepFill_DataMapOfShapeHArray2OfShape myTapes;
0149   BRepFill_DataMapOfShapeHArray2OfShape myRails;
0150   Standard_Integer myCurIndexOfSectionEdge;
0151   TopoDS_Shape myFirst;
0152   TopoDS_Shape myLast;
0153   TopTools_DataMapOfShapeListOfShape myGenMap;
0154   Standard_Integer myDegmax;
0155   Standard_Integer mySegmax;
0156   GeomAbs_Shape myContinuity;
0157   GeomFill_Trihedron myMode;
0158   Standard_Boolean myForceApproxC1;
0159   Standard_Real myErrorOnSurf;
0160 
0161 
0162 };
0163 
0164 
0165 
0166 
0167 
0168 
0169 
0170 #endif // _BRepFill_Pipe_HeaderFile