Author Topic: Halftone image generator plugin - "Semitone"  (Read 27037 times)

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 266
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #15 on: November 05, 2017, 07:47:09 am »
Dear Eddy
I am trying out V1.1, but have some problems (0.98 and 1.0).
After loading an image I cannot seem to enter a correct set of parameters.

If I first select "Default-mm" then "45d V Cutter" I get a "V Angle error" and the Max Z depth is set to NaN.
If I continue to set parameters (Width, Max hole diam, Hole spacing) then Max Z depth is is set to some tiny characters (see attached image).  On Simulate I get a "Parameter Error"

Any thoughts

Geoff

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5211
  • Made in England
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #16 on: November 05, 2017, 09:16:43 am »
Geoff,

The next version is a total rewrite, I'm on with it now.
There is an error in the default-mm definition for that tool, it must be fixed first or choose from another tool library, hence the "V Angle error" message. ( I can't remember what the error was but it was obvious when looking at the tool library definition.)

All the other errors and messages stem from that.
« Last Edit: November 05, 2017, 09:25:40 am by EddyCurrent »
Filmed in Supermarionation

Offline GeoffreyGRoy

  • Wookie
  • ****
  • Posts: 266
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #17 on: November 05, 2017, 22:58:33 pm »
Thanks, yes bad tool definition,
Geoff

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3337
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #18 on: November 06, 2017, 15:44:30 pm »
Eddy,
Just want you to know.. Your effort is appreciated here. :D ;)
My 2ยข

Win11, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, 4th Axis, Endurance Laser.

Offline pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1944
    • View Profile
    • pixelmaker
Re: Halftone image generator plugin - "Semitone"
« Reply #19 on: November 06, 2017, 15:50:00 pm »
Quote
scan lines can be angled (including 41 degrees for Ralph  Wink)

You are fantastic, thank you very much

ralf

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5211
  • Made in England
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #20 on: November 06, 2017, 16:38:14 pm »
Thanks both but it's not done yet. Everything was fine until I started messing about with the bidirectional idea, that's where the problem is. I'll need a cup of Double Bergamot Earl Grey to sort it out.
Filmed in Supermarionation

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5211
  • Made in England
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #21 on: November 06, 2017, 17:10:14 pm »
The tea worked  :D

Version 2.1 attached to first post in this thread

changes since v2.0
1. increased sensitivity of Min Size by factor of 10

Version2.1
1.. Works with CamBam v0.9.8. and v1.0
2. all on one form
3. form can be resized to full screen if desired
4. scan lines can be angled (including 41 degrees for Ralph  ;))
5. scan lines can be dithered or not (offset alternate rows)
6. bidirectional milling

Note: DO NOT enable "Optimisation Mode", the way it has been set with "'None" is the best for this plugin.
If it is enabled, the optimisation code slows the computer to a standstill  ??? likely because of handling such large pointlists.

7. minimum size holes can be adjusted to filter out small unwanted details.
8. number of points in the file is shown
9. default values auto adjust to the units used in CamBam, i.e. mm or inches

Picture shows the output in Cutviewer (thanks to David's excellent instructions here; http://www.cambam.co.uk/forum/index.php?topic=5409.msg43026#msg43026 )

Any changes or improvement ideas welcomed.

Edit: just found a bug when using inches. Because the units are changed , the numeric updown controls are triggering an event causing an error message to pop up. Fixed  ;D

Is seems to be a known issue and the solution is to do nothing until the control has become visible whereupon a handle is created.

Code: [Select]
  private void WidthUPDN_ValueChanged(object sender, EventArgs e)
        {
            if (WidthUPDN.IsHandleCreated)
            {
                UpdateData();
                DrawSimulation();
            }
        }
« Last Edit: November 06, 2017, 17:20:34 pm by EddyCurrent »
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7295
    • View Profile
    • Cambam V1.0 French Doc
Re: Halftone image generator plugin - "Semitone"
« Reply #22 on: November 06, 2017, 18:08:49 pm »
Hello

Thanks for this new version ;)

Quote
Any changes or improvement ideas welcomed.

About translation:

The Width label in Target image is not translatable, maybe the "t" tag is missing in the label ?
The Select Tool Library in the Library list is not translatable
The Select Tool in the Tools list is not translatable

The tools list is not sorted by tool number.

I don't know if it is possible or not, but maybe it would be fine that only V tools are listed in the tools list ?

For an unknown reason, simulation and source image radio buttons are not aligned on my UI .. ??? (picture)  PS, I use 120% for text size in windows settings, maybe it's the reason ? (W7 - ultimate)

