19 std::vector<std::vector<int>>
87 bool equal_size{m_face_list.size() == m_face_normals.size()
88 && m_face_normals.size() == m_face_areas.size()
89 and m_face_areas.size() == m_face_list.size()};
91 bool valid_length{m_vertex_list.size() > 3 && !m_face_list.empty()};
95 "The supplied lists for the normals, faces and areas of lengths "
96 + std::to_string(m_face_normals.size()) +
", " + std::to_string(m_face_list.size())
97 +
", " + std::to_string(m_face_areas.size())
98 +
" are not matching in length and the mesh does not contain a valid facet!\n"};
99 throw std::runtime_error(
error_msg.c_str());
104 "The supplied lists for the normals, faces and areas of lengths "
105 + std::to_string(m_face_normals.size()) +
", " + std::to_string(m_face_list.size())
106 +
", " + std::to_string(m_face_areas.size()) +
" are not matching in length!\n"};
107 throw std::runtime_error(
error_msg.c_str());
111 throw std::runtime_error(
"The mesh does not contain a valid facet!\n");
Error class to throw when a module chain has circular or missing dependencies. Inherits from std::exc...
Definition ChainManager.h:28
Managing class for all types of meshes. Provides the interface to all the needed data when working wi...
Definition ShapeBase.h:16
const std::vector< std::vector< T > > & getVertices() const
Definition ShapeBase.h:26
const std::vector< std::vector< T > > & getNormals() const
Definition ShapeBase.h:28
std::vector< T > m_face_areas
Definition ShapeBase.h:23
const std::vector< std::vector< int > > & getFaces() const
Definition ShapeBase.h:27
std::vector< std::vector< T > > m_vertex_list
Definition ShapeBase.h:18
void setFaces(const std::vector< std::vector< int > > &face_list)
Definition ShapeBase.h:36
void setAreas(const std::vector< T > face_areas)
Definition ShapeBase.h:41
std::vector< std::vector< T > > m_face_normals
Definition ShapeBase.h:22
ShapeBase()
Constructor for an empty ShapeBase object.
Definition ShapeBase.h:55
const std::vector< T > & getAreas() const
Definition ShapeBase.h:29
std::vector< std::vector< int > > m_face_list
Definition ShapeBase.h:20
void setVertices(const std::vector< std::vector< T > > vertex_list)
Definition ShapeBase.h:32
int getNumberOfFacets() const
Definition ShapeBase.h:30
void validityCheck()
Checks whether the mesh has at least one valid facet and whether all vectors of expected equal length...
Definition ShapeBase.h:83
void setNormals(const std::vector< std::vector< T > > face_normals)
Definition ShapeBase.h:37