New algorithm for GLVolumes generation and reuse of already generated geometry

This commit is contained in:
Enrico Turri 2018-01-11 14:09:54 +01:00
parent bbc9a0abe6
commit a8a4c11b5b
5 changed files with 426 additions and 199 deletions

View file

@ -542,12 +542,17 @@ void GCodeAnalyzer::PreviewData::Extrusion::set_default()
}
bool GCodeAnalyzer::PreviewData::Extrusion::is_role_flag_set(ExtrusionRole role) const
{
return is_role_flag_set(role_flags, role);
}
bool GCodeAnalyzer::PreviewData::Extrusion::is_role_flag_set(unsigned int flags, ExtrusionRole role)
{
if ((role < erPerimeter) || (erSupportMaterialInterface < role))
return false;
unsigned int flag = (unsigned int)::exp2((double)(role - erPerimeter));
return (role_flags & flag) == flag;
return (flags & flag) == flag;
}
const float GCodeAnalyzer::PreviewData::Travel::Default_Width = 0.075f;