mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Avoid crossing perimeters: Further refactoring for clarity, code review.
This commit is contained in:
parent
62ab17bf6e
commit
f206b743fd
8 changed files with 363 additions and 393 deletions
|
@ -238,7 +238,14 @@ public:
|
|||
{
|
||||
const Slic3r::Points &ipts = *m_contours[contour_and_segment_idx.first];
|
||||
size_t ipt = contour_and_segment_idx.second;
|
||||
return std::pair<const Slic3r::Point&, const Slic3r::Point&>(ipts[ipt], ipts[(ipt + 1 == ipts.size()) ? 0 : ipt + 1]);
|
||||
return std::pair<const Slic3r::Point&, const Slic3r::Point&>(ipts[ipt], ipts[ipt + 1 == ipts.size() ? 0 : ipt + 1]);
|
||||
}
|
||||
|
||||
Line line(const std::pair<size_t, size_t> &contour_and_segment_idx) const
|
||||
{
|
||||
const Slic3r::Points &ipts = *m_contours[contour_and_segment_idx.first];
|
||||
size_t ipt = contour_and_segment_idx.second;
|
||||
return Line(ipts[ipt], ipts[ipt + 1 == ipts.size() ? 0 : ipt + 1]);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue