I am able to generate gcode with inside and outside cuts. These seem to work fine. However, when I select fold or centre line - the lines selected change color, but do not seem to 'take' and do not assume the color. And any gcode generated does not include folds or centre lines. The depth of cut is set at 50% - at first I thought that the cut was 0% or something like that. Am using the latest version of Phlatscript on a mac with os x 10.5.8 and Sketchup Pro 7.1 Am not sure why I am able to select inside or outside cuts, but not the fold or centre line - any suggestions?
nwk I am not sure why this would be happening unless maybe you are missing some of the Phlatscript files? I do not have a mac and I really cannot be of much help here, maybe one of the mac guys or gasmasher can chime in? Thank you Mark
Yep, a ticket is needed. There are some slight differences in the way Ruby works on the Mac vs Windows. It really comes down to making sure everything is bracketed properly. If one of the Mac guys can open the Ruby Console window in Sketchup under the Windows menu and then perform the malfunctioning commands it will display the warnings. It can be copy and pasted here to make the debugging much easier since I don't have a Mac.
I have crated a ticket for this for future reference. Guys using Mac's please help Tim work on this by posting the needed code Mark
Hi All, I have got the fold and centre line options to work. I followed the topic kyyu referred to - viewtopic.php?f=100&t=1793 Basically on line 50 of the CenterLineTool file I changed "if (((flags & 1) == 1) && (@ph.do_pick(x, y) > 0))" to "if (flags & ALT_MODIFIER_MASK) && (@ph.do_pick(x, y) > 0)" Thank you all for your help. Regards, nwk.
I just posted to say someone else reported the problem, not necessarily that it was a solution. I'm not 100% sure what is going on in that phlatscript tool itself, but I checked on those statements and found this: ALT_MODIFIER_MASK = Command on Mac or Alt on PC, so not sure why one would add that. That key is not used, as far as I know, in Fold and centerline tool. Also, & is a bitwise comparison, so gives you a number back: So (flags & 1) = a number; and ((flags & 1) == 1) is true or false . The statement (flags & ALT_MODIFIER_MASK) should also return a number. So with the above mac solution: a true or false statement is now replace by a number. And alt modifier mask is used, when we don't use the alt key (for pc, command key for mac). Looking at what the flags are, I found a flags = 1 means "left mouse button down". So the statement ((flags & 1) == 1) is true if "left mouse button down". -Kwok
I guess what really should be said is; gasmasher is the main programmer updating the phlatscript. And in need of debug info, from a mac user with this problem:
Also not sure why the solution offered worked. But will (over the next few days) re-set to the old version, and report the errors. -nwk
Hi all, Here are the results - My parameters - speed 800 feed 100 plunge 100 material ~ 6.3mm In/outside 100 Bit ~ 6.3mm Tab ~ 6.3mm Depth 50 Length 42 Width 11 Multipass false multidepth 0.1 I re-set my centre-line tool rb file to the original version. My sketchup version is 7.1 and mac os 10.5.8 and the sketchup environment is set to mm. I have numbered the tests 1 thru 7. First I describe what I did, then display the ruby consol data and the gcode file. 1 - Drew rectangle > outside cut > phlatscript [pre]% (Generated by PhlatscripT {0.923}) (Bit diameter: ~ 6.3mm) (Feed rate: 100) (Material Thickness: ~ 6.3mm) (Material length: 558.8mm X width: 1066.8mm) (http://www.PhlatBoyz.com) G90 G20 G49 M3 S8000 Located 0 loops containing PhlatCuts Located 0 loops containing PhlatCuts Located 1 loops containing PhlatCuts G0 Z 0.050 X 2.686485 Y 2.835915 G1 Z -0.250 F 100 Y 7.900876 X 11.676643 Y 2.835915 X 2.686485 G0 Z 0.050 G0 X0 Y0 M05 G0 Z0 M30 % gcode file x1 > [pre]% (Generated by PhlatscripT {0.923}) (Bit diameter: ~ 6.3mm) (Feed rate: 100) (Material Thickness: ~ 6.3mm) (Material length: 558.8mm X width: 1066.8mm) (http://www.PhlatBoyz.com) G90 G20 G49 M3 S8000 G0 Z 0.050 X 10.813973 Y 8.343054 G1 Z -0.250 F 100 Y 14.435574 X 16.906493 Y 8.343054 X 10.813973 G0 Z 0.050 G0 X0 Y0 M05 G0 Z0 M30 %[/pre] 2 - Phlatscript delete tool - does not work, appears not to select anything. 3 - Delete eveyrthing except safe area with sketchup eraser. 4 - draw two plunge tool holes - does not seem to work well on screen, but gcode seems to work? (if I read the gcode correctly) ruby > Located 0 loops containing PhlatCuts Located 0 loops containing PhlatCuts gcode file x2 > % (Generated by PhlatscripT {0.923}) (Bit diameter: ~ 6.3mm) (Feed rate: 100) (Material Thickness: ~ 6.3mm) (Material length: 558.8mm X width: 1066.8mm) (http://www.PhlatBoyz.com) G90 G20 G49 M3 S8000 G0 Z 0.050 X 6.966152 Y 9.769580 G1 Z -0.250 F 100 G0 Z 0.050 X 11.843854 Y 5.465726 G1 Z -0.250 F 100 G0 Z 0.050 G0 X0 Y0 M05 G0 Z0 M30 %[/pre] 5 - drew a circle > phlatscript inside cut - works ruby > Located 0 loops containing PhlatCuts Located 1 loops containing PhlatCuts gcode file x3 > % (Generated by PhlatscripT {0.923}) (Bit diameter: ~ 6.3mm) (Feed rate: 100) (Material Thickness: ~ 6.3mm) (Material length: 558.8mm X width: 1066.8mm) (http://www.PhlatBoyz.com) G90 G20 G49 M3 S8000 G0 Z 0.050 X 4.176772 Y 8.010032 G1 Z -0.250 F 100 G17 G3 X 4.968659 Y 7.682022 Z -0.250000 R 3.284449 X 5.818457 Y 7.570144 Z -0.250000 R 3.284449 X 6.668256 Y 7.682022 Z -0.250000 R 3.284449 X 7.460143 Y 8.010032 Z -0.250000 R 3.284449 X 8.140151 Y 8.531821 Z -0.250000 R 3.284449 X 8.661939 Y 9.211829 Z -0.250000 R 3.284449 X 8.989950 Y 10.003715 Z -0.250000 R 3.284449 X 9.101828 Y 10.853514 Z -0.250000 R 3.284449 X 8.989950 Y 11.703313 Z -0.250000 R 3.284449 X 8.661939 Y 12.495199 Z -0.250000 R 3.284449 X 8.140151 Y 13.175207 Z -0.250000 R 3.284449 X 7.460143 Y 13.696996 Z -0.250000 R 3.284449 X 6.668256 Y 14.025006 Z -0.250000 R 3.284449 X 5.818457 Y 14.136884 Z -0.250000 R 3.284449 X 4.968659 Y 14.025006 Z -0.250000 R 3.284449 X 4.176772 Y 13.696996 Z -0.250000 R 3.284449 X 3.496764 Y 13.175207 Z -0.250000 R 3.284449 X 2.974975 Y 12.495199 Z -0.250000 R 3.284449 X 2.646965 Y 11.703313 Z -0.250000 R 3.284449 X 2.535087 Y 10.853514 Z -0.250000 R 3.284449 X 2.646965 Y 10.003715 Z -0.250000 R 3.284449 X 2.974975 Y 9.211829 Z -0.250000 R 3.284449 X 3.496764 Y 8.531821 Z -0.250000 R 3.284449 X 4.176772 Y 8.010032 Z -0.250000 R 3.284449 G0 Z 0.050 G0 X0 Y0 M05 G0 Z0 M30 % 6 - Tab tool Draw square > draw line across Try to select line with fold tool fails delete line across > select outside cut > draw line accross > fail to select ruby> Located 0 loops containing PhlatCuts Located 0 loops containing PhlatCuts Located 0 loops containing PhlatCuts Gcode file x4 [pre]% (Generated by PhlatscripT {0.923}) (Bit diameter: 0.248031496062992) (Feed rate: 100) (Material Thickness: 0.248031496062992) (Material length: 0.866141732283465 X width: 1.65354330708661) (http://www.PhlatBoyz.com) G90 G20 G49 M3 S8000 G0 Z 0.050 G0 X0 Y0 M05 G0 Z0 M30 % Fails to draw anything because safe area now 42mm by 22mm changed itself? I am drawing mm. change parameter safe area to 1000 x 1000 (do not specify units) ruby > Located 0 loops containing PhlatCuts Located 0 loops containing PhlatCuts Located 1 loops containing PhlatCuts gcode file x5 > [pre]% (Generated by PhlatscripT {0.923}) (Bit diameter: 0.248031496062992) (Feed rate: 100) (Material Thickness: 0.248031496062992) (Material length: 39.3700787401575 X width: 39.3700787401575) (http://www.PhlatBoyz.com) G90 G20 G49 M3 S8000 G0 Z 0.050 X 9.978671 Y 8.263304 G1 Z -0.248 F 100 Y 14.042831 X 14.829065 Y 8.263304 X 9.978671 G0 Z 0.050 G0 X0 Y0 M05 G0 Z0 M30 %[/pre] 7 - Try centre line tool - it does not select - seems same as fold tool. ruby > Located 0 loops containing PhlatCuts Located 0 loops containing PhlatCuts Located 1 loops containing PhlatCuts gcode file x6 > % (Generated by PhlatscripT {0.923}) (Bit diameter: 0.248031496062992) (Feed rate: 100) (Material Thickness: 0.248031496062992) (Material length: 39.3700787401575 X width: 39.3700787401575) (http://www.PhlatBoyz.com) G90 G20 G49 M3 S8000 G0 Z 0.050 X 9.978671 Y 8.263304 G1 Z -0.248 F 100 Y 14.042831 X 14.829065 Y 8.263304 X 9.978671 G0 Z 0.050 G0 X0 Y0 M05 G0 Z0 M30 %[/pre] To re-cap. a) There outside and inside cuts work ok. b) There is some confusion about mm and inches. c) The fold, centreline and eraser tools do not select. d) The plunge seems to work this time, but previously I had not been able to get it to work. Let me know if you what me to try anything else - screen shots etc. (quite easy on a mac, but not so easy to display on this forum?) Regards, nwk.
Nice job nwk! thank you so much for your help BTW I added the code in code quotes for easy reading Hope that you do not mind. Thanks again Mark