1
0

Single key column name simplification

This commit is contained in:
Bán Dénes 2022-04-16 12:44:55 +02:00
parent 8748a37c04
commit c6f4832ee4
6 changed files with 116 additions and 15 deletions

View File

@ -6,27 +6,27 @@
### Major
- key-level access to full anchors
- Gut standalone 3d output, only different scripts for different integrations
- Key-level access to full anchors
- this could provide extra variables `padding`, `spread`, `splay` for custom layout purposes
- make row anchors cumulative, too (like columns), so fingers arcs and other edits can happen
- remove `_default` suffix for only column keys (like for single point zones)
- Restructure pcb point/footprint filtering
- Use the same `what`/`where` infrastructure as outlines
- Collapse params/nets/anchors into a single hierarchy from the user's POV
- Add per-footprint mirror support
- Add some way for footprints to be able to "resist" the mirroring-related special treatment of negative X shift, rotation, etc.
- Merge, generalize, uniform-ize and externalize footprints!
- Separate npm package for dependency, onnx-like incremental opset versioning
- onnx-like incremental opset versioning
- Template for creating them, built-in variables they can use, documentation, external links, etc.
- Add access to whole set of points + filtering logic, so they can implement their own connection logic as well maybe (see daisy chaining)
- Also considering how (or, on which layer) they define their silks, universal mirroring behaviour, etc.
- Rename class to designator in this context (https://en.wikipedia.org/wiki/Reference_designator#Designators)
- Include raw kicad footprint integrations
- pull torik's script to be able to convert raw kicad footprints into positionable ergogen ones
- have a `dummy` footprint which can just be updated from schematic
### Minor
- Include raw kicad footprint integrations
- pull torik's script to be able to convert raw kicad footprints into positionable ergogen ones
- have a `dummy` footprint which can just be updated from schematic
- Shift/rotate/scale for outline elements before layout
- Allow footprints to publish outlines
- Make these usable in the `outlines` section through a new `what`

View File

@ -294,13 +294,16 @@ exports.parse = (config, units) => {
// creating new points
let new_points = render_zone(zone_name, zone, anchor, global_key, units)
// simplifying the names in individual point "zones"
const new_keys = Object.keys(new_points)
const individual_key = `${zone_name}_default_default`
if (new_keys.length == 1 && new_keys[0] == individual_key) {
new_points[zone_name] = new_points[individual_key]
new_points[zone_name].meta.name = zone_name
delete new_points[individual_key]
// simplifying the names in individual point "zones" and single-key columns
while (Object.keys(new_points).some(k => k.endsWith('_default'))) {
for (const key of Object.keys(new_points)) {
if (key.endsWith('_default')) {
const new_key = key.slice(0, -8)
new_points[new_key] = new_points[key]
new_points[new_key].meta.name = new_key
delete new_points[key]
}
}
}
// adjusting new points

View File

@ -26,7 +26,7 @@ exports.template = (str, vals={}) => {
const replacement = deep(vals, match[1]) || ''
res = res.substring(0, match.index + shift)
+ replacement
+ res.substring(match.index + match[0].length)
+ res.substring(match.index + shift + match[0].length)
shift += replacement.length - match[0].length
}
return res

View File

@ -1 +1,5 @@
points.zones.matrix:
points.zones:
matrix:
single_key_column:
columns:
named:

View File

@ -93,6 +93,54 @@ LINE
21
9
0
LINE
8
0
10
-9
20
9
11
9
21
9
0
LINE
8
0
10
9
20
9
11
9
21
-9
0
LINE
8
0
10
9
20
-9
11
-9
21
-9
0
LINE
8
0
10
-9
20
-9
11
-9
21
9
0
ENDSEC
0
EOF

View File

@ -41,5 +41,51 @@
0
]
}
},
"single_key_column_named": {
"x": 0,
"y": 0,
"r": 0,
"meta": {
"stagger": 0,
"spread": 0,
"splay": 0,
"origin": [
0,
0
],
"orient": 0,
"shift": [
0,
0
],
"rotate": 0,
"width": 18,
"height": 18,
"padding": 19,
"autobind": 10,
"skip": false,
"asym": "both",
"colrow": "named_default",
"name": "single_key_column_named",
"zone": {
"columns": {
"named": null
},
"name": "single_key_column"
},
"col": {
"rows": {},
"key": {},
"name": "named"
},
"row": "default",
"bind": [
0,
0,
0,
0
]
}
}
}