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

PhlatBone Tool

Discussion in 'SketchUcam Related Software' started by iGull, Jan 1, 2011.

  1. iGull

    iGull Member

    Offline
    Messages:
    53
    Trophy Points:
    8
    Location:
    Edinburgh, Scotland
    Just added 2011-02-07 10:12 GMT...
    Latest version v1.1 of 'PhlatBone' attached to this post.


    Hi All

    Happy New Year from snowy Scotland !!

    Just completed a wee tool that I needed, so thought I'd share it.
    It's a fairly rudimentary dog-bone or t-bone internal corner maker.
    Dog-bone or T-bone internal corners are used to remove the radiused corners which are created due to the router bit thereby allowing rectangular corners to fit neatly.
    It only works on 90 deg corners however !
    There's a 'readme' file showing how to drive it, just follow the instructions carefully.

    It can do multiple bones or individual bones - just choose the correct tool. The multiple tool is not particularly intelligent - just suck it and see what it can do - use the normal select tool to select the edges to be boned then click the multi tool or use the single tool to click individual corners.

    It seems to work fine on Mac OSX 10.6.5 and SU 7 - needs to be checked on a PC.
    Perhaps someone can tell me if they see the tooltips from the toolbar when you hover over them - for some obscure reason, I don't see them (probably self-inflicted :)

    Have fun.

    Cheers

    Neil Attached files phlatBone1v1.zip (20.9 KB)Â
     
  2. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    Thanks Neil. Happy New Year! :D
     
  3. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Ok Neil now this is really cool! I love this one! This has to be one that get incorporated into the SketchUcam! :D
    I tried it on the PC and it works fine through the tools menu. I can see the tool bar at the top but for some reason it cannot find the icons to fill the toolbar menu its just grayed out. So I looked through the code to see if I could find where it calls for the icons and I think I found it right there in the beginning, but I have no idea on how to make it look in a specific location. I think its looking under the tools folder? I am new to trying to learn Ruby so you will have to bear with me :D
    I also did a few test and found an error of sorts well not so much an error because it runs fine, it more less a rule of thumb :) that you may want to look at. It was so easy to select them all and add either the t bone or the dog bone but it creates them on all 90 degree edges and it really needs to leave inside or outside ones out of the equation depending on if they are a part, or a inside cutout.
    I made a quick picture to try and better explain what I mean.
    This is a very cool plugin that will make creating wood cutout fits work and I thank you for sharing it with us all.
    Great job
    Mark and Trish
    Attached files [​IMG]
     
  4. iGull

    iGull Member

    Offline
    Messages:
    53
    Trophy Points:
    8
    Location:
    Edinburgh, Scotland
    Hi Mark
    I didn't specifically set a location to find the toolbar pix (I did for the cursor pix), but they should reside in the /Plugins folder (I'm new to ruby too BTW :D )
    OK on the inside/outside cuts - using single cut, it is easy - just click the corners - trouble is with multi-cut, it just doesn't know what's inside and what's outside - it really depends on what side of the edge you are standing :D
    The easy way out is just to drag a marquee around the part that you want boned and shift click any that you want to miss.
    I may look at adding a crystal ball tool to the toolbar :lol: :lol:
    Joking apart, from memory, I seem to remember that lookahead algorithms weren't a lot of fun :? I'll see if I can come up with something when I get more time - if it were a guaranteed surface (with no breaks) then it's certainly possible.

    I have a question for you too, how did you get the fixed 'PHLATPRINTER' logo on the template :?: :?:

    Cheers

    Neil
     
  5. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    My icons do not show up either (using a PC, not a MAC). Took a quick look at the code but it looked like it was defined the same way as another plugin that does work.

    Maybe someone with more Ruby experience like kwok can figure out what is going on.

    Sounds like this will be a real useful plugin.
     
  6. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Cool plugin. Have you seen the dog bone/tbone options that is in the bezier curve plugin from Fredo?

    That logo your asking about is in the watermark settings under styles from the window tab.
     
  7. iGull

    iGull Member

    Offline
    Messages:
    53
    Trophy Points:
    8
    Location:
    Edinburgh, Scotland
    Hi
    OK on the icons not showing up - they're definitely loose in the Plugins folder and not in a folder within the Plugins folder ?
    To be honest, I think a solution like the phlattools etc is a far better proposition. Maybe when things move on, we can come to a better arrangement.

    I've had a quick look at the inside/outside corner stuff and it's not as difficult as I first thought (which is why I shied away from it :))) I'll get a look at it tomorrow.

    Haven't seen the dogbone options in the bezier plugin - no. Had I seen it before, I might not have bothered, I couldn't find a dogbone plugin :lol: I'll check it out tomorrow - does it do the same thing as mine ??

    Thanks for the info on the watermark setting - hadn't noticed that before :)

    Cheers

    Neil
     
  8. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Actually I like your dogbone plugin much better. Fredos leaves the old lines behind.

    One thing I would like to suggest is on the dogbone style. Usually the dogbone has one radius instead of the 2 connecting radii. I attached a pic of what I mean.

    Also when using the Phlatscript to produce an inside cut it will not complete the cut path unless we make the dogbone tool bit diameter a little bigger than the actual tool your going to use. It has something to do with the algorithm used for the inside tool.

    This is going to one of my new favorite plugins for sure. Thank you! :D Attached files [​IMG]
     
  9. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    For this all you need to do is go to window>styles>and change the watermark logo.

    Attached files [​IMG]
     
  10. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    This is where having the bit diameter pulled from the existing Phlatscript dialog window would be great.
    Mark and Trish
     
  11. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    iGull,

    You should only have 1 loose file, the main .rb. Everything else should be in a separate folder. Otherwise it will be a nightmare to uninstall your plugin.

    I figured out the icon problem. It seems sketchup doesn't like it when you don't also specify the small icon. I modified that line and put all the images into a folder:
    I also put everything in a module, which you can decide it you want to keep or not. I don't have that much experience with modules, so it could be wrong, but seems to work. Added some "self. and self::"



    Oh, btw I did this and tested on Sketchup 8. Attached files phlatBone_modified by kyyu.zip (11 KB)Â
     
  12. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Kwok, looking at other plugins I thought it may need to have the icons in a separate folder so I tried that, but could not figure out how you tell the plugin where to look for the cursor files.
    Is it simply a matter of adding the phlatbone folder name to the phlatBone/toolDiameter.png for each call of the tool?
    Thanks for putting this together kwok the icons are there now.
    Thank you again iGull for a great plugin
    Mark and Trish
     
  13. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Mark,

    Yes, that's the simple way. This is how the phlatscript does it. I've seem some plugins do it with more complicated ways. Of course, it's all really about learning how to test. That's the key. I've never actually written a toolbar for a plugin, before. ;)

    -Kwok
     
  14. iGull

    iGull Member

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

    Did you happen to notice if the tooltips worked on the toolbar on the PC ? Mine aren't working, but I think I set the MacOS time delay to infinite for another project a while back and I've forgotten how to reset it :roll:

    Shaun/Mark, OK on the dogbone shape - to be honest, the easiest (and neatest IMHO) is a simple t-bone. I checked the toolpaths on my cnc system and they were fine - however, it is easy to just increase the tool diameter in the phlatbone dialog box (it's not REALLY a tool diameter, it's the size you want the bones to be I just happened to call it the tool diameter :) ) This could be done automatically just by adding a smidgen to the diameter in the code - say 0.05mm or maybe 0.002" but that is a dirty way to overcome the issue I suppose ;)
    Any thoughts gratefully accepted.

    Cheers

    Neil
     
  15. iGull

    iGull Member

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

    One more thing, whether it's having created a module, putting pix in a folder or including small icons in the code, the phlatbone tools now appear in the "customise toolbar" option for the system toolbar on the Mac (not the large tool palette 'though) ! That's where I really wanted them in the first place ! All I need now is a 27" iMac instead of my wee 15" MacBook Pro toolbar :lol:

    Cheers

    Neil
     
  16. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Hi Neil,

    Toolbars probably works different on a pc. Can you combine toolbars on a mac? On a pc every toolbar is separate.

    -Kwok
     
  17. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Neil,
    Just wanted to stop a sec and say this is a GREAT plugin and we are not here to pick it apart, to be honest there are a lot of guys here on the Phlatforum who have been wanting a Ruby section for a long time and are starved for the knowledge of how Ruby works in relation to Sketchup and mostly how it can work as a cam system. It looks like the gates are open and this seems to be taking a life of its own right here with your thread. Eventually things will be moved an organized so that it makes for an easier transition for those wanting to learn. So until then, thank you for being understanding and helpful through this transition.Lets keep it rolling and see where it takes us. Once again awesome plugin!
    Mark and Trish
    p.s. tool tips working fine here on a PC with SU7
     
  18. navionflyer

    navionflyer New Member

    Offline
    Messages:
    220
    Trophy Points:
    0
    Location:
    Richland, MI
    Great job on this Neil. :D It works great on my Mac with SU7. Tool tips work as well so it must be the setting you mentioned on your machine.

    Thanks for taking the time to put this together.

    This one goes great with Kwok's loop select tool.

    Tim
     
  19. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Neil,

    All those "self::", I put in the code. Looks like you don't need them.

    -Kwok
     
  20. iGull

    iGull Member

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

    Yes, I've removed them - seems OK here too.
    I've been working on a couple of things - I've added a new bone type like 3dmon showed - I'm calling it a 'Rad-Bone' :D That's working just fine now - gives full entry to the tool and doesn't use so much material as the dog/t-bones. Perhaps this is the only bone that's needed ?????? Would certainly loosen up the code a bit.

    I'm also working on the 'auto-boner', but as suspected, SU has thrown a few spanners into the works - seems like it doesn't keep its edges in order :)
    I'm needing to find a good edge sorter algorithm (not that it's rocket science, just that my brain is still befuddled from the last few days hic !! :lol: )

    Cheers

    Neil
     
  21. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    The Rad bone! I love it!
     
  22. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Neil,

    Here is something else you can do with a module. You have a bunch of identical methods in each of the 2 classes. So I collected them together into a module and added an include statement at the beginning of each class. Now you only have 1 set of methods to modify, in the future.

    Attached files phlatBone (include module).rb (18.7 KB)Â
     
  23. iGull

    iGull Member

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

    Still alive and well after all the celebrations :lol:

    OK on the methods Kwok. The reason for the multiple methods initially was that the boning section of the bonemulti class _may_ have been completely modified and wouldn't be the same as the bonesingle class, hence the separation (it'll probably end up the same now 'though :) )

    I've been doing a _lot_ of work on a smartboning method, but every time I create something that looks like it may work, along comes a spanner in the works - either sketchup or just simple preference :x

    There are a number of problems with a smartboning method ...

    1 You may not have selected a face - it _may_ just be a bunch of unrelated edges.
    2 If you have selected a face, it may be built using any number of tools - lines/rectangle/arcs - the resultant face will of course be only made of edges, but which of those edges need to be boned. You may NOT want all internal corners boned !
    3 The internal corners may not be at 90deg - this leads to a lot of extra coding (my vector geometry is getting stretched :lol: )

    I am also thinking of removing all the bone type options and just using the 'Rad-Bone'.

    So, my current suggestion is to have a single rad-bone type tool and a multi-bone tool that bones all 90 deg internal corners of a face.
    Individual preferences would be catered for by the single 90 deg rad-bone tool (ie you chose which corners to bone).

    Looking for any comments on this. :?:

    Cheers

    Neil
     
  24. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    I found myself using the t bone as much as the rad bone in a particular model I worked up that had 2 perpendicular slots close to each other. If I would have used the rad bone, the little radii would have been too close to the other slot. By using the t bone type, I was able to get the radii off to the side so they would not come close to the other slot.
     
  25. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Here is a pic showing why t bone is still useful.

    Attached files [​IMG]
     

Share This Page