Author Topic: Box Auto Plugin  (Read 17753 times)

Offline onekk

  • CNC Jedi
  • *****
  • Posts: 512
    • View Profile
Re: Box Auto Plugin
« Reply #30 on: October 19, 2016, 13:38:03 pm »
So my assumption was correct and wrong at the same time,

The problem is the different "autocast" in VB a double could be "implicit converted" to a long.

in C# no so I have modified in the early stages of the "translation" nb_tenon_(x or y) from long to double so when in VB the conversion is done implicitly and nb_tenon(x or y) is converted to a integer (long) in my C# translations is not, so I have modified the code to explicitly convert to long the nb_tenon(x or y) variable.

Problem solved,

Here the new sources, that i hope will work as expected.

 
Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6211
    • View Profile
    • Cambam V1.0 French Doc
Re: Box Auto Plugin
« Reply #31 on: October 19, 2016, 14:26:31 pm »
Hello,

Yes if I well remember my C ANSI on Amiga (old !!) you need to use () to cast the variable to convert (In VB it is implicit or if it won't, you can use CTYPE)

C:  a = (double) b

VB: a = Ctype(b,double)

++
David

Offline onekk

  • CNC Jedi
  • *****
  • Posts: 512
    • View Profile
Re: Box Auto Plugin
« Reply #32 on: October 19, 2016, 15:20:01 pm »
David it suffice to cast it explicitly with:


Code: [Select]
nb_tenon_x = (long)(X_libre / StepLength);
in every occurrence of the nb_tenon_(x or y) where the variable is "loaded".

So.

When you have time, maybe we can talk how to name this Plugin or if (after some testing) could replace the VB version as it seems to be "cross platform".

Regards and Thanks to all (A Special mention to EddyCurrent, you help is Invaluable)
Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4565
    • View Profile
Re: Box Auto Plugin
« Reply #33 on: October 19, 2016, 15:49:08 pm »
Carlo,

Works okay for me now, good effort !
Made in England

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6211
    • View Profile
    • Cambam V1.0 French Doc
Re: Box Auto Plugin
« Reply #34 on: October 19, 2016, 18:24:13 pm »
Hello,

Quote
When you have time, maybe we can talk how to name this Plugin or if (after some testing) could replace the VB version as it seems to be "cross platform".

As I say further, it's not MY plugin ;), first I start with an old Andy's script "doll house", but that did not the trick and JF continue the job before I can do more  ;D and makes the plugin, I just help for some little problems and adds the translation code.

http://www.usinages.com/threads/plugin-boites-crenelees.80494/page-2#post-904317

JF do not speak C#, but it seems He has stopped the development of this plugin so it's not really a problem if the plugin evolve to C# and if there is only one version for both Win and Linux .. I think ...

If you do not speak French, I can ask Him if he agree ?

Regarding what I say in a previous message, I can't retrieve the discussion about the bug ... it was with private messages and they have disappeared ..  ???

Do you have a compiled version I can use on Windows ? it's the same .dll file for both versions ?

++
David
« Last Edit: October 19, 2016, 18:32:42 pm by dh42 »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6211
    • View Profile
    • Cambam V1.0 French Doc
Re: Box Auto Plugin
« Reply #35 on: October 19, 2016, 18:36:21 pm »
Ah ah ... I retrieve the message about the little bug.  ;D

it is only visible with a big value (not really usable) for "Assembly clearance" (3mm on the picture) .. but maybe it is not here on your version ?



++
David

Offline onekk

  • CNC Jedi
  • *****
  • Posts: 512
    • View Profile
Re: Box Auto Plugin
« Reply #36 on: October 19, 2016, 20:59:16 pm »
Thanks, David, for the bug, i don't know, maybe having some data to test the behaviour will reveal some discrepancies, in the VB code there was some mixing of type with auto casting, as example in the head of the sub are stated all value as single precision and then in the sub there are used with double, and even the double to long autocasting that caused the problem, I'm not an expert of C#, but reading a lot in these days if in C# the auto casting is not implemented directly and you have to explicitely set is because there are problem of precision involved, like in the Polyline transformations in CamBam that made me create the  PolyRound plugin.

To make the thing short, maybe the problems in the C# code are minor due to the early explicit casting of some values.

For your offer to "talk" to JF your french is better than mine :-D, so if we have the agreement of Jk and after some testing if you agree we can put the C# version as the unique Version of the plugin.

For the Windows Version, if Eddy is so king to compile the new version attached to this message you can test it on Windows, I have some plan to make some boxes for my wife and for my little "shop" so i can test extensively the Linux version in the nexts days.

The new version has some code polishing (I've deleted some commented out code and made some "debug" messages switched on and off with the "Verbose" CheckBox).

I will need some help in "documenting" the code and maybe in "translating" the internal comments in engllish.


Thanks and Regards
Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6211
    • View Profile
    • Cambam V1.0 French Doc
Re: Box Auto Plugin
« Reply #37 on: October 19, 2016, 21:20:06 pm »
Hello,

Quote
in the VB code there was some mixing of type with auto casting, as example in the head of the sub are stated all value as single precision and then in the sub there are used with double, and even the double to long

Yes, first plugin for jf, and noob coder with VB too ;)

Quote
For your offer to "talk" to JF your french is better than mine, so if we have the agreement of Jk and after some testing if you agree we can put the C# version as the unique Version of the plugin

it's OK, I just talk with Him  ;)

Quote
I will need some help in "documenting" the code and maybe in "translating" the internal comments in engllish.

lol, yes, the comments are a melting pot of english and french (and sometimes in the same phrase .. ;D)

++
David

Offline BR52

  • Wookie
  • ****
  • Posts: 336
    • View Profile
Re: Box Auto Plugin
« Reply #38 on: November 14, 2018, 01:42:37 am »
Hi Eddy
how many year will take to put the compiled dll.  ;D  ;D

   Armando

« Last Edit: November 14, 2018, 02:07:01 am by BR52 »

Offline pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1788
    • View Profile
    • pixelmaker
Re: Box Auto Plugin
« Reply #39 on: September 18, 2020, 09:53:58 am »
I just want to get this up. Are there any further developments?

ralf

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3026
    • View Profile
Re: Box Auto Plugin
« Reply #40 on: September 18, 2020, 12:04:11 pm »
I was wondering the same thing. ;D
My 2¢

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

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4565
    • View Profile
Re: Box Auto Plugin
« Reply #41 on: September 18, 2020, 15:31:05 pm »
You mean this ?

I didn't compile it at the time because for some reason I thought Carlo was going to continue with more updates.

Plugin attached, tested on CamBam 0.9.8 and v1.0
« Last Edit: September 18, 2020, 15:33:28 pm by EddyCurrent »
Made in England

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3026
    • View Profile
Re: Box Auto Plugin
« Reply #42 on: September 18, 2020, 20:40:36 pm »
Thank Eddy.
My 2¢

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