KiCad PCB EDA Suite
|
Functions | |
KICOMMON_API std::optional< KICAD_T > | TypeNameFromAny (const google::protobuf::Any &aMessage) |
KICOMMON_API LIB_ID | LibIdFromProto (const types::LibraryIdentifier &aId) |
KICOMMON_API types::LibraryIdentifier | LibIdToProto (const LIB_ID &aId) |
KICOMMON_API void | PackVector2 (types::Vector2 &aOutput, const VECTOR2I &aInput) |
KICOMMON_API VECTOR2I | UnpackVector2 (const types::Vector2 &aInput) |
KICOMMON_API void | PackVector3D (types::Vector3D &aOutput, const VECTOR3D &aInput) |
KICOMMON_API VECTOR3D | UnpackVector3D (const types::Vector3D &aInput) |
KICOMMON_API void | PackBox2 (types::Box2 &aOutput, const BOX2I &aInput) |
KICOMMON_API BOX2I | UnpackBox2 (const types::Box2 &aInput) |
KICOMMON_API void | PackPolyLine (types::PolyLine &aOutput, const SHAPE_LINE_CHAIN &aSlc) |
KICOMMON_API SHAPE_LINE_CHAIN | UnpackPolyLine (const types::PolyLine &aInput) |
KICOMMON_API void | PackPolySet (types::PolySet &aOutput, const SHAPE_POLY_SET &aInput) |
KICOMMON_API SHAPE_POLY_SET | UnpackPolySet (const types::PolySet &aInput) |
KICOMMON_API LIB_ID kiapi::common::LibIdFromProto | ( | const types::LibraryIdentifier & | aId | ) |
Definition at line 62 of file api_utils.cpp.
Referenced by FOOTPRINT::Deserialize().
KICOMMON_API types::LibraryIdentifier kiapi::common::LibIdToProto | ( | const LIB_ID & | aId | ) |
Definition at line 68 of file api_utils.cpp.
References LIB_ID::GetLibItemName(), and LIB_ID::GetLibNickname().
Referenced by FOOTPRINT::Serialize().
KICOMMON_API void kiapi::common::PackBox2 | ( | types::Box2 & | aOutput, |
const BOX2I & | aInput | ||
) |
Definition at line 104 of file api_utils.cpp.
References BOX2< Vec >::GetOrigin(), BOX2< Vec >::GetSize(), and PackVector2().
Referenced by API_HANDLER_PCB::handleGetBoundingBox().
KICOMMON_API void kiapi::common::PackPolyLine | ( | types::PolyLine & | aOutput, |
const SHAPE_LINE_CHAIN & | aSlc | ||
) |
Definition at line 117 of file api_utils.cpp.
References SHAPE_LINE_CHAIN::Arc(), SHAPE_LINE_CHAIN::ArcIndex(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_ARC::GetArcMid(), SHAPE_ARC::GetP0(), SHAPE_ARC::GetP1(), SHAPE_LINE_CHAIN::IsClosed(), SHAPE_LINE_CHAIN::IsPtOnArc(), SHAPE_LINE_CHAIN::NextShape(), SHAPE_LINE_CHAIN::PointCount(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by API_HANDLER_PCB::handleGetPadShapeAsPolygon(), and PackPolySet().
KICOMMON_API void kiapi::common::PackPolySet | ( | types::PolySet & | aOutput, |
const SHAPE_POLY_SET & | aInput | ||
) |
Definition at line 172 of file api_utils.cpp.
References SHAPE_POLY_SET::OutlineCount(), PackPolyLine(), and SHAPE_POLY_SET::Polygon().
Referenced by ZONE::Serialize().
KICOMMON_API void kiapi::common::PackVector2 | ( | types::Vector2 & | aOutput, |
const VECTOR2I & | aInput | ||
) |
Definition at line 77 of file api_utils.cpp.
References VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by API_HANDLER_COMMON::handleGetTextAsShapes(), PackBox2(), PADSTACK::packCopperLayer(), SCH_LABEL::Serialize(), SCH_LINE::Serialize(), PAD::Serialize(), PADSTACK::Serialize(), and PCB_TEXTBOX::Serialize().
KICOMMON_API void kiapi::common::PackVector3D | ( | types::Vector3D & | aOutput, |
const VECTOR3D & | aInput | ||
) |
Definition at line 90 of file api_utils.cpp.
References VECTOR3< T >::x, VECTOR3< T >::y, and VECTOR3< T >::z.
Referenced by FOOTPRINT::Serialize().
KICOMMON_API std::optional< KICAD_T > kiapi::common::TypeNameFromAny | ( | const google::protobuf::Any & | aMessage | ) |
Definition at line 32 of file api_utils.cpp.
References PCB_ARC_T, PCB_DIMENSION_T, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_GROUP_T, PCB_PAD_T, PCB_REFERENCE_IMAGE_T, PCB_SHAPE_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_T, and traceApi.
Referenced by FOOTPRINT::Deserialize(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), and API_HANDLER_PCB::handleCreateUpdateItemsInternal().
KICOMMON_API BOX2I kiapi::common::UnpackBox2 | ( | const types::Box2 & | aInput | ) |
Definition at line 111 of file api_utils.cpp.
References UnpackVector2().
KICOMMON_API SHAPE_LINE_CHAIN kiapi::common::UnpackPolyLine | ( | const types::PolyLine & | aInput | ) |
Definition at line 147 of file api_utils.cpp.
References SHAPE_LINE_CHAIN::Append(), and SHAPE_LINE_CHAIN::SetClosed().
Referenced by UnpackPolySet().
KICOMMON_API SHAPE_POLY_SET kiapi::common::UnpackPolySet | ( | const types::PolySet & | aInput | ) |
Definition at line 196 of file api_utils.cpp.
References SHAPE_POLY_SET::AddPolygon(), and UnpackPolyLine().
Referenced by ZONE::Deserialize().
KICOMMON_API VECTOR2I kiapi::common::UnpackVector2 | ( | const types::Vector2 & | aInput | ) |
Definition at line 84 of file api_utils.cpp.
Referenced by SCH_LABEL::Deserialize(), SCH_LINE::Deserialize(), PAD::Deserialize(), PADSTACK::Deserialize(), PCB_TEXTBOX::Deserialize(), API_HANDLER_COMMON::handleGetTextAsShapes(), API_HANDLER_EDITOR::handleHitTest(), UnpackBox2(), and PADSTACK::unpackCopperLayer().
KICOMMON_API VECTOR3D kiapi::common::UnpackVector3D | ( | const types::Vector3D & | aInput | ) |
Definition at line 98 of file api_utils.cpp.
Referenced by FOOTPRINT::Deserialize().