mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 06:59:13 +01:00
feat(editor): laid to the norms, a track laid on from an end gets its transition curves, into the arc, between the arcs of a compound curve and out to the straight
A track laid on from a free end in the PKP PLK laying, by a drag out of the end, by clicks from it or laid back onto it, starts from the curvature and the cant the end has. An arc turning the same way as the end is a compound curve: a transition of the norms ramps the curvature and the cant from the one arc into the other. From a straight the arc gets its entry transition, the arc then straight its exit one. Where the way is too short the transitions are cut and the cant lowered to what they ramp, and the readout says so; with no room at all the track is laid as before and the note says why. The curves traced on the orthophoto and the recommended values of a compound curve get the transitions between their arcs too. The free laying stays as it was.
This commit is contained in:
@@ -178,6 +178,14 @@ class editor_track
|
||||
glm::dvec2 direction{0.0};
|
||||
std::vector<segment_data> pieces;
|
||||
};
|
||||
// the curvature and the roll a track ends with at Joint, as it goes on beyond the joint
|
||||
struct bend
|
||||
{
|
||||
double curvature{0.0}; // positive turning from x towards z
|
||||
double roll{0.0};
|
||||
glm::dvec2 direction{0.0};
|
||||
};
|
||||
static std::optional<bend> bend_at(TTrack const &Neighbour, glm::dvec3 const &Joint);
|
||||
static easing ease_out_of(TTrack const &Neighbour, glm::dvec3 const &Joint, double const Grade, double const Speed, alignment::limits const &Limits);
|
||||
static bool eases_room(easing const &In, easing const &Out, glm::dvec3 const &Start, glm::dvec2 const &Startdirection, glm::dvec3 const &End, glm::dvec2 const &Enddirection);
|
||||
static std::vector<segment_data> eased_pieces(easing const &In, std::vector<segment_data> const &Middle, easing const &Out);
|
||||
|
||||
Reference in New Issue
Block a user