Wave Function Collapse (WFC) tools intended for Grasshopper/Rhino, plus a portable core solver library.
This repo currently contains:
WFC/: a Grasshopper plugin codebase (RhinoCommon/Grasshopper SDK required to build).src/Wfc.Core/: a buildable, tested, fully XML-documented WFC core library (no Rhino dependencies).src/Wfc.Core.Tests/: xUnit tests for the core solver.
See docs/ARCHITECTURE.md for solver details and docs/ROADMAP.md for planned work.
Run:
dotnet test Wfc.Core.slnx
The Grasshopper project references RhinoCommon/Grasshopper assemblies from a Rhino installation (Windows).
Typical workflow:
- Install Rhino + Grasshopper.
- Open
WFC.slnin Visual Studio. - Fix/confirm reference paths to
RhinoCommon.dll,Grasshopper.dll,GH_IO.dllinWFC/WFC.csproj. - Build the project to produce a
.gha.
- Create Edges: define connectors (name + type).
- Create Module: combine mesh geometry with 4 edges (N, E, S, W).
- Augment Modules: optionally generate rotated/reflected variants.
- Create Grid: define grid size and spacing.
- Compute: run the solver (seed + max steps), returning meshes and a log.