|
KiCad PCB EDA Suite
|
#include <geometry/shape_poly_set.h>Go to the source code of this file.
Functions | |
| SHAPE_POLY_SET | ConvertGerberToPolySet (GERBER_FILE_IMAGE *aImage, int aTolerance=0) |
| Convert a GERBER_FILE_IMAGE to a merged SHAPE_POLY_SET. | |
| SHAPE_POLY_SET ConvertGerberToPolySet | ( | GERBER_FILE_IMAGE * | aImage, |
| int | aTolerance = 0 ) |
Convert a GERBER_FILE_IMAGE to a merged SHAPE_POLY_SET.
All draw items in the Gerber image are converted to polygons and merged using boolean union. This handles step-and-repeat expansion.
Note: This function may populate cached polygon data in the draw items.
| aImage | The Gerber file image to convert |
| aTolerance | Optional inflation tolerance in nm for comparison purposes |
Definition at line 27 of file gerber_to_polyset.cpp.
References SHAPE_POLY_SET::Append(), APT_RECT, ARC_LOW_DEF_MM, SHAPE_POLY_SET::BooleanSubtract(), SHAPE_POLY_SET::CHole(), D_CODE::ConvertShapeToPolygon(), SHAPE_POLY_SET::COutline(), SHAPE_LINE_CHAIN::CPoint(), ERROR_INSIDE, GBR_ARC, GBR_SEGMENT, gerbIUScale, GERBER_FILE_IMAGE::GetItems(), SHAPE_POLY_SET::HoleCount(), SHAPE_POLY_SET::Inflate(), D_CODE::m_ApertType, D_CODE::m_Polygon, SHAPE_POLY_SET::NewHole(), SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::OutlineCount(), SHAPE_LINE_CHAIN::PointCount(), ROUND_ALL_CORNERS, SHAPE_POLY_SET::Simplify(), and TransformOvalToPolygon().
Referenced by GERBER_FILE_IMAGE::CalculateCopperArea(), and GERBVIEW_JOBS_HANDLER::JobGerberDiff().