Draw G-Code by Hand (Interested) ??


Page 1 of 4 1234 LastLast
Results 1 to 20 of 71

Thread: Draw G-Code by Hand (Interested) ??

  1. #1
    Member Switcher's Avatar
    Join Date
    Apr 2005
    Location
    United States
    Posts
    3634
    Downloads
    0
    Uploads
    0

    Arrow Draw G-Code by Hand (Interested) ??

    I have been working on a new 2D program, in Visual Basic .NET 2003. The program will let you draw an image with your mouse, it tracks the cursor "X" & "Y" coordinates, the "Z" up/down is controlled with the left mouse button, while the cursor is over the picturebox.

    The attached screenshot shows all the rapid moves in Red, all the drawing in light blue, and the green line sends the machine Home (with the click of the "Finish Code" button, at the bottom right side of the screen) Then will finish out the code with things like "M30"

    On the right side is all the g-code produced (as you draw your image)
    Don't flame me about the g-code you see in the image, I've only just started this project (and about 10 others)
    You might notice "N15" that was the starting Point (Left Mouse Button Down = Z=-10.500 F50) of the drawing. By the way the text drawn is supposed to read "Switcher", the Rapid moves make it hard to read.

    What I want to know is, would anyone have an interest in a program like this?

    I would like to hear what everyone thinks, about this, should I finish it, or forget it?





    .

    Similar Threads:
    Attached Thumbnails Attached Thumbnails Draw G-Code by Hand (Interested) ??-sample_code-jpg  
    Last edited by Switcher; 04-05-2006 at 10:17 PM.
    Free DXF - vectorink.com


  2. #2
    Registered santiniuk's Avatar
    Join Date
    Nov 2004
    Location
    U.K - England
    Posts
    389
    Downloads
    0
    Uploads
    0

    Default

    Switcher,

    I love the sound of this concept. In fact I had similar thoughts a couple of weeks ago when something I requiring cutting required a dxf to be generated and then G-Code from this.

    My concept is exactly the same as yours except I wanted to use my Wacom A3 Graphics tablet that would 'appear' as a mouse in your program.

    post : http://www.cnczone.com/forums/attach...chmentid=16115

    Shows the end result of what I wanted. Another great program under development (CamBam!)

    I had an old bashed up trophy - Shield. It would fit on my graphics tablet and using the pen I could simply run the pen around the shield on the tablet and hopefully create the g-code. Maybe some manual editing also.

    I'm reasonably profficient in VB6 and recently purchased Studio 2005 .Net for work use although I have not had time to play with it in detail yet.

    If you would like to post your .exe I'm willing to try the tablet idea out and post the results. If the code is open I'd love to take a look at it in .Net and see it progress.

    Thank you.

    Shaun



  3. #3
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default

    I have a tablet as well I coud try. An older Wacom ArtZ II 12x12. It should work MUCH better than a mouse.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

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


  4. #4
    Member Switcher's Avatar
    Join Date
    Apr 2005
    Location
    United States
    Posts
    3634
    Downloads
    0
    Uploads
    0

    Default

    Thanks santiniuk & ger21 for your input.

    I agree with both of you about the drawing with the mouse, the end result is not good enough. I have been thinking about that while working on this project. I don't have a Tablet or Pen, so for now I'll have to deal with my lame old mouse for the drawing.

    I have been googling for something else other than a Tablet to draw with, (a Pen only) no tablet. They do exist, though some limitations., like you can't draw on a white surface, and most are very bulky around the point. The Tablet idea is great, for items smaller than the tablet drawing area. What I want is to make a parameter in my program that the end user can adjust his own working area limitions, this would define the drawing area (Picturebox) on the monitor. I'm thinking that If the user had a very large object example: 4x8 sheet of plywood with irregular shapes, he could just trace any part of it and produce the code (maybe he only wants a certain object out of the whole 4x8 sheet) of course the pen would have to be wireless, for an object that large.

    The program does not produce any usable code (YET) I'm still working on that. Like most folks here, I have so much going on, I try and code as often as I can, which is not as often as I would like.

    I'll be out of town till Monday, so It will be next week before I can wrap this up enough for you guys to try on your tablets, again I may not have the g-code side of this finished by then, still you can try it out and let me know what you think.

    santiniuk, the program isn't open source yet, I might consider that later on. If it does go open, I'll post it here on the zone.

    Here is a link to something I found that is very close to what I would like to use for the drawing pen http://www.zyonshop.com/product/ipen.htm

    Here is another screen shot, with the (Red) Rapid moves made transparent, so you can see what the image looks like a little better. It took about 10 seconds to sketch in the program. Look at the top right side of the screenshot (above "Checkbox1") the "901" is the number of g-code lines produced while drawing.

    Again thank you both for your input, it really does help.

    Attached Thumbnails Attached Thumbnails Draw G-Code by Hand (Interested) ??-sample_1-jpg  
    Free DXF - vectorink.com


  5. #5
    Member dertsap's Avatar
    Join Date
    Oct 2005
    Location
    canada
    Posts
    4230
    Downloads
    1
    Uploads
    0

    Default

    that would be really cool to be able to free hand like that , it could come in handy for a number of things , but the first thing that came to my mind is my two boys , ive been trying to explain to the cad/cam ,and they seem interested but aren t getting the concept , but if they can free hand and create code that would be cool ,they can see their creations being made ,
    free hand designs for cabinetry would be nice also

    when i tell my friends who are machinists that im teaching the boys cnc , they all laugh and say "don t like your kids much do you"

    great idea dude i say finish it



  6. #6
    Registered
    Join Date
    Mar 2004
    Location
    Iowa, USA
    Posts
    261
    Downloads
    0
    Uploads
    0

    Default

    This could could be real interesting when combined with gcode-to-dxf. There have been a number of times I have wanted to convert a graphic into something I can use to cut as an outline instead having to carve the whole image. Wintopo and other edge detectors just really don't cut it.

    I also program and would be interested in helping out where I can.

    Thanks,
    RipperSoftware



  7. #7
    Registered
    Join Date
    Oct 2004
    Location
    United States
    Posts
    40
    Downloads
    0
    Uploads
    0

    Default

    Switcher,
    Do us a favor and don't drop this project, I have many woodworking friends that have thousands of templets, I've been attempting to trace them on paper, scanning and using Inkscape to conevert to vectors. And then piecing the 8 x 11 tracings back together in cad software.
    I can see where this program will be very useful, providing that it can also save to a dxf for editing and tweaking.

    Keep up the good work.
    Don



  8. #8
    Member Switcher's Avatar
    Join Date
    Apr 2005
    Location
    United States
    Posts
    3634
    Downloads
    0
    Uploads
    0

    Default

    Just an update,
    I havn't dropped this, I'm still working on the GDI+, and scaling the drawing.

    Thanks for the interest, all.

    I think I've decided to, hack my optical mouse for the input, (build my own pen).

    Maybe go with a bluetooth wireless optical mouse (hack, into a pen) later on.

    Later...

    Free DXF - vectorink.com


  9. #9
    Registered
    Join Date
    Mar 2004
    Location
    Iowa, USA
    Posts
    261
    Downloads
    0
    Uploads
    0

    Default

    Back in the late 80's I used a drawing pad that had a magnetic "mouse" and it had a crosshair for spotting XY. The device also had buttons to start and stop the drawing.

    Instead of hacking a mouse, why not make a crosshair and mount to the front or side of the mouse. Mill out of the clear plastic CD that is usually on top of a CD spindle stack.

    With a laser mouse (ball-less mouse), you could make a mount that would be the outline of the mouse body and has a bumpout semicircle at the front for the crosshair. Mill a hole for the laser to look thru. Crazy glue the mouse to the mount.

    RipperSoftware



  10. #10
    Registered
    Join Date
    Oct 2004
    Location
    USA
    Posts
    742
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by rippersoft
    Back in the late 80's I used a drawing pad that had a magnetic "mouse" and it had a crosshair for spotting XY. The device also had buttons to start and stop the drawing.

    Instead of hacking a mouse, why not make a crosshair and mount to the front or side of the mouse. Mill out of the clear plastic CD that is usually on top of a CD spindle stack.

    With a laser mouse (ball-less mouse), you could make a mount that would be the outline of the mouse body and has a bumpout semicircle at the front for the crosshair. Mill a hole for the laser to look thru. Crazy glue the mouse to the mount.

    RipperSoftware
    My Microsoft Mouse has 3 laser LED's and are arranged in a specific pattern in order to work. Don't think this would work on the mouse I have.

    Jerry



  11. #11
    Member Switcher's Avatar
    Join Date
    Apr 2005
    Location
    United States
    Posts
    3634
    Downloads
    0
    Uploads
    0

    Default

    This is just a sample of my program.

    The g-code isn't correct, so you can't save as a text file yet, don't want machines crashing!

    The thing I'm working on is the GDI+, I need the screen to re-paint the image faster than it is, now. When you first start the program all it will do is draw to the screen, If you check the "Add G-Code", it will add the "X" & "Y" locations to the textbox. Then you will see that the drawing isn't painting fast enough.

    To clear everything out (Image, Text) click on "File|Clear All"






    .

    Attached Files Attached Files
    Free DXF - vectorink.com


  12. #12
    Registered
    Join Date
    Oct 2004
    Location
    USA
    Posts
    742
    Downloads
    0
    Uploads
    0

    Default Error

    I get a runtime error (initialization error) when I try to run the file.

    Jerry



  13. #13
    Member Switcher's Avatar
    Join Date
    Apr 2005
    Location
    United States
    Posts
    3634
    Downloads
    0
    Uploads
    0

    Default

    Anyone else get the same error ?

    .

    Free DXF - vectorink.com


  14. #14
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default

    Works fine here.

    One thing that I see, is that you should figure out a way that if you moving horizontally or vertically, it will write a single line of code for the straight move, rather than a line of code for every .001 along the straight line. As long as the X or Y value isn't changing. don't write code. As soon as both axis change, then write the code.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

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


  15. #15
    Member
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1220
    Downloads
    0
    Uploads
    0

    Thumbs down

    Unable to open....."The application failed to initialize properly"......Windows XP



  16. #16
    Member Switcher's Avatar
    Join Date
    Apr 2005
    Location
    United States
    Posts
    3634
    Downloads
    0
    Uploads
    0

    Default

    CJL5585, Kiwi

    Thanks for the help, do both of you have administrator rights, on your PC?

    Also, is this number (0x0000022) with the error your getting?



    .

    Free DXF - vectorink.com


  17. #17
    Member Switcher's Avatar
    Join Date
    Apr 2005
    Location
    United States
    Posts
    3634
    Downloads
    0
    Uploads
    0

    Default

    One thing that I see, is that you should figure out a way that if you moving horizontally or vertically, it will write a single line of code for the straight move, rather than a line of code for every .001 along the straight line. As long as the X or Y value isn't changing. don't write code. As soon as both axis change, then write the code.
    ger21 ,

    Thanks, I also noticed the excess g-code with straight lines. Thats on my list of things to work on.

    I might just add a button to switch between freehand and straight line drawing. Then give the user an option to lift of "Z-axis" or not.

    I still have a ways to go, on this program.

    Thanks again.


    .

    Free DXF - vectorink.com


  18. #18
    Member
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1220
    Downloads
    0
    Uploads
    0

    Default

    Error code (0xc0000135)
    administrator rights....Is this a setting? This is a stand alone PC and only one user.



  19. #19
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default

    How about holding the shift key to lock into straight line mode while it's held down?

    I'm using XP Pro, btw, and didn't have any problems. Isn't it fun trying to figure out why it doesn't work on some PC's.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

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


  20. #20
    Registered leberen's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    106
    Downloads
    0
    Uploads
    0

    Default

    I also am unable to run the program... tried opening in winzip and installing on desktop. The use of a "spaceball" would increase production I would think, I also like the idea of a spaceball and applying different commands like "erase" on the many buttons.



Page 1 of 4 1234 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Draw G-Code by Hand (Interested) ??

Draw G-Code by Hand (Interested) ??