From b164f4a7909e4b0e41c9d65479f8caddff837cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20H=C3=B6pfinger?= Date: Tue, 13 Oct 2026 10:22:51 +0200 Subject: [PATCH 1/3] fusion_eagle: add THT/SMD "Montage" extra field derived from footprint pads Eagle/Fusion parts only carry a MOUNT attribute when the library vendor sets it. Derive THT/SMD from the package's / elements instead, so it can be shown/grouped via --extra-fields "Montage". Co-Authored-By: Claude Sonnet 5.5 --- InteractiveHtmlBom/ecad/fusion_eagle.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/InteractiveHtmlBom/ecad/fusion_eagle.py b/InteractiveHtmlBom/ecad/fusion_eagle.py index 18bb5c2..294eeb6 100644 --- a/InteractiveHtmlBom/ecad/fusion_eagle.py +++ b/InteractiveHtmlBom/ecad/fusion_eagle.py @@ -854,6 +854,13 @@ def _parse(self, brdfile): "found".format(el.attrib['package'], el.attrib['library'])) + # Local patch: derive THT/SMD from the footprint pads + has_th = package.find('pad') is not None + has_smd = package.find('smd') is not None + comp.extra_fields['Montage'] = ( + 'THT+SMD' if has_th and has_smd else + 'THT' if has_th else 'SMD' if has_smd else '') + elx = float(el.attrib['x']) ely = float(el.attrib['y']) refdes = el.attrib['name'] From 5f655fe9ca00d534b58eac77c04db9bd24f5b113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20H=C3=B6pfinger?= Date: Tue, 13 Oct 2026 10:24:40 +0200 Subject: [PATCH 2/3] fusion_eagle: mark packages without pads as MECH Co-Authored-By: Claude Sonnet 5.5 --- InteractiveHtmlBom/ecad/fusion_eagle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InteractiveHtmlBom/ecad/fusion_eagle.py b/InteractiveHtmlBom/ecad/fusion_eagle.py index 294eeb6..74750ef 100644 --- a/InteractiveHtmlBom/ecad/fusion_eagle.py +++ b/InteractiveHtmlBom/ecad/fusion_eagle.py @@ -859,7 +859,7 @@ def _parse(self, brdfile): has_smd = package.find('smd') is not None comp.extra_fields['Montage'] = ( 'THT+SMD' if has_th and has_smd else - 'THT' if has_th else 'SMD' if has_smd else '') + 'THT' if has_th else 'SMD' if has_smd else 'MECH') elx = float(el.attrib['x']) ely = float(el.attrib['y']) From 0bbef4c2ae327d48f38cc89e1fbaf67bd724d509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20H=C3=B6pfinger?= Date: Tue, 13 Oct 2026 10:32:02 +0200 Subject: [PATCH 3/3] fusion_eagle: respect --normalize-field-case for Montage field The BOM looks up extra fields by their lowercased name when case normalization is enabled, so store the derived value under that key. Co-Authored-By: Claude Sonnet 5.5 --- InteractiveHtmlBom/ecad/fusion_eagle.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/InteractiveHtmlBom/ecad/fusion_eagle.py b/InteractiveHtmlBom/ecad/fusion_eagle.py index 74750ef..b1b7847 100644 --- a/InteractiveHtmlBom/ecad/fusion_eagle.py +++ b/InteractiveHtmlBom/ecad/fusion_eagle.py @@ -857,7 +857,10 @@ def _parse(self, brdfile): # Local patch: derive THT/SMD from the footprint pads has_th = package.find('pad') is not None has_smd = package.find('smd') is not None - comp.extra_fields['Montage'] = ( + mount_key = 'Montage' + if self.config.normalize_field_case: + mount_key = mount_key.lower() + comp.extra_fields[mount_key] = ( 'THT+SMD' if has_th and has_smd else 'THT' if has_th else 'SMD' if has_smd else 'MECH')