circuit-json 0.0.493 → 0.0.494
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/README.md +112 -0
- package/dist/index.d.mts +236 -5
- package/dist/index.mjs +558 -529
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -138,6 +138,8 @@ https://github.com/user-attachments/assets/2f28b7ba-689e-4d80-85b2-5bdef84b41f8
|
|
|
138
138
|
- [PcbGroundPlaneRegion](#pcbgroundplaneregion)
|
|
139
139
|
- [PcbGroup](#pcbgroup)
|
|
140
140
|
- [PcbHole](#pcbhole)
|
|
141
|
+
- [PcbKeepout](#pcbkeepout)
|
|
142
|
+
- [PcbKeepoutOverlapWarning](#pcbkeepoutoverlapwarning)
|
|
141
143
|
- [PcbManualEditConflictWarning](#pcbmanualeditconflictwarning)
|
|
142
144
|
- [PcbMissingFootprintError](#pcbmissingfootprinterror)
|
|
143
145
|
- [PcbNet](#pcbnet)
|
|
@@ -2059,6 +2061,116 @@ interface PcbHoleCircle {
|
|
|
2059
2061
|
}
|
|
2060
2062
|
```
|
|
2061
2063
|
|
|
2064
|
+
### PcbKeepout
|
|
2065
|
+
|
|
2066
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_keepout.ts)
|
|
2067
|
+
|
|
2068
|
+
A keepout region on specified PCB layers, with rectangle, circle, or outline geometry.
|
|
2069
|
+
|
|
2070
|
+
`warning_only: true` makes the region advisory: routing and copper placement may
|
|
2071
|
+
cross it, and overlap checks should emit `pcb_keepout_overlap_warning` records
|
|
2072
|
+
instead of errors for that keepout. Omitted or `false` retains normal enforcement.
|
|
2073
|
+
The parser preserves omission; it does not insert a default. Only boolean values
|
|
2074
|
+
are accepted. `excluded_pcb_component_ids` continues to exempt the listed
|
|
2075
|
+
components from keepout diagnostics, including warnings.
|
|
2076
|
+
|
|
2077
|
+
This is a data contract: parsing a keepout does not run routing or DRC. Producers
|
|
2078
|
+
and consumers must implement the advisory behavior. Unrelated DRC violations and
|
|
2079
|
+
violations of other, enforcing keepouts remain errors. Existing documents require
|
|
2080
|
+
no migration; older consumers may ignore the flag and enforce the region normally.
|
|
2081
|
+
|
|
2082
|
+
```typescript
|
|
2083
|
+
interface PcbKeepoutOutline {
|
|
2084
|
+
type: "pcb_keepout"
|
|
2085
|
+
shape: "outline"
|
|
2086
|
+
pcb_group_id?: string
|
|
2087
|
+
subcircuit_id?: string
|
|
2088
|
+
outline: Point[]
|
|
2089
|
+
stroke_width: Length
|
|
2090
|
+
pcb_keepout_id: string
|
|
2091
|
+
layers: string[]
|
|
2092
|
+
description?: string
|
|
2093
|
+
/** PCB components excluded from keepout DRC enforcement. */
|
|
2094
|
+
excluded_pcb_component_ids?: string[]
|
|
2095
|
+
/**
|
|
2096
|
+
* When true, this keepout is advisory: it does not block routing or copper
|
|
2097
|
+
* placement, and DRC reports overlaps as pcb_keepout_overlap_warning records.
|
|
2098
|
+
* False or omitted preserves normal enforcement. Component exclusions still apply.
|
|
2099
|
+
*/
|
|
2100
|
+
warning_only?: boolean
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
interface PCBKeepoutRect {
|
|
2104
|
+
type: "pcb_keepout"
|
|
2105
|
+
shape: "rect"
|
|
2106
|
+
pcb_group_id?: string
|
|
2107
|
+
subcircuit_id?: string
|
|
2108
|
+
center: Point
|
|
2109
|
+
width: number
|
|
2110
|
+
height: number
|
|
2111
|
+
pcb_keepout_id: string
|
|
2112
|
+
layers: string[]
|
|
2113
|
+
description?: string
|
|
2114
|
+
/** PCB components excluded from keepout DRC enforcement. */
|
|
2115
|
+
excluded_pcb_component_ids?: string[]
|
|
2116
|
+
/**
|
|
2117
|
+
* When true, this keepout is advisory: it does not block routing or copper
|
|
2118
|
+
* placement, and DRC reports overlaps as pcb_keepout_overlap_warning records.
|
|
2119
|
+
* False or omitted preserves normal enforcement. Component exclusions still apply.
|
|
2120
|
+
*/
|
|
2121
|
+
warning_only?: boolean
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
interface PCBKeepoutCircle {
|
|
2125
|
+
type: "pcb_keepout"
|
|
2126
|
+
shape: "circle"
|
|
2127
|
+
pcb_group_id?: string
|
|
2128
|
+
subcircuit_id?: string
|
|
2129
|
+
center: Point
|
|
2130
|
+
radius: number
|
|
2131
|
+
pcb_keepout_id: string
|
|
2132
|
+
layers: string[]
|
|
2133
|
+
description?: string
|
|
2134
|
+
/** PCB components excluded from keepout DRC enforcement. */
|
|
2135
|
+
excluded_pcb_component_ids?: string[]
|
|
2136
|
+
/**
|
|
2137
|
+
* When true, this keepout is advisory: it does not block routing or copper
|
|
2138
|
+
* placement, and DRC reports overlaps as pcb_keepout_overlap_warning records.
|
|
2139
|
+
* False or omitted preserves normal enforcement. Component exclusions still apply.
|
|
2140
|
+
*/
|
|
2141
|
+
warning_only?: boolean
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
type PCBKeepout = PCBKeepoutRect | PCBKeepoutCircle | PcbKeepoutOutline
|
|
2145
|
+
```
|
|
2146
|
+
|
|
2147
|
+
### PcbKeepoutOverlapWarning
|
|
2148
|
+
|
|
2149
|
+
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_keepout_overlap_warning.ts)
|
|
2150
|
+
|
|
2151
|
+
Warning emitted when copper overlaps a PCB keepout with warning_only enabled.
|
|
2152
|
+
|
|
2153
|
+
```typescript
|
|
2154
|
+
/** Warning emitted when copper overlaps a PCB keepout with warning_only enabled. */
|
|
2155
|
+
interface PcbKeepoutOverlapWarning {
|
|
2156
|
+
type: "pcb_keepout_overlap_warning"
|
|
2157
|
+
pcb_keepout_overlap_warning_id: string
|
|
2158
|
+
warning_type: "pcb_keepout_overlap_warning"
|
|
2159
|
+
message: string
|
|
2160
|
+
/** The advisory keepout that was overlapped. */
|
|
2161
|
+
pcb_keepout_id: string
|
|
2162
|
+
/** IDs of the components and copper primitives involved in the overlap. */
|
|
2163
|
+
pcb_component_ids?: string[]
|
|
2164
|
+
pcb_trace_ids?: string[]
|
|
2165
|
+
pcb_smtpad_ids?: string[]
|
|
2166
|
+
pcb_plated_hole_ids?: string[]
|
|
2167
|
+
pcb_via_ids?: string[]
|
|
2168
|
+
/** Optional overlap location in PCB coordinates, in millimeters. */
|
|
2169
|
+
center?: Point
|
|
2170
|
+
subcircuit_id?: string
|
|
2171
|
+
}
|
|
2172
|
+
```
|
|
2173
|
+
|
|
2062
2174
|
### PcbManualEditConflictWarning
|
|
2063
2175
|
|
|
2064
2176
|
[Source](https://github.com/tscircuit/circuit-json/blob/main/src/pcb/pcb_manual_edit_conflict_warning.ts)
|