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

A segment and winding information for an IDF outline. More...

#include <idf_common.h>

Public Member Functions

 IDF_OUTLINE ()
 
 ~IDF_OUTLINE ()
 
bool IsCCW ()
 
bool IsCircle ()
 
void Clear ()
 Clear the internal list of outline segments.
 
size_t size ()
 
bool empty ()
 
IDF_SEGMENT *& front ()
 
IDF_SEGMENT *& back ()
 
std::list< IDF_SEGMENT * >::iterator begin ()
 
std::list< IDF_SEGMENT * >::iterator end ()
 
bool push (IDF_SEGMENT *item)
 Add a segment to the internal segment list.
 

Private Attributes

double dir
 
std::list< IDF_SEGMENT * > outline
 

Detailed Description

A segment and winding information for an IDF outline.

Definition at line 550 of file idf_common.h.

Constructor & Destructor Documentation

◆ IDF_OUTLINE()

IDF_OUTLINE::IDF_OUTLINE ( )
inline

Definition at line 553 of file idf_common.h.

References dir.

◆ ~IDF_OUTLINE()

IDF_OUTLINE::~IDF_OUTLINE ( )
inline

Definition at line 554 of file idf_common.h.

References Clear().

Member Function Documentation

◆ back()

IDF_SEGMENT *& IDF_OUTLINE::back ( )
inline
Returns
the back() iterator of the internal segment list.

Definition at line 607 of file idf_common.h.

References outline.

Referenced by IDF3::GetOutline(), and BOARD_OUTLINE::writeOutline().

◆ begin()

std::list< IDF_SEGMENT * >::iterator IDF_OUTLINE::begin ( )
inline
Returns
the begin() iterator of the internal segment list.

Definition at line 615 of file idf_common.h.

References outline.

Referenced by MatchCompOutline(), and BOARD_OUTLINE::writeOutline().

◆ Clear()

void IDF_OUTLINE::Clear ( )
inline

Clear the internal list of outline segments.

Definition at line 569 of file idf_common.h.

References dir, and outline.

Referenced by IDF3::GetOutline(), idf_export_outline(), and ~IDF_OUTLINE().

◆ empty()

bool IDF_OUTLINE::empty ( )
inline
Returns
true if the internal segment list is empty.

Definition at line 591 of file idf_common.h.

References outline.

Referenced by IDF_EXPORTER::createOutlineFromExtrudedBody(), IDF_EXPORTER::exportFootprint(), and idf_export_outline().

◆ end()

std::list< IDF_SEGMENT * >::iterator IDF_OUTLINE::end ( )
inline
Returns
the end() iterator of the internal segment list.

Definition at line 623 of file idf_common.h.

References outline.

Referenced by MatchCompOutline(), and BOARD_OUTLINE::writeOutline().

◆ front()

IDF_SEGMENT *& IDF_OUTLINE::front ( )
inline
Returns
the front() iterator of the internal segment list.

Definition at line 599 of file idf_common.h.

References outline.

Referenced by IDF3::GetOutline(), BOARD_OUTLINE::readOutlines(), and BOARD_OUTLINE::writeOutline().

◆ IsCCW()

bool IDF_OUTLINE::IsCCW ( )
Returns
true if the current list of points represents a counterclockwise winding.

Definition at line 1185 of file idf_common.cpp.

References std::abs(), dir, MIN_ANG, and outline.

Referenced by BOARD_OUTLINE::readOutlines(), and BOARD_OUTLINE::writeOutline().

◆ IsCircle()

bool IDF_OUTLINE::IsCircle ( )
Returns
true if this outline is a circle.

Definition at line 1267 of file idf_common.cpp.

References outline.

Referenced by BOARD_OUTLINE::readOutlines().

◆ push()

bool IDF_OUTLINE::push ( IDF_SEGMENT * item)

Add a segment to the internal segment list.

Segments must be added in order so that startPoint[N] == endPoint[N - 1].

Parameters
itemis a pointer to the segment to add to the outline.
Returns
true if the segment was added, otherwise false (outline restrictions have been violated).

Definition at line 1276 of file idf_common.cpp.

References dir, ERROR_IDF, IDF_SEGMENT::IsCircle(), M_PI, IDF_SEGMENT::MatchesStart(), MIN_ANG, outline, radius, IDF_SEGMENT::startPoint, IDF_POINT::x, and IDF_POINT::y.

Referenced by IDF3_BOARD::AddSlot(), IDF3_COMP_OUTLINE::CreateDefaultOutline(), IDF3::GetOutline(), idf_export_outline(), and BOARD_OUTLINE::readOutlines().

◆ size()

size_t IDF_OUTLINE::size ( )
inline
Returns
the size of the internal segment list.

Definition at line 583 of file idf_common.h.

References outline.

Referenced by IDF3::GetOutline(), MatchCompOutline(), BOARD_OUTLINE::readOutlines(), and BOARD_OUTLINE::writeOutline().

Member Data Documentation

◆ dir

double IDF_OUTLINE::dir
private

Definition at line 640 of file idf_common.h.

Referenced by Clear(), IDF_OUTLINE(), IsCCW(), and push().

◆ outline

std::list<IDF_SEGMENT*> IDF_OUTLINE::outline
private

Definition at line 641 of file idf_common.h.

Referenced by back(), begin(), Clear(), empty(), end(), front(), IsCCW(), IsCircle(), push(), and size().


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