[Sketcher] projection of (implemented)

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
shermelin
Posts: 26
Joined: Tue Mar 24, 2020 12:48 pm

[Sketcher] projection of (implemented)

Post by shermelin »

Dear all,

I implemented the projection of ellipses in sktcehr, hopefully including corner cases (projects to a line or a circle).

I just submitted PR #3479.

Best,
Attachments
Capture d’écran_2020-05-18_07-00-38.png
Capture d’écran_2020-05-18_07-00-38.png (46.82 KiB) Viewed 3243 times
Capture d’écran_2020-05-18_07-00-24.png
Capture d’écran_2020-05-18_07-00-24.png (21.84 KiB) Viewed 3243 times
Capture d’écran_2020-05-18_06-59-53.png
Capture d’écran_2020-05-18_06-59-53.png (34.81 KiB) Viewed 3243 times
Capture d’écran_2020-05-18_06-59-39.png
Capture d’écran_2020-05-18_06-59-39.png (12.35 KiB) Viewed 3243 times
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: [Sketcher] projection of (implemented)

Post by RatonLaveur »

That is really cool! Thanks you so much for your contribution!
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] projection of (implemented)

Post by chrisb »

A true enhancement, thanks!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
shermelin
Posts: 26
Joined: Tue Mar 24, 2020 12:48 pm

Re: [Sketcher] projection of (implemented)

Post by shermelin »

It was a pleasure to make the calculations, I had not done any in ages…
Not son fun to debug my sleep deprived typos un close variable names…

By the way, opencascade has a projection library, which does not make the right calculations I believe. Anyone ever worked with them upstream? 'Cause it would be much cleaner to pish most of that code upstream and clean sketcher code…
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] projection of (implemented)

Post by chrisb »

shermelin, you had two posts here almost identical, in the second you had just corrected a huge bunch of typos. I have removed the buggy post. I know this problem very well, because I make myself so many errors, but it is not necessary to create a second post. You can edit an existing post by using the pencil symbol at the right top of the post.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
shermelin
Posts: 26
Joined: Tue Mar 24, 2020 12:48 pm

Re: [Sketcher] projection of (implemented)

Post by shermelin »

Thanks Chrisb. I still had the input form, I thought I had tapped on preview by mistake… did not seem to be able to delete the older post once I had double posted…
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] projection of (implemented)

Post by chrisb »

shermelin wrote: Mon May 18, 2020 7:23 pmdid not seem to be able to delete the older post once I had double posted…
That's indeed not possible, you can delete only the last post in a topic. (We moderators can use our super powers and delte other things as well).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] projection of (implemented)

Post by abdullah »

shermelin wrote: Mon May 18, 2020 3:03 pm It was a pleasure to make the calculations, I had not done any in ages…
Not son fun to debug my sleep deprived typos un close variable names…

By the way, opencascade has a projection library, which does not make the right calculations I believe. Anyone ever worked with them upstream? 'Cause it would be much cleaner to pish most of that code upstream and clean sketcher code…
Thank you for your contribution!! :D The PR is now merged. :D :D

I comment that I have pushed a commit just after to fix some warnings about unused variables and a function.

I had to check that the projection of an ellipse is always an ellipse (other than when it degenerates to a circle or a segment). I remember that the offset curve of an ellipse is not an ellipse, so I double checked and I learned something in the way. ;)

As I am kind of integrator in practice, I hope that nothing has escaped me this time...
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Sketcher] projection of (implemented)

Post by Kunda1 »

shermelin wrote: Mon May 18, 2020 3:03 pm By the way, opencascade has a projection library, which does not make the right calculations I believe. Anyone ever worked with them upstream? 'Cause it would be much cleaner to pish most of that code upstream and clean sketcher code…
We have worked with them in the past. See OCC Bugs in the Bugtracker.

There is a also an OCC dev that hangs on the forum, maybe we can ping him?
gAdlike wrote: Sat Jan 27, 2018 7:48 am I constructed google table representing all existing OCCT issues related to the FC: https://docs.google.com/spreadsheets/d/ ... sp=sharing
Feel free to add your comments and suggestions for improvement. I will be glad to get feedback from the community.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply