CamBam

Resources => Scripts and Plugins => Topic started by: GeoffreyGRoy on October 04, 2014, 07:19:01 am

Title: Wrapper Plugin
Post by: GeoffreyGRoy 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:
Title: Re: Wrapper Plugin
Post by: pixelmaker on October 04, 2014, 12:16:13 pm
Many Thanks to you Geoffrey!
I will try it this evening.

ralf
Title: Re: Wrapper Plugin
Post by: blowlamp 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.
Title: Re: Wrapper Plugin
Post by: dh42 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
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy 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
Title: Re: Wrapper Plugin
Post by: dh42 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
Title: Re: Wrapper Plugin
Post by: blowlamp 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.
Title: Re: Wrapper Plugin
Post by: Bubba 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.
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy 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
Title: Re: Wrapper Plugin
Post by: Bubba 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 ;)
Title: Re: Wrapper Plugin
Post by: blowlamp 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.
Title: Re: Wrapper Plugin
Post by: dh42 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
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy 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
Title: Re: Wrapper Plugin
Post by: pixelmaker 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
Title: Re: Wrapper Plugin
Post by: BR52 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
Title: Re: Wrapper Plugin
Post by: dh42 on December 11, 2014, 14:31:35 pm
Hello,

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

There is no other that come to my mind ...

There is no G89 defined in the cambam PP, ... there is a G98 but I never see it in any Gcode ; not sure it is used.

++
David
Title: Re: Wrapper Plugin
Post by: kvom on December 11, 2014, 20:24:15 pm
Given that users can add any gcodes in headers, footers, and drill scripts, I'd flag anything that looks wrong.
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy on December 12, 2014, 05:33:22 am
Here is the new version of the Wrapper plugin that includes warnings on invalid G-Codes (for wrapping) - both in the code and user doc.  I think I have identified most of the invalid codes - but I may have missed some - please let me know if you find any missing.  The plugin will still produce an output file even if any invalid codes are found - only a warning is given displaying the line in the G-Code file containing the invalid codes.

I am also attaching the sources as requested by Armando

Geoff
Title: Re: Wrapper Plugin
Post by: dh42 on December 12, 2014, 16:22:14 pm
Hello Geoff,

It seems that the .dll in the .zip is the same that the previous ; it is called 1.0.3.0 and it don't detect the G2/G3 (but it's the 1.0.4 doc)

++
David
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy on December 13, 2014, 00:27:25 am
Oops! Here is the correct 1.0.4  dll version

Geoff
Title: Re: Wrapper Plugin
Post by: dh42 on December 13, 2014, 19:12:07 pm
Hello Geoff,

For an unknown reason, with some files the G2/G3 are not detected and I get no warning.

I attach a file that give the warning (test_ok) and the other that give no warning when conversion (test_bug)


- in the warning window, the list is very long and it can't be moved with a slider ; maybe it's not really useful to list the errors ; I think that the warning alone is sufficient.

- when converting long gcode, a progress bar can be useful, because one would think that the PC is crashed.

++
David
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy on December 13, 2014, 22:55:45 pm
Dear David

Thanks for the feedback, I obviously did not test a file with a large number of "errors".  I have removed the list or "error lines" from the warning dialog, just included the number of lines with "errors".

I cannot see any problems with test_bug.nc file - the only explanation I have is that the warning dialog was so big that it failed to display "correctly".  As far as I can tell both files (now) give a reasonable dialog.

Updated version attached.

thanks again

Geoff
Title: Re: Wrapper Plugin
Post by: dh42 on December 14, 2014, 00:19:51 am
Hello,

Ok, that works for me too !

Thanks  ;D

Quote
Thanks for the feedback, I obviously did not test a file with a large number of "errors"

And the first Gcode where I found this problem is ... 7Mb lol (3D) ... a long time to compute (maybe an "abort" button can be useful too)

Good night
++
David

Title: Re: Wrapper Plugin
Post by: dh42 on March 02, 2015, 21:58:29 pm
Hello Geof,

I found a little problem with wrapper if I use of G53 in the Gcode.

In my code, I've a G0 G53 Z-1 to retract the Z to the highest Z pos in machine coordinates. (minus 1mm)

problem, after the code is wrapped, the G0 G53 Z-1 is changed to G0 G53 Z19.25 (because diam = 40.5 and Zbase = 0)  ... and it should not, of course ...

++
David
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy on March 03, 2015, 09:56:13 am
Dear David

Please try out this new version where I have looked for G53 codes, and left that line un-transformed.

There may be other G-codes that need to be treated in this way, any advice would be appreciated.

thanks

Geoff
Title: Re: Wrapper Plugin
Post by: dh42 on March 03, 2015, 13:39:17 pm
Hello Geof

Thanks for the new version ... and the very quick answer !!

++
David
Title: Re: Wrapper Plugin
Post by: kvom on June 03, 2015, 00:25:15 am
I used this today for a cylindrical engraving test piece.  Worked perfectly.  Needed to use the reverse checkbox as my axis is mounted on the left of the table.

Mach3 doesn't display the toolpath as it does for planar work.  It just ignores the A moves and shows a bunch of lines on the x axis.

As for the Z values I think it makes better sense to regard Z0 as the top of the stock rather than the centerline of the axis, since it's simpler to touch off on the stock.  Alternatively a button to calculate and insert half the diameter as the Z base value.
Title: Re: Wrapper Plugin
Post by: Bubba on June 03, 2015, 01:03:23 am
As for the Z values I think it makes better sense to regard Z0 as the top of the stock rather than the centerline of the axis, since it's simpler to touch off on the stock
*****************
I strongly disagree. It is widely accepted practice in the industry to have the Z0 at the centerline. In my case knowing the distance between the centerline and the top of the tailstock setting the Z0 is easy.


"Mach3 doesn't display the toolpath as it does for planar work."

Are you sure about this? Mach3 on my machine displays rotational toolpath,
 
Title: Re: Wrapper Plugin
Post by: dh42 on June 03, 2015, 13:39:24 pm
Hello,

Quote
Are you sure about this? Mach3 on my machine displays rotational toolpath,

Yes, me too ..

https://www.youtube.com/watch?v=1gAxXwLRjQw

++
David
Title: Re: Wrapper Plugin
Post by: kvom on June 03, 2015, 20:45:42 pm
Thanks for that.  The youtube video solved both the toolpath display issue and also the timing issue I had with coordinating the axes.  Seems the radius setting in the Settings tab is ignored unless the Use Radius box in the Toolpath dialog is checked.

Checked both the appropriate fields in the Toolpath dialog and all is well.   ;D

As for Z0, I won't be using the tailstock often, so using it for setting Z isn't practical.  I think having a button to set Z0 as half the defined radius is an innocuous addition.
Title: Re: Wrapper Plugin
Post by: kvom on June 05, 2015, 00:18:19 am
The plugin seems to have some math problems.

I have the following lines: 

G0 X0.0 Y0.0
G1 F15.0 X0.7071 Y0.7071

That's a 1" line at a 45 degree angle to the X and Y axes

The conversion, using a 3" diameter is:

G0 X0.0 A180.01800
G1 F15.0 X0.7071 A52.72727

The angular move should be 27 degrees, and the starting point should be A0

What's going on?  Seems to be something to do with the A min and max values


Title: Re: Wrapper Plugin
Post by: dh42 on June 05, 2015, 17:14:49 pm
Hello,

I attach a file and a picture of the settings if you want take a look.

Quote
The angular move should be 27 degrees, and the starting point should be A0

you must set the angle yourself

the difference with CNc wrapper is that it's not needed to set the stock surface to radius, you can works with 0 for SS and say to the plugin where is the baseZ (in this case, baseZ = 0, diameter = 3")

++
David
Title: Re: Wrapper Plugin
Post by: kvom on June 05, 2015, 18:49:44 pm
I may be being dense.  If I specify  the diameter then Y converts to A directly  by geometry.  What is the purpose of setting the A min/max?  Is it trying to stretch/shrink the g-code to fit inside the angle range?

I downloaded the trial of CNCwrapper and it produced exactly what I expected to see, a phenomenon related to what I used to know as "the principle of least astonishment" in my working days.
Title: Re: Wrapper Plugin
Post by: dh42 on June 05, 2015, 19:27:41 pm
Quote
Is it trying to stretch/shrink the g-code to fit inside the angle range?

Yes, I think if I well remember my tests  ...

in the doc he say:

The following items of data are required (from the G-Code file) and inserted into the plugin
(manually):
For an X-wrap:
• The minimum and maximum X values (Xmin and Xmax).
• The base Z value (most likely 0.0, but not necessarily, i.e. the wrappewd model surface could
be defined at some other Z-value.
• The wrap angles, i.e. the angle (Amin) that Xmin maps to, and the angle (Amax) that Xmax
maps to. By default these values are 0.0 and 360.0 degrees.

++
David

Edit, yes I do a quick test and it stretch/shrink the Gcode to match the given angle with the given size
Title: Re: Wrapper Plugin - update
Post by: EddyCurrent on December 03, 2015, 15:01:49 pm
I thought an update to the Wrapper plugin might be handy, please see attached file.

Changes:
1. Added gcode viewer of input and output files.
   The code will update from the input file to output file once 'Start Conversion' button is clicked.
2. Changed WrapperUIForm layout
3. Added extra lines of comments in output file to show information on;
   Diameter, Z Base, Reverse Angle

Once it's been agreed that all is working as it should I will post the source files.

Edit: version removed, see later post for most recent files
Title: Re: Wrapper Plugin
Post by: dave benson on December 03, 2015, 21:41:06 pm
Looks good Eddy.
The only thing extra I could think of was to split the gcode view in to two tabs, one for the old code and one for the new transformed gcode
Dave
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 03, 2015, 21:52:59 pm
Dave, good idea.

I didn't want to upset anyone by modifying this, but it does say in the source file;

partial quote.
"This program is free software: you can redistribute it and/or modify it . . .  "
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 04, 2015, 09:50:13 am
Version 1.0.8 attached

changes:
1. circumference text box is populated upon form load
2. added another text box so input file and output file can be examined side by side.

Edit: minor changes to form, no icon, no maximise button

Edit: version removed, see later post for most recent files
Title: Re: Wrapper Plugin
Post by: dh42 on December 04, 2015, 20:52:07 pm
Hello Eddy

The plugin is no longer translatable .. certainly because the tab (Wrapping) ;)

tabs need more code to be translated.

take a look in the New() function in my NumMove plugin ;)

++
David
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 04, 2015, 20:57:26 pm
David,

The tab is only there because I was going to add more features, but I don't think it's going to happen.
I will remove the tab and see how translation goes from there.
Title: Re: Wrapper Plugin
Post by: dh42 on December 04, 2015, 21:01:49 pm
Ok  ;D

++
David
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 04, 2015, 21:35:13 pm
David,

Try this version with translations.

Edit: version removed, see later post for most recent files

Title: Re: Wrapper Plugin
Post by: dh42 on December 04, 2015, 23:01:40 pm
Better, but all in the black frame can't be translated. (GroupBox ?)

in VB

Me.GroupBox1.Text = TextTranslation.Translate(Me.GroupBox1.Text)

translate the top text of the groupbox, like "Arrows" "Size" and "Fonts" in this image

(http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/arrow_dim/UI_settings.jpg)


TextTranslation.Translate(Me.GroupBox1.Controls, CamBamConfig.Defaults.Language)

Translate the controls contained in the GroupBox (you need to do that for each groupbox)

It is the same for tabs

Me.TabPage1.Text = TextTranslation.Translate(Me.TabPage1.Text)

will translate the text of the tab itsef ("Arrows", "Dimensions") and

TextTranslation.Translate(Me.TabPage1.Controls, CamBamConfig.Defaults.Language)

will translate the controls in the tab (but only those that are not in a groupbox I think)
You need to do that for each tab

++
David



Title: Re: Wrapper Plugin
Post by: newlinuxuser on December 05, 2015, 00:00:27 am
Hello, I would just point out this little bug in the name of the output file:

Example input file:
/home/andrea/Documenti/Disegni/CamBam/Air4_marcatura_POMELLO.ngc

Related output file:
/home/andrea/Documenti/Disegni/CamBam\Air4_marcatura_POMELLO- Transformed.nc

As you can see, I use the linux version and linuxcnc.

Thanks for your good work,

Andrea
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 05, 2015, 12:19:56 pm
David,

Please try that now, I changed my CamBam to French and the exclamation marks show up on all untranslated text.

Andrea,

Fixed the file extension issue

Edit: see later post for more recent version
Title: Re: Wrapper Plugin
Post by: dh42 on December 05, 2015, 17:20:18 pm
Hello,

Ok for the translation  ;)

Modified on the plugin website, and FR doc reworked with new image.

++
David
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 05, 2015, 17:45:36 pm
David, thank you.

Source attached
Title: Re: Wrapper Plugin
Post by: newlinuxuser on December 05, 2015, 20:53:19 pm
Hello Eddy, the extension now it's O.K., there is still the backslash problem, I think it's noticeable only in a linux pc, windows uses the backslash instead of the normal slash  ;D

Thank you,

Andrea
Title: Re: Wrapper Plugin
Post by: dave benson on December 06, 2015, 11:47:16 am
That  second window is quite handy Eddy thanks.
Dave
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 06, 2015, 12:18:43 pm
Andrea,

See if this one works okay, I used the Path.Combine method, it said this should work for Windows or Linux.

Dave,

Yes, it was a good idea you had there  ;D
Title: Re: Wrapper Plugin
Post by: newlinuxuser on December 06, 2015, 12:41:16 pm
Thank you Eddy, now it's O.K.   :D
 
Andrea
Title: Re: Wrapper Plugin
Post by: dh42 on January 02, 2016, 21:23:55 pm
Hello,

It is possible to add a choice to select the target axis (A or B) as on CNCWrapper ? .. on some controllers there is no way to change the rotational axis orientation (X to A, X to B, Y to A, Y to B)

http://www.cambam.co.uk/forum/index.php?topic=5342.msg42196#msg42196

++
David
Title: Re: Wrapper Plugin
Post by: EddyCurrent on January 03, 2016, 13:39:34 pm
I changed the look of Wrapper so it was similar to CNC Wrapper, almost none of the logic code wrtitten by Geoffrey was modified. I did think about adding those options and can take a look at that if it's required.
Title: Re: Wrapper Plugin
Post by: EddyCurrent on January 04, 2016, 10:55:05 am
David,

Try the attached version, I added a new set of Radio Buttons for A & B , it was easier that way.
Title: Re: Wrapper Plugin
Post by: dh42 on January 04, 2016, 19:37:01 pm
Hello,

Ok seems to works well ;)

plugin page updated

++
David
Title: Re: Wrapper Plugin
Post by: awemawson on February 15, 2016, 11:22:05 am
Hi David et al,

I'm experimenting with Wrapper, but have come up against a brick wall using it. It's outputting angles to 5 places of decimal and my Heidenhain TNC355 (like a TNC155 program wise) objects to more than 3 decimal places and declines to load  the G code.

I can't find anything in the plugin or documentation to pre-set output format - is there anything ?
Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 15, 2016, 12:57:02 pm
I can take a look at fixing that but it will be later today.
Title: Re: Wrapper Plugin
Post by: awemawson on February 15, 2016, 15:24:12 pm
I can take a look at fixing that but it will be later today.

Wow that would be great - thanks
Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 15, 2016, 17:23:08 pm
Is it just the angles that need adjusted ?
Title: Re: Wrapper Plugin
Post by: awemawson on February 15, 2016, 17:37:20 pm
Yes - in metric mode the TNC controllers will only allow 3 digits max after the decimal point in all the axis .

Thanks for looking so swiftly

(this vintage also don't allow comment - a suppression button would be useful :)  )
Title: Re: Wrapper Plugin
Post by: awemawson on February 15, 2016, 17:57:21 pm
Yes looking at the output file Z is also affected :(

Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 16, 2016, 11:54:12 am
New version attached ( 1.1.4 )

1. Added comments checkbox.
If the box is checked, comments will be added.
2. Added precision selector
Adjust the up/down box for decimal places between 1 and 5

Edit: bug fixes added ( see dh42 post below ), now at version 1.1.4
Title: Re: Wrapper Plugin
Post by: awemawson on February 16, 2016, 12:04:39 pm
That is SO kind thank you sir !! - I'm bowled over by the helpfulness and speed of response on this forum - I'll hopefully give it a try out this afternoon
Title: Re: Wrapper Plugin
Post by: awemawson on February 16, 2016, 13:12:22 pm
Thanks Eddy, now I can at least load the code into the controller and it runs in OK until we get to an arc, whereupon the TNC355 won't load any more and just reports "Wrong Program Data" :)

The straight line codes all run apparently correctly up to where the loading aborted, but it looks like I need to look more closely at the post processor John McCracken produced, as the G02 & G03 parameters are emerging in the wrong order according to the book of words

... appropriate page attached


(typo edited 14:43)
Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 16, 2016, 13:18:18 pm
As I'm sure you realise, the Wrapper plugin uses an existing nc file as it's input. This file must be right for your machine becasue the plugin cannot make it right.

These codes are not handled by the plugin;   
public static String [] invalidCodes= {"G2", "G3", "G02", "G03", "G81", "G82", "G83", "G84", "G85", "G86", "G87", "G88", "G89"};

Did you mean G02 and G03 ?
Title: Re: Wrapper Plugin
Post by: awemawson on February 16, 2016, 14:23:57 pm
Yes an over excited typo !!!!! G02 & G03 - as I said I need to delve into the Heidenhain PP generated by John McCracken and sort out the arc moves.

... life is such fun :)
Title: Re: Wrapper Plugin
Post by: dh42 on February 16, 2016, 14:30:26 pm
Hello,

To remove the arcs (not usable for a Gcode that must be wrapped), edit your PP and change Arc Output (Option section) to Convert to lines

++
David
Title: Re: Wrapper Plugin
Post by: dh42 on February 16, 2016, 14:44:34 pm
Re

@Eddy: I find a little bug ; when we swap between X or Y axis as input (radio buttons), the min and max size boxes always show X disabled and Y enabled, so if we use X we can't manually change the data.

Also, the numerical box for rotation is always labeled A, even when B is selected.

++
David
Title: Re: Wrapper Plugin
Post by: awemawson on February 16, 2016, 16:21:01 pm
Thanks one and all, it now seems to be doing the right things following David's tip about converting the arcs to lines. Not actually cut metal yet, but the air it's cutting looks to be the right shape  ;D ;D

This has all been such a positive experience - much appreciated
Title: Re: Wrapper Plugin
Post by: lloydsp on February 16, 2016, 17:13:24 pm
Andrew,
I'm happy you're pleased with how things have gone so far.  I'd like to let you know, this is how it "usually goes" here. 

On most sites, if you have "beginners' questions", you get relegated to some scrap-heap of beginners trying to sort out one anothers' difficulties.  Often, the experienced people will rudely declaim your inability.

But not here.  Everyone here HAS BEEN a beginner with CamBam, even if they are experts now.  And the expertise has broad range, with each user contributing something special.  Most important, it seems like the really 'deep' experts still remember that 'beginner phase', and are as willing to help now as they were willing to get help when they were new to the product.

This is unlike any other tech-site I've ever been on.  It seems like everyone is willing to help (even beginners with a special slant on how to do things), and they help quickly; sometimes even to the point of someone's writing special software just for your special situation.

To me, it's just remarkable.

LLoyd
Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 16, 2016, 18:41:13 pm
Re

@Eddy: I find a little bug ; when we swap between X or Y axis as input (radio buttons), the min and max size boxes always show X disabled and Y enabled, so if we use X we can't manually change the data.

Also, the numerical box for rotation is always labeled A, even when B is selected.

++
David

David,
Thanks for finding those, now fixed and attached to my previous post as version 1.1.4.

Regards
Eddy
Title: Re: Wrapper Plugin
Post by: dh42 on February 16, 2016, 19:00:23 pm
Re

A little typo error  ;D

++
David
Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 16, 2016, 19:21:42 pm
David,

Fixed  :-[
My tpying is getitng wosre I thkin
Title: Re: Wrapper Plugin
Post by: dh42 on February 16, 2016, 21:26:43 pm
 ;D

Web page updated

++
David
Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 19, 2016, 10:16:22 am
I've attached an updated manual.
Title: Re: Wrapper Plugin
Post by: awemawson on February 19, 2016, 12:38:12 pm
Thanks for the updated manual.

Just a little 'querryette' :

Let's assume that we are wrapping Y round axis A. Flat  G code is produced, and then processed through the plug in transforming all Y's to corresponding cunningly calculated A values. BUT - the axis of the 4th Axis lies on a Y value to which we need to move before cutting starts Y=0.000 in my case - but the value gets transformed into an A value !!

Now all I'm doing at the moment is to insert a G0 Y0.000 to move to the centre line of the 4th axis. Without this, the machine is left with Y at the last tool change position, as my machine has an automatic tool change carousel.

Is there a more elegant way of doing this, or do we need another input box for the initial value to move to that won't be transformed ?
Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 19, 2016, 17:18:30 pm
What if you are one of those people who swap the wiring over from the Y axis motor to the 4th axis motor ? it means the machine has to be moved into place first.
I'm thinking your requirement has to be handled outside of the Wrapper plugin, unless someone has an alternative idea.
Title: Re: Wrapper Plugin
Post by: awemawson on February 19, 2016, 17:38:03 pm
Eddy it's no huge deal, as I have to edit the G code anyway to give a spindle speed  SXXX but a stopped spindle with an M05 as I'm using a diamond drag engraver. (The controller won't accept a speed less than 50 rpm but insists on a speed being set but the engraver needs to be not spinning !)
Title: Re: Wrapper Plugin
Post by: dh42 on February 19, 2016, 17:47:01 pm
I've attached an updated manual.

Ok, both EN and FR docs updated on the web site, thanks ;)

++
David
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy on April 29, 2016, 01:47:17 am
Dear All

Now that I have finally installed a 4th axis, I have returned to trying out the Wrapper plugin for some real machining.  As a result of this experience I have updated the User Guide to add some additional explanations to guide the beginner user as it can be confusing to visualise the wrapping process in CamBam and Mach3 as well as the 4th axis setup.

Geoff
Title: Re: Wrapper Plugin
Post by: EddyCurrent on April 29, 2016, 09:34:43 am
Geoff,

Those guidelines are an excellent addition to the manual and I'm sure will save some head scratching in future.
Title: Re: Wrapper Plugin
Post by: dh42 on April 29, 2016, 13:56:37 pm
Hello,

Yes, good addition  8)

++
David
Title: Re: Wrapper Plugin
Post by: GeoffreyGRoy on April 30, 2016, 09:30:21 am
Dear Andrew

eddycurrent is correct.  If you have a 4-axes machine then one axis (X or Y) is taken over by the wrapper for the A (or B) axis.  This means that the plugin will only generate a G-code file with 3 axes  Mach 3, for example, does accept 4 (or more) axes in G-code files.  To add any required Y-axis moves (if Y has been wrapped to A) then these will need to be manually added to the transformed file.

While it may be possible to handle special cases more elegantly, we would need to identify some well defined cases that could be looked at.

Geoff
Title: Re: Wrapper Plugin
Post by: dh42 on January 03, 2017, 02:09:06 am
Hello,

I wonder if there is not a little bug (or just an oversight) for the definition of the start and end point on the rotary axis.

on this picture, the vertical line between the circles is at X = 0, so it must be at A = 0 after conversion.

(https://i37.servimg.com/u/f37/14/07/22/66/wrappb10.jpg) (https://servimg.com/view/14072266/4385)

and the result on Mach3, the line is at 180°

(https://i37.servimg.com/u/f37/14/07/22/66/wrappb11.jpg) (https://servimg.com/view/14072266/4386)

I think that as for the X min/max values, the angular value must also be balanced around the 0, so instead 0 to 360, they must be -180 to 180 to match the 0 position (in this case where the toolpaths are exactly centered around the 0)

I get the right result on Mach3 with -180 to 180

++
David
Title: Re: Wrapper Plugin
Post by: EddyCurrent on January 03, 2017, 11:21:51 am
David,

After reading the latest instructions again, http://www.cambam.co.uk/forum/index.php?topic=4388.msg45237#msg45237
I think the plugin is okay.

In you example you have;

Xmin = -63.2772
Xmax = +63.2772
Amin = 0
Amax = 360

So according to the instructions;

 -63.2772 maps to 0
+63.2772 maps to 360

so;

0 maps to 180

You could easily have set, Amin = 20, Amax = 140 , for example, in which case X0 would map to A80
I think it is the users responsibility to set the correct mappings.

Title: Re: Wrapper Plugin
Post by: dh42 on January 03, 2017, 13:37:36 pm
Hello,

It would be more logical that the 0 in A corresponds to 0 in X (or Y) ???

++
David

Title: Re: Wrapper Plugin
Post by: EddyCurrent on January 09, 2017, 20:01:06 pm
Update attached.

Has been compiled with .NET version 4 assemblies and references to CamBam v1.0 dlls

Has been modified and tested to work on;

    Windows
    Linux

Works with CamBam version 1 ONLY
Title: Wrapper Plugin
Post by: SteveT on January 16, 2017, 21:21:09 pm
Just started playing with the Wrapper Plugin, read the instructions (for a change) and I note that the doc says that some G codes do not translate correctly.
My first test of the plugin is a simple bit of text engraved over part of the circumference and I get the warning attached, that shows a lot of errors.
Also I can not see a way of looking at the final output as my "Camotics" will not display the file.

Post possessor = LinuxCNC
Font = Liberation Sans at 24 point

Steve
Title: Re: Wrapper Plugin
Post by: dh42 on January 16, 2017, 21:45:03 pm
Hello

With the wrapper plugin, the Gcode must not contain G2 and G3 (arcs) so you need to use a specific post pro to remove arcs in the Gcode.

Make a copy of your Linux CNc post pro, rename the copy something like LinuxCNc_Wrapper, then modify this copy as following

- in the Options section, Arc Output, set the value to "Convert To Lines" so the PP will automatically convert all arcs to a succession of small straight segments. (and save your new PP)

++
David
Title: Re: Wrapper Plugin
Post by: SteveT on January 16, 2017, 22:02:42 pm
Thanks David, that worked fine, I assume that the only way to view the output will be from the Linuxcnc software? 
Title: Re: Wrapper Plugin
Post by: dh42 on January 16, 2017, 22:24:54 pm
Quote
I assume that the only way to view the output will be from the Linuxcnc software?  

Not the only, but sure, you can't see the result in Cambam itself (I use NcPlot to simulate when I use the 4th axis)

++
David
Title: Re: Wrapper Plugin
Post by: SteveT on January 17, 2017, 18:30:14 pm
I have tried exporting a file converted in the Wrapper plugin in to Linuxcnc but get the a error

I have looked at the G-code in the attached file but cannot make sense of it  ???

Can anyone help

Steve
Title: Re: Wrapper Plugin
Post by: dave benson on January 17, 2017, 23:30:40 pm
HI Steve
You could look at the Arc Mode settings for CB. and Linuxcnc  eg. --> constant velocity/Absolute and make sure they are both the same.
Dave
Title: Re: Wrapper Plugin
Post by: dh42 on January 18, 2017, 00:04:37 am
Hello,

The Gcode itself seems to be OK ; the picture show what I get in Mach3

distance mode = absolute
IJ mode = Incremental

4th axis aligned on X

++
David
Title: Re: Wrapper Plugin
Post by: SteveT on January 18, 2017, 12:39:18 pm
Thanks for the help David which has solved the LinuxCnC error, but am still not getting wrap by the "A" axis. Looking at the post pro for Linuxcnc on CB 1.12 there is now a rotary setting (see the attachment) when this is set to true CB crashes when righting the g-code.
The rotary setting is not present in CB 09.8?

Steve
Title: Re: Wrapper Plugin
Post by: EddyCurrent on January 18, 2017, 12:52:54 pm
Steve,

That setting has nothing to do with the Wrapper plugin, it's a new feature of CamBam v1.0
Title: Re: Wrapper Plugin
Post by: SteveT on January 18, 2017, 13:28:50 pm
Thanks Eddy, I think the problem is with the Linuxcnc display settings as when I run the g-code the "A" axis operates
but Linuxcnc is only showing "A" as a straight line and not a circle. will post when I have found a solution  ;).

Steve
Title: Re: Wrapper Plugin
Post by: SteveT on January 18, 2017, 18:07:13 pm
Solution found

To the axis "ini" file add the following in to the "DISPLAY" section

GEOMETRY = axyz

I added this as the second line, and all works as expected  ;D

Steve
Title: Re: Wrapper Plugin
Post by: robertk925 on October 03, 2017, 15:35:49 pm
This is a really cool plug-in, but I guess I do not understand the Minimum and Maximum settings for the A axis. For example:

1. I want to cut a 5mm long slot along the circumference of a 6.3662mm diameter cylinder (giving a nice even 20mm circumference). So, the slot should be 90 degrees long.
2. My Y axes Minimum/Maximum are automatically set to -2.5/2.5 after reading the G-code. Great.
3. My A axes Minimum/Maximum are set to 0/360 by default.
4. I use Wrapper, and it sets the A movements to 0 and 360 degrees. So that would cut a slot that is 20mm long, not 5mm long. So, do I need to manually change these to -45/45 degrees? If so, (while trivial in this example), shouldn't Wrapper automatically calculate the angle extents based upon the original Gcode and the Diameter?

Thanks!
Title: Re: Wrapper Plugin
Post by: EddyCurrent on October 04, 2017, 08:31:24 am
Read this; http://www.cambam.co.uk/forum/index.php?topic=4388.msg37745#msg37745

Wrapper will stretch or shrink the slot to fit the degrees given in A, so you have to enter the correct angles yourself.
As you say, there should be a better way perhaps.

The latest manual is here; http://www.cambam.co.uk/forum/index.php?topic=4388.msg45237#msg45237
Title: Re: Wrapper Plugin
Post by: robertk925 on October 04, 2017, 17:43:54 pm
Hi Eddy:

Thanks for the reply! No problem,  I just wasn't understanding the purpose of the minimum/maximum A entries. I can do the calculation/entry manually.

Perhaps if you ever get around to updating the plug-in the A entries could be automatically updated with the correct minimum/maximum values like the Y values are. This would hopefully eliminate the confusion of always getting the cuts wrapping all the way around the part!
Title: Re: Wrapper Plugin
Post by: EddyCurrent on October 04, 2017, 18:02:14 pm
I have already written an update, it should be ready soon.
It's not possible to enter values directly in the A boxes because they also allow manual entry for stretching etc.
I've added a text box (1:1 Angle Rotation) that shows what the angle should be (unstretched, i.e. 1:1 ) and it's up to the user whether they use that number or not.
Title: Re: Wrapper Plugin
Post by: robertk925 on October 04, 2017, 19:17:44 pm
Amazing, thank you!
Title: Re: Wrapper Plugin - updated version
Post by: EddyCurrent on October 04, 2017, 20:19:45 pm
Please find attached v2.0.0 (for CamBam v1.0 only)

1. Removed up/down buttons, just enter a value in either the Diameter or Circumference textbox then press 'Enter'.
The 'Enter' key MUST be pressed in order that the textboxes are updated.

2. Added a new read-only textbox, 1:1 Angle Rotation.
As we know, the values of xmin, xmax (or ymin, ymax) are mapped to the values of A Min and A max and hence the gcode can be 'stretched' around the circumference.
If a normal 1:1 relationship is required then the value in '1:1 Angle Rotation' is calculated and this value can then be Cut & Pasted into A max if desired.

3. Updated the User Manual  (sorry David  ;D another link to update)


Title: Re: Wrapper Plugin
Post by: robertk925 on October 05, 2017, 05:24:58 am
Wow, that is extremely helpful, thank you Eddy!

If I may push my luck and make 2 additional requests (give a man an inch, etc.):
1. I like to design symmetrically around the 4th axis of rotation (in my case, Y=0). So I usually have a Y minimum and a Y maximum value. Would it be possible to calculate both A minimum and maximum? I think it would also help eliminate user errors (i.e. prevent rotating too far in one direction).

2. Would it be possible to make the 1:1 setting a check box? When set, it would automatically fill in the A minimum/maximum and grey out the entry boxes. When unset (turned off), it would allow manually entry of the desired A minimum/maximum.

Like I said, pushing my luck, but I think it will make the interface of this plug-in much more user friendly!
Title: Re: Wrapper Plugin
Post by: EddyCurrent on October 05, 2017, 12:20:17 pm
Your luck must be in  :D

Please find attached v2.1.0 for CamBam v1.0, I'll see what needs to be done for v0.9.8

1. select User or Auto rotation angles.
2. user manual updated
3. added a check to verify that Diameter and Circumference are compatible (just in case 'Enter' was not pressed following entry of a new value)
Title: Re: Wrapper Plugin
Post by: robertk925 on October 05, 2017, 16:13:38 pm
Indeed it is! This plug-in is now perfect for my use.

Wow, what an incredible resource you are Eddy (and thanks to Geoffrey for the original plug-in).
Title: Re: Wrapper Plugin
Post by: robertk925 on October 09, 2017, 20:16:30 pm
One issue that I just recently had come up. Any ideas what an A axis value of "NaN" means (see line #7 in the Gcode below)? "Not a number"? For reference, I want to engrave a small slot linearly along the top of a cylindrical part at A0 (i.e. parallel to the axis of rotation). Thanks!

GCode before conversion:
1. G21 G90
2. G0 Z3.0
3. T10 M6 (Part1\EngraveMid\45 deg V Cutter\0.0)
4. ( EngraveMid )
5. G17
6. M3 S1000
7. G0 X10.0 Y0.0
8. G0 Z1.0
9. G1 F200.0 Z-0.2
10. G1 F400.0 X0.0
11. G0 Z3.0
12. M5


GCode after conversion:
1. G21 G90
2. G0 Z6.175
3. T10 M6 (Part1\EngraveMid\45 deg V Cutter\0.0)
4. ( EngraveMid )
5. G17
6. M3 S1000
7. G0 X10.0 ANaN
8. G0 Z4.175
9. G1 F200.0 Z2.975
10. G1 F400.0 X0.0
11. G0 Z6.175
12. M5
Title: Re: Wrapper Plugin
Post by: BR52 on October 09, 2017, 22:03:58 pm

dividing zero by zero is NaN, bug on WrapperPlugin!

   Armando
Title: Re: Wrapper Plugin
Post by: robertk925 on October 09, 2017, 22:08:12 pm
Thanks Armando, that makes sense. What's interesting is if I move the slot to a different Y value (i.e. not Y=0, but let's say Y=5), I still get the NaN value. So, I assume the divide-by-zero bug is triggered by the Y value not changing?
Title: Re: Wrapper Plugin
Post by: EddyCurrent on October 10, 2017, 07:54:05 am
I tested the code with the last version Geoff put out and it gives the same result.
It must be kept in mind though that Wrapper is not appropriate for the operation you describe and I'm confident it was not envisioned at the time of writing.
I'll have a look to see what can be done.

Edit:

Questions

1 . What number would you like to see after the A in line 7 ?
2. if you change the Y value to 5 what number should come after the A ?

Under normal cicumstances you are trying to map a range of values in Y to a range of values in A

Ymin->Ymax maps to Amin->Amax

but in this case there is no range in Y so how do we determine what A (angle) it should be ?
It implies that the values in "Rotation Angle A" boxes should be equal and at the required angle, then we could use that value.

See attached picture for an example.
Title: Re: Wrapper Plugin
Post by: robertk925 on October 10, 2017, 16:17:23 pm
Hi Eddy:

Your example is exactly what I would want/expect. Y=5/Circumference=20, A=90 degrees. If Y=0, then A=0 degrees.

I am not clear why the user min/max would have to be used (since I don't know the algorithm in the program). If we ignore the min/max completely, i.e. we don't scale the results, wouldn't the conversion calculation always be Y/C*360 (in the examples above, 5/20*360=90, 0/20*360=0)? If we want to use min/max, those numbers could be used to scale this result. Again, I am speaking out of complete ignorance on how the program is written.  ;D
Title: Re: Wrapper Plugin
Post by: EddyCurrent on October 10, 2017, 19:45:14 pm
Version 2.2 attached. Works with CamBam v1.0 and 0.9.8

Can accept identical values of,  Y minimum and Y maximum (or X minimum and X maximum)
Title: Re: Wrapper Plugin
Post by: robertk925 on October 10, 2017, 21:52:33 pm
Works great! Thank you very much (again).
Title: Re: Wrapper Plugin
Post by: Z-vision on December 10, 2017, 23:16:23 pm
I am using your wrapper plugin and having some trouble with the outcome

When the machining does number 1 it comes out half the size of the other numbers and letters.

Also the top of number 5 does not follow the tool path, it also shows the skipping the tool path in the mach3 view.

All other letters are coming out perfect and also if I use Goode before I use the wrapper plug in it works fine.

Would you know what I can do to fix this?

Please tell me what you need to see as in files and I can arrange for them to be posted
Title: Re: Wrapper Plugin
Post by: Bubba on December 11, 2017, 00:09:44 am
Usually the CB file is needed to diagnose your problem and possibly give an advice. ;)
Title: Re: Wrapper Plugin
Post by: Z-vision on December 11, 2017, 01:54:22 am
Ok great I’ll get the cb file tonight and post it up.
Title: Re: Wrapper Plugin
Post by: Z-vision on December 11, 2017, 06:42:59 am
I will be able to send you cb file in an hr or so. But for now what version wrapper should be be using ?
If the gcode works fine on flat before I use the wrapper would this suggest a setting with the wraper ?
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 11, 2017, 08:28:58 am
This version; http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Wrapper_plugin.html
Title: Re: Wrapper Plugin
Post by: Z-vision on December 11, 2017, 10:51:21 am
here are the files guys see if you can work it out. I'm only new so could be something small
the 5 and 1 are not coming out right.  it seems to be fine in the normal gcode but when i go to the wrapper plug-in then it starts  doing funny things

 
Title: Re: Wrapper Plugin
Post by: Bubba on December 11, 2017, 13:48:31 pm
For one, you entered 'wrapper' as post processor you are using. It should be the post for your machine.
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 11, 2017, 16:36:46 pm
1. Target Depth was set to 0.5

it should always be a - value, i.e. -0.5

2. No tool was specified
3. As Bubba said, wrong post processor selected, use Mach3 post
4. There was a warning from the Wrapper plugin regarding g codes it can't handle.
5. You changed some default settings but I don't think there was any need to.

So, select the polylines then, Edit->Polyline->Remove Arcs

That should do it.
Title: Re: Wrapper Plugin
Post by: Z-vision on December 12, 2017, 00:54:05 am
Thanks guys I will check this out and let you know how I get on. I knew I had something wrong
Title: Re: Wrapper Plugin
Post by: Z-vision on December 12, 2017, 06:55:37 am
Hello guys in in front of the machine now. Changed every thing you guys mentioned but still getting the Goode errors how do I fix this ?
Title: Re: Wrapper Plugin
Post by: Z-vision on December 12, 2017, 07:07:01 am
Have sorted the g codes now!

The original problem is still ha happening with the f and the 1 not being complete did this happen in your tool pass ?
Title: Re: Wrapper Plugin
Post by: Z-vision on December 12, 2017, 07:46:42 am
Very interesting while I’m waiting for you guys to help I tried a Ariel font and not one of the stick front cambam1 and they do not do the faults in the numbers! But then my problem is the width of letters
Title: Re: Wrapper Plugin
Post by: EddyCurrent on December 12, 2017, 09:24:15 am
Try the attached file, it looks fine in Mach3
A large percentage of problems people encounter are due to issues with the source data, i.e. bad polylines, bad dxf files, etc.

This is what I did.

1. select polylines then  Edit->Explode
2. remove duplicate lines, then Edit->Join to remake good polylines
3. select all polylines then Edit->Polyline->Remove Arcs with tolerance of 0.01  
4. rotated the numbers (they were not quite horizontal)
5. select tool no 10 (45 degree V tool)
6. set Target Depth to -0.5
7. set Post Processor to Mach3
8. reset some other parameters to 'default'

Title: Re: Wrapper Plugin
Post by: Arie kabaalstra on February 01, 2018, 00:26:25 am
I don't mean to be rude but.. the plugin doesn't work properly.

First of all, there is a great lack of documentation, and the output file doesn't at all look like what i need..

Diameter:  I get that one..
Circumference, i don't get that one.. why do i have to fill that in.. it can be calculated, it should be  calculated..Edit that.. i now see it is calculated, why can i fill it in anyway?.. that field should be locked or left away.. i don't need it..

Z-base.. what is the Z-Base, it that the Z0 Level?.. where should it be?.. is it an absolute or incremental value?..
Normally, Z0 is the Centerline.. it should be the centerline..
Do i have to generate my code at Z0, or at Z Radius level?


I just found out that my machinecontrol messes it up if Y isn't at 0.. so there must be a G00 Y0 in the output Code..


Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 01, 2018, 08:36:27 am
Did you read the documentation here ? http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Wrapper_plugin.html
Title: Re: Wrapper Plugin
Post by: Bubba on February 01, 2018, 13:11:58 pm
Normally, Z0 is the Centerline.. it should be the centerline..
**************************
Agree.
In any rotational (4th axis) work Z=0 is ALWAYS at center. That is accepted industrial convention, and I have always done this that way because it works..
I prezume, after reading the documentation,Eddy  ;D  that the Z=Radius is the top of the stock..
Title: Re: Wrapper Plugin
Post by: EddyCurrent on February 01, 2018, 13:53:59 pm
The original plugin was wrttten by GeoffreyGRoy, he also wrote the document. My part was to change the look of the plugin and update the document accordingly, I have never changed anything to do with Z-Base since Geoff wrote it.
In addition I have never used the plugin because my 4th axis is still waiting to be finished.

It's called "Wrapper" because that's what it does, it takes a flat object and wraps it around a cylinder, changing linear movement in either X or Y into rotational movement.
Wherever you set Z0 in the flat version of the geometry, that will still be Z0 in the wrapped version of the geometry.
Regardles of convention for a 4th axis, that's how it is with this plugin.

I don't mean to be rude but.. the plugin doesn't work properly.

Wrong, it does work correctly once the documentation has been read and understood.
Title: Re: Wrapper Plugin
Post by: dh42 on February 01, 2018, 14:57:59 pm
Hello

If you use stock surface = 0 in CB , set BaseZ to 0

If you use Z = 0 at the rotation axis of the 4th axis, set BaseZ to the same value as radius.

If you're using CB V1.0, you can wrap directly with CamBam. (with the post pro)

++
David

Title: Re: Wrapper Plugin
Post by: robertk925 on February 01, 2018, 16:55:32 pm
This plugin (especially with the refinements added by Eddy) works great. I am using it on a Taig mill with a home-brewed 4th axis and I was able to easily mill some slots on a cylindrical piece that only went around the circumference 350 degrees (i.e. interrupted slots). If you have any questions about its use please ask.
Title: Re: Wrapper Plugin
Post by: Bubba on June 09, 2018, 11:28:37 am
Hello

If you use stock surface = 0 in CB , set BaseZ to 0

If you use Z = 0 at the rotation axis of the 4th axis, set BaseZ to the same value as radius.

If you're using CB V1.0, you can wrap directly with CamBam. (with the post pro)

++
David


David, just used your 'Unroll' plugin and I couldn't get it to work correctly . When creating the gcode for sphere the wrapper toolpath did not cover the very end of the sphere at the center line of A axis, (Z-0). Was ready to give up till I found this post with instructions, and the part turn out great. It would be helpful if you would include those instructions with the plugin in the documentation section. IMHO, those are great addition to CB. Thanks to All of you for creating this.

http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Unroll3D.html
Title: Re: Wrapper Plugin
Post by: dh42 on June 09, 2018, 16:30:55 pm
Hello,

Yes, a tuto exists, but only in French at the moment ... It remain to translate. (it's a good thing to remind me, I totally forgot this one)

http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Unroll3D_doc_FR.html

++
David
Title: Re: Wrapper Plugin
Post by: Bubba on June 09, 2018, 16:47:50 pm
Not a problem. Thanks David.  ;)
Title: Re: Wrapper Plugin
Post by: dh42 on March 09, 2021, 18:58:22 pm
Hello Bob

It is Mach3 that do that, the feedrate is always given in in/min or mm/min as for 3 axis machining ; Mach3 take the in/min value for the rotary axis and convert it to the right rotation speed so the peripheral speed at the current Z position (radius) match the requested feedrate. The feedrate is constantly changed depending on the radius of the workpiece at the machining level.

with a rotary axis like a lathe (this is the workpiece that rotate), the Z = 0 must be at the rotation center in CamBam and in Mach3 the offset between the rotation center of the chuck and the rotation center in CB (the Z=0) must be entered in the rotation radius box ... in this case it should be 0 .... but a bug in Mach3 disable the feedrate adjustment if 0 ... so enter a small value as on the picture to solve the problem. Also check the others box as on the picture.

++
David
Title: Re: Wrapper Plugin
Post by: dh42 on March 09, 2021, 18:59:50 pm
strange ... bob's message has disappeared  during I write my reply ???

++
David
Title: Re: Wrapper Plugin
Post by: Bob La Londe on March 09, 2021, 20:31:00 pm
Thank you.  It looks like I missed a setting in Mach.
Title: Re: Wrapper Plugin
Post by: Bubba on March 09, 2021, 20:54:16 pm
I use 4th axis often and from my experience Mach3 is working as expected. Yes, the use radius for feedrate must be selected.
Title: Re: Wrapper Plugin
Post by: Bob La Londe on March 09, 2021, 20:57:53 pm
It was the odd setting of .0001 that I didn't catch. 

I have a simulation running in Mach on my sim/design computer right now and its performing as desired.  Now I need to figure out how it will work with PathPilot (LinuxCNC) as the Tormach is the mill with the decent 4th axis in the shop. 

I ran a 4th axis briefly on the little Noodle Router, but I only ever used it for indexing. 
Title: Re: Wrapper Plugin
Post by: dh42 on March 09, 2021, 21:38:46 pm
Quote
It was the odd setting of .0001 that I didn't catch. 

Not sure if it is still relevant on V3.043.062, but when I tried it (in the past), if the value for "A Rotation Center" was set to 0, as it should be, this disabled the speed correction for radius.

++
David
Title: Re: Wrapper Plugin
Post by: Bob La Londe on March 10, 2021, 14:40:42 pm
I didn't understand the speed correction for radius setting initially.  It seemed to me that you would set it for the rough radius of your work.  When I set it to .0001 as you suggested it seemed to work as it should. 

None of my machines are better than 3-5 tenths backlash (actually backlash may be less, but overall repeatability) anyway, so 1 tenth is inconsequential for my purposes.  Thanks for the tip. 

Of course I still need to figure all this stuff out for PP on the Tormach. 
Title: Re: Wrapper Plugin
Post by: dh42 on March 10, 2021, 17:47:33 pm
Hello

Quote
It seemed to me that you would set it for the rough radius of your work.

Only if you're working with Z = 0 at the radius of the stock

if you works with Z = 0 at the rotation center, "A Rotation Center" should be 0 ; if you works with Z = 0 at the radius of the cylinder, "A Rotation Center" should be the radius.

If it is the spindle that rotate and the piece that is fixed, "A Rotation Center" must be the distance between the rotation center and the tool tip

++
David

Title: Re: Wrapper Plugin
Post by: Bubba on March 11, 2021, 01:10:31 am
All work I have ever done both in manual machining and cnc 4th axis. The Z=0 was always at center of stock.
Title: Re: Wrapper Plugin
Post by: dh42 on March 11, 2021, 02:08:44 am
Hello Bubba

Maybe you already see it, but I translated the doc for the Unroll plugin ;)

http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Unroll3D_doc_EN.html

++
David
Title: Re: Wrapper Plugin
Post by: Bubba on March 11, 2021, 15:34:07 pm
Thank you David.