#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/SVG.hpp>
Classes | |
| struct | ExPolygonAttributes |
Public Member Functions | |
| SVG ()=default | |
| 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) |
| bool | is_opened () |
| 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 Points &polygon, double scale, std::string fill="grey", coordf_t stroke_width=0) |
| void | draw (const VecOfPoints &polygons, double scale, std::string fill="grey", coordf_t stroke_width=0) |
| void | draw_text (const Point &pt, const char *text, const char *color, int font_size=20) |
| void | draw_legend (const Point &pt, const char *text, const char *color) |
| void | draw_grid (const BoundingBox &bbox, const std::string &stroke="black", coordf_t stroke_width=scale_(0.05), coordf_t step=scale_(1.0)) |
| void | add_comment (const std::string comment) |
| 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 Points &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 |
|
default |
Referenced by export_expolygons(), and export_expolygons().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void Slic3r::SVG::add_comment | ( | const std::string | comment | ) |
References f.
Referenced by Slic3r::GUI::ArrangeJob::prepare().
| void Slic3r::SVG::Close | ( | ) |
References f.
Referenced by ~SVG(), Slic3r::Feature::FuzzySkin::apply_fuzzy_skin(), Slic3r::Feature::FuzzySkin::apply_fuzzy_skin(), Slic3r::contour_distance(), Slic3r::sla::anonymous_namespace{Pad.cpp}::create_pad_geometry(), Slic3r::PrintObject::discover_vertical_shells(), Slic3r::ArcFitter::do_arc_fitting(), Slic3r::Algorithm::do_split_line(), Slic3r::dump_voronoi_to_svg(), export_expolygons(), export_expolygons(), Slic3r::export_intersections_to_svg(), Slic3r::Layer::export_region_fill_surfaces_to_svg(), Slic3r::LayerRegion::export_region_fill_surfaces_to_svg(), Slic3r::Layer::export_region_slices_to_svg(), Slic3r::LayerRegion::export_region_slices_to_svg(), Slic3r::export_to_svg(), Slic3r::SurfaceCollection::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::modulate_extrusion_by_overlapping_layers(), Slic3r::PerimeterGenerator::process_classic(), and Slic3r::slice_mesh().
| 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().
| 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::TreeSupport::TreeSupport(), Slic3r::MultiPoint3::_douglas_peucker(), Slic3r::MultiPoint::_douglas_peucker(), Slic3r::Feature::FuzzySkin::apply_fuzzy_skin(), Slic3r::Feature::FuzzySkin::apply_fuzzy_skin(), Slic3r::ExPolygon::contains(), Slic3r::contour_distance(), Slic3r::contour_distance2(), anonymous_namespace{EmbossJob.cpp}::create_mesh_per_glyph(), Slic3r::sla::anonymous_namespace{Pad.cpp}::create_pad_geometry(), Slic3r::detect_bridge_directions(), Slic3r::PrintObject::discover_vertical_shells(), Slic3r::ArcFitter::do_arc_fitting(), Slic3r::Algorithm::do_split_line(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw(), draw_grid(), Slic3r::FillLightning::Node::draw_tree(), Slic3r::draw_two_overhangs_to_svg(), Slic3r::dump_voronoi_to_svg(), export_expolygons(), export_expolygons(), Slic3r::export_intersections_to_svg(), Slic3r::Layer::export_region_fill_surfaces_to_svg(), Slic3r::LayerRegion::export_region_fill_surfaces_to_svg(), Slic3r::Layer::export_region_slices_to_svg(), Slic3r::LayerRegion::export_region_slices_to_svg(), Slic3r::export_to_svg(), Slic3r::SurfaceCollection::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::modulate_extrusion_by_overlapping_layers(), Slic3r::ExPolygon::overlaps(), Slic3r::PerimeterGenerator::process_classic(), priv::select_patches(), Slic3r::slice_mesh(), Slic3r::slice_region_by_vertical_lines(), Slic3r::Arachne::WallToolPaths::stitchToolPaths(), Slic3r::PrintObjectSupportMaterial::top_contact_layers(), and Slic3r::sla::SupportPointGenerator::uniformly_cover().
References f, fill, origin, to_svg_coord(), to_svg_x(), and to_svg_y().
| void Slic3r::SVG::draw | ( | const Points & | polygon, |
| double | scale, | ||
| std::string | fill = "grey", | ||
| coordf_t | stroke_width = 0 ) |
References get_path_d(), path(), scale(), and stroke.
| void Slic3r::SVG::draw | ( | const Polygon & | polygon, |
| std::string | fill = "grey" ) |
| void Slic3r::SVG::draw | ( | const Polygons & | polygons, |
| std::string | fill = "grey" ) |
| 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(), stroke, to_svg_coord(), to_svg_x(), and to_svg_y().
| void Slic3r::SVG::draw | ( | const ThickLines & | thicklines, |
| const std::string & | fill = "lime", | ||
| const std::string & | stroke = "black", | ||
| coordf_t | stroke_width = 0 ) |
| void Slic3r::SVG::draw | ( | const ThickPolylines & | polylines, |
| const std::string & | stroke = "black", | ||
| coordf_t | stroke_width = 0 ) |
| void Slic3r::SVG::draw | ( | const ThickPolylines & | thickpolylines, |
| const std::string & | fill, | ||
| const std::string & | stroke, | ||
| coordf_t | stroke_width ) |
| void Slic3r::SVG::draw | ( | const VecOfPoints & | polygons, |
| double | scale, | ||
| std::string | fill = "grey", | ||
| coordf_t | stroke_width = 0 ) |
| void Slic3r::SVG::draw_grid | ( | const BoundingBox & | bbox, |
| const std::string & | stroke = "black", | ||
| coordf_t | stroke_width = scale_(0.05), | ||
| coordf_t | step = scale_(1.0) ) |
References draw(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, Slic3r::BoundingBoxBase< PointType, APointsType >::size(), and stroke.
| void Slic3r::SVG::draw_legend | ( | const Point & | pt, |
| const char * | text, | ||
| const char * | color ) |
References f, origin, to_svg_x(), and to_svg_y().
Referenced by export_expolygons(), and Slic3r::export_surface_type_legend_to_svg().
| 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::Feature::FuzzySkin::apply_fuzzy_skin(), Slic3r::Feature::FuzzySkin::apply_fuzzy_skin(), Slic3r::GUI::ArrangeJob::check_unprintable(), Slic3r::Arachne::SkeletalTrapezoidation::constructFromPolygons(), Slic3r::ExPolygon::contains(), Slic3r::contour_distance(), Slic3r::contour_distance2(), Slic3r::PrintObject::discover_vertical_shells(), Slic3r::Algorithm::do_split_line(), 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::ExPolygon::overlaps(), Slic3r::GUI::ArrangeJob::prepare(), Slic3r::slice_mesh(), Slic3r::slice_region_by_vertical_lines(), and Slic3r::Arachne::WallToolPaths::stitchToolPaths().
| 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().
| 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.
| 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.
| 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().
| 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().
| void Slic3r::SVG::draw_text | ( | const Point & | pt, |
| const char * | text, | ||
| const char * | color, | ||
| int | font_size = 20 ) |
References f, origin, to_svg_x(), and to_svg_y().
Referenced by anonymous_namespace{EmbossJob.cpp}::create_mesh_per_glyph(), Slic3r::SurfaceCollection::export_to_svg(), Slic3r::GUI::ArrangeJob::prepare(), and priv::select_patches().
|
static |
References SVG(), Close(), draw(), draw_outline(), and path().
Referenced by Slic3r::detect_bottom_contacts(), Slic3r::detect_contacts(), Slic3r::PrintObject::discover_vertical_shells(), Slic3r::elephant_foot_compensation(), export_expolygons(), export_expolygons(), export_expolygons(), export_expolygons(), Slic3r::SupportGridPattern::extract_support(), Slic3r::fill_contact_layer(), Slic3r::PrintObjectSupportMaterial::generate(), Slic3r::TreeSupport3D::TreeModelVolumes::precalculate(), Slic3r::project_support_to_grid(), Slic3r::SupportMaterialInternal::remove_bridges_from_contacts(), Slic3r::segmentation_top_and_bottom_layers(), and Slic3r::slice_mesh().
|
inlinestatic |
References export_expolygons(), Slic3r::get_extents(), and path().
|
static |
References SVG(), 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().
|
inlinestatic |
References export_expolygons(), and path().
|
inlinestatic |
References export_expolygons(), Slic3r::get_extents(), and path().
|
inlinestatic |
|
private |
References origin, Slic3r::MultiPoint::points, to_svg_x(), and to_svg_y().
Referenced by draw(), draw(), draw(), draw(), and draw_outline().
|
private |
References origin, path(), scale(), to_svg_x(), and to_svg_y().
|
inline |
References f.
Referenced by Slic3r::GUI::ArrangeJob::check_unprintable(), Slic3r::SupportGridPattern::extract_support(), Slic3r::GUI::ArrangeJob::prepare(), and Slic3r::PrintObjectSupportMaterial::top_contact_layers().
| bool Slic3r::SVG::open | ( | const char * | filename | ) |
References Slic3r::create_dir(), f, and filename.
Referenced by SVG(), SVG(), SVG(), SVG(), open(), and open().
| bool Slic3r::SVG::open | ( | const char * | filename, |
| const BoundingBox & | bbox, | ||
| const coord_t | bbox_offset = scale_(1.), | ||
| bool | flipY = true ) |
References Slic3r::create_dir(), f, filename, flipY, height, Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, origin, and to_svg_coord().
|
inline |
|
inline |
|
private |
References f, fill, 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().
|
inlinestaticprivate | |||||||||||||
References Slic3r::unscale().
Referenced by draw(), draw(), draw(), open(), path(), to_svg_x(), and to_svg_y().
|
inlinestaticprivate | |||||||||||||
References to_svg_coord().
Referenced by draw(), draw(), draw(), draw_legend(), draw_text(), get_path_d(), and get_path_d().
|
inlineprivate | |||||||||||||
References flipY, and to_svg_coord().
Referenced by draw(), draw(), draw(), draw_legend(), draw_text(), get_path_d(), and get_path_d().
|
private |
Referenced by ~SVG(), add_comment(), Close(), draw(), draw(), draw(), draw_legend(), draw_text(), is_opened(), open(), open(), and path().
|
private |
| std::string Slic3r::SVG::fill |
| float Slic3r::SVG::height |
Referenced by open().
| Point Slic3r::SVG::origin |
Referenced by SVG(), SVG(), draw(), draw(), draw(), draw_legend(), draw_text(), get_path_d(), get_path_d(), and open().
| std::string Slic3r::SVG::stroke |