Skip to content

Support rotated keep-in rectangles #1293

@calcmogul

Description

@calcmogul

The keep-in rectangle constraint is represented by a keep-in polygon, so we can do whatever transformation we want before then.

https://github.com/SleipnirGroup/Choreo/blob/main/src-core/src/generation/transformers/constraints.rs#L134-L141

                ConstraintData::KeepInRectangle { x, y, w, h } => {
                    let xs = vec![x, x + w, x + w, x];
                    let ys = vec![y, y, y + h, y + h];
                    match to_opt {
                        None => generator.wpt_keep_in_polygon(from, xs, ys),
                        Some(to) => generator.sgmt_keep_in_polygon(from, to, xs, ys),
                    }
                },

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions