Metadata-Version: 2.4
Name: badcad-occt
Version: 0.2.0
Summary: badcad (CSG for Python) with an exact OCCT engine: true STEP files, fillets, chamfers, sweeps, and lofts
Author: wrongbad
Maintainer: spikeon
License-Expression: MIT
Project-URL: Homepage, https://github.com/spikeon/badcad
Project-URL: Source, https://github.com/spikeon/badcad/tree/release/badcad-occt
Project-URL: Upstream, https://github.com/wrongbad/badcad
Keywords: cad,csg,3d-printing,step,manifold,occt
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: manifold3d<4,>=3.5
Requires-Dist: pythreejs
Requires-Dist: nbformat
Provides-Extra: occt
Requires-Dist: cadquery-ocp-novtk<8.1,>=8.0; extra == "occt"
Requires-Dist: build123d<0.14,>=0.13; extra == "occt"
Requires-Dist: scipy; extra == "occt"
Requires-Dist: shapely>=2.0; extra == "occt"
Provides-Extra: text
Requires-Dist: pycairo; extra == "text"
Provides-Extra: svg
Requires-Dist: svgelements; extra == "svg"
Provides-Extra: all
Requires-Dist: badcad-occt[occt,svg,text]; extra == "all"
Dynamic: license-file

# badcad

> **badcad-occt** is a fork of [wrongbad/badcad](https://github.com/wrongbad/badcad) on PyPI. It adds an exact
> OCCT engine (`set_engine("occt")`) for true STEP files, fillets, chamfers, sweeps, and lofts. The import name is
> still `badcad`.
>
> ```bash
> pip install "badcad-occt[occt]"
> ```
>
> The extras are `occt` (the exact engine), `text` (pycairo), `svg` (svgelements), and `all`.


a jupyter based cad workflow

most of the hard work is done by
- [manifold](https://github.com/elalish/manifold) - constructive solid geometry 
- [pythreejs](https://github.com/jupyter-widgets/pythreejs) - jupyter 3d previews

this project aims to focus on usability in a jupyter environment

specifically for creating and exporting functional parts

# setup

```bash
pip install git+https://github.com/wrongbad/badcad.git
# optional dependencies (text + svg support)
pip install "badcad[all] @ git+https://github.com/wrongbad/badcad.git"
```

# example

```py
from badcad import *
plus = square(3, 1, center=True) + square(1, 3, center=True)
p_lil = plus.offset(-0.4, 'round')
p_big = plus.offset(+0.4, 'round')
p_big.extrude_to(p_lil, 1)
```

![plus](img/plus.png)

```py
from badcad import *
deathstar = sphere(r=1) - sphere(r=0.5).move(1.2,0,0)
deathstar.stl('deathstar.stl')
deathstar.rotate(y=-45, z=45)
```

![deathstar](img/deathstar.png)

```py
from badcad import *
bolt = threads(d=8, h=16, pitch=1) 
bolt += circle(r=5, fn=6).offset(1,'round').extrude(4).move(0,0,15)
bolt.align(x=0,y=0,z=0).rotate(x=-90)
```

![bolt](img/bolt.png)

```py
from badcad import *
t = text('yo', font='monospace')
t = t.offset(1,'round').extrude(2) - t.extrude(2)
t.align(x=0)
```

![txt](img/txt.png)

# motivation

to escape openscad syntax - op wrapping and nesting is an editing nightmare compared to `A + B.move(...) - C` style

to escape openscad render times - manifold lib is 1000x faster for high-poly boolean ops

to enable easier prototyping of mesh algorithms in the CAD environment
