Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine Altium multi-part components #147

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Combine Altium multi-part components #147

merged 1 commit into from
Jun 24, 2024

Conversation

shrik450
Copy link
Collaborator

@shrik450 shrik450 commented Jun 17, 2024

Replaces #124 and closes #146.

Uses the new IR changes in Tools to more accurately and correctly combine multi-part components. This PR will remain in draft until these Tools changes are deployed to production first.

Stacked on #145 to benefit from those changes.

Outdated

Todo:

  • Tools IR changes are in prod
  • Tests:
    • Update existing test data
    • New test for multi-part component repeated in pages
    • New test for multi-part component removed in variants

@shrik450 shrik450 force-pushed the su/test-suite-speedup branch from 4384260 to eb842b5 Compare June 17, 2024 19:28
@shrik450 shrik450 force-pushed the su/altium-multi-2 branch 2 times, most recently from afb5993 to 6fe9d6c Compare June 17, 2024 19:35
combined_components.append(component)

for designator, multi_part_components in multi_part_components_by_designator.items():
combined_component = multi_part_components[0].copy()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an interesting side effect of this statement. We're taking the attributes of the "first" part as the attributes of the combined component. But there can be cases where the attributes differ. In Archimajor, there are some places where the first part has no attributes but some other part does. I don't think there is a reasonable and straightforward solution here for that case, which I think should be considered an issue on the board.

Base automatically changed from su/test-suite-speedup to main June 21, 2024 13:41
@shrik450 shrik450 force-pushed the su/altium-multi-2 branch from 6fe9d6c to 1d274d0 Compare June 21, 2024 15:32
@shrik450 shrik450 force-pushed the su/altium-multi-2 branch from 1d274d0 to 382a9d2 Compare June 21, 2024 18:44
@shrik450 shrik450 marked this pull request as ready for review June 21, 2024 18:44
@shrik450 shrik450 requested a review from a team as a code owner June 21, 2024 18:44
@shrik450 shrik450 requested a review from kdumontnu June 21, 2024 18:44
@shrik450 shrik450 changed the title [WIP] Combine Altium multi-part components Combine Altium multi-part components Jun 21, 2024
Copy link
Contributor

@kdumontnu kdumontnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@@ -54,6 +60,8 @@ def list_components(
applies to Altium projects.
:param ref: Optional git ref to check. This can be a commit hash, branch
name, or tag name. Default is "main", i.e. the main branch.
:param combine_multi_part: If True, multi-part components will be combined
into a single component. Currently only works for Altium.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even think this needs to be a parameter. I can't think of a reason someone wouldn't want to combine these. We typically refer to them as multi-symbol components here, as they really are one part, just separated logically to make design organization easier.

Copy link
Collaborator Author

@shrik450 shrik450 Jun 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is separated out in list_components because you might want to check each part separately, such as in the case when you want to see if all parts of a component are placed, where they are placed etc. in the BOM they are always combined.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see 👍

@shrik450
Copy link
Collaborator Author

@kdumontnu Should I tag Alex in for the second review?

Copy link
Contributor

@McRaeAlex McRaeAlex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shrik450 shrik450 merged commit 5a4df98 into main Jun 24, 2024
4 checks passed
@shrik450 shrik450 deleted the su/altium-multi-2 branch June 24, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi part components in Altium
3 participants