Skip to main content

Welcome to mecode_viewer

Unit Tests Hatch project

PyPI - Version PyPI - Downloads PyPI - Python Version

Installation

pip install mecode_viewer

Getting Started

Example: simplest case

All that is needed to run mecode_viewer is to provide a path to your gcode file. By default, mecode_viewer assumes you're using a Nordson pressure controller to control ink extrusion.

from  mecode_viewer import mecode_viewer

mecode_viewer(file_name='gcode_file.pgm')

Example: custom extrusion command

Linear actuators are also often used to control ink extrusion during printing. This example shows how we can provide a custom extrude_cmd to specify when extrusion starts and stops. E.g., if linear actuator #5 is typically run using FREERUN PDISP5 2.5 and stopped using FREERUN PDISP5 STOP, we can simply set extrude_cmd='FREERUN PDISP5'.

from  mecode_viewer import mecode_viewer

mecode_viewer(file_name='gcode_file.pgm', extrude_cmd='FREERUN PDISP5')

Example: animated visualization

By default mecode_viewer will display a 3D figure of your gcode toolpath. If you would like to view an animated version, set animate=True.

from  mecode_viewer import mecode_viewer

mecode_viewer(file_name='gcode_file.pgm', animate=True)

Example: mixing, multimaterial printing

If extrude_cmd is provided with a list or tuple with more than one entry, mecode_viewer will generate a figure color coded for each extrusion source.

from mecode_viewer import mecode_viewer
mecode_viewer('gcode_file.pgm',
              extrude_cmd=('PDISP1', 'PDISP2'),
              extrude_stop_cmd=('PDISP1 STOP', 'PDISP2 STOP'))

!!! warning

This currently only work for two extrusion sources. We plan to add support for more extruders / more colors.

Want to learn more?

Full documenation of mecode_viewer available at API Reference.

License

mecode_viewer is distributed under the terms of the MIT license.

Metadata

Release files for mecode-viewer 0.3.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mecode-viewer 0.3.14
File Size Uploaded
mecode_viewer-0.3.14.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mecode-viewer 0.3.14
File Interpreter ABI Platform
mecode_viewer-0.3.14-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / mecode_viewer-0.3.14.tar.gz

Download URL mecode_viewer-0.3.14.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
148b57c9ec952b30602612202dc60a6d2dd756c142377a0851c491d98184ab1e
BLAKE2b-256 checksum
How to use checksums
3f701c66e0bd89cfe48c459ae41522fd82bd5ae2c367b66e9193ca70bb8f53cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.26.0

Release files / mecode_viewer-0.3.14-py3-none-any.whl

Download URL mecode_viewer-0.3.14-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c9443f3937c29f75294d2df2b5b5424f28224b01b420a24253eac463bf72563
BLAKE2b-256 checksum
How to use checksums
053b444306ffaab37149642dcbbd038d76d4a69380cff17606fbdec04534f28c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.26.0

Release history Release notifications | RSS feed

This release

0.3.14 This release

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

1 release file

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page