libslic3r
Library for generating gcode from 3d models
Public Member Functions | Static Public Member Functions | List of all members
Slic3r::Polygon Class Reference

#include <Polygon.hpp>

Inheritance diagram for Slic3r::Polygon:
Slic3r::MultiPoint

Public Member Functions

 operator Polygons () const
 
 operator Polyline () const
 
Pointoperator[] (Points::size_type idx)
 
const Pointoperator[] (Points::size_type idx) const
 
 Polygon ()
 
 Polygon (const Points &points)
 
Point last_point () const
 
virtual Lines lines () const
 
Polyline split_at_vertex (const Point &point) const
 
Polyline split_at_index (int index) const
 
Polyline split_at_first_point () const
 
Points equally_spaced_points (double distance) const
 
double area () const
 
bool is_counter_clockwise () const
 
bool is_clockwise () const
 
bool make_counter_clockwise ()
 
bool make_clockwise ()
 
bool is_valid () const
 
bool contains (const Point &point) const
 
void douglas_peucker (double tolerance)
 
void remove_vertical_collinear_points (coord_t tolerance)
 
Polygons simplify (double tolerance) const
 
void simplify (double tolerance, Polygons &polygons) const
 
void triangulate_convex (Polygons *polygons) const
 
Point centroid () const
 
std::string wkt () const
 
Points concave_points (double angle=PI) const
 
Points convex_points (double angle=PI) const
 
- Public Member Functions inherited from Slic3r::MultiPoint
 operator Points () const
 
void scale (double factor)
 
void translate (double x, double y)
 
void translate (const Point &vector)
 
void rotate (double angle)
 
void rotate (double angle, const Point &center)
 
void reverse ()
 
Point first_point () const
 
double length () const
 
bool is_valid () const
 
int find_point (const Point &point) const
 
bool has_boundary_point (const Point &point) const
 
BoundingBox bounding_box () const
 
bool has_duplicate_points () const
 
bool remove_duplicate_points ()
 
void append (const Point &point)
 
void append (const Points &points)
 
void append (const Points::const_iterator &begin, const Points::const_iterator &end)
 
bool intersection (const Line &line, Point *intersection) const
 
std::string dump_perl () const
 

Static Public Member Functions

static Polygon new_scale (const Pointfs &p)
 
- Static Public Member Functions inherited from Slic3r::MultiPoint
static Points _douglas_peucker (const Points &points, const double tolerance)
 

Additional Inherited Members

- Public Attributes inherited from Slic3r::MultiPoint
Points points
 
- Protected Member Functions inherited from Slic3r::MultiPoint
 MultiPoint ()
 
 MultiPoint (const Points &_points)
 
 ~MultiPoint ()=default
 

Constructor & Destructor Documentation

◆ Polygon() [1/2]

Slic3r::Polygon::Polygon ( )
inline

◆ Polygon() [2/2]

Slic3r::Polygon::Polygon ( const Points points)
inlineexplicit

Member Function Documentation

◆ area()

double Slic3r::Polygon::area ( ) const

◆ centroid()

Point Slic3r::Polygon::centroid ( ) const

◆ concave_points()

Points Slic3r::Polygon::concave_points ( double  angle = PI) const

◆ contains()

bool Slic3r::Polygon::contains ( const Point point) const

◆ convex_points()

Points Slic3r::Polygon::convex_points ( double  angle = PI) const

◆ douglas_peucker()

void Slic3r::Polygon::douglas_peucker ( double  tolerance)

◆ equally_spaced_points()

Points Slic3r::Polygon::equally_spaced_points ( double  distance) const

◆ is_clockwise()

bool Slic3r::Polygon::is_clockwise ( ) const

◆ is_counter_clockwise()

bool Slic3r::Polygon::is_counter_clockwise ( ) const

◆ is_valid()

bool Slic3r::Polygon::is_valid ( ) const

◆ last_point()

Point Slic3r::Polygon::last_point ( ) const
virtual

Implements Slic3r::MultiPoint.

◆ lines()

Lines Slic3r::Polygon::lines ( ) const
virtual

Implements Slic3r::MultiPoint.

◆ make_clockwise()

bool Slic3r::Polygon::make_clockwise ( )

◆ make_counter_clockwise()

bool Slic3r::Polygon::make_counter_clockwise ( )

◆ new_scale()

Polygon Slic3r::Polygon::new_scale ( const Pointfs p)
static

◆ operator Polygons()

Slic3r::Polygon::operator Polygons ( ) const

◆ operator Polyline()

Slic3r::Polygon::operator Polyline ( ) const

◆ operator[]() [1/2]

Point & Slic3r::Polygon::operator[] ( Points::size_type  idx)

◆ operator[]() [2/2]

const Point & Slic3r::Polygon::operator[] ( Points::size_type  idx) const

◆ remove_vertical_collinear_points()

void Slic3r::Polygon::remove_vertical_collinear_points ( coord_t  tolerance)

◆ simplify() [1/2]

Polygons Slic3r::Polygon::simplify ( double  tolerance) const

◆ simplify() [2/2]

void Slic3r::Polygon::simplify ( double  tolerance,
Polygons polygons 
) const

◆ split_at_first_point()

Polyline Slic3r::Polygon::split_at_first_point ( ) const

◆ split_at_index()

Polyline Slic3r::Polygon::split_at_index ( int  index) const

◆ split_at_vertex()

Polyline Slic3r::Polygon::split_at_vertex ( const Point point) const

◆ triangulate_convex()

void Slic3r::Polygon::triangulate_convex ( Polygons polygons) const

◆ wkt()

std::string Slic3r::Polygon::wkt ( ) const

The documentation for this class was generated from the following files: