mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 06:22:04 +08:00
parent
77fd66bcd6
commit
7be5f47a0e
@ -191,10 +191,14 @@ bool
|
|||||||
MedialAxis::validate_edge(const VD::edge_type* edge, Lines &lines, std::map<const VD::edge_type*, std::pair<coordf_t, coordf_t> > &thickness)
|
MedialAxis::validate_edge(const VD::edge_type* edge, Lines &lines, std::map<const VD::edge_type*, std::pair<coordf_t, coordf_t> > &thickness)
|
||||||
{
|
{
|
||||||
// prevent overflows and detect almost-infinite edges
|
// prevent overflows and detect almost-infinite edges
|
||||||
if (std::abs(edge->vertex0()->x()) > double(CLIPPER_MAX_COORD_UNSCALED) ||
|
if (std::abs(edge->vertex0()->x()) > double(CLIPPER_MAX_COORD_UNSCALED) ||
|
||||||
std::abs(edge->vertex0()->y()) > double(CLIPPER_MAX_COORD_UNSCALED) ||
|
std::abs(edge->vertex0()->y()) > double(CLIPPER_MAX_COORD_UNSCALED) ||
|
||||||
std::abs(edge->vertex1()->x()) > double(CLIPPER_MAX_COORD_UNSCALED) ||
|
std::abs(edge->vertex1()->x()) > double(CLIPPER_MAX_COORD_UNSCALED) ||
|
||||||
std::abs(edge->vertex1()->y()) > double(CLIPPER_MAX_COORD_UNSCALED))
|
std::abs(edge->vertex1()->y()) > double(CLIPPER_MAX_COORD_UNSCALED) ||
|
||||||
|
std::isnan(edge->vertex0()->x()) ||
|
||||||
|
std::isnan(edge->vertex0()->y()) ||
|
||||||
|
std::isnan(edge->vertex1()->x()) ||
|
||||||
|
std::isnan(edge->vertex1()->y()) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// construct the line representing this edge of the Voronoi diagram
|
// construct the line representing this edge of the Voronoi diagram
|
||||||
|
Loading…
x
Reference in New Issue
Block a user