++
David
« Last Edit: November 06, 2017, 18:10:32 pm by dh42 »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5211
  • Made in England
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #23 on: November 06, 2017, 19:23:35 pm »
I see you did a selfie in your picture  ;D ;D

Version 2.2 attached to first post in this thread.

Hello

About translation:

The Width label in Target image is not translatable, maybe the "t" tag is missing in the label ?
The Select Tool Library in the Library list is not translatable
The Select Tool in the Tools list is not translatable

Fixed, yes "t" was missing
Fixed, because text was embedded in the control but now taken out
Fixed, because text was embedded in the control but now taken out

Quote
The tools list is not sorted by tool number.

Fixed, needed; ToolCombo.Sorted = true;

Quote
I don't know if it is possible or not, but maybe it would be fine that only V tools are listed in the tools list ?

Fixed, needed this;
if (tooldef.ToolProfile == CamBam.CAM.ToolProfiles.VCutter) ToolCombo.Items.Add(tooldef.DisplayName);

Quote
For an unknown reason, simulation and source image radio buttons are not aligned on my UI .. ??? (picture)  PS, I use 120% for text size in windows settings, maybe it's the reason ? (W7 - ultimate)

++
David

Possibly Fixed,  changed property to "Locked" and changed the "Docked" setting
« Last Edit: November 06, 2017, 20:02:53 pm by EddyCurrent »
Filmed in Supermarionation

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7295
    • View Profile
    • Cambam V1.0 French Doc
Re: Halftone image generator plugin - "Semitone"
« Reply #24 on: November 06, 2017, 20:47:23 pm »
Hello

Quote
I see you did a selfie in your picture
Yep, but I'm not so well combed ;D

Nice, all seems to be fixed.

I get a crash when selecting the tool OR when switching between Simulation / source image ; It happens only with one image ... I attach it for tests.

++
David
« Last Edit: November 06, 2017, 20:49:43 pm by dh42 »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5211
  • Made in England
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #25 on: November 06, 2017, 21:46:59 pm »
I think I know why, version 2.3 attached to first post.

I mentioned previously about diagonals and overlap but after some tests it wasn't that, more testing today but at least it works for now with the last changes.

Edit: looks like the plugin was trying to read a pixel off the edge of the bitmap.

Thanks for the excellent testing and suggestions (again)
« Last Edit: November 07, 2017, 09:00:40 am by EddyCurrent »
Filmed in Supermarionation

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2617
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #26 on: November 06, 2017, 22:19:58 pm »
I tested it under Linux and it worked (v. 2.1).
Only, as I have a separate tool library for V-cutters (not very successful decision because I have to set the tool library on part level manually when using a V-cutter) the right library and tool were selected in the plugin but in the MOP the tool index referred to the default (end mills) library. The reason - I already mentioned it above.  Manually setting the tool library in the part properties cleared the issue.

Anyway,  I am going to reorganize the tool library into a single one.
« Last Edit: November 06, 2017, 22:22:07 pm by Dragonfly »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5211
  • Made in England
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #27 on: November 07, 2017, 13:53:05 pm »
Version 3 attached to first post in this thread.

Added a new Sprial method, the centre can be located anywhere in the frame.
« Last Edit: November 07, 2017, 13:57:09 pm by EddyCurrent »
Filmed in Supermarionation

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5211
  • Made in England
    • View Profile
Re: Halftone image generator plugin - "Semitone" -updated
« Reply #28 on: November 10, 2017, 11:31:05 am »
Version 3.1 attached to first post in this thread

Added lines option.
I rather like this one because it looks like a sketch.

"Resolution" is similar to the CamBam definition, it's the interval between Z checks or the spacing of x points along each line. The smaller you go the longer it takes to calculate.
« Last Edit: November 10, 2017, 11:37:44 am by EddyCurrent »
Filmed in Supermarionation

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5211
  • Made in England
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #29 on: November 10, 2017, 13:32:48 pm »
So this time I actually had a go on the machine  :D

I used plywood which was not the best but all I had at hand quickly.
Image was;
180mm wide, 0.4 Resolution, 1.5 Max Size, 1.5 Spacing, 45 degree angle, Offset Alternate Rows = NO  
60 degree V cutter.

I think the top surface needed a little more sanding but you can see the next layer down is starting to show through in places.
« Last Edit: November 10, 2017, 13:36:34 pm by EddyCurrent »
Filmed in Supermarionation