CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Visual Basic


Visual Basic Discuss Visual Basic programing.


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-05-2006, 11:00 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,659
Blog Entries: 2
Switcher is on a distinguished road
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?





.
Attached Thumbnails
Click image for larger version

Name:	Sample_Code.JPG‎
Views:	1098
Size:	134.3 KB
ID:	16443  
__________________
Free DXF Files - Vectorink.com - myDXF.blogspot.com

Last edited by Switcher; 04-05-2006 at 10:17 PM.
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 04-05-2006, 11:43 AM
santiniuk's Avatar  
Join Date: Nov 2004
Location: U.K - England
Posts: 389
santiniuk is on a distinguished road

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
Tweet this Post!Share on Facebook
Reply With Quote

  #3  
Old 04-05-2006, 11:53 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 19,570
ger21 is on a distinguished road
Buy me a Beer?

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

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Tweet this Post!Share on Facebook
Reply With Quote

  #4  
Old 04-05-2006, 08:04 PM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,659
Blog Entries: 2
Switcher is on a distinguished road

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
Click image for larger version

Name:	Sample_1.JPG‎
Views:	492
Size:	132.7 KB
ID:	16475  
__________________
Free DXF Files - Vectorink.com - myDXF.blogspot.com
Tweet this Post!Share on Facebook
Reply With Quote

  #5  
Old 04-05-2006, 09:18 PM
dertsap's Avatar
Gold Member
 
Join Date: Oct 2005
Location: canada
Posts: 3,608
dertsap is on a distinguished road
Buy me a Beer?

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
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 04-06-2006, 10:00 AM
 
Join Date: Mar 2004
Location: Iowa, USA
Posts: 264
rippersoft is on a distinguished road

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
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 04-18-2006, 08:55 AM
 
Join Date: Oct 2004
Location: United States
Posts: 40
Donald is on a distinguished road

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
Tweet this Post!Share on Facebook
Reply With Quote

  #8  
Old 05-26-2006, 10:30 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,659
Blog Entries: 2
Switcher is on a distinguished road

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 Files - Vectorink.com - myDXF.blogspot.com
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 05-26-2006, 01:17 PM
 
Join Date: Mar 2004
Location: Iowa, USA
Posts: 264
rippersoft is on a distinguished road

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
Tweet this Post!Share on Facebook
Reply With Quote

  #10  
Old 05-26-2006, 01:29 PM
Gold Member
 
Join Date: Oct 2004
Location: USA
Posts: 742
CJL5585 is on a distinguished road

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
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11  
Old 06-10-2006, 11:01 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,659
Blog Entries: 2
Switcher is on a distinguished road

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
File Type: zip ScetchCode.zip‎ (7.6 KB, 553 views)
__________________
Free DXF Files - Vectorink.com - myDXF.blogspot.com
Tweet this Post!Share on Facebook
Reply With Quote

  #12  
Old 06-10-2006, 12:06 PM
Gold Member
 
Join Date: Oct 2004
Location: USA
Posts: 742
CJL5585 is on a distinguished road
Error

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

Jerry
Tweet this Post!Share on Facebook
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -5. The time now is 06:44 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353