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

The Phlatscript, A Discussion In Depth

Discussion in 'SketchUcam Help' started by tvcasualty, Jun 7, 2009.

  1. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    First off I want to say this code is far above any expectation I ever had going into this. There has been a massive amount of work done to get it to this point, and it’s creators deserve a lot of credit. It is a fully featured script, that meets everything I really wanted.

    That being said, in the spirit of open source, lets talk about making it better. I am totally willing to dump my time into this effort, but I’ve got a lot to learn, and I think a discussion is warranted by the folks that use the script before too much time is commited.

    I've been looking at the rb files (code) on night shift over here, and am a bit confused on why some things were done the way there were done... Text inputs, like setting depth, are done in a manner I would not expect. Why is it everything goes to a material thickness? It seems like it would have been more straight forward to directly enter the bit depth (like how you enter a radius for a circle). I would rather tell the program to run a fold line at 0.125 inches deep (instead of 1/4 the material thickness). -But maybe there is another logic I do not understand.

    I've been trying to figure on the deal with the g-code, and where it really comes from, and how to better represent it. Let’s discuss some ideas on making this side of the script more advanced.

    I think it’s great that the Phlatscript keeps things easy for folk new to CNC. This was a great advantage for me when I first started out. However as I grow and my models get more complex, I find myself wanting to stretch out, but not quite having the room. Perhaps, there should be an advanced mode that allows the user to enable these types of options.
     
  2. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    One idea I had was that the g-code should be represented in true 3D as it is generated.
    (Maybe this would only require a draw.phlatedges? type command?)
    One problem is that if it starts creating geometry in the Z direction, it would clutter up your model, possibly making it hard to work with.

    A solution would be to create this g-code geometry at a set distance above your model. (When looked at in the plan view, it would look the same as it does currently).

    For instance, say 20 inches directly above that part you are working on, the script creates a separate geometry, illustrating the exact tool path. Take it one step further, and automatically make that geometry a group so it can be hidden or deleted easily. This would leave your original model alone, allowing one to freely make changes without the need for extra right click features in deleting the “phlatedges” as they are created currently. More over you would know right away, if you were altering the g-code because you would see it.

    Maybe it would be better, to create the geometry in a spare “cut box” mirroring the original parts. What do you think?

    I feel this concept would then lay good ground work in readying the Phlatscript for true 3D cut paths, again, lets open it up!
     
  3. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    I like the idea of having the phlatcode visible, it could help with making the tool-path in a logical order, or in the order that you want it. Alas, I wouldn't know how to do it or even what to recommend to implement it. :(
     
  4. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    I think this where you hit on a golden idea. I agree there should be at least two modes in the PhlatscripT. I think this should be something like "Precision Mode" and allows for exact entry of cut depths and some other things I can't think of right now by fractions/decimals instead of percentages. This is where I feel the most people will benefit from additional work on the code.
     
  5. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    I would say it does work fine at first.
    But then some issues begin to crop up. For instance, when setting folds at a given distance… It seems my foam is not as even as it should be. A 50% cut depth has left me on some occasions with a through cut in some areas. Too shallow out of a % and now the fold line isn’t even cutting. In other occasions, the normal cut just isn’t quite deep enough (though this bug seems to have been fixed for a while now) or taps simply cut through (I had big issues getting the V tab to work w/ my bit until I settled with a 5% cut depth). :|

    Something is changing as I cut parts through the versions of the Phlatscript, possibly even the way I model. But I can say for sure my “Z” starts at a zero, and it’s the same zero each time I use my pp. :?:

    This leads me to not be sure if I’m missing steps or if there are some bugs in the script. Which brings me to my next “what if?” What if you could just see the cut path in SU? Never mind actually driving the pp from Sketchup, just show the true tool path?
    What do you think of that?

    Good discussion, this is exactly what I wanted to get into.
     
  6. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    I've been working on a new icon set for the Phlatscript, not that it needs it, but because I can, and I was thinking...
    for the inside vs outside cuts.

    What is the difference?

    In an inside edge you want the bit to be engaging your finish side.
    So a outside cut will always cut around a part in a clockwise (CW) direction and an inside cut will always go in a counter-clockwise (CCW) direction.

    I know the "O"s and the "I"s make it really simple. But what about someone who does not speak English. Ok, ok it's an American design, not sure if SU even allows for other languages, but the pp is sold world wide.
     
  7. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    tvcasualty, One of the interesting side-effects of the personal computer is that it has almost forced English to become a secondary language to every user, worldwide. In other words, they probably already understand.
    Also, if you take a look at the international versions of any software, the icons never change. The only thing that changes is the popup text associated with the icons, if that software has such an ability.

    You see, the world got tired of waiting for us lazy Americans to learn any other languages, so they just decided to learn ours.

    "If a person speaks two languages, they are bi-lingual,
    if they speak more than two languages, they are multi-lingual,
    but if they only speak one language, they are American"
     
  8. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    There is nothing wrong with being American.

    Here is what I had in mind




    When icons are hovered over the English text is displayed as a tool tip, showing important words like inside cut, outside cut, center line, etc... The icons on the other hand are generic. Showing CW for an outside cut and CCW for inside, and a basic "U" shape for the tab script.

    Now that Phlatboyz_strings.rb file can be translated if one would desire to have the script in their native tongue, while the icons would still remain generic. Attached files [​IMG] [​IMG]
     
  9. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    I'd rather see the inside cut icon as a CCW blue arrow inside a hollow "I" and the outside-cut icon as an orange CW arrow outside a torus, as those would be a lot more descriptive in my opinion and they would not lose the "I" and "O" mnemonic value. If they looked like you show, I'd always be waiting till the text displayed, to be sure I'd selected the correct one. The tab script looks fine, its just a shame to lose the "T" or "V" symbol.

    Y'see, I have to use SAP software at work, and the icon I need most to access the contents of a work document looks like a gorilla with a parasol standing inside a toilet bowl. A green gorilla. I hope that means something to the German programmers that wrote the script, but a simply icon of a page of text would have been a LOT more apropos.
     
  10. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    Hey TV,
    I like how vibrant the icons are. I do agree with Dorsal on retaining the letters for describing inside, outside, and tab though. Maybe just have an "I", "O", and "T" next to the bit. The more info to the user the better.
    Maybe you could set up a poll on this, and have a couple more choices.
    Great job though!
     
  11. kyyu

    kyyu Active Member

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

    Not to knock you effort; but I don't like the new icons. They are not definite visually. I would just be confused as to which is which. So if it's a choice, I prefer the original. I agree with Dorsal about the English. You don't need to worry if people will understand english words. When I worked in Hong Kong, the people in my company spoke chinese, but all computer operating system and software was in english. Otherwise, I would have been in trouble, since I can't read/write chinese.

    -Kwok
     
  12. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    I totally get that, but take the fold tool for instance, how do you know it's the fold tool? Or how to use it for that matter? If the matching colored arrows aren't enough to hint you, the cursor still has the "O" or the "I" plus you get the tool tip. In addition to that information you are also told that the cut will be preformed in the direction shown. On top of all that, you will also have a right click option.

    I wish more could be done to show the shapes that dorsal is talking about but there are only {EDIT}24x24 pixels in the large icon, and the small only leaves 16x16.

    Anyway, the icons are already done both ways. I revamped the originals first but felt as though there was something missing from the overall picture as I still did not have a hold on what the real difference was between an inside cut and an outside cut, you know, besides the friendly O vs I. Instead of the side of the bit I wanted to show the top chipping some material, in the right direction, but again lacked the space. So I went back with the originals, but then I felt there was no flow from on tool to the next. For instance, maybe the fold cut should be labeled with a F instead, then change the plunge, and centerline to follow? But is that clear? A simple CL would help identify the centerline tool, but would an F or P?

    Maybe I'm reading too far into this. :)
     
  13. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    tvcasualty, Just do what you think is best. There are a hundred different ways to get to the same place, and you're doing such a fantastic job I'd hate to think my comments were discouraging to you. [​IMG]
     
  14. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    I don't have any problem with the F, P & CL scheme. That would make everything uniform.

    I do think you are thinking too much into your I and O tool icon. What I don't like about the C and CCW arrows is first, the user has to think about it. And they are similar enough for the user to later forget, which is which. And finally, my big objection is C and CCW is ambiguous. It depend on the viewers perspective, either looking down or looking up from below. The PP has the Z axis reversed, so you are in a sense looking from below. But someone with a regular cnc mill, will see the same cut going in the opposite direction.

    But what ever you guys decide is fine.

    -Kwok
     
  15. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    That is a good point. And something i have not thought of, which is why I posted this to begin with. I wonder how that effects the code as a whole, for instance, as the outside cut moves in such a manner for our reverse Z, would the script work the same way for someone w/ a normal z?

    Dorsal by no means am I discouraged, you shouldn't read into my response as that, only take away the fact that I have considered many things when coming up with this idea, and did not just put something out there. ;)
     
  16. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    Just to chime in with my $0.02. I too prefer to have the "I" and "O" on the icon. Even if you don't speak English, you'll learn the function of each icon, eventually , and you'll remember the letters easier than the symbol.
     
  17. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    I just got another idea that might work for both cases.
    What about the letter, with a colored arrow going in the direction of the cut
    (no bit shown)?

    Not sure if that would totally solve the direction problem, for those with normal Zs, and I'm not totally sure what would be involved in doing that but that seems like something that could be fixed in the constant file.
     
  18. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    I'm not sure why so are so hang up in the direction arrow. I think it is totally unimportant. What may be the right direction for you may be the wrong (left? :) ) direction for me. A nice icon with a letter and a symbol of a router bit inside or outside a shape will do the trick, in my opinion.
     
  19. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
     
  20. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    How about instead of making a half a circle arrow make a full circle double arrow and put he bit inside or outside, respectively? Something like this only better. :D

    Attached files [​IMG] [​IMG]
     
  21. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    Like the rotate tool? (That's where I stole my arrows from) Let me see what I can come up with. Gasmasher is helping me look into why the icons get further scaled, if that can be corrected, it may open a few more doors. :)
     
  22. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    On another note, I had a few errors with my g-code generation last week, which I should have stopped myself there, but I didn't want to take the time to trouble shoot the model. (There was something that the generation script didn't like on a part or two). But overall the output g-code looked fine, so I went with it. Unfortunatly there was an issue which I didn't catch until after I was actually cutting. Not a big deal, it was fixable, but-

    This is one of the main reasons I would like to see the actual tool path in sketchup prior to actually generating the 1s and 0s for the code.

    Does anyone have thoughts on this, or on how to do this best?
     
  23. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    I'm glad you reminded me. The large eraser icon I have is 32x32. The eraser in the image is 24x24 but there are some empty pixels around the edge. Sketchup takes the 32x32 and scales down to 24x24 so it ends up looking smaller. The sizes SU scales to are:
    16x16 for the small toolbar icon
    24x24 for the large
    32x32 for the cursor

    I tested cropping your eraser to 24x24 in mspaint and it is now the same size as the SU eraser image.
     
  24. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    Ah! Ok, not sure how that happened. :oops: I wil double check the rest of the icons as well.
    EDIT:
    I just took a look at the other PS icons, some are 24x24 others are 32x32. I will update all the icons to acount for this, as they should all be 24x24. (just a matter of hitting the canvas size on the master .xcf file)
     
  25. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Wow! It's been a while since I have had the time to get in here and see what has been going on. Its really taking off you guys :D
    Erik the new icons are fantastic looking! I always knew you were an artist when it came to Sketchup model creation but I did not know the extent of your abilities, really nice work. I love that you are trying to stay with the Sketchup theme when you make them. These types of icons will allow for new users to pick up the Phlatscript process without a problem. I have a few ideas of my own to make the new end users experience an easy one as well. I will PM you the pic as I am not an artist and cannot make nice looking Icons like the ones you created and I am too embarrassed to post it here :oops: :D but I do have a couple ideas for the inside outside ones and I think you will get the idea from the pics I send you as bad as they are.
    Guys
    This collaborative effort is what its all about here and I love the fact that all you guys are joining together to make this whole experience a better one for everyone learning cnc for the first time thank you all for that.
    Mark
     

Share This Page