|
KiCad PCB EDA Suite
|
Classes | |
| struct | ALIGN_SOLUTION |
| struct | PAD |
| struct | REGION |
Enumerations | |
| enum class | PAD_ATTRIBUTE { SMD , THROUGH_HOLE , OTHER } |
| enum class | SOLUTION_KIND { FULL , SUBSET , PARTIAL , SINGLE_PAIR } |
Functions | |
| std::vector< REGION > | BuildRegions (const S3DMODEL &aModel, const glm::dvec3 &aScale) |
| std::vector< PAD > | BuildPadGroup (const std::vector< PAD > &aPads, size_t aClickedPad) |
| Return the clicked pad first, followed by its congruent, deduplicated peers. | |
| std::vector< ALIGN_SOLUTION > | SolveAlignment (const std::vector< REGION > &aRegions, size_t aSeed, const std::vector< PAD > &aPadGroup, const std::vector< PAD > &aAllPads, const glm::dvec3 &aCurrentRotation) |
| The first element of aPadGroup must be the clicked pad; all coordinates are millimetres, Y up. | |
|
strong |
| Enumerator | |
|---|---|
| SMD | |
| THROUGH_HOLE | |
| OTHER | |
Definition at line 34 of file 3d_model_align.h.
|
strong |
| Enumerator | |
|---|---|
| FULL | |
| SUBSET | |
| PARTIAL | |
| SINGLE_PAIR | |
Definition at line 51 of file 3d_model_align.h.
| std::vector< PAD > MODEL_ALIGN::BuildPadGroup | ( | const std::vector< PAD > & | aPads, |
| size_t | aClickedPad ) |
Return the clicked pad first, followed by its congruent, deduplicated peers.
Definition at line 501 of file 3d_model_align.cpp.
References MODEL_ALIGN::PAD::attribute, duplicate, OTHER, pad, result, and THROUGH_HOLE.
Referenced by PANEL_PREVIEW_3D_MODEL::pickAlignment().
| std::vector< REGION > MODEL_ALIGN::BuildRegions | ( | const S3DMODEL & | aModel, |
| const glm::dvec3 & | aScale ) |
Definition at line 367 of file 3d_model_align.cpp.
References MODEL_ALIGN::REGION::area, KI_UNION_FIND::FindCompress(), IsTriangleInRange(), SMESH::m_FaceIdx, SMESH::m_FaceIdxSize, SMESH::m_MaterialIdx, S3DMODEL::m_Meshes, S3DMODEL::m_MeshesSize, SMESH::m_Positions, SMESH::m_VertexSize, MODEL_ALIGN::REGION::material, result, MODEL_ALIGN::REGION::sourceTriangles, MODEL_ALIGN::REGION::triangles, MODEL_ALIGN::REGION::twoSided, KI_UNION_FIND::Unite(), and MODEL_ALIGN::REGION::vertices.
Referenced by PANEL_PREVIEW_3D_MODEL::onAlign().
| std::vector< ALIGN_SOLUTION > MODEL_ALIGN::SolveAlignment | ( | const std::vector< REGION > & | aRegions, |
| size_t | aSeed, | ||
| const std::vector< PAD > & | aPadGroup, | ||
| const std::vector< PAD > & | aAllPads, | ||
| const glm::dvec3 & | aCurrentRotation ) |
The first element of aPadGroup must be the clicked pad; all coordinates are millimetres, Y up.
Definition at line 535 of file 3d_model_align.cpp.
References std::abs(), MODEL_ALIGN::REGION::area, MODEL_ALIGN::REGION::centroid, delta, distance(), down, duplicate, epsilon, MODEL_ALIGN::REGION::extents, FULL, normal, MODEL_ALIGN::REGION::normal, MODEL_ALIGN::REGION::normalMagnitude, pad, PARTIAL, MODEL_ALIGN::REGION::planar, result, SINGLE_PAIR, SUBSET, MODEL_ALIGN::REGION::triangles, MODEL_ALIGN::REGION::twoSided, and MODEL_ALIGN::REGION::vertices.
Referenced by PANEL_PREVIEW_3D_MODEL::pickAlignment().