Introduction: CNC ASCII Art

About: Architect, Brazilian, father of two beautiful girls, lover of comics, science fiction, board games, elements that inspire some of my creations.

Who has over 40 years certainly have heard, or even printed on a dot matrix printer, what popularly known as ASCII Art. Built originally as an economical way to transmit images in BBS (Board System Bulletin), is an artistic expression intimately linked to the beginning of the popularization of computers. I even got to waste meters of continuous form to assemble panels with this type of "image", formed from the conversion of the points of the images in ASCII characters.

Quem tem mais de 40 anos com certeza já ouviu falar, ou mesmo imprimiu em uma matricial, aquilo que popularmente ficou conhecido como ASCII Art. Criada originalmente como uma forma econômica de transmitir imagens em BBS (Boletim Board System), é uma expressão artística intimamente ligada ao início da popularização dos computadores. Eu mesmo cheguei a desperdiçar metros de formulário contínuo para montar painéis com este tipo de "imagem", formada a partir da conversão dos pontos das imagens em caracteres da tabela ASCII.

If before you needed programs installed on your computer to perform this conversion, today we find great sites that enable online conversion of images. I especially love the http://asciiart.club/, which allows various settings to get the best results with your image. Well, I decided to gather ASCII Art and CNC to create some pictures, and here I gather the necessary tips you can generate a clean vector file for use on your CNC.

Se antes você precisava de programas instalados em seu computador para realizar esta conversão, hoje encontramos ótimos sites que permitem a conversão online das imagens. Eu particularmente adoro o http://asciiart.club/ , que permite diversas configurações para obter o melhor resultado com sua imagem.Bom, eu resolvi reunir ASCII Art e CNC para criar alguns quadros, e aqui reuno as dicas necessárias para você conseguir gerar um arquivo vetorial limpo para usar em sua CNC.

Step 1: Converting / Convertendo

The first step is to choose your image. For this article, we will use the good old robot Instructables. For raw work, we will use http://asciiart.club/ to generate the first version of our ASCII Art. You will select the image on your computer and click the "GO" button. A version of it will be created using the site's default settings. You will have, in the order they appear just below the preview art, sliders for sharpness control, color and intensity of light and dark of the original image. Below them, color settings, text and dimensions in addition to regenerate button to apply the changes made in the 3 sliders.

O primeiro passo é escolher sua imagem. Para este artigo, vamos usar o bom e velho robô do Instructables. Para o trabalho bruto, vamos usar o http://asciiart.club/ para gerar a primeira versão da nossa ASCII Art. Você vai selecionar a imagem em seu computador e clicar no botão "GO". Uma versão dela vai ser criada usando as configurações padrões do site. Você vai ter, na ordem em que aparecem logo abaixo do preview da arte, sliders para controle de nitidez, cor e intensidade de claros e escuros da imagem original. Abaixo deles, as configurações de cor, texto e dimensões, além do botão regenerar, para aplicar as modificações realizadas nos 3 sliders.

First let's set our art, focusing on two points, the text and the size. Clicking text, we choose only ASCII option. With this only the 128 standard ASCII characters are used (One tip, if you do the work on a CNC router, customize your choice giving preference to capital letters, it has better definition when engraved in smaller dimensions.). In size, we have to define how many columns and rows will have our art. In the first charge, the site always automatically set for 80 columns (it was one of the most common widths in dot matrix printers) and sets the time automatically. The more columns, higher definition will have its design, however, if not using a Laser CNC or a large router, the ideal is to keep that number between 100 and 200 columns. For our example, I used 100 columns, and the height was adjusted accordingly.

Primeiramente vamos configurar nossa arte, nos concentrando em dois pontos, o texto e a dimensão. Clicando em texto, vamos escolher a opção somente ASCII. Com isso somente os 128 caracteres do tabela ASCII padrão serão utilizados (Uma dica, se for realizar o trabalho em uma router CNC, customize sua escolha dando preferência a letras maiusculas, pois tem melhor definição quando gravadas em menores dimensões.). No tamanho, temos que definir quantas colunas e linhas nossa arte vai possuir. Na primeira carga, o site sempre configura automaticamente para 80 colunas (era uma das larguras mais comuns em impressoras matriciais) e configura a altura automaticamente. Quanto mais colunas, maior definição terá seu desenho, contudo, se não for utilizar uma CNC Laser ou uma router de grandes dimensões, o ideal é manter esse número entre 100 e 200 colunas. Para nosso exemplo, utilizei 100 colunas, e a altura foi ajustada proporcionalmente .

The next step is the adjustment of the slides. In my case, I produced the art for use in a CNC Router, first I adjusted the color (second slider) to monocrome. If you will work with a laser, you can keep the colors to have different intensities of lines. In the case of our robo, increased image sharpness (first slider) and the intensity of the light spots (third slider). With this, you will have a very similar picture as that accompanies this step. Then, open Notepad, copy and paste the end result of the conversion, saving it then. If you do not have this job, my version of TXT file is attached to the step.

O próximo passo é o ajuste dos slides. No meu caso, que produzi a arte para usar em uma CNC Router, primeiramente ajustei a cor (segundo slider) para monocrome. Se você vai trabalhar com uma laser, pode manter as cores para ter diferentes intensidades de linhas. No caso do nosso robo, aumentei a nitidez da imagem (primeiro slider) e a intensidade do pontos claros (terceiro slider). Com isso, você vai ter uma imagem bem parecida como a que acompanha este passo. Feito isso, abra o bloco de notas, copie e cole o resultado final da conversão, salvando-o em seguida. Se não quiser ter este trabalho, minha versão do arquivo TXT esta anexada ao passo.

Step 2: Understanding the Basics/Entendendo O Básico

One of the first things we need to understand this kind of art is that it is very dependent on the fonts used. To achieve the desired effect is necessary to use the monospaced type fonts, ie all sources have the same width, no matter what size the character has. On Windows computers, the most common is Courrier News. It could be used to create our vector, but have a problem when we think of router recording, it is not the simple line type.

Uma das primeiras coisas que precisamos entender neste tipo de arte é que ela é muito dependente das fontes usadas. Para conseguir o efeito desejado é necessário utilizar fontes do tipo mono espaçadas, isto é, todas as fontes possuem a mesma largura, não importa o tamanho que o caracter possui. Em computadores Windows, a mais comum é Courrier News. Ela poderia ser utilizada na criação de nosso vetor, mas possui um problema quando pensamos em gravação com router, ela não é do tipo linha simples.

Most of the fonts has an internal line and other external, and what you see on your computer screen is the padding between these lines. When we talk about CNC, the ideal is that the source has a single line to be "scratched" because the spacing of lines in the vector is so small that it makes no difference in the outcome. There are some options on the internet sources simple line, and my favorite is the CNC Vector, available in http://www.philing.net/fonts.html site. She inda has some characters with double lines (overlapping), but we'll fix it in another step, but the biggest problem is that it is not monospaced font. In fact I found no single online source that was then using the FontForge program ( https://fontforge.github.io/en-US/ ) the "converted" in a monospaced font. This modified version is attached to this step. So, before you continue, download and install on your computer.

A maior parte das fontes possui uma linha interna e outra externa, e o que você vê na tela de seu computador é o preenchimento entre estas linhas. Quando falamos de CNC, o ideal é que a fonte possua uma única linha para ser “riscada”, pois o afastamento das linhas no vetor é tão pequeno que não fará diferença no resultado final. Existem na internet algumas opções de fontes linha simples, e a minha preferida é a CNC Vector, disponibilizada no site http://www.philing.net/fonts.html Ela inda possui alguns caracteres com linhas duplas (sobrepostas), mas resolveremos isso em outro passo, mas o maior problema é que ela não é fonte mono espaçada. Na verdade eu não encontrei nenhuma fonte linha simples que o fosse, então, utilizando o programa FontForge ( http://www.philing.net/fonts.html ) a “converti” em uma fonte mono espaçada. Essa versão modificada está anexada a este passo. Então, antes de continuar, baixa e a instale em seu computador.

Step 3: Enhancing Art / Aprimorando a Arte

Our next step will be in Inskscape ( https://inkscape.org ). Open a document and set the page size in the size you want to carve your art. I use the size of 340x300mm, which is the desktop of my router. If you have closed the TXT file of your art, open it again.

Nosso próximo passo será no Inskscape ( https://inkscape.org ). Abra um documento e configure a dimensão da página no tamanho em que pretenda reproduzir a sua arte. Eu utilizo a dimensão de 340x300, que é a área de trabalho da minha router. Caso tenha fechado o arquivo TXT da sua arte, abra-o novamente.

Now we will open a text box with the Text tool by clicking a point on the screen and dragging the cursor. The size of the box can be adjusted later, do not worry of this first moment it is too big or small. Then, copy and paste your art inside this box. Probably it will seem strange, but this is because the default font that Inkscape links the box. Keep the selected text and choose the modified version of our CNC Vector. Apparently everything will disappear! Do not despair, open the box filling and set a color for the contours. If you still art seem unconfigured, you'll need to adjust the size of the box, so that all lines are visible; and adjust the font size. In my tests, the ideal size was between 11 and 12pts. smaller only with laser or tightly closed angles tools; dimensions larger, only if you have a more comfortable workspace.

Agora iremos abrir uma caixa de texto com a ferramenta texto, clicando em um ponto da tela e arrastando o cursor. A dimensão da caixa pode ser ajustada posteriormente, não se preocupe de nesse primeiro momento ela ficar muito grande ou pequena. Feito isso, copie e cole sua arte dentro desta caixa. Provavelmente ela ira parecer esquisita, mas isto é por causa da fonte padrão que o Inkscape vincula a caixa. Mantenha o texto selecionado e escolha a versão modificada de nossa CNC Vector. Aparentemente tudo vai sumir! Não se desespere, abra a caixa preenchimento e defina uma cor para os contornos. Se ainda assim a arte parecer desconfigurada, você precisara ajustar o tamanho da caixa, para que todas as linhas fiquem visíveis; e ajustar o tamanho da fonte. Em meus testes, a dimensão ideal ficou entre 11 e 12pts. Dimensões menores só com ferramentas de ângulos bem fechados ou laser; dimensões maiores, só se você tiver uma área de trabalho mais folgada.

His art should now be appearing properly on screen. To refine it, I recommend importing the original image to the inkscape, scale it to the desired size, and overlap the ASCII Art. With this you can check that both are proportional, and adjust the size and spacing of the line, if necessary. You can also add or remove characters, for greater fidelity to the original image. With the adjustments made, you can get rid of the original image. That done, it's time to convert text to vector. With the text box selected, we will use the Object to Path (Shift + CRLT + C). He will break the text box on many different vectors, and could now be used to generate the code needed for our CNC, saving the drawing in DXF format. However, we still have a little problem to solve, the overlapping lines.

Sua arte agora deve estar aparecendo adequadamente na tela. Para refina-la, recomendo importar a imagem original para o inkscape, escala-la para a dimensão desejada, e sobrepor a ASCII Art. Com isso você pode conferir se ambas estão proporcionais, e ajustar as dimensões se necessário. Também poderá adicionar ou remover caracteres, para ter maior fidelidade com a imagem original. Com os ajustes feito, pode se livrar da imagem original. Feito isso, é hora de converter o texto em vetor. Com a caixa de texto selecionada, iremos usar o comando Objeto para Caminho (SHIFT+CRLT+C). Ele ira quebrar a caixa de texto em diversos diversos vetores, e que já poderiam ser utilizados para gerar os códigos necessários para nossa CNC, salvando o desenho em formato DXF. Contudo, ainda temos um pequeno problema para resolver, as linhas sobrepostas.

Although not shown, the closed character, with O, B, D lines have duplicate, and remove them manually is not a pleasant task. To make our life easier, we will use other software that can do this for us without difficulty, Autodesk Autocad. To work our design on it, we will use the version of DXF we save our art.

Apesar de não parecer, os caracteres fechados, com O, B, D possuem linhas em duplicidade, e remove-las manualmente não é tarefa agradável. Para facilitar nossa vida, vamos utilizar um outro software que pode fazer isto para nós sem maiores dificuldades, o Autodesk Autocad.Para trabalhar nosso desenho no mesmo, vamos usar a versão em DXF em que salvamos nossa arte.

Step 4: ​Removing Double Lines / Removendo Linhas Duplas

The Autocad is probably one of design software for engineering / architecture most used in the world. He has a trial, and if you are a student, you can download the student version with 3-year license. Despite the interface scare at first, we will use only 2 simple commands that will be explained in this step.

O Autocad é provavelmente um dos softwares de desenho de engenharia/arquitetura mais utilizados do mundo. Ele possui uma versão de testes, e caso você seja estudante, pode baixar a versão estudantil com licença de 3 anos. Apesar da interface assustar em um primeiro momento, vamos usar somente 2 comandos bem simples que serão explicados nesse passo.

When we open the drawing in Autocad, probably the previously united lines will be disconnected, which is bad for the generation of our CNC code, but we will solve it in the end. First we will use the OVERKILL command. It is extremely useful here because to detect lines that overlap and then remove them. Enter in command prompt OVERKILL + ENTER, it will ask you to select which lines to be treated; type all + ENTER + ENTER to all objects are selected. Will pop up a configuration box. Check the boxes according to the image in this step and click OK. The system will return a message indicating how many rows were removed.

Quando abrirmos o desenho no Autocad, provavelmente as linhas anteriormente unidas estarão desconectadas, o que é ruim para a geração de nosso código CNC, mas vamos resolver isso no final. Primeiramente vamos utilizar o comando OVERKILL. Ele é extremamente útil aqui pelo fato de conseguir detectar linhas que estão sobrepostas e então remove-las. Digite na prompt de comando OVERKILL+ENTER, ele ira solicitar que se selecione quais as linhas que serão tratadas; digite all+ENTER+ENTER para que todos os objetos sejam selecionados. Ira aparecer uma caixa de configuração. Marque as caixas de acordo com a imagem neste passo e clique em OK. O sistema ira retornar uma mensagem indicando quantas linhas foram removidas.

Our next step will be to address the issue of disconnected lines. We will use the Polyline Edit command, which has some more settings. Let's enter the PEDIT + ENTER command at the command prompt. He asks what the segments will be edited, but before that will enable multiple option by typing "m" + ENTER. When the prompt ask what are the lines to edit, we will enter all + ENTER + ENTER. In the next step will be asked if you want to convert existing entities in polylines, type “y” + ENTER if it appears a warning about the delay in action, click YES. Now Autocad asks what degree of accuracy for conversion of splines. At this point, a tip: Inkscape curves come in DXF as splines, a type of more complex curve the arc. The higher the precision of the conversion, more threads are generated to simulate the spline. The higher the precision of the conversion, more threads are generated to simulate the spline. As the sources are small, it makes no difference using a precision of 10 or 5. I normally use a very low number, 1 or 2, which decreases the number of segments and increases the recording speed. Now the final step, type “j” + ENTER + ENTER to Autocad apply the JOIN option in the multiple existing lines. Type ENTER again to exit the command.

Nosso próximo passo será resolver a questão das linhas desconectadas. Iremos utilizar o comando Polyline Edit, que tem alguns configurações a mais. Vamos digitar o comando PEDIT+ENTER no prompt de comando. Ele pergunta quais as segmentos serão editados, mas antes disso vamos ativar a opção multiple, digitando “m” + ENTER. Quando no prompt solicitar quais seriam as linhas a editar, vamos digitar all+ENTER+ENTER. No próximo passo será perguntado se quer converter as entidades existentes em polylines, digite “y”+ENTER, caso apareça um aviso sobre a demora da ação, clique em YES. Agora o Autocad pergunta qual o grau de precisão para conversão das splines. Neste ponto, uma dica: as curvas do Inkscape chegam no DXF como splines, um tipo de curva mais complexo que o arco. Quanto maior a precisão da conversão, mais segmentos serão gerados para simular a spline. Como as fontes são pequenas, não faz diferença usar uma precisão de 10 ou de 5. Normalmente eu uso um número bem baixo, 1 ou 2, o que diminui o número de segmentos e aumenta a velocidade da gravação. Agora o passo final, digite “j”+ENTER+ENTER para que o Autocad aplique a opção JOIN nas múltiplas linhas existente. Digite ENTER novamente para sair do comando.

Perform again the steps of OVERKILL command and finally save your file. There, his art is ready to be processed into your favorite CAM program.

Realize novamente os passos do comando OVERKILL e finalmente salve seu arquivo. Pronto, sua arte está pronta para ser processada no seu programa CAM favorito.

Step 5: Final Result / Resultado Final

I particularly like to do these pictures in coated MDF because the drawing already stands out naturally. Depending on the material you choose, you must use some complementary technique to highlight the recorded parts.

Eu particularmente gosto de fazer estes quadros em MDF revestido, pois o desenho já se destaca naturalmente. Dependendo do material que você escolher, é necessário utilizar alguma técnica complementar para dar destaque as partes gravadas.

As art was held in a CNC router, used a 45 degree engraving cutter and depth of 0.2mm. In this case, when more acute the angle, the better, because the lines are more delicate, and you can even try depths a little bigger.

Como arte foi realizada em uma router CNC, utilizei uma fresa de gravação de 45 graus e profundidade de 0.2mm. Neste caso, quando mais agudo o ângulo, melhor, pois as linhas ficam mais delicadas, e você pode até experimentar profundidades um pouco maiores.

I take leave here, and again I hope you enjoyed the tutorial. They are here for consideration other projects carried out using the same technique. Did you like any of them? Find me :-)

Me despeço por aqui, e mais uma vez espero que tenham gostado do tutorial. Ficam aqui para apreciação outros projetos realizados utilizando a mesma técnica. Gostou de algum deles? Me procure :-)