Error starting a script in MeshCAM 6 Pro

General MeshCAM Art Questions

Error starting a script in MeshCAM 6 Pro

Postby ArchieF » Fri Feb 28, 2014 7:56 pm

Hi all,

tried to start a script (*.mcs) created with MeshCAM 5 Art in MeshCAM 6 Pro but get an error (see attached screenshot)

Anybody has the same issues ? Not backwards compatible perhaps or something missing ?

This is the script :

mc.CreateReliefDocument(1)
mc.doc.SetInch()

ret = mc.doc.relief.AddLoad([[M:\PillowTransparentDrawPlus.png]],mc.Inch,15,0.1,-1,0)
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddFlatten()
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddShape(mc.Curved,60,0,mc.NoAdjustment,0,mc.Add,[[(255,000,000)(128,000,000)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddShape(mc.Curved,70,0,mc.NoAdjustment,0,mc.Add,[[(000,000,128)(000,000,255)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddShape(mc.Curved,50,0,mc.NoAdjustment,0,mc.Add,[[(000,255,000)(128,128,000)(000,128,000)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end


So I tried to start the same script in MC 6 PRO . But already the first color to shape took more than 70 mins while Mc 5 Art needed 3 mins to calculate.
Looks like something has changed ?

Thanks,

Richard
Attachments
Lua error.jpg
Screenshot
Lua error.jpg (43.88 KiB) Viewed 2857 times
AMD Athlon II X2 215 Processor 2.7 GHz

4 GB RAM

Don't waste water - dilute it !
ArchieF
 
Posts: 195
Joined: Wed May 14, 2008 5:03 am
Location: Germany, Rehau

Re: Error starting a script in MeshCAM 6 Pro

Postby ArchieF » Sat Mar 01, 2014 9:34 pm

This is a screenshot of the result in MC 5 Art. Took about 5 mins to calculate in 15 in x 15 in size.

Using MC 6 PRO every shape takes about 80-90 mins.

What has changed ?

Attached the source bitmap and a screenshot of the result

Richard
Attachments
PillowTransparentDrawPlus.png
PillowTransparentDrawPlus.png (28.23 KiB) Viewed 2849 times
PillowScreenshot.jpg
PillowScreenshot.jpg (333.92 KiB) Viewed 2849 times
AMD Athlon II X2 215 Processor 2.7 GHz

4 GB RAM

Don't waste water - dilute it !
ArchieF
 
Posts: 195
Joined: Wed May 14, 2008 5:03 am
Location: Germany, Rehau

Re: Error starting a script in MeshCAM 6 Pro

Postby Randy » Sun Mar 02, 2014 2:33 am

Richard, all I can say is to email Robert and ask. I have no experience with scripting myself. Is there a difference in calculation time if you set up your image manually?

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: Error starting a script in MeshCAM 6 Pro

Postby ArchieF » Sun Mar 02, 2014 11:19 am

Hi Randy,

I set it up manually and MC writes parallel a history I can edit or save (the button looking like a snake for those who never done this).

So I have no way to change the calculation times.

Gonna ask Robert.

Thanks,

Richard
AMD Athlon II X2 215 Processor 2.7 GHz

4 GB RAM

Don't waste water - dilute it !
ArchieF
 
Posts: 195
Joined: Wed May 14, 2008 5:03 am
Location: Germany, Rehau

Re: Error starting a script in MeshCAM 6 Pro

Postby Randy » Mon Mar 03, 2014 4:16 pm

OK, Richard, I saved your png and built the shape by hand and saved and ran the resulting script in MC6 build 5 on my XP64 machine (nothing special--4 year old 3GHz Core2 Duo with 4GB of RAM). It took 10 seconds.
pillow.jpg
pillow.jpg (249.48 KiB) Viewed 2840 times


Here is the script

Code: Select all
mc.CreateReliefDocument(1)
mc.SetInch()

ret = mc.AddLoadOperation([[D:\PillowTransparentDrawPlus.png]],mc.Inch,15,0.1,-1,0)
if ret == 0 then
   mc.MessageBox("Error adding operation")
   exit()
 end
ret = mc.AddFlattenOperation()
if ret == 0 then
   mc.MessageBox("Error adding operation")
   exit()
 end
ret = mc.AddShapeOperation(mc.Curved,60,0,mc.NoAdjustment,0,mc.Add,[[(255,000,000)]])
if ret == 0 then
   mc.MessageBox("Error adding operation")
   exit()
 end
ret = mc.AddShapeOperation(mc.Curved,70,0,mc.NoAdjustment,0,mc.Add,[[(000,000,255)]])
if ret == 0 then
   mc.MessageBox("Error adding operation")
   exit()
 end
ret = mc.AddShapeOperation(mc.Curved,51,0,mc.NoAdjustment,0,mc.Add,[[(000,255,000)]])
if ret == 0 then
   mc.MessageBox("Error adding operation")
   exit()
 end

Comparing my new script with your older script, it does look like Robert changed how things are called. "mc.doc.relief.AddLoad" is now "mc.AddLoadOperation" and so forth.

But if you are talking about just generating the shape, and not generating gcode from the shape, and it is taking so long, I think that something is not right with your installation...

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: Error starting a script in MeshCAM 6 Pro

Postby ArchieF » Mon Mar 03, 2014 5:33 pm

Okay Randy,

did a complete uninstall and reinstallation of MC 6 without success. Same slow calculations.

Don't know what to do.

Richard
AMD Athlon II X2 215 Processor 2.7 GHz

4 GB RAM

Don't waste water - dilute it !
ArchieF
 
Posts: 195
Joined: Wed May 14, 2008 5:03 am
Location: Germany, Rehau

Re: Error starting a script in MeshCAM 6 Pro

Postby Randy » Mon Mar 03, 2014 6:13 pm

Maybe it is an AMD vs. Intel processor thing? I don't have any non-Intel machines to try. Maybe my wife's laptop--I'll look at that when I get home from work tonight.

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: Error starting a script in MeshCAM 6 Pro

Postby ArchieF » Tue Mar 04, 2014 5:08 pm

Maybe it is an AMD vs. Intel processor thing?


Nope !

Installed MC 6 on a laptop at work with an Intel dualcore cpu. Same slow calculations.

No more idea. Runtime libraries perhaps ? But they come with the installation . Weird .

Richard
AMD Athlon II X2 215 Processor 2.7 GHz

4 GB RAM

Don't waste water - dilute it !
ArchieF
 
Posts: 195
Joined: Wed May 14, 2008 5:03 am
Location: Germany, Rehau

Re: Error starting a script in MeshCAM 6 Pro

Postby Randy » Tue Mar 04, 2014 9:13 pm

Richard, I am trying the script on the Win7 64-bit machine at work (2.13GHz Intel Xeon, 12GB memory). It has been 45 minutes and the progress bar is less than halfway across--alternating between "Analyzing Region" and "Shaping Region". I wonder what is different about my XP64 installation at home?

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: Error starting a script in MeshCAM 6 Pro

Postby ArchieF » Wed Mar 05, 2014 12:43 pm

Randy,

tried the following : I renamed all 3 msv* files coming with the installation and started MC 6. The program worked but slow.

So I downloaded and installed the latest vc redistributables x64-12.0.21005 .

No success. No change.

Played around with the two versions and the sample file rosette-pro.png

MC 5 generates the shapes in 21 secs

MC 6 needs 15 mins for the same task

Here are the two scripts :

For MC5 :
mc.CreateReliefDocument(1)
mc.doc.SetInch()

ret = mc.doc.relief.AddLoad([[C:\Program Files\MeshCAM5\sample files\rosette-pro.png]],mc.Inch,6,0.1,-1,0)
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddFlatten()
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddShape(mc.Curved,39,0,mc.NoAdjustment,0,mc.Add,[[(127,000,255)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddShape(mc.Curved,19,0,mc.NoAdjustment,0,mc.Add,[[(048,000,255)(000,097,158)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddShape(mc.Curved,26,0,mc.NoAdjustment,0,mc.Add,[[(158,176,000)(206,079,097)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddShape(mc.Angled,19,0,mc.NoAdjustment,0,mc.Add,[[(000,255,000)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.doc.relief.AddShape(mc.Angled,28,0,mc.NoAdjustment,0,mc.Add,[[(255,000,000)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end


and for MC6 :
mc.CreateReliefDocument(1)
mc.SetInch()

ret = mc.AddLoadOperation([[C:\Program Files\MeshCAM6\sample files\rosette-pro.png]],mc.Inch,6,0.1,-1,0)
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.AddFlattenOperation()
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.AddShapeOperation(mc.Curved,39,0,mc.NoAdjustment,0,mc.Add,[[(127,000,255)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.AddShapeOperation(mc.Curved,19,0,mc.NoAdjustment,0,mc.Add,[[(158,176,000)(206,079,097)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.AddShapeOperation(mc.Curved,26,0,mc.NoAdjustment,0,mc.Add,[[(048,000,255)(000,097,158)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.AddShapeOperation(mc.Angled,19,0,mc.NoAdjustment,0,mc.Add,[[(000,255,000)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end
ret = mc.AddShapeOperation(mc.Angled,28,0,mc.NoAdjustment,0,mc.Add,[[(255,000,000)]])
if ret == 0 then
mc.MessageBox("Error adding operation")
exit()
end


Richard
AMD Athlon II X2 215 Processor 2.7 GHz

4 GB RAM

Don't waste water - dilute it !
ArchieF
 
Posts: 195
Joined: Wed May 14, 2008 5:03 am
Location: Germany, Rehau

Next

Return to General

cron