Draw Text in Gadget
-
- Posts: 26
- Joined: Mon Jan 22, 2018 3:47 am
- Model of CNC Machine: ShopBot D2418
- Location: Leesburg, Virginia, USA
Draw Text in Gadget
I've built a gadget to help reduce steps and to gain precision and time. I've gotten the lines drawn, now I would like to add some text to the layer I've drawn into (ala Draw Text tool). I don't see anything in the API documentation about this. Is it possible to do from a Lua script?
-
- Vectric Wizard
- Posts: 1687
- Joined: Sun Oct 24, 2010 7:28 pm
- Model of CNC Machine: homebuilt 4'x2' (Mach3+G540)
- Location: Guelph, Ontario
- Contact:
Re: Draw Text in Gadget
Most of the Gadget API is for vector and toolpath creation; they do not in general duplicate the built in tools such as manipulating text.
Pity.
Cheers!
Pity.
Cheers!
Paul Rowntree
WarpDriver, StandingWave, Topo and gadgets available at PaulRowntree.weebly.com
WarpDriver, StandingWave, Topo and gadgets available at PaulRowntree.weebly.com
- jimandi5000
- Vectric Wizard
- Posts: 1055
- Joined: Wed Mar 11, 2015 6:50 pm
- Model of CNC Machine: Home Made 60 x 120
- Location: North Houston Tx.
- Contact:
Re: Draw Text in Gadget
Hi There,
I write full lines of test with my gadget.
Send me a emal message at james.l.anderson@outlook.com
Jim
I write full lines of test with my gadget.
Send me a emal message at james.l.anderson@outlook.com
Jim
Thanks,
Jim
Jim
- jimandi5000
- Vectric Wizard
- Posts: 1055
- Joined: Wed Mar 11, 2015 6:50 pm
- Model of CNC Machine: Home Made 60 x 120
- Location: North Houston Tx.
- Contact:
- jimandi5000
- Vectric Wizard
- Posts: 1055
- Joined: Wed Mar 11, 2015 6:50 pm
- Model of CNC Machine: Home Made 60 x 120
- Location: North Houston Tx.
- Contact:
Re: Draw Text in Gadget
Here is the current copy of the code.
- Attachments
-
- TextWriter.zip
- (2.39 KiB) Downloaded 373 times
Thanks,
Jim
Jim
-
- Posts: 26
- Joined: Mon Jan 22, 2018 3:47 am
- Model of CNC Machine: ShopBot D2418
- Location: Leesburg, Virginia, USA
- jimandi5000
- Vectric Wizard
- Posts: 1055
- Joined: Wed Mar 11, 2015 6:50 pm
- Model of CNC Machine: Home Made 60 x 120
- Location: North Houston Tx.
- Contact:
- TomWS
- Vectric Wizard
- Posts: 350
- Joined: Sat Mar 06, 2021 11:06 pm
- Model of CNC Machine: OB Lead 1010, Mach3; OB C-Beam 1060 grbl
Re: Draw Text in Gadget
I happened on this thread as I'm looking at an application that requires me to engrave approximately 180 name cards for place settings at a wedding reception. I figured LUA script should allow me to use a name list as input to generate a sequence of VCarve operations to do the carving in the font of choice (Bride's prerogative, of course).
I downloaded Jim's code and was surprised that it didn't use DrawText operations, but created simple stroke vectors for each character. Well, that's a great tool, but not what I need.
Has there been any progress on this such that the VCarve text tools can be used in this case?
I downloaded Jim's code and was surprised that it didn't use DrawText operations, but created simple stroke vectors for each character. Well, that's a great tool, but not what I need.
Has there been any progress on this such that the VCarve text tools can be used in this case?
- FixitMike
- Vectric Wizard
- Posts: 2177
- Joined: Sun Apr 17, 2011 5:21 am
- Model of CNC Machine: Shark Pro Plus (retired)
- Location: Burien, WA USA
Re: Draw Text in Gadget
Check the Plate Production tool. It is in the bottom line of drawing tools. See Help-Help Contents for instructions.
Good judgement comes from experience.
Experience comes from bad judgement.
Experience comes from bad judgement.
- Adrian
- Vectric Archimage
- Posts: 14660
- Joined: Thu Nov 23, 2006 2:19 pm
- Model of CNC Machine: ShopBot PRS Alpha 96x48
- Location: Surrey, UK
Re: Draw Text in Gadget
As Mike says there is a tool in VCarve to do this already so you don't need a gadget.
Here's a video that shows how it works - https://www.vectric.com/support/tutoria ... ral_Topics
- TomWS
- Vectric Wizard
- Posts: 350
- Joined: Sat Mar 06, 2021 11:06 pm
- Model of CNC Machine: OB Lead 1010, Mach3; OB C-Beam 1060 grbl
Re: Draw Text in Gadget
Thank you very much Mike & Adrian! This tool is very useful as well as cleverly named to hide it's function!
I'll have to play with this to see how I can adapt my 'production' model to fit its process. My original thought was to use precut name tags with a jig on the CNC router where I'd place a tag, one at a time, press a key, and that tag would be custom engraved with the next name in the list. I suppose that the plate production tool could be used to make multiple sheets and a LUA script could load them one at a time, but that seems a bit unwieldy.
I would welcome any suggestions you might have, but, this helps a lot and I'm sure I'll figure something out.
Actually, it seems that it would be very easy to use the 'cutout' layer to make a jig to hold my precut tags and use a slightly smaller version of that to hold the tags in the first jig. Then the process would be:
1. Load up the jig with blank tags,
2. tie down the hold down jig on top of that,
3. Cut the sheet,
4. Remove the tags and repeat.
Easy peasy!
Thanks again!!!!
I'll have to play with this to see how I can adapt my 'production' model to fit its process. My original thought was to use precut name tags with a jig on the CNC router where I'd place a tag, one at a time, press a key, and that tag would be custom engraved with the next name in the list. I suppose that the plate production tool could be used to make multiple sheets and a LUA script could load them one at a time, but that seems a bit unwieldy.
I would welcome any suggestions you might have, but, this helps a lot and I'm sure I'll figure something out.
Actually, it seems that it would be very easy to use the 'cutout' layer to make a jig to hold my precut tags and use a slightly smaller version of that to hold the tags in the first jig. Then the process would be:
1. Load up the jig with blank tags,
2. tie down the hold down jig on top of that,
3. Cut the sheet,
4. Remove the tags and repeat.
Easy peasy!
Thanks again!!!!
- jimandi5000
- Vectric Wizard
- Posts: 1055
- Joined: Wed Mar 11, 2015 6:50 pm
- Model of CNC Machine: Home Made 60 x 120
- Location: North Houston Tx.
- Contact:
Re: Draw Text in Gadget
CNCDaveToo wrote: ↑Thu Jan 25, 2018 3:58 amI've built a gadget to help reduce steps and to gain precision and time. I've gotten the lines drawn, now I would like to add some text to the layer I've drawn into (ala Draw Text tool). I don't see anything in the API documentation about this. Is it possible to do from a Lua script?
Hi Dave,
Have you looked at my "TextWriter.zip" code? I show how to set layer Name, Color, etc... in the code.
Thanks,
Jim
Jim