GDS renderer: changed criterion for rounding paths #973
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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