Skip to content

A tool for generating GCODE for simple, one-off jobs

License

Notifications You must be signed in to change notification settings

KasimAhmic/QuickOp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickOp Logo

License: AGPL-3.0 QuickOp Issues QuickOp Pull Requests QuickOp Commit Activity
Code Style: Prettier Speed: Blazing


QuickOp is a simple to use utility for generating GCODE for simple, one-off CNC machining operations.

Frequently, you may need to do a facing or drilling operating but doing so in something like Fusion 360 requires modeling the stock in addition to the standard CAM dance. QuickOp aims to provide a single interface where you add your particular values (width of cut, depth of cut, tool diameter, etc) and it generates simplistic GCODE for you without you ever needing to touch proper CAD/CAM software!

Requirements

Installation

Run the commands below in order.

git clone https://github.com/KasimAhmic/QuickOp.git
cd QuickOp
yarn

Running

QuickOp is still a WIP and as such the methods for running the operation generators will change drastically over time. At present, the only generators that can be run are the ones below. You can tweak the parameters in their respective *.operation.ts files and run the commands below.

yarn start -- src/operations/facing.operation.ts
yarn start -- src/operations/spiral-facing.operation.ts
yarn start -- src/operations/polygon.operation.ts

In the near future, I hope to make a simple CLI script that will read a config file and run the operations for you. In the farther future, I will be making a UI where you can key in the data and MAYBE even have a GCODE preview.

Contributing

Code quality and code formatting are taken very seriously. Prettier is used to format all the code in the project before each commit, and I highly suggest you configure your editor to auto format on save. The .vscode folder contains some general settings that should do this for you if you're running VS Code. The project is also configured to use Conventional Commits and Commit Lint to format all commit messages.

Some rules of thumb when contributing:

  • Use thoughtful variable names
    • woc - Don't abbreviate where not absolutely needed. widthOfCut makes it more apparent to everyone what information this variable contains.
    • widthOfCutWhenConventionalCutting - Avoid "conditionals" in variable names. conventionalWidthOfCut would be better.
  • Use line breaks to keep code clean. Use your judgment here as it's hard to quantify when you should use line breaks and when they're not needed. Similar calculations/operations could probably do without any line breaks between them but if you go from calculating the position of X and Y to adding a command, there should probably be a line break. In the code below, notice how sineOfAngle and cosineOfAngle have no line breaks between them but there are line breaks between them and setting the xPosition and yPosition.
const angle = new Decimal(i).mul(Math.PI).div(180);

const sineOfAngle = new Decimal(angle).sin().toFixed(this.calculationPrecision);
const cosineOfAngle = new Decimal(angle).cos().toFixed(this.calculationPrecision);

this.xPosition = new Decimal(this.widthOfCut)
  .div(Math.PI * 2)
  .mul(angle)
  .mul(sineOfAngle);

this.yPosition = new Decimal(this.widthOfCut)
  .div(Math.PI * 2)
  .mul(angle)
  .mul(cosineOfAngle);

this.addCommand(G0, X(), Y(), F(this.cuttingFeedRate));
  • Format your commit messages to the Conventional Commits standard. This is enforced via Husky and Commit Lint.
    • Format: [type]: [message]
    • The type should be lowercase and should be one of fix, feat, docs, style, perf, test, or chore
    • The message should be in sentence case which means the first character should be uppercase. (e.x. Added SpiralFacing class to operations)
    • Full example: chore: Updated README with more details about the project

Happy Milling!

About

A tool for generating GCODE for simple, one-off jobs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published