Pular para o conteúdo principal

raygeo.mesh.pde

Functions

trace_spiral()

trace_spiral(
mesh: types.TriangleMesh,
u_field: Sequence[float],
step_over: float,
start_point: tuple[float, float] | None = None,
) -> Sequence[tuple[float, float, float]]

Trace a spiral toolpath from inner to outer boundary.

Uses the piecewise-constant gradient of the scalar field u to trace a smooth spiral that morphs from the inner boundary (u=0) to the outer boundary (u=1) without self-intersections.

ParameterTypeDescription
meshtypes.TriangleMeshTriangleMesh with boundary tags from build_triangle_mesh.
u_fieldSequence[float]Scalar field from solve_laplace, one value per vertex.
step_overfloatDesired radial step-over distance between spiral turns.
start_pointtuple[float, float] | None = NoneOptional explicit start point (x,y).
ReturnsSequence[tuple[float, float, float]]List of (x, y, z) points forming the spiral polyline.
ComplexityO(n * s) where n = triangles, s = spiral steps

Spiral toolpath traced on the Laplace solution — path morphs smoothly from the inner hole outward

Spiral toolpath traced on the Laplace solution — path morphs smoothly from the inner hole outward

Spiral toolpath traced on a multi-island Laplace solution — path navigates around four inner islands

Spiral toolpath traced on a multi-island Laplace solution — path navigates around four inner islands