mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 16:40:28 +01:00
fix(editor): the plan warns of the curved track adjoining a curve only where the curvature jumps there: a curve going on from the diverging track of a switch at its radius (R 300 after R 301 in wsd) no longer has it. The side the adjoining track turns to is taken with its radius into the chain and the design, and the curvature the design meets it with, signed by its turn, compared with it, within 5%; a design kept without the side is taken for turning its way. Unit test: R 300 from the very start after R 301 turning the same way gives no warning, turning the other way or starting with a straight does
This commit is contained in:
@@ -79,6 +79,8 @@ void editor_mode::route_bind_ends()
|
||||
design.end_grade = grade_of(chain.end_direction);
|
||||
design.start_radius = chain.start_radius;
|
||||
design.end_radius = chain.end_radius;
|
||||
design.start_turn = chain.start_turn;
|
||||
design.end_turn = chain.end_turn;
|
||||
design.start_reserve = editor_track::run_reserve(editor_track::straight_beyond(chain, false, m_straights.tolerance));
|
||||
design.end_reserve = editor_track::run_reserve(editor_track::straight_beyond(chain, true, m_straights.tolerance));
|
||||
}
|
||||
@@ -450,6 +452,8 @@ bool editor_mode::digitize_chain(editor_track::chain const &Chain, std::string *
|
||||
design.end_grade = grade_of(Chain.end_direction);
|
||||
design.start_radius = Chain.start_radius;
|
||||
design.end_radius = Chain.end_radius;
|
||||
design.start_turn = Chain.start_turn;
|
||||
design.end_turn = Chain.end_turn;
|
||||
auto const preferred{m_route.design.shape};
|
||||
auto const other{preferred == alignment::transition_shape::clothoid ? alignment::transition_shape::cubic_parabola : alignment::transition_shape::clothoid};
|
||||
alignment::result result;
|
||||
|
||||
Reference in New Issue
Block a user