Horizon
Classes | Public Member Functions | Public Attributes | List of all members
horizon::Polygon Class Reference

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

#include <polygon.hpp>

Inheritance diagram for horizon::Polygon:
horizon::UUIDProvider

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)
 
Polygon remove_arcs (unsigned int precision=16) const
 
bool has_arcs () const
 
bool is_valid () const
 
json serialize () const
 

Public Attributes

UUID uuid
 
std::deque< Vertexvertices
 
int layer = 0
 
std::string parameter_class
 
bool temp = false
 
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: