diff --git a/commitlint.config.js b/commitlint.config.js index 3a29484e8..a397334b6 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,4 +1,4 @@ -export default { +const Configuration = { extends: ["@commitlint/config-angular"], rules: { "scope-empty": [2, "never"], @@ -12,5 +12,8 @@ export default { "subject-full-stop": [0], "type-case": [0], "type-empty": [0], + "type-enum": [2, "always", ["feat", "fix", "perf"]], }, } + +export default Configuration diff --git a/src/geode/mesh/core/tetrahedral_solid.cpp b/src/geode/mesh/core/tetrahedral_solid.cpp index 7524c1fc0..3cd40bf5f 100644 --- a/src/geode/mesh/core/tetrahedral_solid.cpp +++ b/src/geode/mesh/core/tetrahedral_solid.cpp @@ -193,12 +193,11 @@ namespace geode { std::array< PolyhedronFacet, 2 > facets; index_t count{ 0 }; + const auto solid_vertices = this->polyhedron_vertices( tetrahedron_id ); for( const auto v : LRange{ 4 } ) { - const auto solid_vertex = - this->polyhedron_vertex( { tetrahedron_id, v } ); - if( solid_vertex != edge_vertices[0] - && solid_vertex != edge_vertices[1] ) + if( solid_vertices[v] != edge_vertices[0] + && solid_vertices[v] != edge_vertices[1] ) { OPENGEODE_EXCEPTION( count < 2, "[TetrahedralSolid::edge_incident_facets] Given edge " @@ -207,6 +206,12 @@ namespace geode count++; } } + OPENGEODE_EXCEPTION( count == 2, + "[TetrahedralSolid::edge_incident_facets] Given tetrahedron has " + "more than two times given vertices (", + edge_vertices[0], ", ", edge_vertices[1], "): ", solid_vertices[0], + ", ", solid_vertices[1], ", ", solid_vertices[2], ", ", + solid_vertices[3] ); return facets; }