Skip to main content

execute_trim_loop_with_context

Function execute_trim_loop_with_context 

Source
pub async fn execute_trim_loop_with_context(
    points: &[Coords2d],
    initial_scene_graph_delta: SceneGraphDelta,
    frontend: &mut FrontendState,
    ctx: &ExecutorContext,
    version: Version,
    sketch_id: ObjectId,
) -> Result<(SourceDelta, SceneGraphDelta), String>
Expand description

Execute the trim loop with a context struct that provides access to FrontendState. This is a convenience wrapper that inlines the loop to avoid borrow checker issues with closures. The core loop logic is duplicated here, but this allows direct access to frontend and ctx.

Trim line points are expected in millimeters and are normalized to the current/default unit.