Skip to main content

A tool to manage and visualize the modification history of Build123D objects.

Project description

Build132d Shape History

A tool to manage and visualize the modification history of Build123D objects.

Installation

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.

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.

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

bd_shape_history-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

bd_shape_history-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file bd_shape_history-0.1.0.tar.gz.

File metadata

  • Download URL: bd_shape_history-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-49-generic

File hashes

Hashes for bd_shape_history-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7afd9f4ca978e16144c83b916438b47d8f6959791df394de5323e27aa6670f7e
MD5 1ed6b794288294dcd2747639915f8e6d
BLAKE2b-256 b99eadb9d77b0133b54300d5097b3ba1d8b824e73168eb77fae7ab8fc7b5dce8

See more details on using hashes here.

File details

Details for the file bd_shape_history-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bd_shape_history-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-49-generic

File hashes

Hashes for bd_shape_history-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a64991d413b9fb25ff3cd6a916f0fd69f95bc3deb3c2ce8a5f71d9d7fbfc028
MD5 3250891e9477c635f09ee214f6ae20ef
BLAKE2b-256 e2bff81632242b4c9be06a22434a381b9d6d2fca7fe5ee084abab51e20ea9a42

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