KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kiapi::common Namespace Reference

Functions

KICOMMON_API std::optional< KICAD_TTypeNameFromAny (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)
 

Function Documentation

◆ LibIdFromProto()

KICOMMON_API LIB_ID kiapi::common::LibIdFromProto ( const types::LibraryIdentifier &  aId)

Definition at line 62 of file api_utils.cpp.

Referenced by FOOTPRINT::Deserialize().

◆ LibIdToProto()

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().

◆ PackBox2()

KICOMMON_API void kiapi::common::PackBox2 ( types::Box2 &  aOutput,
const BOX2I aInput 
)

◆ PackPolyLine()

◆ 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().

◆ PackVector2()

KICOMMON_API void kiapi::common::PackVector2 ( types::Vector2 &  aOutput,
const VECTOR2I aInput 
)

◆ PackVector3D()

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().

◆ TypeNameFromAny()

◆ UnpackBox2()

KICOMMON_API BOX2I kiapi::common::UnpackBox2 ( const types::Box2 &  aInput)

Definition at line 111 of file api_utils.cpp.

References UnpackVector2().

◆ UnpackPolyLine()

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().

◆ 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().

◆ UnpackVector2()

◆ UnpackVector3D()

KICOMMON_API VECTOR3D kiapi::common::UnpackVector3D ( const types::Vector3D &  aInput)

Definition at line 98 of file api_utils.cpp.

Referenced by FOOTPRINT::Deserialize().