Author Topic: Dotted Lines reborn as "Dashed Lines"  (Read 53003 times)

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Dotted Lines reborn as "Dashed Lines"
« on: May 30, 2015, 12:49:06 pm »
This is more like it, forget the old Dotted lines stuff, let's start again.

There is one important thing to remember here, like the VEngrave plugin, if you save a file with Dashed Lines in it, you can not load it into CamBam if the Dashed Lines plugin is not installed. That is just common sense, nothing to do with me or the plugin.

Features:

1. select one or more polylines,
go to,
Main menu -> Edit -> Convert To -> Dashed Lines
Right click context menu -> Edit -> Convert To -> Dashed Lines
Choose the gap size and line type.

2. If you don't like the look of the converted line, repeat the process and choose new settings

3. Dashed Lines can be edited like polylines but you have to select the line and right click to get the menu, double clicking the line will not work.

4. Files containing Dashed Lines can be Saved and Loaded as you would with any other file, the only constraint being that the files cannot be loaded into a CamBam that does not have the Dashed Lines plugin installed.

Version 1 attached plus a test file.

Several improvements are in development.

Bubba, I need you to test this  :D

Remember to remove the old Dotted Lines plugin first (and throw it in the bin)

Edit:
Update added v2
1. Translation code added
2. Information in the Entity Tag: is no longer required for the plugin to work
3. Editable parameters, see picture.
  
   Click in the box and change these values, the Dashed Polyline will update to the new settings.

   If you enter a number < 1 for DotLineStyle, it will default to 1
   If you enter a number > 3 for DotLineStyle, it will default to 3
   If you enter a minus number or zero for Spacing, it will default to 1

Edit:
updated to v3
1. Converts directly to DotPolylines;  polylines, polyrectangles, circles, arcs, without having to convert to Polylines first.
2. Improved the look of Line Style 2 (dot/dash). Note: the enhancement will also be applied to any older files previously saved. This is becasue the cb file does not include details of how the line will be drawn.

Edit:
updated to v4
1. new line styles added
2. new menu form added
3. It's also possible to select more than one line and change the 'Spacing' and/or 'DotLineStyle' of all of them by editing the parameter value.
4. Translation code included

Edit:
updated to v5
1. It is now possible to use the mouse double click method to edit a DotPolyline.
Just double click on the line to enter edit mode.

Edit:
 updates to v6

1. Form translation code included

Edit: currently does not work with latest release version P ( 22 Sept 2015 )

Edit:
 updates to v7

For CamBam v1.0 ONLY

Edit:
 updates to v7.1

1. For CamBam v1.0 ONLY
2. TypeName field now hidden
« Last Edit: March 30, 2017, 20:11:12 pm by EddyCurrent »
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #1 on: May 30, 2015, 13:43:21 pm »
Hello,

Works for me  ;D

Note: the error messages are not translatable.

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #2 on: May 30, 2015, 14:14:57 pm »
Question,
Do we know how to validate input in the Properties area ? or how to refresh it if the values change.
I think there might be an event raised for text changed but I can't find it or get things that might be it to work.
« Last Edit: May 30, 2015, 14:18:22 pm by EddyCurrent »
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #3 on: May 30, 2015, 14:38:17 pm »
I don't understand your question ..  :-[

If I change something in the property grid, the line are immediately updated, and if I change the line with the menu, the grid is updated too ...

I just try it on linux version.

- drawing dashed lines works
- save not works (XML error)
- a file created on win version can be loaded on linux version without errors and dashed lines are OK

I guess that maybe the pb has something to do with the problem related here ; not sure you can do something for that.

http://www.cambam.co.uk/forum/index.php?topic=4397.0

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #4 on: May 30, 2015, 14:44:40 pm »
I don't understand your question ..  :-[

If I change something in the property grid, the line are immediately updated, and if I change the line with the menu, the grid is updated too ...

++
David

If you enter in the property grid, DotLineStyle  = 10, the value shown will stay at 10 unless you come out of the grid then go back in.
Of course in the code I test for the value and don't let it go above 3.

What I want to do is; if anyone enters a number>3 in the box, the text should change to 3 immediately.
Filmed in Supermarionation

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #5 on: May 30, 2015, 14:54:02 pm »
Linux should still be able to save the file, you would think.
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #6 on: May 30, 2015, 15:07:09 pm »
I'll take a look tonight in the temp file created by linux ... now I must take my Grass Killer (and not Grace Kelly  ;D) before it rain again ..  ::)

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #7 on: May 30, 2015, 15:13:35 pm »
Does the VEngrave plugin have the same issue with Linux ?
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #8 on: May 30, 2015, 16:10:17 pm »
Does the VEngrave plugin have the same issue with Linux ?

No, it works
++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #9 on: May 30, 2015, 16:21:30 pm »
I add the CB file that works and the tmp file given by linux when I try to re-save the same file on linux

(linux read it without problem but can't save)

++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #10 on: May 30, 2015, 16:34:25 pm »
another example, because the first example has only dotted lines.

this new as 1 polyline and a dotted line ..

Hope that can help .. ;)

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #11 on: May 30, 2015, 20:34:54 pm »
Outputs seem to vary;

These extracts are from VEngrave

       <mop xsi:type="MOPVEngrave">
 
       <pline id="4" Closed="true">

This is from Dashed Lines

       <pline xsi:type="DotPolyline" id="2">

This is from your Linux example

       <pline id="1">
Filmed in Supermarionation

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #12 on: May 31, 2015, 10:35:56 am »
updated to v3

1. Converts directly to DotPolylines;  polylines, polyrectangles, circles, arcs, without having to convert to Polylines first.
2. Improved the look of Line Style 2 (dot/dash). Note: the enhancement will also be applied to any older files previously saved. This is becasue the cb file does not include details of how the line will be drawn.

File added to first post
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #13 on: May 31, 2015, 12:58:45 pm »
Hello,

Ah yes, linestyle 2 is prettier  ;)

++
David

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Dotted Lines reborn as "Dashed Lines"
« Reply #14 on: May 31, 2015, 13:32:07 pm »
Pipes between processes can block until certain terminating conditions are met.  Perhaps it's not the process itself that's behind by 'one', but the pipe/channel communicating messages.

Flushing a pipe/channel would have the effect of forcing the message through.

Lloyd

Lloyd, wrong thread, you need to be here; http://www.cambam.co.uk/forum/index.php?topic=4665.msg37554#msg37554
Filmed in Supermarionation