Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::TriangleMeshStats Struct Reference

#include <src/libslic3r/TriangleMesh.hpp>

+ Collaboration diagram for Slic3r::TriangleMeshStats:

Public Member Functions

void clear ()
 
TriangleMeshStats merge (const TriangleMeshStats &rhs) const
 
bool manifold () const
 
bool repaired () const
 

Public Attributes

uint32_t number_of_facets = 0
 
stl_vertex max = stl_vertex::Zero()
 
stl_vertex min = stl_vertex::Zero()
 
stl_vertex size = stl_vertex::Zero()
 
float volume = -1.f
 
int number_of_parts = 0
 
int open_edges = 0
 
RepairedMeshErrors repaired_errors
 

Detailed Description

Member Function Documentation

◆ clear()

void Slic3r::TriangleMeshStats::clear ( )
inline
62{ *this = TriangleMeshStats(); }

Referenced by Slic3r::TriangleMesh::clear().

+ Here is the caller graph for this function:

◆ manifold()

bool Slic3r::TriangleMeshStats::manifold ( ) const
inline
83{ return open_edges == 0; }
int open_edges
Definition TriangleMesh.hpp:57

References open_edges.

Referenced by Slic3r::GUI::ObjectList::get_mesh_errors_info(), Slic3r::GUI::get_warning_icon_name(), and Slic3r::ModelObject::print_info().

+ Here is the caller graph for this function:

◆ merge()

TriangleMeshStats Slic3r::TriangleMeshStats::merge ( const TriangleMeshStats rhs) const
inline
64 {
65 if (this->number_of_facets == 0)
66 return rhs;
67 else if (rhs.number_of_facets == 0)
68 return *this;
69 else {
70 TriangleMeshStats out;
71 out.number_of_facets = this->number_of_facets + rhs.number_of_facets;
72 out.min = this->min.cwiseMin(rhs.min);
73 out.max = this->max.cwiseMax(rhs.max);
74 out.size = out.max - out.min;
75 out.number_of_parts = this->number_of_parts + rhs.number_of_parts;
76 out.open_edges = this->open_edges + rhs.open_edges;
77 out.volume = this->volume + rhs.volume;
78 out.repaired_errors.merge(rhs.repaired_errors);
79 return out;
80 }
81 }
stl_vertex max
Definition TriangleMesh.hpp:50
int number_of_parts
Definition TriangleMesh.hpp:54
stl_vertex min
Definition TriangleMesh.hpp:51
uint32_t number_of_facets
Definition TriangleMesh.hpp:49
float volume
Definition TriangleMesh.hpp:53

References max, Slic3r::RepairedMeshErrors::merge(), min, number_of_facets, number_of_parts, open_edges, repaired_errors, size, and volume.

Referenced by Slic3r::TriangleMesh::merge().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ repaired()

bool Slic3r::TriangleMeshStats::repaired ( ) const
inline
84{ return repaired_errors.repaired(); }
bool repaired() const
Definition TriangleMesh.hpp:44
RepairedMeshErrors repaired_errors
Definition TriangleMesh.hpp:60

References Slic3r::RepairedMeshErrors::repaired(), and repaired_errors.

Referenced by Slic3r::GUI::ObjectList::get_mesh_errors_info(), Slic3r::GUI::get_warning_icon_name(), and Slic3r::ModelObject::print_info().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ max

◆ min

◆ number_of_facets

uint32_t Slic3r::TriangleMeshStats::number_of_facets = 0

◆ number_of_parts

◆ open_edges

◆ repaired_errors

◆ size

◆ volume


The documentation for this struct was generated from the following file: