Skip to content

Python software to facilitate multi-head 3D Printer control, provide print time duration estimates, and calculate energy and material consumption.

Notifications You must be signed in to change notification settings

antoniopgs/FabInventors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FabInventors

Software to facilitate multi-head 3D Printer control, provide print time duration estimates, and calculate energy and material consumption.

Intro

3D Printers need input instructions on how to fabricate a given part.

These instructions are usually provided in a file format called G-Code.

A G-Code file is basically a series of points (along with speed, extrusion and some other properties)

A sample of G-Code can be seen here:

image

Description:

  • G1 = Line with material extrusion
  • G0 = Line without material extrusion (travel line)
  • F = Print Head Speed
  • X = X coordinate
  • Y = Y coordinate
  • Z = Z coordinate (not shown here - 3D parts are printed layer by layer, so z changes happen with less frequency)
  • E = Amount of material extruded

Problem to Solve

To reduce the manufacturing time, FabInventors is developing a Multi-Head 3D Printer.

In order to properly provide G-Code instructions to this Multi-Head 3D Printer, they would have to be sliced, according to the spatial distribution of the various print heads.

However, in order to slice G-Code instructions, one needs to calculate intersections.

And in order to calculate intersections, one needs lines. But G-Code instructions consist of a series of points.

Goal

Therefore, this software intends to:

  1. Receive a G-Code input
  2. Parse it from a series of points, to a series of lines
  3. Slice said series of lines (with a dynamic number of rows and columns, to accommodate any table distribution of print-heads) into multiple files.
  4. Convert each slice file back into a the G-Code format
  5. Feed the G-Code file of each slice into each head of the Multi-Head 3D Printer.

This flow can also be seen here:

Flowchart

(higher quality version here: Flowchart.pdf)

Desired JSON Format

The G-Code files should be parsed into a JSON with the following format:

data = {
    "input": "xyz.gcode",
    "lines": [
        {"points": [(0, 0, "z2"), ("x2", "y2", "z2")], # Milimeters
        "speed": "F", # Milimeters per Minute
        "extrusion": "E", # Milimeters
        "type": "TRAVEL(if 'G0' in line_content) / WALL-OUTER / WALL-INNER / SKIN / FILL / SUPPORT / SKIRT",
        "mesh": "MESH_NAME/NONMESH"
        },
        {"points": [("x1", "y1", "z1"), ("x2", "y2", "z2")], # Milimeters
        "speed": "F", # Milimeters per Minute
        "extrusion": "E", # Milimeters
        "type": "TRAVEL(if 'G0' in line_content) / WALL-OUTER / WALL-INNER / SKIN / FILL / SUPPORT / SKIRT",
        "mesh": "MESH_NAME/NONMESH"
        },
        {"points": [("x1", "y1", "z1"), ("x2", "y2", "z2")], # Milimeters
        "speed": "F", # Milimeters per Minute
        "extrusion": "E", # Milimeters
        "type": "TRAVEL(if 'G0' in line_content) / WALL-OUTER / WALL-INNER / SKIN / FILL / SUPPORT / SKIRT",
        "mesh": "MESH_NAME/NONMESH"
        },
    ]
}

Extras

The software will also feature:

  • A series of estimators for print-time duration, energy consumption and material expenditure. (IN PROGRESS)
  • A fully-adjustable 3D Visualizer, complete with color features and able to project both complete parts and slices.

Estimator Physics

The estimators will perform calculations on several physical factors like:

  • motor strength
  • material weight
  • print head acceleration
  • etc

Visualizer

The 3D Visualizer can be seen here:

image

Potential Improvements

  • Implement tests, to see if all final products match the Original G-Code products.
  • Once all tests are passed, implement some CI (maybe with GitHub Actions) to automatically run all tests whenever new code is pushed to master, to ensure quality and guarantee that no new code compromises product integrity.

About

Python software to facilitate multi-head 3D Printer control, provide print time duration estimates, and calculate energy and material consumption.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published