auto_layout
Re-layout a Petri net using topological left-to-right layering, assigning coordinates based on arc topology to resolve cluttered or overlapping layouts.
Instructions
Re-layout the entire net using topological left-to-right layering.
Assigns x,y coordinates to every element based on the arc topology. Elements with no predecessors get layer 0; successors get later layers. Elements in the same layer are distributed symmetrically around center_y.
Call this after building the complete net when the automatic cursor placement produced a cluttered or overlapping layout.
Args: start_x: X coordinate for the first (leftmost) layer (default 100) center_y: Vertical center for all layers (default 200) x_step: Horizontal distance between layers in canvas units (default 150) y_step: Vertical distance between elements in the same layer (default 120)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start_x | No | ||
| center_y | No | ||
| x_step | No | ||
| y_step | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |