@tscircuit/core 0.0.809 → 0.0.810
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 +13 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13454,16 +13454,25 @@ import {
|
|
|
13454
13454
|
checkPcbComponentOverlap
|
|
13455
13455
|
} from "@tscircuit/checks";
|
|
13456
13456
|
import { getBoundsFromPoints as getBoundsFromPoints4 } from "@tscircuit/math-utils";
|
|
13457
|
+
var MIN_EFFECTIVE_BORDER_RADIUS_MM = 0.01;
|
|
13457
13458
|
var getRoundedRectOutline = (width, height, radius) => {
|
|
13458
|
-
const
|
|
13459
|
+
const w2 = width / 2;
|
|
13460
|
+
const h2 = height / 2;
|
|
13461
|
+
const r = Math.min(radius, w2, h2);
|
|
13462
|
+
if (r < MIN_EFFECTIVE_BORDER_RADIUS_MM) {
|
|
13463
|
+
return [
|
|
13464
|
+
{ x: -w2, y: -h2 },
|
|
13465
|
+
{ x: w2, y: -h2 },
|
|
13466
|
+
{ x: w2, y: h2 },
|
|
13467
|
+
{ x: -w2, y: h2 }
|
|
13468
|
+
];
|
|
13469
|
+
}
|
|
13459
13470
|
const maxArcLengthPerSegment = 0.1;
|
|
13460
13471
|
const segments = Math.max(
|
|
13461
13472
|
1,
|
|
13462
13473
|
Math.ceil(Math.PI / 2 * r / maxArcLengthPerSegment)
|
|
13463
13474
|
);
|
|
13464
13475
|
const step = Math.PI / 2 / segments;
|
|
13465
|
-
const w2 = width / 2;
|
|
13466
|
-
const h2 = height / 2;
|
|
13467
13476
|
const outline = [];
|
|
13468
13477
|
outline.push({ x: -w2 + r, y: -h2 });
|
|
13469
13478
|
outline.push({ x: w2 - r, y: -h2 });
|
|
@@ -17211,7 +17220,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
17211
17220
|
var package_default = {
|
|
17212
17221
|
name: "@tscircuit/core",
|
|
17213
17222
|
type: "module",
|
|
17214
|
-
version: "0.0.
|
|
17223
|
+
version: "0.0.809",
|
|
17215
17224
|
types: "dist/index.d.ts",
|
|
17216
17225
|
main: "dist/index.js",
|
|
17217
17226
|
module: "dist/index.js",
|