cq-annotate


Namecq-annotate JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryAn annotation extension designed to work with the CadQuery API
upload_time2025-01-02 21:43:30
maintainerNone
docs_urlNone
authorJeremy Wright
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements cadquery pytest svgutils
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cq-annotate

An annotation extension designed to work with the CadQuery parametric CAD API.

## Installation

This is not published on PyPI yet, but it can be installed from git via `pip`.

```
pip install git+https://github.com/jmwright/cq-annotate.git
```

## Modules

* `callouts` - Adds callouts like assembly arrows.
* `dimensioning` - Adds dimensions like diametral and radial dimensions.
* `overlays` - Adds overlays such as safety warnings.
* `views` - Adds ability to set the model up for various views, such as exploded views.

## Importing

The methods available from this package can be imported like so:
```python
from cq_annotate.callouts import add_assembly_arrows
from cq_annotate.dimensioning import add_circular_dimensions
from cq_annotate.views import explode_assembly
from cq_annotate.overlays import add_safety_warning
```

## Methods

* `callouts.add_assembly_arrows` - Automatically adds assembly arrows to faces in an assembly tagged "arrow". The arrow will face in the opposite direction of the normal of the face so that in something like an exploded assembly view the arrows should be indicating the direction to reassemble the assembly. The arrow size can be altered using the `arrow_scale_factor` parameter. More information can be found in the docstring for this method.
* `views.explode_assembly` - Creates an exploded view of an assembly by translating the parts of the assembly by the `explode_loc` value defined by the designer in the `metadata` parameter of each part. This requires more work on the part of the designer, but provides the proper level of control to ensure that exploded views look correct. More information can be found in the docstring for this method.
* `dimensioning.add_circular_dimensions` - Adds diametral and radial dimension objects as part of an assembly to a given model, based on tagged features. See the method's docstring for more information.
* `overlays.add_safety_warning` - Adds a safety overlay that can be overlaid on existing SVG content. See the method's docstring for more information.

## Examples

### Assembly Arrows
* [add_assembly_arrows_example.py](./examples/add_assembly_arrows_example.py) - A fully commented example showing a simple example of how to use assembly arrows.

![Assembly Arrows Example](./docs/images/assembly_arrows_example.png)

### Assembly Lines
* [add_assembly_lines_example.py](./examples/add_assembly_lines_example.py) - Example showing a simple example of how to use assembly lines.

![Assembly Lines Example](./docs/images/assembly_lines_example.png)

### Explode Assembly
* [explode_assembly_example.py](./examples/explode_assembly_example.py) - A fully commented example showing how a simple assembly can be set up to explode to show the individual components better. In the screenshot below, the two blocks would be touching at the origin if they were not set to be exploded.

![Explode Assembly Example](./docs/images/explode_assembly_example.png)

### Circular Dimensions
* [circular_dimensions_example.py](./examples/circular_dimensions_example.py) - Shows a basic example of adding a diameter dimension (radius) to a hole.

![Circular Dimension Example](./docs/images/circular_dimension_example.png)

### Safety Warning
* [safety_warning_example.py](./examples/safety_warning_example.py) - Adds a customizable safety warning to an existing SVG. The `test_add_safety_warning.svg` file can be copied from the `tests` directory and used with this example.

