mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 23:59:12 +01:00
feat(rails): the wing rails of the frogs of the low section of the blades, as Zu1-60, where the timbers have slide chairs: from 1.5 m before the throat to their ends the foot raised as much as the blades ride, the web shortened, the heads level with the rails beside, forged down to the plain rail along 0.5 m; a wing rail which is the stock rail of a blade too, as in the slips with the blades outside of the diamond, whole along its chairs; the fastening holding only rails raised as much moved up on a pad as wide as it, a raised rail on a fastening with others on a pad of its own
This commit is contained in:
@@ -122,13 +122,16 @@ beam_model const *find_model( std::string const &Name, std::string const &Skinna
|
||||
continue;
|
||||
}
|
||||
glm::vec2 span { std::numeric_limits<float>::max(), std::numeric_limits<float>::lowest() };
|
||||
glm::vec2 heights { std::numeric_limits<float>::max(), std::numeric_limits<float>::lowest() };
|
||||
auto const timber { part < timber_parts };
|
||||
vertices_of( model.parts[ part ], [&]( glm::vec3 const &Position ) {
|
||||
span = { std::min( span.x, Position.x ), std::max( span.y, Position.x ) };
|
||||
heights = { std::min( heights.x, Position.y ), std::max( heights.y, Position.y ) };
|
||||
if( timber ) {
|
||||
top = std::max( top, Position.y );
|
||||
} } );
|
||||
model.spans[ part ] = span;
|
||||
model.heights[ part ] = heights;
|
||||
if( timber ) {
|
||||
model.span = { std::min( model.span.x, span.x ), std::max( model.span.y, span.y ) };
|
||||
}
|
||||
@@ -155,6 +158,7 @@ beam_model const *find_model( std::string const &Name, std::string const &Skinna
|
||||
}
|
||||
std::sort( model.bands.begin(), model.bands.end() );
|
||||
// the rails sit on the seat of the sleeper, below the fastenings sticking up over it, or on the plate of the fastening
|
||||
model.bed = top;
|
||||
model.seat = ( Seat >= 0.f ? Seat : top );
|
||||
if( Seat < 0.f && model.fastened() ) {
|
||||
model.seat = std::max( top, surface_at( model.parts[ part_plate ], 0.f, 0.f ).value_or( top ) );
|
||||
|
||||
Reference in New Issue
Block a user