Skip to content

Conversation

@techmannih
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Sep 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
3d-viewer Ready Ready Preview Comment Sep 22, 2025 4:38pm

Comment on lines +1 to +95
import { CadViewer } from "src/CadViewer"

const roundedRectPadsCircuit = [
{
type: "pcb_board",
pcb_board_id: "board-rounded-rects",
center: { x: 0, y: 0 },
thickness: 1.6,
num_layers: 2,
width: 70,
height: 40,
},
{
type: "pcb_component",
pcb_component_id: "component-rounded",
source_component_id: "component-rounded",
center: { x: -15, y: 0 },
width: 6,
height: 6,
layer: "top",
rotation: 0,
},
{
type: "pcb_smtpad",
pcb_smtpad_id: "pad-top-rounded",
pcb_component_id: "component-rounded",
layer: "top",
shape: "rect",
width: 4,
height: 2,
x: -22,
y: 6,
rect_border_radius: 0.6,
},
{
type: "pcb_smtpad",
pcb_smtpad_id: "pad-bottom-rounded",
pcb_component_id: "component-rounded",
layer: "top",
shape: "rotated_rect",
width: 4,
height: 2,
x: -2,
y: -6,
ccw_rotation: 35,
rect_border_radius: 0.6,
},
{
type: "pcb_plated_hole",
pcb_plated_hole_id: "ph-circular",
x: 5,
y: 8,
shape: "circular_hole_with_rect_pad",
layers: ["top", "bottom"],
hole_diameter: 1.2,
rect_pad_width: 3,
rect_pad_height: 2.4,
rect_pad_border_radius: 0.6,
},
{
type: "pcb_plated_hole",
pcb_plated_hole_id: "ph-pill-horizontal",
x: 7,
y: -8,
shape: "pill_hole_with_rect_pad",
layers: ["top", "bottom"],
hole_width: 3.2,
hole_height: 1.6,
rect_pad_width: 4.5,
rect_pad_height: 2.4,
rect_pad_border_radius: 0.6,
},
{
type: "pcb_plated_hole",
pcb_plated_hole_id: "ph-pill-vertical",
x: 10,
y: 8,
shape: "pill_hole_with_rect_pad",
layers: ["top", "bottom"],
hole_width: 1.6,
hole_height: 3.2,
rect_pad_width: 2.4,
rect_pad_height: 4.5,
rect_pad_border_radius: 0.6,
},
] as const

export const RoundedRectPadsDemo = () => (
<CadViewer circuitJson={roundedRectPadsCircuit as any} />
)

export default {
title: "Rounded Geometry",
component: RoundedRectPadsDemo,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file name RoundedRectPads.stories.tsx does not follow the project's kebab-case naming convention. Rename the file to rounded-rect-pads.stories.tsx to maintain consistency with the established naming pattern used throughout the codebase.

Spotted by Diamond (based on custom rule: Custom rule)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@seveibar seveibar merged commit 3a6f2a5 into tscircuit:main Oct 2, 2025
6 checks passed
@techmannih techmannih deleted the rounded branch October 9, 2025 11:54
@techmannih techmannih changed the title add supoort rect_border_radius to smtpads and plated hole add suport rect_border_radius to smtpads and plated hole Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants