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

Adding voids to profile outside of constructor throws error #221

Closed
secretlyagoblin opened this issue Dec 16, 2019 · 1 comment
Closed
Labels
Enhancement New feature or request In Review
Milestone

Comments

@secretlyagoblin
Copy link

Describe the bug
The pattern

var circle = Polygon.Circle(10);
var innerCircle = Polygon.Circle(9).Reversed();
var profile = new Profile(circle);
profile.Voids.Add(innerCircle);

throws an error as the voids list has not been instantiated.

Expected behavior is for this to just work as voids by default is a list of 0 elements.

Workaround of profile.Voids = new List<Polygon>(){innerCircle}; is fine for now but might trip up a newcomer and isn't the nicest.

@ikeough ikeough added the Enhancement New feature or request label Mar 9, 2020
@ikeough ikeough added this to the 0.7 milestone Apr 9, 2020
@ikeough ikeough mentioned this issue Apr 16, 2020
@ikeough
Copy link
Contributor

ikeough commented Apr 20, 2020

Closed in #295.

@ikeough ikeough closed this as completed Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request In Review
Projects
None yet
Development

No branches or pull requests

2 participants