[Feature request] Sketcher point-on-point gives one common point
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
- 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
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?
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?
Re: [Feature request] Sketcher point-on-point gives one common point
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.
Even it will probably break all dimensional constraint currently existing.
Re: [Feature request] Sketcher point-on-point gives one common point
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."
Re: [Feature request] Sketcher point-on-point gives one common point
Since there are no polylines in sketcher and each line/edge/arc has its 2 end points how is this expected to work?
- Shalmeneser
- Veteran
- Posts: 9584
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: [Feature request] Sketcher point-on-point gives one common point
I don't understand your explications (drawing required).
Why do you not always use 'auto constrain' ?
Why do you not always use 'auto constrain' ?
- 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
New try:
Create three lines according to picture.
Their start points(1,2,3) shall be close to common center.
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.
Then choosing coincident tool.
Todays way of working gives three points(1,2,3) on top of each other
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.
Create three lines according to picture.
Their start points(1,2,3) shall be close to common center.
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.
Then choosing coincident tool.
Todays way of working gives three points(1,2,3) on top of each other
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.
Perhaps abdullah can comment on the possibility of less strain on the CPU if a lot of constraints got replaced by a common point?abdullah wrote:
Re: [Feature request] Sketcher point-on-point gives one common point
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.
Re: [Feature request] Sketcher point-on-point gives one common point
I'm afraid this won't be an argument as from the solver point of view this is the same.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?
- 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
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"?
Re: [Feature request] Sketcher point-on-point gives one common point
The extended information just shows a bit of what is happening internally now.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?
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.What do you mean with arbitrary numbers?
And how did you come to the conclusion: "a major change of the data structure"?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.