Build132d Shape History
A tool to manage and visualize the modification history of Build123D objects.
Installation
This package is published on Pypi:
pip install bd_shape_history
Usage
Assuming a simple part created in 3 steps:
box = _.Box(3, 3, 1)
cbox = _.chamfer(box.edges()[0], 0.5)
cboxh = cbox - _.Cylinder(0.75, 1)
We can build the history with:
hm = ShapeHistory.from_globals()
And then display it diff() (here with VScode OCP CAD viewer):
ov.set_defaults(render_edges=False)
ov.show(*hm.diff(), names=hm.labels())
This shows a visual diff between each step:
Notice how the object is colored:
- new faces and edges are green and light green;
- unchanged faces and edges are gray and black;
- modified faces and edges are dark green and olive
See the examples folder for more details.
Command line interface
You can compare two files and export the diff as an image using the ocp_diff script. For instance:
ocp_diff ./examples/a.py:box ./examples/b.py:box img.png
How does it work
ShapeHistory compares the hash of faces, edges and vertices between each steps:
- a face or edge whose hash is found on the previous step is considered unmodified;
- a face whose all edges are not found in the previous step is considered added (and same for edge / vertices);
- otherwise the face or edge is considered modified.
Metadata
Release files for bd_shape_history 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bd_shape_history-0.1.1.tar.gz | 4.8 kB | Without provenance | Details for bd_shape_history-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bd_shape_history-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for bd_shape_history-0.1.1-py3-none-any.whl |
Total release size: 11.0 kB
Release files / bd_shape_history-0.1.1.tar.gz
| Download URL | bd_shape_history-0.1.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40e50bcacb34e3ec5105a28659735104ca79dcea7164766643a080e9b7b3bf1f
|
|
BLAKE2b-256 checksum How to use checksums |
c2db0db016e239b3f2c6b85708fc7b3f7607c73918d5af66f80edde1478e1c62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-49-generic
|
Release files / bd_shape_history-0.1.1-py3-none-any.whl
| Download URL | bd_shape_history-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1da9450a189eeef4886f9487dee1a0f9858844677cc1d04fb3fa39c6de2f500c
|
|
BLAKE2b-256 checksum How to use checksums |
0132eb71a54cd436a8d2aa54f1788e0d242d6639194f1ced304fa6ec82e421df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-49-generic
|
Security for bd_shape_history 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.