Run ImpedenceFinder Z0 on routed signal nets during project analysis.
Pipeline samples PCB traces when stackup εr/h is present; power/ground are skipped. Named nets can be re-analyzed from the Impedance tab. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import type {
|
||||
DesignGraph,
|
||||
DeratingRow,
|
||||
ImpedanceKind,
|
||||
ImpedanceNetsReport,
|
||||
ImpedanceStackupResult,
|
||||
ImpedanceTraceResult,
|
||||
EdifSubDesign,
|
||||
@@ -609,6 +610,43 @@ export async function computeImpedance(body: {
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function fetchImpedanceNets(
|
||||
projectId: string,
|
||||
): Promise<ImpedanceNetsReport> {
|
||||
const res = await authFetch(
|
||||
`${BASE}/api/projects/${projectId}/impedance/nets`,
|
||||
);
|
||||
if (!res.ok) {
|
||||
const detail = await res.json().catch(() => ({ detail: res.statusText }));
|
||||
throw new Error(
|
||||
typeof detail.detail === "string" ? detail.detail : "Impedance nets failed",
|
||||
);
|
||||
}
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function analyzeImpedanceNets(
|
||||
projectId: string,
|
||||
nets: string[],
|
||||
pitch_mm?: number,
|
||||
): Promise<ImpedanceNetsReport> {
|
||||
const res = await authFetch(
|
||||
`${BASE}/api/projects/${projectId}/impedance/nets`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ nets, pitch_mm }),
|
||||
},
|
||||
);
|
||||
if (!res.ok) {
|
||||
const detail = await res.json().catch(() => ({ detail: res.statusText }));
|
||||
throw new Error(
|
||||
typeof detail.detail === "string" ? detail.detail : "Impedance nets failed",
|
||||
);
|
||||
}
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function fetchReport(
|
||||
projectId: string,
|
||||
): Promise<ValidationReport> {
|
||||
|
||||
Reference in New Issue
Block a user