https://github.com/sillyfreak/typst-pull-eh
Visualize pulleys with Typst and CeTZ
https://github.com/sillyfreak/typst-pull-eh
mechanics typst typst-package
Last synced: 10 months ago
JSON representation
Visualize pulleys with Typst and CeTZ
- Host: GitHub
- URL: https://github.com/sillyfreak/typst-pull-eh
- Owner: SillyFreak
- License: mit
- Created: 2025-05-01T16:52:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-25T20:54:32.000Z (12 months ago)
- Last Synced: 2025-08-31T19:54:26.996Z (10 months ago)
- Topics: mechanics, typst, typst-package
- Language: Typst
- Homepage: https://typst.app/universe/package/pull-eh
- Size: 569 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Pull-eh
Visualize pulleys with Typst and CeTZ. This package provides a function `wind()` that makes it easy
to draw a taut rope/cable winding around a number of pulleys or pivot points.
## Getting Started
To add this package to your project, use this:
```typ
#import "@preview/cetz:0.4.0"
#import "@preview/pull-eh:0.1.1"
#cetz.canvas(length: 2cm, {
import cetz.draw: *
import pull-eh: *
rotate(-65deg)
let point = (0, 9)
circle(name: "a", (5, 15), radius: 1)
circle(name: "b", (5, 12), radius: 0.8)
circle(name: "c", (5, 9), radius: 1)
wind(
stroke: 2pt,
point,
(coord: "a", radius: 1) + cw,
(coord: "c", radius: 1) + cw,
(coord: "b", radius: 0.8) + cw,
"c.north",
)
})
```

## Usage
See the [manual](docs/manual.pdf) for details.