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:
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 thearrow_scale_factorparameter. 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 theexplode_locvalue defined by the designer in themetadataparameter 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 - A fully commented example showing a simple example of how to use assembly arrows.
Assembly Lines
- add_assembly_lines_example.py - Example showing a simple example of how to use assembly lines.
Explode Assembly
- 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.
Circular Dimensions
- circular_dimensions_example.py - Shows a basic example of adding a diameter dimension (radius) to a hole.
Safety Warning
- safety_warning_example.py - Adds a customizable safety warning to an existing SVG. The
test_add_safety_warning.svgfile can be copied from thetestsdirectory and used with this example.
Metadata
Release files for cq-annotate 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cq_annotate-1.2.0.tar.gz | 85.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cq_annotate-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.2 kB
Release files / cq_annotate-1.2.0.tar.gz
| Download URL | cq_annotate-1.2.0.tar.gz |
|---|---|
| Size | 85.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ae68cf1f5db4999e16e3f8e9a84440eff9229e81cd9c80e9422d9693602e753
|
|
BLAKE2b-256 checksum How to use checksums |
aefb3e472df4db4722f4a277276dfb7599c6827008f1b8117f171b7166586b9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.2
|
Release files / cq_annotate-1.2.0-py3-none-any.whl
| Download URL | cq_annotate-1.2.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
845bda614990606451d6be3bbb27acd6f27a3e8522ab1923e6b434ad4c51cb01
|
|
BLAKE2b-256 checksum How to use checksums |
7444c53269f34decf25c2263f2d32d61948fdc0a17d8511fff92827a420d5fe3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.2
|