mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-22 04:24:59 +01:00
fix(sleepers): the fastenings of a rail part between two carved cuts where the part is laid, not twice as far out: both cuts carry its carved lines, taken once as the rails are laid, by one rule for both
This commit is contained in:
@@ -164,6 +164,17 @@ struct rail_cut {
|
||||
struct rail_plan {
|
||||
std::vector<rail_cut> cuts;
|
||||
};
|
||||
// how far out a part of a rail between two cuts is laid: as it goes on from the one and comes to the other, once where both are carved, which
|
||||
// gives both its lines
|
||||
inline knots::line part_offsets( rail_cut const *Before, rail_cut const *After ) {
|
||||
|
||||
knots::line result { Before != nullptr ? Before->startoffsets : knots::line {} };
|
||||
if( After != nullptr && false == ( Before != nullptr && Before->carved && After->carved ) ) {
|
||||
result.insert( result.end(), After->endoffsets.begin(), After->endoffsets.end() );
|
||||
}
|
||||
knots::sort( result );
|
||||
return result;
|
||||
}
|
||||
struct rail_tread {
|
||||
double from { 0.0 };
|
||||
double to { 0.0 };
|
||||
|
||||
Reference in New Issue
Block a user