Feature request : round corner rectangle

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
User avatar
paddle
Posts: 35
Joined: Mon Feb 03, 2020 4:47 pm

Feature request : round corner rectangle

Postby paddle » Thu Feb 06, 2020 9:49 am

Under the rectangle tool, adding a 'round corner rectangle' tool.

First and second click as in rectangle tool.
Openning a message-box to prompt for radius and preview of the fillet following mouse.
Optionally a tick box "Same radius for all corners". .
If this box is ticked then third click or pressing enter set the radius of the 4 fillets to the same dimensions with an egal constraint.
If this box is unticked, then third click set the angle of one corner, then message boxe prompt for next corner.

What do you think? It's a small tool, but could be usefull to make design faster.


Optionally a 'chamfered corner rectangle' tool could be also nice. Maybe less frequently of use, but it would not take much work to do as it would mostly be copy paste of the previous one.
edi
Posts: 21
Joined: Fri Jan 17, 2020 1:32 pm

Re: Feature request : round corner rectangle

Postby edi » Tue Feb 11, 2020 5:25 pm

Hello paddle,
I wrote a macro doing something similar to what you want.
The macro draws centered figures in sketcher: rectangle, square, rectangle with rounded corners, square with rounded corners, circle and hexagon.
Each figure can be drawn with or without constraints. If you coose "Add constraints" you can change the values of the constraints after drawing. The figures keep always centered.
How to use the macro:
1. Open a new sketch in SKETCHER or PART DESIGN
2. Start the macro
3. Select what you want to be drawn
4. Draw the figure by pressing "draw figure"
5. End the macro by pressing "close window"
CenteredFiguresInSketcher.FCMacro
(16.97 KiB) Downloaded 14 times
.
fc_tofu
Posts: 261
Joined: Sun Jan 05, 2020 4:56 pm

Re: Feature request : round corner rectangle

Postby fc_tofu » Fri Mar 20, 2020 8:05 pm

edi wrote:
Tue Feb 11, 2020 5:25 pm
Hello paddle,
I wrote a macro doing something similar to what you want.
The macro draws centered figures in sketcher: rectangle, square, rectangle with rounded corners, square with rounded corners, circle and hexagon.
Each figure can be drawn with or without constraints. If you coose "Add constraints" you can change the values of the constraints after drawing. The figures keep always centered.
How to use the macro:
1. Open a new sketch in SKETCHER or PART DESIGN
2. Start the macro
3. Select what you want to be drawn
4. Draw the figure by pressing "draw figure"
5. End the macro by pressing "close window"
CenteredFiguresInSketcher.FCMacro.
Thank you, guy.
I just tried you macro script. It prompted error message in Report View.
Traceback (most recent call last):
File "MacroUser/CenteredFiguresInSketcher.FCMacro", line 251, in <module>
rechteckSkizze() # Programm ausführen
File "MacroUser/CenteredFiguresInSketcher.FCMacro", line 18, in __init__
self.dialogFenster() # meine HauptFunktion
File "MacroUser/CenteredFiguresInSketcher.FCMacro", line 87, in dialogFenster
self.wait() # erzeugt eine Fehlermeldung, aber ohne diese Zeile bleibt das Fenster nicht offen
<class 'AttributeError'>: 'rechteckSkizze' object has no attribute 'wait'
Could you give it a look, please.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20052 (Git)
Build type: Release
Branch: master
Hash: 6291921e9abe737e4440ff5814ca58547defadef
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Chinese/China (zh_CN)
chrisb
Posts: 22333
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature request : round corner rectangle

Postby chrisb » Fri Mar 20, 2020 10:37 pm

Symmetry was quite often the cause of problems in the past. So I try to avoid them if possible. Here I need only one of them:
Attachments
Snip macro screenshot-592a88.png
Snip macro screenshot-592a88.png (8.03 KiB) Viewed 190 times