Author Topic: Text on Polyline plugin  (Read 11668 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4378
    • View Profile
Text on Polyline plugin
« on: June 12, 2015, 18:13:47 pm »
This is an Alpha test of the plugin, please keep that in mind  ;D

You would not believe the amount of time I've spent getting this far, everything I tried previous failed at some point. It seemed straight forward at first but you have to try things out as it's impossible to predict the obstacles ahead.

1. Unzip and install the dll
2. open the example file if you wish

or starting from a new blank file

3. Write some text using the CamBam text editor
4. Draw a polyline that you want the text to follow, make sure it's long enough
5. Select the text and the polyline
6. Goto Plugins -> Text On Polyline

The text should now flow onto the line.

Things to watch out for;

1. The line may need to be 'reversed'
2. The text will start at the polyline 'start point'
You can insert a new point using this; http://www.cambam.co.uk/forum/index.php?topic=4855.msg36669#msg36669
then change the start point; http://www.cambam.info/doc/plus/cad/EditPolyline.htm
3. If the polyline is closed you may need to change from CW to CCW
You can get the polyline information using this; http://www.cambam.co.uk/forum/index.php?topic=4897.msg37236#msg37236

Looking for constructive feedback at the moment in order to get to a 'finished' plugin  ;D

Some fonts work great, others seem to struggle and will require further investigation.
This issue now fixed.

Edit: version 2 attached
1. Fixed error in calculations for character positions  ::)

Edit: v 2.1 attached
1. Stopped the plugin adding space characters to cadfile, they were just clutter.

Edit: v2.2 attached
1. code cleanup and improved entity selection checks
2. Translation code added to error message

Edit: v2.3 attached

1. undo point added so text can be removed from the line.
2. Translation code added to undo message

Edit: v3 attached
Has been compiled with .NET version 4 assemblies and references to CamBam v1.0 dlls

Has been modified and tested to work on;

    Windows
    Linux

Works with CamBam version 1 ONLY
« Last Edit: January 09, 2017, 20:20:53 pm by EddyCurrent »
Made in England

Online lloydsp

  • CNC Jedi
  • *****
  • Posts: 8277
    • View Profile
Re: Text on Polyline plugin
« Reply #1 on: June 12, 2015, 18:23:08 pm »
Oh! Dude!  I have a use for that now!

That's a cool plugin (I think, not having yet tried it<G>).  I have used the arc-text one frequently, but this gives me options I never had before.

Man!  Andy's going to have a LOT of work to do when he gets back. <HAH!>

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6007
    • View Profile
    • Cambam V1.0 French Doc
Re: Text on Polyline plugin
« Reply #2 on: June 12, 2015, 18:24:26 pm »
Hello,

Nice, a new plugin to test this WE ...  ;D

++
David


Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4378
    • View Profile
Re: Text on Polyline plugin
« Reply #3 on: June 12, 2015, 18:31:12 pm »
Oh! Dude!  I have a use for that now!

That's a cool plugin (I think, not having yet tried it<G>).  I have used the arc-text one frequently, but this gives me options I never had before.
Lloyd

Maybe you will have to go to Version 0.9.8P (beta-2) ?
Made in England

Online lloydsp

  • CNC Jedi
  • *****
  • Posts: 8277
    • View Profile
Re: Text on Polyline plugin
« Reply #4 on: June 12, 2015, 18:34:35 pm »
<sigh>  Can't.  Still fighting with the Army!

Soon, I hope.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Online Bubba

  • CNC Jedi
  • *****
  • Posts: 2933
    • View Profile
Re: Text on Polyline plugin
« Reply #5 on: June 12, 2015, 19:16:41 pm »
Great. No longer have jump thru the hoops between Inscape and CB. To get this done. Thanks Eddy! ;) :D ;D
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4378
    • View Profile
Re: Text on Polyline plugin
« Reply #6 on: June 12, 2015, 19:17:45 pm »
Bubba, just remember this is not the finished version  ;)
Made in England

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6007
    • View Profile
    • Cambam V1.0 French Doc
Re: Text on Polyline plugin
« Reply #7 on: June 12, 2015, 20:39:41 pm »
Good, works well  :D

++
David

Online Bubba

  • CNC Jedi
  • *****
  • Posts: 2933
    • View Profile
Re: Text on Polyline plugin
« Reply #8 on: June 12, 2015, 22:34:11 pm »
Bubba, just remember this is not the finished version  ;)

YES. I have read your first post. ;) ;D
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1322
    • View Profile
Re: Text on Polyline plugin
« Reply #9 on: June 12, 2015, 23:34:23 pm »
HI Eddy
What a  good idea!
Dave

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4378
    • View Profile
Re: Text on Polyline plugin
« Reply #10 on: June 13, 2015, 19:39:32 pm »
I found why some fonts were giving trouble, there was an error in my character position calculations, I'm now much happier with the results having tried loads of fonts without problem.
Also realised that space characters were being added to the file, these were not required, just clutter.

new version 2.2 attached to first post.

Edit: I tried to combine all the separate characters into one text entity at the end but it would only allow text in a straight line.

@Lloyd, did you try it on your version of CamBam ?
« Last Edit: June 14, 2015, 07:43:43 am by EddyCurrent »
Made in England

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4378
    • View Profile
Re: Text on Polyline plugin
« Reply #11 on: June 14, 2015, 13:03:11 pm »
Added undo point. When text is placed on the line, this operation can be undone by Ctrl+Z or clicking the 'undo' arrow on the toolbar.
ver. 2.3 added to first post.

@David, I will make a pdf manual for this.
« Last Edit: June 14, 2015, 14:15:25 pm by EddyCurrent »
Made in England

Offline Jeff_Birt

  • CNC Jedi
  • *****
  • Posts: 821
    • View Profile
Re: Text on Polyline plugin
« Reply #12 on: June 14, 2015, 16:18:31 pm »
Eddy, it occurred to me that you should be able to place any object/geometry along a polyline. If I were to arrange a group of objects on a straight line to my liking then they could be copied along an arbitrary polyline as you are doing with text. It is just a thought, I'm not sure under what circumstance it would be useful.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6007
    • View Profile
    • Cambam V1.0 French Doc
Re: Text on Polyline plugin
« Reply #13 on: June 14, 2015, 16:42:10 pm »
Hello,

@jeff: If needed, a way exists to do that.

- create a polyline

- divide it with the divide geometry by n pt or step around geometry (point list)

- use my shapes to pointlist script
http://www.cambam.co.uk/forum/index.php?topic=4449.0

++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6007
    • View Profile
    • Cambam V1.0 French Doc
Re: Text on Polyline plugin
« Reply #14 on: June 14, 2015, 21:40:14 pm »
Hello,

Just tested ; the plugin works also on Linux version. :D

++
David