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
    Thanks Mark, those icons you sent me were pretty nice, and really not that bad -although I was lost on the tab tool and fold tool :) (…until I looked at the existing ones).

    I'm looking into creating a highbred of all these ideas now, using a new technique…
    Here’s the trick:
    It’s very hard to draw 24x24 size images, so I’m creating models in Sketchup, a blue piece of foam and a bit. Then these will be arranged in the clearest manner possible for a screen shot. Once I have the screen shot, that image will be trimmed, scaled, doctored, and adjusted to fit inside a 24x24 bit image (using Gimp). This will also give the look of images that were drawn in SU giving a nice “flow” to everything.

    Thanks for all the ideas and input guys this will really turn out nice, can’t wait to spend some more time drawing things up for the best result. :mrgreen:
     
  2. Eflybob

    Eflybob Member

    Offline
    Messages:
    31
    Trophy Points:
    6
    Location:
    Croydon, PA
    Graphic preview possibility

    VB source code exists to do the graphic rendering - It's really good, I use it to preview before copying over to my Linux machine. http://www.codeproject.com/KB/vb/CNC_Viewer.aspx

    Once phlatcode is generated, call the vb cnc viewer to preview the result.
    (in Phlatscript, Start a new thread, executing the cncviewer passing the name and location of the .cnc file (maybe in phlatcncmill.rb in the job_finish method))

    something Like this --> Thread.new { 'cncviewer.exe c:/mycncfiles/testfile.cnc' }

    The cncviewer code needs slight modifications to accept the path/filename and to choose the best screen layout.

    Scott
     
  3. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    Is that any better then NCplot? (http://www.ncplot.com/ncplotfree/ncplotfree.htm)
    That is the current program I'm using (under wine) but I do not like it, it too hard to move around "inside the code."

    My ideal situation would be to check each part as I design it, with out having to export and jump back and forth... I will see if I can manually draw something up to really show the idea. :)

    EDIT
    Oh now I see what you are getting at. Durr. I completely missed the "call" part of that. That would work great provided you can run VB.
    I've been trying to figure out where and how the script currently grabs the points, and if there is the possibility of doing anything else with them besides passing them to a text file.
     
  4. Eflybob

    Eflybob Member

    Offline
    Messages:
    31
    Trophy Points:
    6
    Location:
    Croydon, PA
    With the source code available anything is possible. I haven't tried this, but there is an Open Source Development Environment for .NET that lets you build for Window, Mac or Linux. http://www.mono-project.com/Main_Page.
     
  5. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Hey Eflybob,

    Would you be willing to zip up and post the CNC Viewer demo & source code here? I don't really want to join that site, just for one download. These are the files:
    * Download demo application - 54.4 KB
    * Download source code - 199.81 KB

    -Kwok
     
  6. Eflybob

    Eflybob Member

    Offline
    Messages:
    31
    Trophy Points:
    6
    Location:
    Croydon, PA
  7. kyyu

    kyyu Active Member

    Offline
    Messages:
    1,183
    Trophy Points:
    36
    Location:
    Maryland
    Thank you, Eflybob! :)

    That's a very nice program, actually. It's the first free one, I have seen, that lets you do a descent step through, to see the cutting process. And I like the feature where if you hover over a line, it changes to a thick arrow to show the cut direction. And if you click on the segment, a balloon pops up with the corresponding line of G-Code.

    -Kwok
     
  8. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    New icon set, check them out. I've got mixed feelings. The large look really nice, but I get lost in the small...
    Attached files [​IMG] [​IMG]
     
  9. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    As long as they have popup descriptive text, they will work just fine! :)
     
  10. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    I like the inside and ouside the best, but they all look nice. Great job Eric!
     
  11. TigerPilot

    TigerPilot Well-Known Member

    Offline
    Messages:
    1,578
    Trophy Points:
    48
    tvcasualty, I thought it was a pocket tool, the one you have as the outside tool. It looks like the bit is inside the part.

    What happened to the direction thing? :D :D
     
  12. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Love them Erik! Really nice work they look top notch! You know like anything it will take a little time to learn them and then it will flow nicely. One question is are you thinking of adding the shadows to them like you have for the eraser tool? I think it would make a nice touch.
    Thanks again Erik for all your hard work on this project.
    Mark and Trish
     
  13. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    Re: Shadows, Yes, call that a development mile stone mark. :)
    TigerPilot, direction thing will be moved to the cursors, after you click you will get the arrow. Also, I was thinking of making the bit shorter on the outside cut tool as well.

    What about the centerline tool? Do you guys think it could be better represented by a shallow curved line? I stuck with the line dash line (------ --- ------) because that is the symbol for a drafting centerline, but I think the tool has more implications.

    Thank you everyone for the feed back.
     
  14. 7up

    7up Moderator Staff Member

    Offline
    Messages:
    1,090
    Trophy Points:
    38
    Location:
    Kentucky
    I like the large set very much, the larger the better for me :shock: nice work.
     
  15. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    I'm not so sure on the dots because our centerline tool doesn't follow dots. Maybe something like the fold tool icon you did, but with a couple of connected lines. Basically something to represent how the tool works.
     
  16. kram242

    kram242 Administrator Staff Member

    Offline
    Messages:
    6,311
    Trophy Points:
    13
    Location:
    NJ
    Maybe you could use the fold tool icon you have now for the centerline tool and make once side of the fold tool flap look like its folded up a little like '_/' As for the center line you could make the line kinda curvy but keep it like it is it looks great.
    Both tools are so much alike that having them look a little alike would be a good thing I think. They would still look different enough when the flap for the fold tool is angled up.
    Just ideas, really great job TV I am really blown away by the quality of them.
    Mark
     
  17. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    I have another thought since I've been cutting at slower speeds, and for those with a capable 600ipm :shock: MKII.

    It seems to me that the way we should be cutting is by moving the bit as fast as possible from cut to cut, and adjusting down to the proper feed rate for a given bit / material.

    Eventually we would like to incorporate a wizard into the script for doing this, but first we need to assemble a database of information.

    For instance the wizard could ask what your maximum ipm rate is for your pp.
    You would select your bit, your material, then the wizard would compute the actual cut speed (given your max speed) adjusting the feed rate to the proper speed, and then boosting the speed to the maximum obtainable to position the bit for the next cut.

    Baby steps though, we need a database first...
    What do you guys think?
     
  18. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    tvcasualty, I thought the script already did that - limiting the speed during the cut but allowing max speed during the transitions. What am I not noticing?
     
  19. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    Well, maybe I'm the only one using the script wrong then! :lol:
    How do you set the various speeds?
     
  20. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    The script dictates the cut speed only. The speed the gantry can move from part to part is set in Mach. I don't know if EMC2 lets you do that. Its your max travel speed.
     
  21. Anonymous

    Anonymous New Member

    Offline
    Messages:
    1,280
    Trophy Points:
    0
    Well, after I reload all the PhlatScript updates back onto this machine I'll be able to talk more intelligently, but maybe I've only gotten lucky. When I've needed, I just set the M3 Sxxxx line in the Gcode and everything has turned out.
    I have a feeling that since my machine is an MK1.5, I don't have the disparities of cut vs. transition speeds that the MKII's have, so I've never noticed a problem. (Nobody with a VW Beetle ever worried about the need for ceramic brake pads.)
    btw, M&T, no insult to the MKI is intended here - I love mine! It's just that I don't think I'll ever need to worry about hearing sonic booms from my gantry doing a rapid Y-move. :lol:
     
  22. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    Take a look at the wiki article on g-code there is some good information, such as rapid move command "G00" as well as using the feed rate command, somthing like...

    G00 x15 y32 (would set rapid movment to that point)
    G01 z1.0 F.05 (would plung bit at a feed rate of .05)

    etc etc.
    I believe this would allow for maximum speed in transition while slowing the feed rate.

    I guess I'm going to have to go home and look at the output of my code to talk more intelligently myself.
     
  23. 3DMON

    3DMON Moderator Staff Member

    Offline
    Messages:
    2,380
    Trophy Points:
    38
    Location:
    Sebastian, Florida
    This is what the phlatscript is already doing. It uses the G0 and G1 commands. Every time you see a G1 command you will see an F command with the seed for the cut. The G0 commands let the gantry move at max speed.
     
  24. tvcasualty

    tvcasualty New Member

    Offline
    Messages:
    637
    Trophy Points:
    0
    I think there has been a vast misunderstanding of the feed rate command. I thought it was a percent of the maximum speed.
    What is your default set at?
    There is another thread that touches on this here:
    viewtopic.php?f=102&t=189
    ...But I feel the question is more or less danced around.

    But here again might be the difference between Mach 3 and ECM.
    In ECM you set each of your axis’s maximum velocity. For instance, my X will fly, my Y will go 45 (not cutting) and Z will go maybe 15. These are all set independently, and should be set for maximum allowable, for the G0 command (max transverse).

    So depending on the material, I want to set my federate accordingly.
    I find using my bit, the foam melts from time to time above 35 ipm. There for my feed rate should be set to 35. (My Z travel will automatically be limited to 15).

    This is not an important detail if you are running the stock bit on a stock MKI, you are limited by your hardware speed anyway when cutting ¼ blue foam.

    But let’s say you now want to cut wood on your MKI with a different bit. You can no longer run as fast as humanly possible. Things need to be slowed down, you don’t need to reconfigure EMC / Mach, only adjust the federate setting.

    But remember, it is in units/min
    of the cutting program, and in most cases (on this side of the pond) is inches per min, NOT a simple percent.
     
  25. gasmasher

    gasmasher New Member

    Offline
    Messages:
    402
    Trophy Points:
    0
    Location:
    Atlanta, GA
    What 3DMON said is correct, the script outputs a feed rate (F) for the G1 command for cutting and G0 for rapid movement. The feed rate that is set in the parameters screen is what will be printed on the G1 lines. The feed override slider in EMC2 allows you to make an adjustment on the fly and is a percentage of the programmed feed rate in the script. For example if your foam is melting on the bit you can bump the slider instead of shutting down and editing the gcode.

    If your script has the following two lines and your feed override is set to %50 the first cut will be at 50 and the second at 100. This override does not change the rapid speed (G0).

    G01 X1.0 Y5.0 F100
    G01 X2.0 Y10.0 F200
     

Share This Page