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

Quality-of-life improvements #49

Open
klarh opened this issue Sep 20, 2019 · 1 comment
Open

Quality-of-life improvements #49

klarh opened this issue Sep 20, 2019 · 1 comment

Comments

@klarh
Copy link
Collaborator

klarh commented Sep 20, 2019

Ideas from discussion with @bdice:

Automatically zoom (more appropriately, set size and pixel_scale) to fit the primitives contained in a scene

Solutions:

  • Add an auto_zoom() method to Scene
  • Add machinery to zoom property setters to auto-zoom when setting prim.zoom = 'auto'

Add a way to access commonly-used orientations (isometric/viewing each face/slightly-off-each-face)

Solutions:

  • Add a plato.rotations module that contains these by name
  • Add machinery to rotation property setters to convert string descriptions into appropriate quaternions

Easier way to access child primitives via Scene objects

Solutions:

  • Add __getitem__ to scenes that searches through the set of contained primitives for the given key (something like 'spheres'/'convex_polyhedra' -> the first primitive of the given type, 'spheres_2' for the second spheres object in the scene, and so on? Also allow querying by draw class/type?)
@bdice
Copy link
Member

bdice commented Sep 20, 2019

Rotations

Some helpful rotations to include:

  • Front, left, top, right, rear, bottom
  • Isometric view for each corner ('isometric' would default to something like top, front, and left).
  • "Offset" view(s) that show mostly the front face but shows some of the top and side faces.
  • I would write these using rowan's axis-angle formula for readability, rather than using explicit constants

I don't think the string setter mechanism is strictly necessary, but it could be helpful.

Accessing child primitives

I think it's most natural for __getitem__ to require integer indices, and potentially have a function like scene.find_primitives(query) for the other case, if needed. I would be happy to just have an integer index, no fancy querying by primitive type is needed in my opinion.

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

No branches or pull requests

2 participants