Join Open Vectors
Join Open Vectors
I was wondering if anyone has created a gadget to join open vectors or knows if there is a lua function to do so?
- CrowsWW
- Vectric Craftsman
- Posts: 155
- Joined: Wed Jun 27, 2012 7:10 pm
- Model of CNC Machine: ShopSabre 4896
- Location: Palmer, Alaska USA
Re: Join Open Vectors
if you have Vcarve Pro it is on the Edit Objects.
see picture I put a red line around the icon.
see picture I put a red line around the icon.
Troy Crow
Crow's Woodwork's
I have a day job to support my wood habit!
Crow's Woodwork's
I have a day job to support my wood habit!
Re: Join Open Vectors
Yes I know how to do it manually, but I want aspire to do it for me via a gadget.
Re: Join Open Vectors
I guess let me clarify, I am looking to make a gadget that selects all vectors on a layer, joins the vectors then selects the next layer....and so on.
- Rcnewcomb
- Vectric Archimage
- Posts: 5928
- Joined: Fri Nov 04, 2005 5:54 am
- Model of CNC Machine: 24x36 GCnC/WinCNC with ATC
- Location: San Jose, California, USA
- Contact:
Re: Join Open Vectors
You would need to write your own based on your rules for how vectors should be joined.
For example, The vectors may be joined, but not be what you had in mind.
For example, The vectors may be joined, but not be what you had in mind.
- Randall Newcomb
10 fingers in, 10 fingers out, another good day in the shop
10 fingers in, 10 fingers out, another good day in the shop
Re: Join Open Vectors
The shapes I would be joining would be simple closed (not recogonized by aspire as closed) shapes, with a tolerance less than 0.01 in.
My question basically is what lua script function can I use to join the vectors?
My question basically is what lua script function can I use to join the vectors?
- Adrian
- Vectric Archimage
- Posts: 14683
- Joined: Thu Nov 23, 2006 2:19 pm
- Model of CNC Machine: ShopBot PRS Alpha 96x48
- Location: Surrey, UK
Re: Join Open Vectors
There isn't one function that will do it. As Randall says you have to write code that uses a series of different functions to do it even if all you want to do is what you describe. Basically working through the contours, finding the gaps, appending onto a new vector with the points adjust to be the same etc. That's the only way I know to do it.
I use scripts to automate the Aspire UI itself when I want to do something like that as it's quicker and easier than creating the LUA code.
I use scripts to automate the Aspire UI itself when I want to do something like that as it's quicker and easier than creating the LUA code.
Re: Join Open Vectors
Thanks Adrian!
That's kind of what I was thinking, I was just hoping there was an easier way.
That's kind of what I was thinking, I was just hoping there was an easier way.
Re: Join Open Vectors
Adrian,
That's the approach I'll take.
Since the elements I want to join will always be connected unless they are closed objects (such as holes) within the perimeter of the the objects that need joining, I expect the following algorithm would work:
Create new empty contour
Add 1st encountered non-closed element to the contour
For each remaining non-closed element
Append the next element to the end of the contour
This assumes appending to a contour results in a join. And I would expect traversing the elements should show that they are encountered in adjacent/connected order.
I'm going to try to modify the SelectVectorsOnLayer function to accomplish an overall join of the non-closed but connected elements on a layer.
What say yee?
That's the approach I'll take.
Since the elements I want to join will always be connected unless they are closed objects (such as holes) within the perimeter of the the objects that need joining, I expect the following algorithm would work:
Create new empty contour
Add 1st encountered non-closed element to the contour
For each remaining non-closed element
Append the next element to the end of the contour
This assumes appending to a contour results in a join. And I would expect traversing the elements should show that they are encountered in adjacent/connected order.
I'm going to try to modify the SelectVectorsOnLayer function to accomplish an overall join of the non-closed but connected elements on a layer.
What say yee?