![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Coding Post your Coding for opensource projects here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
i 'm new to this vb stuff , ive been working on a small program that works along side of inkscape , i import a bitmap into inkscape ,trace it and save it as a latex file , then i copy and paste the latex file into my program and it produces gcode , the problem i am facing is i have no control over the dimensions inkscape saves the file as , so what i need to do is a mass division of all the numbers so that i can scale down the gcode to the size that i want to be cutting at is it possible to do this , i have searched the net over and over again but i cant find anything showing how to divide all the numbers by 100 or so . so far the code simulates well but my machine isn't big enough to cut something that is 1024" x 780" any input would be greatly appreciated |
|
#5
| ||||
| ||||
| ah your a good Man ! ive been beating my head against the keyboard trying to figure this out i think its going to be a great lil app once its all completed , ive just got to get past the learning curves |
| Sponsored Links |
|
#6
| ||||
| ||||
| Well I can't find the source I have, I had a similar project a while back, I know I have it I just can't find it on my pc. I've got about 1000 diff. files that are all source code for vb.net 03 & 05. I did post a sample code of how to use "Replace" (vb.net 2005), it should work with your 2008. I'll keep looking for the code I planned on posting. As far as what your trying to do, will your file have numbers & letters (X,Y,Z)? . |
|
#7
| ||||
| ||||
| the numbers will have have xyz , they start off as line to curve to and i convert them overto g1 xyz , heres more or less what ive done to this point ,ive included a test latex file , i open the latex file and copy and paste it into the converter , i still need to figure out how to deal with the curves , right now they are g1 moves |
|
#8
| ||||
| ||||
| This might help with the division & decimal. This code will also Format the numbers so you can specify how many decimal places in each direction (left/right) you want the numbers to be, so you don't end up with numbers like 123.123456789 Add a button & a textbox to a form, then double click the button while in the designer, that will open up a new click event for the button in the text editor of vb.net, then copy & paste the code below into that new click event that vb.net created, then run your program & click the button. Dim D1, D2 As Decimal D1 = 10 D2 = 0.7 TextBox1.Text = Format(Decimal.Divide(D1, D2), "##0.000") . |
|
#10
| ||||
| ||||
| i strip down some of the stuff within the converter ,but i still have a few more garbage lines to pull out of the generated gcode ,im not sure how to outright delete them so ive replaced them with a line space , which i will need to figure out how to close them up at a later time , i still need to add a textbox for z moves and stuff , its this mass division of all the numbers that has me stumped |
| Sponsored Links |
|
#11
| ||||
| ||||
| Try this, you need a richtextbox & a button. Put this code in the button click event, run your program, then enter a number in the richtextbox with decimal (123.123). Then press the button. Your answer should be 24.6246 at the top of your form/project.
. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mass-cnc Job Opportunity | mkmk123 | Employment Opportunity | 2 | 09-18-2007 06:58 PM |
| Mass software? | bdrmachine | Mechanical Calculations/Engineering Design | 9 | 01-19-2007 02:33 PM |
| Need CNC Machinists in MASS | StarCatcher | Employment Opportunity | 20 | 10-27-2006 02:14 AM |
| Looking for small shop space - NE Mass or SE NH | InspirationTool | Mentors & Apprentice Locator | 1 | 03-20-2006 07:27 AM |
| mass produced | skeetboy25 | I.C. Engines | 4 | 08-11-2003 08:47 PM |