circuit-to-svg 0.0.148 → 0.0.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -980,6 +980,23 @@ function createSvgObjectsFromSmtPad(pad, ctx) {
|
|
|
980
980
|
}
|
|
981
981
|
];
|
|
982
982
|
}
|
|
983
|
+
if (pad.shape === "circle") {
|
|
984
|
+
const radius = pad.radius * Math.abs(transform.a);
|
|
985
|
+
const [x, y] = applyToPoint11(transform, [pad.x, pad.y]);
|
|
986
|
+
return [
|
|
987
|
+
{
|
|
988
|
+
name: "circle",
|
|
989
|
+
type: "element",
|
|
990
|
+
attributes: {
|
|
991
|
+
class: "pcb-pad",
|
|
992
|
+
fill: layerNameToColor(pad.layer, colorMap2),
|
|
993
|
+
cx: x.toString(),
|
|
994
|
+
cy: y.toString(),
|
|
995
|
+
r: radius.toString()
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
];
|
|
999
|
+
}
|
|
983
1000
|
if (pad.shape === "polygon") {
|
|
984
1001
|
const points = (pad.points ?? []).map(
|
|
985
1002
|
(point) => applyToPoint11(transform, [point.x, point.y])
|