Base key-level defaults around u
This commit is contained in:
parent
9bdcd36d1a
commit
67e01ed4f9
3 changed files with 7 additions and 9 deletions
|
@ -6,10 +6,6 @@
|
||||||
|
|
||||||
### Major
|
### Major
|
||||||
|
|
||||||
- For rectangles and other non-`keys` outline types, upgrade `ref` to full anchor support (including multi-anchors!)
|
|
||||||
- Base key-level defaults (and many other things) around u's
|
|
||||||
- Possibly breaking, as from here on out, changing `u` affects more than it did before
|
|
||||||
|
|
||||||
### Minor
|
### Minor
|
||||||
|
|
||||||
- Global column-level attributes like spread
|
- Global column-level attributes like spread
|
||||||
|
@ -19,7 +15,6 @@
|
||||||
- Add a way to globally enable/disable references (`ref_hide`)
|
- Add a way to globally enable/disable references (`ref_hide`)
|
||||||
- SVG input (for individual outlines, or even combinations parsed by line color, etc.)
|
- SVG input (for individual outlines, or even combinations parsed by line color, etc.)
|
||||||
- Look into gr_curve to possibly add beziers to the kicad conversion
|
- Look into gr_curve to possibly add beziers to the kicad conversion
|
||||||
- Support opting out of gluing altogether
|
|
||||||
- Support specifying keys/labels for the pcb section (not just blindly assuming all)
|
- Support specifying keys/labels for the pcb section (not just blindly assuming all)
|
||||||
- Should add `p`, `pcx`, and `pcy` as units for padding calculations
|
- Should add `p`, `pcx`, and `pcy` as units for padding calculations
|
||||||
- Add snappable line footprint
|
- Add snappable line footprint
|
||||||
|
@ -66,6 +61,9 @@
|
||||||
- Units separated to their own block at the front
|
- Units separated to their own block at the front
|
||||||
- Key-level `width` and `height` are supported during visualization
|
- Key-level `width` and `height` are supported during visualization
|
||||||
- This key-level example should probably be added from discord: https://discord.com/channels/714176584269168732/759825860617437204/773104093546676244
|
- This key-level example should probably be added from discord: https://discord.com/channels/714176584269168732/759825860617437204/773104093546676244
|
||||||
|
- Change outline fields to have their full anchor support documented
|
||||||
|
- Mention the ability to opt out of gluing!
|
||||||
|
- Key-level defaults are based around u's, not 19!
|
||||||
- Contribution guidelines
|
- Contribution guidelines
|
||||||
- including test commands (npm test, npm run coverage, --what switch, --dump switch)
|
- including test commands (npm test, npm run coverage, --what switch, --dump switch)
|
||||||
- Changelog, Roadmap
|
- Changelog, Roadmap
|
||||||
|
|
|
@ -45,7 +45,7 @@ const process = async (raw, debug=false, logger=()=>{}) => {
|
||||||
}
|
}
|
||||||
if (debug) {
|
if (debug) {
|
||||||
results.points = points
|
results.points = points
|
||||||
results.demo = io.twodee(points_lib.visualize(points), debug)
|
results.demo = io.twodee(points_lib.visualize(points, units), debug)
|
||||||
}
|
}
|
||||||
|
|
||||||
logger('Generating outlines...')
|
logger('Generating outlines...')
|
||||||
|
|
|
@ -312,11 +312,11 @@ exports.parse = (config, units) => {
|
||||||
return filtered
|
return filtered
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.visualize = (points) => {
|
exports.visualize = (points, units) => {
|
||||||
const models = {}
|
const models = {}
|
||||||
for (const [pname, p] of Object.entries(points)) {
|
for (const [pname, p] of Object.entries(points)) {
|
||||||
const w = (p.meta.width * 19) - 1
|
const w = (p.meta.width * units.u) - 1
|
||||||
const h = (p.meta.height * 19) - 1
|
const h = (p.meta.height * units.u) - 1
|
||||||
const rect = u.rect(w, h, [-w/2, -h/2])
|
const rect = u.rect(w, h, [-w/2, -h/2])
|
||||||
models[pname] = p.position(rect)
|
models[pname] = p.position(rect)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue