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

Add new layers for top/bottom package outlines #1198

Merged
merged 8 commits into from Aug 16, 2023
Merged

Conversation

ubruhin
Copy link
Member

@ubruhin ubruhin commented Aug 12, 2023

Summary

This PR adds two new package layers "Top Package Outlines" and "Bottom Package Outlines". They are intended to draw the exact outline of a package as a single, closed, zero-width polygon. Initially I struggled with adding even more package layers since this makes footprint creation more complicated. But it turned out that these layers are really valuable since they allowed to implement the following improvements:

  • The DRC is now very accurate about device clearance problems, with (almost) no false-positive messages anymore (see problem description in DRC: Courtyard clearance check is too noisy #1112):
    • If the package outlines polygons of two devices overlap, a DRC error is raised since it is pretty clear that these devices cannot be assembled (with the only exception of devices with stand-off where another device can be placed below).
    • If the package outlines polygon overlaps with the courtyard polygon of another device, a DRC warning is raised since it might or might not cause assembly problems.
  • The Gerber X3 Pick&Place export requires to export the "body outline" of packages, but so far we didn't have that information. Now we can export the package outline polygons which leads to much nicer Pick&Place files.
  • We now have the possibility to auto-generate 3D models of packages which don't have a STEP model added. This could be done by simply extruding the package outline polygon by some value (e.g. 1mm). It might make the 3D viewer more valuable if many STEP models are missing.
  • In future it might make sense to use the package outline polygon as the grab area of the device, since this is probably the area the user tries to grab a device.

And in the end, a footprint can still be drawn without adding these polygons - you just won't benefit from these features then.

Other Changes

  • For courtyard polygons (like for the new package outline layers), the package editor now automatically preselects a line width of 0mm. And during file format upgrade of v0.1 packages, all courtyards are changed to 0mm. Unfortunately this does not conform to IPC7351 anymore, but IMHO it makes no sense to draw courtyards with e.g. 0.1mm because they have no graphical purpose, but only functional (i.e. within the EDA tool). In the end they specify an area, and an area doesn't have a line width.
  • The package check now raises a warning if no package outline is drawn, and a hint if no courtyard is drawn.
  • The package editor now contains tools to automatically generate a package outline and a courtyard (see below).

GUI

How to generate package outlines and courtyards:

librepcb-generate-outlines

Note that the generated package outline is just a rectangular bounding box around all pads and documentation polygons.

Related Issues

@ubruhin ubruhin added enhancement file format Issues affecting the file format tool-library-editor labels Aug 12, 2023
@ubruhin ubruhin added this to the 1.0.0 milestone Aug 12, 2023
@ubruhin ubruhin self-assigned this Aug 12, 2023
@ubruhin ubruhin merged commit b11212e into master Aug 16, 2023
8 checks passed
@ubruhin ubruhin deleted the add-pkg-outline-layers branch August 16, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

DRC: Circular courtyards all placed at board origin DRC: Courtyard clearance check is too noisy
1 participant