mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 15:13:58 -06:00
Changed internal coordinates of drain holes
Drain holes reference position was saved slightly above the mesh to avoid problem when the hole is placed on flat or nearly flat surface The depth of the hole was internally bigger than what the user has set to compensato for it However, this leads to problem with scaling and makes reprojection of the holes on the mesh complicated This commit changes the reference point to the point on the mesh and the extra elevation is handled when rendering and drilling the hole. The change is reflected in 3MF drain holes versioning so that old 3MFs are loaded correctly. Reprojection on the mesh after reload from disk/fix through netfabb has been enabled.
This commit is contained in:
parent
ba03429679
commit
a95509ce36
8 changed files with 43 additions and 33 deletions
|
@ -28,15 +28,9 @@ void reproject_support_points(const IndexedMesh &mesh, std::vector<PointType> &p
|
|||
inline void reproject_points_and_holes(ModelObject *object)
|
||||
{
|
||||
bool has_sppoints = !object->sla_support_points.empty();
|
||||
bool has_holes = !object->sla_drain_holes.empty();
|
||||
|
||||
// Disabling reprojection of holes as they have a significant offset away
|
||||
// from the model body which tolerates minor geometrical changes.
|
||||
//
|
||||
// TODO: uncomment and ensure the right offset of the hole points if
|
||||
// reprojection would still be necessary.
|
||||
// bool has_holes = !object->sla_drain_holes.empty();
|
||||
|
||||
if (!object || (/*!has_holes &&*/ !has_sppoints)) return;
|
||||
if (!object || (!has_holes && !has_sppoints)) return;
|
||||
|
||||
TriangleMesh rmsh = object->raw_mesh();
|
||||
rmsh.require_shared_vertices();
|
||||
|
@ -45,8 +39,8 @@ inline void reproject_points_and_holes(ModelObject *object)
|
|||
if (has_sppoints)
|
||||
reproject_support_points(emesh, object->sla_support_points);
|
||||
|
||||
// if (has_holes)
|
||||
// reproject_support_points(emesh, object->sla_drain_holes);
|
||||
if (has_holes)
|
||||
reproject_support_points(emesh, object->sla_drain_holes);
|
||||
}
|
||||
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue