{ "info": { "author": "Miro Hron\u010dok", "author_email": "miro@hroncok.cz", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Manufacturing", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "CityGML to STL\n==============\n\nPython library to convert `CityGML `_ data to\nSTL 3D models printable on FDM 3D printers, such as various\n`RepRap `_ printers.\n\nCityGML versions 2.0.0, 1.0.0 and 0.4.0 are supported. Other versions might work as well.\n\nThis is a coursework for `Free software GIS\n`_ class on\n`Faculty of Civil Engineering `_,\n`Czech Technical University in Prague `_ (academic\nyear 2014/2015, group F). Licensed as MIT (see LICENSE).\n\n.. figure:: https://raw.githubusercontent.com/ctu-yfsg/2015-f-citygml/master/berlin.png\n :alt: Image of generated STL\n\n CityGML of Alexanderplatz, Berlin, Germany as STL. Data \u00a9 `Research Center Karlsruhe,\n Institute for Applied Computer Science `_\n\nInstallation\n------------\n\nTo install, just use regular Python means, such as pip.\nIt is recommended to install Cython before you install this or other requirements.\nPython 3.3+, 2.7 and pypy are supported.\n\n.. code-block:: sh\n\n pip install Cython\n pip install citygml2stl\n\nOr if installing from cloned repository or unpacked sources:\n\n.. code-block:: sh\n\n pip install Cython\n pip install -r requirements.txt\n python setup.py install\n\nUsage\n-----\n\nTo use cityglm2stl from Python proceed as follows:\n\n.. code-block:: python\n\n # import stuff\n from citygml2stl import citygml\n from citygml2stl import polygons\n from citygml2stl import stl\n \n # parse the CityGML file\n c = citygml.CityGML('Berlin_Alexanderplatz_v0.4.0.xml')\n \n # export to file berlin.stl\n with stl.StlFile('berlin.stl') as berlin:\n # Specify as many types as you want,\n # or leave without arguments to get all city objects\n for obj in c.get_objects_of_types('Building'):\n berlin.write_triangles(polygons.object2triangles(obj))\n\nOr, if you would prefer to have multiple STL files instead:\n\n.. code-block:: python\n\n # initialize a counter for filenames\n counter = 0\n \n for obj in c.get_objects_of_types('Building'):\n with stl.StlFile('berlin{}.stl'.format(counter)) as berlin:\n berlin.write_triangles(polygons.object2triangles(obj))\n counter += 1\n\nNote that given the quality of most CityGML data found, the STLs will probably not be valid as the\nfacets will intersect each other. Also given the way the algorithm works, the order of the vertices\nof a facet is random and will not always follow the right hand rule.\n\nThat said, consider that output needs repairing. Use public cloud services such as\n`netfabb Cloud `_ or even open source tools such as\n`ADMesh `_ to repair the output.\n\nYou can even use `Python's admesh `_ module to repair the STLs:\n\n.. code-block:: python\n\n import admesh\n ...\n \n filename = 'berlin{}.stl'.format(counter)\n with stl.StlFile(filename) as berlin:\n berlin.write_triangles(polygons.object2triangles(obj))\n \n s = admesh.Stl(filename)\n s.repair()\n \n # the results are often located on unthinkable coordinates\n s.translate(0, 0, 0)\n s.write_binary(filename)\n\nNote that due to limitations of the admesh module it is currently not possible to redirect output\nof citygml2stl to admesh without writing it to a file first.\n\nA sample script to invoke from command line is installed to PATH:\n\n.. code-block:: sh\n\n $ citygml2stl Berlin_Alexanderplatz_v0.4.0.xml \n Converting Berlin_Alexanderplatz_v0.4.0.xml to Berlin_Alexanderplatz_v0.4.0.stl\n\n\nAuthors\n-------\n\n- `Miro Hron\u010dok `_\n- Inspired a bit by `CityGML2OBJs `_ by `Filip Biljecki `_", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "3D printing,STL,mesh,CityGML", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "citygml2stl", "package_url": "https://pypi.org/project/citygml2stl/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/citygml2stl/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/citygml2stl/0.1a1/", "requires_dist": null, "requires_python": null, "summary": "CityGML to printable STL", "version": "0.1a1" }, "last_serial": 1602067, "releases": { "0.1.dev1": [], "0.1.dev2": [ { "comment_text": "", "digests": { "md5": "a60b4ff3cd076b6a52f386192cf1c051", "sha256": "4f7dbd9c342fa6211178ec77f3ced9af68f0e530911e4a9e78fdae65a143f89a" }, "downloads": -1, "filename": "citygml2stl-0.1.dev2.tar.gz", "has_sig": false, "md5_digest": "a60b4ff3cd076b6a52f386192cf1c051", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10548, "upload_time": "2015-06-22T15:15:34", "url": "https://files.pythonhosted.org/packages/a0/2c/857c62869cc7dce952eb392e16c049ab2b8d853ccd5cfb4f7598c3a42ee9/citygml2stl-0.1.dev2.tar.gz" } ], "0.1a1": [ { "comment_text": "", "digests": { "md5": "5af7172b17b06cee51d83272dd089312", "sha256": "8e2f237a0aaa81ac384c5f54c3dc7f6dcd8e5901ccd48f10939ea9c37f220f11" }, "downloads": -1, "filename": "citygml2stl-0.1a1.tar.gz", "has_sig": false, "md5_digest": "5af7172b17b06cee51d83272dd089312", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10909, "upload_time": "2015-06-22T16:38:04", "url": "https://files.pythonhosted.org/packages/aa/7c/497cec0c4c49325f8c97187bc39436b5bbba0ee5d642920d15262961ebf7/citygml2stl-0.1a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5af7172b17b06cee51d83272dd089312", "sha256": "8e2f237a0aaa81ac384c5f54c3dc7f6dcd8e5901ccd48f10939ea9c37f220f11" }, "downloads": -1, "filename": "citygml2stl-0.1a1.tar.gz", "has_sig": false, "md5_digest": "5af7172b17b06cee51d83272dd089312", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10909, "upload_time": "2015-06-22T16:38:04", "url": "https://files.pythonhosted.org/packages/aa/7c/497cec0c4c49325f8c97187bc39436b5bbba0ee5d642920d15262961ebf7/citygml2stl-0.1a1.tar.gz" } ] }