bernhard-42 / vscode-ocp-cad-viewer

A viewer for OCP based Code-CAD (CadQuery, build123d) integrated into VS Code
Apache License 2.0
80 stars 9 forks source link

use default color or alpha =1 if too few parameters are provided to show #5

Closed bernhard-42 closed 1 year ago

JonnyHaystack commented 1 year ago

Should also make sure no error is thrown if you supply too many colours. I add and remove objects from my show call at the bottom frequently, and really don't wanna have to change the colours every time, but I like to have my preferred colour presets. In previous versions I just keep my colours list the same and add or remove objects, but since updating I can't do this.

bernhard-42 commented 1 year ago

agreed, I have implemented it like this. This btw also allows to provide colormaps, e.g. from matplotlib. Just experimenting with it

JonnyHaystack commented 1 year ago

Another random thought: would be neat to be able to configure the default colours for individual types of shape. E.g. if I want solids to be orange, sketches to be green, lines to be red

bernhard-42 commented 1 year ago

Another random thought: would be neat to be able to configure the default colours for individual types of shape. E.g. if I want solids to be orange, sketches to be green, lines to be red

good point, ~does~ doesn't exist currently

bernhard-42 commented 1 year ago

@JonnyHaystack Opened another issue for your "random thought"

bernhard-42 commented 1 year ago

done, rest tracked in the separate issue