Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-21 09:16:31

0001 // Created on: 2003-10-21
0002 // Created by: Mikhail KLOKOV
0003 // Copyright (c) 2003-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _BRepFill_TrimShellCorner_HeaderFile
0017 #define _BRepFill_TrimShellCorner_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022 
0023 #include <BRepFill_TransitionStyle.hxx>
0024 #include <gp_Ax2.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <NCollection_Array2.hxx>
0027 #include <NCollection_HArray2.hxx>
0028 #include <NCollection_Array1.hxx>
0029 #include <NCollection_HArray1.hxx>
0030 #include <NCollection_List.hxx>
0031 #include <TopTools_ShapeMapHasher.hxx>
0032 #include <NCollection_DataMap.hxx>
0033 #include <BOPDS_PDS.hxx>
0034 
0035 //! Trims sets of faces in the corner to make proper parts of pipe
0036 class BRepFill_TrimShellCorner
0037 {
0038 public:
0039   DEFINE_STANDARD_ALLOC
0040 
0041   //! Constructor: takes faces to intersect,
0042   //! type of transition (it can be RightCorner or RoundCorner)
0043   //! and axis of bisector plane
0044   //! theIntersectPointCrossDirection : prev path direction at the origin point of theAxeOfBisPlane
0045   //! cross next path direction at the origin point of theAxeOfBisPlane. used when EE has more than
0046   //! one vertices
0047   Standard_EXPORT BRepFill_TrimShellCorner(
0048     const occ::handle<NCollection_HArray2<TopoDS_Shape>>& theFaces,
0049     const BRepFill_TransitionStyle                        theTransition,
0050     const gp_Ax2&                                         theAxeOfBisPlane,
0051     const gp_Vec&                                         theIntPointCrossDir);
0052 
0053   Standard_EXPORT void AddBounds(const occ::handle<NCollection_HArray2<TopoDS_Shape>>& Bounds);
0054 
0055   Standard_EXPORT void AddUEdges(const occ::handle<NCollection_HArray2<TopoDS_Shape>>& theUEdges);
0056 
0057   Standard_EXPORT void AddVEdges(const occ::handle<NCollection_HArray2<TopoDS_Shape>>& theVEdges,
0058                                  const int                                             theIndex);
0059 
0060   Standard_EXPORT void Perform();
0061 
0062   Standard_EXPORT bool IsDone() const;
0063 
0064   Standard_EXPORT bool HasSection() const;
0065 
0066   Standard_EXPORT void Modified(const TopoDS_Shape& S, NCollection_List<TopoDS_Shape>& theModified);
0067 
0068 private:
0069   bool MakeFacesSec(const int        theIndex,
0070                     const BOPDS_PDS& theDS,
0071                     const int        theFaceIndex1,
0072                     const int        theFaceIndex2,
0073                     const int        theSSInterfIndex);
0074 
0075   bool MakeFacesNonSec(const int        theIndex,
0076                        const BOPDS_PDS& theDS,
0077                        const int        theFaceIndex1,
0078                        const int        theFaceIndex2);
0079 
0080   bool ChooseSection(const TopoDS_Shape&  Comp,
0081                      const TopoDS_Vertex& theFirstVertex,
0082                      const TopoDS_Vertex& theLastVertex,
0083                      TopoDS_Shape&        resWire,
0084                      gp_Pln&              resPlane,
0085                      bool&                IsSingular);
0086 
0087   BRepFill_TransitionStyle                       myTransition;
0088   gp_Ax2                                         myAxeOfBisPlane;
0089   gp_Vec                                         myIntPointCrossDir;
0090   TopoDS_Shape                                   myShape1;
0091   TopoDS_Shape                                   myShape2;
0092   occ::handle<NCollection_HArray2<TopoDS_Shape>> myBounds;
0093   occ::handle<NCollection_HArray2<TopoDS_Shape>> myUEdges;
0094   occ::handle<NCollection_HArray1<TopoDS_Shape>> myVEdges;
0095   occ::handle<NCollection_HArray2<TopoDS_Shape>> myFaces;
0096   bool                                           myDone;
0097   bool                                           myHasSection;
0098   NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0099     myHistMap;
0100 };
0101 
0102 #endif // _BRepFill_TrimShellCorner_HeaderFile