Problem long lines of code

General Discussion about anything!
cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Problem long lines of code

Post by cvoinescu » Wed Mar 26, 2014 10:20 pm

Hey, there's absolutely nothing wrong with GordonRB's approach. I would have done the same, except I would have used Visual Studio's editor rather than Word. I use Excel for a lot of things like that, and I sometimes go back and forth between Excel and the text editor, using regexp search-and-replace and rectangular selection a lot. (Only if I need to do something more than a couple of times I do it in Python.)
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

MeanderBolt
Posts: 560
Joined: Mon Nov 04, 2013 6:45 pm
Location: Georgia
Contact:

Re: Problem long lines of code

Post by MeanderBolt » Thu Mar 27, 2014 12:31 pm

No doubt, I use excel for a ton of things. The VBA abilities allow you to do massive things and fairly easily. The only problem is that vba can get a little lengthy to do some things. Another issue is that vba functions do not work well on mac.

I am trying to work strictly in metric. Living in the US, I have been pretty much pushed into imperial, but metric always seemed to make more sense (the whole 10 base thing). Plus the rest of the world is metric. It is sort of sickly funny, we sailed away to start a new country just to keep imperial rule. Sorry, Not the point. So being that I wanted to wrap my head around metric, having the fight with MakerCam was too much to deal with on top of everything else I was trying to figure out at the time. So, I decided to use CamBam. There are so many issues that are resolved immediately. I have said this in other posts, but, while there is a cost associated with CamBam, so is my time. If I do not have to spend it fighting with software, I am good with that. More, $150 is not that steep of a price tag. Plus you get 40 free uses, which is quite generous, AND you can use metric.
Shapeoko 2 # 3569 - DW660
Current tool chain > Draftsight > CamBam > ChiliPeppr
Build log

edwardrford
Posts: 1250
Joined: Mon Apr 09, 2012 5:40 pm
Location: Dixon, IL
Contact:

Re: Problem long lines of code

Post by edwardrford » Thu Mar 27, 2014 1:38 pm

A couple of things:

1.) I thought the solution was great. I'm sure all of us do work arounds like that all the time! The comic fails to mention the positive side of troubleshooting your own problems. Then again, it's just a comic.
2.) Meanderbolt's comment about excel and vba was spot on. At work, I use that combo for everything. If I could make a sandwich with vba, I would.
3.) At some point in time, someone submitted a patch for makercam that did truncate metric lines appropriately to 3 digits past the decimal. The problem was, that patch made all circles appear like stairsteps... so I had to roll it back.

-Edward
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: Problem long lines of code

Post by RobCee » Thu Mar 27, 2014 1:42 pm

The latest 1.0.7 version of UniversalGcodeSender has the ability to truncate the decimals (defaults to 4) on the fly. I have not tried the function myself, but it sounds like a good way forward.
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

GordonRB
Posts: 5
Joined: Mon Mar 24, 2014 11:22 am
Location: Aberdeen, Scotland
Contact:

Re: Problem long lines of code

Post by GordonRB » Thu Mar 27, 2014 6:59 pm

MeanderBolt wrote:No doubt, I use excel for a ton of things. The VBA abilities allow you to do massive things and fairly easily. The only problem is that vba can get a little lengthy to do some things. Another issue is that vba functions do not work well on mac.

I am trying to work strictly in metric. Living in the US, I have been pretty much pushed into imperial, but metric always seemed to make more sense (the whole 10 base thing). Plus the rest of the world is metric. It is sort of sickly funny, we sailed away to start a new country just to keep imperial rule. Sorry, Not the point. So being that I wanted to wrap my head around metric, having the fight with MakerCam was too much to deal with on top of everything else I was trying to figure out at the time. So, I decided to use CamBam. There are so many issues that are resolved immediately. I have said this in other posts, but, while there is a cost associated with CamBam, so is my time. If I do not have to spend it fighting with software, I am good with that. More, $150 is not that steep of a price tag. Plus you get 40 free uses, which is quite generous, AND you can use metric.
I am currently on contract with an American Company. All my designs and documentation now have to be in dual units - gets VERY confusing at times. The saving grace it takes longer to do - so I get paid more. RESULT!!!
I also had problems with the gcode-truncator doing weird circles, so think I will stick with the word/excel/word solution for the time being.
Does anyone have any advice on a program (don't mind paying reasonable cost) to convert 3D CAD to CNC which I can use for making parts like turtle-decks, wheel hubs wing tips etc for RC planes? The last time I programmed anything it was in BASIC so don't ask me to do anything involving coding!

twforeman
Posts: 1351
Joined: Tue Jan 29, 2013 4:51 pm
Location: Minneapolis, MN
Contact:

Re: Problem long lines of code

Post by twforeman » Thu Mar 27, 2014 7:07 pm

The easiest, free way to make G code from a 3D part is to export an STL file and use FreeMill to generate the G code.

FreeMill is pretty dead simple to use.
Ender 3 3D Printer
ShapeOko v3 serial #0004 - upgrade thread
All of my ShapeOko related blog posts

Oud
Posts: 23
Joined: Sat Dec 07, 2013 5:54 am

Re: Problem long lines of code

Post by Oud » Sat Mar 29, 2014 8:55 pm

I like using scite to edit/write gcode. It's a (free) plain text editor for editing code files (html, php, c, python, xml, etc ...) So its a one program approach, no need to alter extensions or remove text encoding from non-plain text editors. Very light on computer resources and can be made to colour code the text which makes it far easier to read. And once again... FREE!

You could also check out programmers notepad or notepad++.
Stock Shapeoko2, First pre-order batch.

WillAdams
Posts: 8604
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Problem long lines of code

Post by WillAdams » Sat Mar 29, 2014 9:54 pm

I like using Scite as well, and often pass G-Code through it to fix the too-long lines problem.

Usually I use an old version of NC-Plot (from back when it was free) --- need to look into NC Corrector though.
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

Post Reply