Lua Join Gadget

This forum has been created for users to submit suggestions for Gadgets
Post Reply
reggieaj
Posts: 8
Joined: Sat Jun 18, 2022 11:09 pm
Model of CNC Machine: X-Carve

Lua Join Gadget

Post by reggieaj »

Can't find anything in SDK that would allow me to automate joining vectors in a selection
(which would only include individual elements some open and some closed).

I would like to be able to perform join from Lua code but don't see that function anywhere.
Anyone know how to do in Lua?

User avatar
jimandi5000
Vectric Wizard
Posts: 1050
Joined: Wed Mar 11, 2015 6:50 pm
Model of CNC Machine: Home Made 60 x 120
Location: North Houston Tx.
Contact:

Re: Lua Join Gadget

Post by jimandi5000 »

reggieaj wrote:
Tue Jun 21, 2022 4:39 am
Can't find anything in SDK that would allow me to automate joining vectors in a selection
(which would only include individual elements some open and some closed).

I would like to be able to perform join from Lua code but don't see that function anywhere.
Anyone know how to do in Lua?
Hi Reggieaj,

You are correct, there is no automate join function in the SDK. Due to the complexities of identifying line and arc gaps that should be closed and those that should not be close would be virtually impossible. I don't foresee the development team ever providing automated join capabilities as a SDK tool kit.
Thanks,
Jim

reggieaj
Posts: 8
Joined: Sat Jun 18, 2022 11:09 pm
Model of CNC Machine: X-Carve

Re: Lua Join Gadget

Post by reggieaj »

Wow! That's really really unfortunate!!!!!
The geometry I want to join will always already be connected or closed.
It's coming from wireframe geometry exploded from solids and and regions in Autocad.
I could automate the whole process of going from selected AutoCAD solid to Vcarve tool path if I had a join command!!!!!!

I'm going to see if I can find a work around as I get more familiar with Lua.
I mistakenly thought grouping the elements would be sufficient. But that's not the case.
I thought I could join 1st in AutoCAD. But importing DXF into VCarve breaks up geometry (at least in my initial tests)

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

Re: Lua Join Gadget

Post by Adrian »

Try exporting/importing as EPS rather than DXF.

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

Re: Lua Join Gadget

Post by adze_cnc »

reggieaj wrote:
Tue Jun 21, 2022 2:54 pm
...AutoCAD. But importing DXF...
For that matter since you’ve got AutoCAD you could export in native DWG format… DXF is sooo 1980s… :lol:

reggieaj
Posts: 8
Joined: Sat Jun 18, 2022 11:09 pm
Model of CNC Machine: X-Carve

Re: Lua Join Gadget

Post by reggieaj »

Ok. I'll try EPS.
I tried dwg but it still separated joined geometry when imported into VCarve.
Export PDF form AutoCAD, import into Vcarve and converting bitmap resulted in joined and grouped entities.
But conversion in Vcarve was not precise enough.

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

Re: Lua Join Gadget

Post by Adrian »

Exporting PDF shouldn't create a bitmap unless Autocad does something weird with them. PDF's can contain vectors which is why VCarve imports vectors and bitmaps from them.

Personally I wouldn't get too hung up on joining vectors in code. After all it's only two keystrokes to join them in VCarve assuming it's an easy selection.

Post Reply