Commit 890a496f authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[io][brep] provide access to junctions map

parent bc324910
......@@ -32,16 +32,18 @@
#include <BRep_Builder.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_DataMapOfShapeInteger.hxx>
#include <TopTools_ListOfShape.hxx>
#include <Standard_TypeDef.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS.hxx>
#include <frackit/occ/breputilities.hh>
// include all used shapes explicitly
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Compound.hxx>
namespace Frackit {
......@@ -81,13 +83,17 @@ public:
}
protected:
using IndexList = std::vector<std::size_t>;
using IndexMapType = std::unordered_map<std::size_t, IndexList>;
/*!
* \brief Returns the map that maps a primary entity index to the list
* of fragment indices that were inserted to the compound for
* that primary entity index. The indices refer to the indices
* within the compound.
*/
const std::unordered_map<std::size_t, std::vector<std::size_t>>& entityToFragmentsMap() const
const IndexMapType& entityToFragmentsMap() const
{ return entityMap_; }
/*!
......@@ -95,7 +101,7 @@ protected:
* list of intersection fragments that were inserted to the compound for
* that intersection. The indices refer to the indices within the compound.
*/
const std::unordered_map<std::size_t, std::vector<std::size_t>>& entityIntersectionsToFragmentsMap() const
const IndexMapType& entityIntersectionsToFragmentsMap() const
{ return intersectionMap_; }
/*!
......@@ -103,9 +109,16 @@ protected:
* of domain fragment indices that were inserted to the compound for
* that sub-domain. The indices refer to the indices within the compound.
*/
const std::unordered_map<std::size_t, std::vector<std::size_t>>& domainToFragmentsMap() const
const IndexMapType& domainToFragmentsMap() const
{ return domainMap_; }
/*!
* \brief Returns the map that maps to each primary junction index the
* index of the junction within the compound.
*/
const IndexMapType& junctionToFragmentsMap() const
{ return junctionMap_; }
private:
/*!
......@@ -300,10 +313,10 @@ private:
TopoDS_Compound compound_;
// index maps from primary to fragment indices
std::unordered_map<std::size_t, std::vector<std::size_t>> domainMap_;
std::unordered_map<std::size_t, std::vector<std::size_t>> entityMap_;
std::unordered_map<std::size_t, std::vector<std::size_t>> intersectionMap_;
std::unordered_map<std::size_t, std::vector<std::size_t>> junctionMap_;
IndexMapType domainMap_;
IndexMapType entityMap_;
IndexMapType intersectionMap_;
IndexMapType junctionMap_;
};
} // end namespace Frackit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment