Hello Guest it is April 23, 2024, 05:57:58 AM

Author Topic: Screen Set Ideas  (Read 184926 times)

0 Members and 1 Guest are viewing this topic.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Screen Set Ideas
« Reply #20 on: May 25, 2014, 07:28:38 AM »
That's fine. I'm not looking to copy code, just wanting to learn.
I don't know Lua, and don't have the time to learn it right now. I probably won't have time to get into it for another year or more.
I'm just trying to read every Mach4 post here and slowly get a basic Lua understanding, so that when I do have time, it might come a little easier..
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Screen Set Ideas
« Reply #21 on: May 25, 2014, 08:15:11 AM »
Craig,
Thank you and all the others for posting anything on Lua coding. The examples are mounting and at some point I will start
the "study" of info and comments to enlighten myself.  So whatever is posted sure is a help.

I am the kid that is crying and at the back of the ice cream line wondering if the shop will give me a 1/4 of a cone.    :D  :D
Qoute from a Godfather movie..........."Just want a little to wet my beak, surely you understand"   ;D

RICH
Re: Screen Set Ideas
« Reply #22 on: May 25, 2014, 08:23:43 AM »
No problem guys, a month or so ago I could not ever spell Lua  ::)

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Screen Set Ideas
« Reply #23 on: May 25, 2014, 09:34:41 AM »
I am at the point of still waiting on the beach, expecting a cooked in the earth pork product to be served. Are we in Hawaii? Isnt that what a Lua is? ;-)
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #24 on: May 25, 2014, 11:58:09 AM »
Quote
The code that Scott has written is fantastic for making it easier to address some of the tedious details.

thanks, I am glad someone is getting some benefit from that module!!

On Learning Lua....  From my own personal opinion.....   Tables are your friend! They are Crazy powerful and adaptable to all kinds of stuff. they are like a Container class, in which you can make tables (and tables within tables), act like a Class in a language that uses classes.  IMHO, "Modules" are a way to add "classes" to extend Lua.
For those wanting to learn Lua, it is WORTH you time to look at this website:

http://lua-users.org/wiki/SampleCode

Scott
fun times

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Screen Set Ideas
« Reply #25 on: May 25, 2014, 12:06:48 PM »
I've been programming in VB for 10-15 years, and still don't know what Classes are or how really to use them. :)
I learn what I need to know to get done what I need.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Screen Set Ideas
« Reply #26 on: May 25, 2014, 07:02:17 PM »
been working on a variables tab and noticed some inconsistencies, not sure if it is an issue with internal calculations or just a convoluted mix-up.
variable number on left
values on right

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Screen Set Ideas
« Reply #27 on: May 25, 2014, 08:41:53 PM »
Craigs a LOT of the #vars are set to machine corrds not work coords. Check that out first.

Just a thought, (;-) TP
Re: Screen Set Ideas
« Reply #28 on: May 25, 2014, 08:46:14 PM »
my point was they were out of sequence

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #29 on: May 25, 2014, 08:46:56 PM »
Can someone test this? I am trying to get and set of ToolPath colors... not having any luck, sometimes the set works, but mostly the Get will Crash the lua interpreter.
Can someone look over this code.

function TestFunc()
        local inst = mc.mcGetInstance();
        local rc = 0;
   local OldTopColor = 10485760;
   local OldBottomColor = 8404992;
   local rc = 0;
   
   rc, OldTopColor, OldBottomColor = mc.mcToolPathGetBackColor(inst);
   mc.mcToolPathSetBackColor(inst, 16777215, 0);
   --mc.mcToolPathUpdate(inst);
   mc.mcToolPathGetBackColor(inst, OldTopColor, OldBottomColor);
   --mc.mcToolPathUpdate(inst);
   local dummy = 0;  
end

if (mc.mcInEditor() == 1) then
    TestFunc();
end
fun times