I've written some scripts that save and restore clipping plane levels and make working with clipping planes a bit easier. I've compiled them into a plug-in attached to this post.

Save the attached plug-in to a safe place on your computer, then drag and drop it onto Rhino. To make sure the install is saved have only one Rhino session running then close and restart Rhino. It's best to wait a while before restarting Rhino because it writes to the registry when it closes and it can corrupt the menus if you don't wait long enough all the info to be stored. If you've ever had problems with the UI it's probably because of this or shutting down your computer before Rhinos finished writing to the registry.


The commands are.

Ms_SetClip. This is similar to the madCAM set clipping planes. First it asks you to select the top and bottom level then you get a dialog where you can set an allowance, Tool Radius is the corner rad on ball and bull nosed cutters.

Ms_ReStoreClip. This is useful if you change the Stock box or reload the model and madCAM moves the clipping planes. Note this only works if you used one of my scripts to set the clipping planes.

Ms_StoreLastClip. If you run this command when a toolpath is created it stores the clipping plane state to the toolpath. Note only works if it's the first command run after generating a toolpath.

Ms_StoreClip. Works like Ms_StoreLastClip but asks you to select the toolpath to store the current clipping plane state to.

Ms_ReSetClip. Asks you to select a toolpath and if it has a clipping plane state stored it will reset to that state.

Ms_ReSetReCalc. Asks for a toolpath, resets the clipping planes and runs the MC_ReCalculate command, when the new toolpath has recalculated the clipping plane state is automatically stored to the new toolpath.

If any of the commands fail they should give an error to the command line, if not let me know and supply a simple example file.

I've emailed Joakim to make sure saving info to the toolpath group user text is ok and he doesn't see any problems.

I suppose I better put a disclaimer, use at your own risk. If the toolpaths look and simulate ok they should post ok.

Also here's an interesting video on madCAM scripting.
https://www.youtube.com/watch?v=7MoY...b14ju3_E-hKsXA

Mark.