Metadata-Version: 2.4
Name: cadaclysm
Version: 0.4.4
Summary: CAD file format reading (STEP, IGES, IFC, Rhino, ACIS, BREP, OpenSCAD) and exact B-rep modelling
Keywords: CAD,STEP,IGES,IFC,BIM,Rhino,3dm,ACIS,BREP,OpenSCAD,B-rep,NURBS,solid modeling,mesh,tessellation,glTF
Author: Roberto De Ioris
License-Expression: LicenseRef-Cadaclysm-EULA
License-File: EULA.txt
Project-URL: Homepage, https://cadaclysm.blitter.studio
Project-URL: Documentation, https://cadaclysm.blitter.studio/docs/python.html
Project-URL: SDK, https://github.com/rdeioris/cadaclysm-sdk
Requires-Python: >=3.8
Provides-Extra: numpy
Requires-Dist: numpy; extra == "numpy"
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Classifier: Topic :: Scientific/Engineering
Description-Content-Type: text/markdown; charset=UTF-8

# cadaclysm

CAD file format reading and exact B-rep modelling.

**File formats** (`import cadaclysm`): STEP (AP203, AP214, AP242 and the other APs whose
schemas it carries), IGES, IFC (2x3, 4, 4.3), Rhino `.3dm`, ACIS `.sat`, BREP (`.brep`) and
OpenSCAD (`.scad`).
- The assembly tree with names, colours, placements and attributes, and SQL-style
  filters to find nodes.
- The exact B-rep geometry of every body, tessellated to the tolerance you ask for and
  handed back as zero-copy numpy arrays.
- Export to glTF/GLB, OBJ and STL.

**B-rep** (`from cadaclysm import blacksmith`): an exact boundary-representation modelling
kernel.
- Extrude, revolve, sweep and loft; join, cut and common; fillet, chamfer and shell.
- Open a B-rep body from a STEP, ACIS, Rhino, BREP, IGES or IFC file and keep modelling it.
- Write STEP, with every schema built in.

## Install

```shell
pip install cadaclysm            # the reader and the kernel, with their libraries
pip install "cadaclysm[numpy]"   # plus numpy, for meshes as arrays
```

Wheels for Windows x64, macOS 11+ (Apple silicon and Intel), and Linux x64 and arm64
(glibc 2.17+); Python 3.8 or later. The wheel carries the libraries and the wrappers of
one release, so the two always match.

## Build a part, then read it back

```python
from cadaclysm.blacksmith import Axis, Profile, Selector, Workplane

plate = Workplane.xy().extrude(Profile.rect(120, 80), 14).solid()
boss = (Workplane.from_solid(plate)
        .faces(Selector.max(Axis.Z)).workplane()
        .extrude(Profile.circle(22), 26).solid())
part = plate.join(boss).cut(Workplane.xy().extrude(Profile.circle(11), 60).solid().translate(0, 0, -10))
part.step("plate.stp")
```

```python
import cadaclysm

with cadaclysm.open("plate.stp") as scene:
    for node in scene.walk():
        print("  " * node.depth + node.label, f"[{node.kind}]")
    for placement in scene.placements:           # meshes need numpy
        print(placement.geometry.label, placement.geometry.mesh.triangle_count, "triangles")
    scene.save("plate.glb")
```

## Licence

Everything works without a licence; a notice is printed to stderr on every open and
every export. A licence file removes it: set `CADACLYSM_LICENSE` (a path or the text),
put `cadaclysm.lic` in the working directory, or load it from code:

```python
import cadaclysm
from cadaclysm import blacksmith

cadaclysm.license("cadaclysm.lic")
blacksmith.license("cadaclysm.lic")
```

The libraries are proprietary; the EULA ships in this package's licence file.
Licences: https://cadaclysm.blitter.studio/license

The wheel's own libraries are used unless `CADACLYSM_LIBRARY` or
`CADACLYSM_BLACKSMITH_LIBRARY` is set in the environment --
unset those when moving from the SDK, since they override the wheel's own files.

Documentation: https://cadaclysm.blitter.studio/docs/python.html. The C API and the C#,
Go, Java, Node and Swift wrappers are in the SDK: https://github.com/rdeioris/cadaclysm-sdk
