Public Member Functions | Protected Member Functions | List of all members
Layer Class Reference

Worker thread for a single layer's stipple processing. More...

#include <stipple.hpp>

Public Member Functions

void MakeLayer (int i)
 Insert the new stippled polygons into the PCB program using the published interface. More...
 

Protected Member Functions

double Angle2D (int X0, int Y0, int X1, int Y1)
 Return the angle between two points on a plane.
 
LayerTypePtr FindLayerByName (string Name)
 Loop through the layer names from the host program and find the one which matches the supplied name, or return NULL. More...
 
b_polygon MakeCircularOverlay (Coord x, Coord y, Coord Radius, int SegmentCount=24)
 Using a finite number of line segments, approximate a circle.
 
b_polygon MakeRectangularOverlay (Coord x0, Coord y0, Coord x1, Coord y1, Coord Thickness)
 Remove a square inset from a polygon.
 
b_polygon MakeRoundedRectangle (int x0, int y0, int x1, int y1, int Radius, int Smoothness)
 Make a rounded rectangle, using line segments to approximate the rounded corners. More...
 
b_polygon_set ReadTemplatePolygons (LayerTypePtr layer)
 Read and store all polygons on the template layer.
 
b_polygon_set LoadPCB (string LayerName, Coord Trace)
 Read all the keep-out information for the layer, which are all pins, pads, vias and lines. More...
 
vector< StippledPolygonCalculateStipples (LayerTypePtr layer, b_polygon_set Union, Coord Trace, Coord Pitch, int i)
 Form a minimum set of unions which cover all of the polygons from the template layer, and where each union is the largest island which can be formed. More...
 
void InsertToPCB (LayerTypePtr layer, vector< StippledPolygon > StippledPolygons)
 Once all of the new polygons have been calculated using Boost polygons, convert them to a PCB data structure. More...
 

Detailed Description

Worker thread for a single layer's stipple processing.

Member Function Documentation

vector< StippledPolygon > Layer::CalculateStipples ( LayerTypePtr  layer,
b_polygon_set  Union,
Coord  Trace,
Coord  Pitch,
int  i 
)
protected

Form a minimum set of unions which cover all of the polygons from the template layer, and where each union is the largest island which can be formed.

Thus, the result is a set of possibly one non-contiguous polygons, which will be the target area for polygon subdivision. Then hatch the union(s), shrinking the edges for a border and intersecting each inset with the assembled union to allow for any shape of bounding region. It is the intersection of each diamond inlay with its enclosing polygon union which accounts for the glacial run-time of this add-in.

LayerTypePtr Layer::FindLayerByName ( string  Name)
protected

Loop through the layer names from the host program and find the one which matches the supplied name, or return NULL.

void Layer::InsertToPCB ( LayerTypePtr  layer,
vector< StippledPolygon StippledPolygons 
)
protected

Once all of the new polygons have been calculated using Boost polygons, convert them to a PCB data structure.

b_polygon_set Layer::LoadPCB ( string  LayerName,
Coord  Trace 
)
protected

Read all the keep-out information for the layer, which are all pins, pads, vias and lines.

void Layer::MakeLayer ( int  i)

Insert the new stippled polygons into the PCB program using the published interface.

A Gnome Mutex is used since each layer runs in its own thread, and insertion could result in collisions.

b_polygon Layer::MakeRoundedRectangle ( int  x0,
int  y0,
int  x1,
int  y1,
int  Radius,
int  Smoothness 
)
protected

Make a rounded rectangle, using line segments to approximate the rounded corners.


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