aws-cqc / aws-cqc/DeviceLayout.jl

Path halo issues

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
2.0 bug
Dominant language
Julia
Stars
67
Forks
14
Avg merge
1d 19h
Merged PRs (30d)
24

Description

We don't really have a spec for what `halo` is supposed to mean, other than that it's used for generating exclusion areas. Rather than just use `offset(to_polygons())` for everything, `halo(::Path, ...)` creates a new `Path`. This is probably faster on curves but we haven't benchmarked it. Right now there are some inconsistencies in some unusual `Path` halo use cases.

For context, one little trick is that `Path` halos get extra straight segments at the start and end. You can also use `halo` on path nodes directly, and if they don't have a `prev` or `next` neighbor, then they get a little extra segment to cover the corresponding end.

- Using `halo` with `inner_delta` is meant to create a halo with a hole. For a `Path`, this means you get a `CPW` style. But the extra straight segments are also just CPW rather than `CPWOpenTermination`
- Using `halo` on a path with overlays doesn't extend the initial and final segments for the overlay layers
- Using `halo` on a decorated path keeps the decorated style as is while changing the `extent` of the underlying path. If we used `attach!` with `location` to attach to the edge of the path, they'll be moved. (If the underlying path `metadata` is excluded by the `only_layers` and `ignore_layers` keywords, then the decorations are handled correctly.)
- Using `halo` on a taper adds the `outer_delta` to the start and end extent of the corresponding taper in the halo path. This isn't equivalent to offsetting by `outer_delta`, which would make the offset normal to the edge of the taper. Fixing this requires adjusting nodes on either side of the taper.

Low importance but these are all slightly related and should eventually be addressed or made part of the specification for halo as appropriate.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Julia implementation of halo(::Path, ...) and the related path-node handling. Review the listed inner_delta, overlays, decorations, and taper cases, then determine which behaviors need a specification versus correction. Done means the chosen behavior is documented and the relevant inconsistencies are resolved or explicitly accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
design
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.