Skip to content

Commit

Permalink
[Position][Fixed] "Exclude from position files" not excluded
Browse files Browse the repository at this point in the history
- When only SMD components are selected.

See #429
  • Loading branch information
set-soft committed May 4, 2023
1 parent 6a1d6d3 commit 66b0c20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions kibot/out_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def __init__(self):
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'

Expand Down Expand Up @@ -197,7 +199,7 @@ def is_pure_smd_5(m):

@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):
Expand Down

0 comments on commit 66b0c20

Please sign in to comment.