mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-01 07:44:41 -07:00
FIX: the brim cannot generated on left/right only printable area
jira: none Change-Id: If1a46773cdbd66ea3ab8484dc5d58ce5bbd3ded2 (cherry picked from commit f127f95335056035f6967b0dff6532d12fe6d316)
This commit is contained in:
parent
bdf5cc9063
commit
a7c90b8dfe
4 changed files with 57 additions and 32 deletions
|
|
@ -2691,21 +2691,35 @@ FilamentMapMode Print::get_filament_map_mode() const
|
|||
return m_config.filament_map_mode;
|
||||
}
|
||||
|
||||
std::vector<Vec2d> Print::get_printable_area()
|
||||
{
|
||||
return m_config.printable_area.values;
|
||||
}
|
||||
|
||||
std::vector<std::vector<Vec2d>> Print::get_extruder_printable_area()
|
||||
{
|
||||
return m_config.extruder_printable_area.values;
|
||||
}
|
||||
|
||||
std::vector<double> Print::get_extruder_printable_height()
|
||||
std::vector<double> Print::get_extruder_printable_height() const
|
||||
{
|
||||
return m_config.extruder_printable_height.values;
|
||||
}
|
||||
|
||||
std::vector<Polygons> Print::get_extruder_printable_polygons() const
|
||||
{
|
||||
std::vector<Polygons> extruder_printable_polys;
|
||||
std::vector<std::vector<Vec2d>> extruder_printable_areas = m_config.extruder_printable_area.values;
|
||||
for (const auto &e_printable_area : extruder_printable_areas) {
|
||||
Polygons ploys = {Polygon::new_scale(e_printable_area)};
|
||||
extruder_printable_polys.emplace_back(ploys);
|
||||
}
|
||||
return std::move(extruder_printable_polys);
|
||||
}
|
||||
|
||||
std::vector<Polygons> Print::get_extruder_unprintable_polygons() const
|
||||
{
|
||||
std::vector<Vec2d> printable_area = m_config.printable_area.values;
|
||||
Polygon printable_poly = Polygon::new_scale(printable_area);
|
||||
std::vector<std::vector<Vec2d>> extruder_printable_areas = m_config.extruder_printable_area.values;
|
||||
std::vector<Polygons> extruder_unprintable_polys;
|
||||
for (const auto &e_printable_area : extruder_printable_areas) {
|
||||
Polygons ploys = diff(printable_poly, Polygon::new_scale(e_printable_area));
|
||||
extruder_unprintable_polys.emplace_back(ploys);
|
||||
}
|
||||
return std::move(extruder_unprintable_polys);
|
||||
}
|
||||
|
||||
size_t Print::get_extruder_id(unsigned int filament_id) const
|
||||
{
|
||||
std::vector<int> filament_map = get_filament_maps();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue