CamBam

Resources => Scripts and Plugins => Topic started by: EddyCurrent on March 13, 2016, 16:38:34 pm

Title: TapMate plugin
Post by: EddyCurrent on March 13, 2016, 16:38:34 pm
Recently I've been spiral drilling some holes for hand tapping later and others for bolt clearance holes, so I was inspired by the Shapes plugin to come up with a way of inserting these holes and centres into the drawing.
For anyone interested, I totally changed the xml code from the Shapes plugin.

Features.
1. Separate tab for each type of thread, I can add plenty more tabs
2. if your units are mm and you choose an inch bolt, the plugin will convert sizes automatically, and vice versa.
3. you can add or ammend the data
4. choose which holes to add to the drawing
5. It creates an xml file of the data in the CamBam system folder
6. added a pdf manual


Edit: I've just been playing with the Threading plugin; http://www.cambam.info/ref/plugin.threadingmop
and they work together well. This TappingData plugin puts the correct size circle in the drawing and gives it's diameter for entering into the Threading MOP, it also gives the thread pitch for entering into the Threading MOP.

Edit: 16 March 2016 , Version 1.0 attached

Please advise if any problems or changes, additions required

Don't forget, I can't be held responsible for any errors in the data so please check the values before using.

Edit:16 March 2016 , Version 1.1 attached
Edit:17 March 2016,  Version  1.2 attached

Changes;
1. Removed Delete Row button (why would you want that anyway ?)
2. Improved data validation
3. Added a version number to the xml file.
    If the file does not exists, a new file is created
    If the file exists but is an older version, it will be overwritten with a new version
    If the file exists and is the same version, good to go !
This was to allow extra tabs to be added without causing crashes due to the xml file not being in sync.
4. translation code added

Edit: 1 Jan 2017, Version1.3 attached

This version has been compiled using .NET v4.0 and is for use with CamBam v1 ONLY
The previous version 1.2 is still there for 0.9.8. users.

Edit: 16 Jan 2017, Version1.4 attached

This version has been compiled using .NET v4.0 and is for use with CamBam v1 ONLY
It has been tested to work on;
* Windows
* Linux
Title: Re: TappingData plugin
Post by: dave benson on March 13, 2016, 22:31:22 pm
HI Eddy
Great idea here is a list of standards https://en.wikipedia.org/wiki/List_of_thread_standards (https://en.wikipedia.org/wiki/List_of_thread_standards)
Although you'll probably need columns for Imperial Whitworth\UNC.
Dave
Title: Re: TapMate plugin
Post by: EddyCurrent on March 14, 2016, 10:35:07 am
Thanks Dave,
You know, it's beyond my understanding why we have to pay money for Standards  ??? thank goodness some of the information can be found elsewhere.

I'm changing the column headings slightly, no need for two clearance columns


Title: Re: TappingData plugin
Post by: dh42 on March 14, 2016, 14:11:14 pm
Hello

You can find an helpful (free) software here ; the FULL version also provide a lot of PDF.

http://www.vargus.com/vardex/template/default.aspx?pCatId=9&pageId=74

++
David
Title: Re: TapMate plugin
Post by: EddyCurrent on March 14, 2016, 15:09:16 pm
David,

Just to be clear,

Are you saying there is no need for the TappingData plugin, or
are you just pointing me to some information I could maybe use in it ?

Thanks.
Title: Re: TappingData plugin
Post by: awemawson on March 14, 2016, 15:57:09 pm
David, that's a handy link, thank you.

Eddy - in your column headings you may like to change 'course' to coarse' unless you're starting a training session :)

Title: Re: TappingData plugin
Post by: EddyCurrent on March 14, 2016, 16:26:24 pm
Thanks, very annoying because it's not that I didn't know it was incorrect, in my defence I did attend Grammar School as a boy, but I suppose that makes it all the worse.  :D
Each post I make here has to be edited about 6 times after I've posted just to put things right and fill in missing words, it's definately age related, or trying to spin too many plates   :-[
Title: Re: TappingData plugin
Post by: dh42 on March 14, 2016, 18:13:15 pm
Hello,

Quote
are you just pointing me to some information I could maybe use in it ?

Yes.

I can't appreciate if the plugin is needed ; I cut only wood on the CNc, and of course there is never threading.

The TT gen, I use it for the lathe.

++
David
Title: Re: TapMate plugin
Post by: EddyCurrent on March 16, 2016, 16:21:21 pm
Renamed to TapMate, version 1 attached to first post, there's bound to be something wrong though  :D

@David, I will add the translation text later.  ;)
Title: Re: TapMate plugin
Post by: awemawson on March 16, 2016, 17:33:35 pm
What no BSP or NPT in parallel and tapered forms. No Cycle threads. No Panzergewinde (PG) threads for conduit. >:(


..... only teasing ......   :)
Title: Re: TapMate plugin
Post by: EddyCurrent on March 16, 2016, 17:42:33 pm
It took ages getting the data in there :D, I do intend to add more tabs as time permits so if it's any use to you, keep an eye out, I'll do requests first (if there are any)
Title: Re: TapMate plugin
Post by: EddyCurrent on March 16, 2016, 22:28:35 pm
Attached v1.1 to first post

