openscad / openscad

OpenSCAD - The Programmers Solid 3D CAD Modeller
https://www.openscad.org
Other
6.68k stars 1.19k forks source link

Feature request: Color axis similar to the axis indicator #3327

Open larsrc opened 4 years ago

larsrc commented 4 years ago

The little X/Y/Z axis indicator has RGB coloring. Why not make the main axis similarly (though probably with a darker green so it's still visible)? That way you always have an indication of which axis you're looking at.

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/91498867-feature-request-color-axis-similar-to-the-axis-indicator?utm_campaign=plugin&utm_content=tracker%2F52063&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F52063&utm_medium=issues&utm_source=github).
t-paul commented 4 years ago

If we do that, it needs to go into the color scheme definition.

robertlugg commented 3 years ago

@t-paul, the small axis appears to use hard-coded Red, Green, and Blue:

  glColor3d(1.0, 0.0, 0.0);
  glVertex3d(0, 0, 0); glVertex3d(10*dpi, 0, 0);
  glColor3d(0.0, 1.0, 0.0);
  glVertex3d(0, 0, 0); glVertex3d(0, 10*dpi, 0);
  glColor3d(0.0, 0.0, 1.0);
  glVertex3d(0, 0, 0); glVertex3d(0, 0, 10*dpi);

How should the main axis look?

A quick and dirty change yielded: axes_colored

Similar to the way the regular axes change their length with zoom level, these do too.

Is this a feature that should be added? Would this ever confuse the user (I don't think so, but unsure)?

t-paul commented 3 years ago

Interesting idea with changing only the center bit. I'm not sure what's better.

We could try moving the 3 colors to the color scheme and draw the whole axis in that color, see how that look. The current axis color would then be used only for the tick marks and numbers.

robertlugg commented 3 years ago

@t-paul, I'll try that. It will give me a good reason to learn about themes! Currently, the color of the mini-axes is NOT configurable. I assume I need to add additional theme options for the three colors.

t-paul commented 3 years ago

Yes, that would need 3 additional entries in the json files (e.g. in color-schemes/render/tomorrow.json)

https://github.com/openscad/openscad/blob/0c2af2defa42c88da1f99e694a5696ecf7e1ffda/color-schemes/render/tomorrow.json#L6-L10