17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 09:17:28 +01:00

fix(editor): the heights from point to point broke the grade only at the bends of straights which stay bends, a curve traced or bends clicked close along a curve going at one grade from one of its ends to the other, attached there; and two tracks laid no longer meet at two heights where a point was clicked within 5 m of their joint, each end of a piece not cut there taking the height of its own stretch, not of the one the middle of the piece lies on (steps of 0.6 m on a steep grade in abc). Unit tests of the heights from point to point

This commit is contained in:
maj00r
2026-10-24 22:28:43 +02:00
parent 4602f727bb
commit 133ba9cb45
6 changed files with 70 additions and 4 deletions

View File

@@ -1409,6 +1409,9 @@ class editor_mode : public application_mode, private editor_track::observer, pri
std::vector<lay_trace> traces;
// the straights of a fixed direction the next bend slides along: from a free end, out of a curve traced
std::vector<std::pair<glm::dvec3, glm::dvec3>> guides;
// where the grade breaks from point to point: the bends kept as such, at the heights clicked; a curve traced, or bends made
// one curve, goes at one grade from end to end
std::vector<glm::dvec3> knots;
};
// lays new track through the clicked points, with no path needed to start from
struct lay_tool