Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-05 09:24:31

0001 // Created on: 1993-06-16
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _TopOpeBRepBuild_WireEdgeSet_HeaderFile
0018 #define _TopOpeBRepBuild_WireEdgeSet_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopoDS_Face.hxx>
0024 #include <TopOpeBRepBuild_ShapeSet.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <NCollection_List.hxx>
0027 #include <TopAbs_Orientation.hxx>
0028 #include <Standard_Integer.hxx>
0029 #include <TCollection_AsciiString.hxx>
0030 class TopoDS_Shape;
0031 class gp_Pnt2d;
0032 class gp_Vec2d;
0033 class TopoDS_Edge;
0034 class TCollection_AsciiString;
0035 
0036 //! a bound is a wire, a boundelement is an edge.
0037 //! The ShapeSet stores :
0038 //! - a list of wire (bounds),
0039 //! - a list of edge (boundelements) to start reconstructions,
0040 //! - a map of vertex giving the list of edge incident to a vertex.
0041 class TopOpeBRepBuild_WireEdgeSet : public TopOpeBRepBuild_ShapeSet
0042 {
0043 public:
0044   DEFINE_STANDARD_ALLOC
0045 
0046   //! Creates a WireEdgeSet to build edges connected by vertices
0047   //! on face F. Edges of the WireEdgeSet must have a representation
0048   //! on surface of face F.
0049   Standard_EXPORT TopOpeBRepBuild_WireEdgeSet(const TopoDS_Shape& F, void* const Addr = nullptr);
0050 
0051   //! value of field myFace
0052   Standard_EXPORT const TopoDS_Face& Face() const;
0053 
0054   Standard_EXPORT void AddShape(const TopoDS_Shape& S) override;
0055 
0056   Standard_EXPORT void AddStartElement(const TopoDS_Shape& S) override;
0057 
0058   Standard_EXPORT void AddElement(const TopoDS_Shape& S) override;
0059 
0060   Standard_EXPORT void InitNeighbours(const TopoDS_Shape& E) override;
0061 
0062   //! Build the list of neighbour edges of edge myCurrentShape
0063   //! Initialize iterator of neighbour edges to edge myCurrentShape
0064   Standard_EXPORT void FindNeighbours() override;
0065 
0066   Standard_EXPORT const NCollection_List<TopoDS_Shape>& MakeNeighboursList(
0067     const TopoDS_Shape& E,
0068     const TopoDS_Shape& V) override;
0069 
0070   Standard_EXPORT static void IsUVISO(const TopoDS_Edge& E,
0071                                       const TopoDS_Face& F,
0072                                       bool&              uiso,
0073                                       bool&              viso);
0074 
0075   Standard_EXPORT void DumpSS() override;
0076 
0077   Standard_EXPORT TCollection_AsciiString
0078     SName(const TopoDS_Shape&            S,
0079           const TCollection_AsciiString& sb = "",
0080           const TCollection_AsciiString& sa = "") const override;
0081 
0082   Standard_EXPORT TCollection_AsciiString
0083     SName(const NCollection_List<TopoDS_Shape>& S,
0084           const TCollection_AsciiString&        sb = "",
0085           const TCollection_AsciiString&        sa = "") const override;
0086 
0087   Standard_EXPORT TCollection_AsciiString
0088     SNameori(const TopoDS_Shape&            S,
0089              const TCollection_AsciiString& sb = "",
0090              const TCollection_AsciiString& sa = "") const override;
0091 
0092   Standard_EXPORT TCollection_AsciiString
0093     SNameori(const NCollection_List<TopoDS_Shape>& S,
0094              const TCollection_AsciiString&        sb = "",
0095              const TCollection_AsciiString&        sa = "") const override;
0096 
0097 private:
0098   //! Indicates whether vertex V is a good connexity vertex between
0099   //! edges E1 and E2.
0100   //! i.e, returns True if V is shared by E1 and E2 and if V has different
0101   //! orientations on E1 and E2.
0102   //! If V is shared by E1 and E2, returns the orientation of V on E1 and E2
0103   Standard_EXPORT bool VertexConnectsEdges(const TopoDS_Shape& V,
0104                                            const TopoDS_Shape& E1,
0105                                            const TopoDS_Shape& E2,
0106                                            TopAbs_Orientation& O1,
0107                                            TopAbs_Orientation& O2) const;
0108 
0109   Standard_EXPORT bool VertexConnectsEdgesClosing(const TopoDS_Shape& V,
0110                                                   const TopoDS_Shape& E1,
0111                                                   const TopoDS_Shape& E2) const;
0112 
0113   Standard_EXPORT int NbClosingShapes(const NCollection_List<TopoDS_Shape>& L) const;
0114 
0115   Standard_EXPORT void LocalD1(const TopoDS_Shape& F,
0116                                const TopoDS_Shape& E,
0117                                const TopoDS_Shape& V,
0118                                gp_Pnt2d&           p2,
0119                                gp_Vec2d&           v2) const;
0120 
0121   //! indicates if the edge <E> is a closing edge of myFace
0122   Standard_EXPORT bool IsClosed(const TopoDS_Shape& E) const;
0123 
0124   //! indicates if the edge <E> is a closing edge on U of myFace
0125   Standard_EXPORT bool IsUClosed(const TopoDS_Shape& E) const;
0126 
0127   //! indicates if the edge <E> is a closing edge on V of myFace
0128   Standard_EXPORT bool IsVClosed(const TopoDS_Shape& E) const;
0129 
0130   Standard_EXPORT TCollection_AsciiString SNameVEE(const TopoDS_Shape& V,
0131                                                    const TopoDS_Shape& E1,
0132                                                    const TopoDS_Shape& E2) const;
0133 
0134   Standard_EXPORT TCollection_AsciiString SNameVEL(const TopoDS_Shape&                   V,
0135                                                    const TopoDS_Shape&                   E,
0136                                                    const NCollection_List<TopoDS_Shape>& L) const;
0137 
0138   TopoDS_Face myFace;
0139 };
0140 
0141 #endif // _TopOpeBRepBuild_WireEdgeSet_HeaderFile