Measure: Initial porting of Measure Gizmo

This commit is contained in:
enricoturri1966 2023-10-31 11:43:04 +08:00 committed by Noisyfox
parent 1561d65712
commit f72d42f920
31 changed files with 5276 additions and 146 deletions

View file

@ -1,3 +1,7 @@
///|/ Copyright (c) Prusa Research 2019 - 2023 Enrico Turri @enricoturri1966, Oleksandra Iushchenko @YuSanka, Vojtěch Bubník @bubnikv, Tomáš Mészáros @tamasmeszaros, Lukáš Matěna @lukasmatena, Filip Sykala @Jony01
///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
#include "libslic3r/libslic3r.h"
#include "Selection.hpp"
@ -710,6 +714,17 @@ bool Selection::contains_any_volume(const std::vector<unsigned int>& volume_idxs
return false;
}
bool Selection::contains_sinking_volumes(bool ignore_modifiers) const
{
for (const GLVolume* v : *m_volumes) {
if (!ignore_modifiers || !v->is_modifier) {
if (v->is_sinking())
return true;
}
}
return false;
}
bool Selection::matches(const std::vector<unsigned int>& volume_idxs) const
{
unsigned int count = 0;