GithubHelp home page GithubHelp logo

vb6hobbyst7 / overcut Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nebarnix/overcut

0.0 2.0 0.0 9 KB

PHP Script to insert G-code lines to aid in over-cutting of closed features in vinyl cutters using Marlin

PHP 78.51% HTML 21.49%

overcut's Introduction

Overcut

PHP Script to insert G-code lines to aid in over-cutting of closed features in vinyl cutters using Marlin.

Does not support G2/G3 code

**Gcode must be in absolute coordinate mode **

About: This tool was created because I wanted a quick and dirty processor to create over-cut for DYI vinyl cutters. I don't have time to do this on-the-fly in the marlin firmware itsself. This will break any open loops, but why would you cut open loops anyway?

Methodology: The code detects the Z down command, and begins storing points until the total distance between stored points is equal to the required overcut distance. This is almost never the case, instead, some small line segment will be required between two points to exactly equal the overcut distance. Trigonometry is used to solve for a point between two points that makes up the required length to read the overcut distance.

The formula is the following:

X = $prevPosX - ($distanceToGoal*($prevPosX-$currentPosX)) / $distance;

Y = $prevPosY - ($distanceToGoal*($prevPosY-$currentPosY)) / $distance;

Inserted lines are marked with an ";overcut line!" comment

TODO:

  • Check that endpoint is the same as the start point to it doesn't break open loops or relief cuts
  • Maybe someday G2/G3 support??
  • Customize pen down/up commands

overcut's People

Contributors

nebarnix avatar

Watchers

James Cloos avatar  avatar

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.