Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions web/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ <h2>Page settings</h2>
intended placement. In that case it'll help to extend the canvas size inside Affinity to be square. Make sure to select "Anchor on page" to preserve your designs aspect ratio.
</p>

<h3>Inkscape document scale</h3>
<p>If you're using Inkscape, set the document scale explicitly. Open <strong>File-&gt;Document Properties</strong>
and set the document <strong>Scale</strong> value to <code>0.01</code>, as shown here:</p>
<img src="./images/inkscape-document-properties.png">
<p>This ensures that measurements in your SVG correspond directly to millimeters in KiCAD and helps avoid scaling issues when converting your design.</p>

<h2>Creating an outline</h2>
<p>The outline should be drawn on a layer named <code>Edge.Cuts</code> in your vector editor. Gingerbread handles this layer in a specific way to make sure that there is a 1-to-1 match
between the size and units in the SVG and KiCAD. This approach can't handle as many complex edge cases as the rasterization approach used by the graphic layers, but as
Expand Down
Binary file added web/images/inkscape-document-properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion web/scripts/path-data-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -1033,8 +1033,9 @@ if (!SVGPathElement.prototype.getPathData || !SVGPathElement.prototype.setPathDa
];

// Get rid of redundant "A" segs when either rx or ry is 0
// (i.e. drop zero-radius arcs, keep everything else including the initial M).
pathData = pathData.filter((s) => {
return s.type === "A" && (s.values[0] === 0 || s.values[1] === 0);
return !(s.type === "A" && (s.values[0] === 0 || s.values[1] === 0));
});

if (options && options.normalize === true) {
Expand Down
4 changes: 3 additions & 1 deletion web/scripts/yak.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,11 @@ export function* SVGElement_to_paths(elm) {
for (const child of elm.children) {
yield* SVGElement_to_paths(child);
}
} else {
} else if (elm instanceof SVGGeometryElement || (elm.getPathData && typeof elm.getPathData === 'function')) {
// Only process elements that are geometry elements or have getPathData method
yield* SVGGeometryElement_to_paths(elm);
}
// Skip non-geometry elements like <defs>, <text>, <title>, etc.
}

/*
Expand Down