1. Hey guyz. Welcome to the All New Phlatforum!



    Sign Up and take a look around. There are so many awesome new features.

    The Phlatforum is a place we can all hang out and

    have fun sharing our RC adventures!

  2. Dismiss Notice

SANDBOX - Please post your PhlatscripT bugs

Discussion in 'SketchUcam Bugs' started by kram242, Jan 17, 2009.

  1. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    This section is for PhlatscripT bugs only if you find errors in the script please post here so that we can try to fix them.
    This is not the area to post new features you would like to see in the PhlatscripT.
    Please note as features and new PhlatscripTs are released with fixes. The relating post here will be deleted to keep this area up to date. Only the post related to the bugs in the latest version of the PhlatscripT will left here untill they are fixed.
    Thank you
    Phlatboyz
     
  2. meistertek

    meistertek Member

    Offline
    Messages:
    318
    Trophy Points:
    16
    Location:
    Chicago, IL
    First off the PhlatScripT plugin for SketchUp is awsome! I can't believe that we have come to a point in time where a free drawing program can generate g-code for a CNC machine, it's unbelivable. That being said however...
    Mark, How did you fix this problem to get the blue and red lines above, I would love to have my g-code files look like the one you show with the blue lines. I am pretty familiar with manually editing g-code, but the PhaltScripT g-code output is pretty long and tedious to edit.

    Another thing that is driving me nuts it the optimization of tool paths, how the heck do you group stuff in SketchUp to force the correct cutting order in the PhlatScripT CNC output and also prevent all the non-cutting moves that seem to be all over the place? I watched the PhlatScript video three times now and I cannot get tool paths with minimal non-cut moves.

    I attached an example CNC file that was output from PhlatScripT for you to see. This file is an attempt to just do some 50% depth cuts with an optimized too path. It's not bad but I would like to get it optimized to have minimal non-cutting moves and also show the blue and red lines. Once I get this code optimized, I'll add the rest of the code needed to cut the rest of the airplane out.


    Attached files stc layout1.cnc (1.6 KB)Â stc layout1.skp (68.3 KB)Â
     
  3. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    I don't know if it a bug, but lets say you have a part already grouped and you forgot to add tabs, if you open the group to add tabs it does not work. Instead you have to have it exploded. It will let you add inside or outside lines though.
    I don't remember if the old script was like this or not.
     
  4. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    That's a bug 3DMON but once you explode it then you should be able to add them and regroup. The downside to that is that I usually have to explode them all and redo all the grouping in the order I want because the one I forgot the tabs on was somewhere in the middle :) and in order to get it to jump to the piece I want it to that's what has to be done for now.
    Mark
     
  5. WW8S

    WW8S Member

    Offline
    Messages:
    44
    Trophy Points:
    6
    Location:
    Ohio
    Has anyone figured a way around this apparent bug in the Phlatscript? I only see this with the inside cut tool. I generally appears whenever you have an arc ending at a corner.


    Also, why can't I erase those edges, reconnect them to reclaim the face and using the RMB menu designate my new lines an Inside Phlatedge? The edge will change to the proper color, but then the whole face is skiped when generating the g-codes.


    If there is a way to "fix" this overshoot it sure is baffeling me. :cry:
    Dave

    EDIT:
    Mark pointed me to the best workaround I've found. Fillet the corner with a radius matching the bit radius you are using to cut the file. This prevents the "overshoot" error. It only seems to happen with acute angles. I've not found it to be a problem for angles equal to or greater than 90 degrees.
    Dave Attached files [​IMG] [​IMG]
     
  6. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    Something I've noticed with the new PhlatScripT_v911 that I never saw before is the "This model was created for the PP" logo in the lower right of the screen doesn't go away. I thought I remembered it would fade out on the earlier version, leaving a clear screen to design onto.
     
  7. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    WW8S... Just wanted to add that it isn't an error with the phlatscript. That is how sketchup deals with offsets. I would be nice to just erase those over shoot lines though.
     
  8. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    I don't get the watermark from the new script. I'm pretty sure you have that on there from downloading Marks template. You can change the watermark settings in the styles section.
     
  9. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    Okay 3DMON, I'll try it.
    Also, when I click on the "?" icon, nothing happens and when I click on "Tools" PhlatBoyz""Help" I get nuthin' again. I did find an help.html file in the . . .Google SketchUp 7ToolsPhlatboyz folder, but nothing seems to be linked to it.
    I have Sketch installed on my G: drive - I wonder if that's confusing the program.
     
  10. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Mine works fine. It takes me to the v910 though (Mark hasn't updated the help section yet on the site). Must be something on your end.
     
  11. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Brian's patch would not work with this version yet but Glenn told me that he will try to fix that as he can.
     
  12. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    So far, in the PhlatBoyzMenus.rb file, I found one section that deals with the Help file:

    if not $help_tool_loaded
    cmd = UI::Command.new($phlatboyzStrings.GetString("PhlatScript Help")) { open_help_file() }
    cmd.large_icon = "images/help_large.png"
    cmd.small_icon = "images/help_small.png"
    cmd.tooltip = $phlatboyzStrings.GetString("Open PhlatScript Help")
    cmd.status_bar_text = $phlatboyzStrings.GetString("Open PhlatScript Help")
    cmd.menu_text = $phlatboyzStrings.GetString("Help")
    #$phlatboyz_tools_submenu.add_separator
    $phlatboyz_tools_submenu.add_item(cmd)
    commandToolbar.add_item(cmd)
    $help_tool_loaded = true
    end

    I wonder if the second line {open_help_file()} should have "help.html" in the parenthesis? I don't see that it says where to find a help file.
     
  13. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Dorsal,
    Try it and see. Mine works though without having the .html added. I checked the script and it shows what yours shows. You may just want to delete and re-copy everything. Also are you putting these in the tools folder and not the plugins folder?

    Hope you figure it out. Nothing changed on the help file though.

    Shaun
     
  14. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    Shaun, is your Sketchup installed in the default directory on your C drive? I still think that's what confuses mine.
     
  15. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Yes it is.
     
  16. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    I wonder if your browser are blocking this file from coming up for some security reason?
    Mark
     
  17. bradm

    bradm New Member

    Offline
    Messages:
    1
    Trophy Points:
    1
    v912 does not work with SketchUp 6 or SketchUp 7 on MacOSX 1.5.x due to the bug that was fixed in http://forums.rcflightcast.com/viewtopic.php?f=5&t=259, described as:

    * Fixed get_safe_reflection_translation in PhlatboyzMethods.rb.
    Ambiguous argument specified confused interpreter.

    If not corrected, Gcode export of even a trivial single rectangular face gives an exception.

    That one line change, inserting the parens:

    origin = Geom::point3d.new( (2*x + w), 0, 0 )

    Should go into the next release please. It'll save some other newcomer from much, much frustration, reinstallation, and other silliness :)
     
  18. mrbubbs

    mrbubbs New Member

    Offline
    Messages:
    50
    Trophy Points:
    0
    Location:
    Kalamazoo, Michigan, US
    It looks like the help file path is hardcoded as ToolsPhlatboyz in the open_help_file method in the PhlatboyzMethods file. I guess that's why when I have the Phlatboyz stuff installed into the Plugins dir, I cannot get a help file.

    I remembered why I keep using the Plugins dir, it's because (I think) installing into Tools on Mac OSX prevents the Phlatboyz extension from loading... that may have changed with a newer version of Sketchup, though I was using some version of SU7 at the time anyway.

    Also, if you read Google's documentation on Ruby code, you'll see they recommend the Plugins path, as shown here:
    http://sketchup.google.com/download/rubyscripts.html
    and
    http://code.google.com/apis/sketchup/do ... nsion.html

    While I'm on the subject, is the "art" dir in the Phlatboyz dir essential? Is this a legacy thing or does this get generated when the buttons are created? Is it still needed?

    Not sure what the "Save" dir is for either, unless people are using that as their save path for Sketchup designs or gcode output?

    Just trying to eliminate some things that might confuse others from learning how the Phlatscript collection is laid out.
     
  19. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    I had a prob last night with the default spindle speed, not sure if this was a linux convert bug however, but I needed to re-type the value in for the script to work properly.
     
  20. mrbubbs

    mrbubbs New Member

    Offline
    Messages:
    50
    Trophy Points:
    0
    Location:
    Kalamazoo, Michigan, US
    I just exported some gcode and compared it to some original gcode output in the Ultimate Bipe .zip file from 7up. One of the notable differences was in the 5th line of each file:

    Ultimate 3D-1.cnc: (original gcode from zip file)
    M3 S15000

    gcode_out.cnc: (just generated today with Phlatscript v912)
    M3 Snil

    It looks like when the spindle speed is being set, the value is unavailable (nil is Ruby's way of saying "no value"). So for some reason, the value isn't making it through to the export. I don't know if this is the same problem you're speaking of...

     
  21. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    exactly what I had, failed to load g-code in EMC2...
     
  22. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    Open the Phlatboyz parameters settings first and then build your gcode.

    I believe this has been fixed in the next release.



     
  23. mrbubbs

    mrbubbs New Member

    Offline
    Messages:
    50
    Trophy Points:
    0
    Location:
    Kalamazoo, Michigan, US
    Ahh, known bug. Well then I'll just wait it out. Thanks for the tip!
     
  24. mrbubbs

    mrbubbs New Member

    Offline
    Messages:
    50
    Trophy Points:
    0
    Location:
    Kalamazoo, Michigan, US
    First of all, the easiest workaround would be to set the parameter in the Phlatboyz parameters settings before exporting your gcode, as Flashsolutions mentioned in the above post.

    If you're feeling adventurous, I think I've figured out why the spindle speed wasn't getting set...

    In the file PhlatMill.rb

    skip down to line 37 (or around there)

    if you don't have line numbers, just look for this line: (all on one line, the line below may appear wrapped in your browser)

    [pre]@Spindle_Speed = Sketchup.active_model.get_attribute $dict_name, $dict_Spindle_Speed , nil

    and change it to this: (all on one line, the line below may appear wrapped in your browser)

    [pre]@Spindle_Speed = Sketchup.active_model.get_attribute $dict_name, $dict_Spindle_Speed , $default_Spindle_Speed

    Feel free to copy/paste so you don't get any typos!

    If you're curious what's going on...

    Basically, that line says.. set the variable Spindle_Speed from whatever the user setup in the "Enter Phlatboyz Parameters" dialog configuration box. The nil part at the end is saying "if the variable isn't set, then set it to 'nothing' (nil)".

    But there's already a better fallback value for spindle speed we can use in the Constants.rb file, which is $default_Spindle_Speed, so that's what I changed to.

    Since this is apparently fixed in the next release, you could just wait for that as your change to this release may be different from the next version.

    Unfortunately, the current speed (@speed_curr, the so= value in move commands in the gcode) is set the same way and I tried to display its value when exporting some gcode and it didn't show a value, so I think it's the same deal. Also, @speed_plung is the same way. No idea why it's still named "plung", I thought my last patch fixed this unfortunate typo. :)

    If you're feeling doubly adventurous, then try changing the other undefined variables as such:

    In file PhlatMill.rb: (around line 40)

    find the line: (all on one line, the line below may appear wrapped in your browser)
    [pre]@speed_curr = Sketchup.active_model.get_attribute $dict_name, $dict_Feed_Rate , nil

    change to: (all on one line, the line below may appear wrapped in your browser)
    @speed_curr = Sketchup.active_model.get_attribute $dict_name, $dict_Feed_Rate , $default_Feed_Rate[/pre]

    then find the line: (all on one line, the line below may appear wrapped in your browser)
    @speed_plung = Sketchup.active_model.get_attribute $dict_name, $dict_Plunge_Feed , nil[/pre]

    change to: (all on one line, the line below may appear wrapped in your browser)
    @speed_plung = Sketchup.active_model.get_attribute $dict_name, $dict_Plunge_Feed , $default_Plunge_Feed[/pre]

    Hope that helps! If you do try it, let me know if it works for you or not. Perhaps you won't be able to get it to completely work yet in EMC2, but I'm pretty sure it's closer to working? :)
     
  25. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    Thank you mrbubbs, you are exactly correct. That is precisely what the next release has in it.
     

Share This Page