[Feature request] Sketcher point-on-point gives one common point

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
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

[Feature request] Sketcher point-on-point gives one common point

Post by Pauvres_honteux »

I"d like to propose an improvement for geometry creation.

A simple example would be as follows:
Let us assume a line already exist and the user want to add another one to that line.

As it works today the user first click on "New line" then on one of the already existing line's end-points. If auto constrain is running the user will get a point-on-point-constraint. Now we have two separate lines connected via their end points.

What I suggest is to automagically replace the two end points with a single common point and by that getting rid of one constrain and one point. This way you can not have disconnected lines/geometry, it will not be possible.

If one really want to have it working as of today, the programmer could come up with some key-press combo to override it or a button for having it turned on/off.
Or the user just create the geometry as separate pieces then constrain them together afterwoods.

To split them lines apart again (in the common point scenario) a "divide tool" should be invented. Or does it already exist?

Perhaps this could as well lower the constraint solvers stress a bit?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [Feature request] Sketcher point-on-point gives one common point

Post by openBrain »

I don't like much this idea, and actually can't see any advantage to this compared to current.
Even it will probably break all dimensional constraint currently existing.
drmacro
Veteran
Posts: 8979
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature request] Sketcher point-on-point gives one common point

Post by drmacro »

the split tool was introduced sometime near the end on the 0.19 cycle, right?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: [Feature request] Sketcher point-on-point gives one common point

Post by kisolre »

Since there are no polylines in sketcher and each line/edge/arc has its 2 end points how is this expected to work?
User avatar
Shalmeneser
Veteran
Posts: 9558
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: [Feature request] Sketcher point-on-point gives one common point

Post by Shalmeneser »

I don't understand your explications (drawing required).
Why do you not always use 'auto constrain' ?
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: [Feature request] Sketcher point-on-point gives one common point

Post by Pauvres_honteux »

New try:
Create three lines according to picture.
Their start points(1,2,3) shall be close to common center.
Todays_situation_0.20.25176_AppImage_1.png
Todays_situation_0.20.25176_AppImage_1.png (44.9 KiB) Viewed 2364 times

Today the sketcher constrain them together in an automagic way, if one start the line creation with the mouse pointer on an existing point of a line, curve etc.
Or one can do it manually by first selecting them points.
Todays_situation_0.20.25176_AppImage_2.png
Todays_situation_0.20.25176_AppImage_2.png (18.95 KiB) Viewed 2364 times

Then choosing coincident tool.
Todays_situation_0.20.25176_AppImage_3.png
Todays_situation_0.20.25176_AppImage_3.png (63.37 KiB) Viewed 2364 times

Todays way of working gives three points(1,2,3) on top of each other
Todays_situation_0.20.25176_AppImage_4.png
Todays_situation_0.20.25176_AppImage_4.png (79.23 KiB) Viewed 2364 times

What I'm proposing is to get rid of the coincident constraining for the case when you create (in a chain-event) line after line after radius after ... you get the picture.
My suggestion also involves creation of separate lines, radii, spline connected with points belonging to already existing geometry.

An interesting observation is that when creating a fillet between two lines (connected or not) the coincident constrain disappears and gets replaced by tangent constraints instead! So in a sense some of the functionality is already there.

Another gain would be to get rid of the problem of selecting a specific point when they are on top of each other.
abdullah wrote:
Perhaps abdullah can comment on the possibility of less strain on the CPU if a lot of constraints got replaced by a common point?
chrisb
Veteran
Posts: 54176
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature request] Sketcher point-on-point gives one common point

Post by chrisb »

If you show the extended information of the constraints you see that currently not an arbitrary number of elements is involved. Thus a major change of the data structure may be required to implement such coincidences.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [Feature request] Sketcher point-on-point gives one common point

Post by openBrain »

Pauvres_honteux wrote: Fri Aug 27, 2021 10:03 am Perhaps abdullah can comment on the possibility of less strain on the CPU if a lot of constraints got replaced by a common point?
I'm afraid this won't be an argument as from the solver point of view this is the same. ;)
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: [Feature request] Sketcher point-on-point gives one common point

Post by Pauvres_honteux »

chrisb wrote: Fri Aug 27, 2021 10:56 am If you show the extended information of the constraints you see that currently not an arbitrary number of elements is involved. Thus a major change of the data structure may be required to implement such coincidences.
Qe? The "Extended information" box is ticked. And the extra information reads:
Constraint1 [(0,1),(1,1)]
Constraint2 [(0,1),(2,1)]
I don't understand what this has to do with replacing a coincident with a point?

What do you mean with arbitrary numbers?
And how did you come to the conclusion: "a major change of the data structure"?
chrisb
Veteran
Posts: 54176
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature request] Sketcher point-on-point gives one common point

Post by chrisb »

Pauvres_honteux wrote: Fri Aug 27, 2021 12:19 pm The "Extended information" box is ticked. And the extra information reads:
Constraint1 [(0,1),(1,1)]
Constraint2 [(0,1),(2,1)]
I don't understand what this has to do with replacing a coincident with a point?
The extended information just shows a bit of what is happening internally now.
What do you mean with arbitrary numbers?
And how did you come to the conclusion: "a major change of the data structure"?
A constraint can be applied to either one or two elements, but not to an arbitrary number. The solver and perhaps other things inside and outside of Sketcher probably rely on this. So replacing this with a data structure which can hold an arbitrary number of elements may not be as easy as pie.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply