Conversion between Box and DBox

Open
#2,330 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp

Research direction

Start by locating the C++ constructors or conversion code for Box and DBox, and check how each uses the database unit (dbu). Compare the reported widths with the expected results for a 1 nm dbu, then look for existing tests covering these conversions. Done means both conversions return the expected widths and the relevant tests pass.

Written by the indexing model from the issue text.

Description

question

Hello,
I expect Box to live in the dbu world, and DBox to live in the um world, but describe the same entity.
Therefore, I expect pya.Box(pya.DBox(5)).width() to give 5000 if the dbu is 1 nm, but it gives 6 (which is weird).
In the same way, I expect pya.DBox(pya.Box(5000)).width() to give 5 if the dbu is 1 nm, but it gives 5000.0.
Olivier

Dominant language
C++
Stars
1.2k
Forks
305
Avg merge
3d 2h
Merged PRs (30d)
11

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KLayout/klayout

All issues in KLayout/klayout

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.