[ Fixed by marioalexis ] Draft Workingplane: projectPoint issue

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Workingplane: projectPoint issue

Post by Roy_043 »

I was aware that the existing function was overly complex, but I have to admit that my vector math skills are not that great. I'll have to study your suggestion. Note that the dot product can become zero or almost zero. You would need to catch that.
marioalexis
Posts: 124
Joined: Wed Jun 19, 2019 7:44 pm

Re: Draft Workingplane: projectPoint issue

Post by marioalexis »

Yes. To avoid unnecessary check in the most common case when direction is None, the check could be done only if direction is not None.
The value for the projection is derived from the implicit equation of a plane and the parametric equation of a line.

(proj - position)·axis = 0
proj(λ) = p + λ.direction
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Workingplane: projectPoint issue

Post by Roy_043 »

I definitely do not understand that. :mrgreen:
marioalexis
Posts: 124
Joined: Wed Jun 19, 2019 7:44 pm

Re: Draft Workingplane: projectPoint issue

Post by marioalexis »

User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Workingplane: projectPoint issue

Post by Roy_043 »

Thanks for the link. More to study...
marioalexis
Posts: 124
Joined: Wed Jun 19, 2019 7:44 pm

Re: Draft Workingplane: projectPoint issue

Post by marioalexis »

If you want test this @Roy_043 : https://github.com/FreeCAD/FreeCAD/pull/5307
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Workingplane: projectPoint issue

Post by Roy_043 »

marioalexis wrote: Wed Dec 29, 2021 10:57 pm If you want test this @Roy_043 : https://github.com/FreeCAD/FreeCAD/pull/5307
I have commented in the PR. Thanks for the fix!
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Fixed by marioalexis ] Draft Workingplane: projectPoint issue

Post by Roy_043 »

PR has been merged. Thanks again marioalexis!
https://github.com/FreeCAD/FreeCAD/pull/5307
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [ Fixed by marioalexis ] Draft Workingplane: projectPoint issue

Post by thomas-neemann »

Marvelous. thank you
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply