@pcbjs/compile 0.0.0 → 0.0.1-next.9029beb783788cfbb471cc9d57e1b47864c6eaa6
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/LICENSE +21 -0
- package/dist/autoroute.d.ts +46 -0
- package/dist/autoroute.js +3052 -0
- package/dist/bare.d.ts +3 -0
- package/dist/bare.js +17 -0
- package/dist/bom.d.ts +14 -0
- package/dist/bom.js +36 -0
- package/dist/connectivity.d.ts +39 -0
- package/dist/connectivity.js +196 -0
- package/dist/copper.d.ts +19 -0
- package/dist/copper.js +98 -0
- package/dist/drc-reference.d.ts +5 -0
- package/dist/drc-reference.js +177 -0
- package/dist/drc.d.ts +12 -0
- package/dist/drc.js +687 -0
- package/dist/flatten.d.ts +105 -0
- package/dist/flatten.js +1976 -0
- package/dist/geom.d.ts +63 -0
- package/dist/geom.js +265 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +230 -0
- package/dist/layers.d.ts +8 -0
- package/dist/layers.js +72 -0
- package/dist/length.d.ts +69 -0
- package/dist/length.js +179 -0
- package/dist/loops.d.ts +19 -0
- package/dist/loops.js +206 -0
- package/dist/mask.d.ts +7 -0
- package/dist/mask.js +23 -0
- package/dist/meander.d.ts +50 -0
- package/dist/meander.js +163 -0
- package/dist/models.d.ts +23 -0
- package/dist/models.js +109 -0
- package/dist/neck.d.ts +45 -0
- package/dist/neck.js +154 -0
- package/dist/netclass.d.ts +78 -0
- package/dist/netclass.js +210 -0
- package/dist/obstacles.d.ts +105 -0
- package/dist/obstacles.js +412 -0
- package/dist/pair-info.d.ts +37 -0
- package/dist/pair-info.js +112 -0
- package/dist/pair-lay.d.ts +103 -0
- package/dist/pair-lay.js +513 -0
- package/dist/pair-tune.d.ts +29 -0
- package/dist/pair-tune.js +133 -0
- package/dist/pair.d.ts +131 -0
- package/dist/pair.js +460 -0
- package/dist/path.d.ts +44 -0
- package/dist/path.js +341 -0
- package/dist/reference.d.ts +62 -0
- package/dist/reference.js +300 -0
- package/dist/round.d.ts +79 -0
- package/dist/round.js +243 -0
- package/dist/route-cache.d.ts +86 -0
- package/dist/route-cache.js +115 -0
- package/dist/route-findings.d.ts +11 -0
- package/dist/route-findings.js +88 -0
- package/dist/route-path.d.ts +3 -0
- package/dist/route-path.js +112 -0
- package/dist/route-shape.d.ts +13 -0
- package/dist/route-shape.js +201 -0
- package/dist/sch-place.d.ts +94 -0
- package/dist/sch-place.js +461 -0
- package/dist/sch-route.d.ts +33 -0
- package/dist/sch-route.js +486 -0
- package/dist/sch.d.ts +10 -0
- package/dist/sch.js +678 -0
- package/dist/scope.d.ts +56 -0
- package/dist/scope.js +424 -0
- package/dist/silk-refs.d.ts +10 -0
- package/dist/silk-refs.js +410 -0
- package/dist/spatial.d.ts +42 -0
- package/dist/spatial.js +124 -0
- package/dist/stitch.d.ts +22 -0
- package/dist/stitch.js +221 -0
- package/dist/teardrop.d.ts +7 -0
- package/dist/teardrop.js +163 -0
- package/dist/tune-space.d.ts +44 -0
- package/dist/tune-space.js +262 -0
- package/dist/tune.d.ts +75 -0
- package/dist/tune.js +600 -0
- package/dist/zones.d.ts +31 -0
- package/dist/zones.js +519 -0
- package/package.json +43 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yuxuan Zhang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AutoRouteJob, Board, DrcMarker, Item, PairInfo, RouteFailure, RouteRecord, RoutingReport } from '@pcbjs/core/model';
|
|
2
|
+
import type { ResolvedRules as Rules } from '@pcbjs/core/types';
|
|
3
|
+
import type { AutoRouteParams, RouteContext, Pos, ResolvedPos, RouteFn } from '@pcbjs/core/types';
|
|
4
|
+
import { RouteCache } from './route-cache.js';
|
|
5
|
+
import { solidRings } from './obstacles.js';
|
|
6
|
+
export declare function resolvePos(board: Board, pos: Pos, defaultLayer: string): ResolvedPos;
|
|
7
|
+
export { solidRings };
|
|
8
|
+
/** The board's obstacles for one route, without `exclude`; `soft` items are negotiation's to price, and `twin.partner` counts as `twin.net`. */
|
|
9
|
+
export declare function buildLayout(board: Board, exclude?: Set<number>, rules?: Rules, soft?: Item[], twin?: {
|
|
10
|
+
net: string;
|
|
11
|
+
partner: string;
|
|
12
|
+
}): RouteContext;
|
|
13
|
+
export declare const straight: RouteFn;
|
|
14
|
+
export declare const maze: RouteFn;
|
|
15
|
+
export declare const routers: {
|
|
16
|
+
maze: RouteFn;
|
|
17
|
+
straight: RouteFn;
|
|
18
|
+
};
|
|
19
|
+
export declare function getRouter(spec: 'maze' | 'straight' | RouteFn | null | undefined): RouteFn;
|
|
20
|
+
export interface AutorouteOptions {
|
|
21
|
+
/** the strictest rules of the variant targets that share the routing */
|
|
22
|
+
rules?: Rules;
|
|
23
|
+
/** throw on the first leg that cannot be routed instead of recording a RouteFailure */
|
|
24
|
+
strict?: boolean;
|
|
25
|
+
cache?: RouteCache | null;
|
|
26
|
+
/** see CompileOptions.progress */
|
|
27
|
+
progress?: (p: RouteProgress) => void;
|
|
28
|
+
}
|
|
29
|
+
/** The router's first pass over every leg, then each negotiation `round` over the legs it routes again. */
|
|
30
|
+
export interface RouteProgress {
|
|
31
|
+
done: number;
|
|
32
|
+
legs: number;
|
|
33
|
+
round?: number;
|
|
34
|
+
}
|
|
35
|
+
/** `loops`: nets with a `.loop()` route; `notes`: the info findings `trunk-narrow` */
|
|
36
|
+
export interface AutorouteOutcome {
|
|
37
|
+
failures: RouteFailure[];
|
|
38
|
+
report: RoutingReport;
|
|
39
|
+
added: Item[];
|
|
40
|
+
pairs?: PairInfo[];
|
|
41
|
+
routes?: RouteRecord[];
|
|
42
|
+
loops?: string[];
|
|
43
|
+
notes?: DrcMarker[];
|
|
44
|
+
}
|
|
45
|
+
/** Places every route's manual commands in document order, then routes the automatic legs by priority and declaration order. */
|
|
46
|
+
export declare function autoroute(board: Board, jobs: AutoRouteJob[], defaults?: AutoRouteParams, opts?: AutorouteOptions): AutorouteOutcome;
|