Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new shape families for Archimedean, Catalan, Johnson, and other…
… solids. (#177) * test: Fix assumption on quaternions. Only test quaternions that are not effectively zero. * Added new classes to return the edges of polyhedra The new class ``polyhedron.edges`` returns the a list of the edges of a polyhedron as vertex-index pairs, similar to the current ``polyhedron.faces`` class. The class ``polyhedron.get_edge_vectors`` returns a list of edges as vectors in 3D space. * Added json files for new shape families as well as accompanying import functions. * Added new pytest marks and a few test functions. * New pytest marks have been created for the Archimedean, Catalan, and Johnson shape families. * A function has been written to combine multiple marks into a single mark for more compact testing of shape properties. * test_volume function for damasceno shapes has been adapted to test the new shape families * A test_surface_area method similar to test_volume has been added. * Tightnened tolerance for test_insphere and increased deadline Tightened ``atol`` of ``test_insphere``. Increased the deadline of the test to accommodate testing of shapes with many faces (e.g. disdyakis triacontahedron). * Applied test_bounding_sphere to archimedean solids * Tightened tolerance for test_bounding_sphere * Added marks for prism/antiprism and pyramid/dipyramid families * Applied test_get_set_minimal_centered_bounding_sphere_radius to all new shape families, including prism/antiprism and pyramid/dipyramid * Applied test_volume and test_surface_area to prism/antiprism and pyramid/dipyramid. Fixed typo in conftest * Formatted code with black. * Revert commit "Added new classes to return the edges of polyhedra" This commit reverts changes made in ab21279, which are included in a different PR. * Fixed docstring for common.py * Split test_insphere into multiple functions based on input data complexity. The Random3DRotationStrategy test varies widely in runtime based on the complexity of the input shape. Splitting the calling function into two tests (for simple Platonic shapes and more complex Catalan shapes) should solve this issue. * Increased resilience of minimal_bounding_sphere method The ``minimal_bounding_sphere`` method is reliant on the solution to a linear system of equations. For polyhedra with portions that protrude out from the main mass, this method can fail due to numerical instability in a small percent of cases. This fix double-checks that the calculated miniball contains all points on the polyhedron, and allows the method to make more attempts to find a correct answer before failing. * Revert "Increased resilience of minimal_bounding_sphere method" This reverts commit 40f500c, moving all miniball-related changes to #178. * Removed unnecessary print statement in the combine_mark function * Updated Credits.rst to not conflict with master * Fixed missing space in archimedean.json "Truncated Cuboctahedron" * Added additional pytest for json data and new families --------- Co-authored-by: Brandon Butler <[email protected]> Co-authored-by: Vyas Ramasubramani <[email protected]>
- Loading branch information