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

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4612
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #45 on: December 08, 2020, 21:47:19 pm »
Geoff
I am currently in hospital, non covid related, I will have a look once I am out.
Made in England

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3052
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #46 on: December 08, 2020, 22:04:46 pm »
Sorry to hear that. Wish you full and speedy recovery!
My 2¢

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

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6262
    • View Profile
    • Cambam V1.0 French Doc
Re: Halftone image generator plugin - "Semitone"
« Reply #47 on: December 08, 2020, 22:30:18 pm »
Sorry to hear that. Wish you full and speedy recovery!

+1

++
David

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 210
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #48 on: December 09, 2020, 00:19:35 am »
Dear Eddy

Get well first, I will have a look around with a de-compiler and see how far I can get.

regards
Geoff

Offline ThisAmplifierIsLoud

  • Storm Trooper
  • ***
  • Posts: 171
  • Jam it !
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #49 on: December 09, 2020, 09:11:35 am »
Get well soon !

best regards

Bernhard

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 210
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #50 on: December 11, 2020, 07:57:39 am »
Dear Eddy

In an attempt to take any pressure off, I thought I would try to reconstruct your plugin using a de-compiler.  I have never really attempted this before (apart from just looking a some code segments), but I thought the experiment might be a useful exercise/challenge just to see how far I could get.

After some looking around I came to JetBrains dotPeek (https://www.jetbrains.com/decompiler/) that seems to offer some potential, especially as it (claimed) to create a VS studio project as an outcome.  The basic de-compilation seems to work, all the source/resource files were created.  The main problem is that the Form1.cs file contained both the user created parts (methods and data) as well as the Designer parts.  After some searching I found this reference:

https://social.msdn.microsoft.com/Forums/en-US/97f9749e-5278-41a2-bb70-143c1457ea54/how-to-manually-or-automatically-create-ltformgtdesignercs-files-for-winform-applications-in?forum=csharpgeneral

One of the replies (4) provided the clues as to how to split apart this source file (manually).  After a couple of attempts I managed to do it, to create two partial class files with the Designer file named "Form1.Designer.cs".  After adding these to the project, the Designer worked! - showing your form as required.

So, I now seem to have a fully operational VS project that I can work with.  I have some more testing to do to see if I can find any bugs, and then I will add my suggested updates.

I will post a copy of the new version soon for you to have a look at, in the mean time focus on getting well.
regards
Geoff

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4612
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #51 on: December 11, 2020, 08:06:17 am »
Good effort Geoff.

Many thanks to all those who wished me well, very much appreciated.

I've had a triple heart bypass but feeling much better now, however it's going to be while before I can start any manual work at the machine.
Made in England

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1376
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #52 on: December 11, 2020, 12:23:19 pm »
Hi Eddy
When you said Hospital, I thought, probably nothing serious just "Day Surgery" .
Take care and I wish you a speedy recovery.
Dave

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3052
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #53 on: December 11, 2020, 19:00:04 pm »
Eddy, that serious surgery specially with Covid going now. Take good care of yourself and stay safe.
My 2¢

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

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 210
    • View Profile
Re: Halftone image generator plugin - "Semitone"
« Reply #54 on: December 19, 2020, 05:29:28 am »
Dear Eddy

I am attaching a new Version of your Semitone plugin - only some very minor changes.  My original plan was to use your PointList geometry to create set of Circles that could be "pocketed" by the standard Pocket MOP..  While this worked it proved to be very slow - especially the creation of the many thousands of Circles that might result from the image processing.

The new Version of your plugin has just a few changes:

•   There is an additional field to show the Diameter of the selected cutter.  A “laser” cutter will need to be defined as a Vee profile, but the diameter is still of interest, so its value is displayed.
•   There are two radio buttons to select the Mode (Drill or Laser)
•   If <Laser Mode> is selected before selecting a tool, the Tool Vee angle will be set to 53.13ᶛ regardless of what is in the tool library definition This means that the Depth (Z-value) of each Point will be equal to the Diameter of the dot.
•   If <Laser Mode> is selected the Tool Angle will be changed to 53.13ᶛ.  To reset the Angle back to that specified in the tool library, you will need to re-select the tool.
•   If the <Create MOP> check box is selected then <Run> will create the geometry and the MOP as normal.  If it is not checked then the MOP will not be created automatically.
•   In <Laser Mode> the MOP cannot be created automatically, only the PointList is created.

For a laser application, we just need the PointList, then I can use my new LaserDotter MOP (https://cambamcnc.com/forum/index.php?topic=8840.0) to generate the engrave paths.

I have renamed the new version "SemiTone2" to avoid any confusion.

Any feedback or comments are most welcome

Geoff