Author Topic: A useful print plugin for CamBam  (Read 70061 times)

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
A useful print plugin for CamBam
« on: February 13, 2014, 02:39:52 am »
With David's (dh42) help, I've found a bug that would not occur on my machines.  This 3.1.1.3 version seems to work pretty well.  Enjoy... still report problems, please.
---
And finally, V3.2.0.0 with printer selection, gray-scale conversion, and sticky capture options.
For capturing 3D images, and especially if you convert to monochrome, you should experiment with background and layer colors, as no one conversion 'formula' suits all needs.

And the translatable version source, here now.
L



0-0

The attached is the 'crude' print with various improvements and some finer clothes.

It automatically saves a full-screen capture AND a cropped, scaled, rotated capture image to the folder from which the CamBam file was opened.  If it is used on a never-saved file, those files are saved to the system.temp folder.

It will:  Fix colors so that printing may be done economically on white paper
           Capture and print either a full-screen image or a user-selected rectangle from the screen
            Scale the image for best fit to the paper source in the printer
             Rotate the scaled image for best fit on the paper.

It prints only the the current default printer.  The images are saved as native bitmap files (.bmp).

Just unzip the attached file, and copy the .dll to your CamBam ProgramFiles/Plugins folder, the re-start CamBam.

If you tried the original V1.0.0.0, be sure to remove that .dll from your plugins folder!

Enjoy.
Lloyd
« Last Edit: June 05, 2016, 22:30:12 pm by lloydsp »
"Pyro for Fun and Profit for More Than Fifty Years"

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
Re: A useful print plugin for CamBam
« Reply #1 on: February 13, 2014, 15:26:56 pm »
PS... when I get the time, I'm going to add a printer selection menu to it, so that if you wanted (say) a .pdf instead of paper, you could select your pdf printer without having to change default printers.

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

Offline atwooddon

  • CNC Jedi
  • *****
  • Posts: 629
    • View Profile
Re: A useful print plugin for CamBam
« Reply #2 on: February 13, 2014, 16:22:44 pm »
Works great

Thanks Lloyd

Don

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
Re: A useful print plugin for CamBam
« Reply #3 on: February 13, 2014, 16:38:22 pm »
 ;D
Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3353
    • View Profile
Re: A useful print plugin for CamBam
« Reply #4 on: February 13, 2014, 21:32:57 pm »
Lloyd, Thanks for the effort but this new version is not working for me. I'm seeing one thing in CamBam print preview and totally different thing in my printer preview  ??? ??? ;) :D ;D ;D



Please see the attachments..
My 2¢

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

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
Re: A useful print plugin for CamBam
« Reply #5 on: February 13, 2014, 22:01:25 pm »
And... you just clicked the printer icon in the print preview that I provide? That's the way it's supposed to work.


If so, what Operating System are you running?

I have done this with all the printers available to me (four), and all provide a proper replica of what's seen in the print preview that comes from the plugin.

I'm not even sure how that could happen, since the only print image I'm serving to the printer is the one shown in that preview pane.

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

Offline atwooddon

  • CNC Jedi
  • *****
  • Posts: 629
    • View Profile
Re: A useful print plugin for CamBam
« Reply #6 on: February 13, 2014, 22:05:08 pm »
Bubba, did you remove the old version dll file?  I had to do that on my system.

Don

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
Re: A useful print plugin for CamBam
« Reply #7 on: February 13, 2014, 22:20:46 pm »
Actually, the two shouldn't interfere with one-another.  You'd get two print entries in the files menu, one "print" and one "print selected area".  The first is for the new version, the second for the old.  But since they're distinctly separate plugins, they wouldn't interact in any way.

AFAIK, the original works fine -- I think you tried it, Bubba.  And the print logic in the new one is a carbon copy (right down to the last byte) of the old one.

The code simply casts the entity drawImg to an 'e.' (local form argument's) version of a print preview window with no intermediate processing.

Hmmm... expiring minds want to know!
Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline BR52

  • Wookie
  • ****
  • Posts: 368
    • View Profile
Re: A useful print plugin for CamBam
« Reply #8 on: February 13, 2014, 23:34:50 pm »
Hi Lloyd,

You need to upgrade your source code here.
See the image below.

   Armando

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
Re: A useful print plugin for CamBam
« Reply #9 on: February 14, 2014, 00:17:46 am »
Armando,
I do not understand what you mean.  I see nothing wrong with that image (perhaps I am very dumb!).

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

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
Re: A useful print plugin for CamBam
« Reply #10 on: February 14, 2014, 00:23:05 am »
BTW,
I have been able to duplicate the problem, and never again to make it work!  All I did was change the display mode in "options".  After having changed it, changing it back did not fix it; not even after restarting CamBam!

ARGH!!!

Well... for those of you for whom it works-- don't change your display mode until I can figure through this!

FWIW, the full-screen print seems to work in all modes, so it's a scaling issue, probably with how the printer is reporting it's paper size in pixels, or how I'm interpreting that information... <sigh>

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

Offline atwooddon

  • CNC Jedi
  • *****
  • Posts: 629
    • View Profile
Re: A useful print plugin for CamBam
« Reply #11 on: February 14, 2014, 00:30:40 am »
Lloyd, no good deed goes unpunished..... ;-)

Don

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3353
    • View Profile
Re: A useful print plugin for CamBam
« Reply #12 on: February 14, 2014, 00:42:42 am »
Lloyd; this may help. I haven't used the print screen option . I was using the selected area only. Reason why you see two previews in my earlier post because your plugin created one and the printer creates one for an approval/page selection before print. OS is Windows 7 64 bit. The printer Brother MFC-J475DW.
My 2¢

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

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
Re: A useful print plugin for CamBam
« Reply #13 on: February 14, 2014, 01:59:14 am »
Yeah, Bubba.

I get the same results now with both the old original code and the new 3.0.2.0 version.  Once I changed my graphics mode ONCE, it went away, never to return...

But the full-screen mode still works... so I'll figure it out.  Man, that's _weird_!  Winblows -- who knows?

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

Offline BR52

  • Wookie
  • ****
  • Posts: 368
    • View Profile
Re: A useful print plugin for CamBam
« Reply #14 on: February 14, 2014, 08:29:56 am »
Lloyd

You are a intelligent person and persistent.
You hit the nail on options, to configure Backgraund for the color white.
Make a copy of the file "CamBamPro0.9.8.config" to security.
Attached two file to create a structure of "*.config" file, written in C#

   Armando