-
Notifications
You must be signed in to change notification settings - Fork 36
add suport rect_border_radius to smtpads and plated hole #501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| 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, | ||
| } |
There was a problem hiding this comment.
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)
Is this helpful? React 👍 or 👎 to let us know.
No description provided.