Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/BRepAlgo_Loop.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1995-11-10
0002 // Created by: Yves FRICAUD
0003 // Copyright (c) 1995-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 _BRepAlgo_Loop_HeaderFile
0018 #define _BRepAlgo_Loop_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopoDS_Face.hxx>
0024 #include <TopoDS_Shape.hxx>
0025 #include <NCollection_List.hxx>
0026 #include <TopTools_ShapeMapHasher.hxx>
0027 #include <NCollection_DataMap.hxx>
0028 #include <NCollection_IndexedDataMap.hxx>
0029 #include <BRepAlgo_Image.hxx>
0030 class TopoDS_Edge;
0031 
0032 //! Builds the loops from a set of edges on a face.
0033 class BRepAlgo_Loop
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   Standard_EXPORT BRepAlgo_Loop();
0039 
0040   //! Init with <F> the set of edges must have
0041   //! pcurves on <F>.
0042   Standard_EXPORT void Init(const TopoDS_Face& F);
0043 
0044   //! Add E with <LV>. <E> will be copied and trim
0045   //! by vertices in <LV>.
0046   Standard_EXPORT void AddEdge(TopoDS_Edge& E, const NCollection_List<TopoDS_Shape>& LV);
0047 
0048   //! Add <E> as const edge, E can be in the result.
0049   Standard_EXPORT void AddConstEdge(const TopoDS_Edge& E);
0050 
0051   //! Add <LE> as a set of const edges.
0052   Standard_EXPORT void AddConstEdges(const NCollection_List<TopoDS_Shape>& LE);
0053 
0054   //! Sets the Image Vertex - Vertex
0055   Standard_EXPORT void SetImageVV(const BRepAlgo_Image& theImageVV);
0056 
0057   //! Make loops.
0058   Standard_EXPORT void Perform();
0059 
0060   //! Update VE map according to Image Vertex - Vertex
0061   Standard_EXPORT void UpdateVEmap(NCollection_IndexedDataMap<TopoDS_Shape,
0062                                                               NCollection_List<TopoDS_Shape>,
0063                                                               TopTools_ShapeMapHasher>& theVEmap);
0064 
0065   //! Cut the edge <E> in several edges <NE> on the
0066   //! vertices<VonE>.
0067   Standard_EXPORT void CutEdge(const TopoDS_Edge&                    E,
0068                                const NCollection_List<TopoDS_Shape>& VonE,
0069                                NCollection_List<TopoDS_Shape>&       NE) const;
0070 
0071   //! Returns the list of wires performed.
0072   //! can be an empty list.
0073   Standard_EXPORT const NCollection_List<TopoDS_Shape>& NewWires() const;
0074 
0075   //! Build faces from the wires result.
0076   Standard_EXPORT void WiresToFaces();
0077 
0078   //! Returns the list of faces.
0079   //! Warning: The method <WiresToFaces> as to be called before.
0080   //! can be an empty list.
0081   Standard_EXPORT const NCollection_List<TopoDS_Shape>& NewFaces() const;
0082 
0083   //! Returns the list of new edges built from an edge <E>
0084   //! it can be an empty list.
0085   Standard_EXPORT const NCollection_List<TopoDS_Shape>& NewEdges(const TopoDS_Edge& E) const;
0086 
0087   //! Returns the datamap of vertices with their substitutes.
0088   Standard_EXPORT void GetVerticesForSubstitute(
0089     NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>& VerVerMap) const;
0090 
0091   Standard_EXPORT void VerticesForSubstitute(
0092     NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>& VerVerMap);
0093 
0094   //! Set maximal tolerance used for comparing distances between vertices.
0095   void SetTolConf(const double theTolConf) { myTolConf = theTolConf; }
0096 
0097   //! Get maximal tolerance used for comparing distances between vertices.
0098   double GetTolConf() const { return myTolConf; }
0099 
0100 private:
0101   TopoDS_Face                    myFace;
0102   NCollection_List<TopoDS_Shape> myConstEdges;
0103   NCollection_List<TopoDS_Shape> myEdges;
0104   NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0105                                  myVerOnEdges;
0106   NCollection_List<TopoDS_Shape> myNewWires;
0107   NCollection_List<TopoDS_Shape> myNewFaces;
0108   NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0109                                                                            myCutEdges;
0110   NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> myVerticesForSubstitute;
0111   BRepAlgo_Image                                                           myImageVV;
0112   double                                                                   myTolConf;
0113 };
0114 
0115 #endif // _BRepAlgo_Loop_HeaderFile