![]() |
Prusa Slicer 2.6.0
|
#include <src/libslic3r/SVG.hpp>
Collaboration diagram for Slic3r::SVG:Classes | |
| struct | ExPolygonAttributes |
Public Member Functions | |
| SVG (const char *afilename) | |
| SVG (const char *afilename, const BoundingBox &bbox, const coord_t bbox_offset=scale_(1.), bool flipY=true) | |
| SVG (const std::string &filename) | |
| SVG (const std::string &filename, const BoundingBox &bbox, const coord_t bbox_offset=scale_(1.), bool flipY=true) | |
| ~SVG () | |
| bool | open (const char *filename) |
| bool | open (const char *filename, const BoundingBox &bbox, const coord_t bbox_offset=scale_(1.), bool flipY=true) |
| bool | open (const std::string &filename) |
| bool | open (const std::string &filename, const BoundingBox &bbox, const coord_t bbox_offset=scale_(1.), bool flipY=true) |
| void | draw (const Line &line, std::string stroke="black", coordf_t stroke_width=0) |
| void | draw (const ThickLine &line, const std::string &fill, const std::string &stroke, coordf_t stroke_width=0) |
| void | draw (const Lines &lines, std::string stroke="black", coordf_t stroke_width=0) |
| void | draw (const ExPolygon &expolygon, std::string fill="grey", const float fill_opacity=1.f) |
| void | draw_outline (const ExPolygon &polygon, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| void | draw (const ExPolygons &expolygons, std::string fill="grey", const float fill_opacity=1.f) |
| void | draw_outline (const ExPolygons &polygons, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| void | draw (const Surface &surface, std::string fill="grey", const float fill_opacity=1.f) |
| void | draw_outline (const Surface &surface, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| void | draw (const Surfaces &surfaces, std::string fill="grey", const float fill_opacity=1.f) |
| void | draw_outline (const Surfaces &surfaces, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| void | draw (const SurfacesPtr &surfaces, std::string fill="grey", const float fill_opacity=1.f) |
| void | draw_outline (const SurfacesPtr &surfaces, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| void | draw (const Polygon &polygon, std::string fill="grey") |
| void | draw_outline (const Polygon &polygon, std::string stroke="black", coordf_t stroke_width=0) |
| void | draw (const Polygons &polygons, std::string fill="grey") |
| void | draw_outline (const Polygons &polygons, std::string stroke="black", coordf_t stroke_width=0) |
| void | draw (const Polyline &polyline, std::string stroke="black", coordf_t stroke_width=0) |
| void | draw (const Polylines &polylines, std::string stroke="black", coordf_t stroke_width=0) |
| void | draw (const ThickLines &thicklines, const std::string &fill="lime", const std::string &stroke="black", coordf_t stroke_width=0) |
| void | draw (const ThickPolylines &polylines, const std::string &stroke="black", coordf_t stroke_width=0) |
| void | draw (const ThickPolylines &thickpolylines, const std::string &fill, const std::string &stroke, coordf_t stroke_width) |
| void | draw (const Point &point, std::string fill="black", coord_t radius=0) |
| void | draw (const Points &points, std::string fill="black", coord_t radius=0) |
| void | draw (const ClipperLib::Path &polygon, double scale, std::string fill="grey", coordf_t stroke_width=0) |
| void | draw (const ClipperLib::Paths &polygons, double scale, std::string fill="grey", coordf_t stroke_width=0) |
| void | draw_text (const Point &pt, const char *text, const char *color, coordf_t font_size=20.f) |
| void | draw_legend (const Point &pt, const char *text, const char *color, coordf_t font_size=10.f) |
| void | Close () |
Static Public Member Functions | |
| static void | export_expolygons (const char *path, const BoundingBox &bbox, const Slic3r::ExPolygons &expolygons, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| static void | export_expolygons (const std::string &path, const BoundingBox &bbox, const Slic3r::ExPolygons &expolygons, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| static void | export_expolygons (const char *path, const Slic3r::ExPolygons &expolygons, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| static void | export_expolygons (const std::string &path, const Slic3r::ExPolygons &expolygons, std::string stroke_outer="black", std::string stroke_holes="blue", coordf_t stroke_width=0) |
| static void | export_expolygons (const char *path, const std::vector< std::pair< Slic3r::ExPolygons, ExPolygonAttributes > > &expolygons_with_attributes) |
| static void | export_expolygons (const std::string &path, const std::vector< std::pair< Slic3r::ExPolygons, ExPolygonAttributes > > &expolygons_with_attributes) |
Public Attributes | |
| bool | arrows |
| std::string | fill |
| std::string | stroke |
| Point | origin |
| float | height |
| bool | flipY |
Private Member Functions | |
| void | path (const std::string &d, bool fill, coordf_t stroke_width, const float fill_opacity) |
| std::string | get_path_d (const MultiPoint &mp, bool closed=false) const |
| std::string | get_path_d (const ClipperLib::Path &mp, double scale, bool closed=false) const |
| float | to_svg_y (float x) const throw () |
Static Private Member Functions | |
| static float | to_svg_coord (float x) throw () |
| static float | to_svg_x (float x) throw () |
Private Attributes | |
| std::string | filename |
| FILE * | f |
|
inline |
|
inline |
|
inline |
|
inline |
Here is the call graph for this function:| void Slic3r::SVG::Close | ( | ) |
References f.
Referenced by ~SVG(), Slic3r::contour_distance(), Slic3r::sla::anonymous_namespace{Pad.cpp}::create_pad_geometry(), Slic3r::PrintObject::discover_vertical_shells(), Slic3r::dump_voronoi_to_svg(), export_expolygons(), export_expolygons(), Slic3r::export_intersections_to_svg(), Slic3r::FFFSupport::export_print_z_polygons_and_extrusions_to_svg(), Slic3r::FFFSupport::export_print_z_polygons_to_svg(), Slic3r::LayerRegion::export_region_fill_surfaces_to_svg(), Slic3r::Layer::export_region_fill_surfaces_to_svg(), Slic3r::LayerRegion::export_region_slices_to_svg(), Slic3r::Layer::export_region_slices_to_svg(), Slic3r::SurfaceCollection::export_to_svg(), Slic3r::export_to_svg(), Slic3r::SupportGridPattern::extract_support(), Slic3r::FillRectilinear::fill_surface_by_lines(), Slic3r::generate_extra_perimeters_over_overhangs(), Slic3r::make_loops(), Slic3r::Algorithm::merge_expansions_into_expolygons(), Slic3r::FFFSupport::modulate_extrusion_by_overlapping_layers(), and Slic3r::slice_mesh().
Here is the caller graph for this function:| void Slic3r::SVG::draw | ( | const ClipperLib::Path & | polygon, |
| double | scale, | ||
| std::string | fill = "grey", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
References get_path_d(), path(), scale(), and stroke.
Here is the call graph for this function:| void Slic3r::SVG::draw | ( | const ClipperLib::Paths & | polygons, |
| double | scale, | ||
| std::string | fill = "grey", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
| void Slic3r::SVG::draw | ( | const ExPolygon & | expolygon, |
| std::string | fill = "grey", |
||
| const float | fill_opacity = 1.f |
||
| ) |
References fill, get_path_d(), path(), and Slic3r::to_polygons().
Here is the call graph for this function:| void Slic3r::SVG::draw | ( | const ExPolygons & | expolygons, |
| std::string | fill = "grey", |
||
| const float | fill_opacity = 1.f |
||
| ) |
| void Slic3r::SVG::draw | ( | const Line & | line, |
| std::string | stroke = "black", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
References Slic3r::Line::a, arrows, Slic3r::Line::b, f, origin, stroke, to_svg_coord(), to_svg_x(), and to_svg_y().
Referenced by Slic3r::ExPolygon::contains(), Slic3r::contour_distance(), Slic3r::contour_distance2(), Slic3r::sla::anonymous_namespace{Pad.cpp}::create_pad_geometry(), Slic3r::detect_overhangs(), Slic3r::PrintObject::discover_vertical_shells(), Slic3r::MultiPoint::douglas_peucker(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), Slic3r::dump_voronoi_to_svg(), Slic3r::expolygons_to_zpaths_shrunk(), export_expolygons(), export_expolygons(), Slic3r::export_intersections_to_svg(), Slic3r::FFFSupport::export_print_z_polygons_and_extrusions_to_svg(), Slic3r::FFFSupport::export_print_z_polygons_to_svg(), Slic3r::LayerRegion::export_region_fill_surfaces_to_svg(), Slic3r::Layer::export_region_fill_surfaces_to_svg(), Slic3r::LayerRegion::export_region_slices_to_svg(), Slic3r::Layer::export_region_slices_to_svg(), Slic3r::SurfaceCollection::export_to_svg(), Slic3r::export_to_svg(), Slic3r::SupportGridPattern::extract_support(), Slic3r::FillRectilinear::fill_surface_by_lines(), Slic3r::generate_extra_perimeters_over_overhangs(), Slic3r::line_rounded_thick_segment_collision(), Slic3r::make_loops(), Slic3r::mark_boundary_segments_touching_infill(), Slic3r::Algorithm::merge_expansions_into_expolygons(), Slic3r::mittered_offset_path_scaled(), Slic3r::FFFSupport::modulate_extrusion_by_overlapping_layers(), Slic3r::ExPolygon::overlaps(), priv::select_patches(), Slic3r::slice_mesh(), Slic3r::slice_region_by_vertical_lines(), Slic3r::Arachne::WallToolPaths::stitchToolPaths(), Slic3r::sla::SupportPointGenerator::uniformly_cover(), and priv::visualize_heal().
Here is the call graph for this function:
Here is the caller graph for this function:References f, fill, origin, to_svg_coord(), to_svg_x(), and to_svg_y().
Here is the call graph for this function:| void Slic3r::SVG::draw | ( | const Polyline & | polyline, |
| std::string | stroke = "black", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
| void Slic3r::SVG::draw | ( | const Surface & | surface, |
| std::string | fill = "grey", |
||
| const float | fill_opacity = 1.f |
||
| ) |
| void Slic3r::SVG::draw | ( | const SurfacesPtr & | surfaces, |
| std::string | fill = "grey", |
||
| const float | fill_opacity = 1.f |
||
| ) |
| void Slic3r::SVG::draw | ( | const ThickLine & | line, |
| const std::string & | fill, | ||
| const std::string & | stroke, | ||
| coordf_t | stroke_width = 0 |
||
| ) |
References Slic3r::Line::a, Slic3r::ThickLine::a_width, Slic3r::Line::b, Slic3r::ThickLine::b_width, f, fill, origin, Slic3r::perp(), sqrt(), stroke, to_svg_coord(), to_svg_x(), and to_svg_y().
Here is the call graph for this function:| void Slic3r::SVG::draw | ( | const ThickPolylines & | polylines, |
| const std::string & | stroke = "black", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
| void Slic3r::SVG::draw_legend | ( | const Point & | pt, |
| const char * | text, | ||
| const char * | color, | ||
| coordf_t | font_size = 10.f |
||
| ) |
References f, origin, to_svg_x(), and to_svg_y().
Referenced by export_expolygons(), Slic3r::FFFSupport::export_support_surface_type_legend_to_svg(), and Slic3r::export_surface_type_legend_to_svg().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::SVG::draw_outline | ( | const ExPolygon & | polygon, |
| std::string | stroke_outer = "black", |
||
| std::string | stroke_holes = "blue", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
References Slic3r::ExPolygon::contour, draw_outline(), and Slic3r::ExPolygon::holes.
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::constructFromPolygons(), Slic3r::ExPolygon::contains(), Slic3r::contour_distance(), Slic3r::contour_distance2(), Slic3r::PrintObject::discover_vertical_shells(), draw_outline(), draw_outline(), draw_outline(), draw_outline(), draw_outline(), draw_outline(), Slic3r::dump_voronoi_to_svg(), export_expolygons(), export_expolygons(), Slic3r::export_intersections_to_svg(), Slic3r::LayerRegion::export_region_fill_surfaces_to_svg(), Slic3r::SupportGridPattern::extract_support(), Slic3r::Algorithm::merge_expansions_into_expolygons(), Slic3r::mittered_offset_path_scaled(), Slic3r::ExPolygon::overlaps(), Slic3r::slice_mesh(), Slic3r::slice_region_by_vertical_lines(), and Slic3r::Arachne::WallToolPaths::stitchToolPaths().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::SVG::draw_outline | ( | const ExPolygons & | polygons, |
| std::string | stroke_outer = "black", |
||
| std::string | stroke_holes = "blue", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
References draw_outline().
Here is the call graph for this function:| void Slic3r::SVG::draw_outline | ( | const Polygon & | polygon, |
| std::string | stroke = "black", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
| void Slic3r::SVG::draw_outline | ( | const Polygons & | polygons, |
| std::string | stroke = "black", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
References draw_outline(), and stroke.
Here is the call graph for this function:| void Slic3r::SVG::draw_outline | ( | const Surface & | surface, |
| std::string | stroke_outer = "black", |
||
| std::string | stroke_holes = "blue", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
References draw_outline(), and Slic3r::Surface::expolygon.
Here is the call graph for this function:| void Slic3r::SVG::draw_outline | ( | const Surfaces & | surfaces, |
| std::string | stroke_outer = "black", |
||
| std::string | stroke_holes = "blue", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
References draw_outline().
Here is the call graph for this function:| void Slic3r::SVG::draw_outline | ( | const SurfacesPtr & | surfaces, |
| std::string | stroke_outer = "black", |
||
| std::string | stroke_holes = "blue", |
||
| coordf_t | stroke_width = 0 |
||
| ) |
References draw_outline().
Here is the call graph for this function:| void Slic3r::SVG::draw_text | ( | const Point & | pt, |
| const char * | text, | ||
| const char * | color, | ||
| coordf_t | font_size = 20.f |
||
| ) |
References f, origin, to_svg_x(), and to_svg_y().
Referenced by Slic3r::SurfaceCollection::export_to_svg(), and priv::select_patches().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
References Close(), draw(), draw_outline(), and path().
Referenced by Slic3r::detect_overhangs(), Slic3r::elephant_foot_compensation(), export_expolygons(), export_expolygons(), export_expolygons(), export_expolygons(), Slic3r::SupportGridPattern::extract_support(), Slic3r::PrintObjectSupportMaterial::generate(), Slic3r::FFFTreeSupport::generate_overhangs(), Slic3r::FFFTreeSupport::TreeModelVolumes::precalculate(), and Slic3r::FFFSupport::remove_bridges_from_contacts().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
References export_expolygons(), Slic3r::get_extents(), and path().
Here is the call graph for this function:
|
static |
References Close(), draw(), draw_legend(), draw_outline(), Slic3r::get_extents(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::merge(), Slic3r::BoundingBoxBase< PointType, APointsType >::min, path(), scale_, and Slic3r::to_points().
Here is the call graph for this function:
|
inlinestatic |
|
inlinestatic |
References export_expolygons(), Slic3r::get_extents(), and path().
Here is the call graph for this function:
|
inlinestatic |
|
private |
References origin, path(), scale(), to_svg_x(), and to_svg_y().
Here is the call graph for this function:
|
private |
References origin, Slic3r::MultiPoint::points, to_svg_x(), and to_svg_y().
Referenced by draw(), draw(), draw(), draw(), and draw_outline().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Slic3r::SVG::open | ( | const char * | filename | ) |
Referenced by SVG(), SVG(), SVG(), SVG(), open(), and open().
Here is the caller graph for this function:| bool Slic3r::SVG::open | ( | const char * | filename, |
| const BoundingBox & | bbox, | ||
| const coord_t | bbox_offset = scale_(1.), |
||
| bool | flipY = true |
||
| ) |
References f, filename, flipY, height, Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, origin, and to_svg_coord().
Here is the call graph for this function:
|
inline |
|
private |
References arrows, f, fill, stroke, and to_svg_coord().
Referenced by draw(), draw(), draw(), draw(), draw_outline(), export_expolygons(), export_expolygons(), export_expolygons(), export_expolygons(), export_expolygons(), export_expolygons(), and get_path_d().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate | ||||||||||||||
Referenced by draw(), draw(), draw(), open(), path(), to_svg_x(), and to_svg_y().
Here is the caller graph for this function:
|
inlinestaticprivate | ||||||||||||||
References to_svg_coord().
Referenced by draw(), draw(), draw(), draw_legend(), draw_text(), get_path_d(), and get_path_d().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate | ||||||||||||||
References flipY, and to_svg_coord().
Referenced by draw(), draw(), draw(), draw_legend(), draw_text(), get_path_d(), and get_path_d().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Referenced by ~SVG(), Close(), draw(), draw(), draw(), draw_legend(), draw_text(), open(), open(), and path().
|
private |
| std::string Slic3r::SVG::fill |
| bool Slic3r::SVG::flipY |
Referenced by SVG(), SVG(), open(), open(), and to_svg_y().
| float Slic3r::SVG::height |
Referenced by open().
| Point Slic3r::SVG::origin |
Referenced by draw(), draw(), draw(), draw_legend(), draw_text(), get_path_d(), get_path_d(), and open().
| std::string Slic3r::SVG::stroke |