Fixed painting gizmos with modifiers below the bed:

- When a modifier was below the bed and all the object parts above, it would clip
  the modifier but not triangulate the cut.
- When an object part was below, it would triangulate all modifiers with
  opaque orange color.

Both should now be fixed.
This commit is contained in:
Lukas Matena 2021-09-07 15:15:22 +02:00
parent 4f5dddbf11
commit 4ac013ec9c
4 changed files with 27 additions and 17 deletions

View file

@ -39,6 +39,10 @@ class ModelObject;
class ModelVolume;
enum ModelInstanceEPrintVolumeState : unsigned char;
// Return appropriate color based on the ModelVolume.
std::array<float, 4> color_from_model_volume(const ModelVolume& model_volume);
// A container for interleaved arrays of 3D vertices and normals,
// possibly indexed by triangles and / or quads.
class GLIndexedVertexArray {
@ -393,6 +397,7 @@ public:
return out;
}
void set_color(const std::array<float, 4>& rgba);
void set_render_color(float r, float g, float b, float a);
void set_render_color(const std::array<float, 4>& rgba);
// Sets render color in dependence of current state