{ "info": { "author": "Ryan Zambrotta", "author_email": "rtzamis2@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# [gcody](https://github.com/rtZamb/gcody) #\n\nGcody is a python wrapper for GCODE. It gives common programming language functionality to GCODE as well as several visualization tools.\nThis is an early draft of gcody and it is intended for general writing of GCODE, not printer specific code.\nGcody was inspired by [mecode](https://github.com/jminardi/mecode).\n\n\n### Basics: ###\n\n```python\n# gcody example creating a serpentine pattern and an elephant\n\n# these are both normally imported from gcody\nfrom gcody import *\n\n# creating parameters\ndistance = 10\ncycles = 10\n\n# creating gcode object\ng = gcode()\n\n# writes the GCODE command to use relative coordinates\n# this changes how position is recorded internally (in gcode object)\n# abs_coords is the default setting for gcode and is the default for gcody as well\ng.rel_move()\n\n# moves the print head back and forth in x\ng.move(distance, speed=10, com='Moves head 10 in x')\n\n\n# moves the print head back and forth in x\nfor i in range(1,cycles):\n # simple move allows for modality (not repeating commands)\n # it makes the GCODE prettier :)\n # unfortunately, not all printers support it :(\n g.simple_move(y=10) # movement in y\n g.simple_move((-1)**i * distance) # movement in x\n\n# creates a matplotlib figure matching the path of the printer head\ng.view('b')\n\n# This is an animated figure showsing the progression of the printer path\ng.animated('b',save_file='snake.gif')\n\n\n# saves the GCODE to a file\ng.save('snake') # outputs file 'snake.gcode'\ng.save('snake','txt') # outputs file 'snake.txt'\n```\n\nThe output GCODE is:\n```GCODE\nG91 ; use relative coordinates\nF600 ; 10 mmps motion\nG1 X10.000000 ; Moves head 10 in x\nY10.000000\nX-10.000000\nY10.000000\nX10.000000\nY10.000000\nX-10.000000\nY10.000000\nX10.000000\nY10.000000\nX-10.000000\nY10.000000\nX10.000000\nY10.000000\nX-10.000000\nY10.000000\nX10.000000\nY10.000000\nX-10.000000\n```\n\n\n\nThe other features of gcody are readying existing GCODE and displaying it:\n```python\n\n# file from https://www.thingiverse.com/thing:998999/#files\n# gcode generated with latest Cura (https://ultimaker.com/en/products/ultimaker-cura-software)\nfile = 'elefante_small.gcode'\n\n# This reads the GCODE file line by line and converts it into a gcode object\n# GCODE file can be hundreds of thousands of lines, if not more. This means reading them\n# can be slow. The math comes out to is roughly 13,000 move lines per second.\nelefante = read(file)\n\n# This figure colors the lines draw with a color that corresponds to a print time\nelefante.cbar_view() # This method takes ~60 seconds to work.\n\n# this view has a slider bar that allows one to select the print time\nelefante.slide_view('r')\n```\n\nSee images on [github](https://github.com/rtZamb/gcody)!\n\n\n\n\n### Dependencies: ###\n* Numpy\n* Matplotlib\n\n### Optional Dependencies ###\n* pillow, ImageMagic, of FFmpeg as optional dependancies for matplotlib to save videos\n* [Mayavi](http://docs.enthought.com/mayavi/mayavi/) for viewing backends\n\n\n\n\n\n### To Do: ###\n* Add clockwise motion commands\n* Add in other GCODE commands\n* Add more complex combinations of move\n* Take requests for features\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rtZamb/gcody", "keywords": "GCODE,3D Printing,visualiziation,CNC", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gcody", "package_url": "https://pypi.org/project/gcody/", "platform": "", "project_url": "https://pypi.org/project/gcody/", "project_urls": { "Homepage": "https://github.com/rtZamb/gcody" }, "release_url": "https://pypi.org/project/gcody/0.5.1/", "requires_dist": [ "numpy", "matplotlib" ], "requires_python": "", "summary": "A package to read, write, and visualize GCODE", "version": "0.5.1" }, "last_serial": 3943683, "releases": { "0.5.1": [ { "comment_text": "", "digests": { "md5": "14050a7ce62175ddc6f4d67f8593e566", "sha256": "f27988cef177e155d532f6c87f0b947286b49aef5291120a182c0edd4ecb14e2" }, "downloads": -1, "filename": "gcody-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "14050a7ce62175ddc6f4d67f8593e566", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21216, "upload_time": "2018-06-08T18:39:19", "url": "https://files.pythonhosted.org/packages/3a/b6/24b51485a076b404dabbccb8e3ee84c0bc140390bb465a43b6431d3aca55/gcody-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "728e41e56920f4ba1b06be82a6d70912", "sha256": "62356437cf566c4bc00d7e80457a15a8dc8983b36ab17b35a0d29ef076b72800" }, "downloads": -1, "filename": "gcody-0.5.1.tar.gz", "has_sig": false, "md5_digest": "728e41e56920f4ba1b06be82a6d70912", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19083, "upload_time": "2018-06-08T18:39:20", "url": "https://files.pythonhosted.org/packages/15/20/5096eafb141533e51d4a605cc658b059d0c16295067734b0ac3421159ee8/gcody-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "14050a7ce62175ddc6f4d67f8593e566", "sha256": "f27988cef177e155d532f6c87f0b947286b49aef5291120a182c0edd4ecb14e2" }, "downloads": -1, "filename": "gcody-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "14050a7ce62175ddc6f4d67f8593e566", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21216, "upload_time": "2018-06-08T18:39:19", "url": "https://files.pythonhosted.org/packages/3a/b6/24b51485a076b404dabbccb8e3ee84c0bc140390bb465a43b6431d3aca55/gcody-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "728e41e56920f4ba1b06be82a6d70912", "sha256": "62356437cf566c4bc00d7e80457a15a8dc8983b36ab17b35a0d29ef076b72800" }, "downloads": -1, "filename": "gcody-0.5.1.tar.gz", "has_sig": false, "md5_digest": "728e41e56920f4ba1b06be82a6d70912", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19083, "upload_time": "2018-06-08T18:39:20", "url": "https://files.pythonhosted.org/packages/15/20/5096eafb141533e51d4a605cc658b059d0c16295067734b0ac3421159ee8/gcody-0.5.1.tar.gz" } ] }