Skip to content

Commit

Permalink
fix missing or incorrect x/y position issues
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed May 15, 2024
1 parent e31abc2 commit 92f13b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/pcb/pcb_silkscreen_circle.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { z } from "zod"
import { distance } from "../units"
import { layer_ref, visible_layer } from "./properties/layer_ref"
import { point } from "src/common/point"

export const pcb_silkscreen_circle = z
.object({
type: z.literal("pcb_silkscreen_circle"),
pcb_silkscreen_circle_id: z.string(),
pcb_component_id: z.string(),
width: distance,
height: distance,
center: point,
radius: distance,
layer: visible_layer,
})
.describe("Defines a silkscreen circle on the PCB")
Expand Down
2 changes: 2 additions & 0 deletions src/pcb/pcb_silkscreen_rect.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { z } from "zod"
import { distance } from "../units"
import { layer_ref, visible_layer } from "./properties/layer_ref"
import { point } from "src/common/point"

export const pcb_silkscreen_rect = z
.object({
type: z.literal("pcb_silkscreen_rect"),
pcb_silkscreen_rect_id: z.string(),
pcb_component_id: z.string(),
center: point,
width: distance,
height: distance,
layer: visible_layer,
Expand Down
4 changes: 2 additions & 2 deletions src/pcb/pcb_silkscreen_text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export const pcb_silkscreen_text = z
.object({
type: z.literal("pcb_silkscreen_text"),
font: z.literal("tscircuit2024").default("tscircuit2024"),
font_size: z.number().default(1),
pcb_component_id: z.string(),
text: z.string(),
layer: visible_layer,
pcbX: z.number(),
pcbY: z.number(),
center: point,
})
.describe("Defines silkscreen text on the PCB")

Expand Down

0 comments on commit 92f13b4

Please sign in to comment.