Horizon
Loading...
Searching...
No Matches
horizon::Polygon Class Reference

Polygon used in Padstack, Package and Board for specifying filled Regions. More...

#include <polygon.hpp>

Classes

class  Vertex

Public Member Functions

 Polygon (const UUID &uu, const json &j)
 Polygon (const UUID &uu)
UUID get_uuid () const
Vertexappend_vertex (const Coordi &pos=Coordi())
std::pair< unsigned int, unsigned int > get_vertices_for_edge (unsigned int edge)
const Vertexget_vertex (int edge) const
Vertexget_vertex (int edge)
Polygon remove_arcs (unsigned int precision=16) const
bool has_arcs () const
bool is_valid () const
std::pair< Coordi, Coordi > get_bbox () const
bool is_cw () const
bool is_ccw () const
void reverse ()
bool is_rect () const
json serialize () const

Public Attributes

UUID uuid
std::vector< Vertexvertices
int layer = 0
std::string parameter_class
uuid_ptr< PolygonUsageusage

Detailed Description

Polygon used in Padstack, Package and Board for specifying filled Regions.

Edges may either be straight lines or arcs.

Member Function Documentation

◆ has_arcs()

bool horizon::Polygon::has_arcs ( ) const
Returns
true if any edge is an arc

◆ remove_arcs()

Polygon horizon::Polygon::remove_arcs ( unsigned int precision = 16) const
Parameters
precisionhow many line segments per arc
Returns
a new Polygon that has the arcs replaced by straight line segments

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