Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created by: Peter KURNEV
0002 // Copyright (c) 1999-2012 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _BOPAlgo_WireSplitter_HeaderFile
0016 #define _BOPAlgo_WireSplitter_HeaderFile
0017 
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021 
0022 #include <BOPAlgo_PWireEdgeSet.hxx>
0023 #include <BOPTools_ListOfConnexityBlock.hxx>
0024 #include <BOPAlgo_Algo.hxx>
0025 #include <BOPTools_ConnexityBlock.hxx>
0026 #include <IntTools_Context.hxx>
0027 #include <NCollection_BaseAllocator.hxx>
0028 #include <TopTools_ListOfShape.hxx>
0029 class TopoDS_Wire;
0030 class TopoDS_Face;
0031 
0032 
0033 //! The class is to build loops from the given set of edges.
0034 //!
0035 //! It returns the following Error statuses
0036 //! - *BOPAlgo_AlertNullInputShapes* - in case there no input edges to build the loops.
0037 //!
0038 class BOPAlgo_WireSplitter  : public BOPAlgo_Algo
0039 {
0040 public:
0041 
0042   DEFINE_STANDARD_ALLOC
0043 
0044   
0045   Standard_EXPORT BOPAlgo_WireSplitter();
0046   Standard_EXPORT virtual ~BOPAlgo_WireSplitter();
0047   
0048   Standard_EXPORT BOPAlgo_WireSplitter(const Handle(NCollection_BaseAllocator)& theAllocator);
0049   
0050   Standard_EXPORT void SetWES (const BOPAlgo_WireEdgeSet& theWES);
0051   
0052   Standard_EXPORT BOPAlgo_WireEdgeSet& WES();
0053 
0054   //! Sets the context for the algorithm
0055   Standard_EXPORT void SetContext(const Handle(IntTools_Context)& theContext);
0056 
0057   //! Returns the context
0058   Standard_EXPORT const Handle(IntTools_Context)& Context();
0059 
0060   Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
0061   
0062   static void MakeWire(TopTools_ListOfShape& theLE, TopoDS_Wire& theW);
0063   
0064   Standard_EXPORT static void SplitBlock (const TopoDS_Face& theF,
0065                                           BOPTools_ConnexityBlock& theCB,
0066                                           const Handle(IntTools_Context)& theContext);
0067 
0068 protected:
0069 
0070   Standard_EXPORT virtual void CheckData() Standard_OVERRIDE;
0071   
0072   Standard_EXPORT void MakeWires(const Message_ProgressRange& theRange);
0073 
0074   BOPAlgo_PWireEdgeSet myWES;
0075   BOPTools_ListOfConnexityBlock myLCB;
0076   Handle(IntTools_Context) myContext;
0077 
0078 };
0079 
0080 #include <BOPAlgo_WireSplitter.lxx>
0081 
0082 #endif // _BOPAlgo_WireSplitter_HeaderFile