CamBam

Resources => Scripts and Plugins => Topic started by: dave benson on July 27, 2017, 23:21:26 pm

Title: Break Edges Plugin
Post by: dave benson on July 27, 2017, 23:21:26 pm
Hi all
Here is a small plugin designed to break the sharp edges of stock using V cutters 45/60/90 ect from your tool library.
I've tested this with 45 and 60 Deg cutters and also added some error checking so that if you forget to assign a tool or library you'll be reminded to do so.
I'll include a CB file with a tool setup to simulate in camotics tool (10) as the settings can take a little time to noodle out.
I've also included a pic of the result from camotics and the parts made from it.
The mop produced has the Tool dia and target depth set (don't change these) everything else is just like a standard mop
where you can change the other settings to suit yourself.
Dave

edit latest version with translation and traps un-selected libraries and compensates for different zoom levels.

Edit latest version larger windows to see long style, library and tool names style locked out unless you select a style library first, works with text.
Title: Re: Break Edges Plugin
Post by: dave benson on July 29, 2017, 12:57:10 pm
Hi All

Today I modified and bored a couple of pockets for 6001 bearings in a NSK bearing block for my lathe and found that with using the plugin to break the edges of the pockets, that there was a slightly raised edge at the bottom of the fillet caused by the damaged tip of the 60 deg tungsten engraving cutter  I was using.
 
(I busted a few of these because the engraving mop doesn't have a spiral leadin)

So what I did was make the tool engage the work further up the cutter flutes which made these otherwise useless cutters useful, and made a nice chamfer even, with the 90 deg counter sink cutter as well.

I've replaced the old file with a new one.

Dave
Title: Re: Break Edges Plugin
Post by: Bubba on July 29, 2017, 15:27:17 pm
Hi Dave, Tried your plugin,(great idea by the way) here is a what I found..

The plugin Inch Tool library is not in 'sinc' with my library. It does show mm library (default)
By looking on the screen capture, pay attention to tool #10  ;)

Thanks for trying. :D
Title: Re: Break Edges Plugin
Post by: dave benson on July 29, 2017, 23:16:16 pm
Hi Bubba

The tool you have selected in the the "Inch tool library" is a ball nose cutter and not a V cutter and the plugin needs a V angle to calculate the toolpaths (There's no reason that a ball nose cutter couldn't be used I just didn't think of it).
so a default cutter was chosen.

I'll add some code to catch this for now.

If you can could you post a inch CB file with a rectangle in it and I will do some further tests with real data for inch folks using the data from your library.

I can't promise anything in the next few days as I"m making up some bearing support blocks for the lathe project, but as soon as I can I'll use the software eddy put me onto to search through my snippets to find some code or plugin that has the math for Ball nose radius calculations. I think I've done this before But can't remember  ::).

Dave
Title: Re: Break Edges Plugin
Post by: Bubba on July 29, 2017, 23:49:23 pm
Dave,

I don't think I explained this correctly. I do understand that V-angled cutter is used. The problem is with tool library selection. I use an Inch tool library, your plugin ignores that and use an mm tool library instead. So if you look carefully on picture attached in previous post snipped of my tool library is shown in the left. Take look at tool #10 selected in your plugin. Hopefully is 'clear as mud this time' ;D ;D ;D
Title: Re: Break Edges Plugin
Post by: dave benson on July 30, 2017, 10:10:13 am
HI Bubba

I've just had a look and the plugin and see what you mean so here is one that lets you select your libraries and does some more error checking.

Dave
Title: Re: Break Edges Plugin
Post by: EddyCurrent on July 30, 2017, 11:49:51 am
Dave,

In the context of this plugin, why do we care about Style Libary ? it seems to have no bearing on the next two selection dropdowns.
Also, the button with the small graphics, would it be useful if it toggled between, "chamfer face width" and "offset from edge" ?
Title: Re: Break Edges Plugin
Post by: Bubba on July 30, 2017, 12:49:43 pm
If you can could you post a inch CB file with a rectangle in it and I will do some further tests with real data for inch folks using the data from your library.
************************************

Sure, 
Title: Re: Break Edges Plugin
Post by: dave benson on July 30, 2017, 13:29:36 pm
Hi Eddy

In the context of this plugin, why do we care about Style Library ? it seems to have no bearing on the next two selection drop downs.

Eventually I wanted to be able to select a style  library and then a style, so that the mop would be fully specified this way (I have style 3mm in al) that if I select, then everything is specified including feed rates leadin ect.
But I have friends that use CB and  don't use style libraries at all, so I wrote the plugin with them in mind.

Also, the button with the small graphics, would it be useful if it toggled between, "chamfer face width" and "offset from edge" ?

Yes that was the thinking, that's why it is a button and not a label, but there's a few issues to think about :

David pointed out a fillet is specified as a (1mm by 1mm or a 2 mm x 2mm) from the top and side edges and with a 90 deg  cutter (effectively 45 deg chamfer on the edge your cutting)  you can do this with one textbox but with a 60 or 30 deg V-cutter  or a ball nose cutter you may need some extra textboxes for some extra data to specify where you want to position radius of the scallop of the ball nose tool to make edges like woodworkers might do with a spindle router form tool without resorting to 3D.

Right now I'm in the middle of the lathe X axis fit up and am keen to press on with it, which will probably take 3 or 4 days, then I'll have to save up for a control box to put the controller and inverter in so I'll have some free time to add some things to plugin.

It's good  to have people with some insight make suggestions, be it from a programming or machining point of view.
thanks Bubba That'll help alot.

Dave
Title: Re: Break Edges Plugin
Post by: kvom on July 30, 2017, 14:51:15 pm
I'll make a few comments here for what it's worth.

What you're doing is mainly a very basic chamfer plugin.  What might be most useful is an actual chamfer plugin that would require more elaboration, and would need to be able to specify more about the tool geometry and the cut itself.  I'm not sure if your ambition was to do much more than what you've done already.

For tool geometry, in addition to the taper angle, you'd want to handle bits that have a flat tip as well as a complete point.  Also, the engagement distance from the tip to allow cutting with the thicker part of the tool.

For the actual cut, multiple passes may be needed, as are specifiable with cut width and step over.  Plus you'd want to be able to show the cutwidth display as inside the profile.  I also tend to use lead ins for chamfers.

All these things are what I calculate manually before coding a profile MOP.

Title: Re: Break Edges Plugin
Post by: EddyCurrent on July 30, 2017, 15:13:59 pm

It's good  to have people with some insight make suggestions, be it from a programming or machining point of view.

Dave

Dave, it's good to have comments of any kind  ;)
Title: Re: Break Edges Plugin
Post by: dave benson on July 31, 2017, 00:11:07 am
Hi Eddy and Kvom

Quote
Dave, it's good to have comments of any kind  

Ha Ha I recall a quote from a fading Hollywood movie star (can't remember who it was now  ) that went something like, The only thing worse than being “talked about “ was “not being talked about”.

Unlike a few of the other plugins that I've written, which I did for a bit of fun and to learn something new, this plugin was borne of a genuine need.

 As in descending order I work with Steel/Aluminium/Eng plastics and have to break the edges
as a matter of routine, sometimes for aesthetics but mostly for safety.

Quote
I'm not sure if your ambition was to do much more than what you've done already.

It wasn't really, as I cut out parts of various sizes from  1.5 mm to 16 mm thick al on a per job basis, a one size fits all  chamfer wasn't appropriate and calculating the chamfers for each individual part on the sheet gets old quickly.

The latest version does cut a bit further up the tool as a bit of testing on the machine showed that
the very bottom of the tool tip left another edge to break,  and also the surface speed at the tip of the tool is very low and  the finish wasn't very good, and as I don't have a high speed spindle I couldn't do much about this.

To address this I have added a small offset (negative roughing clearance) and added a bit to the tool depth of the tool path, but there are some constraints here depending on the geometry of the tool.

For example my 90 Deg countersink is a large tool both in depth and width, and so I can cut further up the flank of the tool (I did this in the last version) and  there was a remarkable improvement in finish, however with the 60 and 30 deg cutters you are somewhat constrained by the geometry of the tool itself.

As to multiple passes, the plugin produces a standard profile mop with the Tool Dia, Roughing Clearance and Depth of Cut fields calculated and filled in, and so anything else (like leadin's for example)  can be set as you need.  I always use the spiral leadin as a matter of course.

I could set the spiral leadin when the mop is generated, but because our machines and materials are different there might not be a one size fits all "Depth Increment" that I could use for the spiral leadin's.
 
But I'm not a machinist by trade and am happy to take advice on this.

Dave
Title: Re: Break Edges Plugin
Post by: Bubba on July 31, 2017, 01:20:49 am
Dave,

From my experience by doing this for living,(happily retired now)the  depth increment is unnecessary. I have always cut chamfer's in one pass, sometimes climb milling. Always with good result.
Title: Re: Break Edges Plugin
Post by: dave benson on August 08, 2017, 10:18:48 am
HI All

OK here's a new version of the plugin where you can use a pre-configured style to make your break edges mop from, (this gives you the ability to totally specify all of the parameters ) so that you don't have to create a mop and then enter the feeds and speeds leadin's ect.

First you have to create a new style or styles in your style library like the picture below.

If you want to use styles then:
Then load up the plugin.
Select the geometry to apply the mop to.
Select a style library.
Select a style.
Select a tool Library.
Select a tool.
 
Click create mop.
One thing to remember is that if you select a circle or arc (which are not polylines), then the mop will not include them, you must then right click on the mop and select add drawing objects to include them in your mop.

I could have had the plugin convert these circles and arcs to polylines and include them in the mop
But if you had  previously used them in other mops you would have to re-enter them into those mops, so I left this choice for you to do yourself.

If  there's no issues found in the next couple of days then I'll call it done, and as promised will start on the                
 ” IsThinking” issue with Eddy.

Dave
Title: Re: Break Edges Plugin
Post by: EddyCurrent on August 08, 2017, 10:46:17 am
Dave,

I found the thinking setup is an EditMode.
Title: Re: Break Edges Plugin
Post by: dave benson on August 08, 2017, 21:21:46 pm
Hi Eddy
Just off to scrape the saddle dove tails on the lathe (been at for three days now), so I'll have a good look sometime this afternoon when I'm satisfied that I can't do any better. (they were on close inspection really terrible).
Dave
Title: Re: Break Edges Plugin
Post by: EddyCurrent on August 08, 2017, 21:36:51 pm
Dave,

Does anyone do scraping these days ? coincidentally I was ratching (http://www.cumbriandictionary.co.uk/#R)
through an old tool box of mine and came across some scrapers, last used on white metal bearings at a power station.

These days I need unfeasible amounts of light, what looks great in the shed, looks terrible in daylight  ??? and I have a good amount of 'daylight' tubes in the shed. The problem I  think is cataracts  >:(
Title: Re: Break Edges Plugin
Post by: dave benson on August 08, 2017, 21:55:22 pm
HI Eddy
Yes Eddy I have scrapers for textile machines "6 inch white metal bearings" , had to do the lathe as on close inspection
the dove tails look like they were done at five minute to knock off time on a Friday before someones big night out.

I've just added more lights over the welding table and  even with glasses I couldn't see the weld puddle and my helmet is auto darkening but not adjustable (big mistake) .

Dave
Title: Re: Break Edges Plugin
Post by: EddyCurrent on August 08, 2017, 22:18:52 pm
five minute to knock off time on a Friday before someones big night out.
Dave


Sigh, I remember it well  :D
Title: Re: Break Edges Plugin
Post by: dave benson on August 08, 2017, 22:26:17 pm
Thanks for the link, got a laugh, and unbelievably new a few words (chunder for example Ha Ha).
Right I'm of to the shed to attack the dove tails (had to make a small scraper using some HHS inserts) which seems to holding up well.
Dave
Title: Re: Break Edges Plugin
Post by: Garyhlucas on August 09, 2017, 00:56:53 am
Dave,

Does anyone do scraping these days ? coincidentally I was ratching (http://www.cumbriandictionary.co.uk/#R)
through an old tool box of mine and came across some scrapers, last used on white metal bearings at a power station.

These days I need unfeasible amounts of light, what looks great in the shed, looks terrible in daylight  ??? and I have a good amount of 'daylight' tubes in the shed. The problem I  think is cataracts  >:(

Eddy,
I had cataract surgery about 6 years ago after putting it off for 3 years after being diagnosed. I had defractive cataracts. Sitting at a traffic light I could clearly two red lights side by side about one diameter apart, with one eye closed! I had given up reading at night and the final straw was getting lost up in Canada because I couldn't read any signs. Results were very good, but lots to think about before getting it done. Happy to talk about if you are interested.

Back to the originally scheduled program.
Title: Re: Break Edges Plugin
Post by: dh42 on August 12, 2017, 03:48:17 am
Hello Dave ;)

I just try the plugin for the first time and I get an error if no style is selected.

Also, maybe because I use 120% for text size in Windows settings (W7), I get a bad display in the plugin. (and the list of tools is not sorted by tool number)

++
David
Title: Re: Break Edges Plugin
Post by: dave benson on August 12, 2017, 07:13:14 am
Hi David
Here's a new one with more error checking and more translation and a few tooltips.

Dave

Edit Here's one that has a sorted tool list.

I don't know how to set the display to update for larger fonts, I'll have a look around.
Title: Re: Break Edges Plugin
Post by: dave benson on August 13, 2017, 01:29:34 am
HI All
Here's one that checks for an un-selected style as well as translations and hopefully automatically adjusts for different zoom levels.
I will leave this version at the first post as well.
Dave
Title: Re: Break Edges Plugin
Post by: dh42 on August 13, 2017, 01:55:27 am
Hello Dave

Thanks ;) I'll have a look tomorrow .. now it's bed time (Exceeded by 5 or 6 hours  ;D)

++
David
Title: Re: Break Edges Plugin
Post by: dave benson on August 13, 2017, 11:56:29 am
Hi All

While I was testing the plugin recently I discovered something that users of Camotics should be aware of when simulating their code (not just with this plugin but simulating in general).

I have my style and tool libraries organised like this:

End-mills in an End-mill library.
Drills in an Drill Library.
V cutters in an V cutter library. soon

And so, I can have an end-mill with the same tool number as a Drill from the Drill library.

However Camotics expects a unique number for each tool regardless of which tool library it's from
and won't simulate properly.

So if you are using Camotics to simulate your code then you must have a unique tool number for each tool regardless of which library it's in.

So I've written a small tool (separate plugin) to rename all of the tools in all of the tool libraries on my system and now the simulation works the way I expect it to.
Quote
Thanks Wink I'll have a look tomorrow .. now it's bed time (Exceeded by 5 or 6 hours  Grin)
There's no hurry, David whenever you can.
Dave
Title: Re: Break Edges Plugin
Post by: dh42 on August 13, 2017, 17:42:14 pm
Hello Dave

- it's a little better for texts size in horizontal direction but too few space in vertical direction ;(space between the objects)

- selected style (and library) say: (optional), but if select no style or no library the plugin won't.

- if you select a style library, then change for another (without closing the plugin window), each time you change the library, each time the styles of the library are added to the style list ; that cause an error if you select a style that do not match the selected library. (no pb with the tool lib)

- after the plugin as been run, the selected shape ID is not added to the created MOP

++
David
Title: Re: Break Edges Plugin
Post by: dave benson on August 14, 2017, 09:45:28 am
Hi David
This should do the trick.

Dave
Just found one more thing, if you are using centimeters or thousandths the plugin would not account for this + updated the versioning.
Title: Re: Break Edges Plugin
Post by: BR52 on August 14, 2017, 16:27:50 pm
Hello Dave,

Please can you provide the source code?
There are other people who will like it too.

   Armando
Title: Re: Break Edges Plugin
Post by: dave benson on August 24, 2017, 11:46:54 am
Changed the way mops are inserted into the doc.(the proper way) thanks ILspy.
Dave
Title: Re: Break Edges Plugin
Post by: BR52 on August 24, 2017, 16:25:36 pm
Hi Dave,

The reason for requesting the source code is to make comparison with DLL.
I'm making changes to the source code of ILSpy, to be more realistic!
I also use dnSpy.

   Armando
Title: Re: Break Edges Plugin
Post by: dave benson on August 27, 2017, 12:17:03 pm
No worries Amando, as soon as I get some time I"ll remove the references to the shapelists and post it.
I'm not sure what you mean by "more realistic" and would like to know more.

Dave
Title: Re: Break Edges Plugin
Post by: dave benson on September 05, 2017, 13:17:11 pm
David

I just got around to compiling the plugin for CB ver 1, and in doing so I thought I would import the .98 libraries into ver 1 so that I could use them as well.

However after the copy and pasting, I found that there are a few differences between the two versions of CB and not all information was not fully available to use in the ver 1 mops that the plugin created.

So I've had to do some reworking to be able to use those libraries as well.

Now what happens is that a Break edges “Part” is always created first, and the Break edges mop added to it.

This means that all the information is available in the mops, no matter where the Style libraries are from, older or newer versions of CB.

Dave
Title: Re: Break Edges Plugin
Post by: dh42 on September 06, 2017, 20:03:41 pm
Hello Dave ;)

Still error if style library or tool library is not selected.

not enough place for texts (vertically) and buttons

label texts are not translatable.

++
David

Title: Re: Break Edges Plugin
Post by: EddyCurrent on September 06, 2017, 20:28:22 pm
It's nice to see it's not only me who gets it in the neck  ;D ;D ;D
Title: Re: Break Edges Plugin
Post by: dh42 on September 06, 2017, 20:40:53 pm
 ;D
Title: Re: Break Edges Plugin
Post by: dave benson on September 07, 2017, 02:42:35 am
Dang, that'll teach me to rabidly cut and paste! ::).

I've added some checks for (when you have imported a library from .98 that the plugin inserts a default library
from ver1 and doesn't try to insert a default library from .98) which doesn't exist.

I've added a bit space to the form manually (don't know how to automatically do this) there must be a function and I'll have a look when I have some more time.

Dave



 
Title: Re: Break Edges Plugin
Post by: dh42 on September 07, 2017, 03:09:34 am
Hello Dave ;)

I don't know if you have changed the vertical size of the text boxes themselves in the form ; if not, so they are automatically resided as you can see on the picture. (the right picture is the one you give some message above, the left one, what I get with 125% for the general setting for the fonts)

If think that there is no function (in the form) that automatically set the vertical spacing between the boxes.

++
David
Title: Re: Break Edges Plugin
Post by: dave benson on September 01, 2018, 14:36:27 pm
HI All
I've been using the plugin, quite a bit lately and decided to make a few changes.

I've added a new input box so that you can cut higher up on the cutting edge of the tool, as I have some new counter sinks that have a small flat on the bottom and have to cut a mm or two further up on the cutting edge.

I've also added a check feature so that you can not select geometry at different Z heights inadvertently on busy drawings.
Fixed a bug in the imperial version.
Have taken into account the stock height from the geometry and inserted the geometry stock height in the mop.
Dave




 
Title: Re: Break Edges Plugin
Post by: dh42 on September 02, 2018, 17:08:14 pm
Hello

when updating the website, I just see that the plugin version has not been updated (still 1.0.0.6 when mouse is over the dll file)

and also the dll name has changed, maybe it can cause error if an user forgot to remove the old one. (Break Edges ver1.dll instead Break Edges.dll for the previous)

++
David
Title: Re: Break Edges Plugin
Post by: dave benson on September 02, 2018, 23:40:27 pm
Hi David
You're a Hard Task Master ;D Here you go.
I originally called it ver1 as it uses the .net 4 assemblies,(and won't run with CB.98)   just to differentiate it from the CB.98 version.
Dave
Title: Re: Break Edges Plugin
Post by: dh42 on September 03, 2018, 00:43:32 am
Hello ;)

Quote
You're a Hard Task Master Grin Here you go.

Yep  ;D ;D .. (15 years of working for Army .. )

I am confused ; I thought there was no version of the plugin for CB0.98 ... (on my website I said it's only for V1.0)
http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Break_Edges.html

I think I was wrong somewhere ...  ::)

what is the right version for the 0.98 ? I'll add to the site.

++
David

Title: Re: Break Edges Plugin
Post by: dave benson on September 03, 2018, 04:01:45 am
HI David
You are correct,there was a CB.98 version, But when I rewrote it for CB1.0, I used the same project and edited it
and re-complied it, so I'm afraid there is new version for Cb.98.
Dave
Title: Re: Break Edges Plugin
Post by: dave benson on September 23, 2018, 13:52:44 pm
HI David
I have been using the plugin quite a lot lately and have found and fixed another bug.
Here is the bug fixed version.
Dave
Title: Re: Break Edges Plugin
Post by: dave benson on April 18, 2020, 00:26:19 am
New Version compiled for _86 and_64
Dave