Skip to main content

a programmatic cad library

Project description

Petrify Logo https://travis-ci.org/AnIrishDuck/petrify.svg?branch=master Documentation Status https://mybinder.org/badge_logo.svg

A library for working with three-dimensional geometry. Designed for CAD / CAM applications.

To get started with this library, we recommend walking through the demos below. Each notebook contains links to our comprehensive class and method-level documentation.

Online Demo

Thanks to the magic of binder, you can try out petrify online. We have demos for several core petrify features:

  • Construction of many basic solids.

  • Methods for defining advanced solids.

  • Combining multiple solids into a single complex solid.

Have patience; notebooks on binder can take up to a minute to start. Due to a bug in pythreejs, you’ll need to click “restart and run all” to see the relevant interactive visualizations.

Design Principles

  • Novice focus. This library should make it as easy as possible to build and manipulate solids, shapes, and other geometry.

  • Immutable operation. Immutable math is easier for novices to reason about. This library explicitly does not target strong real-time applications like games that demands mutability for performance.

  • Pluggable engines. CSG is complicated. Different engines have different tradeoffs:

    • The pymesh engine is the default where the pymesh2 library is installed. It uses the IGL engine, which is mature and quite fast. However, building pymesh with IGL support can be difficult for novices and in certain environments (like Windows).

    • cython-csg is relatively fast, but still requires a cython build toolchain.

    • pycsg is a pure-python implementation. It is obviously quite slow, but works everywhere python does. For example, pure python environments like pyiodide can utilize this engine easily.

Contributors

This library is a fusion of:

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

petrify-0.4.0.tar.gz (43.4 kB view hashes)

Uploaded Source

Supported by

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