API: Add initial definitions for dimensions

This commit is contained in:
Jon Evans
2024-11-29 21:18:51 -05:00
parent 410868253a
commit 49d5e64428
9 changed files with 453 additions and 40 deletions
+16
View File
@@ -274,6 +274,22 @@ HANDLER_RESULT<ItemRequestStatus> API_HANDLER_PCB::handleCreateUpdateItemsIntern
continue;
}
if( type == PCB_DIMENSION_T )
{
board::types::Dimension dimension;
anyItem.UnpackTo( &dimension );
switch( dimension.dimension_style_case() )
{
case board::types::Dimension::kAligned: type = PCB_DIM_ALIGNED_T; break;
case board::types::Dimension::kOrthogonal: type = PCB_DIM_ORTHOGONAL_T; break;
case board::types::Dimension::kRadial: type = PCB_DIM_RADIAL_T; break;
case board::types::Dimension::kLeader: type = PCB_DIM_LEADER_T; break;
case board::types::Dimension::kCenter: type = PCB_DIM_CENTER_T; break;
case board::types::Dimension::DIMENSION_STYLE_NOT_SET: break;
}
}
HANDLER_RESULT<std::unique_ptr<BOARD_ITEM>> creationResult =
createItemForType( *type, container );