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

Same options for centered in methods .rect and .box #567

Closed
marcus7070 opened this issue Jan 7, 2021 · 5 comments · Fixed by #617
Closed

Same options for centered in methods .rect and .box #567

marcus7070 opened this issue Jan 7, 2021 · 5 comments · Fixed by #617
Labels
enhancement New feature or request

Comments

@marcus7070
Copy link
Member

I think we can change the way we specify centered in both .rect and .box to be more consistent and more useful. Basically:

  • Keep existing behaviour for .rect(1, 1, centered=True) and .box(1, 1, 1, centered=(True, True, True)
  • .rect(10, 10, centered=(True, False) produces a rectangle with corners on (-5, 0) and (5, 10)
  • .box(1, 1, 1, centered=True is the same as .box(1, 1, 1, centered=(True, True, True)

Thoughts?

@marcus7070
Copy link
Member Author

These methods also use a 2 or 3d centered option, and could be given the same treatment:

  • rarray
  • sphere
  • wedge

@RubenRubens
Copy link
Contributor

I think it's a good idea. Making stuff more consistent is always welcome.

@michaelgale
Copy link

I like this suggestion. I can't count how many times I adjust objects by (-xyz/2)! As long as the default behaviour isn't broken, this would be useful.

@adam-urbanczyk
Copy link
Member

Sounds good, do you mind waiting till after 2.1?

@adam-urbanczyk adam-urbanczyk added the enhancement New feature or request label Jan 7, 2021
@marcus7070
Copy link
Member Author

Sounds good, do you mind waiting till after 2.1?

No worries, that is fine.

This was referenced Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants