Draw Text in Gadget

This section is for general discussion about Gadgets
Post Reply
CNCDaveToo
Posts: 26
Joined: Mon Jan 22, 2018 3:47 am
Model of CNC Machine: ShopBot Desktop
Location: Leesburg, Virginia, USA

Draw Text in Gadget

Post by CNCDaveToo »

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?

PaulRowntree
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

Post by PaulRowntree »

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!
Paul Rowntree
WarpDriver, StandingWave, Topo and gadgets available at PaulRowntree.weebly.com

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

Re: Draw Text in Gadget

Post by jimandi5000 »

Hi There,

I write full lines of test with my gadget.

Send me a emal message at james.l.anderson@outlook.com

Jim
Thanks,
Jim

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

Re: Draw Text in Gadget

Post by jimandi5000 »

Here is what it looks like.
Attachments
TextTool.JPG
Thanks,
Jim

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

Re: Draw Text in Gadget

Post by jimandi5000 »

Here is the current copy of the code.
Attachments
TextWriter.zip
(2.39 KiB) Downloaded 261 times
Thanks,
Jim

CNCDaveToo
Posts: 26
Joined: Mon Jan 22, 2018 3:47 am
Model of CNC Machine: ShopBot Desktop
Location: Leesburg, Virginia, USA

Re: Draw Text in Gadget

Post by CNCDaveToo »

Many (belated) thanks Jim!
Be kind.

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

Re: Draw Text in Gadget

Post by jimandi5000 »

CNCDaveToo wrote:
Fri Mar 13, 2020 11:22 pm
Many (belated) thanks Jim!
No problem... Anytime :)
Thanks,
Jim

TomWS
Vectric Apprentice
Posts: 62
Joined: Sat Mar 06, 2021 11:06 pm
Model of CNC Machine: Open Builds Lead 1010 with Mach 3

Re: Draw Text in Gadget

Post by TomWS »

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?

User avatar
FixitMike
Vectric Wizard
Posts: 1837
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

Post by FixitMike »

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.

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

Re: Draw Text in Gadget

Post by Adrian »

TomWS wrote:
Fri Jun 04, 2021 12:20 am
Has there been any progress on this such that the VCarve text tools can be used in this case?
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 Apprentice
Posts: 62
Joined: Sat Mar 06, 2021 11:06 pm
Model of CNC Machine: Open Builds Lead 1010 with Mach 3

Re: Draw Text in Gadget

Post by TomWS »

Thank you very much Mike & Adrian! This tool is very useful as well as cleverly named to hide it's function! :lol: :roll:

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!!!!

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

Re: Draw Text in Gadget

Post by jimandi5000 »

CNCDaveToo wrote:
Thu Jan 25, 2018 3:58 am
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?

Hi Dave,

Have you looked at my "TextWriter.zip" code? I show how to set layer Name, Color, etc... in the code.
Thanks,
Jim

Post Reply