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!
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Feature request: Let ValidateSketch detect double lines

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Feature request: Let ValidateSketch detect double lines

Post by Shalmeneser »

+1
Something like Highlight troublesome vertexes ?

Polyline tool sometimes create null lines when playing with 'M' key.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature request: Let ValidateSketch detect double lines

Post by chrisb »

Is it sensible to have a single button checking for "Paddability", i.e. no open vertices, no T, no X, no double elements?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Bance
Veteran
Posts: 4185
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Feature request: Let ValidateSketch detect double lines

Post by Bance »

I like this.....

Could wrong direction be added as well? (As in padding will create two solids.)
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature request: Let ValidateSketch detect double lines

Post by chrisb »

Bance wrote: Fri May 20, 2022 7:52 am Could wrong direction be added as well? (As in padding will create two solids.)
I see that rather not as a property of a sketch, but rather as a property of the follow-up feature, although they are of course related.

For such things it could be helpful to have an augmented sanity check.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Bance
Veteran
Posts: 4185
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Feature request: Let ValidateSketch detect double lines

Post by Bance »

If padding would lead to a non continuous solid,is that not padability?
Edit
I mis-read your initial reply, I see that you basically agree, apologies. :D
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 »

Bance wrote: Fri May 20, 2022 8:37 am If padding would lead to a non continuous solid,is that not padability?
Edit
I mis-read your initial reply, I see that you basically agree, apologies. :D
that essentially requires performing a pad and checking if there are multiple solids, but then what length should be used for the pad? Remember that PD now supports multiple levels of nested profiles as long as the end result is a single solid (logically if it is the first feature in the body it will fail).
Bance
Veteran
Posts: 4185
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Feature request: Let ValidateSketch detect double lines

Post by Bance »

I would have thought it just required checking the placement and the normal direction....

And if its too complicated Meh!
User avatar
thomas-neemann
Veteran
Posts: 11800
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 »

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
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature request: Let ValidateSketch detect double lines

Post by chrisb »

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.
We are not talking here about the normal workflow, but rather about a dedicated tool checking for common flaws in sketches. Such a tool woul dmake the program slightly bigger, and thus would use more ram, but as long as the program doesn't start swapping, it should not at all affect normal workflows.
Bance wrote: Fri May 20, 2022 4:24 pm I would have thought it just required checking the placement and the normal direction
It needs a bit more, with an appropriate solid beneath the sketch you can pad it in both directions.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply