Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created by: Peter KURNEV
0002 // Copyright (c) 2010-2014 OPEN CASCADE SAS
0003 // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
0004 // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
0005 //                         EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
0006 //
0007 // This file is part of Open CASCADE Technology software library.
0008 //
0009 // This library is free software; you can redistribute it and/or modify it under
0010 // the terms of the GNU Lesser General Public License version 2.1 as published
0011 // by the Free Software Foundation, with special exception defined in the file
0012 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0013 // distribution for complete text of the license and disclaimer of any warranty.
0014 //
0015 // Alternatively, this file may be used under the terms of Open CASCADE
0016 // commercial license or contractual agreement.
0017 
0018 #ifndef _BOPAlgo_BuilderFace_HeaderFile
0019 #define _BOPAlgo_BuilderFace_HeaderFile
0020 
0021 #include <Standard.hxx>
0022 #include <Standard_DefineAlloc.hxx>
0023 #include <Standard_Handle.hxx>
0024 
0025 #include <TopoDS_Face.hxx>
0026 #include <TopAbs_Orientation.hxx>
0027 #include <BOPAlgo_BuilderArea.hxx>
0028 #include <NCollection_BaseAllocator.hxx>
0029 
0030 
0031 //! The algorithm to build new faces from the given faces and
0032 //! set of edges lying on this face.
0033 //!
0034 //! The algorithm returns the following Error statuses:
0035 //! - *BOPAlgo_AlertNullInputShapes* - in case the given face is a null shape.
0036 //!
0037 class BOPAlgo_BuilderFace  : public BOPAlgo_BuilderArea
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044   Standard_EXPORT BOPAlgo_BuilderFace();
0045 Standard_EXPORT virtual ~BOPAlgo_BuilderFace();
0046   
0047   Standard_EXPORT BOPAlgo_BuilderFace(const Handle(NCollection_BaseAllocator)& theAllocator);
0048   
0049   //! Sets the face generatix
0050   Standard_EXPORT void SetFace (const TopoDS_Face& theFace);
0051   
0052   //! Returns the face generatix
0053   Standard_EXPORT const TopoDS_Face& Face() const;
0054   
0055   //! Performs the algorithm
0056   Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
0057   
0058   Standard_EXPORT TopAbs_Orientation Orientation() const;
0059 
0060 protected:
0061   
0062   //! Collect the edges that
0063   //! a) are internal
0064   //! b) are the same and have different orientation
0065   Standard_EXPORT virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) Standard_OVERRIDE;
0066   
0067   //! Build draft wires
0068   //! a)myLoops - draft wires that consist of
0069   //! boundary edges
0070   //! b)myLoopsInternal - draft wires that contains
0071   //! inner edges
0072   Standard_EXPORT virtual void PerformLoops(const Message_ProgressRange& theRange) Standard_OVERRIDE;
0073   
0074   //! Build draft faces that contains boundary edges
0075   Standard_EXPORT virtual void PerformAreas(const Message_ProgressRange& theRange) Standard_OVERRIDE;
0076   
0077   //! Build finalized faces with internals
0078   Standard_EXPORT virtual void PerformInternalShapes(const Message_ProgressRange& theRange) Standard_OVERRIDE;
0079   
0080   Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
0081 
0082 protected:
0083 
0084   TopoDS_Face myFace;
0085   TopAbs_Orientation myOrientation;
0086 };
0087 
0088 #endif // _BOPAlgo_BuilderFace_HeaderFile