KiCad PCB EDA Suite
Loading...
Searching...
No Matches
altium_pcb.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2019-2020 Thomas Pointhuber <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef ALTIUM_PCB_H
22#define ALTIUM_PCB_H
23
24#include <core/utf8.h>
25#include <embedded_files.h>
26#include <functional>
27#include <layer_ids.h>
28#include <map>
29#include <memory>
30#include <vector>
32
33
34#include <altium_parser_pcb.h>
35
36
85
86
87class BOARD;
88class BOARD_ITEM;
89class EDA_TEXT;
90class FP_SHAPE;
91class PCB_SHAPE;
92class PCB_TEXTBOX;
93class FOOTPRINT;
94class ZONE;
95class PCB_DIM_RADIAL;
97class NET_SETTINGS;
98
99namespace CFB
100{
101struct COMPOUND_FILE_ENTRY;
102} // namespace CFB
103
106
107// Structure for storing embedded model data
109{
110 wxString m_modelname;
113 std::vector<char> m_data;
114
115 // Constructor
116 ALTIUM_EMBEDDED_MODEL_DATA(const wxString& name, const VECTOR3D& rotation, double z_offset, std::vector<char>&& data)
117 : m_modelname(name), m_rotation(rotation), m_z_offset(z_offset), m_data(std::move(data)) {}
118};
119
127wxString AltiumUnnamedNetName( const BOARD& aBoard, int& aCounter );
128
129
141void ApplyAltiumNetclassRules( const std::map<ALTIUM_RULE_KIND, std::vector<ARULE6>>& aRulesByKind,
142 NET_SETTINGS& aNetSettings,
143 std::vector<const ARULE6*>* aUnresolved = nullptr );
144
145
146// type declaration required for a helper method
147class ALTIUM_PCB;
148typedef std::function<void( const ALTIUM_PCB_COMPOUND_FILE&, const CFB::COMPOUND_FILE_ENTRY* )>
150
152{
154
155public:
156 explicit ALTIUM_PCB( BOARD* aBoard, PROGRESS_REPORTER* aProgressReporter,
157 LAYER_MAPPING_HANDLER& aLayerMappingHandler,
158 REPORTER* aReporter = nullptr,
159 const wxString& aLibrary = wxEmptyString,
160 const wxString& aFootprintName = wxEmptyString);
161 ~ALTIUM_PCB();
162
163 void Parse( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
164 const std::map<ALTIUM_PCB_DIR, std::string>& aFileMapping,
165 const std::map<std::string, UTF8>* aProperties = nullptr );
166
167 std::unique_ptr<FOOTPRINT> ParseFootprint( ALTIUM_PCB_COMPOUND_FILE& altiumLibFile,
168 const wxString& aFootprintName );
169
170private:
171 void checkpoint();
172
173 PCB_LAYER_ID GetKicadLayer( ALTIUM_LAYER aAltiumLayer ) const;
174 std::vector<PCB_LAYER_ID> GetKicadLayersToIterate( ALTIUM_LAYER aAltiumLayer ) const;
175 int GetNetCode( uint16_t aId ) const;
176 const ARULE6* GetRule( ALTIUM_RULE_KIND aKind, const wxString& aName ) const;
177 const ARULE6* GetRuleDefault( ALTIUM_RULE_KIND aKind ) const;
178 const ARULE6* GetRuleForPolygon( ALTIUM_RULE_KIND aKind ) const;
179
180 void ParseFileHeader( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
181 const CFB::COMPOUND_FILE_ENTRY* aEntry );
182
183 // Text Format
184 void ParseBoard6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
185 const CFB::COMPOUND_FILE_ENTRY* aEntry );
186 void ParseClasses6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
187 const CFB::COMPOUND_FILE_ENTRY* aEntry );
188 void ParseComponents6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
189 const CFB::COMPOUND_FILE_ENTRY* aEntry );
190 void ParseDimensions6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
191 const CFB::COMPOUND_FILE_ENTRY* aEntry );
192 void ParseModelsData( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
193 const CFB::COMPOUND_FILE_ENTRY* aEntry,
194 const std::vector<std::string>& aRootDir );
195 void ParseNets6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
196 const CFB::COMPOUND_FILE_ENTRY* aEntry );
197 void ParsePolygons6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
198 const CFB::COMPOUND_FILE_ENTRY* aEntry );
199 void ParseRules6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
200 const CFB::COMPOUND_FILE_ENTRY* aEntry );
201
202 // Binary Format
203 void ParseArcs6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
204 const CFB::COMPOUND_FILE_ENTRY* aEntry );
205 void ConvertArcs6ToPcbShape( const AARC6& aElem, PCB_SHAPE* aShape );
206 void ConvertArcs6ToBoardItem( const AARC6& aElem, const int aPrimitiveIndex );
207 void ConvertArcs6ToFootprintItem( FOOTPRINT* aFootprint, const AARC6& aElem,
208 const int aPrimitiveIndex, const bool aIsBoardImport );
209 void ConvertArcs6ToBoardItemOnLayer( const AARC6& aElem, PCB_LAYER_ID aLayer );
210 void ConvertArcs6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, const AARC6& aElem,
211 PCB_LAYER_ID aLayer );
212 void ParseComponentsBodies6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
213 const CFB::COMPOUND_FILE_ENTRY* aEntry );
215 FOOTPRINT* aFootprint,
216 const ACOMPONENTBODY6& aElem );
217 void ParsePads6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
218 const CFB::COMPOUND_FILE_ENTRY* aEntry );
219 void ConvertPads6ToBoardItem( const APAD6& aElem );
220 void ConvertPads6ToFootprintItem( FOOTPRINT* aFootprint, const APAD6& aElem );
221 void ConvertPads6ToBoardItemOnNonCopper( const APAD6& aElem );
222 void ConvertPads6ToFootprintItemOnCopper( FOOTPRINT* aFootprint, const APAD6& aElem );
223 void ConvertPads6ToFootprintItemOnNonCopper( FOOTPRINT* aFootprint, const APAD6& aElem );
224 void ParseVias6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
225 const CFB::COMPOUND_FILE_ENTRY* aEntry );
226 void ConvertVias6ToFootprintItem( FOOTPRINT* aFootprint, const AVIA6& aElem );
227 void ParseTracks6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
228 const CFB::COMPOUND_FILE_ENTRY* aEntry );
229 void ConvertTracks6ToBoardItem( const ATRACK6& aElem, const int aPrimitiveIndex );
230 void ConvertTracks6ToFootprintItem( FOOTPRINT* aFootprint, const ATRACK6& aElem,
231 const int aPrimitiveIndex, const bool aIsBoardImport );
232 void ConvertTracks6ToBoardItemOnLayer( const ATRACK6& aElem, PCB_LAYER_ID aLayer );
233 void ConvertTracks6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, const ATRACK6& aElem,
234 PCB_LAYER_ID aLayer );
235 void ParseSmartUnions6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
236 const CFB::COMPOUND_FILE_ENTRY* aEntry );
237 void ParseUnionNamesData( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY* aEntry );
240
243
244 void MapSchematicNetNames( const std::map<std::string, UTF8>& aProperties );
245 wxString SchematicCasedNetName( const wxString& aNetName ) const;
246
247 void ParseTexts6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
248 const CFB::COMPOUND_FILE_ENTRY* aEntry );
249 void ConvertTexts6ToBoardItem( const ATEXT6& aElem );
250 void ConvertTexts6ToFootprintItem( FOOTPRINT* aFootprint, const ATEXT6& aElem );
251 void ConvertTexts6ToBoardItemOnLayer( const ATEXT6& aElem, PCB_LAYER_ID aLayer );
252 void ConvertTexts6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, const ATEXT6& aElem,
253 PCB_LAYER_ID aLayer );
254 void ConvertBarcodes6ToBoardItemOnLayer( const ATEXT6& aElem, PCB_LAYER_ID aLayer );
255 void ConvertBarcodes6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, const ATEXT6& aElem,
256 PCB_LAYER_ID aLayer );
257 void ConvertTexts6ToEdaTextSettings( const ATEXT6& aElem, EDA_TEXT& aEdaText );
258 void ParseFills6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
259 const CFB::COMPOUND_FILE_ENTRY* aEntry );
260 void ConvertFills6ToBoardItem( const AFILL6& aElem );
261 void ConvertFills6ToFootprintItem( FOOTPRINT* aFootprint, const AFILL6& aElem,
262 const bool aIsBoardImport );
263 void ConvertFills6ToBoardItemOnLayer( const AFILL6& aElem, PCB_LAYER_ID aLayer );
264 void ConvertFills6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, const AFILL6& aElem,
265 PCB_LAYER_ID aLayer );
266 void ParseBoardRegionsData( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
267 const CFB::COMPOUND_FILE_ENTRY* aEntry );
268 void ParseShapeBasedRegions6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
269 const CFB::COMPOUND_FILE_ENTRY* aEntry );
270 void ConvertShapeBasedRegions6ToBoardItem( const AREGION6& aElem, const int aPrimitiveIndex );
271 void ConvertShapeBasedRegions6ToFootprintItem( FOOTPRINT* aFootprint, const AREGION6& aElem,
272 const int aPrimitiveIndex );
274 const int aPrimitiveIndex );
276 const AREGION6& aElem,
277 PCB_LAYER_ID aLayer,
278 const int aPrimitiveIndex );
280 const CFB::COMPOUND_FILE_ENTRY* aEntry );
281 void ParseRegions6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
282 const CFB::COMPOUND_FILE_ENTRY* aEntry );
283 void ParseWideStrings6Data( const ALTIUM_PCB_COMPOUND_FILE& aAltiumPcbFile,
284 const CFB::COMPOUND_FILE_ENTRY* aEntry );
285
286 // Helper Functions
287 void HelperParseDimensions6Linear( const ADIMENSION6& aElem );
288 void HelperParseDimensions6Radial( const ADIMENSION6& aElem );
289 void HelperParseDimensions6Leader( const ADIMENSION6& aElem );
290 void HelperParseDimensions6Datum( const ADIMENSION6& aElem );
291 void HelperParseDimensions6Center( const ADIMENSION6& aElem );
292
293 void HelperParsePad6NonCopper( const APAD6& aElem, PCB_LAYER_ID aLayer, PCB_SHAPE* aShape );
294
295 void HelperFillMechanicalLayerAssignments( const std::vector<ABOARD6_LAYER_STACKUP>& aStackup );
296
297 void HelperCreateBoardOutline( const std::vector<ALTIUM_VERTICE>& aVertices );
298
299 void HelperSetZoneLayers( ZONE& aZone, const ALTIUM_LAYER aAltiumLayer );
300 void HelperSetZoneKeepoutRestrictions( ZONE& aZone, const uint8_t aKeepoutRestrictions );
301
308 uint8_t HelperGetKeepoutRestrictions( const uint8_t aKeepoutRestrictions, const ALTIUM_LAYER aAltiumLayer );
309
310 void HelperFootprintZoneToLibFrame( ZONE& aZone, const FOOTPRINT& aFootprint );
312 const ALTIUM_LAYER aAltiumLayer,
313 const uint8_t aKeepoutRestrictions );
314 void HelperPcpShapeAsFootprintKeepoutRegion( FOOTPRINT* aFootprint, const PCB_SHAPE& aShape,
315 const ALTIUM_LAYER aAltiumLayer,
316 const uint8_t aKeepoutRestrictions );
317
318 void HelperSetTextboxAlignmentAndPos( const ATEXT6& aElem, PCB_TEXTBOX* aPcbTextbox );
319 void HelperSetTextAlignmentAndPos( const ATEXT6& aElem, EDA_TEXT* aEdaText );
320
321 std::vector<std::pair<PCB_LAYER_ID, int>>
322 HelperGetSolderAndPasteMaskExpansions( const ALTIUM_RECORD aType, const int aPrimitiveIndex,
323 const ALTIUM_LAYER aAltiumLayer );
324
325 FOOTPRINT* HelperGetFootprint( uint16_t aComponent ) const;
326
328
337 int HelperGetPadstackLayerIndex( PCB_LAYER_ID aLayer ) const;
338
346 std::shared_ptr<EMBEDDED_FILES::EMBEDDED_FILE>
347 HelperEmbedModel( FOOTPRINT* aFootprint, const wxString& aModelName,
348 const std::vector<char>& aCompressedData, bool& aIsNew );
349
350 void remapUnsureLayers( std::vector<ABOARD6_LAYER_STACKUP>& aStackup );
351
353 std::vector<FOOTPRINT*> m_components;
354 std::vector<ZONE*> m_polygons;
355 std::vector<PCB_DIM_RADIAL*> m_radialDimensions;
356 std::map<uint32_t, wxString> m_unicodeStrings;
357 std::vector<int> m_altiumToKicadNetcodes;
358 std::map<wxString, wxString> m_schematicNetNames; // upper cased name to schematic casing
359 std::map<ALTIUM_LAYER, PCB_LAYER_ID> m_layermap; // used to correctly map layers
360 std::map<ALTIUM_LAYER, wxString> m_layerNames;
361 std::map<PCB_LAYER_ID, int> m_padstackLayerIndex;
362
363 std::map<wxString, ALTIUM_EMBEDDED_MODEL_DATA> m_EmbeddedModels;
364 std::map<ALTIUM_RULE_KIND, std::vector<ARULE6>> m_rules;
365 std::map<ALTIUM_RECORD, std::multimap<int, const AEXTENDED_PRIMITIVE_INFORMATION>>
367
368 std::vector<ASMARTUNION6> m_tuningUnions;
369 std::map<uint32_t, wxString> m_unionNames;
370 std::map<int, std::vector<BOARD_ITEM*>> m_unionToBoardItems;
371
372 std::map<ALTIUM_LAYER, ZONE*> m_outer_plane;
373
375
378 unsigned m_doneCount;
380 unsigned m_totalCount;
381
382 wxString m_library;
384
387};
388
389
390#endif //ALTIUM_PCB_H
const char * name
ALTIUM_RULE_KIND
ALTIUM_RECORD
void ApplyAltiumNetclassRules(const std::map< ALTIUM_RULE_KIND, std::vector< ARULE6 > > &aRulesByKind, NET_SETTINGS &aNetSettings, std::vector< const ARULE6 * > *aUnresolved=nullptr)
Copy the values of Altium rules scoped to a single netclass onto that netclass.
wxString AltiumUnnamedNetName(const BOARD &aBoard, int &aCounter)
Invent a placeholder name for an Altium net that has none.
ALTIUM_PCB_DIR
Definition altium_pcb.h:38
@ UNIQUEIDPRIMITIVEINFORMATION
Definition altium_pcb.h:81
@ SHAPEBASEDCOMPONENTBODIES6
Definition altium_pcb.h:72
@ DESIGNRULECHECKEROPTIONS6
Definition altium_pcb.h:50
@ EXTENDPRIMITIVEINFORMATION
Definition altium_pcb.h:56
std::function< void(const ALTIUM_PCB_COMPOUND_FILE &, const CFB::COMPOUND_FILE_ENTRY *)> PARSE_FUNCTION_POINTER_fp
Definition altium_pcb.h:149
PROGRESS_REPORTER * m_progressReporter
optional; may be nullptr
Definition altium_pcb.h:376
std::shared_ptr< EMBEDDED_FILES::EMBEDDED_FILE > HelperEmbedModel(FOOTPRINT *aFootprint, const wxString &aModelName, const std::vector< char > &aCompressedData, bool &aIsNew)
Return the 3D model aModelName embedded in aFootprint, inflating and embedding aCompressedData first ...
void ParseClasses6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
std::vector< PCB_DIM_RADIAL * > m_radialDimensions
Definition altium_pcb.h:355
const ARULE6 * GetRuleForPolygon(ALTIUM_RULE_KIND aKind) const
void ConvertArcs6ToFootprintItemOnLayer(FOOTPRINT *aFootprint, const AARC6 &aElem, PCB_LAYER_ID aLayer)
void ConvertTracks6ToBoardItem(const ATRACK6 &aElem, const int aPrimitiveIndex)
void ConvertTracks6ToFootprintItem(FOOTPRINT *aFootprint, const ATRACK6 &aElem, const int aPrimitiveIndex, const bool aIsBoardImport)
int m_highest_pour_index
Altium stores pour order across all layers.
Definition altium_pcb.h:386
void HelperCreateTuningPatterns()
void ConvertTexts6ToFootprintItemOnLayer(FOOTPRINT *aFootprint, const ATEXT6 &aElem, PCB_LAYER_ID aLayer)
std::map< ALTIUM_LAYER, PCB_LAYER_ID > m_layermap
Definition altium_pcb.h:359
void ParseVias6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void HelperParseDimensions6Leader(const ADIMENSION6 &aElem)
wxString m_footprintName
for footprint library loading error reporting
Definition altium_pcb.h:383
std::vector< FOOTPRINT * > m_components
Definition altium_pcb.h:353
void HelperFillMechanicalLayerAssignments(const std::vector< ABOARD6_LAYER_STACKUP > &aStackup)
void ParseShapeBasedRegions6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
const ARULE6 * GetRuleDefault(ALTIUM_RULE_KIND aKind) const
void HelperParsePad6NonCopper(const APAD6 &aElem, PCB_LAYER_ID aLayer, PCB_SHAPE *aShape)
void ParseRegions6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
std::vector< PCB_LAYER_ID > GetKicadLayersToIterate(ALTIUM_LAYER aAltiumLayer) const
void ConvertShapeBasedRegions6ToFootprintItem(FOOTPRINT *aFootprint, const AREGION6 &aElem, const int aPrimitiveIndex)
void HelperPcpShapeAsFootprintKeepoutRegion(FOOTPRINT *aFootprint, const PCB_SHAPE &aShape, const ALTIUM_LAYER aAltiumLayer, const uint8_t aKeepoutRestrictions)
void ConvertArcs6ToBoardItem(const AARC6 &aElem, const int aPrimitiveIndex)
void ConvertShapeBasedRegions6ToFootprintItemOnLayer(FOOTPRINT *aFootprint, const AREGION6 &aElem, PCB_LAYER_ID aLayer, const int aPrimitiveIndex)
std::map< ALTIUM_LAYER, ZONE * > m_outer_plane
Definition altium_pcb.h:372
std::vector< int > m_altiumToKicadNetcodes
Definition altium_pcb.h:357
std::map< uint32_t, wxString > m_unionNames
Definition altium_pcb.h:369
unsigned m_totalCount
for progress reporting
Definition altium_pcb.h:380
void ParseComponents6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void HelperPcpShapeAsBoardKeepoutRegion(const PCB_SHAPE &aShape, const ALTIUM_LAYER aAltiumLayer, const uint8_t aKeepoutRestrictions)
std::map< wxString, ALTIUM_EMBEDDED_MODEL_DATA > m_EmbeddedModels
Definition altium_pcb.h:363
void ConvertFills6ToBoardItemOnLayer(const AFILL6 &aElem, PCB_LAYER_ID aLayer)
std::vector< std::pair< PCB_LAYER_ID, int > > HelperGetSolderAndPasteMaskExpansions(const ALTIUM_RECORD aType, const int aPrimitiveIndex, const ALTIUM_LAYER aAltiumLayer)
void ConvertBarcodes6ToBoardItemOnLayer(const ATEXT6 &aElem, PCB_LAYER_ID aLayer)
void ConvertComponentBody6ToFootprintItem(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, FOOTPRINT *aFootprint, const ACOMPONENTBODY6 &aElem)
void HelperSetTextAlignmentAndPos(const ATEXT6 &aElem, EDA_TEXT *aEdaText)
void ParseBoard6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void ConvertFills6ToFootprintItem(FOOTPRINT *aFootprint, const AFILL6 &aElem, const bool aIsBoardImport)
void ParseExtendedPrimitiveInformationData(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void ParseFileHeader(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void HelperCreateBoardOutline(const std::vector< ALTIUM_VERTICE > &aVertices)
std::map< int, std::vector< BOARD_ITEM * > > m_unionToBoardItems
Definition altium_pcb.h:370
void HelperAssignNetclassesToNets()
Rebuild the composite netclasses and point every net at its effective netclass.
std::map< ALTIUM_RULE_KIND, std::vector< ARULE6 > > m_rules
Definition altium_pcb.h:364
void ConvertVias6ToFootprintItem(FOOTPRINT *aFootprint, const AVIA6 &aElem)
void ParseRules6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void MapSchematicNetNames(const std::map< std::string, UTF8 > &aProperties)
void HelperSetZoneKeepoutRestrictions(ZONE &aZone, const uint8_t aKeepoutRestrictions)
unsigned m_doneCount
Definition altium_pcb.h:378
void HelperParseDimensions6Linear(const ADIMENSION6 &aElem)
void ParseTracks6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
std::map< uint32_t, wxString > m_unicodeStrings
Definition altium_pcb.h:356
void ConvertTexts6ToBoardItem(const ATEXT6 &aElem)
void HelperParseDimensions6Center(const ADIMENSION6 &aElem)
void HelperParseDimensions6Radial(const ADIMENSION6 &aElem)
void ParseUnionNamesData(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
BOARD * m_board
Definition altium_pcb.h:352
void ParseBoardRegionsData(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void ParseArcs6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void ConvertTexts6ToBoardItemOnLayer(const ATEXT6 &aElem, PCB_LAYER_ID aLayer)
void ConvertPads6ToFootprintItemOnCopper(FOOTPRINT *aFootprint, const APAD6 &aElem)
std::unique_ptr< FOOTPRINT > ParseFootprint(ALTIUM_PCB_COMPOUND_FILE &altiumLibFile, const wxString &aFootprintName)
REPORTER * m_reporter
optional; may be nullptr
Definition altium_pcb.h:377
int GetNetCode(uint16_t aId) const
void ConvertTexts6ToEdaTextSettings(const ATEXT6 &aElem, EDA_TEXT &aEdaText)
void HelperBuildPadstackLayerIndex()
wxString m_library
for footprint library loading error reporting
Definition altium_pcb.h:382
void ConvertPads6ToFootprintItemOnNonCopper(FOOTPRINT *aFootprint, const APAD6 &aElem)
std::map< wxString, wxString > m_schematicNetNames
Definition altium_pcb.h:358
void ConvertShapeBasedRegions6ToBoardItemOnLayer(const AREGION6 &aElem, PCB_LAYER_ID aLayer, const int aPrimitiveIndex)
void ConvertTexts6ToFootprintItem(FOOTPRINT *aFootprint, const ATEXT6 &aElem)
unsigned m_lastProgressCount
Definition altium_pcb.h:379
void ParseFills6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
uint8_t HelperGetKeepoutRestrictions(const uint8_t aKeepoutRestrictions, const ALTIUM_LAYER aAltiumLayer)
Resolve an Altium keepout restriction mask, substituting the restrictions implied by the layer when t...
void ConvertArcs6ToFootprintItem(FOOTPRINT *aFootprint, const AARC6 &aElem, const int aPrimitiveIndex, const bool aIsBoardImport)
void HelperParseDimensions6Datum(const ADIMENSION6 &aElem)
void ConvertPads6ToBoardItem(const APAD6 &aElem)
void ConvertFills6ToFootprintItemOnLayer(FOOTPRINT *aFootprint, const AFILL6 &aElem, PCB_LAYER_ID aLayer)
void ParseWideStrings6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void remapUnsureLayers(std::vector< ABOARD6_LAYER_STACKUP > &aStackup)
std::vector< ASMARTUNION6 > m_tuningUnions
Definition altium_pcb.h:368
void HelperSetFootprintMountingStyles()
std::vector< ZONE * > m_polygons
Definition altium_pcb.h:354
void ParsePads6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void ConvertArcs6ToPcbShape(const AARC6 &aElem, PCB_SHAPE *aShape)
void ConvertTracks6ToBoardItemOnLayer(const ATRACK6 &aElem, PCB_LAYER_ID aLayer)
void ConvertFills6ToBoardItem(const AFILL6 &aElem)
std::map< PCB_LAYER_ID, int > m_padstackLayerIndex
Definition altium_pcb.h:361
void Parse(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const std::map< ALTIUM_PCB_DIR, std::string > &aFileMapping, const std::map< std::string, UTF8 > *aProperties=nullptr)
FOOTPRINT * HelperGetFootprint(uint16_t aComponent) const
friend struct ALTIUM_PCB_IMPORT_FIXTURE
Definition altium_pcb.h:153
void HelperFootprintZoneToLibFrame(ZONE &aZone, const FOOTPRINT &aFootprint)
LAYER_MAPPING_HANDLER m_layerMappingHandler
Definition altium_pcb.h:374
void ConvertShapeBasedRegions6ToBoardItem(const AREGION6 &aElem, const int aPrimitiveIndex)
void ParsePolygons6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
PCB_LAYER_ID GetKicadLayer(ALTIUM_LAYER aAltiumLayer) const
int HelperGetPadstackLayerIndex(PCB_LAYER_ID aLayer) const
Return the slot aLayer occupies in an Altium padstack's per-layer arrays.
void checkpoint()
void ParseComponentsBodies6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void ConvertTracks6ToFootprintItemOnLayer(FOOTPRINT *aFootprint, const ATRACK6 &aElem, PCB_LAYER_ID aLayer)
void ParseSmartUnions6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
wxString SchematicCasedNetName(const wxString &aNetName) const
ALTIUM_PCB(BOARD *aBoard, PROGRESS_REPORTER *aProgressReporter, LAYER_MAPPING_HANDLER &aLayerMappingHandler, REPORTER *aReporter=nullptr, const wxString &aLibrary=wxEmptyString, const wxString &aFootprintName=wxEmptyString)
void ConvertArcs6ToBoardItemOnLayer(const AARC6 &aElem, PCB_LAYER_ID aLayer)
void ParseTexts6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
std::map< ALTIUM_RECORD, std::multimap< int, const AEXTENDED_PRIMITIVE_INFORMATION > > m_extendedPrimitiveInformationMaps
Definition altium_pcb.h:366
void ParseModelsData(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry, const std::vector< std::string > &aRootDir)
std::map< ALTIUM_LAYER, wxString > m_layerNames
Definition altium_pcb.h:360
void ConvertPads6ToBoardItemOnNonCopper(const APAD6 &aElem)
void HelperSetTextboxAlignmentAndPos(const ATEXT6 &aElem, PCB_TEXTBOX *aPcbTextbox)
void ConvertBarcodes6ToFootprintItemOnLayer(FOOTPRINT *aFootprint, const ATEXT6 &aElem, PCB_LAYER_ID aLayer)
void ParseNets6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void ConvertPads6ToFootprintItem(FOOTPRINT *aFootprint, const APAD6 &aElem)
const ARULE6 * GetRule(ALTIUM_RULE_KIND aKind, const wxString &aName) const
void ParseDimensions6Data(const ALTIUM_PCB_COMPOUND_FILE &aAltiumPcbFile, const CFB::COMPOUND_FILE_ENTRY *aEntry)
void HelperSetZoneLayers(ZONE &aZone, const ALTIUM_LAYER aAltiumLayer)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:84
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:409
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:94
NET_SETTINGS stores various net-related settings in a project context.
A radial dimension indicates either the radius or diameter of an arc or circle.
A progress reporter interface for use in multi-threaded environments.
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:73
Handle a list of polygons defining a copper zone.
Definition zone.h:70
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
STL namespace.
std::function< std::map< wxString, PCB_LAYER_ID >(const std::vector< INPUT_LAYER_DESC > &)> LAYER_MAPPING_HANDLER
Pointer to a function that takes a map of source and KiCad layers and returns a re-mapped version.
std::vector< char > m_data
Definition altium_pcb.h:113
ALTIUM_EMBEDDED_MODEL_DATA(const wxString &name, const VECTOR3D &rotation, double z_offset, std::vector< char > &&data)
Definition altium_pcb.h:116
VECTOR3< double > VECTOR3D
Definition vector3.h:230