Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/pcb/pcb_board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export const pcb_board = z
),
thickness: length.optional().default(1.4),
num_layers: z.number().optional().default(4),
min_via_diameter: length.optional(),
min_via_hole: length.optional(),
outline: z.array(point).optional(),
shape: z.enum(["rect", "polygon"]).optional(),
material: z.enum(["fr4", "fr1"]).default("fr4"),
Expand All @@ -61,6 +63,8 @@ export interface PcbBoard {
display_offset_y?: string
thickness: Length
num_layers: number
min_via_diameter?: Length
min_via_hole?: Length
center: Point
outline?: Point[]
shape?: "rect" | "polygon"
Expand Down
5 changes: 5 additions & 0 deletions src/source/source_board.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { z } from "zod"
import { length, type Length } from "src/units"
import { expectTypesMatch } from "src/utils/expect-types-match"

export const source_board = z
Expand All @@ -7,6 +8,8 @@ export const source_board = z
source_board_id: z.string(),
source_group_id: z.string(),
title: z.string().optional(),
min_via_diameter: length.optional(),
min_via_hole: length.optional(),
})
.describe("Defines a board in the source domain")

Expand All @@ -21,6 +24,8 @@ export interface SourceBoard {
source_board_id: string
source_group_id: string
title?: string
min_via_diameter?: Length
min_via_hole?: Length
}

expectTypesMatch<SourceBoard, InferredSourceBoard>(true)
Loading