[merged] PR #4843 sketcher slot revision

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
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

[merged] PR #4843 sketcher slot revision

Post by uwestoehr »

Since I had to construct a lot recently under time pressure I noticed how inconvenient the slot feature is at the moment.

- about half of my use cases are to get a slot parallel to or onto an edge or a sketch axis
- the other half is to fit the slot into predefined space (existing sketch points)

None of these uses cases is currently covered:
rF040LgSwB.gif
rF040LgSwB.gif (158.94 KiB) Viewed 9481 times

The PR fixes this by using the center of the second slot arc as second selection point. So when you
- need a slot parallel to or onto an edge or a sketch axis, click onto the edge/axis two times
- need to fit the slot into predefined space (existing sketch points), click first on one sketch point then on a second

Here is a screencast as demonstration:
KZooJ8S2lg.gif
KZooJ8S2lg.gif (122.71 KiB) Viewed 9481 times
Last edited by uwestoehr on Mon Jun 21, 2021 10:53 pm, edited 2 times in total.
chrisb
Veteran
Posts: 53789
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #4843 sketcher slot revision

Post by chrisb »

How do you determine the radius? It could be defined by a third click, similar to the creation of an ellipse.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: PR #4843 sketcher slot revision

Post by openBrain »

Also I wonder what is the most "real" constraints set for a slot. Are both arcs equal or both sides parallel? :?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: PR #4843 sketcher slot revision

Post by uwestoehr »

openBrain wrote: Tue Jun 08, 2021 5:08 am Also I wonder what is the most "real" constraints set for a slot. Are both arcs equal or both sides parallel? :?
Pocket slots are used when you mill a groove with the width of the milling tool. Thus the arcs are equal and start/end tangential to the lines.

I also use slots for pads to get 3D-printed beams. Since 90° edges come out too sharp, every 90° edge must be filleted and a slot appeared to be ideal for beams.
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: PR #4843 sketcher slot revision

Post by openBrain »

uwestoehr wrote: Wed Jun 09, 2021 11:13 am Pocket slots are used when you mill a groove with the width of the milling tool.
I think you mix up the purpose of and the way to get a slot.
Purpose of a slot isn't to be machined with a mill. Purpose is to allow another item to slide in (generally).
So IMO, the important characteristic of a slot is that it's 2 edges are parallel, not that both arcs are equal. ;) Sketcher isn't TechDraw. :)
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: PR #4843 sketcher slot revision

Post by uwestoehr »

openBrain wrote: Wed Jun 09, 2021 11:35 am So IMO, the important characteristic of a slot is that it's 2 edges are parallel, not that both arcs are equal. ;) Sketcher isn't TechDraw. :)
I don't see what you mean. Slots as they are have the an equality constraints for both arcs, I did not change this.

What I changed is the second definition point handling in order to speed up the complete slot definition, see my initial post.

If you think the arcs should not have the equality constraint, this would be an extra PR. I will not make this since I am happy with the existing arc handling.
Last edited by uwestoehr on Mon Jun 14, 2021 7:24 pm, edited 1 time in total.
openBrain
Veteran
Posts: 9031
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: PR #4843 sketcher slot revision

Post by openBrain »

uwestoehr wrote: Thu Jun 10, 2021 12:52 pm Slots as they are have the an equality constraints for both arcs I did not change this.
If you thing the arcs should not have the equality constraint, this would be an extra PR. I will not make this since I am happy with the existing arc handling.
That's an excellent answer. I even didn't realize this. :)
User avatar
throwaway1
Posts: 12
Joined: Sun Oct 16, 2016 2:07 pm

Re: PR #4843 sketcher slot revision

Post by throwaway1 »

This looks like a great improvement. Nice work! Personally I'd love to see this merged.
sww1235
Posts: 32
Joined: Thu Mar 21, 2019 5:12 pm

Re: PR #4843 sketcher slot revision

Post by sww1235 »

Agreed, I like this change as well.
Post Reply