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

Return error when attempting to serialize an empty path #279

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

jatoben
Copy link
Collaborator

@jatoben jatoben commented Nov 23, 2024

As described in #278 (comment), this PR returns an error code when an empty FlexPath is detected during serialization or when generating polygons. For Python callers, a RuntimeWarning is raised, matching what occurs when missing references or invalid repetitions are encountered.

Because the tolerance value is stored internally to each FlexPath though, writing a path to a library with a precision value which is too large to represent that path does not generate an error code or warning. Callers will still need to be cautious when copying objects between libraries with differing precisions.

@heitzmann heitzmann merged commit 21bbdad into heitzmann:main Nov 25, 2024
6 checks passed
@jatoben jatoben deleted the empty-path-warning branch November 25, 2024 19:56
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.

2 participants