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

Phlatscript on Mac OS X *almost* working

Discussion in 'SketchUcam Help' started by k4dsp, May 1, 2011.

  1. k4dsp

    k4dsp New Member

    Offline
    Messages:
    4
    Trophy Points:
    0
    Hi all,
    I'm new to Sketchup and new to Phlatscript, at least on the Mac. I have it working well under Windows XP. On the Mac I get the Phlatscript toolbar, and I can select some of the tools, but the Parameters tool does not work, and the Safe Area tool does not work properly. When I select Parameters I get a completely blank window with no text boxes. If I click away from this window and come back the text boxes are there, but the script does not seem to use any of the values I enter. I can tell the script to generate G code, but nothing is found to process (Ruby console reports zero loops) so all I get is a cnc file with the G20 G90 etc. header and nothing else.

    I've confirmed this behavior on Sketchup 7.1 and 8.0 on two different machines running Mac OS X 10.6. Has anyone else seen this, and does anyone have Phlatscript working properly under OS X?

    I'm not well versed in Ruby, but I'm competent with C and similar languages, so I'm willing to dive in and try stuff if anyone has something to suggest.
     
  2. navionflyer

    navionflyer New Member

    Offline
    Messages:
    220
    Trophy Points:
    0
    Location:
    Richland, MI
    I had difficulties with the Phlatscript on my Mac as well and have resorted to drawing on the Mac in Sketchup and then using the XP computer that runs my Phlatprinter for the Phlatscript.

    I don't program so I'm not much help, but I can help test. kyyu (Kwok) is probably the person you want to converse with on mods.

    Tim
     
  3. k4dsp

    k4dsp New Member

    Offline
    Messages:
    4
    Trophy Points:
    0
    Thanks, Tim. I dug into the Ruby code tonight and figured out what was going on.

    For those running Mac OS X, if you have a problem with the Parameters window coming up blank you can fix it by editing the file Constants.rb in the Phlatboyz directory and changing the line:

    $use_compatible_dialogs = false
    to
    $use_compatible_dialogs = true

    Once I did this the Parameters window displayed correctly, the values were used by the scripts, and I was able to generate the correct G code from a drawing I did in Sketchup 8.

    Doug
     
  4. iGull

    iGull Member

    Offline
    Messages:
    53
    Trophy Points:
    8
    Location:
    Edinburgh, Scotland
    Hi

    I've been using phlatscript on OSX for a long while now - there are actually MANY more issues than just the web dialogs to fix.
    Between Kwok [kyyu] and myself, we've managed to sort out just about all the Mac problems (apart from web dialogs curiously , never got to the bottom of that - it IS a mac issue 'though - it IS working, but it doesn't refresh instantly) - the rest works really well as far as I can see. I've been too busy building and flying to do any software as it's "summer" here in Scotland :D
    I have no problem drawing stuff in SU on the Mac then firing the Gcode across to my CNC using DeskCNC on the PC (spit :) ).

    I'm hoping Kwok will jump in here and tell me that there is a new version of the Phlatscript/SketchUcam with all the Mac mods in available soon at Mac near you ??

    I'm not using the phlatscript with a Phlatprinter, but with an overhead gantry CNC and it works REALLY well (except for the fact that the CNC is attached to a PC of course :lol: )

    If you're desperate, I can probably PM my version of things until the 'official' version is out - hopefully not standing on any toes here :p )

    Cheers

    Neil
     
  5. k4dsp

    k4dsp New Member

    Offline
    Messages:
    4
    Trophy Points:
    0
    Neil,

    Thanks for the kind offer. If nobody objects I'd appreciate receiving your version.

    Thanks again,
    Doug
     
  6. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    All that mac stuff, iGull and I worked on is now in the repository. So it will be there when the powers that be, release the next version. Even got rid of all the letter keys for you, iGull. :) And a few extra touches, like scrolling the present values both ways.

    I am not really the developer. Just someone who recently taught himself ruby and programming. I plan to work on my own personal version of the phlatscript, that can evolve at my whim.

    If any of you mac guys, with programming experience, want to try to figure out why the parameter web dialog doesn't work, go for it. Right now mac users have to use an input box instead of web dialog, which isn't as nice.

    -Kwok
     
  7. iGull

    iGull Member

    Offline
    Messages:
    53
    Trophy Points:
    8
    Location:
    Edinburgh, Scotland

    Nice one Kwok - thanks !


    :dance3: Maybe someday you can aspire to be a Mac user too :dance3:

    I had a good look at the web dialogs issue previously and it certainly seems to be a system level thing - I've tried various hacks , but just cannot get the dialog to refresh when called.
    As soon as a subsequent foreground activity occurs, bang - the dialog refreshes in the background. I HAVE seen similar things happening in RealBasic (or RealStudio as they like to call it now) so it may not be a SU thang.

    I haven't done anything recently in Ruby as I'm too busy building and flying (and looking after grandkids) :lol:

    I think the SU folks may need to get involved in this one.

    Cheers
    Neil
     
  8. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
  9. k4dsp

    k4dsp New Member

    Offline
    Messages:
    4
    Trophy Points:
    0
    Kwok mentioned a repository - is there a git or SVN repository somewhere with the work-in-progress code? I'd like to help with the Mac stuff, or at least become more familiar with the code, but I'd like to take advantage of the latest stuff. Can someone provide a link?
    Thanks,
    Doug
     
  10. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Hi Doug, thanks for your interest and for offer to help :good:
    There is a repository set up and we are working on making this more integrated into the Phlatscript/SketchUcam section of the forum so that everyone can help and work on new features that can be put into the main code once tested by the guys here.
    We should have something very soon for you guys to check out.
    Thanks again
    Mark and Trish
     
  11. meemer

    meemer New Member

    Offline
    Messages:
    1
    Trophy Points:
    0
    Hi there,

    Being new to Phlatscript, can someone point me to where the MacOS Phlatscript plugin for sketchup ended up?

    Thanks much,
    M
     
  12. NeilBlanchard

    NeilBlanchard Member

    Offline
    Messages:
    206
    Trophy Points:
    18
    Location:
    Maynard, MA, Eaarth
    I'm using it in v8 Pro with OSX 10.6, and it seems to be fine.
     
  13. Orion13

    Orion13 Member

    Offline
    Messages:
    33
    Trophy Points:
    6
    I am having the same trouble with a blank parameter screen with OSX 10.8.4 running Sketchup 8 and the latest Sketch U cam off the site. I've tried turning the use_compatability_dialogs=true on but that didn't fix it for me. I can see all the phlatscript icons and things in the Sketchup program so I know it is installed. What am I doing wrong?

    Orion
     
  14. Orion13

    Orion13 Member

    Offline
    Messages:
    33
    Trophy Points:
    6
    What is really odd is if I hit tab with the blank parameter screen pulled up the parameters show up but they are all zeros. If I fill them in and then hit ok and then go back into the parameter screen it is blank again, hit tab and all zeros again. Crazy stuff I have going on. I don't know what I've done wrong.

    Orion
     
  15. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    on my Linux box I had to 'flip' all the .rb files to Unix line ending format to get it to work under Wine, maybe Mac needs that too since it is also Unix based?
     
  16. ironman2415

    ironman2415 New Member

    Offline
    Messages:
    4
    Trophy Points:
    1
    I'm having the exact same problem as Orion 13 on my Mac. Would you mind explaining a bit more how to "flip" the line ending format?
     
  17. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    there is a program called 'dos2unix' that you will need to run in a terminal, in the correct folder. google will find details on installing and using it, and the correct folders are
    ....../Sketchup..../Plugins/Phlatboyz
    ....../Sketchup..../Plugins/Phlatboyz/Tools
    where '....' indicates missing information I don't have because I don't have a Mac of any description.

    however! my readings about Ruby indicate that since the language is designed to be cross platform it is supposed to ignore line endings and 'just work'. My recent installs of SketchUcam1.1 on my Linux box (from .rbz files) have worked without any further fiddling, so maybe something else is to blame.
     
  18. royce

    royce New Member

    Offline
    Messages:
    1
    Trophy Points:
    1
    Location:
    Annapolis, MD/Venice, FL
    I have had a similar problem on my Mac with SketchUp Make and SketchUcam 1_1a. I have verified that resizing the parameters box will reveal the correct display with the default data. Everything works properly. I then found that changing and saving any parameter field will zero all data. At this point, I cutting with a zero diameter bit and other bad things. On a restart, the default data will reappear and everything is fine again.

    I read elsewhere in sketchucation that the this blank display may be caused by over writing the parameter box with a blank background. It may be a peculiarity of the WebDialog HTML format. I tried their recomendations for the setparamsWebDialog with no luck, but I am not an HTML guy. I am not sure what causes the data zeroing but it could also be an HTML problem?
     
  19. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    the webdialogs are an ongoing problem on anything but windows because they rely on having a compatible version of IE available for the rendering. the instant solution is to turn on the compatibility mode dialog in {My}Constants.rb
     
  20. ironman2415

    ironman2415 New Member

    Offline
    Messages:
    4
    Trophy Points:
    1
    Irion13 and I both set the {My}Constants.rb to "use_compatability_dialogs=true", but still get the problem.
     
  21. ironman2415

    ironman2415 New Member

    Offline
    Messages:
    4
    Trophy Points:
    1
    Thanks for your help swarfer. From all my research it sounds like everyone with a mac runs into this same problem with no resolve. I've researched the heck out of it and looks like I'll have invest in a PC to get any true 3D CAM program to work. I'm new to this, but Makercam is the only CAM I've found that could be used with mac given it's simply browser based. Sketchucam very nearly fit the bill short of this issue. Unless anyone else out there has found a better solution?... Thanks...
     
  22. NeilBlanchard

    NeilBlanchard Member

    Offline
    Messages:
    206
    Trophy Points:
    18
    Location:
    Maynard, MA, Eaarth
    You can run Windows on a Mac with VMware Fusion or Parallels Desktop. That's how I run it.
     
  23. ironman2415

    ironman2415 New Member

    Offline
    Messages:
    4
    Trophy Points:
    1
    Thanks, that's what I may end up doing.
     

Share This Page