Author Topic: Trochoidal Pocket & Profile MOPs plugin (HSM)  (Read 174712 times)

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Trochoidal Pocket & Profile MOPs plugin (HSM)
« on: November 18, 2016, 12:19:45 pm »
Version 2.0 adds support for the Profile MOP in addition to the Pocket MOP - now there is two MOPs in one dll.
Binary was renamed from 'trochopock.dll' to 'trochomops.dll'.
Make sure to delete trochopock.dll before upgrading.

Old text follows:
___

While my machine is being offline, I've spend a few nights finishing the trochoidal pocket plugin mop
(started here: http://www.cambam.co.uk/forum/index.php?topic=6088.0).

It's a preview version, some gremlins are hiding inside for sure )

The generated toolpaths are some kind of HSM peeling. Pocket is opened with the expanding flat spiral, followed by a number of trochoidal slices. Slices are rolling along the branches of underlying tree, covering the whole pocket.

Plugin is done as a new kind of MOP, so usage is straightforward - pick polylines and go, just as for the usual Pocket MOP )

MOP-specific parameters:
 Chord Feedrate - feedrate for the slices chords.
   Also applies to the movements inside the pocket. Plugin tries to eliminate most of Z movements,
   so there would be some moves inside the milled area.
   If 0 use cutting feedrate.
 
 Minimum stepover.
  Plugin tries hard to keep the specified stepover all the time. This may result in undercut corners.
  Use this parameter to relax stepover requirements.

 Return to base
  Try to approach the start of the next depth level without z-movements

 Spiral feedrate
   The feed rate to use for the spiral opening the pocket. If 0 use cutting feedrate.

 Smooth chords
   Connect slices with the smooth arcs where possible, forming a continuous curve. On some machines it may
work better than 'D' shapes, accounting for the acceleration limits.

 Show chords
   Display chords after the toolpath is generated. Turn on to add a lot of clutter to view or for the sake of curiosity.

A few quicks:
Do not use transform on mop, results may be unpredictable. Mop transform parameter is disabled.
Part nesting won't work
Manual startpoint is working, but don't use it if there are a multiple pockets in mop.

Plugin is experimental, use it with care. Bugs are expected. Simulation and/or air cutting are recommended.
I didn't try it on a real hardware yet :-)

Note: toolpaths are started from a straight plunge now. Make sure cutter will tolerate it or open entry with a drill.
__

Version 2.0 adds support for the Profile MOP. It uses the same slice-generating code as the Pocket MOP and share
the same parameters except the Minimum stepover.
Profile-specific parameters:

Cut Width
  It's the same as in conventional profiling, but controls the radius of slices. Default cut width (0) means width = 2 * tool diameter.

This profile MOP is kind of limited - it does no collision detection, toolpath joining and ordering, no support for the holding tabs, toolpaths may overlap, etc. But should be useful enough for the basic profiling.
___

Source code:
https://github.com/jkmnt/matmill

Latest version dlls for CamBam 0.9.8 and 1.0 are attached below.

Previous versions are available at
https://github.com/jkmnt/matmill/releases

__
v2.4.0
* matrix transform of the generated toolpaths is allowed now

v2.3.0
* using the triangle.net Voronoi partitioning code - should be much more robust ! this version is CB1.0+ only

v2.1.2
* a lot of fixes for wide-angle slices - completely missed slices, wrong entry TEA calculation etc
* special handling for circular pockets
* each slice is made from two arcs now

v2.1.1
* fix for the extra wide-angle slices collapsing in some cases (see post http://www.cambam.co.uk/forum/index.php?topic=6209.msg52196#msg52196)

v2.1.0
* profile mop with roughing clearance = -cut_width / 2 is treated like engrave (path is followed exactly)
* precise choice of profile start point for closed polylines, not limited to the knots
* spirals spacing are calculated to better match TEA
* tangent lead-ins for profiles are tangent to the original curve now (as in normal profile)
- 'return to base' option is removed proved useless
* fixes

v2.0.1
* fix for duplicate icons in translated version with CAMToolbarAddins plugin installed

v2.0
* massive internal refactoring
+ profile MOP based on the same slice code

v1.4
+ 'smooth' chords option
+ machining time estimation
+ small 3 degree lead-in on slices to prevent the cutter hitting the wall
+ optional display of chords after the toolpath generation
- removed 'segmented slices derating' option. calculated automatically now
+ new bugs
* various fixes

v1.3.2
* fixes for the incomplete pockets in some symmetric cases

v1.3.1
* fixes for some complicated shapes

v1.3
* new tool engagement estimator, true angle of engagement is analyzed
* change of the way feedrates are passed to the CB g-code generator
* fix for compatibility with older version of CB libraries (used in Linux version)
* setting for the feedrate of opening spiral
* mop-specific feedrates are now default to 0 (means 'use cut feedrate') to be consistent with other feedrates in  CB
* fixes

v1.2
* standard lead-ins are implemented
* nesting is working now
* vairous fixes

v1.1
* +mixed mill direction
* fix for the duplicate toolbar icon
* fix for imperial units

v1.0
* initial version
« Last Edit: August 16, 2018, 18:10:15 pm by jk »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5262
  • Made in England
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #1 on: November 18, 2016, 12:49:24 pm »
Very impressive work, I like it !
One request, it would be great if 'Mixed' milling direction was working.
Filmed in Supermarionation

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3355
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #2 on: November 18, 2016, 16:03:20 pm »
It sure looks like a winner from my vantage point. Looking forward to try it one day..
Keep up the good work. :D ;D
My 2ยข

Win11, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, 4th Axis, Endurance Laser.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #3 on: November 18, 2016, 21:00:47 pm »
Hello

Very nice job !! thanks for this plugin  ;D

++
David

Online pixelmaker

  • CNC Jedi
  • *****
  • Posts: 1967
    • View Profile
    • pixelmaker
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #4 on: November 18, 2016, 22:21:53 pm »
Thank you for this plugin. I like it.
I get two times the same icon in the toolbar

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #5 on: November 18, 2016, 23:11:54 pm »
Hello Ralf,

Ah !, you are using the "Custom Cam Toolbar"

Works Ok for me with the "regular" toolbar, so its look like an incompatibility with the 2 plugins.

++
David

Offline chschmit

  • Ewok
  • *
  • Posts: 1
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #6 on: November 19, 2016, 16:16:01 pm »
Thank you for creating this plug-in. It's the first real attempt at creating an alternative to standard pocket milling.

I tried to recreate your test geometry and run the plug in, but I get a TrochoPock warning: failed to attach branch. So I further simplified the geometry to be just a rectangle with two circles inside of it. I still get the same error.

I'm running in inches, but I did try it in metric since that has been a problem in some plug-ins in the past.

Can you take a look at my CB file and provide any insight as to why its not working? I tried changing some of the settings specific to this plug-in and did see some minor changes in the tool path but it was again incomplete and still resulted in a warning.

« Last Edit: November 22, 2016, 19:37:33 pm by chschmit »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7408
    • View Profile
    • Cambam V1.0 French Doc
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #7 on: November 19, 2016, 18:34:18 pm »
Hello,

I tried your example ; not working in inches, but if converted in mm it works ...

++
David

Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1612
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #8 on: November 20, 2016, 14:23:28 pm »
Same here.  I work only in inches, so will try again if inch issue is resolved.

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #9 on: November 21, 2016, 07:19:46 am »
Thank you, guys. Can't wait to have my machine online again and try these toolpaths for real.
Got some hope it allows coolant-free alu pocketing.

Mixed milling direction (alternating slices direction) will come soon.
Maybe the duplicate icons bug will be fixed too.
I'll look the inch issue, probably plugin decides cutter can't pass thru channel too early and gives up.

Next planned feature would be the vertical spiral entry instead of plunge to save on toolchanges.
The MOP is implemented in a somewhat hacky way, so I can't use a built-in CamBam's lead-in code.

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #10 on: November 21, 2016, 16:38:29 pm »
Updated first post with v1.1

+mixed mill direction
fix for the duplicate toolbar icon (workaround for 'Custom CAM toolbar' activities)
fix for imperial units (maybe ... at least it should bug the same way as metric now :-)

Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1612
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #11 on: November 21, 2016, 22:13:21 pm »
Tried new version.  Much better on my test pocket, at least in software.  Two issues I see.

1) Won't let me set minimum stepover < .1.

2) The tool path can't cross an "opening" less than the tool + the minimum arc radius.  This means that for my test pocket I'd need a finish profile MOP.


Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #12 on: November 22, 2016, 12:25:05 pm »
kvom,

Minimum stepover is intentionally limited to range 0.1 ... 09, otherwise algorithm will stuck.
Note, the number is not the stepover as is, it's a percentage from normal cut stepover, so
0.1 means slices with stepover as low as 10% from normal are allowed.

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #13 on: November 23, 2016, 17:56:23 pm »
Updated first post with the version 1.2

*standard lead-ins are implemented
*nesting is working now
*various fixes

Offline newlinuxuser

  • Droid
  • **
  • Posts: 96
    • View Profile
Re: Trochoidal Pocket MOP plugin (HSM)
« Reply #14 on: November 23, 2016, 23:33:25 pm »
Hello jk, sorry for my bad english.

In my opinion this is a very interesting plugin, and until the release 1.1 there was no problem with the linux version of cambam (the only version I use).

But the newest release 1.2 not works: the plugin is not loaded, it show an error and nothing appears on the bar.

Now I had to downgrade the plugin, with the hope in the future that maintains compatibility with linux again.  :)

Thanks for your work,

Best regards

Andrea

The error shown is: "The classes in the module cannot be loaded"
« Last Edit: November 23, 2016, 23:47:34 pm by newlinuxuser »