mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Merge branch 'tm_openvdb_integration' into lm_tm_hollowing
* Refactor file names in SLA dir
This commit is contained in:
commit
c22423a219
55 changed files with 1644 additions and 592 deletions
58
src/libslic3r/SLA/Hollowing.hpp
Normal file
58
src/libslic3r/SLA/Hollowing.hpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef SLA_HOLLOWING_HPP
|
||||
#define SLA_HOLLOWING_HPP
|
||||
|
||||
#include <libslic3r/OpenVDBUtils.hpp>
|
||||
#include <libslic3r/SLA/JobController.hpp>
|
||||
|
||||
namespace Slic3r {
|
||||
namespace sla {
|
||||
|
||||
struct HollowingConfig
|
||||
{
|
||||
double min_thickness = 2.;
|
||||
double quality = 0.5;
|
||||
double closing_distance = 0.5;
|
||||
};
|
||||
|
||||
struct DrainHole
|
||||
{
|
||||
Vec3f m_pos;
|
||||
Vec3f m_normal;
|
||||
float m_radius;
|
||||
float m_height;
|
||||
|
||||
DrainHole()
|
||||
: m_pos(Vec3f::Zero()), m_normal(Vec3f::UnitZ()), m_radius(5.f),
|
||||
m_height(10.f)
|
||||
{}
|
||||
|
||||
DrainHole(Vec3f position, Vec3f normal, float radius, float height)
|
||||
: m_pos(position)
|
||||
, m_normal(normal)
|
||||
, m_radius(radius)
|
||||
, m_height(height)
|
||||
{}
|
||||
|
||||
bool operator==(const DrainHole &sp) const
|
||||
{
|
||||
return (m_pos == sp.m_pos) && (m_normal == sp.m_normal) &&
|
||||
is_approx(m_radius, sp.m_radius) &&
|
||||
is_approx(m_height, sp.m_height);
|
||||
}
|
||||
|
||||
bool operator!=(const DrainHole &sp) const { return !(sp == (*this)); }
|
||||
|
||||
template<class Archive> void serialize(Archive &ar)
|
||||
{
|
||||
ar(m_pos, m_normal, m_radius, m_height);
|
||||
}
|
||||
};
|
||||
|
||||
TriangleMesh generate_interior(const TriangleMesh &mesh,
|
||||
const HollowingConfig & = {},
|
||||
const JobController &ctl = {});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HOLLOWINGFILTER_H
|
Loading…
Add table
Add a link
Reference in a new issue