Skip to main content
← Back to kicad-monkey Rust Docs kicad-monkey Rust Crate API Reference

Module pose

Module pose 

Source
Expand description

Canonical KiCad 3D model pose math and HLR-to-board coordinate mapping.

Matches KiCad’s STEP exporter, Python KiCadFabView / fab/virtual/_assembly.py, kicad_cruncher_pcb_model_pose.py, and pcbe typed_model_resources.rs.

Structs§

FabBody3D
One 3D model attachment extracted onto crate::FabViewData.

Constants§

BOARD_MODEL_Z_OFFSET_MM
Models sit this far above the board surface, as KiCad draws them.

Functions§

flatten_row_major
Flatten a row-major 4x4 matrix into 16 scalars.
identity
local_hlr_mm_to_board_nm
Map a Geometer local HLR point in millimetres (+Y up camera) into +Y-up board nanometres.
local_pose_matrix
Compute a 3D model’s footprint-local 4x4 matrix on a board centred on z = 0.
multiply
normalize_scale
Normalize zero or non-finite scales to 1.0 (matching KiCad STEP export and pcbe).
rotation_x
rotation_y
rotation_z
scale
translation
turned_pose_matrix
Compute Rz(fp_angle_deg) * local_pose_matrix(...): the turned pose before XY placement.

Type Aliases§

Matrix4
Row-major 4x4 homogeneous transform matrix in millimetres.