Fix of the previous Adaptive Cubic infill refactoring

plus couple of fixes of the old logic.
This commit is contained in:
Vojtech Bubnik 2020-11-06 16:24:15 +01:00
parent 139b58a6f2
commit 517477f0dd
4 changed files with 115 additions and 61 deletions

View file

@ -231,6 +231,10 @@ public:
std::pair<std::vector<std::pair<size_t, size_t>>::const_iterator, std::vector<std::pair<size_t, size_t>>::const_iterator> cell_data_range(coord_t row, coord_t col) const
{
assert(row >= 0);
assert(row < m_rows);
assert(col >= 0);
assert(col < m_cols);
const EdgeGrid::Grid::Cell &cell = m_cells[row * m_cols + col];
return std::make_pair(m_cell_data.begin() + cell.begin, m_cell_data.begin() + cell.end);
}