59 std::optional<ODB_AUX_LAYER_TYPE> aAuxType,
60 std::optional<DRILL_SPAN> aDrillSpan = std::nullopt ) :
122 wxString sym =
"donut_r" + aOuterDim +
ODB_DIM_X + aInnerDim;
128 wxString sym =
"rect" + aWidth +
ODB_DIM_X + aHeight;
134 wxString sym =
"oval" + aWidth +
ODB_DIM_X + aHeight;
139 const wxString& aRadius )
146 const wxString& aLineWidth,
const wxString& aRadius )
148 wxString sym =
"donut_rc" + aOuterWidth +
ODB_DIM_X + aOuterHeight +
ODB_DIM_X + aLineWidth
154 const wxString& aRadius,
int aPositions )
175 uint32_t
GetSymbolIndex( std::map<wxString, uint32_t>& aSymMap,
const wxString& aKey )
177 if( aSymMap.count( aKey ) )
179 return aSymMap.at( aKey );
185 aSymMap.emplace( aKey,
index );
206 template <
typename T,
typename... Args>
209 auto feature = std::make_unique<T>(
m_featuresList.size(), std::forward<Args>( args )... );
214 template <
typename F>
220 aFunc( **it,
index );
265 ODB_LINE( uint32_t aIndex,
const std::pair<wxString, wxString>& aStart,
266 const std::pair<wxString, wxString>& aEnd, uint32_t aSym ) :
280 std::pair<wxString, wxString>
m_end;
291 ODB_ARC( uint32_t aIndex,
const std::pair<wxString, wxString>& aStart,
292 const std::pair<wxString, wxString>& aEnd,
293 const std::pair<wxString, wxString>& aCenter, uint32_t aSym,
308 std::pair<wxString, wxString>
m_end;
318 double aResize = 1.0 ) :
ATTR_RECORD_WRITER()=default
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
void AddPadShape(const PAD &aPad, PCB_LAYER_ID aLayer)
uint32_t AddRoundRectDonutSymbol(const wxString &aOuterWidth, const wxString &aOuterHeight, const wxString &aLineWidth, const wxString &aRadius)
std::map< wxString, uint32_t > m_circleSymMap
uint32_t AddRectSymbol(const wxString &aWidth, const wxString &aHeight)
void AddRoutSlot(const PAD &aPad, int aChain)
void AddPad(PCB_LAYER_ID aLayer, PAD *pad)
std::map< wxString, uint32_t > m_chamRectSymMap
size_t FeatureCount() const
void addPostMachiningAttributes(ODB_FEATURE &aFeature, const DRILL_OPERATION &aOperation)
void AddVia(const PCB_VIA *aVia, PCB_LAYER_ID aLayer)
void AddDimension(PCB_LAYER_ID aLayer, PCB_DIMENSION_BASE *dimension)
std::map< wxString, uint32_t > m_rectSymMap
void tagRoutFeatures(size_t aFirst, int aChain, bool aPlated)
PCB_IO_ODBPP * GetODBPlugin()
void AddShape(PCB_LAYER_ID aLayer, PCB_SHAPE *shape)
void AddFeatureLine(const VECTOR2I &aStart, const VECTOR2I &aEnd, uint64_t aWidth)
void AddViaProtection(const PCB_VIA *aVia, bool drill, PCB_LAYER_ID aLayer)
FEATURES_MANAGER(BOARD *aBoard, PCB_IO_ODBPP *aPlugin, const wxString &aLayerName, ODB_LAYER_ROLE aRole, std::optional< ODB_AUX_LAYER_TYPE > aAuxType, std::optional< DRILL_SPAN > aDrillSpan=std::nullopt)
void AddFeatureArc(const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCenter, uint64_t aWidth, ODB_DIRECTION aDirection)
uint32_t GetSymbolIndex(std::map< wxString, uint32_t > &aSymMap, const wxString &aKey)
std::map< uint32_t, wxString > m_allSymMap
bool AddPolygon(const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType, int aWidth, LINE_STYLE aDashType)
void GenerateFeatureFile(std::ostream &ost) const
void addViaDrillAttributes(ODB_FEATURE &aFeature, const PCB_VIA *aVia)
std::map< wxString, uint32_t > m_roundRectDonutSymMap
std::map< wxString, uint32_t > m_ovalSymMap
std::map< wxString, uint32_t > m_roundDonutSymMap
void AddTrack(PCB_LAYER_ID aLayer, PCB_TRACK *track)
void AddZone(PCB_LAYER_ID aLayer, ZONE *zone)
std::map< wxString, uint32_t > m_roundRectSymMap
bool AddViaDrillHole(const PCB_VIA *aVia, PCB_LAYER_ID aLayer)
void AddText(PCB_LAYER_ID aLayer, BOARD_ITEM *item, RESOLUTION_CONTEXT aContext)
std::optional< DRILL_SPAN > m_drillSpan
std::optional< ODB_AUX_LAYER_TYPE > m_auxType
void InitFeatureList(PCB_LAYER_ID aLayer, const std::vector< BOARD_ITEM * > &aItems)
uint32_t AddRoundRectSymbol(const wxString &aWidth, const wxString &aHeight, const wxString &aRadius)
void AddPadCircle(const VECTOR2I &aCenter, uint64_t aDiameter)
void forEachNewFeature(size_t aFirst, F &&aFunc)
void AddRoutContour(const SHAPE_LINE_CHAIN &aContour, int aChain, bool aPlated)
bool AddFeatureSurface(const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType=FILL_T::FILLED_SHAPE)
uint32_t AddOvalSymbol(const wxString &aWidth, const wxString &aHeight)
void GenerateProfileFeatures(std::ostream &ost) const
std::list< std::unique_ptr< ODB_FEATURE > > m_featuresList
void AddFeature(Args &&... args)
bool AddPolygonCutouts(const SHAPE_POLY_SET::POLYGON &aPolygon)
uint32_t AddCircleSymbol(const wxString &aDiameter)
uint32_t AddChamferRectSymbol(const wxString &aWidth, const wxString &aHeight, const wxString &aRadius, int aPositions)
std::map< wxString, uint32_t > m_padSymMap
uint32_t AddRoundDonutSymbol(const wxString &aOuterDim, const wxString &aInnerDim)
bool AddContour(const SHAPE_POLY_SET &aPolySet, int aOutline=0, FILL_T aFillType=FILL_T::FILLED_SHAPE)
std::pair< wxString, wxString > m_end
std::pair< wxString, wxString > m_start
ODB_ARC(uint32_t aIndex, const std::pair< wxString, wxString > &aStart, const std::pair< wxString, wxString > &aEnd, const std::pair< wxString, wxString > &aCenter, uint32_t aSym, ODB_DIRECTION aDirection)
virtual FEATURE_TYPE GetFeatureType() override
virtual void WriteRecordContent(std::ostream &ost, const ODB_FORMAT &aFormat) override
ODB_DIRECTION m_direction
std::pair< wxString, wxString > m_center
virtual ~ODB_FEATURE()=default
virtual FEATURE_TYPE GetFeatureType()=0
virtual void WriteRecordContent(std::ostream &ost, const ODB_FORMAT &aFormat)=0
virtual void WriteFeatures(std::ostream &ost, const ODB_FORMAT &aFormat)
ODB_FEATURE(uint32_t aIndex)
virtual void WriteRecordContent(std::ostream &ost, const ODB_FORMAT &aFormat) override
ODB_LINE(uint32_t aIndex, const std::pair< wxString, wxString > &aStart, const std::pair< wxString, wxString > &aEnd, uint32_t aSym)
virtual FEATURE_TYPE GetFeatureType() override
std::pair< wxString, wxString > m_start
std::pair< wxString, wxString > m_end
ODB_PAD(uint32_t aIndex, const std::pair< wxString, wxString > &aCenter, uint32_t aSym, EDA_ANGLE aAngle=ANGLE_0, double aResize=1.0)
virtual FEATURE_TYPE GetFeatureType() override
virtual void WriteRecordContent(std::ostream &ost, const ODB_FORMAT &aFormat) override
std::pair< wxString, wxString > m_center
std::vector< std::vector< SURFACE_LINE > > m_polygons
void AddContour(const SHAPE_LINE_CHAIN &aChain, bool aHole)
void WriteData(std::ostream &ost, const ODB_FORMAT &aFormat) const
ODB_SURFACE_DATA(const SHAPE_POLY_SET::POLYGON &aPolygon)
void AddPolygonHoles(const SHAPE_POLY_SET::POLYGON &aPolygon)
std::unique_ptr< ODB_SURFACE_DATA > m_surfaces
virtual FEATURE_TYPE GetFeatureType() override
virtual ~ODB_SURFACE()=default
virtual void WriteRecordContent(std::ostream &ost, const ODB_FORMAT &aFormat) override
ODB_SURFACE(uint32_t aIndex, const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType=FILL_T::FILLED_SHAPE)
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
std::vector< SHAPE_LINE_CHAIN > POLYGON
represents a single polygon outline with holes.
Handle a list of polygons defining a copper zone.
@ RECT_CHAMFER_BOTTOM_RIGHT
@ RECT_CHAMFER_BOTTOM_LEFT
static constexpr EDA_ANGLE ANGLE_0
@ FILLED_SHAPE
Fill with object color.
PCB_LAYER_ID
A quick note on layer IDs:
LINE_STYLE
Dashed line types.
One machining action, which is also one NC hit and one tool assignment.
ODB_DIRECTION m_direction
SURFACE_LINE(const VECTOR2I &aEnd)
SURFACE_LINE(const VECTOR2I &aEnd, const VECTOR2I &aCenter, ODB_DIRECTION aDirection)
VECTOR2< int32_t > VECTOR2I