Giter Club home page Giter Club logo

gcode's Introduction

DIY Airfoils you say? Put numbers in, get G-code out!

C CMake

This project outputs G-code that is used to control a 4-axis hot wire cutter, employed to cut a wing / airfoil from a physical block of foam. Effectively, it is a slicer for a particular arrangement of raw-coordinate data files.

I wrote this for a family member who was, at the time, working in airfoil design. The code is designed to be cross-platform (Windows, OS X, and Linux).

Quick Rundown

Eight input files are provided to the program; each input file is formatted in the following manner:

   <integer:total_values_to_follow>
   <float:value1>
   <float:value2>
   <...>
   <float:valueN>

So that an input file may look like:

   3
   -1.000000
   0.989000
   1.200000

Where "3" is the number of values to follow, with the three following values on separate lines.

Each input file is named to correspond with a technical section of the wing / airfoil (Root & Tip; Upper & Lower halves; X & Y coordinates). The input file names are, at this time, constant and should not be changed. In other words, all of the input files must be present and reasonably formatted for the program to function.

Input files:

"ROOTUPPERX", "ROOTUPPERY", "ROOTLOWERX", "ROOTLOWERY", "TIPUPPERX", "TIPUPPERY", "TIPLOWERX", "TIPLOWERY"

Output file:

"OUTPUT.txt"

gcode's People

Contributors

gregkrsak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pandagxnu yazici

gcode's Issues

Valgrind Errors

$ valgrind --leak-check=yes ./gcode
==16026== Memcheck, a memory error detector
==16026== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==16026== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==16026== Command: ./gcode
==16026==
==16026== Invalid write of size 1
==16026== at 0x4C306EF: strcat (vg_replace_strmem.c:307)
==16026== by 0x4009E0: OpenDataFiles (gcode.c:138)
==16026== by 0x4008BE: main (gcode.c:87)
==16026== Address 0x52042ba is 0 bytes after a block of size 10 alloc'd
==16026== at 0x4C2DBF6: malloc (vg_replace_malloc.c:299)
==16026== by 0x40098E: OpenDataFiles (gcode.c:131)
==16026== by 0x4008BE: main (gcode.c:87)
==16026==
==16026== Syscall param open(filename) points to unaddressable byte(s)
==16026== at 0x4F31010: __open_nocancel (syscall-template.S:84)
==16026== by 0x4EB3ACD: _IO_file_open (fileops.c:221)
==16026== by 0x4EB3D34: _IO_file_fopen@@GLIBC_2.2.5 (fileops.c:328)
==16026== by 0x4EA7D33: __fopen_internal (iofopen.c:86)
==16026== by 0x4009F1: OpenDataFiles (gcode.c:141)
==16026== by 0x4008BE: main (gcode.c:87)
==16026== Address 0x52042ba is 0 bytes after a block of size 10 alloc'd
==16026== at 0x4C2DBF6: malloc (vg_replace_malloc.c:299)
==16026== by 0x40098E: OpenDataFiles (gcode.c:131)
==16026== by 0x4008BE: main (gcode.c:87)
==16026==
==16026==
==16026== HEAP SUMMARY:
==16026== in use at exit: 0 bytes in 0 blocks
==16026== total heap usage: 34 allocs, 34 frees, 43,860 bytes allocated
==16026==
==16026== All heap blocks were freed -- no leaks are possible
==16026==
==16026== For counts of detected and suppressed errors, rerun with: -v
==16026== ERROR SUMMARY: 16 errors from 2 contexts (suppressed: 0 from 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.