mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 02:29:04 +08:00
Fix: change .value() connected with optional to dereferece by *
Os X do NOT support std::optional::value() PrusaSlicer_OsX_Mojave: ../src/libslic3r/SLA/SupportIslands/ExpandNeighbor.cpp:23:50: error: 'value' is unavailable: introduced in macOS 10.14
This commit is contained in:
parent
cda80cdd0b
commit
3c4f68fa3f
@ -20,7 +20,7 @@ void ExpandNeighbor::process(CallStack &call_stack)
|
||||
if (circle_opt.has_value()) {
|
||||
size_t circle_index = data.result.circles.size();
|
||||
data.circle_indexes.push_back(circle_index);
|
||||
data.result.circles.push_back(circle_opt.value());
|
||||
data.result.circles.push_back(*circle_opt);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ Slic3r::Polygon VoronoiGraphUtils::to_polygon(const VD::cell_type & cell,
|
||||
continue;
|
||||
if (orientation == Geometry::Orientation::ORIENTATION_CW)
|
||||
std::swap(line->a, line->b);
|
||||
lines.push_back(line.value());
|
||||
lines.push_back(*line);
|
||||
} while ((edge = edge->next()) && edge != cell.incident_edge());
|
||||
assert(!lines.empty());
|
||||
LineUtils::sort_CCW(lines, center);
|
||||
|
@ -2312,10 +2312,10 @@ TEST_CASE("bad vertex cause overflow of data type precisin when use VD result",
|
||||
for (auto &edge : vd.edges()) {
|
||||
size_t i1 = edge.cell()->source_index();
|
||||
size_t i2 = edge.twin()->cell()->source_index();
|
||||
if (i1 == bad_index0 && i2 == bad_index1 ||
|
||||
i1 == bad_index1 && i2 == bad_index0) {
|
||||
Vec2d p1 = points[bad_index0].cast<double>();
|
||||
Vec2d p2 = points[bad_index1].cast<double>();
|
||||
if ((i1 == bad_index0 && i2 == bad_index1) ||
|
||||
(i1 == bad_index1 && i2 == bad_index0)) {
|
||||
Vec2d p1 = points[bad_index0].cast<double>();
|
||||
Vec2d p2 = points[bad_index1].cast<double>();
|
||||
Vec2d middle = (p1 + p2) / 2;
|
||||
// direction for edge is perpendicular point connection
|
||||
Vec2d direction(p2.y() - p1.y(), p1.x() - p2.x());
|
||||
|
Loading…
x
Reference in New Issue
Block a user