{ "info": { "author": "Thomas Turner", "author_email": "tom@twt.me.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.0", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Cython-CSG\n==============\n\n\nCython port of Evan Wallace's Javascript https://github.com/evanw/csg.js/ and Tim Knip raw Python version https://github.com/timknip/pycsg.\n\n\nWhat is Cython-CSG\n==================\n\nCSG stands for Constructive Solid Geometry. It allow Boolean operations to be made on a 3D object like subtraction.\n\n\nUsage\n=====\n\nSubtraction\n-----------\n\nA simple subtraction is as followed\n\n.. code-block:: python\n\n from _cython_csg import CSG\n\n a = CSG.cube()\n b = CSG.cube([0.5, 0.5, 0.0])\n c = a - b\n c.saveVTK('subtract.vtk')\n\n\nUnion\n-----\n\nA Simple Union would is as followed\n\n\n.. code-block:: python\n\n from _cython_csg import CSG\n a = CSG.sphere(center=[0.5, 0.5, 0.5], radius=0.5, slices=8, stacks=4)\n b = CSG.cylinder(start=[0.,0.,0.], end=[1.,0.,0.], radius=0.3, slices=16)\n a.union(b).saveVTK('union.vtk')\n\n\n\nCustom objects\n--------------\n\n\nYou can make custom object here is a example\n\n.. code-block:: python\n\n from _cython_csg import BSPNode, Polygon, Vertex\n v0 = Vertex([0., 0., 0.])\n v1 = Vertex([1., 0., 0.])\n v2 = Vertex([1., 1., 0.])\n p0 = Polygon([v0, v1, v2])\n polygons = [p0]\n node = BSPNode(polygons)\n\n\nif you then want to convert it back to a CSG object you can do\n\n CSG.fromPolygons(node)\n\n\n\nInstall\n=======\n\nTo build run\n\n\n.. code-block:: bash\n\n python setup.py build\n python setup.py install\n\n\nOther Notes\n===========\n\n\nTo view the output I would recommend a program like ParaView\n\n\nHelp required\n=============\n\nPatches are welcome for the source code or for the documentation\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tomturner/cython-csg", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cython-csg", "package_url": "https://pypi.org/project/cython-csg/", "platform": "", "project_url": "https://pypi.org/project/cython-csg/", "project_urls": { "Homepage": "https://github.com/tomturner/cython-csg" }, "release_url": "https://pypi.org/project/cython-csg/0.5.8/", "requires_dist": null, "requires_python": "", "summary": "Constructive solid geometry on meshes using BSP trees in Cython CSG.", "version": "0.5.8" }, "last_serial": 3467666, "releases": { "0.5.8": [ { "comment_text": "", "digests": { "md5": "87dee5f1e71037d5da1780947aaa9f8f", "sha256": "45a656b6603caf5fe01ce99cbf24f869955256daae2e74e423152eeb0d2d496d" }, "downloads": -1, "filename": "cython-csg-0.5.8.tar.gz", "has_sig": false, "md5_digest": "87dee5f1e71037d5da1780947aaa9f8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160468, "upload_time": "2018-01-06T22:02:49", "url": "https://files.pythonhosted.org/packages/11/8d/09c70abf3be3c8b3fc0017408c681894a22ae148d422d76f154919d2da37/cython-csg-0.5.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "87dee5f1e71037d5da1780947aaa9f8f", "sha256": "45a656b6603caf5fe01ce99cbf24f869955256daae2e74e423152eeb0d2d496d" }, "downloads": -1, "filename": "cython-csg-0.5.8.tar.gz", "has_sig": false, "md5_digest": "87dee5f1e71037d5da1780947aaa9f8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160468, "upload_time": "2018-01-06T22:02:49", "url": "https://files.pythonhosted.org/packages/11/8d/09c70abf3be3c8b3fc0017408c681894a22ae148d422d76f154919d2da37/cython-csg-0.5.8.tar.gz" } ] }