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

LinearElement.flowFrom accuracy #154

Open
abol-karimi opened this issue Jul 8, 2023 · 1 comment
Open

LinearElement.flowFrom accuracy #154

abol-karimi opened this issue Jul 8, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@abol-karimi
Copy link

The built-in function LinearElement.flowFrom does not have a good accuracy, especially for negative distances. I suggest implementing it using curvilinear coordinates. One quick way is to use PolylineRegion.project to project the points to the centerline and using PolylineRegion.poinAlongBy for advancing the point, then offsetting the point perpendicular to the tangent of the centerline with the original projection distance.

@abol-karimi abol-karimi changed the title Curvilinear coordinates (feature request) LinearElement.flowFrom accuracy Jul 8, 2023
@Eric-Vin Eric-Vin added the enhancement New feature or request label Mar 25, 2024
@Eric-Vin
Copy link
Collaborator

I definitely agree that the accuracy can be lacking in LinearElement.flowFrom (we use a forward Euler approximation as noted in the docstring). A short term solution may be to try using a smaller stepSize, though we'd also be happy to review a PR with a better implementation if you or someone else would like to contribute one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants