Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added outputs for road curve length, and grade percentage #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RosaryMala
Copy link

This still needs some refining in terms of output, but it's working well enough as-is.

So far this changes adds two things to the tool:

The first is it estimates the arc length of a segment being built. I tested that it's accurate for quadrants of a circle, at least, but barring finding out what's the formula for how Skylines decides the road bezier tangents, it works well enough.

The second thing, which depends on the first, is displaying the road grade, as a percentage. Currently it does it on every length measurement, which looks messy, so I might change it so it only shows up on the measurements for the road length, and not for the guidelines.

One more thing that I'd like to do is also show the radius of curvature at each end of the segment.

These additions assist in building networks that follow real-world limits to slope and curve radius.

…en there's none of the other readouts showing, if it's available.
- Only show the grade on the actual road line, since it's useless in other places.
@RosaryMala
Copy link
Author

image
Here's a preview of how it looks.

@Simie
Copy link
Owner

Simie commented Jul 28, 2021

Very nice - will look into merging this and updating the mod on the workshop when I get back from holiday.

@RosaryMala
Copy link
Author

On trying to use it, the guideline angle is covering up the middle of the road label. Any way of preventing this?

Copy link
Owner

@Simie Simie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, I left some comments with one change and then I can merge.

Src/PrecisionEngineering/Data/Calculations/Guides.cs Outdated Show resolved Hide resolved
Src/PrecisionEngineering/Data/DistanceMeasurement.cs Outdated Show resolved Hide resolved
@Simie
Copy link
Owner

Simie commented Oct 20, 2021

On trying to use it, the guideline angle is covering up the middle of the road label. Any way of preventing this?

Sorry, I'm not sure what you mean by this.

@RosaryMala
Copy link
Author

On trying to use it, the guideline angle is covering up the middle of the road label. Any way of preventing this?

Sorry, I'm not sure what you mean by this.

When there's multiple labels being shown (Such as one for the curve radius, and one for the angle) they can overlap.

@RosaryMala RosaryMala requested a review from Simie November 8, 2021 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants