Skip to content
This repository

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

Open
torwag opened this Issue · 6 comments

5 participants

Torwag Miro Hrončok jkeegan Chris Marius Kintel
Torwag

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? Place a bounty on it! We accept bounties via Bountysource.

Miro Hrončok

I'd love that.

jkeegan

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.

Miro Hrončok

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

Chris

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

Marius Kintel
Owner

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
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.