mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 16:51:21 -06:00
Merge branch 'tm_openvdb_integration' into lm_tm_hollowing
This commit is contained in:
commit
673549d608
11 changed files with 138 additions and 88 deletions
|
|
@ -121,9 +121,9 @@ std::unique_ptr<TriangleMesh> generate_interior(const TriangleMesh & mesh,
|
|||
|
||||
bool DrainHole::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);
|
||||
return (pos == sp.pos) && (normal == sp.normal) &&
|
||||
is_approx(radius, sp.radius) &&
|
||||
is_approx(height, sp.height);
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::sla
|
||||
|
|
|
|||
|
|
@ -20,21 +20,17 @@ struct HollowingConfig
|
|||
|
||||
struct DrainHole
|
||||
{
|
||||
Vec3f m_pos;
|
||||
Vec3f m_normal;
|
||||
float m_radius;
|
||||
float m_height;
|
||||
|
||||
Vec3f pos;
|
||||
Vec3f normal;
|
||||
float radius;
|
||||
float height;
|
||||
|
||||
DrainHole()
|
||||
: m_pos(Vec3f::Zero()), m_normal(Vec3f::UnitZ()), m_radius(5.f),
|
||||
m_height(10.f)
|
||||
: pos(Vec3f::Zero()), normal(Vec3f::UnitZ()), radius(5.f), height(10.f)
|
||||
{}
|
||||
|
||||
DrainHole(Vec3f position, Vec3f normal, float radius, float height)
|
||||
: m_pos(position)
|
||||
, m_normal(normal)
|
||||
, m_radius(radius)
|
||||
, m_height(height)
|
||||
|
||||
DrainHole(Vec3f p, Vec3f n, float r, float h)
|
||||
: pos(p), normal(n), radius(r), height(h)
|
||||
{}
|
||||
|
||||
bool operator==(const DrainHole &sp) const;
|
||||
|
|
@ -43,10 +39,12 @@ struct DrainHole
|
|||
|
||||
template<class Archive> inline void serialize(Archive &ar)
|
||||
{
|
||||
ar(m_pos, m_normal, m_radius, m_height);
|
||||
ar(pos, normal, radius, height);
|
||||
}
|
||||
};
|
||||
|
||||
using DrainHoles = std::vector<DrainHole>;
|
||||
|
||||
std::unique_ptr<TriangleMesh> generate_interior(const TriangleMesh &mesh,
|
||||
const HollowingConfig & = {},
|
||||
const JobController &ctl = {});
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ Contour3D sphere(double rho, Portion portion = make_portion(0.0, 2.0*PI),
|
|||
// h: Height
|
||||
// ssteps: how many edges will create the base circle
|
||||
// sp: starting point
|
||||
Contour3D cylinder(double r, double h, size_t ssteps, const Vec3d &sp = {0,0,0});
|
||||
Contour3D cylinder(double r, double h, size_t ssteps = 45, const Vec3d &sp = {0,0,0});
|
||||
|
||||
const constexpr long ID_UNSET = -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue