Classes | |
| struct | SpikeDesc |
| struct | Duplicate |
Typedefs | |
| using | Polygon = Slic3r::Polygon |
| using | Duplicates = std::vector<Duplicate> |
| using | Coord2 = double |
| using | P2 = Eigen::Matrix<Coord2, 2, 1, Eigen::DontAlign> |
Functions | |
| bool | is_valid (const FontFile &font, unsigned int index) |
| fontinfo_opt | load_font_info (const unsigned char *data, unsigned int index=0) |
| std::optional< Glyph > | get_glyph (const stbtt_fontinfo &font_info, int unicode_letter, float flatness) |
| const Glyph * | get_glyph (int unicode, const FontFile &font, const FontProp &font_prop, Glyphs &cache, fontinfo_opt &font_info_opt) |
| Point | to_point (const stbtt__point &point) |
| void | remove_bad (Polygons &polygons) |
| void | remove_bad (ExPolygons &expolygons) |
| ExPolygon | create_bounding_rect (const ExPolygons &shape) |
| bool | heal_dupl_inter (ExPolygons &shape, unsigned max_iteration) |
| const Points | pts_2x2 ({Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 1)}) |
| const Points | pts_3x3 ({Point(-1, -1), Point(1, -1), Point(1, 1), Point(-1, 1)}) |
| bool | remove_when_spike (Polygon &polygon, size_t index, const SpikeDesc &spike_desc) |
| void | remove_spikes_in_duplicates (ExPolygons &expolygons, const Points &duplicates) |
| Points | get_unique_intersections (const Slic3r::IntersectionsLines &intersections) |
| Polygons | get_holes_with_points (const Polygons &holes, const Points &points) |
| bool | fill_trouble_holes (const Polygons &holes, const Points &duplicates, const Points &intersections, ExPolygons &shape) |
| Fill holes which create duplicits or intersections When healing hole creates trouble in shape again try to heal by an union instead of diff_ex. | |
| Duplicates | collect_duplicit_indices (const ExPolygons &expoly) |
| Points | get_points (const Duplicates &duplicate_indices) |
| ExPolygons | letter2shapes (wchar_t letter, Point &cursor, FontFileWithCache &font_with_cache, const FontProp &font_prop, fontinfo_opt &font_info_cache) |
| HealedExPolygons | union_with_delta (const ExPolygonsWithIds &shapes, float delta, unsigned max_heal_iteration) |
| void | align_shape (ExPolygonsWithIds &shapes, const std::wstring &text, const FontProp &prop, const FontFile &font) |
| Align shape against pivot. | |
| void | add_quad (uint32_t i1, uint32_t i2, indexed_triangle_set &result, uint32_t count_point) |
| indexed_triangle_set | polygons2model_unique (const ExPolygons &shape2d, const IProjection &projection, const Points &points) |
| indexed_triangle_set | polygons2model_duplicit (const ExPolygons &shape2d, const IProjection &projection, const Points &points, const Points &duplicits) |
| bool | point_in_distance (const Coord2 &distance_sq, PolygonPoint &polygon_point, const size_t &i, const Slic3r::Polygon &polygon, bool is_first, bool is_reverse=false) |
| void | point_in_distance (int32_t distance, PolygonPoint &p, const Slic3r::Polygon &polygon) |
| void | point_in_reverse_distance (int32_t distance, PolygonPoint &p, const Slic3r::Polygon &polygon) |
| float | get_align_y_offset (FontProp::VerticalAlign align, unsigned count_lines, const FontFile &ff, const FontProp &fp) |
| int32_t | get_align_x_offset (FontProp::HorizontalAlign align, const BoundingBox &shape_bb, const BoundingBox &line_bb) |
Variables | |
| const int | CANCEL_CHECK = 10 |
| struct anonymous_namespace{Emboss.cpp}::Duplicate |
| Class Members | ||
|---|---|---|
| vector< uint32_t > | indices | |
| Point | point | |
| using anonymous_namespace{Emboss.cpp}::Coord2 = double |
| using anonymous_namespace{Emboss.cpp}::Duplicates = std::vector<Duplicate> |
| using anonymous_namespace{Emboss.cpp}::P2 = Eigen::Matrix<Coord2, 2, 1, Eigen::DontAlign> |
| using anonymous_namespace{Emboss.cpp}::Polygon = Slic3r::Polygon |
| void anonymous_namespace{Emboss.cpp}::add_quad | ( | uint32_t | i1, |
| uint32_t | i2, | ||
| indexed_triangle_set & | result, | ||
| uint32_t | count_point ) |
Referenced by polygons2model_duplicit(), and polygons2model_unique().
| void anonymous_namespace{Emboss.cpp}::align_shape | ( | ExPolygonsWithIds & | shapes, |
| const std::wstring & | text, | ||
| const FontProp & | prop, | ||
| const FontFile & | font ) |
Align shape against pivot.
| shapes | Shapes to align Prerequisities: shapes are aligned left top |
| text | To detect end of lines - to be able horizontal center the line |
| prop | Containe Horizontal and vertical alignment |
| font | Needed for scale and font size |
References Slic3r::FontProp::align, align_shape(), get_align_x_offset(), get_align_y_offset(), Slic3r::Emboss::get_count_lines(), Slic3r::get_extents(), Slic3r::FontProp::left, Slic3r::BoundingBoxBase< PointType, APointsType >::merge(), Slic3r::offset(), and Slic3r::ExPolygon::translate().
Referenced by align_shape(), and Slic3r::Emboss::text2vshapes().
| Duplicates anonymous_namespace{Emboss.cpp}::collect_duplicit_indices | ( | const ExPolygons & | expoly | ) |
References Slic3r::to_points().
Referenced by heal_dupl_inter().
| ExPolygon anonymous_namespace{Emboss.cpp}::create_bounding_rect | ( | const ExPolygons & | shape | ) |
References Slic3r::get_extents(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, Slic3r::offset(), and Slic3r::BoundingBoxBase< PointType, APointsType >::size().
Referenced by heal_dupl_inter().
| bool anonymous_namespace{Emboss.cpp}::fill_trouble_holes | ( | const Polygons & | holes, |
| const Points & | duplicates, | ||
| const Points & | intersections, | ||
| ExPolygons & | shape ) |
Fill holes which create duplicits or intersections When healing hole creates trouble in shape again try to heal by an union instead of diff_ex.
| holes | Holes which was substracted from shape previous |
| duplicates | Current duplicates in shape |
| intersections | Current intersections in shape |
| shape | Partialy healed shape[could be modified] |
References Slic3r::append(), get_holes_with_points(), Slic3r::holes(), and Slic3r::union_ex().
Referenced by heal_dupl_inter().
| int32_t anonymous_namespace{Emboss.cpp}::get_align_x_offset | ( | FontProp::HorizontalAlign | align, |
| const BoundingBox & | shape_bb, | ||
| const BoundingBox & | line_bb ) |
References Slic3r::BoundingBoxBase< PointType, APointsType >::center(), Slic3r::FontProp::center, get_align_x_offset(), Slic3r::FontProp::left, Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::FontProp::right, and Slic3r::BoundingBoxBase< PointType, APointsType >::size().
Referenced by align_shape(), and get_align_x_offset().
| float anonymous_namespace{Emboss.cpp}::get_align_y_offset | ( | FontProp::VerticalAlign | align, |
| unsigned | count_lines, | ||
| const FontFile & | ff, | ||
| const FontProp & | fp ) |
References Slic3r::Emboss::FontFile::Info::ascent, ASCENT_CENTER, Slic3r::FontProp::bottom, Slic3r::FontProp::center, get_align_y_offset(), Slic3r::Emboss::get_font_info(), Slic3r::Emboss::get_line_height(), SHAPE_SCALE, and Slic3r::FontProp::top.
Referenced by align_shape(), and get_align_y_offset().
| std::optional< Glyph > anonymous_namespace{Emboss.cpp}::get_glyph | ( | const stbtt_fontinfo & | font_info, |
| int | unicode_letter, | ||
| float | flatness ) |
References Slic3r::Emboss::Glyph::advance_width, Slic3r::Emboss::heal_polygons(), Slic3r::Emboss::Glyph::left_side_bearing, Slic3r::length(), Slic3r::Emboss::Glyph::shape, and to_point().
Referenced by get_glyph(), Slic3r::Emboss::letter2glyph(), and letter2shapes().
| const Glyph * anonymous_namespace{Emboss.cpp}::get_glyph | ( | int | unicode, |
| const FontFile & | font, | ||
| const FontProp & | font_prop, | ||
| Glyphs & | cache, | ||
| fontinfo_opt & | font_info_opt ) |
References Slic3r::Emboss::Glyph::advance_width, Slic3r::FontProp::boldness, Slic3r::FontProp::char_gap, Slic3r::FontProp::collection_number, Slic3r::ExPolygon::contour, Slic3r::Emboss::FontFile::data, get_glyph(), Slic3r::ExPolygon::holes, Slic3r::Emboss::FontFile::infos, is_valid(), Slic3r::Emboss::Glyph::left_side_bearing, load_font_info(), Slic3r::offset_ex(), Slic3r::MultiPoint::points, RESOLUTION, Slic3r::Emboss::Glyph::shape, SHAPE_SCALE, Slic3r::FontProp::size_in_mm, Slic3r::FontProp::skew, and Slic3r::union_ex().
| Polygons anonymous_namespace{Emboss.cpp}::get_holes_with_points | ( | const Polygons & | holes, |
| const Points & | points ) |
References Slic3r::holes().
Referenced by fill_trouble_holes().
| Points anonymous_namespace{Emboss.cpp}::get_points | ( | const Duplicates & | duplicate_indices | ) |
Referenced by heal_dupl_inter().
| Points anonymous_namespace{Emboss.cpp}::get_unique_intersections | ( | const Slic3r::IntersectionsLines & | intersections | ) |
Referenced by heal_dupl_inter().
| bool anonymous_namespace{Emboss.cpp}::heal_dupl_inter | ( | ExPolygons & | shape, |
| unsigned | max_iteration ) |
References collect_duplicit_indices(), create_bounding_rect(), Slic3r::ExPolygonsIndices::cvt(), Slic3r::diff_ex(), Slic3r::duplicate(), fill_trouble_holes(), Slic3r::get_intersections(), get_points(), get_unique_intersections(), Slic3r::holes(), Slic3r::intersection(), Slic3r::No, pts_2x2(), pts_3x3(), Slic3r::remove_same_neighbor(), remove_spikes_in_duplicates(), and Slic3r::MultiPoint::translate().
| bool anonymous_namespace{Emboss.cpp}::is_valid | ( | const FontFile & | font, |
| unsigned int | index ) |
References Slic3r::Emboss::FontFile::data, and Slic3r::Emboss::FontFile::infos.
Referenced by Slic3r::Emboss::create_range_text(), Slic3r::Emboss::get_font_info(), get_glyph(), Slic3r::Emboss::letter2glyph(), and Slic3r::Emboss::text2vshapes().
| ExPolygons anonymous_namespace{Emboss.cpp}::letter2shapes | ( | wchar_t | letter, |
| Point & | cursor, | ||
| FontFileWithCache & | font_with_cache, | ||
| const FontProp & | font_prop, | ||
| fontinfo_opt & | font_info_cache ) |
References Slic3r::Emboss::Glyph::advance_width, Slic3r::Emboss::FontFileWithCache::cache, Slic3r::Emboss::FontFileWithCache::font_file, get_glyph(), Slic3r::Emboss::get_line_height(), Slic3r::Emboss::FontFileWithCache::has_value(), and Slic3r::Emboss::Glyph::shape.
Referenced by Slic3r::Emboss::text2vshapes().
| fontinfo_opt anonymous_namespace{Emboss.cpp}::load_font_info | ( | const unsigned char * | data, |
| unsigned int | index = 0 ) |
Referenced by Slic3r::Emboss::create_font_file(), Slic3r::Emboss::create_range_text(), get_glyph(), Slic3r::Emboss::is_italic(), and Slic3r::Emboss::letter2glyph().
| bool anonymous_namespace{Emboss.cpp}::point_in_distance | ( | const Coord2 & | distance_sq, |
| PolygonPoint & | polygon_point, | ||
| const size_t & | i, | ||
| const Slic3r::Polygon & | polygon, | ||
| bool | is_first, | ||
| bool | is_reverse = false ) |
References Slic3r::cast(), Slic3r::PolygonPoint::index, Slic3r::PolygonPoint::point, point_in_distance(), and Slic3r::MultiPoint::size().
Referenced by point_in_distance(), point_in_distance(), and point_in_reverse_distance().
| void anonymous_namespace{Emboss.cpp}::point_in_distance | ( | int32_t | distance, |
| PolygonPoint & | p, | ||
| const Slic3r::Polygon & | polygon ) |
References point_in_distance(), and Slic3r::MultiPoint::size().
| void anonymous_namespace{Emboss.cpp}::point_in_reverse_distance | ( | int32_t | distance, |
| PolygonPoint & | p, | ||
| const Slic3r::Polygon & | polygon ) |
References point_in_distance(), point_in_reverse_distance(), and Slic3r::MultiPoint::size().
Referenced by point_in_reverse_distance().
| indexed_triangle_set anonymous_namespace{Emboss.cpp}::polygons2model_duplicit | ( | const ExPolygons & | shape2d, |
| const IProjection & | projection, | ||
| const Points & | points, | ||
| const Points & | duplicits ) |
References add_quad(), Slic3r::Triangulation::create_changes(), Slic3r::Emboss::IProjection::create_front_back(), and Slic3r::Triangulation::triangulate().
Referenced by Slic3r::Emboss::polygons2model().
| indexed_triangle_set anonymous_namespace{Emboss.cpp}::polygons2model_unique | ( | const ExPolygons & | shape2d, |
| const IProjection & | projection, | ||
| const Points & | points ) |
References add_quad(), Slic3r::Emboss::IProjection::create_front_back(), and Slic3r::Triangulation::triangulate().
Referenced by Slic3r::Emboss::polygons2model().
| void anonymous_namespace{Emboss.cpp}::remove_bad | ( | ExPolygons & | expolygons | ) |
References remove_bad().
| void anonymous_namespace{Emboss.cpp}::remove_bad | ( | Polygons & | polygons | ) |
Referenced by remove_bad(), and remove_spikes_in_duplicates().
| void anonymous_namespace{Emboss.cpp}::remove_spikes_in_duplicates | ( | ExPolygons & | expolygons, |
| const Points & | duplicates ) |
References Slic3r::BoundingBoxBase< PointType, APointsType >::contains(), Slic3r::MultiPoint::points, remove_bad(), remove_when_spike(), SHAPE_SCALE, and Slic3r::to_points().
Referenced by heal_dupl_inter().
| bool anonymous_namespace{Emboss.cpp}::remove_when_spike | ( | Slic3r::Polygon & | polygon, |
| size_t | index, | ||
| const SpikeDesc & | spike_desc ) |
References Slic3r::angle(), Slic3r::cast(), anonymous_namespace{Emboss.cpp}::SpikeDesc::cos_angle, anonymous_namespace{Emboss.cpp}::SpikeDesc::half_bevel, and Slic3r::MultiPoint::points.
Referenced by remove_spikes_in_duplicates().
| Point anonymous_namespace{Emboss.cpp}::to_point | ( | const stbtt__point & | point | ) |
References SHAPE_SCALE.
Referenced by get_glyph().
| HealedExPolygons anonymous_namespace{Emboss.cpp}::union_with_delta | ( | const ExPolygonsWithIds & | shapes, |
| float | delta, | ||
| unsigned | max_heal_iteration ) |
References Slic3r::expolygons_append(), Slic3r::Emboss::heal_expolygons(), Slic3r::offset_ex(), and Slic3r::union_ex().
Referenced by Slic3r::union_with_delta().
| const int anonymous_namespace{Emboss.cpp}::CANCEL_CHECK = 10 |
Referenced by Slic3r::Emboss::text2vshapes().