Author Topic: Wrapper Plugin  (Read 70606 times)

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 234
    • View Profile
Wrapper Plugin
« on: October 04, 2014, 07:19:01 am »
There are various wrapper plugins, that wrap an X,Y,Z model, or data sets, around a cylinder for 4th axis machining, including the Digitize Plugin I developed that has this capability also.  The wrapping task, by itself is not all that complex so I have created a simple Wrapper Plugin that works with G-Code files only.  That is, it takes a G-Code file, selects either X or Y axes, and wraps it around a cylinder (or part cylinder) of a nominated diameter and creates a transformed G-Code file in terms of an A axis.

Here is my first attempt, for review and testing.

Please advise any bugs or useful  improvements.

Geoff

Note:  The latest version is also attached here:
« Last Edit: March 03, 2015, 22:16:49 pm by GeoffreyGRoy »

Offline pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1833
    • View Profile
    • pixelmaker
Re: Wrapper Plugin
« Reply #1 on: October 04, 2014, 12:16:13 pm »
Many Thanks to you Geoffrey!
I will try it this evening.

ralf

Offline blowlamp

  • CNC Jedi
  • *****
  • Posts: 1187
    • View Profile
Re: Wrapper Plugin
« Reply #2 on: October 04, 2014, 15:10:43 pm »
Hi Geoff and thanks for this great plugin.

After acquainting myself with it, I have a couple of suggestions and alterations that would be helpful for me.

My milling machine controller is Mach3 and it seems to require that the sign (plus & minus) of the angular movements need reversing. As it stands at the moment, A axis rotations are opposite to that which is required, i.e they are mirrored.
It would be useful if you could include an option to swap this behaviour to suit the needs of different machine controllers.

Twelve digits after the decimal point seems excessive for the work I do, so could this be altered to suit the user?

Again, for my configuration, Z-Base usually needs to be set to the radius of the workpiece, so would it be possible to have this initially tied to the Wrap-Diameter, along with the ability to edit if needed?

I'd like the Object Extrema (wrapping axis size) value of the G-code input file to be used as a starting point for Wrap-Diameter. Even though it may not be the correct final measurement, it's usually close enough to give a sense of being in the right 'ball park'.

Please consider removing the .nc & .tap file type restriction as it blanks out other valid files, LinuxCNC for instance, uses the .ngc file extension.

Thanks again.

Martin.
« Last Edit: October 04, 2014, 19:34:21 pm by blowlamp »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6558
    • View Profile
    • Cambam V1.0 French Doc
Re: Wrapper Plugin
« Reply #3 on: October 04, 2014, 19:38:10 pm »
Hello Geoff

Another cool plugin !! thanks !!

As Martin, if I try to engrave a text, it is reversed ..

Maybe it's not needed that the plugin ask for saving the CB file before use ; the CB file is not modified by the plugin (maybe a rest of another plugin  ;))

++
David

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 234
    • View Profile
Re: Wrapper Plugin
« Reply #4 on: October 06, 2014, 05:21:18 am »
@David and Martin

Here is vers 1.0.2:

(1) I have limited the number of output digits to 5 for axis values
(2) It is now possible to optionally reverse the direction of the A axis - please try this out and see if it is what is required.
(3) I have used the X & Y extreme values as the default values for Xmin, Xmax, Ymin and Ymax - though these may not always be the correct values.
(4) I have removed the restriction on file name extensions
(5) It does not now require the CamBam model to be saved on startup

I have not added any default values for Z-base/Diameter and I am not sure how these could be reasonably estimated - any thoughts?

thanks for the feedback

Geoff
« Last Edit: October 06, 2014, 23:02:43 pm by GeoffreyGRoy »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6558
    • View Profile
    • Cambam V1.0 French Doc
Re: Wrapper Plugin
« Reply #5 on: October 06, 2014, 21:24:18 pm »
Hello geoff

Tested .. and approved  ;D

2 screen capture of mach3 with planar wrapping and spherical wrapping (text is projected on a quarter of cylinder before Gcode is created)

++
David

Offline blowlamp

  • CNC Jedi
  • *****
  • Posts: 1187
    • View Profile
Re: Wrapper Plugin
« Reply #6 on: October 06, 2014, 22:49:39 pm »
Agree with David -  working well here too, a great plugin for CamBam.

Thanks for your hard work.

Martin.
« Last Edit: October 06, 2014, 22:52:10 pm by blowlamp »

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3167
    • View Profile
Re: Wrapper Plugin
« Reply #7 on: October 07, 2014, 00:25:25 am »
Thanks Geoff for nice tool. Because I do use the 4th axis often this plugin will be handy to have. Even thou I like as is, it would be nice to have circumference calculator build in. As soon as I stumble on 'rotary' work I give it whirl..
Thanks again.
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 234
    • View Profile
Re: Wrapper Plugin
« Reply #8 on: October 08, 2014, 09:48:23 am »
Thanks for the feedback and suggestions.. Here is vers 1.0.3

(1) Errors in User Guide fixed
(2) I have added a Circumference field, that can be computed from the wrap diameter, and vice versa.

Geoff

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3167
    • View Profile
Re: Wrapper Plugin
« Reply #9 on: October 08, 2014, 10:59:39 am »
 I have added a Circumference field, that can be computed from the wrap diameter, and vice versa.
****************
Thank you ;)
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline blowlamp

  • CNC Jedi
  • *****
  • Posts: 1187
    • View Profile
Re: Wrapper Plugin
« Reply #10 on: October 08, 2014, 11:22:02 am »
I don't want to push my luck here Geoff... but could you add a Calculator button that calls the in-built Windows calculator? It'd be handy for working out circumference/diameters/angles for jobs that aren't 360 degrees.

That's my last request for this plugin.  ;D

Thanks again.



Martin.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6558
    • View Profile
    • Cambam V1.0 French Doc
Re: Wrapper Plugin
« Reply #11 on: December 10, 2014, 17:09:53 pm »
Hello Geoff,

I'm working on the translation of the doc, and I noticed that there is no warning in "Data requirements" about the fact that the Gcode must not contain G02/G03 or G81/82 etc ...

If I try to convert such file, the plugin give also no warning during the conversion when he encounter G2/G3 ..

++
David

Offline GeoffreyGRoy

  • Storm Trooper
  • ***
  • Posts: 234
    • View Profile
Re: Wrapper Plugin
« Reply #12 on: December 10, 2014, 22:57:58 pm »
Dear David

Good point.  I can add a waning in the documentation, and possible also the code to detect these while processing.

Apart from:G2/G3, G81 ...G89, are there any there any others that might or should get flagged?

Geoff

Offline pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1833
    • View Profile
    • pixelmaker
Re: Wrapper Plugin
« Reply #13 on: December 11, 2014, 10:40:56 am »
hello,
attached a very small calculator that calculates circumference or degree from stock diameter and length

ralf

Offline BR52

  • Wookie
  • ****
  • Posts: 356
    • View Profile
Re: Wrapper Plugin
« Reply #14 on: December 11, 2014, 14:12:37 pm »
Hi Geoff,

Please could put your source code here.
To I analyze your plugin.
Your work is excellent.

   Armando