KiCad PCB EDA Suite
Loading...
Searching...
No Matches
APER_MACRO_FREEPOLY Class Reference

A class to define an aperture macros based on a free polygon, i.e. More...

#include <gbr_plotter_apertures.h>

Public Member Functions

 APER_MACRO_FREEPOLY (const std::vector< VECTOR2I > &aPolygon, int aId)
 
bool IsSamePoly (const std::vector< VECTOR2I > &aPolygon) const
 
void Format (FILE *aOutput, double aIu2GbrMacroUnit)
 print the aperture macro definition to aOutput
 
int CornersCount () const
 

Public Attributes

std::vector< VECTOR2Im_Corners
 
int m_Id
 

Detailed Description

A class to define an aperture macros based on a free polygon, i.e.

using a primitive 4 to describe a free polygon with a rotation. the aperture macro has only one parameter: rotation and is defined on the fly for aGerber file

Definition at line 150 of file gbr_plotter_apertures.h.

Constructor & Destructor Documentation

◆ APER_MACRO_FREEPOLY()

APER_MACRO_FREEPOLY::APER_MACRO_FREEPOLY ( const std::vector< VECTOR2I > &  aPolygon,
int  aId 
)
inline

Definition at line 153 of file gbr_plotter_apertures.h.

References m_Corners, and m_Id.

Member Function Documentation

◆ CornersCount()

int APER_MACRO_FREEPOLY::CornersCount ( ) const
inline

Definition at line 174 of file gbr_plotter_apertures.h.

References m_Corners.

◆ Format()

void APER_MACRO_FREEPOLY::Format ( FILE *  aOutput,
double  aIu2GbrMacroUnit 
)

print the aperture macro definition to aOutput

Parameters
aOutputis the FILE to write
aIu2GbrMacroUnitis the scaling factor from coordinates value to the Gerber file macros units (always mm or inches)

Definition at line 2022 of file GERBER_plotter.cpp.

References AM_FREEPOLY_BASENAME, m_Corners, and m_Id.

◆ IsSamePoly()

bool APER_MACRO_FREEPOLY::IsSamePoly ( const std::vector< VECTOR2I > &  aPolygon) const
Returns
true if aPolygon is the same as this, i.e. if the aPolygon is the same as m_Corners
Parameters
aOtheris the candidate to compare

Definition at line 2016 of file GERBER_plotter.cpp.

References m_Corners, and polyCompare().

Member Data Documentation

◆ m_Corners

std::vector<VECTOR2I> APER_MACRO_FREEPOLY::m_Corners

Definition at line 176 of file gbr_plotter_apertures.h.

Referenced by APER_MACRO_FREEPOLY(), CornersCount(), Format(), and IsSamePoly().

◆ m_Id

int APER_MACRO_FREEPOLY::m_Id

Definition at line 177 of file gbr_plotter_apertures.h.

Referenced by APER_MACRO_FREEPOLY(), and Format().


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