Add layer option to move_component to support flipping components
Adds an optional `layer` parameter (e.g., 'F.Cu', 'B.Cu') to the move_component tool. When specified, the component is flipped to the target layer if it's not already on it. The response now also includes the component's layer after the move. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -117,8 +117,12 @@ export function registerComponentTools(
|
||||
.number()
|
||||
.optional()
|
||||
.describe("Optional new rotation in degrees"),
|
||||
layer: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe("Optional target layer (e.g., 'F.Cu', 'B.Cu') - flips component if needed"),
|
||||
},
|
||||
async ({ reference, position, rotation }) => {
|
||||
async ({ reference, position, rotation, layer }) => {
|
||||
logger.debug(
|
||||
`Moving component: ${reference} to ${position.x},${position.y} ${position.unit}`,
|
||||
);
|
||||
@@ -126,6 +130,7 @@ export function registerComponentTools(
|
||||
reference,
|
||||
position,
|
||||
rotation,
|
||||
layer,
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user