Add invert_bottom parameter
This commit is contained in:
parent
3ddb29ff9e
commit
6e0deccdc1
|
|
@ -343,7 +343,8 @@ Currently the only type available is `generic`.
|
|||
- `extend`: [boolean=true] Extends the internal list of rotations with the one provided.
|
||||
Otherwise just use the provided list.
|
||||
- `name`: [string=''] Used to identify this particular filter definition.
|
||||
- `negative_bottom`: [boolean=true] Rotation for bottom components is computed substracting.
|
||||
- `negative_bottom`: [boolean=true] Rotation for bottom components is computed via subtraction as `(component rot - angle)`.
|
||||
- `invert_bottom`: [boolean=false] Rotation for bottom components is negated.
|
||||
- `rotations`: [list(list(string))] A list of pairs regular expression/rotation.
|
||||
Components matching the regular expression will be rotated the indicated angle.
|
||||
- subparts: Subparts
|
||||
|
|
@ -2181,7 +2182,8 @@ Using it, instead of the internal filter named `_rot_footprint`, is the same her
|
|||
The filter supports the following options:
|
||||
|
||||
- `extend`: [boolean=true] Extends the internal list of rotations with the one provided. Otherwise just use the provided list.
|
||||
- `negative_bottom`: [boolean=true] Rotation for bottom components is computed substracting. Note that this should be coherent with the `bottom_negative_x` of the position output.
|
||||
- `negative_bottom`: [boolean=true] Rotation for bottom components is computed via subtraction as `(component rot - angle)`. Note that this should be coherent with the `bottom_negative_x` of the position output.
|
||||
- `invert_bottom`: [boolean=false] Rotation for bottom components is negated, resulting in either : `(- component rot - angle)` or when combined with `negative_bottom`, `(angle - component rot)`.
|
||||
- `rotations`: [list(list(string))] A list of pairs regular expression/rotation. Components matching the regular expression will be rotated the indicated angle.
|
||||
|
||||
In order to add a new rotation or just change an existing one you just need to use the `rotations` option.
|
||||
|
|
|
|||
|
|
@ -1175,7 +1175,8 @@ Using it, instead of the internal filter named `_rot_footprint`, is the same her
|
|||
The filter supports the following options:
|
||||
|
||||
- `extend`: [boolean=true] Extends the internal list of rotations with the one provided. Otherwise just use the provided list.
|
||||
- `negative_bottom`: [boolean=true] Rotation for bottom components is computed substracting. Note that this should be coherent with the `bottom_negative_x` of the position output.
|
||||
- `negative_bottom`: [boolean=true] Rotation for bottom components is computed via substracting. Note that this should be coherent with the `bottom_negative_x` of the position output.
|
||||
- `invert_bottom`: [boolean=false] Rotation for bottom components is negated, resulting in either : `(- component rot - angle)` or when combined with `negative_bottom`, `(angle - component rot)`
|
||||
- `rotations`: [list(list(string))] A list of pairs regular expression/rotation. Components matching the regular expression will be rotated the indicated angle.
|
||||
|
||||
In order to add a new rotation or just change an existing one you just need to use the `rotations` option.
|
||||
|
|
|
|||
|
|
@ -61,7 +61,9 @@ class Rot_Footprint(BaseFilter): # noqa: F821
|
|||
""" Extends the internal list of rotations with the one provided.
|
||||
Otherwise just use the provided list """
|
||||
self.negative_bottom = True
|
||||
""" Rotation for bottom components is computed substracting """
|
||||
""" Rotation for bottom components is computed via substracting """
|
||||
self.invert_bottom = False
|
||||
""" Rotation for bottom components is negated """
|
||||
self.rotations = Optionable
|
||||
""" [list(list(string))] A list of pairs regular expression/rotation.
|
||||
Components matching the regular expression will be rotated the indicated angle """
|
||||
|
|
@ -96,6 +98,8 @@ class Rot_Footprint(BaseFilter): # noqa: F821
|
|||
comp.footprint_rot -= angle
|
||||
else:
|
||||
comp.footprint_rot += angle
|
||||
if self.invert_bottom and comp.bottom:
|
||||
comp.footprint_rot = -comp.footprint_rot
|
||||
comp.footprint_rot = comp.footprint_rot % 360
|
||||
if GS.debug_level > 2:
|
||||
logger.debug('Rotating ref: {} {}: {} -> {}'.
|
||||
|
|
|
|||
Loading…
Reference in New Issue