Plugin documentation?

Request and discuss new features
Post Reply
robertspark
Posts: 50
Joined: Thu Feb 26, 2015 12:11 am

Plugin documentation?

Post by robertspark » Sun Sep 02, 2018 12:17 pm

Les, I was wondering if there was any documentation on (attempting ;) ) to create user plugins?

:roll:
{Famous last words.... How complicated can it be.... } :lol:

User avatar
Les Newell
Site Admin
Posts: 2085
Joined: Thu May 11, 2006 8:12 pm

Re: Plugin documentation?

Post by Les Newell » Mon Sep 03, 2018 10:50 am

Unfortunately there isn't much. What do you want to do and how much programming experience do you have?

Les

robertspark
Posts: 50
Joined: Thu Feb 26, 2015 12:11 am

Re: Plugin documentation?

Post by robertspark » Mon Sep 03, 2018 7:19 pm

Hi Les, I've been mainly curious, occasionally there is something I want to have a go at trying (uccnc export directly plugin (similar to the mach3 one))

I am not a programmer, pcs are a non paying hobby (as is CNC), I've done bits of programming with c, c++ (Arduino processing), c# (uccnc, macros and plugins), Lua (sheetcam mach4), visual basic , cypress VB (mach3), and bits with Linux , raspberry pi, linuxcnc etc

Never done basic, Fortran or assembly, not likely to either...

I dabble,

paid job as consulting engineer

User avatar
Les Newell
Site Admin
Posts: 2085
Joined: Thu May 11, 2006 8:12 pm

Re: Plugin documentation?

Post by Les Newell » Tue Sep 04, 2018 1:45 pm

There are two types of plugin. Lua plugins have access to most of SheetCam's internal data and have some documentation. C++ plugins have access to pretty much everything but are difficult to set up and have very little documentation.

The Mach plugin uses a mix of Lua and C++, mainly because the Mach communication was easier in C++. You should be able to do what you want with a mix of Lua on SheetCam's end C# on the UCCNC end. The worst bit will be the inter process communication. Probably sockets would be the easiest route. SheetCam comes with wxLua http://wxlua.sourceforge.net/ so you have access to all of the functionality in wxWidgets https://www.wxwidgets.org/. If you look in SheetCam's installation directory you should find a folder called SDK. The .i files in there are wxLua interface files and they describe teh SheetCam internal classes that are available to Lua.

I have been working on a sort of universal version of the Mach plugin that will be able to work with a range of controllers including LinuxCNC, Mach and pretty much any other controller that can has a C++ compatible API. It comes as two parts - a server that runs as a plugin for the controller and a client that runs in SheetCam. The communications and server side uses a permissive open source license and can be seen here <https://github.com/sheetcam/CNCRemote>. This is a bit of a side project so development is pretty slow at the moment. The LinuxCNC server is the most complete example of a server at the moment.

Post Reply