MCPcopy Index your code
hub / github.com/Hexorg/bevy_copperfield

github.com/Hexorg/bevy_copperfield @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
212 symbols 766 edges 18 files 64 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

bevy_copperfield is a Bevy plugin for procedural modelling, inspired by Blender's geometry nodes. Currently at its infancy, but bevy_coperfield allows you to create and edit meshes in non-destructive manner.

Example box from Cuboid: Example extruded and chamfered Cuboid

UV Unwrap

bevy_copperfield now supports 3 methods for automatic UV-unwrapping - Cube mapping, Sphere mapping, and Least Squares Conformal Mapping

Cube Mapped complex shape

Face outline visible on UV unwrap

Approach

bevy_copperfield implements a Half-Edge Mesh data-structure which allows us to quickly navigate and edit the mesh, providing methods to extrude, subdivide, and bevel parts of the mesh. The debug eample provides a nice visualization of the internal data-structure implemented, as each drawn edge is a pointer to the next one.

Simple half-edge mesh

Usage

bevy_copperfield is still is its early stages of development, but its key goals is to enable seamless use in Bevy. Upon adding bevy_copperfield to your repository, supported Bevy 3D primitives (currently just Cuboid) will allow you to spawn editable mesh with .procgen(). From there you will be able to chain series of edit nodes to turn primitives into objects you want. See examples for sample use.

Extension points exported contracts — how you extend this code

Targettable (Interface)
Trait that lets us convert some value to a specific HalfEdgeId Useful to let rays target exact part of the mesh [5 implementers]
src/mesh.rs
HalfEdgeMeshBuilder (Interface)
A trait used for primitives toconstruct a [`HalfEdgeMesh`] [4 implementers]
src/mesh_builders.rs
SelectionQueries (Interface)
(no doc) [2 implementers]
src/mesh/attributes.rs
TraversalQueries (Interface)
(no doc) [1 implementers]
src/mesh/attributes.rs

Core symbols most depended-on inside this repo

goto
called by 92
src/mesh.rs
halfedge
called by 70
src/mesh/traversal.rs
iter
called by 43
src/mesh/selection.rs
face
called by 37
src/mesh/traversal.rs
twin
called by 32
src/mesh/traversal.rs
extrude
called by 31
src/mesh/face_ops.rs
iter_loop
called by 30
src/mesh/traversal.rs
vertex
called by 30
src/mesh/traversal.rs

Shape

Method 101
Function 80
Class 19
Enum 8
Interface 4

Languages

Rust100%

Modules by API surface

src/mesh.rs43 symbols
src/mesh/traversal.rs33 symbols
src/mesh/attributes.rs30 symbols
examples/debug.rs25 symbols
src/uvmesh.rs20 symbols
src/mesh/selection.rs14 symbols
src/mesh/face_ops.rs7 symbols
src/mesh/vertex_ops.rs6 symbols
examples/chess.rs6 symbols
src/uvmesh/least_squares_conformal_maps.rs5 symbols
examples/sticks.rs5 symbols
src/mesh/edge_ops.rs4 symbols

For agents

$ claude mcp add bevy_copperfield \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact