[Position][Fixed] "Exclude from position files" not excluded

- When only SMD components are selected.

See #429
This commit is contained in:
Salvador E. Tropea 2023-05-04 13:20:48 -03:00
parent 6a1d6d313c
commit 66b0c20c69
2 changed files with 7 additions and 2 deletions

View File

@ -31,6 +31,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- KiCad v6/7 schematic:
- Net Class Flags not saved in variants or annotated schematics
- Repeated UUIDs saved in variants
- Position:
- Components marked as "Exclude from position files" not excluded when only
SMD components are selected. (See #429)
## [1.6.2] - 2023-04-24
### Added

View File

@ -80,7 +80,9 @@ class PositionOptions(VariantOptions):
self.use_aux_axis_as_origin = True
""" Use the auxiliary axis as origin for coordinates (KiCad default) """
self.include_virtual = False
""" Include virtual components. For special purposes, not pick & place """
""" Include virtual components. For special purposes, not pick & place.
Note that virtual components is a KiCad 5 concept.
For KiCad 6+ we replace this concept by the option to exclude from position file """
super().__init__()
self._expand_id = 'position'
@ -197,7 +199,7 @@ class PositionOptions(VariantOptions):
@staticmethod
def is_pure_smd_6(m):
return m.GetAttributes() & (MOD_THROUGH_HOLE | MOD_SMD) == MOD_SMD
return m.GetAttributes() & (MOD_THROUGH_HOLE | MOD_SMD | MOD_EXCLUDE_FROM_POS_FILES) == MOD_SMD
@staticmethod
def is_not_virtual_5(m):