Added BSW, BSF
Title: Re: TapMate plugin
Post by: EddyCurrent on March 17, 2016, 14:28:47 pm
Version 1.2 added to first post.

Also added a pdf manual.

@David, you can try the translation now if you wish  :D, there will be some things to change I think  ;)
Title: Re: TapMate plugin
Post by: dh42 on March 17, 2016, 15:23:51 pm
Version 1.2 added to first post.

@David, you can try the translation now if you wish  :D, there will be some things to change I think  ;)

Hello,

Ok, I'll have a look when time permit ... currently I'm doing "true" woodworking (I want to say, without CNc, except for mortises) ... and I'm not very good at it ... it takes me a long time to do little things ! pfui ...  ::)

I don't understand what is the usage of "clearance"

the untranslatable items are:

- the column headers
- the tab texts
- the name for the units in use.

++
David
Title: Re: TapMate plugin
Post by: EddyCurrent on March 17, 2016, 16:02:51 pm
currently I'm doing "true" woodworking (I want to say, without CNc, except for mortises) ... and I'm not very good at it ... it takes me a long time to do little things ! pfui ...  ::)

Practice is the answer  :D

Quote
I don't understand what is the usage of "clearance"

This is the size of hole required for the bolt or screw to pass though easily. It is not as trivial as it sounds, the hole must be neither too large nor too small, there are several calculations to determine the optimum size.

I will have a look at the untranlatables
Title: Re: TapMate plugin
Post by: EddyCurrent on March 17, 2016, 16:35:55 pm
David,

I can't make those translatable and still make the plugin work.
You probably didn't see I have now attached a pdf manual, can I suggest the manual is translated and those words be described in that ?
Title: Re: TapMate plugin
Post by: dh42 on March 17, 2016, 19:07:50 pm
Hello,

To translate the tabs, you need another code in the init function in addition to TextTranslation.Translate(Me)

for each tab you need something like (in VB)

        Me.TabControl1.TabPages.Item(0).Text = TextTranslation.Translate(Me.TabControl1.TabPages.Item(0).Text)
        Me.TabControl1.TabPages.Item(1).Text = TextTranslation.Translate(Me.TabControl1.TabPages.Item(1).Text)


(of course, the Tag property of the TabControl must also have a "t" as usual)

I don't know if it will translate the column headers, I never used this grid object, but it should translate at least the tabs header.

++
David
Title: Re: TapMate plugin
Post by: EddyCurrent on March 17, 2016, 21:22:13 pm
David,

Try that, I've attached the file in the first post (still v1.2)
Title: Re: TapMate plugin
Post by: dh42 on March 17, 2016, 21:56:56 pm
Re

Ok, it works for both tabs and column headers, still remain the unit names that are untranslated.

++
David
Title: Re: TapMate plugin
Post by: EddyCurrent on March 18, 2016, 07:54:49 am
David, do you mean "Millimeters" and "Inches" ? I didn't think they needed translating.
Title: Re: TapMate plugin
Post by: dh42 on March 18, 2016, 14:33:51 pm
David, do you mean "Millimeters" and "Inches" ? I didn't think they needed translating.

Hello,

Yes.

++
David
Title: Re: TapMate plugin
Post by: EddyCurrent on March 18, 2016, 15:09:05 pm
David,

Done, attached new file to first post (still v1.2)
Title: Re: TapMate plugin
Post by: EddyCurrent on January 01, 2017, 18:50:05 pm
Attached version 1.3 to the first post in this thread.

It has been compiled with .NET v4.0 for use with CamBam version 1 only.

This might hopefully make it compatible with current Linux versions too.
Title: Re: TapMate plugin
Post by: newlinuxuser on January 01, 2017, 19:12:00 pm
Hello Eddy, I tested the plugin, and the result is:
Code: [Select]
mono --debug CamBam.exe
System.IO.FileNotFoundException: /home/andrea/CamBam0.9.8\plugins\TapMate.dll
  at System.Diagnostics.FileVersionInfo.GetVersionInfo (System.String fileName) <0x40b0bf20 + 0x000fb> in <filename unknown>:0
  at TappingData.TappingDataPlugin.plugin_clicked (System.Object sender, System.EventArgs e) <0x40afe7a0 + 0x00083> in <filename unknown>:0
  at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) <0x40afc080 + 0x00065> in <filename unknown>:0
  at System.Windows.Forms.ToolStripMenuItem.OnClick (System.EventArgs e) <0x40afbcb0 + 0x0032b> in <filename unknown>:0
  at System.Windows.Forms.ToolStripMenuItem.HandleClick (Int32 mouse_clicks, System.EventArgs e) <0x40afbc60 + 0x0001b> in <filename unknown>:0
  at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e, ToolStripItemEventType met) <0x40ad3400 + 0x000e1> in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem:FireEvent (System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
  at System.Windows.Forms.ToolStrip.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) <0x40afb980 + 0x001a7> in <filename unknown>:0
  at System.Windows.Forms.ToolStripDropDown.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) <0x40afe030 + 0x00013> in <filename unknown>:0
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) <0x40afb610 + 0x00118> in <filename unknown>:0
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x4084a250 + 0x00217> in <filename unknown>:0
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) <0x409a7e80 + 0x00013> in <filename unknown>:0
  at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m) <0x409a7e50 + 0x00013> in <filename unknown>:0
  at System.Windows.Forms.ToolStripDropDown.WndProc (System.Windows.Forms.Message& m) <0x40af8fe0 + 0x00033> in <filename unknown>:0
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x4084a220 + 0x00024> in <filename unknown>:0
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x4084a1e0 + 0x00036> in <filename unknown>:0
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x40848b20 + 0x0031c> in <filename unknown>:0


Sorry for my bad English and sorry if I say something stupid, I am not a programmer,  but  the first line "System.IO.FileNotFoundException: /home/andrea/CamBam0.9.8\plugins\TapMate.dll" looks to me something about backslash instead of normal slash for the file path.


Tested on ubuntu 16.04, mono 4.3.1


Thanks for your plugins and happy 2017!
 
Title: Re: TapMate plugin
Post by: EddyCurrent on January 01, 2017, 19:22:03 pm
Many thanks for the feedback, that may be a good reason for the error.

I had the same error with the Wrapper plugin, http://www.cambam.co.uk/forum/index.php?topic=4388.msg41797#msg41797
Title: Re: TapMate plugin
Post by: newlinuxuser on January 02, 2017, 20:20:41 pm
Hello Eddy,
the reason was the backslash.
I tried to open your dll with the hex editor and changed the two backslashes and now both version, 1.2 and 1.3 work in linux!
The 1.3 version works also with ubuntu 12.04 mono version 2.10.8.1  ;D

Attached the corrected files, I don't know if them still work in windows or not, but linux users can use your useful plugin  ;D

Ciao,

Andrea
Title: Re: TapMate plugin
Post by: SteveT on January 02, 2017, 20:38:17 pm
Hello Eddy,
the reason was the backslash.
I tried to open your dll with the hex editor and changed the two backslashes and now both version, 1.2 and 1.3 work in linux!
The 1.3 version works also with ubuntu 12.04 mono version 2.10.8.1  ;D

Attached the corrected files, I don't know if them still work in windows or not, but linux users can use your useful plugin  ;D

Ciao,

Andrea
Works great on my Ubuntu 16.04LTS and mono 4.**, great work thanks
Title: Re: TapMate plugin
Post by: EddyCurrent on January 02, 2017, 22:57:22 pm
Hello Eddy,
the reason was the backslash.
I tried to open your dll with the hex editor and changed the two backslashes and now both version, 1.2 and 1.3 work in linux!
The 1.3 version works also with ubuntu 12.04 mono version 2.10.8.1  ;D

Attached the corrected files, I don't know if them still work in windows or not, but linux users can use your useful plugin  ;D

Ciao,

Andrea


Andrea,

Very clever of you to do that, thank you very much, I'm really pleased it all works now.  ;D ;D
Title: Re: TapMate plugin
Post by: SteveT on January 03, 2017, 08:33:08 am
Hello Eddy,
the reason was the backslash.
I tried to open your dll with the hex editor and changed the two backslashes and now both version, 1.2 and 1.3 work in linux!
The 1.3 version works also with ubuntu 12.04 mono version 2.10.8.1  ;D

Attached the corrected files, I don't know if them still work in windows or not, but linux users can use your useful plugin  ;D

Ciao,

Andrea


Andrea,

Very clever of you to do that, thank you very much, I'm really pleased it all works now.  ;D ;D
Looks a very useful addition to CB thanks for writing it.
Title: Re: TapMate plugin
Post by: pixelmaker on January 03, 2017, 11:12:36 am
I tried the plugin under windows. The plugin works in Version 1.0
The translation donĀ“t work.
The values to be translated appear only in the list when the plugin has been opened in the session. You can then translate them. After a restart of Cambam the values of the Tapmate plugin are no longer in the list. Only after a new call of the plugin they appear again. Then the translation is gone again.

ralf
Title: Re: TapMate plugin
Post by: EddyCurrent on January 16, 2017, 15:14:30 pm
@Andrea, thanks again for making v1.3 work on Linux, I've now changed the code so the same plugin (v1.4) will work on both Windows and Linux.

@Ralf,
Please try this new version for translations, it works on mine now I've got this sorted; http://www.cambam.co.uk/forum/index.php?topic=6288.msg50796#msg50796

New Version 1.4 attached to first post here; http://www.cambam.co.uk/forum/index.php?topic=5554.msg44378#msg44378


It also looks like there are issues with mono and Windows DataGridView controls.
In Linux the plugin closes (crashes) if the cursor is clicked in a box of the final row in one of the data tables.
So that users can enter their own sizes at the end of the tables without it crashing I've left 5 blank rows.
Title: Re: TapMate plugin
Post by: dh42 on January 16, 2017, 20:46:10 pm
Hello

Quote
It also looks like there are issues with mono and Windows DataGridView controls.

Yes, same pb if you try to edit points collection of a point list / polyline. .. This is an old pb on Linux version

++
David