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

[Plugin] Phlat Flip (v1.1) Nov4, 2010

Discussion in 'Other Sketchup related softwares/plugins' started by kyyu, May 13, 2010.

  1. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    [pre]Copyright(C) 2010, kyyu
    All Rights Reserved
    Permission to use, copy, modify, and distribute this software for any purpose
    and without fee is hereby granted, provided this notice appears in any copies.
    THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
    WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

    Name: Fhlat Flip
    Version: 1.0
    SU Version: 7.0
    Date: 05-13-2010

    Description: Same as SU's "Flip Along (axis color) Direction", except Phlat lines are flipped also(Ouside & Inside cut lines)

    Usage: * Select and right click context menu (only Green and Red direction choices)
    * if you open up the Ruby Console, there is an output of the number of each type of loop that was reversed

    History:
    1.0 (05-13-2010) - first version[/pre]



    Update to version 1.1:

    Update to fix a bug and for SU8 compatibility. Note the old plugin had a bug where it would double up inside cut lines everytime you used it. I doesn't seem to effect the gcode, so doesn't do any harm. If you want to check for it just, just left drag a selection box over the inside cut line and see if there are any extra entities reported in "Entity info" dialog box. If you want to fix it, then just copy the part and delete the original. That seems to get rid of the extra lines. You can use either copy/paste or the move tool to copy.




    -Kwok Attached files Phlat Flip (quicky vid).wmv (1.3 MB)Â ky_Phlat Flip (v1.1).rb (5.8 KB)Â
     
  2. cncmachineguy

    cncmachineguy Member

    Offline
    Messages:
    133
    Trophy Points:
    16
    Location:
    Odenton MD
    another awesome plugin kwok! way to go :D
     
  3. swim93

    swim93 New Member

    Offline
    Messages:
    79
    Trophy Points:
    0
    kyyu, im not sure i understand what exactly the purpose of your plugin is :(
    could some one try to explain it to me?
     
  4. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Great plugin Kwok. It would be nice if it could just be incorporated into the Phlatscript to get rid of the error it is fixing. Maybe Tim can use this.

    Alex this plugin fixes a problem that if you already have the cut lines applied and flip it all on the red or green axis, it would mess the cut lines up. I think you and your dad experienced this a while back.
     
  5. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Alex, just flip a part, that already has phlatlines applied, using SU flip feature => for example "Flip Along the Green Direction". Generate the g code and you will see it's messed up, like some of your parts in your 1st balancer plans.

    Then try the same with my, Phlat Flip.

    Just be warned that, I tested it the best I can, but there still could be bugs. I fixed a few already. As far as I know it works pretty well.

    -Kwok
     
  6. kyyu

    kyyu Active Member

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

    Yea, I thought about all the ways to implement it. But you can look at it this way. Probably not many people flip with phlatlines, anyways. But if they do, they got to flip it regardless. So just as easy to just use a different flip script. If this gets fixed in the phlatscript, in the future, on harm no foul. I don't think there is anything special, in my script, that Tim need. He probably writes this stuff in his sleep.

    -Kwok
     
  7. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    He probably does. Man, I wish I could get the handle on it. I tried but couldn't get it going. I had taught myself Visual Basic with no problem but I can't get this ruby thing going.
     
  8. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Nice job Kwok! you are coming out with some really great plugins brother.
    I love this one in particular. I always find myself needing to flip a part that has been worked. This would be a great addition to the Phlatscript and it would be nice to see it right there next to the other Phlatscript context menu items! :)
    Really nice plugin Kwok! Thank you for sharing
    One question, is the cut direction is corrected after its been Phlatflipped?
    BTW
    Not sure if you know this but a couple of your plugins have been posted on the SketchUp plugins blog site! http://sketchuptips.blogspot.com/2010/0 ... dates.html
    You have to love it :D
    Thanks again
    Mark and Trish
     
  9. kyyu

    kyyu Active Member

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

    This plugin was pretty hard to write, but I know probably twice as much about how the phlatscript works now. :) I certainly don't mind, if this plugin was incorporated into the phlatscript But my thinking (guess) was that it is not needed there and will only add bloat in the future. We can discuss it. I think if you can check for reversed loops in the phlatscript. Then only a few lines of code, is needed to change the direction when gcode is ouput. Basically just virtually flip two variable, instead of the whole Phlatline loop in reality. I see him doing this already, for example in the centerline tool code. The trick is determining if the loop is going clockwise (C) or counter clockwise (CC). When I was thinking about the UI, I considered a plugin that would fix a part that had been messed up with mixed directions. Some good loops and some bad. But I haven't been able to figure out how to tell if the loop is going C or CC. I can easily calculate a separate segment's direction, but segments in a loop can turn back in the other direction. So if just looking at that segments, gives a false direction for the whole loop.

    Yes, the cut direction is correct after Phlat Phlip, otherwise most of the code in plugin would not be needed. I found early on, you can simply reverse the phlat face (on a flipped part) and that would correct the gcode problems (traversing back and forth). But the cut direction was wrong.

    Yes, I saw that on Jim's SU plugin blog site. Cool, ha! :mrgreen: After checking the edge directions the hard way, I got tied of it. And was looking for a plugin to do it. And stumbled on that pages, looking for it. And the plugin was there, too. Check out the "Probes" plugin, by Thomas, listed there. It's got a normal tool, which also shows the direction of edges. You can check out the direction of the phlatlines and see that "Phlat Phlip" keeps them going in the C direction.

    -Kwok
     
  10. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Sweet! I know that Tim is busy now with work, but I am sure that he will want to see this one it really does a nice job and if it can done in the background when I/O side Phlatlines are flipped that would be perfect.
    I am going to have to check this plugin
    Thank you again Kwok this is great stuff! :)
    Mark and Trish
     
  11. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Updated to version 1.1
     
  12. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Thanks for the update Kwok
    Mark and Trish
     

Share This Page