engscript


Nameengscript JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryEngScript is an experimental library aiming to provide fast OpenSCAD-like, python tool, with integrated rendering and assembly capabilities
upload_time2024-09-22 14:41:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords cad mesh hardware
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # EngScript
![](./docs/mkdocs/logo/engscript-256x256.png)

[API Documentation](https://gitbuilding.gitlab.io/engscript)

## What is EngScript

EngScript is an experimental library aiming to provide fast OpenSCAD-like, python tool, with integrated rendering and assembly capabilities.

Ideally EngScript will eventually be able to support complex projects like the OpenFlexure microscope.

## Installation

The project is not yet on PyPi, so you have to clone this repository and install directly.

To install EngScript you must have Python 3.10 or greater installed, and pip installed. You can then run:

    pip install engscript

from your terminal.

A more complete [getting started guide](https://gitbuilding.gitlab.io/engscript/gettingstarted/index.html) is available.

## Why write another code CAD program?

![](./docs/mkdocs/img/code_cad.png)

This is a fair question. The open source code-CAD space is very crowded, and there is arguably very little to gain from creating another similar tool. This tool is experimental and is based on extensive experience building complex hardware in OpenSCAD.

We created the [OpenFlexure Microscope](http://openflexure.org) in OpenSCAD ([repo](https://gitlab.com/openflexure/openflexure-microscope/)). OpenSCAD allowed us to build a very compact, complex, precision translation stage for 3D printing a microscope body. We also have written a lot of custom assembly scripts allowing us to automatically generate the images for our [assembly instructions](https://build.openflexure.org/openflexure-microscope/v7.0.0-beta2/) in OpenSCAD:

![](https://build.openflexure.org/openflexure-microscope/v7.0.0-beta2/renders/complete_microscope_rms1.png)

While OpenSCAD has taken us a long way we still have issues with:

* A lack of language specific tools such linters (we wrote our own [SCAD linter](https://gitlab.com/bath_open_instrumentation_group/sca2d/)), unit test frameworks, package managers, etc.
* Difficulty handling data for a large complex project
* Speed issues
* Faulty meshs

As [OpenSCAD moves to the manifold kernel](https://github.com/openscad/openscad/issues/4825) the mesh quality and speed will improve. But a project the size and complexity of OpenFlexure really feels that it needs advanced language features and tools that OpenSCAD. For this it makes sense to look for an alternative in an established general purpose language.

Other options include:

* [CadQuery](https://github.com/CadQuery/cadquery/) - CadQuery is a really ambitious project, bringing full B-rep modelling (and STEP file compatibility) to the open source code CAD world. Moving away from meshes would open up opportunities outside 3D printing. For OpenFlexure the microscope is designed entirely around 3D printing, and relies heavily on operations not supported in the underlying OCC kernel. Porting to CadQuery would be a huge task, and would require a lot of work on CADQuery to reproduce our renders (This work is ongoing in CadQuery and is very exciting).
* [Python OpenSCAD](https://pythonscad.org/) - Another cool project which brings Python to OpenSCAD. However, as the python runs within OpenSCAD this ties the project still to many of the pitfalls of the OpenSCAD internals. I also worry that this approach makes it hard to run python virtual environments so that different projects can have different libraries installed, and so that packages can be handled with a package manager.
* Web-based CAD such as [ManifoldCAD](https://manifoldcad.org/) - The web provides easy options for getting started, nothing to install, just start coding. However, I think that as a project becomes more complex and has multiple files and even external packages this simplicity goes away. Either you need a fully hosted solution with storage, multiple files, and package management; or you need to run things locally, hosting dev servers, installing packages with npm. I don't see an easy way for this to scale.
* One of the many other PythonCADs - There are lots of other programs similar to EngScript which are Python based, using the same or different underlying kernel. While many look really cool, none I found seem to be very mature and stable. (Not that EngScript is mature or stable either).

The purpose of EngScript is to take all the lessons we learned in creating the OpenFlexure in OpenSCAD, the lessons we learned making auto-updating rendered assembly manuals, and the lessons collaborating on the code with a [growing community](https://openflexure.discourse.group/). EngScript doesn't offer to solve these problems yet, but it is a space for us to experiment with features that are needed for complex projects. A key focus of this will be object oriented code so that object properties can be queried during the design process. This should help mitigate some data handling issues, but should also make it easier to capture design intent.

EngScript may be a successful new code CAD program adopted by the OpenFlexure project. It may just be a place to try new things and to learn from that experience.

## Should *I* use EngScript

* If you want to play around with something new - Yes
* If you want to help develop it - Very yes
* If you want a good stable CAD package - Nope!

## See also

This package heavily uses [manifold](https://github.com/elalish/manifold) and [trimesh](https://github.com/mikedh/trimesh/).

It also too a lot of inspiration from [badcad](https://github.com/wrongbad/badcad/).


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "engscript",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "CAD, Mesh, hardware",
    "author": null,
    "author_email": "Julian Stirling <julian@julianstirling.co.uk>",
    "download_url": "https://files.pythonhosted.org/packages/12/83/32afd667d4812254adc03a3d782922e0650b91a32a95f278660109834efb/engscript-0.0.1.tar.gz",
    "platform": null,
    "description": "# EngScript\n![](./docs/mkdocs/logo/engscript-256x256.png)\n\n[API Documentation](https://gitbuilding.gitlab.io/engscript)\n\n## What is EngScript\n\nEngScript is an experimental library aiming to provide fast OpenSCAD-like, python tool, with integrated rendering and assembly capabilities.\n\nIdeally EngScript will eventually be able to support complex projects like the OpenFlexure microscope.\n\n## Installation\n\nThe project is not yet on PyPi, so you have to clone this repository and install directly.\n\nTo install EngScript you must have Python 3.10 or greater installed, and pip installed. You can then run:\n\n    pip install engscript\n\nfrom your terminal.\n\nA more complete [getting started guide](https://gitbuilding.gitlab.io/engscript/gettingstarted/index.html) is available.\n\n## Why write another code CAD program?\n\n![](./docs/mkdocs/img/code_cad.png)\n\nThis is a fair question. The open source code-CAD space is very crowded, and there is arguably very little to gain from creating another similar tool. This tool is experimental and is based on extensive experience building complex hardware in OpenSCAD.\n\nWe created the [OpenFlexure Microscope](http://openflexure.org) in OpenSCAD ([repo](https://gitlab.com/openflexure/openflexure-microscope/)). OpenSCAD allowed us to build a very compact, complex, precision translation stage for 3D printing a microscope body. We also have written a lot of custom assembly scripts allowing us to automatically generate the images for our [assembly instructions](https://build.openflexure.org/openflexure-microscope/v7.0.0-beta2/) in OpenSCAD:\n\n![](https://build.openflexure.org/openflexure-microscope/v7.0.0-beta2/renders/complete_microscope_rms1.png)\n\nWhile OpenSCAD has taken us a long way we still have issues with:\n\n* A lack of language specific tools such linters (we wrote our own [SCAD linter](https://gitlab.com/bath_open_instrumentation_group/sca2d/)), unit test frameworks, package managers, etc.\n* Difficulty handling data for a large complex project\n* Speed issues\n* Faulty meshs\n\nAs [OpenSCAD moves to the manifold kernel](https://github.com/openscad/openscad/issues/4825) the mesh quality and speed will improve. But a project the size and complexity of OpenFlexure really feels that it needs advanced language features and tools that OpenSCAD. For this it makes sense to look for an alternative in an established general purpose language.\n\nOther options include:\n\n* [CadQuery](https://github.com/CadQuery/cadquery/) - CadQuery is a really ambitious project, bringing full B-rep modelling (and STEP file compatibility) to the open source code CAD world. Moving away from meshes would open up opportunities outside 3D printing. For OpenFlexure the microscope is designed entirely around 3D printing, and relies heavily on operations not supported in the underlying OCC kernel. Porting to CadQuery would be a huge task, and would require a lot of work on CADQuery to reproduce our renders (This work is ongoing in CadQuery and is very exciting).\n* [Python OpenSCAD](https://pythonscad.org/) - Another cool project which brings Python to OpenSCAD. However, as the python runs within OpenSCAD this ties the project still to many of the pitfalls of the OpenSCAD internals. I also worry that this approach makes it hard to run python virtual environments so that different projects can have different libraries installed, and so that packages can be handled with a package manager.\n* Web-based CAD such as [ManifoldCAD](https://manifoldcad.org/) - The web provides easy options for getting started, nothing to install, just start coding. However, I think that as a project becomes more complex and has multiple files and even external packages this simplicity goes away. Either you need a fully hosted solution with storage, multiple files, and package management; or you need to run things locally, hosting dev servers, installing packages with npm. I don't see an easy way for this to scale.\n* One of the many other PythonCADs - There are lots of other programs similar to EngScript which are Python based, using the same or different underlying kernel. While many look really cool, none I found seem to be very mature and stable. (Not that EngScript is mature or stable either).\n\nThe purpose of EngScript is to take all the lessons we learned in creating the OpenFlexure in OpenSCAD, the lessons we learned making auto-updating rendered assembly manuals, and the lessons collaborating on the code with a [growing community](https://openflexure.discourse.group/). EngScript doesn't offer to solve these problems yet, but it is a space for us to experiment with features that are needed for complex projects. A key focus of this will be object oriented code so that object properties can be queried during the design process. This should help mitigate some data handling issues, but should also make it easier to capture design intent.\n\nEngScript may be a successful new code CAD program adopted by the OpenFlexure project. It may just be a place to try new things and to learn from that experience.\n\n## Should *I* use EngScript\n\n* If you want to play around with something new - Yes\n* If you want to help develop it - Very yes\n* If you want a good stable CAD package - Nope!\n\n## See also\n\nThis package heavily uses [manifold](https://github.com/elalish/manifold) and [trimesh](https://github.com/mikedh/trimesh/).\n\nIt also too a lot of inspiration from [badcad](https://github.com/wrongbad/badcad/).\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "EngScript is an experimental library aiming to provide fast OpenSCAD-like, python tool, with integrated rendering and assembly capabilities",
    "version": "0.0.1",
    "project_urls": {
        "Bug Tracker": "https://gitlab.com/gitbuilding/engscript/issues",
        "Homepage": "https://gitbuilding.gitlab.io/engscript/",
        "Source Code": "https://gitlab.com/gitbuilding/engscript"
    },
    "split_keywords": [
        "cad",
        " mesh",
        " hardware"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fc544f38fdcf76848066644defaa1f19449f4055fab2fe72ddc68bc3ffd10676",
                "md5": "6cf61ff5b668ce1c0e2c81b48c16a078",
                "sha256": "ff749dfcc43bc3665f54261ea6fbedcfb377a0d772005c759cffcda9b32cfd54"
            },
            "downloads": -1,
            "filename": "engscript-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6cf61ff5b668ce1c0e2c81b48c16a078",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 40777,
            "upload_time": "2024-09-22T14:41:46",
            "upload_time_iso_8601": "2024-09-22T14:41:46.883680Z",
            "url": "https://files.pythonhosted.org/packages/fc/54/4f38fdcf76848066644defaa1f19449f4055fab2fe72ddc68bc3ffd10676/engscript-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "128332afd667d4812254adc03a3d782922e0650b91a32a95f278660109834efb",
                "md5": "7bd76b5161762de28478a0dd874c6041",
                "sha256": "8121fbe21eb83764773462f07f40189d7f68d2b7c53b8ffc5b0a360ed9a7f7e9"
            },
            "downloads": -1,
            "filename": "engscript-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7bd76b5161762de28478a0dd874c6041",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 720268,
            "upload_time": "2024-09-22T14:41:50",
            "upload_time_iso_8601": "2024-09-22T14:41:50.914002Z",
            "url": "https://files.pythonhosted.org/packages/12/83/32afd667d4812254adc03a3d782922e0650b91a32a95f278660109834efb/engscript-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-22 14:41:50",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "gitbuilding",
    "gitlab_project": "engscript",
    "lcname": "engscript"
}
        
Elapsed time: 0.40932s