Avoid courtyard warnings
- When the user explicitly said the component doesn't have it New on KiCad v7
This commit is contained in:
parent
ad0d5d384d
commit
3e283c9906
|
|
@ -98,6 +98,9 @@ MOD_SMD = 2
|
|||
MOD_EXCLUDE_FROM_POS_FILES = 4
|
||||
MOD_EXCLUDE_FROM_BOM = 8
|
||||
MOD_BOARD_ONLY = 16 # Footprint has no corresponding symbol
|
||||
MOD_JUST_ADDED = 32 # The footprint was added by the netlist update
|
||||
MOD_ALLOW_SOLDERMASK_BRIDGES = 64
|
||||
MOD_ALLOW_MISSING_COURTYARD = 128
|
||||
# This is what a virtual component gets when loaded by KiCad 6
|
||||
MOD_VIRTUAL = MOD_EXCLUDE_FROM_POS_FILES | MOD_EXCLUDE_FROM_BOM
|
||||
# VIATYPE, not exported by KiCad
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from shutil import rmtree
|
|||
from tempfile import NamedTemporaryFile, mkdtemp
|
||||
from .gs import GS
|
||||
from .kiplot import load_sch, get_board_comps_data
|
||||
from .misc import Rect, W_WRONGPASTE, DISABLE_3D_MODEL_TEXT, W_NOCRTYD
|
||||
from .misc import Rect, W_WRONGPASTE, DISABLE_3D_MODEL_TEXT, W_NOCRTYD, MOD_ALLOW_MISSING_COURTYARD
|
||||
if not GS.kicad_version_n:
|
||||
# When running the regression tests we need it
|
||||
from kibot.__main__ import detect_kicad
|
||||
|
|
@ -706,7 +706,8 @@ class VariantOptions(BaseOptions):
|
|||
w = bbox.GetWidth()
|
||||
h = bbox.GetHeight()
|
||||
m_cen = m.GetCenter()
|
||||
logger.warning(W_NOCRTYD+"Missing courtyard for `{}`".format(ref))
|
||||
if not (m.GetAttributes() & MOD_ALLOW_MISSING_COURTYARD):
|
||||
logger.warning(W_NOCRTYD+"Missing courtyard for `{}`".format(ref))
|
||||
# Compute the offset
|
||||
off_x = m_cen.x - m_pos.x
|
||||
off_y = m_cen.y - m_pos.y
|
||||
|
|
|
|||
Loading…
Reference in New Issue