LUA command for fillet on 2d square

This section is for general discussion about Gadgets
Post Reply
Ysebarth
Posts: 1
Joined: Thu Mar 04, 2021 5:06 pm
Model of CNC Machine: Stepcraft

LUA command for fillet on 2d square

Post by Ysebarth »

Hi,
I'm just starting to learn how to work with LUA scripting to create gadgets or make live easier when repeating steps on different dimensions. I might have the wrong way of aproaching this, but the question is: how can I apply a fillet (corner radius) to a dimensioned square?
I like to create a square, which is i.e. a simply cut board, by giving the dimension through LUA script. So imagine I define a board with 300x250mm. How can I apply fillets (corner radius) to this square, meaning that the cut toolpath shall have a radius of r5 instead of cutting sharp edges?

Wasn't able to find any command that seems to do this.

Looking forward to your replies.
ThX

User avatar
Adrian
Vectric Archimage
Posts: 11639
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: LUA command for fillet on 2d square

Post by Adrian »

There isn't a one to one relationship between tools available in the UI and tools in the LUA library so sometimes you have to write the routine or try a different approach like offsetting/insetting. Look at this gadget for code ideas - viewtopic.php?f=47&t=27848

User avatar
adze_cnc
Vectric Apprentice
Posts: 1453
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: LUA command for fillet on 2d square

Post by adze_cnc »

Rather than thinking I need to fillet a rectangle how about thinking I need to create a rectangle with rounded corners? I haven’t looked at the API in a long time. Is there an API call to create a rectangle with rounded corners?

Post Reply