Add free functions to slice a TriangleMesh
This commit is contained in:
parent
8604e19384
commit
514bb23c6c
@ -198,6 +198,29 @@ private:
|
||||
void make_expolygons(std::vector<IntersectionLine> &lines, const float closing_radius, ExPolygons* slices) const;
|
||||
};
|
||||
|
||||
inline void slice_mesh(
|
||||
const TriangleMesh & mesh,
|
||||
const std::vector<float> & z,
|
||||
std::vector<Polygons> & layers,
|
||||
TriangleMeshSlicer::throw_on_cancel_callback_type thr = nullptr)
|
||||
{
|
||||
if (mesh.empty()) return;
|
||||
TriangleMeshSlicer slicer(&mesh);
|
||||
slicer.slice(z, &layers, thr);
|
||||
}
|
||||
|
||||
inline void slice_mesh(
|
||||
const TriangleMesh & mesh,
|
||||
const std::vector<float> & z,
|
||||
std::vector<ExPolygons> & layers,
|
||||
float closing_radius,
|
||||
TriangleMeshSlicer::throw_on_cancel_callback_type thr = nullptr)
|
||||
{
|
||||
if (mesh.empty()) return;
|
||||
TriangleMeshSlicer slicer(&mesh);
|
||||
slicer.slice(z, closing_radius, &layers, thr);
|
||||
}
|
||||
|
||||
TriangleMesh make_cube(double x, double y, double z);
|
||||
|
||||
// Generate a TriangleMesh of a cylinder
|
||||
|
Loading…
Reference in New Issue
Block a user