Bevel macro (now does inside corners)

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Bevel macro (now does inside corners)

Post by TheMarkster »

Update to v0.2021.12.14

Now handles inside corners and allows to fillet all edges, not just newly created edges. Inside corners are fused to the object rather than cut away from it as the outside corners are done. I don't think this will break existing models, but it might change them. In previous versions inside corners were basically ignored.

***********
Updated to v0.2021.10.10.rev4
Now if you double click the Bevel object in the tree it brings up the vertex editor.

***********
Updated to v0.2021.10.10.rev3

It seems when a Part Design solid feature gets deleted it's up to that feature to ensure the next feature in the tree inherits its base feature. I was thinking FreeCAD managed that for us, but evidently not. So, this update resets the next feature so that it can inherit the Bevel object's base feature and continue the chain properly.



*******
Updated to v0.2021.10.09
  • Implemented simple vertex editor, triggered by toggling Edit Vertices property from False to True (sets itself back to False)
  • New colorized icon (probably still not perfect)
  • Claim Children property no longer defaults to True in Part Design, in order to maintain the linear tree view
With the new vertex editor you can change which vertices are used for the bevel by selecting them in the 3D view instead of editing the Vertices property with FreeCAD's built-in property editor.

Note: the UseAllVertices property is automatically set to True if you bevel an object without first selecting any vertices. In this case, all vertices are beveled. This property overrides any changes made in the Vertex editor, so be sure to set it to False if you want to select individual vertices. There is a warning message if you open the vertex editor with this property set to True, but no warning if you edit using the default editor by clicking the [...] in the Vertices property.

*************
With the Bevel macro (installable in the addon manager) you can bevel vertices of an object. It works just like chamfer except instead of working on edges it works on vertices.

Here is a prism made in Part Design by padding an octagon drawn in the sketcher:
Snip macro screenshot-4a99be.png
Snip macro screenshot-4a99be.png (46.03 KiB) Viewed 6200 times
Here, after selecting the Pad and running the Bevel macro, and then setting the Length property of the Bevel object to 3 mm (it defaults at 1 mm):
Snip macro screenshot-c6254c.png
Snip macro screenshot-c6254c.png (48.83 KiB) Viewed 6200 times
It can also fillet the new edges that it created:
Snip macro screenshot-c16eac.png
Snip macro screenshot-c16eac.png (54.87 KiB) Viewed 6200 times
You can select individual vertices or if you select the object in the tree all vertices are beveled.

Works in Part Design or outside Part Design, but don't try putting one created outside Part Design into a Part Design body or else it will go in as a base feature.

It is quite robust with the bevels, which can overlap each other and not cause an issue, unlike chamfer, which will fail in such cases.
Last edited by TheMarkster on Tue Dec 14, 2021 10:00 pm, edited 4 times in total.
User avatar
M4x
Veteran
Posts: 1474
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Bevel macro

Post by M4x »

Thanks, it's on my "I've to try this" list :mrgreen:
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: Bevel macro

Post by LHC »

Just tried to install this macro but the macro list does not seem to appear when I go to addons. Is there an issue with that ? I'm using a weekly build but it's not the most current one.

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.25844 (Git)
Build type: Release
Branch: master
Hash: 1b20118dfa3fb9f127f0e4fb122701f7fcdaa9fc
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)

EDIT - I just downloaded and installed the latest weekly build and seem the problem is still there - just hangs when it should be bringing up the list of macros from the wiki......
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Bevel macro

Post by GeneFC »

LHC wrote: Thu Oct 07, 2021 10:40 pm Just tried to install this macro but the macro list does not seem to appear when I go to addons.
If you don't have git python (Windows users typically do not) then some macros may not show up in the Addon Manager. If you can find the macro then you can install it manually.

I did not see a link above. Perhaps TheMarkster could add one.
TheMarkster wrote: Thu Oct 07, 2021 6:56 pm With the Bevel macro (installable in the addon manager)
Gene
User avatar
M4x
Veteran
Posts: 1474
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Bevel macro

Post by M4x »

TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Bevel macro

Post by TheMarkster »

I'm getting this warning the report view:

Appears to be an issue connecting to the Wiki, therefore cannot retrieve Wiki macro list at this time

None of the wiki macros are showing up, only those hosted on github. I've seen this before. It corrects itself in time.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Bevel macro

Post by TheMarkster »

Take a standard default cube, select it, and run the macro. Set length to 10 and you get a platonic solid (octahedron) with 8 equilateral triangles.

Perhaps others can be made, as well.
Snip macro screenshot-c57a81.png
Snip macro screenshot-c57a81.png (41.92 KiB) Viewed 5820 times
User avatar
-alex-
Veteran
Posts: 1856
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Bevel macro

Post by -alex- »

Wow, very nice! Furthermore it's parametric.
This feature allows to achieve nice corner reliefs on sheetmetal fancy parts, fully 3D (non orthogonal bends).
Native SM WB corner relief are nice as well, but has some limitations in regard non orthogonal bends.
Thank you so much :D

Just on comment: maybe the icône is too grey coloured. That a bit confusing about hide/show state.

Edit: example for sheetmetal part:
Image
https://forum.freecadweb.org/viewtopic. ... 90#p541302
Last edited by -alex- on Wed Oct 20, 2021 9:44 pm, edited 1 time in total.
LHC
Posts: 321
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canadian Coffee Shop

Re: Bevel macro

Post by LHC »

Sorry guys - I'm fumbling badly. I don't know anything about Python really, and certainly not how it's bundled with the FreeCad weekly conda builds for PC/Win 10.

I've attached a screenshot - seems there's a need for gitpython ? Whatever that is.... Also, Markster mentioned that the failure to load the wiki macros in this list corrects itself in time usually. So I am not sure if I have that problem in addition to the gitpython thing or if it's separate issues. I think I have a git account set up years ago as the result of a long forgotten requirement (seems to be a desktop version of git) so I can probably skip the step of setting up a git account if that's required......just need to figure out the password I had - lol

Thanks for any links to guidelines for the completely clueless !

Oh - one other thing - I seem to have installed Python separately some months back when I decided to start a few tutorials on it. It appears to be a later version that the one that pops up in the Python panel within FreeCad. So I am assuming there's a fully functioning Python hidden somewhere in the folder where I have placed the weekly conda Freecad on my machine? Is there any requirement to remove the other separate one at this stage ? Maybe it's just a source of confusion for me at this point.

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.25943 (Git)
Build type: Release
Branch: master
Hash: a65464b722a846bd2999aa2fecdff1132b15b297
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)



temp.JPG
temp.JPG (114.51 KiB) Viewed 5625 times
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: Bevel macro

Post by heda »

How_to_install_macros#Installing_macros
have never failed with a manual install, 2 ways are described.

use below in your fc console if you do not know where the macros are located on your computer.

Code: Select all

App.getUserMacroDir(True)
Post Reply