tumcms / Open-Infra-Platform

This is the official repository of the open-source Open Infra Platform software (as of April 2020).
Other
48 stars 22 forks source link

functions getDirectionOnCurve for Circle and Ellipse #494

Closed SamuilsRulovs closed 2 years ago

SamuilsRulovs commented 2 years ago

Fixes #495

Functions

SamuilsRulovs commented 2 years ago

Question: is the tangent calculated as going clock-wise or counter-clock-wise for the circle and ellipse?

I guess it is going counter-clock-wise since for circle For ellipse it should be another solution, as I understand now, but I will writing it also for counter-clock-wise variant (Right now I am trying to understand, how to implement tangent calculation for ellipse)

pjanck commented 2 years ago

Right now I am trying to understand, how to implement tangent calculation for ellipse

Perhaps this might help you?

SamuilsRulovs commented 2 years ago

I guess this PR is ready, I am not planning anything else for this PR. Unless I should already refactor IfcCircle and IfcEllipse functions accordingly

pjanck commented 2 years ago

Unless I should already refactor IfcCircle and IfcEllipse functions accordingly

New PR, please.

SamuilsRulovs commented 2 years ago

One function takes ellipse->Position into account, the other doesn't. Intentional?

No it wasn't intentional, I guess both functions should use ellipse->Position. But I will do as you suggested and use second function to make both calculations.

SamuilsRulovs commented 2 years ago

I guess with ad45e76 PR is ready to be merged

jschlenger commented 2 years ago

Looks fine to me. However I didn't check for mathematical correctness of all calculations. But they seemed to make sense.