semvec/pypi-packages huggingface dataset:
cadlib 0.1.0
CAD primitives to produce images and drawings in a variety of formats from a common symbolic definition.
Requires Python: >=3.10
Keywords: cad, drafting, geometry, sprocket, svg

# cadlib

CAD primitives to produce images and drawings in a variety of formats from a common symbolic definition.

cadlib is a 2D CAD geometry library written in Python. It models manual drafting
workflows: constructing geometry by creating points, lines, circles, and arcs,
then using transformations (mirror, rotate) to build complex shapes.

## Installation

```bash
pip install cadlib
```

## Quick Start

```python
import cadlib

# Create geometry
center = cadlib.Point(0, 0)
circle = cadlib.Circle(center, 10)
line = cadlib.Line(cadlib.Point(-15, 5), cadlib.Point(15, 5))

# Find intersections
pt = circle.point_at_line_intersection(line, q=1)

# Use transformations
mirrored = line.mirror_x(0)
rotated = line.rotate(center, 45)
```

## Sprocket Generation

cadlib includes a sprocket generator implementing ANSI standard sprocket
geometry per the [gearseds design specification](http://gearseds.com/files/design_draw_sprocket_5.pdf).

```bash
# Generate SVG
cadlib-sprocket svg

# Display with matplotlib
cadlib-sprocket matplotlib
```

Or use it programmatically:

```python
from cadlib.sprocket import Sprocket, create_svg, create_matplotlib

sprocket = Sprocket(ansi_chain_type="25", n_number_of_teeth=8)
create_svg(sprocket)
```

## Core API

### Primitives
- `Point(x, y)` -- 2D point with mirror and rotate transformations
- `Line(p1, p2)` -- line segment between two points
- `Circle(center, radius)` -- circle with intersection and tangency methods
- `Arc(center, radius, angle1, angle2)` -- arc defined by center, radius, and angle range

### Factory Functions
- `arc_from_points_and_radius(p1, p2, r, q)` -- arc from two points and radius
- `arc_from_points_and_center(p1, p2, center)` -- arc from two points and center
- `arc_from_points_and_radius_and_height(p1, p2, height)` -- arc from chord and height
- `line_from_pt_angle_len(point, angle, length)` -- line from point, angle, length

### Layers and Drawing
- `Layer` -- groups elements for rendering control
- `Drawing` -- collection of elements with coordinate transforms for output
- `LAYER_CONSTRUCTION` -- default layer for construction guides (gray)
- `LAYER_TOOLPATH` -- layer for cutting/tool paths (red)

## License

MIT
openboxes 0.1.0
Add your description here
Requires Python: >=3.11

# openboxes

Initial PyPI package scaffold for `openboxes`, using `uv` for build and publish.

## Local workflow

```bash
uv build
uv publish
```

`uv publish` reads `UV_PUBLISH_TOKEN` automatically.

If your token is stored as `PYPI_TOKEN`, run:

```bash
export UV_PUBLISH_TOKEN="$PYPI_TOKEN"
uv publish
```

## TestPyPI

```bash
uv publish --publish-url https://test.pypi.org/legacy/
```