mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
TriangleMeshSlicer is now initialized by const-pointer to the mesh, responsibility for calling require_shared_vertices is left to the caller
This commit is contained in:
parent
a177a7e1da
commit
f33e9bf609
8 changed files with 18 additions and 9 deletions
|
@ -607,10 +607,12 @@ void TriangleMesh::require_shared_vertices()
|
|||
BOOST_LOG_TRIVIAL(trace) << "TriangleMeshSlicer::require_shared_vertices - end";
|
||||
}
|
||||
|
||||
void TriangleMeshSlicer::init(TriangleMesh *_mesh, throw_on_cancel_callback_type throw_on_cancel)
|
||||
void TriangleMeshSlicer::init(const TriangleMesh *_mesh, throw_on_cancel_callback_type throw_on_cancel)
|
||||
{
|
||||
mesh = _mesh;
|
||||
_mesh->require_shared_vertices();
|
||||
if (! mesh->has_shared_vertices())
|
||||
throw std::invalid_argument("TriangleMeshSlicer was passed a mesh without shared vertices.");
|
||||
|
||||
throw_on_cancel();
|
||||
facets_edges.assign(_mesh->stl.stats.number_of_facets * 3, -1);
|
||||
v_scaled_shared.assign(_mesh->stl.v_shared, _mesh->stl.v_shared + _mesh->stl.stats.shared_vertices);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue