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

Add checks for valid lengths #863

Merged
merged 2 commits into from
Mar 2, 2022
Merged

Add checks for valid lengths #863

merged 2 commits into from
Mar 2, 2022

Conversation

jpirnay
Copy link
Contributor

@jpirnay jpirnay commented Feb 28, 2022

Attempt no 2
Meerk40t is quite lenient when it comes to checking the validity of Length parameters. Actually it converts invalid statements to a 0.0. I.e. outline blablabla is translated to outline 0.0.
I think we should introduce some basic validity checking to address this.

The code attempts to do some basic stuff by extending the Length class in elements.py (without touching svgelements and hopefully avoiding some of the pitfalls of manipulating this publicly available class) and provides a new property is_valid_length.

tatarize
tatarize previously approved these changes Mar 1, 2022
Copy link
Member

@tatarize tatarize left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quite solid method of checking that.

@jpirnay jpirnay marked this pull request as ready for review March 1, 2022 10:55
Copy link
Contributor

@tiger12506 tiger12506 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tat already approved before the typos. I believe the typo fixes are correct, so I'm approving to let this out of limbo.

@jpirnay jpirnay merged commit 9867ae9 into meerk40t:main Mar 2, 2022
@jpirnay jpirnay deleted the length-check branch March 2, 2022 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants