From 3464b01f566fc69da73cd2c5c93d171b4998480c Mon Sep 17 00:00:00 2001
From: Jen Bradley <55467578+janbridley@users.noreply.github.com>
Date: Mon, 16 Sep 2024 10:04:05 -0400
Subject: [PATCH] Update io module to more complex test case (#240)
* Update to more complex test case
* Switch files to more complicated io test case
* Switch io test case again
---
tests/control/convex_polyhedron.html | 2 +-
tests/control/convex_polyhedron.obj | 36 ++++---
tests/control/convex_polyhedron.off | 38 +++++---
tests/control/convex_polyhedron.ply | 40 ++++----
tests/control/convex_polyhedron.stl | 138 +++++++++++++++++----------
tests/control/convex_polyhedron.vtk | 40 ++++----
tests/control/convex_polyhedron.x3d | 2 +-
tests/control/polyhedron.html | 2 +-
tests/control/polyhedron.obj | 36 ++++---
tests/control/polyhedron.off | 38 +++++---
tests/control/polyhedron.ply | 40 ++++----
tests/control/polyhedron.stl | 138 +++++++++++++++++----------
tests/control/polyhedron.vtk | 40 ++++----
tests/control/polyhedron.x3d | 2 +-
tests/test_io.py | 39 ++------
15 files changed, 376 insertions(+), 255 deletions(-)
diff --git a/tests/control/convex_polyhedron.html b/tests/control/convex_polyhedron.html
index f27b53d1..b0d8a01c 100644
--- a/tests/control/convex_polyhedron.html
+++ b/tests/control/convex_polyhedron.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/control/convex_polyhedron.obj b/tests/control/convex_polyhedron.obj
index 7a3ba776..4d565655 100644
--- a/tests/control/convex_polyhedron.obj
+++ b/tests/control/convex_polyhedron.obj
@@ -1,18 +1,26 @@
# wavefront obj file written by Coxeter version 0.8.0
# ConvexPolyhedron
-v -1.0 -1.0 -1.0
-v -1.0 -1.0 1.0
-v -1.0 1.0 -1.0
-v -1.0 1.0 1.0
-v 1.0 -1.0 -1.0
-v 1.0 -1.0 1.0
-v 1.0 1.0 -1.0
-v 1.0 1.0 1.0
+v 0.0 0.0 1.2065695672061325
+v 0.6727065926127129 0.0 0.0
+v 0.6727065926127129 0.0 0.7908140285153469
+v 0.20787776934539276 -0.6397819884590299 0.0
+v 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+v 0.20787776934539276 0.6397819884590299 0.0
+v 0.20787776934539276 0.6397819884590299 0.7908140285153469
+v -0.5442310656517493 -0.39540701425767344 0.0
+v -0.5442310656517493 -0.39540701425767344 0.7908140285153469
+v -0.5442310656517493 0.39540701425767344 0.0
+v -0.5442310656517493 0.39540701425767344 0.7908140285153469
-f 1 3 7 5
-f 1 5 6 2
-f 5 7 8 6
-f 1 2 4 3
-f 3 4 8 7
-f 2 6 8 4
\ No newline at end of file
+f 1 7 11
+f 1 9 5
+f 1 11 9
+f 1 5 3
+f 1 3 7
+f 6 10 11 7
+f 2 4 8 10 6
+f 4 5 9 8
+f 8 9 11 10
+f 2 3 5 4
+f 2 6 7 3
\ No newline at end of file
diff --git a/tests/control/convex_polyhedron.off b/tests/control/convex_polyhedron.off
index abbdbbdf..f7d12c2a 100644
--- a/tests/control/convex_polyhedron.off
+++ b/tests/control/convex_polyhedron.off
@@ -1,18 +1,26 @@
OFF
# OFF file written by Coxeter version 0.8.0
# ConvexPolyhedron
-8 f6 12
--1.0 -1.0 -1.0
--1.0 -1.0 1.0
--1.0 1.0 -1.0
--1.0 1.0 1.0
-1.0 -1.0 -1.0
-1.0 -1.0 1.0
-1.0 1.0 -1.0
-1.0 1.0 1.0
-4 0 2 6 4
-4 0 4 5 1
-4 4 6 7 5
-4 0 1 3 2
-4 2 3 7 6
-4 1 5 7 3
\ No newline at end of file
+11 f11 20
+0.0 0.0 1.2065695672061325
+0.6727065926127129 0.0 0.0
+0.6727065926127129 0.0 0.7908140285153469
+0.20787776934539276 -0.6397819884590299 0.0
+0.20787776934539276 -0.6397819884590299 0.7908140285153469
+0.20787776934539276 0.6397819884590299 0.0
+0.20787776934539276 0.6397819884590299 0.7908140285153469
+-0.5442310656517493 -0.39540701425767344 0.0
+-0.5442310656517493 -0.39540701425767344 0.7908140285153469
+-0.5442310656517493 0.39540701425767344 0.0
+-0.5442310656517493 0.39540701425767344 0.7908140285153469
+3 0 6 10
+3 0 8 4
+3 0 10 8
+3 0 4 2
+3 0 2 6
+4 5 9 10 6
+5 1 3 7 9 5
+4 3 4 8 7
+4 7 8 10 9
+4 1 2 4 3
+4 1 5 6 2
\ No newline at end of file
diff --git a/tests/control/convex_polyhedron.ply b/tests/control/convex_polyhedron.ply
index f295bac9..b657fb12 100644
--- a/tests/control/convex_polyhedron.ply
+++ b/tests/control/convex_polyhedron.ply
@@ -2,24 +2,32 @@ ply
format ascii 1.0
comment PLY file written by Coxeter version 0.8.0
comment ConvexPolyhedron
-element vertex 8
+element vertex 11
property float x
property float y
property float z
-element face 6
+element face 11
property list uchar uint vertex_indices
end_header
--1.0 -1.0 -1.0
--1.0 -1.0 1.0
--1.0 1.0 -1.0
--1.0 1.0 1.0
-1.0 -1.0 -1.0
-1.0 -1.0 1.0
-1.0 1.0 -1.0
-1.0 1.0 1.0
-4 0 2 6 4
-4 0 4 5 1
-4 4 6 7 5
-4 0 1 3 2
-4 2 3 7 6
-4 1 5 7 3
\ No newline at end of file
+0.0 0.0 1.2065695672061325
+0.6727065926127129 0.0 0.0
+0.6727065926127129 0.0 0.7908140285153469
+0.20787776934539276 -0.6397819884590299 0.0
+0.20787776934539276 -0.6397819884590299 0.7908140285153469
+0.20787776934539276 0.6397819884590299 0.0
+0.20787776934539276 0.6397819884590299 0.7908140285153469
+-0.5442310656517493 -0.39540701425767344 0.0
+-0.5442310656517493 -0.39540701425767344 0.7908140285153469
+-0.5442310656517493 0.39540701425767344 0.0
+-0.5442310656517493 0.39540701425767344 0.7908140285153469
+3 0 6 10
+3 0 8 4
+3 0 10 8
+3 0 4 2
+3 0 2 6
+4 5 9 10 6
+5 1 3 7 9 5
+4 3 4 8 7
+4 7 8 10 9
+4 1 2 4 3
+4 1 5 6 2
\ No newline at end of file
diff --git a/tests/control/convex_polyhedron.stl b/tests/control/convex_polyhedron.stl
index 9d9a416e..a26748b4 100644
--- a/tests/control/convex_polyhedron.stl
+++ b/tests/control/convex_polyhedron.stl
@@ -1,86 +1,128 @@
solid ConvexPolyhedron
-facet normal 0.0 0.0 -4.0
+facet normal -0.1016002490416318 0.31269341384833604 0.4303855614712601
outer loop
- vertex -1.0 -1.0 -1.0
- vertex -1.0 1.0 -1.0
- vertex 1.0 1.0 -1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
endloop
endfacet
-facet normal 0.0 0.0 -4.0
+facet normal -0.1016002490416318 -0.31269341384833604 0.43038556147126006
outer loop
- vertex -1.0 -1.0 -1.0
- vertex 1.0 1.0 -1.0
- vertex 1.0 -1.0 -1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
endloop
endfacet
-facet normal 0.0 -4.0 0.0
+facet normal -0.32878531242962833 0.0 0.43038556147126006
outer loop
- vertex -1.0 -1.0 -1.0
- vertex 1.0 -1.0 -1.0
- vertex 1.0 -1.0 1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
endloop
endfacet
-facet normal 0.0 -4.0 0.0
+facet normal 0.265992905256446 -0.19325515781650868 0.43038556147126006
outer loop
- vertex -1.0 -1.0 -1.0
- vertex 1.0 -1.0 1.0
- vertex -1.0 -1.0 1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+ vertex 0.6727065926127129 0.0 0.7908140285153469
endloop
endfacet
-facet normal 4.0 0.0 0.0
+facet normal 0.265992905256446 0.19325515781650868 0.43038556147126
outer loop
- vertex 1.0 -1.0 -1.0
- vertex 1.0 1.0 -1.0
- vertex 1.0 1.0 1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex 0.6727065926127129 0.0 0.7908140285153469
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
endloop
endfacet
-facet normal 4.0 0.0 -0.0
+facet normal -0.19325515781650865 0.5947782176860742 0.0
outer loop
- vertex 1.0 -1.0 -1.0
- vertex 1.0 1.0 1.0
- vertex 1.0 -1.0 1.0
+ vertex 0.20787776934539276 0.6397819884590299 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
endloop
endfacet
-facet normal -4.0 0.0 0.0
+facet normal -0.19325515781650865 0.5947782176860742 0.0
outer loop
- vertex -1.0 -1.0 -1.0
- vertex -1.0 -1.0 1.0
- vertex -1.0 1.0 1.0
+ vertex 0.20787776934539276 0.6397819884590299 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
endloop
endfacet
-facet normal -4.0 0.0 0.0
+facet normal -0.0 0.0 -0.5947782176860743
outer loop
- vertex -1.0 -1.0 -1.0
- vertex -1.0 1.0 1.0
- vertex -1.0 1.0 -1.0
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.0
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
endloop
endfacet
-facet normal 0.0 4.0 0.0
+facet normal -0.0 0.0 -0.9623713719841519
outer loop
- vertex -1.0 1.0 -1.0
- vertex -1.0 1.0 1.0
- vertex 1.0 1.0 1.0
+ vertex 0.6727065926127129 0.0 0.0
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.0
endloop
endfacet
-facet normal -0.0 4.0 0.0
+facet normal 0.0 0.0 -0.5947782176860742
outer loop
- vertex -1.0 1.0 -1.0
- vertex 1.0 1.0 1.0
- vertex 1.0 1.0 -1.0
+ vertex 0.6727065926127129 0.0 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.0
+ vertex 0.20787776934539276 0.6397819884590299 0.0
endloop
endfacet
-facet normal 0.0 0.0 4.0
+facet normal -0.19325515781650865 -0.5947782176860742 0.0
outer loop
- vertex -1.0 -1.0 1.0
- vertex 1.0 -1.0 1.0
- vertex 1.0 1.0 1.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
endloop
endfacet
-facet normal 0.0 -0.0 4.0
+facet normal -0.19325515781650865 -0.5947782176860742 -0.0
outer loop
- vertex -1.0 -1.0 1.0
- vertex 1.0 1.0 1.0
- vertex -1.0 1.0 1.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.0
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
+ endloop
+endfacet
+facet normal -0.6253868276966719 0.0 0.0
+ outer loop
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
+ endloop
+endfacet
+facet normal -0.6253868276966719 0.0 0.0
+ outer loop
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
+ vertex -0.5442310656517493 0.39540701425767344 0.0
+ endloop
+endfacet
+facet normal 0.5059485716648446 -0.36759315429807765 0.0
+ outer loop
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.6727065926127129 0.0 0.7908140285153469
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+ endloop
+endfacet
+facet normal 0.5059485716648446 -0.36759315429807765 0.0
+ outer loop
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+ vertex 0.20787776934539276 -0.6397819884590299 0.0
+ endloop
+endfacet
+facet normal 0.5059485716648446 0.36759315429807765 -0.0
+ outer loop
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.20787776934539276 0.6397819884590299 0.0
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
+ endloop
+endfacet
+facet normal 0.5059485716648446 0.36759315429807765 0.0
+ outer loop
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
+ vertex 0.6727065926127129 0.0 0.7908140285153469
endloop
endfacet
endsolid ConvexPolyhedron
\ No newline at end of file
diff --git a/tests/control/convex_polyhedron.vtk b/tests/control/convex_polyhedron.vtk
index 5cdef7f5..6abecc9f 100644
--- a/tests/control/convex_polyhedron.vtk
+++ b/tests/control/convex_polyhedron.vtk
@@ -2,19 +2,27 @@
ConvexPolyhedron created by Coxeter version 0.8.0
ASCII
DATASET POLYDATA
-POINTS 8 float
--1.0 -1.0 -1.0
--1.0 -1.0 1.0
--1.0 1.0 -1.0
--1.0 1.0 1.0
-1.0 -1.0 -1.0
-1.0 -1.0 1.0
-1.0 1.0 -1.0
-1.0 1.0 1.0
-POLYGONS 6 30
-4 0 2 6 4
-4 0 4 5 1
-4 4 6 7 5
-4 0 1 3 2
-4 2 3 7 6
-4 1 5 7 3
\ No newline at end of file
+POINTS 11 float
+0.0 0.0 1.2065695672061325
+0.6727065926127129 0.0 0.0
+0.6727065926127129 0.0 0.7908140285153469
+0.20787776934539276 -0.6397819884590299 0.0
+0.20787776934539276 -0.6397819884590299 0.7908140285153469
+0.20787776934539276 0.6397819884590299 0.0
+0.20787776934539276 0.6397819884590299 0.7908140285153469
+-0.5442310656517493 -0.39540701425767344 0.0
+-0.5442310656517493 -0.39540701425767344 0.7908140285153469
+-0.5442310656517493 0.39540701425767344 0.0
+-0.5442310656517493 0.39540701425767344 0.7908140285153469
+POLYGONS 11 51
+3 0 6 10
+3 0 8 4
+3 0 10 8
+3 0 4 2
+3 0 2 6
+4 5 9 10 6
+5 1 3 7 9 5
+4 3 4 8 7
+4 7 8 10 9
+4 1 2 4 3
+4 1 5 6 2
\ No newline at end of file
diff --git a/tests/control/convex_polyhedron.x3d b/tests/control/convex_polyhedron.x3d
index d673d9e4..27d03324 100644
--- a/tests/control/convex_polyhedron.x3d
+++ b/tests/control/convex_polyhedron.x3d
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/control/polyhedron.html b/tests/control/polyhedron.html
index 3c4d4187..f120a572 100644
--- a/tests/control/polyhedron.html
+++ b/tests/control/polyhedron.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/control/polyhedron.obj b/tests/control/polyhedron.obj
index 73d79f00..9a814946 100644
--- a/tests/control/polyhedron.obj
+++ b/tests/control/polyhedron.obj
@@ -1,18 +1,26 @@
# wavefront obj file written by Coxeter version 0.8.0
# Polyhedron
-v -1.0 -1.0 -1.0
-v -1.0 -1.0 1.0
-v -1.0 1.0 -1.0
-v -1.0 1.0 1.0
-v 1.0 -1.0 -1.0
-v 1.0 -1.0 1.0
-v 1.0 1.0 -1.0
-v 1.0 1.0 1.0
+v 0.0 0.0 1.2065695672061325
+v 0.6727065926127129 0.0 0.0
+v 0.6727065926127129 0.0 0.7908140285153469
+v 0.20787776934539276 -0.6397819884590299 0.0
+v 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+v 0.20787776934539276 0.6397819884590299 0.0
+v 0.20787776934539276 0.6397819884590299 0.7908140285153469
+v -0.5442310656517493 -0.39540701425767344 0.0
+v -0.5442310656517493 -0.39540701425767344 0.7908140285153469
+v -0.5442310656517493 0.39540701425767344 0.0
+v -0.5442310656517493 0.39540701425767344 0.7908140285153469
-f 1 2 4 3
-f 1 3 7 5
-f 5 7 8 6
-f 2 6 8 4
-f 1 5 6 2
-f 7 3 4 8
\ No newline at end of file
+f 1 7 11
+f 1 9 5
+f 1 11 9
+f 1 5 3
+f 1 3 7
+f 6 10 11 7
+f 2 4 8 10 6
+f 4 5 9 8
+f 8 9 11 10
+f 2 3 5 4
+f 2 6 7 3
\ No newline at end of file
diff --git a/tests/control/polyhedron.off b/tests/control/polyhedron.off
index bfe2e196..5456db93 100644
--- a/tests/control/polyhedron.off
+++ b/tests/control/polyhedron.off
@@ -1,18 +1,26 @@
OFF
# OFF file written by Coxeter version 0.8.0
# Polyhedron
-8 f6 12
--1.0 -1.0 -1.0
--1.0 -1.0 1.0
--1.0 1.0 -1.0
--1.0 1.0 1.0
-1.0 -1.0 -1.0
-1.0 -1.0 1.0
-1.0 1.0 -1.0
-1.0 1.0 1.0
-4 0 1 3 2
-4 0 2 6 4
-4 4 6 7 5
-4 1 5 7 3
-4 0 4 5 1
-4 6 2 3 7
\ No newline at end of file
+11 f11 20
+0.0 0.0 1.2065695672061325
+0.6727065926127129 0.0 0.0
+0.6727065926127129 0.0 0.7908140285153469
+0.20787776934539276 -0.6397819884590299 0.0
+0.20787776934539276 -0.6397819884590299 0.7908140285153469
+0.20787776934539276 0.6397819884590299 0.0
+0.20787776934539276 0.6397819884590299 0.7908140285153469
+-0.5442310656517493 -0.39540701425767344 0.0
+-0.5442310656517493 -0.39540701425767344 0.7908140285153469
+-0.5442310656517493 0.39540701425767344 0.0
+-0.5442310656517493 0.39540701425767344 0.7908140285153469
+3 0 6 10
+3 0 8 4
+3 0 10 8
+3 0 4 2
+3 0 2 6
+4 5 9 10 6
+5 1 3 7 9 5
+4 3 4 8 7
+4 7 8 10 9
+4 1 2 4 3
+4 1 5 6 2
\ No newline at end of file
diff --git a/tests/control/polyhedron.ply b/tests/control/polyhedron.ply
index 2de634b2..571cdaa9 100644
--- a/tests/control/polyhedron.ply
+++ b/tests/control/polyhedron.ply
@@ -2,24 +2,32 @@ ply
format ascii 1.0
comment PLY file written by Coxeter version 0.8.0
comment Polyhedron
-element vertex 8
+element vertex 11
property float x
property float y
property float z
-element face 6
+element face 11
property list uchar uint vertex_indices
end_header
--1.0 -1.0 -1.0
--1.0 -1.0 1.0
--1.0 1.0 -1.0
--1.0 1.0 1.0
-1.0 -1.0 -1.0
-1.0 -1.0 1.0
-1.0 1.0 -1.0
-1.0 1.0 1.0
-4 0 1 3 2
-4 0 2 6 4
-4 4 6 7 5
-4 1 5 7 3
-4 0 4 5 1
-4 6 2 3 7
\ No newline at end of file
+0.0 0.0 1.2065695672061325
+0.6727065926127129 0.0 0.0
+0.6727065926127129 0.0 0.7908140285153469
+0.20787776934539276 -0.6397819884590299 0.0
+0.20787776934539276 -0.6397819884590299 0.7908140285153469
+0.20787776934539276 0.6397819884590299 0.0
+0.20787776934539276 0.6397819884590299 0.7908140285153469
+-0.5442310656517493 -0.39540701425767344 0.0
+-0.5442310656517493 -0.39540701425767344 0.7908140285153469
+-0.5442310656517493 0.39540701425767344 0.0
+-0.5442310656517493 0.39540701425767344 0.7908140285153469
+3 0 6 10
+3 0 8 4
+3 0 10 8
+3 0 4 2
+3 0 2 6
+4 5 9 10 6
+5 1 3 7 9 5
+4 3 4 8 7
+4 7 8 10 9
+4 1 2 4 3
+4 1 5 6 2
\ No newline at end of file
diff --git a/tests/control/polyhedron.stl b/tests/control/polyhedron.stl
index 36280262..9322ec3b 100644
--- a/tests/control/polyhedron.stl
+++ b/tests/control/polyhedron.stl
@@ -1,86 +1,128 @@
solid Polyhedron
-facet normal -4.0 0.0 0.0
+facet normal -0.1016002490416318 0.31269341384833604 0.4303855614712601
outer loop
- vertex -1.0 -1.0 -1.0
- vertex -1.0 -1.0 1.0
- vertex -1.0 1.0 1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
endloop
endfacet
-facet normal -4.0 0.0 0.0
+facet normal -0.1016002490416318 -0.31269341384833604 0.43038556147126006
outer loop
- vertex -1.0 -1.0 -1.0
- vertex -1.0 1.0 1.0
- vertex -1.0 1.0 -1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
endloop
endfacet
-facet normal 0.0 0.0 -4.0
+facet normal -0.32878531242962833 0.0 0.43038556147126006
outer loop
- vertex -1.0 -1.0 -1.0
- vertex -1.0 1.0 -1.0
- vertex 1.0 1.0 -1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
endloop
endfacet
-facet normal 0.0 0.0 -4.0
+facet normal 0.265992905256446 -0.19325515781650868 0.43038556147126006
outer loop
- vertex -1.0 -1.0 -1.0
- vertex 1.0 1.0 -1.0
- vertex 1.0 -1.0 -1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+ vertex 0.6727065926127129 0.0 0.7908140285153469
endloop
endfacet
-facet normal 4.0 0.0 0.0
+facet normal 0.265992905256446 0.19325515781650868 0.43038556147126
outer loop
- vertex 1.0 -1.0 -1.0
- vertex 1.0 1.0 -1.0
- vertex 1.0 1.0 1.0
+ vertex 0.0 0.0 1.2065695672061325
+ vertex 0.6727065926127129 0.0 0.7908140285153469
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
endloop
endfacet
-facet normal 4.0 0.0 -0.0
+facet normal -0.19325515781650865 0.5947782176860742 0.0
outer loop
- vertex 1.0 -1.0 -1.0
- vertex 1.0 1.0 1.0
- vertex 1.0 -1.0 1.0
+ vertex 0.20787776934539276 0.6397819884590299 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
endloop
endfacet
-facet normal 0.0 0.0 4.0
+facet normal -0.19325515781650865 0.5947782176860742 0.0
outer loop
- vertex -1.0 -1.0 1.0
- vertex 1.0 -1.0 1.0
- vertex 1.0 1.0 1.0
+ vertex 0.20787776934539276 0.6397819884590299 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
endloop
endfacet
-facet normal 0.0 -0.0 4.0
+facet normal -0.0 0.0 -0.5947782176860743
outer loop
- vertex -1.0 -1.0 1.0
- vertex 1.0 1.0 1.0
- vertex -1.0 1.0 1.0
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.0
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
endloop
endfacet
-facet normal 0.0 -4.0 0.0
+facet normal -0.0 0.0 -0.9623713719841519
outer loop
- vertex -1.0 -1.0 -1.0
- vertex 1.0 -1.0 -1.0
- vertex 1.0 -1.0 1.0
+ vertex 0.6727065926127129 0.0 0.0
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.0
endloop
endfacet
-facet normal 0.0 -4.0 0.0
+facet normal 0.0 0.0 -0.5947782176860742
outer loop
- vertex -1.0 -1.0 -1.0
- vertex 1.0 -1.0 1.0
- vertex -1.0 -1.0 1.0
+ vertex 0.6727065926127129 0.0 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.0
+ vertex 0.20787776934539276 0.6397819884590299 0.0
endloop
endfacet
-facet normal 0.0 4.0 -0.0
+facet normal -0.19325515781650865 -0.5947782176860742 0.0
outer loop
- vertex 1.0 1.0 -1.0
- vertex -1.0 1.0 -1.0
- vertex -1.0 1.0 1.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
endloop
endfacet
-facet normal 0.0 4.0 -0.0
+facet normal -0.19325515781650865 -0.5947782176860742 -0.0
outer loop
- vertex 1.0 1.0 -1.0
- vertex -1.0 1.0 1.0
- vertex 1.0 1.0 1.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.0
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
+ endloop
+endfacet
+facet normal -0.6253868276966719 0.0 0.0
+ outer loop
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
+ vertex -0.5442310656517493 -0.39540701425767344 0.7908140285153469
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
+ endloop
+endfacet
+facet normal -0.6253868276966719 0.0 0.0
+ outer loop
+ vertex -0.5442310656517493 -0.39540701425767344 0.0
+ vertex -0.5442310656517493 0.39540701425767344 0.7908140285153469
+ vertex -0.5442310656517493 0.39540701425767344 0.0
+ endloop
+endfacet
+facet normal 0.5059485716648446 -0.36759315429807765 0.0
+ outer loop
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.6727065926127129 0.0 0.7908140285153469
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+ endloop
+endfacet
+facet normal 0.5059485716648446 -0.36759315429807765 0.0
+ outer loop
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.20787776934539276 -0.6397819884590299 0.7908140285153469
+ vertex 0.20787776934539276 -0.6397819884590299 0.0
+ endloop
+endfacet
+facet normal 0.5059485716648446 0.36759315429807765 -0.0
+ outer loop
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.20787776934539276 0.6397819884590299 0.0
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
+ endloop
+endfacet
+facet normal 0.5059485716648446 0.36759315429807765 0.0
+ outer loop
+ vertex 0.6727065926127129 0.0 0.0
+ vertex 0.20787776934539276 0.6397819884590299 0.7908140285153469
+ vertex 0.6727065926127129 0.0 0.7908140285153469
endloop
endfacet
endsolid Polyhedron
\ No newline at end of file
diff --git a/tests/control/polyhedron.vtk b/tests/control/polyhedron.vtk
index a8d8ce23..a71c67d1 100644
--- a/tests/control/polyhedron.vtk
+++ b/tests/control/polyhedron.vtk
@@ -2,19 +2,27 @@
Polyhedron created by Coxeter version 0.8.0
ASCII
DATASET POLYDATA
-POINTS 8 float
--1.0 -1.0 -1.0
--1.0 -1.0 1.0
--1.0 1.0 -1.0
--1.0 1.0 1.0
-1.0 -1.0 -1.0
-1.0 -1.0 1.0
-1.0 1.0 -1.0
-1.0 1.0 1.0
-POLYGONS 6 30
-4 0 1 3 2
-4 0 2 6 4
-4 4 6 7 5
-4 1 5 7 3
-4 0 4 5 1
-4 6 2 3 7
\ No newline at end of file
+POINTS 11 float
+0.0 0.0 1.2065695672061325
+0.6727065926127129 0.0 0.0
+0.6727065926127129 0.0 0.7908140285153469
+0.20787776934539276 -0.6397819884590299 0.0
+0.20787776934539276 -0.6397819884590299 0.7908140285153469
+0.20787776934539276 0.6397819884590299 0.0
+0.20787776934539276 0.6397819884590299 0.7908140285153469
+-0.5442310656517493 -0.39540701425767344 0.0
+-0.5442310656517493 -0.39540701425767344 0.7908140285153469
+-0.5442310656517493 0.39540701425767344 0.0
+-0.5442310656517493 0.39540701425767344 0.7908140285153469
+POLYGONS 11 51
+3 0 6 10
+3 0 8 4
+3 0 10 8
+3 0 4 2
+3 0 2 6
+4 5 9 10 6
+5 1 3 7 9 5
+4 3 4 8 7
+4 7 8 10 9
+4 1 2 4 3
+4 1 5 6 2
\ No newline at end of file
diff --git a/tests/control/polyhedron.x3d b/tests/control/polyhedron.x3d
index 727efcb4..0dca581b 100644
--- a/tests/control/polyhedron.x3d
+++ b/tests/control/polyhedron.x3d
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/test_io.py b/tests/test_io.py
index 5e588a09..6789dec2 100644
--- a/tests/test_io.py
+++ b/tests/test_io.py
@@ -12,7 +12,8 @@
import pytest
from coxeter import io
-from coxeter.shapes import ConvexPolyhedron, Polyhedron
+from coxeter.families import JohnsonFamily
+from coxeter.shapes import Polyhedron
def compare_text_files(file_path_1, file_path_2):
@@ -33,39 +34,11 @@ def compare_text_files(file_path_1, file_path_2):
"html": io.to_html,
}
+epyr5 = JohnsonFamily.get_shape("Elongated Pentagonal Pyramid")
+
SHAPES_BY_NAME = {
- "polyhedron": Polyhedron(
- vertices=[
- [-1, -1, -1],
- [-1, -1, 1],
- [-1, 1, -1],
- [-1, 1, 1],
- [1, -1, -1],
- [1, -1, 1],
- [1, 1, -1],
- [1, 1, 1],
- ],
- faces=[
- [0, 1, 3, 2],
- [0, 2, 6, 4],
- [4, 6, 7, 5],
- [1, 5, 7, 3],
- [0, 4, 5, 1],
- [6, 2, 3, 7],
- ],
- ),
- "convex_polyhedron": ConvexPolyhedron(
- vertices=[
- [-1, -1, -1],
- [-1, -1, 1],
- [-1, 1, -1],
- [-1, 1, 1],
- [1, -1, -1],
- [1, -1, 1],
- [1, 1, -1],
- [1, 1, 1],
- ]
- ),
+ "polyhedron": Polyhedron(epyr5.vertices, epyr5.faces),
+ "convex_polyhedron": epyr5,
}
CONTROL_DIR = Path("tests/control")