[Feature Request] Rectangle from 3 corners

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!
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [Feature Request] Rectangle from 3 corners

Post by Jee-Bee »

To have not six different rectangles around...
Is it possible to use a key (Ctrl, shift, ...) That when holding that automatically is choosen for a 3 point (Or two point )whatever is default?

Maybe a option to switch on user preferences in the Edit Parameter tool?
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature Request] Rectangle from 3 corners

Post by chrisb »

NewJoker wrote: Tue Jul 19, 2022 7:06 am Yes, but I'm talking not only about this way of applying constraints to rectangles while creating them but mainly about being able to create them based on 3 corners which is useful in many cases.
You are right. I see the advantage of such a tool.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature Request] Rectangle from 3 corners

Post by chrisb »

paddle wrote: Thu Jul 21, 2022 6:31 am Then the question is, for the normal rectangle (and center rectangle) should we change from 2 horizontal and 2 vertical to 2 parallel + 1 horizontal? @chrisb
No, I don't think so. Horizontal and Vertical are the most basic constraints which have their semantics without any other element. Personally I have probably more often changed just one line in a rectangle by making one of its sides angled than turning a whole rectangle.
Also another question: should we also have a mode of 3 points rectangle by center?
Sounds reasonable.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
paddle
Veteran
Posts: 1364
Joined: Mon Feb 03, 2020 4:47 pm

Re: [Feature Request] Rectangle from 3 corners

Post by paddle »

chrisb wrote: Sun Jul 24, 2022 11:35 pm
paddle wrote: Thu Jul 21, 2022 6:31 am Then the question is, for the normal rectangle (and center rectangle) should we change from 2 horizontal and 2 vertical to 2 parallel + 1 horizontal? @chrisb
No, I don't think so. Horizontal and Vertical are the most basic constraints which have their semantics without any other element. Personally I have probably more often changed just one line in a rectangle by making one of its sides angled than turning a whole rectangle.
Also another question: should we also have a mode of 3 points rectangle by center?
Sounds reasonable.
Another question then. How should it be in the widget :
4 modes in the dropdown:
- Diagonal
- Center
- Diagonal 3 points
- Center 3 points

Or alternatively, we keep 2 modes and we add one checkboxe 'By 3 points'.

I'm not sure what is the best for the UI. I'm not super fond of having 4 modes. What do you think?

However ultimately I would like to replace the dropdown by an array of buttons with icon corresponding to each mode. In which case having 4 modes wouldn't be annoying.
Edit: Here's what I meant in a mockup :
by diagonals.png
by diagonals.png (30.9 KiB) Viewed 925 times
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [Feature Request] Rectangle from 3 corners

Post by Jee-Bee »

paddle wrote: Thu Jul 21, 2022 6:31 am For this rectangle, instead of 2 horizontal and 2 vertical, we need 2 parallel constraints.
I Would say 1 parallel and 2 perpendicular(Since you have a extra dof)
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature Request] Rectangle from 3 corners

Post by chrisb »

paddle wrote: Mon Jul 25, 2022 9:12 am Another question then. How should it be in the widget :
4 modes in the dropdown:
- Diagonal
- Center
- Diagonal 3 points
- Center 3 points
That's what I would go for. It is known behaviour, and saves space (yes, I'm a real estate nazi). On the other hand: I am not very fond of the drop downs either, because it means two clicks with rather precise mouse movements. Sat allo I would be grateful for an idea of making this easier without the cost of additional space.
Or alternatively, we keep 2 modes and we add one checkboxe 'By 3 points'.
I don't like that, because it needs so much clicking and additional space. And going into that direction, we should offer another checkbox for using the centered versions.

I cannot really estimate how often this would be changed during a Sketcher or even a FreeCAD session. I guess that I would change these modes rather rarely and thus the four dropdown modes would be very fine with me.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
grd
Posts: 328
Joined: Wed Apr 13, 2022 5:13 am
Location: Eindhoven, The Netherlands

Re: [Feature Request] Rectangle from 3 corners

Post by grd »

It can be easier with only two points, and you can even have it made with an angle. The rectangle of course would be square by default, but that could change as well.

First you put in the two points, then a line shows up between the points. You can select the line and it appears to be a rectangle, that one can move in both directions. It should always snap as a rectangle between the two selected points, but is snaps as the nearest end point. When you get to the nearest point of the "new line", the angle of the line shows up and you can have an "angled rectangle".

But the easier answer is to just forget is, because it is rather foolish. Anyone can make a macro.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
User avatar
NewJoker
Veteran
Posts: 2977
Joined: Sun Oct 11, 2020 7:49 pm

Re: [Feature Request] Rectangle from 3 corners

Post by NewJoker »

grd wrote: Tue Jul 26, 2022 8:35 am But the easier answer is to just forget is, because it is rather foolish. Anyone can make a macro.
As can be seen in previous replies, that's something so useful that it shouldn't end as just a macro.
drmacro
Veteran
Posts: 8806
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Feature Request] Rectangle from 3 corners

Post by drmacro »

NewJoker wrote: Tue Jul 26, 2022 9:02 am
grd wrote: Tue Jul 26, 2022 8:35 am But the easier answer is to just forget is, because it is rather foolish. Anyone can make a macro.
As can be seen in previous replies, that's something so useful that it shouldn't end as just a macro.
Don't take this as being against this feature. But, the response to this thread has not been overwhelming.

Sure, these QOL tools are seen as good additions to FreeCAD. But, there is nothing wrong with useful macro/Python. I see this particular tool as occasionally useful, certainly not something I'd use daily...maybe not even weekly.

Alternatively, continuously adding "useful to some" and corner case tools could be seen as bloatware.

What, IMO, would really be a great update would be user defined toolbars. That would allow libraries of macro/Python "features" and/or existing tools to be added, as needed, by the user, not by a random developer or a committee.

Just my $0.02 8-)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: [Feature Request] Rectangle from 3 corners

Post by Jee-Bee »

chrisb wrote: Tue Jul 26, 2022 1:14 am
paddle wrote: Mon Jul 25, 2022 9:12 am Another question then. How should it be in the widget :
4 modes in the dropdown:
- Diagonal
- Center
- Diagonal 3 points
- Center 3 points
That's what I would go for. It is known behaviour, and saves space (yes, I'm a real estate nazi). On the other hand: I am not very fond of the drop downs either, because it means two clicks with rather precise mouse movements. Sat allo I would be grateful for an idea of making this easier without the cost of additional space.
What about a the use of a extra key? I don't know if FC has it, but i can remember that other CAD software have it(probably Autocad :lol: ) That when holding a key the lines are only in horizontal / vertical direction.
It is possible to use something similar that forces a straight rectangle and so that the second point is not needed(basically only point one and tree are used and two is added automatically)...
drmacro wrote: Tue Jul 26, 2022 10:35 am Alternatively, continuously adding "useful to some" and corner case tools could be seen as bloatware.
If talking about bloatware in the sketcher are more useless(wrong word but i assume everybody understand what i meant) features.
Post Reply