aws-cqc / aws-cqc/DeviceLayout.jl

Schematic to solid model rendering does not honor strict for geometry failures

Open
#287 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Julia
Stars
67
Forks
14
Avg merge
1d 16h
Merged PRs (30d)
21

Description

`render!(::SolidModel, ::Schematic, ::SolidModelTarget; strict=...)` lets component geometry exceptions escape. They are not logged, so `strict=:no` cannot replace failed geometry with empty geometry and continue, as documented in the docstring.

MRE:

```julia
using DeviceLayout
using DeviceLayout.SchematicDrivenLayout
using DeviceLayout.SolidModels
import DeviceLayout.SchematicDrivenLayout: _geometry!

@compdef struct BrokenComponent <: Component
name::String = "broken"
end

function SchematicDrivenLayout._geometry!(::CoordinateSystem, ::BrokenComponent)
error("intentional geometry failure")
end

graph = SchematicGraph("broken")
add_node!(graph, BrokenComponent())
schematic = plan(graph; log_dir=nothing) |> check!
target = SolidModelTarget(ProcessTechnology((;), (;)))
model = SolidModel("broken"; overwrite=true)

render!(model, schematic, target; strict=:no)
```

**Expected:** rendering continues with empty geometry for the failed component.

**Actual:** `ErrorException: intentional geometry failure` escapes, and the `:render_solidmodel` log level remains `Debug`. `strict=:error` produces the same raw exception rather than a logger-based strictness error.

Contributor guide

Open the contributing guide

Research direction

Start at the `render!(::SolidModel, ::Schematic, ::SolidModelTarget; strict=...)` implementation and its docstring, then reproduce the supplied `BrokenComponent` MRE. Trace how `_geometry!` exceptions and the `:render_solidmodel` log level are handled for `strict=:no` and `strict=:error`. Done means failed geometry is replaced with empty geometry in non-strict mode, while strict mode reports the failure through the logger.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.