# <h1 style="text-align:center; color:'red'">PISTL (pronounced as "Pistol")</h1>
<p text-align="center"><img src=".\assets\pystl_readme_cover.PNG" alt="Pystl_cover_image"></p>
<u>About the figure above</u>: Multiple shapes generated using PISTL as STL file and visualized in **Meshmixer** for the purpose of this picture. The visualization in PISTL can be done using pyvista, which is installed as a dependency.\_
### What is PISTL?
PISTL is a small (micro) library that can be used in python to programatically create stereolithographic (stl) files of regular geometric shapes like circle, cylinder, tetrahedron, sphere, pyramid and others by morphing these shapes. pystl also provide functions that can be used to translate and rotate these stl objects.
In summary:
PISTL can be used for the following purposes:
- to create simple geometric shape files in .stl format.
- visualize this stl files. [PySTL uses pyvista for such visualizations].
- perform simple transformations like translate, rotate and scale shapes.
### Examples
```python
# This example creates a sphere stl using pistl
# step 1.0: import PySTL
import pistl
from pistl import shapes
#instantiate a sphere shape
sphere = shapes.Sphere()
# set the radius of the sphere
sphere.radius = 10
# set resolution of the sphere in longitude and latitude
sphere.resolution_latitude = 200
sphere.resoultion_longitude = 200
# once you have set the radius and resolution, call create method
sphere.create()
# call export method to set stl filename and shape name
sphere.export('Results/sphere.stl', 'sphere')
# Finally visualize the shape in trame window or in a jupyter kernal using the visualize method.
sphere.visualize().plot(color='magenta', text=f'{sphere.name}')
```
<p text-align="center"><img src=".\assets\sphere.png" alt="Pystl_generated_sphere_stl"></p>
<u>PISTL is an open source project that welcomes contributions from developers from diverse community and backgrounds.\_</u>
contact : sumanan047@gmail.com to get added on the project formally.
Raw data
{
"_id": null,
"home_page": "https://github.com/sumanan047/pistl",
"name": "pistl",
"maintainer": "Suman Saurabh",
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": "sumanan047@gmail.com",
"keywords": "stl, 3-D Shapes",
"author": "Suman Saurabh",
"author_email": "sumanan047@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/50/ac/d2da3d8d389688ee4f03ac1c07ce6b5030fb7dfd310fad87d050971a3954/pistl-1.2.0.tar.gz",
"platform": null,
"description": "# <h1 style=\"text-align:center; color:'red'\">PISTL (pronounced as \"Pistol\")</h1>\n\n<p text-align=\"center\"><img src=\".\\assets\\pystl_readme_cover.PNG\" alt=\"Pystl_cover_image\"></p>\n\n<u>About the figure above</u>: Multiple shapes generated using PISTL as STL file and visualized in **Meshmixer** for the purpose of this picture. The visualization in PISTL can be done using pyvista, which is installed as a dependency.\\_\n\n### What is PISTL?\n\nPISTL is a small (micro) library that can be used in python to programatically create stereolithographic (stl) files of regular geometric shapes like circle, cylinder, tetrahedron, sphere, pyramid and others by morphing these shapes. pystl also provide functions that can be used to translate and rotate these stl objects.\n\nIn summary:\nPISTL can be used for the following purposes:\n\n- to create simple geometric shape files in .stl format.\n- visualize this stl files. [PySTL uses pyvista for such visualizations].\n- perform simple transformations like translate, rotate and scale shapes.\n\n### Examples\n\n```python\n# This example creates a sphere stl using pistl\n\n# step 1.0: import PySTL\nimport pistl\nfrom pistl import shapes\n\n#instantiate a sphere shape\nsphere = shapes.Sphere()\n\n# set the radius of the sphere\nsphere.radius = 10\n\n# set resolution of the sphere in longitude and latitude\nsphere.resolution_latitude = 200\nsphere.resoultion_longitude = 200\n\n# once you have set the radius and resolution, call create method\nsphere.create()\n\n# call export method to set stl filename and shape name\nsphere.export('Results/sphere.stl', 'sphere')\n\n# Finally visualize the shape in trame window or in a jupyter kernal using the visualize method.\nsphere.visualize().plot(color='magenta', text=f'{sphere.name}')\n```\n\n<p text-align=\"center\"><img src=\".\\assets\\sphere.png\" alt=\"Pystl_generated_sphere_stl\"></p>\n\n<u>PISTL is an open source project that welcomes contributions from developers from diverse community and backgrounds.\\_</u>\n\ncontact : sumanan047@gmail.com to get added on the project formally.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python library to generate STL format files for common shapes and geometries.",
"version": "1.2.0",
"project_urls": {
"Homepage": "https://github.com/sumanan047/pistl",
"Repository": "https://github.com/sumanan047/pistl"
},
"split_keywords": [
"stl",
" 3-d shapes"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d05405373c4fc583dd2762a0041c7043bdc1c1eab7427f7712881ba9bdebf113",
"md5": "e2ee51ae57668821144fec8a2ecdef70",
"sha256": "6ee004f656c529c882ab5974851dfc03e0eec64d564c1690641fb350950cd27b"
},
"downloads": -1,
"filename": "pistl-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e2ee51ae57668821144fec8a2ecdef70",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 11395,
"upload_time": "2024-11-09T01:17:50",
"upload_time_iso_8601": "2024-11-09T01:17:50.139650Z",
"url": "https://files.pythonhosted.org/packages/d0/54/05373c4fc583dd2762a0041c7043bdc1c1eab7427f7712881ba9bdebf113/pistl-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "50acd2da3d8d389688ee4f03ac1c07ce6b5030fb7dfd310fad87d050971a3954",
"md5": "eb74740b4627aa6852f36af6c2619be7",
"sha256": "c21092cd5423e1a0c0cf94da14b087912a5a39e1337b13faaeee2e6be9aba896"
},
"downloads": -1,
"filename": "pistl-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "eb74740b4627aa6852f36af6c2619be7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 11249,
"upload_time": "2024-11-09T01:17:51",
"upload_time_iso_8601": "2024-11-09T01:17:51.756998Z",
"url": "https://files.pythonhosted.org/packages/50/ac/d2da3d8d389688ee4f03ac1c07ce6b5030fb7dfd310fad87d050971a3954/pistl-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-09 01:17:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sumanan047",
"github_project": "pistl",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pistl"
}