Added: position files now can include virtual components.
Related to #106
This commit is contained in:
parent
c91d84c1f3
commit
bb27491313
|
|
@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
PCB files. (#93)
|
||||
- Support for new KiCost options `split_extra_fields` and `board_qty`. (#120)
|
||||
- Datasheet downloader. (#119)
|
||||
- Position files now can include virtual components. (#106)
|
||||
|
||||
### Changed
|
||||
- Internal BoM: now components with different Tolerance, Voltage, Current
|
||||
|
|
|
|||
|
|
@ -1594,6 +1594,7 @@ Next time you need this list just use an alias, like this:
|
|||
- `dnf_filter`: [string|list(string)='_none'] Name of the filter to mark components as not fitted.
|
||||
A short-cut to use for simple cases where a variant is an overkill.
|
||||
- `format`: [string='ASCII'] [ASCII,CSV] Format for the position file.
|
||||
- `include_virtual`: [boolean=false] Include virtual components. For special purposes, not pick & place.
|
||||
- `only_smd`: [boolean=true] Only include the surface mount components.
|
||||
- `output`: [string='%f-%i%v.%x'] Output file name (%i='top_pos'|'bottom_pos'|'both_pos', %x='pos'|'csv'). Affected by global options.
|
||||
- `separate_files_for_front_and_back`: [boolean=true] Generate two separated files, one for the top and another for the bottom.
|
||||
|
|
|
|||
|
|
@ -1048,6 +1048,8 @@ outputs:
|
|||
dnf_filter: '_none'
|
||||
# [string='ASCII'] [ASCII,CSV] Format for the position file
|
||||
format: 'ASCII'
|
||||
# [boolean=false] Include virtual components. For special purposes, not pick & place
|
||||
include_virtual: false
|
||||
# [boolean=true] Only include the surface mount components
|
||||
only_smd: true
|
||||
# [string='%f-%i%v.%x'] Output file name (%i='top_pos'|'bottom_pos'|'both_pos', %x='pos'|'csv'). Affected by global options
|
||||
|
|
|
|||
|
|
@ -69,7 +69,9 @@ class PositionOptions(VariantOptions):
|
|||
self.bottom_negative_x = False
|
||||
""" Use negative X coordinates for footprints on bottom layer """
|
||||
self.use_aux_axis_as_origin = True
|
||||
""" Use the auxiliary axis as origin for coordinates (KiCad default)"""
|
||||
""" Use the auxiliary axis as origin for coordinates (KiCad default) """
|
||||
self.include_virtual = False
|
||||
""" Include virtual components. For special purposes, not pick & place """
|
||||
super().__init__()
|
||||
self._expand_id = 'position'
|
||||
|
||||
|
|
@ -249,7 +251,7 @@ class PositionOptions(VariantOptions):
|
|||
is_bottom = m.IsFlipped()
|
||||
rotation = m.GetOrientationDegrees()
|
||||
# If passed check the position options
|
||||
if (self.only_smd and is_pure_smd(m)) or (not self.only_smd and is_not_virtual(m)):
|
||||
if (self.only_smd and is_pure_smd(m)) or (not self.only_smd and (is_not_virtual(m) or self.include_virtual)):
|
||||
if GS.ki5():
|
||||
center = m.GetCenter()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue