// Created on: 1993-06-14
// Created by: Jean Yves LEBEY
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

#ifndef _TopOpeBRepBuild_BuilderON_HeaderFile
#define _TopOpeBRepBuild_BuilderON_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>

#include <TopoDS_Shape.hxx>
#include <TopOpeBRepDS_Interference.hxx>
#include <NCollection_List.hxx>
class TopOpeBRepDS_Interference;
class TopOpeBRepDS_DataStructure;
class TopOpeBRepBuild_Builder;
class TopOpeBRepBuild_GTopo;
class TopOpeBRepBuild_WireEdgeSet;

class TopOpeBRepBuild_BuilderON
{
public:
  DEFINE_STANDARD_ALLOC

  Standard_EXPORT TopOpeBRepBuild_BuilderON();

  Standard_EXPORT TopOpeBRepBuild_BuilderON(TopOpeBRepBuild_Builder* const&        PB,
                                            const TopoDS_Shape&                    F,
                                            TopOpeBRepBuild_GTopo* const&          PG,
                                            NCollection_List<TopoDS_Shape>* const& PLSclass,
                                            TopOpeBRepBuild_WireEdgeSet* const&    PWES);

  Standard_EXPORT void Perform(TopOpeBRepBuild_Builder* const&        PB,
                               const TopoDS_Shape&                    F,
                               TopOpeBRepBuild_GTopo* const&          PG,
                               NCollection_List<TopoDS_Shape>* const& PLSclass,
                               TopOpeBRepBuild_WireEdgeSet* const&    PWES);

  Standard_EXPORT bool GFillONCheckI(const occ::handle<TopOpeBRepDS_Interference>& I) const;

  Standard_EXPORT void GFillONPartsWES1(const occ::handle<TopOpeBRepDS_Interference>& I);

  Standard_EXPORT void GFillONPartsWES2(const occ::handle<TopOpeBRepDS_Interference>& I,
                                        const TopoDS_Shape&                           EspON);

  Standard_EXPORT void Perform2d(TopOpeBRepBuild_Builder* const&        PB,
                                 const TopoDS_Shape&                    F,
                                 TopOpeBRepBuild_GTopo* const&          PG,
                                 NCollection_List<TopoDS_Shape>* const& PLSclass,
                                 TopOpeBRepBuild_WireEdgeSet* const&    PWES,
                                 TopOpeBRepDS_DataStructure&            DS2d);

  Standard_EXPORT void GFillONParts2dWES2(const occ::handle<TopOpeBRepDS_Interference>& I,
                                          const TopoDS_Shape&                           EspON);

private:
  TopOpeBRepBuild_Builder*                                 myPB;
  TopOpeBRepBuild_GTopo*                                   myPG;
  NCollection_List<TopoDS_Shape>*                          myPLSclass;
  TopOpeBRepBuild_WireEdgeSet*                             myPWES;
  TopoDS_Shape                                             myFace;
  NCollection_List<occ::handle<TopOpeBRepDS_Interference>> myFEI;
};

#endif // _TopOpeBRepBuild_BuilderON_HeaderFile
