Offseted move with text volume over surface

+ use fix of .3mf transformation
This commit is contained in:
Filip Sykala 2022-04-08 15:05:43 +02:00
parent 630b1bb956
commit 7c1cf6fa7e
4 changed files with 118 additions and 49 deletions

View file

@ -27,7 +27,7 @@ Points CameraUtils::project(const Camera & camera,
result.reserve(points.size());
int window_height = viewport[3];
// Iterate over all points and determine whether they're in the rectangle.
// convert to points --> loss precision
for (int i = 0; i < projections.rows(); ++i) {
double x = projections(i, 0);
double y = projections(i, 1);
@ -37,6 +37,12 @@ Points CameraUtils::project(const Camera & camera,
return result;
}
Point CameraUtils::project(const Camera &camera, const Vec3d &point)
{
// IMPROVE: do it faster when you need it (inspire in project multi point)
return project(camera, std::vector{point}).front();
}
Slic3r::Polygon CameraUtils::create_hull2d(const Camera & camera,
const GLVolume &volume)
{