Skip to content

Objects which created warnings should be colored and always be visible #225

Open
torwag opened this Issue Nov 30, 2012 · 6 comments

5 participants

@torwag
torwag commented Nov 30, 2012

Warnings are sometimes easily overlooked.
However, OpenScad still renders those objects e.g. by taken default values. Having a spelling error along

heigth=1.1;
cube([12,23,height]);

can be rather fatal.

Proposal:
An object which throws a warning of any kind should

  • be colored in e.g. red,
  • be visible at all time

This makes it easy for people to spot a problem within a (complex) object, by a first glimpse rather then scrolling throw hundred lines of compiler output.

The next step would be, to make those warnings in the compiler output interactive to highlight the particular object which throw this warning. A click on a red marked object to jump to the code where the warning occurs would be the final step in laziness.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@hroncok
hroncok commented Nov 30, 2012

I'd love that.

@jkeegan
jkeegan commented Nov 30, 2012

The idea is very good - the only problem is that it needs to be implemented in such a way that it's still compatible with the color features that OpenSCAD already has. If someone already is coloring different objects different colors, the error coloring shouldn't conflict with that. In fact I think (haven't tried it) that you could conceivably have a conditional that legitimately used $t to change the color of an object during animations, so even flashing objects might conflict.

@hroncok
hroncok commented Nov 30, 2012

What about coloring the lines instead of objects, same as if the error ocures?

@nophead
nophead commented Nov 30, 2012

Yes that would be more useful but the syntax colouring doesn't currently work even for errors.

@kintel
openscad member
kintel commented Dec 1, 2012

Tagging objects are probably easier than tagging source code, due to the sightly hackish include implementation.
I feel a good basic mechanism would be to color the warning object (or its wireframe) while keeping the other objects half-transparent.

Some work will be needed to do this properly in F6 mode if necessary.

@torwag
torwag commented Dec 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.