![Safety Warning Example](./docs/images/safety_warning_example.png)
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cq-annotate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Jeremy Wright",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/4b/aa/9b14d77cf5d9eced4a648b137e0b87269c61746e3c242a32f5aeac858670/cq_annotate-1.1.0.tar.gz",
    "platform": null,
    "description": "# cq-annotate\n\nAn annotation extension designed to work with the CadQuery parametric CAD API.\n\n## Installation\n\nThis is not published on PyPI yet, but it can be installed from git via `pip`.\n\n```\npip install git+https://github.com/jmwright/cq-annotate.git\n```\n\n## Modules\n\n* `callouts` - Adds callouts like assembly arrows.\n* `dimensioning` - Adds dimensions like diametral and radial dimensions.\n* `overlays` - Adds overlays such as safety warnings.\n* `views` - Adds ability to set the model up for various views, such as exploded views.\n\n## Importing\n\nThe methods available from this package can be imported like so:\n```python\nfrom cq_annotate.callouts import add_assembly_arrows\nfrom cq_annotate.dimensioning import add_circular_dimensions\nfrom cq_annotate.views import explode_assembly\nfrom cq_annotate.overlays import add_safety_warning\n```\n\n## Methods\n\n* `callouts.add_assembly_arrows` - Automatically adds assembly arrows to faces in an assembly tagged \"arrow\". The arrow will face in the opposite direction of the normal of the face so that in something like an exploded assembly view the arrows should be indicating the direction to reassemble the assembly. The arrow size can be altered using the `arrow_scale_factor` parameter. More information can be found in the docstring for this method.\n* `views.explode_assembly` - Creates an exploded view of an assembly by translating the parts of the assembly by the `explode_loc` value defined by the designer in the `metadata` parameter of each part. This requires more work on the part of the designer, but provides the proper level of control to ensure that exploded views look correct. More information can be found in the docstring for this method.\n* `dimensioning.add_circular_dimensions` - Adds diametral and radial dimension objects as part of an assembly to a given model, based on tagged features. See the method's docstring for more information.\n* `overlays.add_safety_warning` - Adds a safety overlay that can be overlaid on existing SVG content. See the method's docstring for more information.\n\n## Examples\n\n### Assembly Arrows\n* [add_assembly_arrows_example.py](./examples/add_assembly_arrows_example.py) - A fully commented example showing a simple example of how to use assembly arrows.\n\n![Assembly Arrows Example](./docs/images/assembly_arrows_example.png)\n\n### Assembly Lines\n* [add_assembly_lines_example.py](./examples/add_assembly_lines_example.py) - Example showing a simple example of how to use assembly lines.\n\n![Assembly Lines Example](./docs/images/assembly_lines_example.png)\n\n### Explode Assembly\n* [explode_assembly_example.py](./examples/explode_assembly_example.py) - A fully commented example showing how a simple assembly can be set up to explode to show the individual components better. In the screenshot below, the two blocks would be touching at the origin if they were not set to be exploded.\n\n![Explode Assembly Example](./docs/images/explode_assembly_example.png)\n\n### Circular Dimensions\n* [circular_dimensions_example.py](./examples/circular_dimensions_example.py) - Shows a basic example of adding a diameter dimension (radius) to a hole.\n\n![Circular Dimension Example](./docs/images/circular_dimension_example.png)\n\n### Safety Warning\n* [safety_warning_example.py](./examples/safety_warning_example.py) - Adds a customizable safety warning to an existing SVG. The `test_add_safety_warning.svg` file can be copied from the `tests` directory and used with this example.\n\n![Safety Warning Example](./docs/images/safety_warning_example.png)",
    "bugtrack_url": null,
    "license": null,
    "summary": "An annotation extension designed to work with the CadQuery API",
    "version": "1.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/jmwright/cq-annotate/issues",
        "Homepage": "https://github.com/jmwright/cq-annotate"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a42b3eb1a11fa93192db3adc7c223f681eadc6045abb555817fb400f1d028bb1",
                "md5": "768b0bf2b2dbde16ca4a63a2f4b2b877",
                "sha256": "2c70ec5285d01f9a427c2871a0c9bef3b579a34a9729b009cdc558e8d4121bef"
            },
            "downloads": -1,
            "filename": "cq_annotate-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "768b0bf2b2dbde16ca4a63a2f4b2b877",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 12829,
            "upload_time": "2025-01-02T21:43:27",
            "upload_time_iso_8601": "2025-01-02T21:43:27.490248Z",
            "url": "https://files.pythonhosted.org/packages/a4/2b/3eb1a11fa93192db3adc7c223f681eadc6045abb555817fb400f1d028bb1/cq_annotate-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4baa9b14d77cf5d9eced4a648b137e0b87269c61746e3c242a32f5aeac858670",
                "md5": "ee700efb9b1d224c6f619daaa0cbb3bf",
                "sha256": "b06d2340e6c84f5e8673393b3b17cd2edf8a4a4ec5fea2302ad6cb2c8f81cf6c"
            },
            "downloads": -1,
            "filename": "cq_annotate-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ee700efb9b1d224c6f619daaa0cbb3bf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 85218,
            "upload_time": "2025-01-02T21:43:30",
            "upload_time_iso_8601": "2025-01-02T21:43:30.865633Z",
            "url": "https://files.pythonhosted.org/packages/4b/aa/9b14d77cf5d9eced4a648b137e0b87269c61746e3c242a32f5aeac858670/cq_annotate-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-02 21:43:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jmwright",
    "github_project": "cq-annotate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "cadquery",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "svgutils",
            "specs": []
        }
    ],
    "lcname": "cq-annotate"
}
        
Elapsed time: 8.91619s