mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Do not allow to copy/paste volumes when using sla printer
This commit is contained in:
parent
fab3634931
commit
7aaba25520
6 changed files with 79 additions and 29 deletions
|
@ -47,6 +47,26 @@ Selection::VolumeCache::VolumeCache(const Geometry::Transformation& volume_trans
|
|||
{
|
||||
}
|
||||
|
||||
bool Selection::Clipboard::is_sla_compliant() const
|
||||
{
|
||||
if (m_mode == Selection::Volume)
|
||||
return false;
|
||||
|
||||
for (const ModelObject* o : m_model.objects)
|
||||
{
|
||||
if (o->is_multiparts())
|
||||
return false;
|
||||
|
||||
for (const ModelVolume* v : o->volumes)
|
||||
{
|
||||
if (v->is_modifier())
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Selection::Selection()
|
||||
: m_volumes(nullptr)
|
||||
, m_model(nullptr)
|
||||
|
@ -385,6 +405,20 @@ bool Selection::is_from_single_object() const
|
|||
return (0 <= idx) && (idx < 1000);
|
||||
}
|
||||
|
||||
bool Selection::is_sla_compliant() const
|
||||
{
|
||||
if (m_mode == Volume)
|
||||
return false;
|
||||
|
||||
for (unsigned int i : m_list)
|
||||
{
|
||||
if ((*m_volumes)[i]->is_modifier)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Selection::requires_uniform_scale() const
|
||||
{
|
||||
if (is_single_full_instance() || is_single_modifier() || is_single_volume())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue