Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:25

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 <TopTools_ListOfShape.hxx>
0026 #include <TopAbs_Orientation.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <TCollection_AsciiString.hxx>
0029 class TopoDS_Shape;
0030 class gp_Pnt2d;
0031 class gp_Vec2d;
0032 class TopoDS_Edge;
0033 class TCollection_AsciiString;
0034 
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 
0045   DEFINE_STANDARD_ALLOC
0046 
0047   
0048   //! Creates a WireEdgeSet to build edges connected by vertices
0049   //! on face F. Edges of the WireEdgeSet must have a representation
0050   //! on surface of face F.
0051   Standard_EXPORT TopOpeBRepBuild_WireEdgeSet(const TopoDS_Shape& F, const Standard_Address Addr = NULL);
0052   
0053   //! value of field myFace
0054   Standard_EXPORT const TopoDS_Face& Face() const;
0055   
0056   Standard_EXPORT virtual void AddShape (const TopoDS_Shape& S) Standard_OVERRIDE;
0057   
0058   Standard_EXPORT virtual void AddStartElement (const TopoDS_Shape& S) Standard_OVERRIDE;
0059   
0060   Standard_EXPORT virtual void AddElement (const TopoDS_Shape& S) Standard_OVERRIDE;
0061   
0062   Standard_EXPORT virtual void InitNeighbours (const TopoDS_Shape& E) Standard_OVERRIDE;
0063   
0064 
0065   //! Build the list of neighbour edges of edge myCurrentShape
0066   //! Initialize iterator of neighbour edges to edge myCurrentShape
0067   Standard_EXPORT virtual void FindNeighbours() Standard_OVERRIDE;
0068   
0069   Standard_EXPORT virtual const TopTools_ListOfShape& MakeNeighboursList (const TopoDS_Shape& E, const TopoDS_Shape& V) Standard_OVERRIDE;
0070   
0071   Standard_EXPORT static void IsUVISO (const TopoDS_Edge& E, const TopoDS_Face& F, Standard_Boolean& uiso, Standard_Boolean& viso);
0072   
0073   Standard_EXPORT virtual void DumpSS() Standard_OVERRIDE;
0074   
0075   Standard_EXPORT virtual TCollection_AsciiString SName (const TopoDS_Shape& S, const TCollection_AsciiString& sb = "", const TCollection_AsciiString& sa = "") const Standard_OVERRIDE;
0076   
0077   Standard_EXPORT virtual TCollection_AsciiString SName (const TopTools_ListOfShape& S, const TCollection_AsciiString& sb = "", const TCollection_AsciiString& sa = "") const Standard_OVERRIDE;
0078   
0079   Standard_EXPORT virtual TCollection_AsciiString SNameori (const TopoDS_Shape& S, const TCollection_AsciiString& sb = "", const TCollection_AsciiString& sa = "") const Standard_OVERRIDE;
0080   
0081   Standard_EXPORT virtual TCollection_AsciiString SNameori (const TopTools_ListOfShape& S, const TCollection_AsciiString& sb = "", const TCollection_AsciiString& sa = "") const Standard_OVERRIDE;
0082 
0083 
0084 
0085 
0086 protected:
0087 
0088 
0089 
0090 
0091 
0092 private:
0093 
0094   
0095 
0096   //! Indicates whether vertex V is a good connexity vertex between
0097   //! edges E1 and E2.
0098   //! i.e, returns True if V is shared by E1 and E2 and if V has different
0099   //! orientations on E1 and E2.
0100   //! If V is shared by E1 and E2, returns the orientation of V on E1 and E2
0101   Standard_EXPORT Standard_Boolean VertexConnectsEdges (const TopoDS_Shape& V, const TopoDS_Shape& E1, const TopoDS_Shape& E2, TopAbs_Orientation& O1, TopAbs_Orientation& O2) const;
0102   
0103   Standard_EXPORT Standard_Boolean VertexConnectsEdgesClosing (const TopoDS_Shape& V, const TopoDS_Shape& E1, const TopoDS_Shape& E2) const;
0104   
0105   Standard_EXPORT Standard_Integer NbClosingShapes (const TopTools_ListOfShape& L) const;
0106   
0107   Standard_EXPORT void LocalD1 (const TopoDS_Shape& F, const TopoDS_Shape& E, const TopoDS_Shape& V, gp_Pnt2d& p2, gp_Vec2d& v2) const;
0108   
0109   //! indicates if the edge <E> is a closing edge of myFace
0110   Standard_EXPORT Standard_Boolean IsClosed (const TopoDS_Shape& E) const;
0111   
0112   //! indicates if the edge <E> is a closing edge on U of myFace
0113   Standard_EXPORT Standard_Boolean IsUClosed (const TopoDS_Shape& E) const;
0114   
0115   //! indicates if the edge <E> is a closing edge on V of myFace
0116   Standard_EXPORT Standard_Boolean IsVClosed (const TopoDS_Shape& E) const;
0117   
0118   Standard_EXPORT TCollection_AsciiString SNameVEE (const TopoDS_Shape& V, const TopoDS_Shape& E1, const TopoDS_Shape& E2) const;
0119   
0120   Standard_EXPORT TCollection_AsciiString SNameVEL (const TopoDS_Shape& V, const TopoDS_Shape& E, const TopTools_ListOfShape& L) const;
0121 
0122 
0123   TopoDS_Face myFace;
0124 
0125 
0126 };
0127 
0128 
0129 
0130 
0131 
0132 
0133 
0134 #endif // _TopOpeBRepBuild_WireEdgeSet_HeaderFile