585,663 active members*
2,860 visitors online*
Register for free
Login
Page 3 of 4 1234
Results 41 to 60 of 71
  1. #41
    Join Date
    Sep 2004
    Posts
    412
    New version works great..... except it's upside down. = P~

    I was doing it right, I guess the previous one that I downloaded didn't work.

    *shrugs*

    Need to be able to specify a canvas size now. When I import pictures, the canvas size changes, but I can't adjust or reset it. I.e. Tracing different elements from multiple pictures.

    Either way, cool program.

    Thanks

  2. #42
    Join Date
    Jul 2003
    Posts
    1220

    Switcher
    Your new version is looking really good.
    I found when drawing I couldn't afford to let the left mouse go else it would generate a G00, Z and Feed change. If this could be disabled somehow on occassions when the user wished. I personally would be quite happy to add these onto the code after doing the drawing but that may not suit everybody.
    Just my 2 cents worth. Thank you for the good work.
    Kiwi.

  3. #43
    Join Date
    Apr 2005
    Posts
    3634
    New version works great..... except it's upside down. = P~
    Deviant, I'll check into that. I plan on doing a overhaul on the scale of the drawing.


    --------------------------------------------------------------------------------------------------

    Switcher
    Your new version is looking really good.
    I found when drawing I couldn't afford to let the left mouse go else it would generate a G00, Z and Feed change. If this could be disabled somehow on occassions when the user wished. I personally would be quite happy to add these onto the code after doing the drawing but that may not suit everybody.
    Just my 2 cents worth. Thank you for the good work.
    Kiwi.
    Kiwi, I can work that in, maybe a MessageBox, or a CheckBox asking you to add that specific "Z" lift off.


    It will be a few days before I can get to this stuff.

    Later...

    Jerry


    .

  4. #44
    Join Date
    Aug 2006
    Posts
    281
    A suggestion for this would be to make something that could import an EPS file. I've done this a few times and it's a pain but it's doable. EPS files are just vector coordinates but tons of good programs write these (Illistrator, Corel Draw, Flash). The format is pretty easy to figure out just opening them with notepad. The hardest part is dealing with Bezier curves. Instead of circles or arcs, all non-straight lines are made with Bezier curves. So you will likely need to calculate them into a bunch of small lines. The only thing I haven't found a good way of handling is an easy efficient way to set the tool height. You could edit it point by point, but that would be a pain.

    If you're interested I can post the code to do most of the work (meaning the EPS import).

  5. #45
    Join Date
    Apr 2005
    Posts
    3634
    If you're interested I can post the code to do most of the work (meaning the EPS import).
    Sounds interesting, post the code, I'm curious.


    Jerry

  6. #46
    Join Date
    Aug 2006
    Posts
    281
    Quote Originally Posted by Switcher
    Sounds interesting, post the code, I'm curious.


    Jerry
    OK, here's what I could dig up quickly. It's in VB6 but shouldn't be hard to port to .NET.

    Code:
    Sub import_Click()
        CommonDialog1.Filter = "EPS (Lines Only)|*.EPS"
        CommonDialog1.ShowOpen
        FileName = CommonDialog1.FileName
        If FileName = "" Then Exit Sub
        Open CommonDialog1.FileName For Input As #1
        temp = ""
        startsave = 0
        While Not EOF(1)
            Line Input #1, lot
            lot = Trim(lot)
            If lot = "%%EOF" Then startsave = 3
            If startsave = 2 Then
                linetype = Right(lot, 1)
                If Len(lot) > 2 Then lot = Left(lot, Len(lot) - 2)
                '******* move
                If LCase(linetype) = "m" Then
                    epstype(x) = "m"
                    cutcur(numcuts, 0) = x
                    If x > 0 Then cutcur(numcuts - 1, 1) = x - 1
                    epsname(numcuts) = "Task #" + Str(numcuts)
                    numcuts = numcuts + 1
                    eps(x, 0) = Left(lot, InStr(lot, " ") - 1)
                    eps(x, 1) = Right(lot, Len(lot) - InStr(lot, " "))
                    mainx = eps(x, 0)
                    mainy = eps(x, 1)
                    x = x + 1
                End If
                '******* line
                If LCase(linetype) = "l" Then
                    epstype(x) = "l"
                    eps(x, 0) = mainx + Val(Left(lot, InStr(lot, " ") - 1))
                    eps(x, 1) = mainy + Val(Right(lot, Len(lot) - InStr(lot, " ")))
                    mainx = eps(x, 0)
                    mainy = eps(x, 1)
                    x = x + 1
                End If
                '******* Curve
                If LCase(linetype) = "c" Then
                    x1 = mainx
                    y1 = mainy
                    x2 = mainx + Val(Left(lot, InStr(lot, " ") - 1))
                            lot = Right(lot, Len(lot) - InStr(lot, " "))
                    y2 = mainy + Val(Left(lot, InStr(lot, " ") - 1))
                            lot = Right(lot, Len(lot) - InStr(lot, " "))
                    x3 = mainx + Val(Left(lot, InStr(lot, " ") - 1))
                            lot = Right(lot, Len(lot) - InStr(lot, " "))
                    y3 = mainy + Val(Left(lot, InStr(lot, " ") - 1))
                            lot = Right(lot, Len(lot) - InStr(lot, " "))
                    x4 = mainx + Val(Left(lot, InStr(lot, " ") - 1))
                            lot = Right(lot, Len(lot) - InStr(lot, " "))
                    y4 = mainy + Val(lot)
                    For per = 0.2 To 1 Step 0.2:'This will break the curve down into steps of .2 - or 5 segments.  This was done for speed and should probably be more like .02 for a smoother curve.
                        epstype(x) = "l"
                        eps(x, 0) = xsp(xsp(xsp(x1, x2, per), xsp(x2, x3, per), per), xsp(xsp(x2, x3, per), xsp(x3, x4, per), per), per)
                        eps(x, 1) = ysp(ysp(ysp(y1, y2, per), ysp(y2, y3, per), per), ysp(ysp(y2, y3, per), ysp(y3, y4, per), per), per)
                        mainx = eps(x, 0)
                        mainy = eps(x, 1)
                        x = x + 1
                    Next
                    epstype(x) = "l"
                    eps(x, 0) = x4
                    eps(x, 1) = y4
                    mainx = eps(x, 0)
                    mainy = eps(x, 1)
                    x = x + 1
                End If
    
            End If
            If lot = "%%EndSetup" Then startsave = 1
            If lot = "IP" And startsave = 1 Then startsave = 2
        Wend
        If x > 0 Then cutcur(numcuts - 1, 1) = x - 1
        x = x - 1
        Close #1
    End Sub

    And you need at least these two functions to ease up the Bezier conversion:

    Code:
     
    Function xsp(x1, x2, p) As Integer
        xsp = ((x2 - x1) * p) + x1
    End Function
    
    Function ysp(y1, y2, p) As Integer
        ysp = ((y2 - y1) * p) + y1
    End Function

  7. #47
    Join Date
    Apr 2005
    Posts
    3634
    This is an updated version "Sketch2Code v1.35".


    ".NET Framework"

    http://www.microsoft.com/downloads/d...displaylang=en


    .
    Attached Files Attached Files

  8. #48
    Klaus Karner Guest

    Gcode Drawing.

    Dear Sr - Maddam.

    My name is Klaus Karner , and im trying to make program that allow me to draw a CNC file.

    i just did somesthing with Vb 2005 , i can draw almost every line , and some arcs.

    do you know where i can obtain information about it.

    thanks

    Klaus+

  9. #49
    Join Date
    Apr 2005
    Posts
    3634
    Klaus,

    Sorry, I didn't see your post sooner.

    This link might help you with VB.net GDI+ code.

    http://www.java2s.com/Code/VB/2D/Catalog2D.htm



    .

  10. #50
    Join Date
    Aug 2006
    Posts
    119

    Realy kool

    Hey Switcher ur program is very well written i dint have any thing to simulate yet but it looks really kool

    Frank

  11. #51
    Join Date
    Apr 2005
    Posts
    3634
    Thanks,

    I have a lot more work to do, before the program is finished.

    Maybe I'll finish it some day soon?




    .

  12. #52
    Join Date
    Apr 2005
    Posts
    3634
    Just to let everyone know, I hope to have an updated version of "Sketch2Code" sometime today.

    The (freehand) g-code should be more efficient.

    I traced a small image (outline), before it produced over 4000 lines of g-code, Now I've got that same image down to less than 450 lines of g-code.

    This version will still be the "Microsoft .NET Framework Version 1.1", after that future versions will be "Microsoft .NET Framework Version 2.0" (I'm trying to stay caught up with MS).


    .

  13. #53
    Join Date
    Apr 2005
    Posts
    3634
    This is version 1.37 of "Sketch2Code", it should produce more efficient g-code than all versions before.



    Note:
    You will need the "Microsoft .NET Framework Version 1.1" (or later) before you can run this program.
    http://www.microsoft.com/downloads/d...displaylang=en
    .
    Attached Files Attached Files

  14. #54
    Join Date
    Dec 2006
    Posts
    839
    Way cool! I just downloaded your latest. I know you already stated you would keep working on this one, but keep working on this one. I see a winner with this program. I have got to build me a mouse-pin or something just to play with this. I will have to go through my junk box, might just be something that can make this work. Hum, I wander what a joystick would be like ? Probably a little to uncontrollable.



    BTW, is there a way to copy/paste the background image down as your drawn lines ?



    Jess

  15. #55
    Join Date
    Apr 2005
    Posts
    3634
    Jess,

    It's been a while since I last worked on Sketch2Code. I always have so much going on.

    You can open a background image & draw/trace on top of the image ( Image / Open Background Image ).



    .
    Attached Thumbnails Attached Thumbnails skcode1.jpg  
    Free DXF - vectorink.com

  16. #56
    Join Date
    Jul 2006
    Posts
    887
    Switcher,
    I just found this thread and read all 5 pages with wonder and amazement. I have not yet downloaded your software yet, but I will! This idea has some very promising potential!!!!!!! Please do not give this idea up.

    I have a tablet and I draw on it from time to time. Only foreseeable problem is that I draw in chicken scratch. Many small lines to create the element of one line. Its how I have always done it. Is your software going to see each little line as one entity?
    Attached Thumbnails Attached Thumbnails bike purple.JPG   dalejr.jpg   DRAW3.jpg   planes1.jpg  


  17. #57
    Join Date
    Mar 2006
    Posts
    474
    Switcher, this program looks great! You don't know how many hours I've spent, at work and at home, printing grid lines over existing artwork, and transfering points with a CAD program.

  18. #58
    Join Date
    Apr 2005
    Posts
    3634
    Quote Originally Posted by Fixittt View Post
    Switcher,
    I just found this thread and read all 5 pages with wonder and amazement. I have not yet downloaded your software yet, but I will! This idea has some very promising potential!!!!!!! Please do not give this idea up.

    I have a tablet and I draw on it from time to time. Only foreseeable problem is that I draw in chicken scratch. Many small lines to create the element of one line. Its how I have always done it. Is your software going to see each little line as one entity?


    Fixittt,

    I don't have a tablet so I'll answer your ? the best I can.

    The way the program works is:

    1) Hold the Left mouse button, to move the "Z-axis" down into the material (this needs to be done the entire length of each individual line).

    2) Draw your line, this will be your "X" & "Y" movement, while cutting.

    3) Release the Left mouse button, to retract the "Z-axis" (Z will be above material (SAFE) for RAPID moves).

    4) Repeat the above steps for the next lines.


    So as far as you working with your Tablet, I would think that anytime you touch the surface of the Tablet, would be the equivalent of me pressing & holding the Left mouse button.


    I'm interested to know your results.


    NOTE:
    Always simulate & dry run the g-code, as this program is not finished.


    .
    Free DXF - vectorink.com

  19. #59
    Join Date
    Oct 2004
    Posts
    742
    Switcher,

    Have you tried the e-pen or I-pen with this program?

    It is a hand held pen that functions as a mouse for signing documents, etc.

    I ordered 2 ea. of these, and plan to try it on your software.

    Jerry

  20. #60
    Join Date
    Apr 2005
    Posts
    3634
    I've only used my PC mouse with this program.

    Is this the same pen here that your trying?

    Keep us posted , on how the e-pen/I-pen work, for you.

    Thanks,


    .
    Free DXF - vectorink.com

Page 3 of 4 1234

Similar Threads

  1. Any Arduino Hand Held Pendant Code?
    By herring_fish in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 04-19-2011, 07:04 PM
  2. Need software help... Corel Draw to EMC2 g-code
    By pencilneck in forum DIY CNC Router Table Machines
    Replies: 12
    Last Post: 10-20-2010, 09:00 PM
  3. Auto cad 3d draw to g-code
    By jorgeneo560 in forum Autodesk
    Replies: 5
    Last Post: 08-03-2008, 06:27 AM
  4. Hand writen G-code VS Cam
    By cadfish in forum Polls
    Replies: 52
    Last Post: 11-23-2005, 03:58 PM

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
  •