Feature request: Let ValidateSketch detect double lines

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Feature request: Let ValidateSketch detect double lines

Post by adrianinsaval »

thomas-neemann wrote: Fri May 20, 2022 5:02 pm I believe that programs that try to catch user errors become unnecessarily slow and error-prone. I think there are more important things, e.g. mirroring of sketches with constraints and reverse processing
It's not about auto catching user error, those types of things take more resource and introduce errors of their own, but this is a manually called diagnostics tool, besides the few more bytes it will take it won't have any effect when you are not using it. Once again you bring the "there are more important things" argument but this is not a valid argument against the feature request unless those more important things are prerequisites for the request.
In case you are wondering it is not valid argument for 2 reasons IMO:
1- the development model of Freecad is completely based on volunteer work, people work on what peaks their interest in whatever order they want, not strictly following a list of priorities... Plus what is more important is subjective, I have no idea what is reverse processing? But you consider it more important than this.
2- ending world hunger is more important than me taking a shower, this doesn't mean I should stop taking showers until we end world hunger though... In short, a more important task does not invalidate a less important one.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Feature request: Let ValidateSketch detect double lines

Post by thomas-neemann »

adrianinsaval wrote: Sat May 21, 2022 3:05 am ..
chrisb wrote: Fri May 20, 2022 10:23 pm ..
ok I understand, then I have no concerns
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Feature request: Let ValidateSketch detect double lines

Post by easyw-fc »

chrisb wrote: Wed May 18, 2022 9:37 pm We know from many posts that there were troublesome newbie sketches with elements of zero length (by bad clicks) or double lines. While zero length is meanwhile caught by the sketcher it can still happen that e.g. two lines lie on top of each other, and all ends are connected, so that Sketcher ValidateSketch will not complain. Such sketches cannot be padded.

I propose that ValidateSketch checks for coincidences where three or more edges of real geometry (i.e. no construction geometry) coincide.

For one of the many topics where this is discussed, see https://forum.freecadweb.org/viewtopic. ... 91#p595891.
If you want to try I did something similar (related only to bsplines) in a command in my kicadStepUp WB
[it doesn't check 0 length lines or duplicated arcs or lines)
The function I use is in 'constrainator.py' file and it is in this function:

Code: Select all

def sanitizeSkBsp(s_name, dist_tolerance):
https://github.com/easyw/kicadStepUpMod/constrainator.py#L22
-
constrainator.png
constrainator.png (50.92 KiB) Viewed 258 times
Last edited by easyw-fc on Sat May 21, 2022 12:40 pm, edited 1 time in total.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature request: Let ValidateSketch detect double lines

Post by chrisb »

easyw-fc wrote: Sat May 21, 2022 8:40 am If you want to try I did something similar (related only to bsplines) in a command in my kicadStepUp WB
Thanks for sharing!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply