Single key column name simplification
This commit is contained in:
parent
8748a37c04
commit
c6f4832ee4
6 changed files with 116 additions and 15 deletions
12
roadmap.md
12
roadmap.md
|
@ -6,27 +6,27 @@
|
||||||
|
|
||||||
### Major
|
### 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
|
- 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
|
- 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
|
- Restructure pcb point/footprint filtering
|
||||||
- Use the same `what`/`where` infrastructure as outlines
|
- Use the same `what`/`where` infrastructure as outlines
|
||||||
- Collapse params/nets/anchors into a single hierarchy from the user's POV
|
- Collapse params/nets/anchors into a single hierarchy from the user's POV
|
||||||
- Add per-footprint mirror support
|
- 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.
|
- 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!
|
- 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.
|
- 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)
|
- 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.
|
- 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)
|
- 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
|
### 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
|
- Shift/rotate/scale for outline elements before layout
|
||||||
- Allow footprints to publish outlines
|
- Allow footprints to publish outlines
|
||||||
- Make these usable in the `outlines` section through a new `what`
|
- Make these usable in the `outlines` section through a new `what`
|
||||||
|
|
|
@ -294,13 +294,16 @@ exports.parse = (config, units) => {
|
||||||
// creating new points
|
// creating new points
|
||||||
let new_points = render_zone(zone_name, zone, anchor, global_key, units)
|
let new_points = render_zone(zone_name, zone, anchor, global_key, units)
|
||||||
|
|
||||||
// simplifying the names in individual point "zones"
|
// simplifying the names in individual point "zones" and single-key columns
|
||||||
const new_keys = Object.keys(new_points)
|
while (Object.keys(new_points).some(k => k.endsWith('_default'))) {
|
||||||
const individual_key = `${zone_name}_default_default`
|
for (const key of Object.keys(new_points)) {
|
||||||
if (new_keys.length == 1 && new_keys[0] == individual_key) {
|
if (key.endsWith('_default')) {
|
||||||
new_points[zone_name] = new_points[individual_key]
|
const new_key = key.slice(0, -8)
|
||||||
new_points[zone_name].meta.name = zone_name
|
new_points[new_key] = new_points[key]
|
||||||
delete new_points[individual_key]
|
new_points[new_key].meta.name = new_key
|
||||||
|
delete new_points[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// adjusting new points
|
// adjusting new points
|
||||||
|
|
|
@ -26,7 +26,7 @@ exports.template = (str, vals={}) => {
|
||||||
const replacement = deep(vals, match[1]) || ''
|
const replacement = deep(vals, match[1]) || ''
|
||||||
res = res.substring(0, match.index + shift)
|
res = res.substring(0, match.index + shift)
|
||||||
+ replacement
|
+ replacement
|
||||||
+ res.substring(match.index + match[0].length)
|
+ res.substring(match.index + shift + match[0].length)
|
||||||
shift += replacement.length - match[0].length
|
shift += replacement.length - match[0].length
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
points.zones.matrix:
|
points.zones:
|
||||||
|
matrix:
|
||||||
|
single_key_column:
|
||||||
|
columns:
|
||||||
|
named:
|
|
@ -93,6 +93,54 @@ LINE
|
||||||
21
|
21
|
||||||
9
|
9
|
||||||
0
|
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
|
ENDSEC
|
||||||
0
|
0
|
||||||
EOF
|
EOF
|
|
@ -41,5 +41,51 @@
|
||||||
0
|
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
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue