Compare commits

...

13 Commits

Author SHA1 Message Date
Benny Megidish 68b5eb639a chore: removed unwanted footprint key 2023-03-14 11:48:19 +02:00
Benny Megidish 9f0fa6eaee Merge pull request #42
Add new symbol field support for easyeda2kicad.py
2023-03-14 11:40:41 +02:00
Tyler Crumpton 6adb746943 Add new symbol field support for easyeda2kicad.py 2023-03-13 22:42:09 -04:00
Benny Megidish 79bd50db9e chore: bump version 2023-02-22 12:28:05 +02:00
Benny Megidish fc12cc94b3 Update README.md 2023-02-14 18:57:47 +02:00
Benny Megidish 76d8ffbf75 Create CONTRIBUTERS.md 2023-02-14 18:57:25 +02:00
Benny Megidish 30d1684f76 fix: merge similar parts into single entry
merge PR
2023-02-14 18:55:10 +02:00
Ionel a09b42c20f fix merge similar parts into single entry 2023-02-14 18:03:16 +02:00
Ionel 5417532fed fix merge similar parts into single entry 2023-02-14 17:52:31 +02:00
Benny Megidish dec7a3ca1b Update README.md 2023-02-01 00:21:06 +02:00
Benny Megidish b8d0073846 Update README.md 2023-01-31 10:58:18 +02:00
Benny Megidish 599f159806 Update README.md
fix manager image ratio
2023-01-29 20:19:59 +02:00
Benny Megidish cd38035aff chore: added installation manager image 2023-01-29 20:17:00 +02:00
5 changed files with 14 additions and 17 deletions
+1
View File
@@ -0,0 +1 @@
- Hildo Guillardi Júnior
+9 -9
View File
@@ -6,6 +6,8 @@
| **JLC PCB Plug-in for KiCad** |
|:-----:|
[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/bennymeg)
</div>
## Features
@@ -17,10 +19,12 @@
## Installation
### Official Installation
Open the "Plugin and Content Manager" from the KiCad main menu and install the "<ins>Fabrication Toolkit</ins>" plugin from the selection list.
Fabrication Toolkit is distributed with the official releases of KiCad 6+. Open the "Plugin and Content Manager" from the KiCad main menu and install the "<ins>Fabrication Toolkit</ins>" plugin from the selection list.
<img src="https://github.com/bennymeg/JLC-Plugin-for-KiCad/blob/master/assets/manager.png?raw=true" height=275>
### Manual installation
Download the latest ZIP file from https://github.com/bennymeg/JLC-Plugin-for-KiCad. Open the "Plugin and Content Manager" from the KiCads main window and install the ZIP file via "Install from File".
Download the [latest release](https://github.com/bennymeg/JLC-Plugin-for-KiCad/releases) ZIP file. Open the "Plugin and Content Manager" from the KiCads main window and install the ZIP file via "Install from File".
## Usage
Click on the Fabrication Toolkit <img src="https://github.com/bennymeg/JLC-Plugin-for-KiCad/blob/master/resources/icon.png?raw=true" style="magin-bottom: 8px;" alt="Logo" height=24> button on the top tool box inside KiCad pcb editor (pcbnew).
@@ -39,8 +43,8 @@ Add an 'LCSC Part #'* field with the LCSC component part number to the symbol's
_The fields will be query in the order denoted above._
#### Fallback Fields*:
| 'lcsc#' | 'LCSC' | 'JLC' | 'MPN' | 'Mpn' | 'mpn' |
| --- | --- | --- | --- | --- | --- |
| 'JLC Part' | 'LCSC Part' | 'LCSC' | 'JLC' | 'MPN' | 'Mpn' | 'mpn' |
| --- | --- | --- | --- | --- | --- | --- |
_The fields will be query in the order denoted above._
@@ -54,7 +58,7 @@ Select 'Exclude from position files' or 'Exclude from BOM' in the footprint's fa
<img src="https://github.com/bennymeg/JLC-Plugin-for-KiCad/blob/master/assets/fabrication.png?raw=true" height=505>
### Offset Component Rotation
The rotation of components in KiCad Footprints does not always match the orientation in the JLC library because KiCad and JLCPB used different variation of the same standard. Most of the rotations may be corrected by the `rotations.cf` definitions. To the exception cases: add an 'JLC Rotation Offset' field with an counter-clockwise orientation offset in degrees to correct this.
The rotation of components in KiCad Footprints does not always match the orientation in the JLC library because KiCad and JLC PCB used different variation of the same standard. Most of the rotations may be corrected by the `rotations.cf` definitions. To the exception cases: add an 'JLC Rotation Offset' field with an counter-clockwise orientation offset in degrees to correct this.
<img src="https://github.com/bennymeg/JLC-Plugin-for-KiCad/blob/master/assets/rotation-jlc.png?raw=true" height=164>
@@ -94,7 +98,3 @@ _The fields will be queried in the order denoted above._
## Author
Benny Megidish
## Contributors
Hildo Guillardi Júnior
Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

+1 -1
View File
@@ -29,7 +29,7 @@
],
"versions": [
{
"version": "2.0.0",
"version": "2.2.0",
"status": "stable",
"kicad_version": "6.00"
}
+3 -7
View File
@@ -194,7 +194,7 @@ class ProcessManager:
# merge similar parts into single entry
insert = True
for component in self.bom:
if component['Footprint'].upper() == footprint_name.upper() and component['Value'].upper() == footprint.GetValue().upper():
if component['Footprint'] == self._normalize_footprint_name(footprint_name) and component['Value'].upper() == footprint.GetValue().upper():
component['Designator'] += ", " + "{}{}{}".format(footprint.GetReference(), "" if unique_id == "" else "_", unique_id)
component['Quantity'] += 1
insert = False
@@ -249,13 +249,9 @@ class ProcessManager:
def _get_mpn_from_footprint(self, footprint: str):
''''Get the MPN/LCSC stock code from standard symbol fields.'''
keys = ['LCSC Part #', 'JLCPCB Part #']
fallback_keys = ['LCSC', 'JLC', 'MPN', 'Mpn', 'mpn']
fallback_keys = ['LCSC Part', 'JLC Part', 'LCSC', 'JLC', 'MPN', 'Mpn', 'mpn']
for key in keys:
if footprint.HasProperty(key):
return footprint.GetProperty(key)
for key in fallback_keys:
for key in keys + fallback_keys:
if footprint.HasProperty(key):
return footprint.GetProperty(key)