mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-11 03:11:49 +08:00
Slight performance boost
follow up to f7db7c0
This commit is contained in:
parent
a0e6c7a076
commit
17686b4814
@ -1893,7 +1893,7 @@ size_t ModelVolume::split(unsigned int max_extruders)
|
|||||||
// discard volumes for which the convex hull was not generated or is degenerate
|
// discard volumes for which the convex hull was not generated or is degenerate
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
while (i < this->object->volumes.size()) {
|
while (i < this->object->volumes.size()) {
|
||||||
std::shared_ptr<const TriangleMesh> hull = this->object->volumes[i]->get_convex_hull_shared_ptr();
|
const std::shared_ptr<const TriangleMesh> &hull = this->object->volumes[i]->get_convex_hull_shared_ptr();
|
||||||
if (hull == nullptr || hull->its.vertices.empty() || hull->its.indices.empty()) {
|
if (hull == nullptr || hull->its.vertices.empty() || hull->its.indices.empty()) {
|
||||||
this->object->delete_volume(i);
|
this->object->delete_volume(i);
|
||||||
--idx;
|
--idx;
|
||||||
|
@ -684,7 +684,7 @@ public:
|
|||||||
|
|
||||||
void calculate_convex_hull();
|
void calculate_convex_hull();
|
||||||
const TriangleMesh& get_convex_hull() const;
|
const TriangleMesh& get_convex_hull() const;
|
||||||
std::shared_ptr<const TriangleMesh> get_convex_hull_shared_ptr() const { return m_convex_hull; }
|
const std::shared_ptr<const TriangleMesh>& get_convex_hull_shared_ptr() const { return m_convex_hull; }
|
||||||
// Get count of errors in the mesh
|
// Get count of errors in the mesh
|
||||||
int get_repaired_errors_count() const;
|
int get_repaired_errors_count() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user