Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-10-19
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1995-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 _BRepOffset_Offset_HeaderFile
0018 #define _BRepOffset_Offset_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepOffset_Status.hxx>
0025 #include <TopoDS_Face.hxx>
0026 #include <TopTools_DataMapOfShapeShape.hxx>
0027 #include <GeomAbs_JoinType.hxx>
0028 #include <GeomAbs_Shape.hxx>
0029 #include <TopTools_ListOfShape.hxx>
0030 class TopoDS_Edge;
0031 class TopoDS_Vertex;
0032 
0033 // resolve name collisions with X11 headers
0034 #ifdef Status
0035   #undef Status
0036 #endif
0037 
0038 //! This class compute elemenary offset surface.
0039 //! Evaluate the offset generated :
0040 //! 1 - from a face.
0041 //! 2 - from an edge.
0042 //! 3 - from a vertex.
0043 class BRepOffset_Offset 
0044 {
0045 public:
0046 
0047   DEFINE_STANDARD_ALLOC
0048 
0049   
0050   Standard_EXPORT BRepOffset_Offset();
0051   
0052   Standard_EXPORT BRepOffset_Offset(const TopoDS_Face& Face, const Standard_Real Offset, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
0053   
0054   //! This method will be  called when you want to share
0055   //! the  edges  soon generated  from  an other  face.
0056   //! e.g. when two faces are  tangents the common  edge
0057   //! will generate only one edge ( no pipe).
0058   //!
0059   //! The Map  will be fill  as  follow:
0060   //!
0061   //! Created(E) = E'
0062   //! with: E  = an edge of <Face>
0063   //! E' = the image of E in the offsetting  of
0064   //! another  face  sharing E  with a
0065   //! continuity at least G1
0066   Standard_EXPORT BRepOffset_Offset(const TopoDS_Face& Face, const Standard_Real Offset, const TopTools_DataMapOfShapeShape& Created, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
0067   
0068   Standard_EXPORT BRepOffset_Offset(const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
0069   
0070   Standard_EXPORT BRepOffset_Offset(const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
0071   
0072   //! Tol and Conti are only used if Polynomial is True
0073   //! (Used to perform the approximation)
0074   Standard_EXPORT BRepOffset_Offset(const TopoDS_Vertex& Vertex, const TopTools_ListOfShape& LEdge, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
0075   
0076   Standard_EXPORT void Init (const TopoDS_Face& Face, const Standard_Real Offset, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
0077   
0078   Standard_EXPORT void Init (const TopoDS_Face& Face, const Standard_Real Offset, const TopTools_DataMapOfShapeShape& Created, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
0079   
0080   Standard_EXPORT void Init (const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
0081   
0082   Standard_EXPORT void Init (const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
0083   
0084   //! Tol and Conti are only used if Polynomial is True
0085   //! (Used to perform the approximation)
0086   Standard_EXPORT void Init (const TopoDS_Vertex& Vertex, const TopTools_ListOfShape& LEdge, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
0087   
0088   //! Only used in Rolling Ball. Pipe on Free Boundary
0089   Standard_EXPORT void Init (const TopoDS_Edge& Edge, const Standard_Real Offset);
0090   
0091     const TopoDS_Shape& InitialShape() const;
0092   
0093   Standard_EXPORT const TopoDS_Face& Face() const;
0094   
0095   Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& Shape) const;
0096   
0097   Standard_EXPORT BRepOffset_Status Status() const;
0098 
0099 
0100 
0101 
0102 protected:
0103 
0104 
0105 
0106 
0107 
0108 private:
0109 
0110 
0111 
0112   TopoDS_Shape myShape;
0113   BRepOffset_Status myStatus;
0114   TopoDS_Face myFace;
0115   TopTools_DataMapOfShapeShape myMap;
0116 
0117 
0118 };
0119 
0120 
0121 #include <BRepOffset_Offset.lxx>
0122 
0123 
0124 
0125 
0126 
0127 #endif // _BRepOffset_Offset_HeaderFile