{ "info": { "author": "David Boddie ", "author_email": "rienairefr@gmail.com, david@boddie.org.uk", "bugtrack_url": null, "classifiers": [], "description": ".. image:: https://coveralls.io/repos/github/rienafairefr/python-ldraw/badge.svg?branch=master\n :target: https://coveralls.io/github/rienafairefr/python-ldraw?branch=master\n\n.. image:: https://travis-ci.org/rienafairefr/python-ldraw.svg?branch=master\n :target: https://travis-ci.org/rienafairefr/python-ldraw\n\n.. image:: https://img.shields.io/pypi/pyversions/pyldraw.svg :alt: PyPI - Python Version\n :target: https://pypi.python.org/pypi/pyldraw\n\n\n======================\npyldraw Python Package\n======================\n\n:Author: `rienafairefr`_ code originally from `David Boddie`_\n\n.. contents::\n\n\nIntroduction\n------------\n\nLDraw_ is a standard format used by CAD applications that create LEGO models\nand scenes. \n\nThe `pyldraw` package provides facilities to allow users to create LDraw scene\ndescriptions using the Python_ programming language. Pieces are specified by\ntheir positions, orientations and other properties in normal executable Python\nscripts which are run to create model files.\n\nThe `pyldraw` package includes code to have the complete LDraw library available\nto you through normal Python imports, like::\n\n from ldraw.library.colours import Light_Grey\n from ldraw.library.parts.minifig.accessories import Seat2X2\n from ldraw.library.parts.others import Brick1X2WithClassicSpaceLogoPattern\n\nThe actual parts library hierarchy (in which subpackage each brick is, etc...),\nis still a work in progress. You can always specify parts by their LDraw code::\n\n rover = group()\n Piece(Light_Grey, Vector(-10, -32, -90),\n Identity(), \"3957a\", rover)\n\n\nCompatibility\n-------------\n\nThis is tested on Python 2.7, and 3.4+\n\nInstallation\n------------\n\nThe simplest way is through pip::\n\n pip install pyldraw\n\n\nAuto-generation of the ldraw.library.* package\n----------------------------------------------\n\nThe ldraw.library.* package is kind of special, it is auto-generated from a LDraw parts library (complete.zip)\nwith the parts.lst itself auto-generated using pymklist_.\nOn running code that needs something in the ldraw.library, pyldraw will know (through a `sys.meta_path` hook)\nand attempt to auto-generate it on-the-fly.\nConsidering that the toolchain complete.zip download, parts.lst generation, python code generation takes\nquite some time, and we don't want to re-download anyway,\nthe generated library will be cached and reused on subsequent import or python scripts run.\nIf you setup another parts.lst or modify it, the library will be re-generated.\nThe cached generated library is stored in the directory where the ldraw package is, if that's user-writeable,\notherwise in an OS-dependent cache directory (somewhere in ~/.cache for example)\n\n* Configuration\n\nThe parts.lst that is used for this generation is setup inside the configuration file (a simple YAML file)\nTo get some info about where the configuration file is, use `python -m ldraw.config`\nYou can specify where the library is generated by providing a `library` option in this configuration\n\nExamples\n--------\n\nA number of examples are provided in the `examples` directory. When run, each\nof these will write model information to the console. To create a model file\nfrom an example, redirect its output to a file.\n\n\nPart Descriptions\n-----------------\n\nEven though this package does include a list of parts derived from those supplied in\nthe official LDraw archive, users can download or modify this\nlist separately. The ldraw.library.* hierarchy will stay current with the LDraw database\nsetup in the configuration\n\nParts are available from the ldraw.library namespace as described above, but you can also use the Parts class::\n\n from ldraw.parts import Parts\n parts = Parts(\"parts.lst\") # provide your custom parts.lst path\n\nParts can then be accessed using the relevant dictionary\nattributes of the `parts` instance. For example::\n\n cowboy_hat = parts.minifig.hats[\"Hat Cowboy\"]\n head = parts.minifig.heads[\"Head with Solid Stud\"]\n brick1x1 = parts.others[\"Brick 1 x 1\"]\n\nWriters and Tools\n-----------------\n\nThe `ldraw.writers` package aims to provide a set of classes that write out\nLDraw descriptions in other file formats. Currently, it contains the `povray`\nmodule which provides a class for writing out LDraw descriptions as POV-Ray\nscenes.\n\nThe `ldr2pov` tool, uses the `povray` module to allow LDraw (`.ldr`) files\nto be conveniently converted to POV-Ray (`.pov`) scene files.\nNote that, since the LDraw format does not include\ninformation about camera locations, it is necessary to pass this information\non the command line.\n\nFor example, on a GNU/Linux system, we can execute command lines like these\nto take the `figures.py` example file, create an LDraw model file (`temp.ldr`),\nand convert that to a POV-Ray scene file (`temp.pov`)::\n\n python examples/figures.py > temp.ldr\n ldr2pov /path/to/parts.lst models/figures.ldr temp.pov 160.0,80.0,-240.0\n povray +Itemp.pov +FN16 +Otemp.png +Q6\n\nFinally, POV-Ray is used to process the scene description and create a PNG\nimage file (`temp.png`).\n\nSome other tools and writers are included,\n\n - ldr2inv:\n\n Transforms a LDR file into a file containing the Bill Of Materials or Inventory of the model\n\n - ldr2png\n\n Renders the LDR file into a PNG file\n\n - ldr2svg\n\n Renders the LDR file into a vector image in SVG\n\n\nLicense\n-------\n\nThe contents of this package are licensed under the GNU General Public License\n(version 3 or later)::\n\n pyldraw, a Python package for creating LDraw format files.\n Copyright (C) 2008 David Boddie \n\n Some parts Copyright (C) 2018 Matthieu Berthom\u00e9 \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\n\nTrademarks\n----------\n\nLDraw is a trademark of the Estate of James Jessiman. LEGO is a registered\ntrademark of the LEGO Group.\n\nOrigins\n-------\n\nThis repo was extracted from the mercurial repository at\nhttps://anonscm.debian.org/hg/python-ldraw/main\n\nIt will not try to stay updated with the upstream repo of the original author, David Boddie,\nThe goal is to see what might be done, the original repo hasn't been updated since 2011\n\n\n.. _LDraw: http://www.ldraw.org/\n.. _Python: http://www.python.org/\n.. _pymklist: https://github.com/rienafairefr/pymklist\n.. _`David Boddie`: mailto:david@boddie.org.uk\n.. _`rienafairefr`: mailto:rienafairefr@gmail.com", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "Matthieu Berthom\u00e9 ", "maintainer_email": "", "name": "pyldraw", "package_url": "https://pypi.org/project/pyldraw/", "platform": "", "project_url": "https://pypi.org/project/pyldraw/", "project_urls": null, "release_url": "https://pypi.org/project/pyldraw/0.8.2/", "requires_dist": null, "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.7", "summary": "A package for working with LDraw format files.", "version": "0.8.2" }, "last_serial": 5539608, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "bead59a176676953fe7e563eb4309a9c", "sha256": "b10ab14519aab368e34e99d57dcbc3378749b081e0d8899afcc32d9f24502d71" }, "downloads": -1, "filename": "pyldraw-0.3.0.tar.gz", "has_sig": false, "md5_digest": "bead59a176676953fe7e563eb4309a9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18756, "upload_time": "2018-02-22T22:43:52", "url": "https://files.pythonhosted.org/packages/4a/ac/237d1dfbf6c5f7f5a0112bef96c37295fa475f4cf2d67557232bbfee203c/pyldraw-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "029a6a39647dbe4f8ad67fc0d4b3815e", "sha256": "76f5997f4509d09e06c547a1c9c76c5b9507020f1978f649e5e7827f7943c694" }, "downloads": -1, "filename": "pyldraw-0.4.0.tar.gz", "has_sig": false, "md5_digest": "029a6a39647dbe4f8ad67fc0d4b3815e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21919, "upload_time": "2018-02-26T10:25:08", "url": "https://files.pythonhosted.org/packages/71/8f/a4e26ab622940b2dc080f80780ce4933293adc82e4644ad573a2b1fb7f2c/pyldraw-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "07eb044db05d4a8779eaeaa46d9f74b9", "sha256": "7f6206ed2c8513f0abb919319b18dd9da47cd7f6c0c8ee793b5a2d768e2bcd07" }, "downloads": -1, "filename": "pyldraw-0.5.0.tar.gz", "has_sig": false, "md5_digest": "07eb044db05d4a8779eaeaa46d9f74b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26939, "upload_time": "2018-03-07T10:01:08", "url": "https://files.pythonhosted.org/packages/34/8d/a92f032e78aa7a07db59c17ba1baaaa16d2a3feea1c80dc696142362ffe1/pyldraw-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "f73f0090fb616c9aa705dace923de27a", "sha256": "6801fcebb3be48ab4a3d2bb740d441fba6c95d6777a4f5d25896fed5f3f05c65" }, "downloads": -1, "filename": "pyldraw-0.5.1.tar.gz", "has_sig": false, "md5_digest": "f73f0090fb616c9aa705dace923de27a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 137072, "upload_time": "2018-03-07T10:11:55", "url": "https://files.pythonhosted.org/packages/3e/6b/c33446cab6fae2efd92eb57f2ecfd227e155a8883ac14dfe8ba9e68f5f9a/pyldraw-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "cd9fbac8b6271d7aada550503a4dbda0", "sha256": "53d163d6dc62f3067a26fd8e4f3a3a30530982e36295948fbbedcfa53891425e" }, "downloads": -1, "filename": "pyldraw-0.6.0.tar.gz", "has_sig": false, "md5_digest": "cd9fbac8b6271d7aada550503a4dbda0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 140542, "upload_time": "2018-03-15T14:21:25", "url": "https://files.pythonhosted.org/packages/c6/1d/4ad3d910ad490c19d6d890feb3d9f7e1e0ff13f6b98f4dcec47679a43c95/pyldraw-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "0424a6823e891a4bd49293370721f32c", "sha256": "98084a6225ec96bc07b0fbb79f275f312b9cd88ef5f438d458549b4516a2006c" }, "downloads": -1, "filename": "pyldraw-0.7.0.tar.gz", "has_sig": false, "md5_digest": "0424a6823e891a4bd49293370721f32c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 147700, "upload_time": "2018-04-07T21:27:04", "url": "https://files.pythonhosted.org/packages/b4/15/62fd3b5cae9e2b828c2828439018e6d4ae7cfdea2fa977159c68b75e971b/pyldraw-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "fb0ad3bbcc38f57e1b0cf2feac8ec2b3", "sha256": "d0c07ee8624b601d44c4c79001899869dcb1a882ebf7596e3a48a2217bcd7516" }, "downloads": -1, "filename": "pyldraw-0.8.0.tar.gz", "has_sig": false, "md5_digest": "fb0ad3bbcc38f57e1b0cf2feac8ec2b3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.7", "size": 1081842, "upload_time": "2018-04-12T21:32:03", "url": "https://files.pythonhosted.org/packages/37/4b/aa6cc516e6a923123dfb5e35f760d06aff3559597016bea2baf0543b736d/pyldraw-0.8.0.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "146d6ae231ef5f1d42804df8d6bfb517", "sha256": "9dc8aeced57bc17c05bb2ca976687a3c8b205d2e44a02da53895472672631ad5" }, "downloads": -1, "filename": "pyldraw-0.8.2.tar.gz", "has_sig": false, "md5_digest": "146d6ae231ef5f1d42804df8d6bfb517", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.7", "size": 1094220, "upload_time": "2019-07-16T10:05:55", "url": "https://files.pythonhosted.org/packages/c4/da/d361a47ccffa253b2a7ef101dba0c06393ff3d4a085f2f929b51ccaa49e7/pyldraw-0.8.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "146d6ae231ef5f1d42804df8d6bfb517", "sha256": "9dc8aeced57bc17c05bb2ca976687a3c8b205d2e44a02da53895472672631ad5" }, "downloads": -1, "filename": "pyldraw-0.8.2.tar.gz", "has_sig": false, "md5_digest": "146d6ae231ef5f1d42804df8d6bfb517", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.7", "size": 1094220, "upload_time": "2019-07-16T10:05:55", "url": "https://files.pythonhosted.org/packages/c4/da/d361a47ccffa253b2a7ef101dba0c06393ff3d4a085f2f929b51ccaa49e7/pyldraw-0.8.2.tar.gz" } ] }