Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _BRepFill_Draft_HeaderFile
0015 #define _BRepFill_Draft_HeaderFile
0016 
0017 #include <Standard.hxx>
0018 #include <Standard_DefineAlloc.hxx>
0019 #include <Standard_Handle.hxx>
0020 
0021 #include <gp_Dir.hxx>
0022 #include <Standard_Real.hxx>
0023 #include <TopTools_HArray2OfShape.hxx>
0024 #include <TopTools_ListOfShape.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <TopoDS_Shell.hxx>
0027 #include <TopoDS_Wire.hxx>
0028 #include <GeomAbs_Shape.hxx>
0029 #include <BRepFill_TransitionStyle.hxx>
0030 #include <Standard_Boolean.hxx>
0031 class BRepFill_DraftLaw;
0032 class BRepFill_SectionLaw;
0033 class Geom_Surface;
0034 class Bnd_Box;
0035 
0036 
0037 
0038 class BRepFill_Draft 
0039 {
0040 public:
0041 
0042   DEFINE_STANDARD_ALLOC
0043 
0044   
0045   Standard_EXPORT BRepFill_Draft(const TopoDS_Shape& Shape, const gp_Dir& Dir, const Standard_Real Angle);
0046   
0047   Standard_EXPORT void SetOptions (const BRepFill_TransitionStyle Style = BRepFill_Right, const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 3.0);
0048   
0049   Standard_EXPORT void SetDraft (const Standard_Boolean IsInternal = Standard_False);
0050   
0051   Standard_EXPORT void Perform (const Standard_Real LengthMax);
0052   
0053   Standard_EXPORT void Perform (const Handle(Geom_Surface)& Surface, const Standard_Boolean KeepInsideSurface = Standard_True);
0054   
0055   Standard_EXPORT void Perform (const TopoDS_Shape& StopShape, const Standard_Boolean KeepOutSide = Standard_True);
0056   
0057   Standard_EXPORT Standard_Boolean IsDone() const;
0058   
0059   //! Returns the draft surface
0060   //! To have the complete shape
0061   //! you have to use the Shape() methode.
0062   Standard_EXPORT TopoDS_Shell Shell() const;
0063   
0064   //! Returns the  list   of shapes generated   from the
0065   //! shape <S>.
0066   Standard_EXPORT const TopTools_ListOfShape& Generated (const TopoDS_Shape& S);
0067   
0068   Standard_EXPORT TopoDS_Shape Shape() const;
0069 
0070 
0071 
0072 
0073 protected:
0074 
0075 
0076 
0077 
0078 
0079 private:
0080 
0081   
0082   Standard_EXPORT void Init (const Handle(Geom_Surface)& Surf, const Standard_Real Length, const Bnd_Box& Box);
0083   
0084   Standard_EXPORT void BuildShell (const Handle(Geom_Surface)& Surf, const Standard_Boolean KeepOutSide = Standard_False);
0085   
0086   Standard_EXPORT Standard_Boolean Fuse (const TopoDS_Shape& S, const Standard_Boolean KeepOutSide);
0087   
0088   Standard_EXPORT Standard_Boolean Sewing();
0089 
0090 
0091   gp_Dir myDir;
0092   Standard_Real myAngle;
0093   Standard_Real angmin;
0094   Standard_Real angmax;
0095   Standard_Real myTol;
0096   Handle(BRepFill_DraftLaw) myLoc;
0097   Handle(BRepFill_SectionLaw) mySec;
0098   Handle(TopTools_HArray2OfShape) mySections;
0099   Handle(TopTools_HArray2OfShape) myFaces;
0100   TopTools_ListOfShape myGenerated;
0101   TopoDS_Shape myShape;
0102   TopoDS_Shape myTop;
0103   TopoDS_Shell myShell;
0104   TopoDS_Wire myWire;
0105   GeomAbs_Shape myCont;
0106   BRepFill_TransitionStyle myStyle;
0107   Standard_Boolean IsInternal;
0108   Standard_Boolean myDone;
0109 
0110 
0111 };
0112 
0113 
0114 
0115 
0116 
0117 
0118 
0119 #endif // _BRepFill_Draft_HeaderFile