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
    Hi All
    OK, Sean - I'm convinced, it's in :)

    Just in case anyone is wondering what's happening with PhlatBone, it's currently at the tool icon creation stage :)
    There are some major changes in the way it works - there are two bone types - Rad-Bone and T-Bone. Two multi auto-bone type tools - inside and outside for each bone type. An individual corner bone tool for each bonetype. The tool diameter tool of course.
    All the tools work on 90deg corners only - any student wishing to modify the code to do all angles is at liberty to do so :lol: .
    The multi bone tools only work on faces (a la the phlatBoyz tools).
    The reason for inside and outside tools is that if there had been a full autobone tool, then it can affect the way a part looks - imagine the front of a dolls house/train carriage - you may want the outside tabs boned, but you don't want bones on the windows - or perhaps the front panel for an electronics project !

    Hopefully the plugin will be available tomorrow evening (Wednesday) - unless the install of my new high speed broadband gets screwed up tomorrow afternoon :?
    They're increasing it from 75/300 baud to 1200 baud and I no longer have to plug the telephone earpieces into rubber cupholders for the modem - great :roll:

    Cheers

    Neil
     
    n0kjf likes this.
  2. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    This sounds great Neil, looking forward to it. You have been busy :)
    :lol: ahh those were the days, though the little rubber cups were a little before me, we had the Hayes modulator/de-modulator's! :D
     
    n0kjf likes this.
  3. iGull

    iGull Member

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

    OK Sean, I'm convinced - I've left it in :)

    I've attached the latest version of PhlatBone - v1.002 to the first post.

    There are some major changes to the plugin - it now has a fully automatic boning function - inside and outside tools as well as the manual single bone tools.
    Two bone types - the new 'Rad-Bone' as suggested by Sean and the original T-Bone - I've left out the Dog-Bone as it was only of use for making corners for radiator covers :lol:

    PLEASE read the Readme about removing the old files - they're now in a seperate folder as suggested by Kwok (at least I think it was Kwok :eek: )

    To auto-bone, just select the FACE you want to bone - it will no longer bone multiple lines.

    Any problems, just shout !

    Cheers

    Neil
     
  4. scraighamilton

    scraighamilton Member

    Offline
    Messages:
    79
    Trophy Points:
    6
    Location:
    Coeur d'Alene, ID
    Igull, That tool works great! :D

    I Love the auto-bone feature!
     
  5. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Awesome Neil!
    It works very well.

    There is one thing I noticed on the T bones. On vertical slots it forms the t bone inward instead of outward. Too bad there wasn't an option to make it go one way or the other by pressing a key like shift or something. I don't know if there is an easy fix to it though.
    I attached a pic for ya.

    Thanks for the awesome plugin. Attached files [​IMG]
     
  6. iGull

    iGull Member

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

    This was in my thoughts originally, but somehow the thought went - bit like standing in front of the fridge wondering why you are standing there :lol: :lol: Must write those thoughts down when I get them (on my new iPad my wife bought me for my birthday maybe - if only I could get near it for the grandkids :p )

    I've spent some time this evening (it's 19:28 GMT here :p ) reviewing what I've done - I've modified the code to accept a shift key modifier for the T-Bone direction - works fine both in auto and manual modes.
    I've also changed the way you pick the faces too - you use the multi 'tool' to select any corner on the face to be boned rather than clicking a face then clicking the 'tool' - makes the interface a bit more natural.
    In so doing, I've broken my method for picking which face I'm on :roll:
    I'll need to dig around and find a better way to determine which face I'm using (you probably have lots of faces sitting on an outer face).

    Hopefully (yet) another version soon :lol: :lol:

    Cheers

    Neil
     
  7. iGull

    iGull Member

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

    As I said, yet another version (v1.003) of the PhlatBone tool :lol:

    Hopefully, the majority of the bugs and 'features' have been sorted.

    Major changes - rather than using the select tool to select a face then hit the bone tool, you now just choose the bone tool and select the corner of a face.
    As before, multi and single bones with inside and outside options. New feature is option to swap the T-Bone direction by holding the shift key while clicking - works in multi and single modes.

    If all else fails, read the readme of course :roll:

    Latest version is always in the first post.

    Cheers

    Neil
     
  8. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Neil this is AWESOME!

    The plugin is working great!

    Thank you!
     
  9. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    NICE!!! this is great Neil :) Thank you
    Mark and Trish
     
  10. Crash

    Crash Moderator Staff Member

    Offline
    Messages:
    469
    Trophy Points:
    18
    Location:
    Waco, Texas, USA
    Woot! I finally got a chance to play with this tool and I've found it to be GREAT!

    Thanks so much, iGull!
     
  11. kyyu

    kyyu Active Member

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

    Got a few bugs to report:

    1) The area method won't work all the time to detect interior faces, because it's not the total area of the face. It's minus the areas of internal holes and faces. For example, in the picture below, the multi-bones will be applied to the outer loop instead of the inner loop:


    2) When an outside bones is done, the face disappears.

    3) You should try and get rid of most of those global variables (like $faces ??). Probably only 1 is needed to remember the bit diameter between tool use. I personally try to give the few global variable, I do use, a very unique name. Like $Phlatbones_toolDiameter, instead of just $toolDiameter. Because all plugins have access to global variables and someone else can decide to use the same name.

    -Kwok Attached files [​IMG]
     
  12. kyyu

    kyyu Active Member

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

    iGull Member

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

    Ok on the code, I'll have a look at that today - (grandkids permitting :lol: )
    You're up far too late anyway - go to bed :lol:

    Neil
     
  14. kyyu

    kyyu Active Member

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

    Naw, you're just up way too early. ;) Anyways, if you want to check for an interior face, I would just pick an arbitrary face. And see how many faces are connected to one of it's edges. If only one, then the other face was the correct one.

    Oops, I needed to add a line to convert, if the default value is metric. Here is the new file:

    -Kwok Attached files phlatBone_v1.003_ky mod_only 2 global var & improved input box_v2.rb (27.2 KB)Â
     
  15. iGull

    iGull Member

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

    I've already fixed the easy bit :D I just used point_in_poly to see if the currently selected point was in the outer poly (missing any edgebounds) - seems to work just fine.
    Tidied up the rest of the code - thanks - I see that you binned the menuitems - I guess that without command key alternatives, it's probably a waste anway :D
    I didn't know that you could modify ruby basic structures eg initialize(x,y,z) - much tidier.

    I've fixed the metric issue that you folks have on the other side of the pond BTW :lol: :lol: :lol: :lol:
    I'm only up early because I'm 5 hours ahead of course :D

    Just received a mail from one of the guys on the SU developers group re the face being broken - seems I didn't create a face from the arc that I created :)

    I'm guessing that a lot of the guys will be wondering what trash we are talking here - I do build aeroplanes for fun as it happens !! I'm sure there's a better place to air all my 'dirty linen' :lol:

    I'll get the broken face problem fixed tonight and post an update tonight (or maybe tomorrow depending on whether a glass of wine is involved :eek:

    I'm thinking of putting the tool diameter into a saved prefs in the 'phlatbone' folder - that way you don't need to keep entering it at the beginning of the session - any thoughts ???

    Cheers

    Neil
     
  16. kyyu

    kyyu Active Member

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

    I just commented out the menu items, because no need to do it twice not knowing if it works or not. But was too lazy to copy up all the new lines, when done. :D Figure you would do it back up, what ever way you would want. Also, I don't know if you are even going to use it, so no need to make it too pretty.

    Here is an example I wrote. Put it in the plugins folder and type "test" in the ruby console. It writes out a config.txt file to the phlatBone folder. And reads it back and puts the values into an input box.

    Attached files z_test.rb (566 B)Â
     
  17. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    I like that idea.
     
  18. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    I think it would be nice to have the tool diameter pulled from the Phlatscript parameters that way you don't have to check to see if its the same when you start assigning the part cuts.
    The input widow is already there and there would be no need to enter it twice?
    Mark and Trish
     
  19. iGull

    iGull Member

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

    New version of PhlatBone v1.004 added to first post.

    Yes, this will be no problem if PhlatBone gets incorporated. Temporarily, I've added a preferences file that stores the tool diameter and the units automatically (in the PhlatBone folder).
    I don't want to screw with any of the other guys stuff until everything is finalised.
    There _may_ be an issue with the PhlatBone 'tooldiameter' needing to be a tad larger to allow the offset algorithms in the other scripts to get in the bones (so to speak :roll: )

    Cheers

    Neil
     
  20. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Hey Neil,
    Faces are working good now. How do we change the pref file. I tried to edit it in notepad++ and it will not let me save the file. It keeps telling me it is already in use, but it's not.
     
  21. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Never mind about the pref file. I am new to windows 7 ( I just installled recently) and realized I need to change the properties to allow me to edit it.
     
    bvelocci likes this.
  22. iGull

    iGull Member

    Offline
    Messages:
    53
    Trophy Points:
    8
    Location:
    Edinburgh, Scotland
    Whoa there boys, this is aeromodelling, not programming 101 :lol: !

    I should have said ...

    You don't need to do any editing of the prefs file, it's automagic - just choose the units and size you want in the tool diameter popup and it'll save them for you.
    Every time you change the size/units it saves them. It automatically loads them when you start up SketchUp too.

    Cheers

    Neil
     
  23. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Yeah I've realized that as well since my last post. :D

    Good stuff Neil! Thanks!
     
  24. kyyu

    kyyu Active Member

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

    Your menu items don't work. The best way is to use the commands, which I wasn't able to figure them out before. But I just figured it out. :) You might have to move the menu section, below the the toolbar, since the commands are defined there. But this is how you do it:

    [pre] subMenu.add_item cmd1

    subMenu.add_item cmd2

    subMenu.add_item cmd3

    subMenu.add_item cmd4

    subMenu.add_item cmd5

    subMenu.add_item cmd6

    subMenu.add_item cmd7[/pre]




    -Kwok
     
  25. iGull

    iGull Member

    Offline
    Messages:
    53
    Trophy Points:
    8
    Location:
    Edinburgh, Scotland
    Hi Kwok
    I had just forgotten to paste the new command styles into the menus (I never use them) - just a cut and paste from the tools - left the menus in the same place all ok.
    I'll upload in a few mins.

    Just as well that someone is paying attention :lol:

    Thanks.

    Neil
     

Share This Page