Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-30 09:02:49

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 <NCollection_List.hxx>
0024 #include <BOPTools_ConnexityBlock.hxx>
0025 #include <BOPAlgo_Algo.hxx>
0026 #include <IntTools_Context.hxx>
0027 #include <NCollection_BaseAllocator.hxx>
0028 #include <TopoDS_Shape.hxx>
0029 class TopoDS_Wire;
0030 class TopoDS_Face;
0031 
0032 //! The class is to build loops from the given set of edges.
0033 //!
0034 //! It returns the following Error statuses
0035 //! - *BOPAlgo_AlertNullInputShapes* - in case there no input edges to build the loops.
0036 //!
0037 class BOPAlgo_WireSplitter : public BOPAlgo_Algo
0038 {
0039 public:
0040   DEFINE_STANDARD_ALLOC
0041 
0042   Standard_EXPORT BOPAlgo_WireSplitter();
0043   Standard_EXPORT ~BOPAlgo_WireSplitter() override;
0044 
0045   Standard_EXPORT BOPAlgo_WireSplitter(const occ::handle<NCollection_BaseAllocator>& theAllocator);
0046 
0047   Standard_EXPORT void SetWES(const BOPAlgo_WireEdgeSet& theWES);
0048 
0049   Standard_EXPORT BOPAlgo_WireEdgeSet& WES();
0050 
0051   //! Sets the context for the algorithm
0052   Standard_EXPORT void SetContext(const occ::handle<IntTools_Context>& theContext);
0053 
0054   //! Returns the context
0055   Standard_EXPORT const occ::handle<IntTools_Context>& Context();
0056 
0057   Standard_EXPORT void Perform(
0058     const Message_ProgressRange& theRange = Message_ProgressRange()) override;
0059 
0060   static void MakeWire(NCollection_List<TopoDS_Shape>& theLE, TopoDS_Wire& theW);
0061 
0062   Standard_EXPORT static void SplitBlock(const TopoDS_Face&                   theF,
0063                                          BOPTools_ConnexityBlock&             theCB,
0064                                          const occ::handle<IntTools_Context>& theContext);
0065 
0066 protected:
0067   Standard_EXPORT void CheckData() override;
0068 
0069   Standard_EXPORT void MakeWires(const Message_ProgressRange& theRange);
0070 
0071   BOPAlgo_PWireEdgeSet                      myWES;
0072   NCollection_List<BOPTools_ConnexityBlock> myLCB;
0073   occ::handle<IntTools_Context>             myContext;
0074 };
0075 
0076 #include <BOPAlgo_WireSplitter.lxx>
0077 
0078 #endif // _BOPAlgo_WireSplitter_HeaderFile