Skip to main content

An annotation extension designed to work with the CadQuery API

Project description

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 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

Assembly Arrows Example

Assembly Lines

Assembly Lines Example

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.

Explode Assembly Example

Circular Dimensions

Circular Dimension Example

Safety Warning

  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cq_annotate-1.0.0.tar.gz (85.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cq_annotate-1.0.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file cq_annotate-1.0.0.tar.gz.

File metadata

  • Download URL: cq_annotate-1.0.0.tar.gz
  • Upload date:
  • Size: 85.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for cq_annotate-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8ef7c99134d9fa4657beef5cdcccf6d68bd4efad5be949eeda909efdf9d556bc
MD5 44ea219759ee3b00ac7661fadca28cc5
BLAKE2b-256 554af96583a61d9bb44c69b1485ad6a6f869176c835b0800268978c5a9636f23

See more details on using hashes here.

File details

Details for the file cq_annotate-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cq_annotate-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for cq_annotate-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8394bf8ee123767d3eda83ac6264b1fab78338a9e63306bbb9e5ac2987eb04a2
MD5 aa43a7fcab773474046cc9254d30dd17
BLAKE2b-256 627a254b6ba2952ead411c8d32b156eab6a51d61c91f3ba30317c6056d116c4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page