Results 1 to 7 of 7

Thread: Scripting Question

  1. #1
    Registered
    Join Date
    Jan 2007
    Location
    USA
    Posts
    20
    Downloads
    0
    Uploads
    0

    Question Scripting Question

    I am currently testing and customizing BCC for a plasma cutting machine, which is still in the building stage. And right now, am focusing on the postprocessor and the scripts that I can utilize specifically for plasma cutting.

    Now, obviously, when you have a drawing that you want to cut out, you need to cut the inside of it prior to the outside. Upon trying to implement that in BCC, the only way I was able to achieve that was by manually selecting and generating GCode for each entity/section of the drawing separately in the order I want it to be cut...so my GCode file will be composed of those sections in the order I specified...which DOES work, however, for more complicated/larger drawings, that tends to be kind of tedious.

    So, the only alternative I could think of is having a dedicated script detect the inner-most section of a drawing, and generate GCode for that section first, and then move outwards until it reaches the outer-most entity.

    Theoretically this should work, however, I have no idea if that's actually a possible, efficient, and "implementable" approach. What do you guys think?

    Another quick question; is anyone in here using BCC for plasma cutting? Please, let me know if you are...I might have a couple questions for ya!

    And, any thoughts/feedback regarding that script would be highly appreciated.

    Regards!
    Looking for an independent unbiased news source?
    Then check out www.informationclearinghouse.info


  2. #2
    Registered
    Join Date
    Aug 2003
    Location
    United States
    Posts
    449
    Downloads
    0
    Uploads
    0
    While creating this type of script is "possible". The creation and runtime of script become an issue.

    Because the BobCAD scripting engine does not allow the user to highlight entities based on their location in the Drawing area, it is up to the user to figure out what is where. This can be done a multitude of ways, my favorite happens to be the array.

    You would need to assign the width, height, minx and miny to arrays for use in condition statements. In order to get that you would need to first generate the code for the entire part and then loop through the code to create the values that would be output.

    It can be quite memory intensive when running it on your computer, but would be the only way to accomlish what you are after.

    Regards


  3. #3
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    314
    Downloads
    0
    Uploads
    0
    maybe im missing something in your description, but in a walk thru phone session with bobcad techie, he showed me that it will generate code in the order that geometry is selected. So if you were to just select everything in the proper order it will string it out just as you did. I use desk cnc for my foamcutter, and it allows you to actually number each part, so when I was trying to use bobcad for something similar I ran into exactly the problem you have. He showed me to create a lead in/out on each part, but im not sure that is a needed part of the process, but if it doesnt work without, try with.
    Hope it works for you. Let me know if it does.

    Ed
    Lemon Curry??


  4. #4
    Registered
    Join Date
    Jan 2007
    Location
    USA
    Posts
    20
    Downloads
    0
    Uploads
    0

    Lightbulb

    I've passed by a somewhat similar script to what I am looking for, but it wasn't written in C or Basic, or a similar high-level language that I am familiar with. But, as far as I could understand from it, it seems it is using arrays to keep track of each entity in the drawing, just similar to the approach The One described.

    At this point, I think such a script will take a good amount of time to work on, so I'd rather spend the time completing other higher-priority project-related issues and then if, time permits, I'll come back to it.

    It would be nice to have that though, but true, it's not gonna be as trivial as I thought it would at the beginning..but worth a try!

    erase42, if I got you correctly, you're referring to utilizing layers @ "...just select everything in the proper oder and it will string it out just as you did."?

    But yeah, it did take me a while to get a grasp on how to do it manually in BCC, and all that related lead-in/out. I am new to the software, so it will take me a good amount of digging into it to have a decent ability to make the most out of its features, and indeed some *bugging* of the BCC tech support guys as well. Thanks for the hints, though!
    Looking for an independent unbiased news source?
    Then check out www.informationclearinghouse.info


  • #5
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    314
    Downloads
    0
    Uploads
    0
    i just went and played with it myself for a few, and yes, when dealing with 2d dxf files, the profiles will be coded and cut in the order you select them. no lead in or outs are needed for this to work, but yes it does work that way with the lead in out as well. so just hold shift and go thru and click each item from the innermost to outermost and click cut all, and you got it. any item that wont select entirely in this manner has some problem in the drawing.
    have fun.
    Lemon Curry??


  • #6
    Registered
    Join Date
    Jan 2007
    Location
    USA
    Posts
    20
    Downloads
    0
    Uploads
    0
    Yeah, I've been experimenting with layers and chains over the past couple weeks. But I'll try your approach further more tomorrow. Thanks erase42

    However, speaking of drawings and inner- to outer-most cutting selection... for more complex designs or drawings, it takes quite a good amount of time to manually decide which lines and loops you want to keep, and which ones you can afford to eliminate, while still keeping the design as descriptive as the original raster file, to a certain degree.

    Like, I am talking about quite complex JPG and BMP files that are vectorized in BOBART and sent to BCC for G-Code generation. Do you or anyone in here have some suggestions on the best way to approach a complex image in BobART?
    Looking for an independent unbiased news source?
    Then check out www.informationclearinghouse.info


  • #7
    Moderator tobyaxis's Avatar
    Join Date
    Jan 2006
    Location
    USA
    Posts
    4394
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by The One View Post
    While creating this type of script is "possible". The creation and runtime of script become an issue.

    Because the BobCAD scripting engine does not allow the user to highlight entities based on their location in the Drawing area, it is up to the user to figure out what is where. This can be done a multitude of ways, my favorite happens to be the array.

    You would need to assign the width, height, minx and miny to arrays for use in condition statements. In order to get that you would need to first generate the code for the entire part and then loop through the code to create the values that would be output.

    It can be quite memory intensive when running it on your computer, but would be the only way to accomlish what you are after.

    Regards
    The One,

    Can this be done by Laters like a specific Layer called "Geometry Selection" in the Layer Dialog Box? Basicly the Script would be looking for a specific Lable in the Layers called "Geometry Selection".

    Just 2 cents from someone that doesn't understand how to write Scripts, or use them.

    This is an example of one of my personal Machine Configurations. Laugh if you must, but it works for me, LOL.


    Cheers!!!
    Attached Files Attached Files
    Toby D.
    "Imagination and Memory are but one thing, but for divers considerations have divers names"
    Schwarzwald

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

    www.refractotech.com


  • Similar Threads

    1. Replies: 11
      Last Post: 03-11-2007, 05:35 AM
    2. Bobcad scripting
      By 69owb in forum BobCad-Cam
      Replies: 1
      Last Post: 05-14-2006, 04:20 PM
    3. Scripting
      By Klox in forum BobCad-Cam
      Replies: 29
      Last Post: 10-02-2003, 11:11 PM

    Posting Permissions



    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.