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

Anyone know Ruby who can help me mod SketchUcam?

Discussion in 'SketchUcam Help' started by ElkaderLight, Aug 12, 2013.

  1. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Sorry, I know I just posted this in another forum category but just realized that it should probably have been in the Help section here. I couldn't figure out how to move the thread...

    I am looking for help refining SketchUcam (best plugin for CNC in the Sketchup universe!) to make it even stronger. I don't have any experience programming in Ruby so I am looking for good suggestions on where to start or someone who would be willing to help.
    Here are the features I am interested in addressing: (I invite others to make suggestions too).

    1. Checkbox for “Table Top” Or “Material Top” setting to keep all Z axis numbers in gcode exported as positive numbers. This would allow cutting using the table top as zero Z not just the top of the material. This is important in our use. The overhead gantry checkbox doesn’t seem to do this.
    2. REALLY IMPORTANT: More visual control of the sequence order of cuts. I seem to get very inconsistent results trying to group the components in sequence. I haven’t really figured out how to control this and spend an inordinate amount of time grouping, exporting code, testing it, going back in ungrouping and regrouping and trying again. I haven’t been able to figure out how to control this consistently.
    3. Control of the start point for cuts.
      1. If that could be done then you could have lead-in lines in the drawing that would also expand the reach of SketchuCam to be able to create codes for CNC plasma cutting. It would be the only Sketchup software plugin able to do that.
    4. Sometimes an outside cut leaves a nick as the bit finished the cut. A little extra retrace of the start of the cut about half the diameter of the bit I think would fix this.
    5. At the end of the code I usually change the zero Z0.0 to Z 2.0 inches so that it pulls the bit up away from the material.
     
  2. ewo

    ewo Moderator Staff Member

    Offline
    Messages:
    701
    Trophy Points:
    18
    Location:
    Indiana
    Lampguy,

    I deleated the thread you posted in Sketchucam Related Software .
    after you posted the same exact thread here in skecthucam help .
    No need to say the same thing in both sections .
     
  3. ToxicToast

    ToxicToast Down in the weeds. Staff Member

    Offline
    Messages:
    483
    Trophy Points:
    18
    Location:
    Roseville, CA
  4. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Bruce, Thanks, Yes I couldn't figure out how to switch the post to a different group.
    ToxicToast, Thanks for the quick response. I am sitting here tonight spending hours on this very problem or sequence. I will immediately add the plugin and maybe I can go to bed early! THANKS that is the biggest item on my nuisance list. THANK YOU.
     
  5. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    ToxicToast,
    I went to the link, saw the download, but it doesn't seem to want to download for me by clicking. I right clicked and chose to save it and I got a partial download. I got the support folder, but the actual rb script isn't coming down. Could you send me a copy of yours? I couldn't find it on the internet anywhere or anyplace on the PhlatForum where it was listed for download.
     
  6. ToxicToast

    ToxicToast Down in the weeds. Staff Member

    Offline
    Messages:
    483
    Trophy Points:
    18
    Location:
    Roseville, CA
    Out of respect for Kwok, I won't post it here unless he provides permission. I've PMd him on it but he only comes around once in a blue moon. I've also sent you a PM with more information.
     
  7. ToxicToast

    ToxicToast Down in the weeds. Staff Member

    Offline
    Messages:
    483
    Trophy Points:
    18
    Location:
    Roseville, CA
    If you google "reorder groups plugin phlatscript" and go to the videos section, you'll see a video or two on how to use the plugin. I use it all the time and find it really helpful to make sure the cut order is correct without having to regroup manually.
     
  8. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    I'm not sure I follow your logic, ToxicToast. Kwok posted it here and re-posting it will not violate his rights, unless it was he who removed it. If the forum had not moved the file would have still been available for download.
     
  9. ToxicToast

    ToxicToast Down in the weeds. Staff Member

    Offline
    Messages:
    483
    Trophy Points:
    18
    Location:
    Roseville, CA
    Agreed with your reasons Yoram. Again, out of respect for him, I've tried to contact him to see if he can post it himself. LampGuy has a copy of the compiled version now to get him by (which is all I have). If Kwok doesn't follow up in the forum after a few days, I'll post it to this thread. In the meantime...does anyone have the .rb file?
     
  10. ToxicToast

    ToxicToast Down in the weeds. Staff Member

    Offline
    Messages:
    483
    Trophy Points:
    18
    Location:
    Roseville, CA
    Kwok contacted me already and Shaun (3D Mon) posted the rb file in the original thread here: link
     
  11. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    It's academic now, ToxicToast, but it says in the .rb file that it can be freely distributed with practically no restriction. ;)
     
  12. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Nice! Thank you (again) Kwok :good:
    Guyz, sorry for the missing files it looks like we will have to build them up as we find them because some of the database was not able to be converted :( I think most of us have most of the files needed so if you come across a thread with a missing file and you have it it would be a HUGE help if you could re share it so that the new guyz well be able to get it too.
    Thanks boyz :)
     
  13. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Thanks everyone, this solved a major time sink for me.
    Let me know if anyone has thoughts on the other items originally posted.
     
  14. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    The latest TRUEPLUNGE extentions incorporate this reordering plugin into Phlatscript as a tool.

    LampGuy i have started to make mods to allow referencing the table top instead of the material top. Not as simple as it first looks....
     
  15. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Swarfer,
    I tried to load the new Sketchucam in and see the new re-order tool (thank you), but for the life of me, I can't seem to get the defaults to respect the values I have changed in the Constants.rb file. I have tried multiple ways including renaming the Constants.rb to MyConstants.rb and back again. So I do not know where Sketchucam is pulling the defaults from.
     
  16. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    You need Constants.rb all the time, it must always exist, and it must be the one from the latest TRUEPLUNGE package if you are using TRUEPLUNGE.

    Optionally you can create MyConstants.rb and you set your defaults in it.
    You can create it in 2 ways....
    copy Constants.rb to MyConstants.rb
    copy MyConstants-example.rb to MyConstants.rb

    MyConstants-example.rb has non essential things removed to make it simpler, and actually contains my metric defaults that I actually use. There may be some things missing that you can set, just look them up in Constants.rb and copy/paste then edit. Eventually the documentation will catch up.....

    The reason for this is that as I am adding features I am having to add constants and defaults to Constants.rb so everytime I release an update, it changes. If you have set your preferences in that file, they get overwritten by the upgrade. So I added code to allow importing MyConstants.rb . No upgrade will ever overwrite it, and it doesn't have to exist, but if it does, the values in it will be used. Read MyConstants-example.rb for an example of what it should look like.

    Hope this helps
     
  17. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Swarfer,
    Sorry to bother you again on this issue...
    I have uninstalled and reinstalled both Sketchucam and Trueplunge like 3 times now. Cleaned out everything I could find everywhere before each install.
    I have saved a modified version of MyConstants-example.rb and as MyConstants.rb (sic) and myconstants.rb (sic) and even renamed your MyConstants-example.rb to MyConstants.rb and to myconstants.rb to no avail.
    And what is strange is that the defaults loading don't seem to match constants.rb specs either.
    Constants.rb, MyConstant-example.rb and myconstants.rb all reside in the following folder.

    C:\Program Files (x86)\Google\Google SketchUp 8\Tools\Phlatboyz

    And I have, of course, shut down and reopened Sketchup between each test.

    This is driving me bananas.

     
  18. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Swarfer,
    One other thought on the Zero-Z table top rather than material top issue. I find that if I go into notepad and remove all the negative signs (ie; Ctrl-h replace> "Z-" with "Z") That takes care of zeroing out on the table surface. Is there a simple way to simply have a checkbox for Table Z=0 that would force the gcode generated to be positive numbers only, or do a search and replace at the end of the code generation to strip the negative characters out?
     
  19. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    You have to have Constants.rb AND it has to be the one from the TRUEPLUNGE package.

    MyConstants.rb is optional, if it exists it will be loaded by code at the end of Constants.rb

    Want to be a beta tester for SketchUcam 1.1?
    How to install:
    1. remove existing Phlatscript from C:\Program Files (x86)\Google\Google SketchUp 8\Tools and don't forget the Phlaboys.strings file from C:\Program Files (x86)\Google\Google SketchUp 8\Resources
    2. open Sketchup and check it is gone, close sketchup
    3. download the file in the private message I will send in a moment
    4. open Sketchup8
    5. click Window|Preferences|Extensions
    6. Click 'Install Extention' button
    7. find the .rbz file you downloaded and install it
    8. You may need to activate the toolbar via View|Toolbars
    You will now have 2 new toolbars, the Phlatscript one and the PhlatBones one. Phlatbones are for doing outdents at the end of slots so that a rectangular tab can fit into the slot.

    Now, it should just work as normal using the default settings.
    To change some settings.....
    MyConstants-example.rb will be in
    C:\Program Files (x86)\Google\Google SketchUp 8\Plugins
    along with all the other Phlatscript stuff, the new RBZ file install method can only install to Plugins so I've had to move it all out of Tools.

    Copy MyConstants-example.rb to MyConstants.rb and restart Sketchup and you should see my metric values and the comment 'Davids defaults'.

    The big advantage of the RBZ install is that future upgrades don't require you to find any folders or mess with individual files, the install overwrites files in the correct place, but it will NEVER overwrite MyConstants.rb so your settings are preserved.

    Anyhow, if you try this, please let me know how it goes, we're wanting to release this soon as there are still people out there struggling with the bugs in the 0.924/1.0 release. Note that 1.1 does not include the '0 table' option, I'll work on that in the next few weeks, more important right now to get Sketchup 8 and Make/2013 working properly for most people.
     
  20. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    nope, now everything is upside down and the 'safe height' will be lower than the cut height.
    say you had 3mm safe height and 6mm material
    so Z3 would be safely above the material and
    Z-6.6 would be cutting through the material

    replace Z- with Z and
    Z3 is 'somewhere' *not* above your material, and
    Z6.6 is above it, so Z3 is not safe anymore!
     
  21. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Swarfer, I would be honored to help with 1.1Beta and will install tonight.
    RE: ZeroZ above
    Yep, you are right, I went back and checked how I deal with this. I leave the safe travel at say 6mm for a 3mm thick sheet. Then when the gcode is made I edit it in notepad and search and replace all z-3.00mm with z0.00 and any % centerline cuts (which are usually 50% for me) I manually search and replace the z-1.50mm to z1.50mm.
    So you are right, sorry. It isn't so simple. I forgot that I had to identify the thickness of material and replace with 0.
     
  22. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Swarfer,
    I just stripped out all vestiges of Phlatboyz. Checked for it and it was gone. Installed the 1.1 Beta .rbz file. I see the new Phlatboyz folder in Plugins. I see Constants.rb and MyConstants-example.rb in the folder. I copy MyConstants-example.rb to MyConstants.rb. I restart Sketchup. I check the Parameters box and see parameters that neither match your example or the Constants.rb settings.
    No comments to indicate David Defaults. I have in the Parameters box.

    Spindle= 15000, Feed Rate 50.00000",
    Plunge Rate = 50.00000",
    Material thickness 0.25000".

    Same as my problem before. I don't know where these are coming from.
    The Constants.rb file data that shows when opened in notepad:
    Default_spindle_speed = 15000
    Default_feed_rate = 100.0.inch
    Default_plunge_rate = 100.0.inch
    Default_material_thickness = 0.25.inch

    and yours obviously are metric... so I am not seeing those.

    So this is the exact same problem I had before with the same parameters showing that I had before. For the life of me I can't find where they are being drawn from. A search of my drive for Constants.rb yields only the one. I am missing something here? Isn't he Phlatboyz Parameters icon where I should see the MyConstants.rb variables showing?
     
  23. ElkaderLight

    ElkaderLight New Member

    Offline
    Messages:
    19
    Trophy Points:
    1
    Swarfer,
    I like the new icons in SketchuCam. Make sense.
    Thought: The centerline tool, I believe, carries forward (remembers) the last % depth you entered.
    It looks like the new plunge tool depth does not. This is useful if you are doing a lot of repeat of the same.
    I am also not clear if I am to type the % in first, then press enter and click on the location for the plunge hole, or plunge first and then enter the % and enter. Hard to tell if it 'took' my % entry. Maybe I am daft.

    The reorder tool is working great. I just wish there was some kind of visual indicator of the order after you are done so that you can see if you missed something. Not sure how you would handle that. The ideal would be a numbering system but I can see how that might be impossible with Sketchup. Perhaps some kind of cutting line color change once it has been selected?? But it works as presented once you understand it.
    The suggestion to add labels and group with the cuts so you can just grab the labels for ordering is a really good suggestion and helps when you have overlaying cut groups.
     
  24. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    type the number, press enter, click position
    the resulting hole 'drawing' will have a pink line in it, normal holes have a brown line[/quote]
     
  25. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    I need to do a test install on Make so I'll try to see where this could go wrong and get back to you.
     

Share This Page