-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
diff --git a/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp b/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp | ||
index 01076e8692..c25dbf3d86 100644 | ||
--- a/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp | ||
+++ b/eeschema/netlist_exporters/netlist_exporter_orcadpcb2.cpp | ||
@@ -3,7 +3,7 @@ | ||
* | ||
* Copyright (C) 1992-2018 jp.charras at wanadoo.fr | ||
* Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <[email protected]> | ||
- * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. | ||
+ * Copyright (C) 1992-2023, 2024 KiCad Developers, see AUTHORS.txt for contributors. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
@@ -23,6 +23,9 @@ | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
*/ | ||
|
||
+#include <algorithm> | ||
+#include <vector> | ||
+ | ||
#include <confirm.h> | ||
#include <refdes_utils.h> | ||
|
||
@@ -68,8 +71,23 @@ bool NETLIST_EXPORTER_ORCADPCB2::WriteNetlist( const wxString& aOutFileName, | ||
{ | ||
SCH_SHEET_PATH sheet = sheetList[i]; | ||
|
||
- // Process symbol attributes | ||
+ // The rtree returns items in a non-deterministic order (platform-dependent) | ||
+ // Therefore we need to sort them before outputting to ensure file stability for version | ||
+ // control and QA comparisons | ||
+ std::vector<EDA_ITEM*> sheetItems; | ||
+ | ||
for( EDA_ITEM* item : sheet.LastScreen()->Items().OfType( SCH_SYMBOL_T ) ) | ||
+ sheetItems.push_back( item ); | ||
+ | ||
+ auto pred = []( const EDA_ITEM* item1, const EDA_ITEM* item2 ) | ||
+ { | ||
+ return item1->m_Uuid < item2->m_Uuid; | ||
+ }; | ||
+ | ||
+ std::sort( sheetItems.begin(), sheetItems.end(), pred ); | ||
+ | ||
+ // Process symbol attributes | ||
+ for( EDA_ITEM* item : sheetItems ) | ||
{ | ||
SCH_SYMBOL* symbol = findNextSymbol( item, &sheet ); | ||
|
||
diff --git a/qa/data/cli/basic_test/basic_test.netlist.orcadpcb2 b/qa/data/cli/basic_test/basic_test.netlist.orcadpcb2 | ||
index 73bccb7943..4af1be5e82 100644 | ||
--- a/qa/data/cli/basic_test/basic_test.netlist.orcadpcb2 | ||
+++ b/qa/data/cli/basic_test/basic_test.netlist.orcadpcb2 | ||
@@ -1,7 +1,12 @@ | ||
-( { EESchema Netlist Version 1.1 created 5/2/2023 8:59:05 PM } | ||
- ( /eaf8668d-aec7-4209-a3f9-fc7bfb5b931b Resistor_SMD:R_1206_3216Metric R1 10k | ||
+( { EESchema Netlist Version 1.1 created 2024-12-19T18:53:31+0000 } | ||
+ ( /203ec3c1-122c-4087-8f6d-2a0dd0b941e6 TestPoint:TestPoint_Pad_3.0x3.0mm J1 Conn_01x01_Pin | ||
+ ( 1 /VCC ) | ||
+ ) | ||
+ ( /2a9f5f63-d864-4898-ae3e-539c635e8f2c TestPoint:TestPoint_Pad_3.0x3.0mm J2 Conn_01x01_Pin | ||
+ ( 1 /IN ) | ||
+ ) | ||
+ ( /789295bb-2cfb-4a2b-977f-b3831d5aa975 TestPoint:TestPoint_Pad_3.0x3.0mm J4 Conn_01x01_Pin | ||
( 1 GND ) | ||
- ( 2 Net-(U1--) ) | ||
) | ||
( /8a4f4d93-4e0c-474b-8535-68c4fef6e828 Capacitor_SMD:C_1206_3216Metric C1 10u | ||
( 1 Net-(U1-+) ) | ||
@@ -11,22 +16,13 @@ | ||
( 1 Net-(U1--) ) | ||
( 2 /OUT ) | ||
) | ||
- ( /9efa520e-00e1-47a2-b8dc-bf8e2121d065 TestPoint:TestPoint_Pad_3.0x3.0mm J3 Conn_01x01_Pin | ||
- ( 1 /OUT ) | ||
- ) | ||
- ( /2a9f5f63-d864-4898-ae3e-539c635e8f2c TestPoint:TestPoint_Pad_3.0x3.0mm J2 Conn_01x01_Pin | ||
- ( 1 /IN ) | ||
- ) | ||
- ( /203ec3c1-122c-4087-8f6d-2a0dd0b941e6 TestPoint:TestPoint_Pad_3.0x3.0mm J1 Conn_01x01_Pin | ||
- ( 1 /VCC ) | ||
- ) | ||
- ( /789295bb-2cfb-4a2b-977f-b3831d5aa975 TestPoint:TestPoint_Pad_3.0x3.0mm J4 Conn_01x01_Pin | ||
- ( 1 GND ) | ||
- ) | ||
( /985a669c-9a7f-4b74-bb4f-9487b164d3aa Resistor_SMD:R_1206_3216Metric R3 10k | ||
( 1 /IN ) | ||
( 2 Net-(U1-+) ) | ||
) | ||
+ ( /9efa520e-00e1-47a2-b8dc-bf8e2121d065 TestPoint:TestPoint_Pad_3.0x3.0mm J3 Conn_01x01_Pin | ||
+ ( 1 /OUT ) | ||
+ ) | ||
( /b8a40376-5e4f-459f-9886-5e9ee83698cf Package_TO_SOT_SMD:SOT-23-5 U1 TLV2371DBV | ||
( 1 /OUT ) | ||
( 2 GND ) | ||
@@ -34,5 +30,9 @@ | ||
( 4 Net-(U1--) ) | ||
( 5 /VCC ) | ||
) | ||
+ ( /eaf8668d-aec7-4209-a3f9-fc7bfb5b931b Resistor_SMD:R_1206_3216Metric R1 10k | ||
+ ( 1 GND ) | ||
+ ( 2 Net-(U1--) ) | ||
+ ) | ||
) | ||
* |