mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 20:15:55 +08:00
Fix spelling
This commit is contained in:
parent
66a3752782
commit
bd5d2d4493
@ -28,7 +28,7 @@ inline void insert_edge(Triangulation::HalfEdges &edges, uint32_t &offset, const
|
|||||||
|
|
||||||
Triangulation::Indices Triangulation::triangulate(const Points & points,
|
Triangulation::Indices Triangulation::triangulate(const Points & points,
|
||||||
const HalfEdges &half_edges,
|
const HalfEdges &half_edges,
|
||||||
bool allow_opposit_edge)
|
bool allow_opposite_edge)
|
||||||
{
|
{
|
||||||
// IMPROVE use int point insted of float !!!
|
// IMPROVE use int point insted of float !!!
|
||||||
|
|
||||||
@ -46,11 +46,11 @@ Triangulation::Indices Triangulation::triangulate(const Points & points,
|
|||||||
vertices_handle.reserve(points.size());
|
vertices_handle.reserve(points.size());
|
||||||
for (const auto &p : points) {
|
for (const auto &p : points) {
|
||||||
Point cdt_p(p.x(), p.y());
|
Point cdt_p(p.x(), p.y());
|
||||||
auto handl = cdt.insert(cdt_p);
|
auto handle = cdt.insert(cdt_p);
|
||||||
vertices_handle.push_back(handl);
|
vertices_handle.push_back(handle);
|
||||||
// point index
|
// point index
|
||||||
uint32_t pi = &p - &points.front();
|
uint32_t pi = &p - &points.front();
|
||||||
map[handl] = pi;
|
map[handle] = pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
// triangle can not contain forbiden edge
|
// triangle can not contain forbiden edge
|
||||||
@ -69,7 +69,7 @@ Triangulation::Indices Triangulation::triangulate(const Points & points,
|
|||||||
for (size_t i = 0; i < 3; ++i) pi[i] = map[face->vertex(i)];
|
for (size_t i = 0; i < 3; ++i) pi[i] = map[face->vertex(i)];
|
||||||
|
|
||||||
// Do not use triangles with opposit edges
|
// Do not use triangles with opposit edges
|
||||||
if (!allow_opposit_edge) {
|
if (!allow_opposite_edge) {
|
||||||
if (half_edges.find(std::make_pair(pi[1], pi[0])) != half_edges.end()) continue;
|
if (half_edges.find(std::make_pair(pi[1], pi[0])) != half_edges.end()) continue;
|
||||||
if (half_edges.find(std::make_pair(pi[2], pi[1])) != half_edges.end()) continue;
|
if (half_edges.find(std::make_pair(pi[2], pi[1])) != half_edges.end()) continue;
|
||||||
if (half_edges.find(std::make_pair(pi[0], pi[2])) != half_edges.end()) continue;
|
if (half_edges.find(std::make_pair(pi[0], pi[2])) != half_edges.end()) continue;
|
||||||
|
@ -27,11 +27,11 @@ public:
|
|||||||
/// <param name="points">Points to connect</param>
|
/// <param name="points">Points to connect</param>
|
||||||
/// <param name="edges">Constraint for edges, pair is from point(first) to
|
/// <param name="edges">Constraint for edges, pair is from point(first) to
|
||||||
/// point(second)</param>
|
/// point(second)</param>
|
||||||
/// <param name="allow_opposit_edge">Flag for filtration result indices by opposit half edge</param>
|
/// <param name="allow_opposite_edge">Flag for filtration result indices by opposit half edge</param>
|
||||||
/// <returns>Triangles</returns>
|
/// <returns>Triangles</returns>
|
||||||
static Indices triangulate(const Points & points,
|
static Indices triangulate(const Points & points,
|
||||||
const HalfEdges &half_edges,
|
const HalfEdges &half_edges,
|
||||||
bool allow_opposit_edge = false);
|
bool allow_opposite_edge = false);
|
||||||
static Indices triangulate(const Polygon &polygon);
|
static Indices triangulate(const Polygon &polygon);
|
||||||
static Indices triangulate(const Polygons &polygons);
|
static Indices triangulate(const Polygons &polygons);
|
||||||
static Indices triangulate(const ExPolygons &expolygons);
|
static Indices triangulate(const ExPolygons &expolygons);
|
||||||
|
@ -90,7 +90,7 @@ bool FontManager::load_font(size_t font_index)
|
|||||||
{
|
{
|
||||||
if (font_index >= m_font_list.size()) return false;
|
if (font_index >= m_font_list.size()) return false;
|
||||||
std::swap(font_index, m_font_selected);
|
std::swap(font_index, m_font_selected);
|
||||||
bool is_loaded = load_activ_font();
|
bool is_loaded = load_active_font();
|
||||||
if (!is_loaded) std::swap(font_index, m_font_selected);
|
if (!is_loaded) std::swap(font_index, m_font_selected);
|
||||||
return is_loaded;
|
return is_loaded;
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ static std::string get_file_name(const std::string &file_path)
|
|||||||
return file_path.substr(offset, count);
|
return file_path.substr(offset, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FontManager::load_activ_font()
|
bool FontManager::load_active_font()
|
||||||
{
|
{
|
||||||
return set_up_font_file(m_font_selected);
|
return set_up_font_file(m_font_selected);
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ private:
|
|||||||
// load actual selected font
|
// load actual selected font
|
||||||
ImFont *load_imgui_font(size_t index, const std::string &text);
|
ImFont *load_imgui_font(size_t index, const std::string &text);
|
||||||
|
|
||||||
bool load_activ_font();
|
bool load_active_font();
|
||||||
|
|
||||||
bool set_wx_font(size_t item_index, const wxFont &wx_font);
|
bool set_wx_font(size_t item_index, const wxFont &wx_font);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user