Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:56

0001 // Created on: 1999-09-13
0002 // Created by: data exchange team
0003 // Copyright (c) 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 _ShapeFix_FixSmallFace_HeaderFile
0018 #define _ShapeFix_FixSmallFace_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TopoDS_Shape.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <ShapeAnalysis_CheckSmallFace.hxx>
0026 #include <ShapeFix_Root.hxx>
0027 class TopoDS_Face;
0028 class TopoDS_Edge;
0029 class TopoDS_Compound;
0030 
0031 
0032 class ShapeFix_FixSmallFace;
0033 DEFINE_STANDARD_HANDLE(ShapeFix_FixSmallFace, ShapeFix_Root)
0034 
0035 //! Fixing face with small size
0036 class ShapeFix_FixSmallFace : public ShapeFix_Root
0037 {
0038 
0039 public:
0040 
0041   
0042   Standard_EXPORT ShapeFix_FixSmallFace();
0043   
0044   Standard_EXPORT void Init (const TopoDS_Shape& S);
0045   
0046 
0047   //! Fixing case of spot face
0048   Standard_EXPORT void Perform();
0049   
0050   //! Fixing case of spot face, if tol = -1 used local tolerance.
0051   Standard_EXPORT TopoDS_Shape FixSpotFace();
0052   
0053   //! Compute average vertex and replacing vertices by new one.
0054   Standard_EXPORT Standard_Boolean ReplaceVerticesInCaseOfSpot (TopoDS_Face& F, const Standard_Real tol) const;
0055   
0056   //! Remove spot face from compound
0057   Standard_EXPORT Standard_Boolean RemoveFacesInCaseOfSpot (const TopoDS_Face& F) const;
0058   
0059   //! Fixing case of strip face, if tol = -1 used local tolerance
0060   Standard_EXPORT TopoDS_Shape FixStripFace (const Standard_Boolean wasdone = Standard_False);
0061   
0062   //! Replace veretces and edges.
0063   Standard_EXPORT Standard_Boolean ReplaceInCaseOfStrip (TopoDS_Face& F, TopoDS_Edge& E1, TopoDS_Edge& E2, const Standard_Real tol) const;
0064   
0065   //! Remove strip face from compound.
0066   Standard_EXPORT Standard_Boolean RemoveFacesInCaseOfStrip (const TopoDS_Face& F) const;
0067   
0068   //! Compute average edge for strip face
0069   Standard_EXPORT TopoDS_Edge ComputeSharedEdgeForStripFace (const TopoDS_Face& F, const TopoDS_Edge& E1, const TopoDS_Edge& E2, const TopoDS_Face& F1, const Standard_Real tol) const;
0070   
0071   Standard_EXPORT TopoDS_Shape FixSplitFace (const TopoDS_Shape& S);
0072   
0073   //! Compute data for face splitting.
0074   Standard_EXPORT Standard_Boolean SplitOneFace (TopoDS_Face& F, TopoDS_Compound& theSplittedFaces);
0075   
0076   Standard_EXPORT TopoDS_Face FixFace (const TopoDS_Face& F);
0077   
0078   Standard_EXPORT TopoDS_Shape FixShape();
0079   
0080   Standard_EXPORT TopoDS_Shape Shape();
0081   
0082   Standard_EXPORT Standard_Boolean FixPinFace (TopoDS_Face& F);
0083 
0084 
0085 
0086 
0087   DEFINE_STANDARD_RTTIEXT(ShapeFix_FixSmallFace,ShapeFix_Root)
0088 
0089 protected:
0090 
0091 
0092 
0093 
0094 private:
0095 
0096 
0097   TopoDS_Shape myShape;
0098   TopoDS_Shape myResult;
0099   Standard_Integer myStatus;
0100   ShapeAnalysis_CheckSmallFace myAnalyzer;
0101 
0102 
0103 };
0104 
0105 
0106 
0107 
0108 
0109 
0110 
0111 #endif // _ShapeFix_FixSmallFace_HeaderFile