# SuperSCAD
<table>
<thead>
<tr>
<th>Legal</th>
<th>Docs</th>
<th>Release</th>
<th>Code</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="https://pypi.org/project/Super-SCAD/" target="_blank"><img alt="PyPI - License" src="https://img.shields.io/pypi/l/Super-SCAD"></a>
</td>
<td>
<a href='https://superscad.readthedocs.io/en/latest/?badge=latest'> <img src='https://readthedocs.org/projects/superscad/badge/?version=latest' alt='Documentation Status'/></a>
</td>
<td>
<a href="https://badge.fury.io/py/Super-SCAD" target="_blank"><img src="https://badge.fury.io/py/Super-SCAD.svg" alt="Latest Stable Version"/></a><br/>
</td>
<td>
<a href="https://codecov.io/gh/SuperSCAD/SuperSCAD" target="_blank"><img src="https://codecov.io/gh/SuperSCAD/SuperSCAD/graph/badge.svg?token=7D8V8RRY11" alt="Code Coverage"/></a>
<a href="https://github.com/SuperSCAD/SuperSCAD/actions/workflows/unit.yml"><img src="https://github.com/SuperSCAD/SuperSCAD/actions/workflows/unit.yml/badge.svg" alt="unit Tests"/></a>
</td>
</tr>
</tbody>
</table>
## The OO Programmers Solid 3D CAD Modeller
SuperSCAD is an advanced application/library for generating 2D and 3D models in [OpenSCAD](https://openscad.org) in
Python. SuperSCAD is based, among others, on the factory pattern and delivers to you as 2D and 3D modeler the
superpowers of Python.
## Documentation
The full documentation is available at https://superscad.readthedocs.io.
## Getting Started and Installing SuperSCAD
We advise to create a Python virtual environment in a project folder:
```shell
cd awsesome-project
python -m venv .venv
. .venv/bin/activate
pip install super-scad
```
Using your favorite editor, copy-paste the code from the demo in the next section and save the file under
`openscad-logo.py`.
```shell
vi openscad-logo.py
```
Run python and open the generated `openscad-logo.scad` in openscad.
```shell
python openscad-logo.py
openscad openscad-logo.scad
```
Congratulations, you just finished your first SuperSCAD project.
## Demo
Below is an example of SuperSCAD utilizing the factory pattern.
```python3
from super_scad.boolean.Difference import Difference
from super_scad.d3.Cylinder import Cylinder
from super_scad.d3.Sphere import Sphere
from super_scad.other.Modify import Modify
from super_scad.scad.Context import Context
from super_scad.scad.Scad import Scad
from super_scad.scad.ScadWidget import ScadWidget
from super_scad.scad.Unit import Unit
from super_scad.transformation.Rotate3D import Rotate3D
class Logo(ScadWidget):
"""
SuperSCAD widget for generating OpenSCAD logo.
"""
def build(self, context: Context):
"""
Builds a SuperSCAD widget.
:param context: The build context.
"""
size: float = 50.0
hole: float = size / 2.0
height: float = 1.25 * size
cylinder = Cylinder(height=height, diameter=hole, center=True, fn4n=True)
sphere = Sphere(diameter=size, fn4n=True)
return Difference(children=[sphere,
cylinder,
Modify(highlight=True, child=Rotate3D(angle_x=90.0, child=cylinder)),
Rotate3D(angle_y=90.0, child=cylinder)])
if __name__ == '__main__':
scad = Scad(context=Context(fn=360))
logo = Logo()
scad.run_super_scad(logo, 'logo.scad')
```
The example generates the logo of OpenSCAD.

# Links
* [OpenSCAD SheetSheet](https://openscad.org/cheatsheet/index.html)
# License
This project is licensed under the terms of the [MIT license](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/SuperSCAD/SuperSCAD",
"name": "Super-SCAD",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.10.0",
"maintainer_email": null,
"keywords": "OpenSCAD, SuperSCAD",
"author": "P.R. Water",
"author_email": "p.r.water@setbased.nl",
"download_url": "https://files.pythonhosted.org/packages/c4/23/82e739172f94a66592378c01ab516596107610f8cc0bfa3b3fd9cf389284/super_scad-0.10.5.tar.gz",
"platform": null,
"description": "# SuperSCAD\n\n<table>\n<thead>\n<tr>\n<th>Legal</th>\n<th>Docs</th>\n<th>Release</th>\n<th>Code</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\n<a href=\"https://pypi.org/project/Super-SCAD/\" target=\"_blank\"><img alt=\"PyPI - License\" src=\"https://img.shields.io/pypi/l/Super-SCAD\"></a>\n</td>\n<td>\n<a href='https://superscad.readthedocs.io/en/latest/?badge=latest'> <img src='https://readthedocs.org/projects/superscad/badge/?version=latest' alt='Documentation Status'/></a>\n</td>\n<td>\n<a href=\"https://badge.fury.io/py/Super-SCAD\" target=\"_blank\"><img src=\"https://badge.fury.io/py/Super-SCAD.svg\" alt=\"Latest Stable Version\"/></a><br/>\n</td>\n<td>\n<a href=\"https://codecov.io/gh/SuperSCAD/SuperSCAD\" target=\"_blank\"><img src=\"https://codecov.io/gh/SuperSCAD/SuperSCAD/graph/badge.svg?token=7D8V8RRY11\" alt=\"Code Coverage\"/></a>\n<a href=\"https://github.com/SuperSCAD/SuperSCAD/actions/workflows/unit.yml\"><img src=\"https://github.com/SuperSCAD/SuperSCAD/actions/workflows/unit.yml/badge.svg\" alt=\"unit Tests\"/></a>\n</td>\n</tr>\n</tbody>\n</table>\n\n## The OO Programmers Solid 3D CAD Modeller\n\nSuperSCAD is an advanced application/library for generating 2D and 3D models in [OpenSCAD](https://openscad.org) in\nPython. SuperSCAD is based, among others, on the factory pattern and delivers to you as 2D and 3D modeler the\nsuperpowers of Python.\n\n## Documentation\n\nThe full documentation is available at https://superscad.readthedocs.io.\n\n## Getting Started and Installing SuperSCAD\n\nWe advise to create a Python virtual environment in a project folder:\n\n```shell\ncd awsesome-project\n\npython -m venv .venv\n. .venv/bin/activate\npip install super-scad\n```\n\nUsing your favorite editor, copy-paste the code from the demo in the next section and save the file under\n`openscad-logo.py`.\n\n```shell\nvi openscad-logo.py \n```\n\nRun python and open the generated `openscad-logo.scad` in openscad.\n\n```shell\npython openscad-logo.py\nopenscad openscad-logo.scad\n```\n\nCongratulations, you just finished your first SuperSCAD project.\n\n## Demo\n\nBelow is an example of SuperSCAD utilizing the factory pattern.\n\n```python3\nfrom super_scad.boolean.Difference import Difference\nfrom super_scad.d3.Cylinder import Cylinder\nfrom super_scad.d3.Sphere import Sphere\nfrom super_scad.other.Modify import Modify\nfrom super_scad.scad.Context import Context\nfrom super_scad.scad.Scad import Scad\nfrom super_scad.scad.ScadWidget import ScadWidget\nfrom super_scad.scad.Unit import Unit\nfrom super_scad.transformation.Rotate3D import Rotate3D\n\n\nclass Logo(ScadWidget):\n \"\"\"\n SuperSCAD widget for generating OpenSCAD logo.\n \"\"\"\n\n def build(self, context: Context):\n \"\"\"\n Builds a SuperSCAD widget.\n\n :param context: The build context.\n \"\"\"\n size: float = 50.0\n hole: float = size / 2.0\n height: float = 1.25 * size\n\n cylinder = Cylinder(height=height, diameter=hole, center=True, fn4n=True)\n sphere = Sphere(diameter=size, fn4n=True)\n\n return Difference(children=[sphere,\n cylinder,\n Modify(highlight=True, child=Rotate3D(angle_x=90.0, child=cylinder)),\n Rotate3D(angle_y=90.0, child=cylinder)])\n\n\nif __name__ == '__main__':\n scad = Scad(context=Context(fn=360))\n logo = Logo()\n scad.run_super_scad(logo, 'logo.scad')\n```\n\nThe example generates the logo of OpenSCAD.\n\n\n\n# Links\n\n* [OpenSCAD SheetSheet](https://openscad.org/cheatsheet/index.html)\n\n# License\n\nThis project is licensed under the terms of the [MIT license](LICENSE).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An advanced Python application and library for generating 2D and 3D models in OpenSCAD",
"version": "0.10.5",
"project_urls": {
"Documentation": "https://superscad.readthedocs.io/",
"Homepage": "https://github.com/SuperSCAD/SuperSCAD",
"Repository": "https://github.com/SuperSCAD/SuperSCAD"
},
"split_keywords": [
"openscad",
" superscad"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "073f45d5d4a7cc2dc4a0ee739c8a22adde4ed31c55fffdd68b6ef961b29b0373",
"md5": "d65617b46549ccfc4dc957cf25952168",
"sha256": "d21f9b2e602aa6a75d1b147ab23826f15c54bfbf73c05d84d01c290472ff1151"
},
"downloads": -1,
"filename": "super_scad-0.10.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d65617b46549ccfc4dc957cf25952168",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.10.0",
"size": 99492,
"upload_time": "2025-01-12T10:11:20",
"upload_time_iso_8601": "2025-01-12T10:11:20.028188Z",
"url": "https://files.pythonhosted.org/packages/07/3f/45d5d4a7cc2dc4a0ee739c8a22adde4ed31c55fffdd68b6ef961b29b0373/super_scad-0.10.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c42382e739172f94a66592378c01ab516596107610f8cc0bfa3b3fd9cf389284",
"md5": "028f35f77208262e703ce06bc961a773",
"sha256": "b781dcea4695a471d8ef271bf58cb4b6c2fd8e7d5db88e0fcc4fe8b07c34d33d"
},
"downloads": -1,
"filename": "super_scad-0.10.5.tar.gz",
"has_sig": false,
"md5_digest": "028f35f77208262e703ce06bc961a773",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.10.0",
"size": 51635,
"upload_time": "2025-01-12T10:11:23",
"upload_time_iso_8601": "2025-01-12T10:11:23.949847Z",
"url": "https://files.pythonhosted.org/packages/c4/23/82e739172f94a66592378c01ab516596107610f8cc0bfa3b3fd9cf389284/super_scad-0.10.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-12 10:11:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SuperSCAD",
"github_project": "SuperSCAD",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "super-scad"
}