@tscircuit/core 0.0.95 → 0.0.96
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.d.ts +1 -0
- package/dist/index.js +20 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -984,6 +984,9 @@ var Port = class extends PrimitiveComponent {
|
|
|
984
984
|
y: newCenter.y
|
|
985
985
|
});
|
|
986
986
|
}
|
|
987
|
+
_hasMatchedPcbPrimitive() {
|
|
988
|
+
return this.matchedComponents.some((c) => c.isPcbPrimitive);
|
|
989
|
+
}
|
|
987
990
|
};
|
|
988
991
|
|
|
989
992
|
// lib/components/base-components/NormalComponent.ts
|
|
@@ -2598,6 +2601,23 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
|
|
|
2598
2601
|
const { allPortsFound, ports } = this._findConnectedPorts();
|
|
2599
2602
|
const portsConnectedOnPcbViaNet = [];
|
|
2600
2603
|
if (!allPortsFound) return;
|
|
2604
|
+
const portsWithoutMatchedPcbPrimitive = [];
|
|
2605
|
+
for (const port of ports) {
|
|
2606
|
+
if (!port._hasMatchedPcbPrimitive()) {
|
|
2607
|
+
portsWithoutMatchedPcbPrimitive.push(port);
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
if (portsWithoutMatchedPcbPrimitive.length > 0) {
|
|
2611
|
+
db.pcb_trace_error.insert({
|
|
2612
|
+
error_type: "pcb_trace_error",
|
|
2613
|
+
source_trace_id: this.source_trace_id,
|
|
2614
|
+
message: `Some ports did not have a matching PCB primitive (e.g. a pad or plated hole), this can happen if a footprint is missing. As a result, ${this} wasn't routed. Missing ports: ${portsWithoutMatchedPcbPrimitive.map((p) => p.getString()).join(", ")}`,
|
|
2615
|
+
pcb_trace_id: this.pcb_trace_id,
|
|
2616
|
+
pcb_component_ids: [],
|
|
2617
|
+
pcb_port_ids: portsWithoutMatchedPcbPrimitive.map((p) => p.pcb_port_id).filter(Boolean)
|
|
2618
|
+
});
|
|
2619
|
+
return;
|
|
2620
|
+
}
|
|
2601
2621
|
const nets = this._findConnectedNets().netsWithSelectors;
|
|
2602
2622
|
if (ports.length === 0 && nets.length === 2) {
|
|
2603
2623
|
this.renderError(
|