Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDS renderer: changed criterion for rounding paths #973

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Th-Fo
Copy link

@Th-Fo Th-Fo commented Oct 4, 2023

Method QGDSRenderer._qgeometry_to_gds() checks several conditions to decide whether a shapely.geometry.LineString is drawn with rounded or sharp corners. One of them takes into account that if the fillet radius gets too small relative to the width of the line, the rounding cannot be applied correctly anymore, hence drawing the line with sharp corners.

Before this commit, this was implemented via the criterion

qgeometry_element.fillet < qgeometry_element.width;

however, this criterion is too strict because corners can well be rounded also if 0.5*width < fillet radius < width. Therefore, this commit changes this criterion to

qgeometry_element.fillet < 0.5 * qgeometry_element.width.

What are the issues this pull addresses (issue numbers / links)?

Did you add tests to cover your changes (yes/no)?

Did you update the documentation accordingly (yes/no)?

Did you read the CONTRIBUTING document (yes/no)?

Summary

Details and comments

Method QGDSRenderer._qgeometry_to_gds() checks several conditions to
decide whether a shapely.geometry.LineString is drawn with rounded or
sharp corners. One of them takes into account that if the fillet radius
gets too small relative to the width of the line, the rounding cannot be
applied correctly anymore, hence drawing the line with sharp corners.

Before this commit, this was implemented via the criterion

  `qgeometry_element.fillet < qgeometry_element.width`;

however, this criterion is too strict because corners can well be
rounded also if 0.5*width < fillet radius < width. Therefore, this
commit changes this criterion to

  `qgeometry_element.fillet < 0.5 * qgeometry_element.width`.
@CLAassistant
Copy link

CLAassistant commented Oct 4, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ zlatko-minev
❌ Thomas Foesel


Thomas Foesel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@zlatko-minev
Copy link
Collaborator

@Th-Fo you have to 1) sign the CLA for us to merge this and 2) there is a linter issue that failed, see image:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants