mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-27 00:24:00 -06:00
Painting gizmos and sinking objects:
1. Do not show what's below the bed when a gizmo is open 2. Triangulate the cut so people don't see inside 3. If regular clipping plane is used, the cuts are mutually clipped by one another 4. Painting itself ignores the hidden part of the object
This commit is contained in:
parent
b174dacc85
commit
13604469fd
5 changed files with 152 additions and 17 deletions
|
@ -71,6 +71,11 @@ public:
|
|||
// This is supposed to be in world coordinates.
|
||||
void set_plane(const ClippingPlane& plane);
|
||||
|
||||
// In case the object is clipped by two planes (e.g. in case of sinking
|
||||
// objects), this will be used to clip the triagnulated cut.
|
||||
// Pass ClippingPlane::ClipsNothing to turn this off.
|
||||
void set_limiting_plane(const ClippingPlane& plane);
|
||||
|
||||
// Which mesh to cut. MeshClipper remembers const * to it, caller
|
||||
// must make sure that it stays valid.
|
||||
void set_mesh(const TriangleMesh& mesh);
|
||||
|
@ -92,6 +97,7 @@ private:
|
|||
const TriangleMesh* m_mesh = nullptr;
|
||||
const TriangleMesh* m_negative_mesh = nullptr;
|
||||
ClippingPlane m_plane;
|
||||
ClippingPlane m_limiting_plane = ClippingPlane::ClipsNothing();
|
||||
std::vector<Vec2f> m_triangles2d;
|
||||
GLIndexedVertexArray m_vertex_array;
|
||||
bool m_triangles_valid = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue