Skip to content

Commit

Permalink
Update io module to more complex test case (#240)
Browse files Browse the repository at this point in the history
* Update to more complex test case

* Switch files to more complicated io test case

* Switch io test case again
  • Loading branch information
janbridley authored Sep 16, 2024
1 parent ceeb6e3 commit 3464b01
Show file tree
Hide file tree
Showing 15 changed files with 376 additions and 255 deletions.
2 changes: 1 addition & 1 deletion tests/control/convex_polyhedron.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" src="http://x3dom.org/release/x3dom.js"> </script><link rel="stylesheet" type="text/css" href="http://x3dom.org/release/x3dom.css" /></head><body><x3d profile="Interchange" version="4.0" xsi:schemaLocation="http://www.web3d.org/specifications/x3d-4.0.xsd"><Scene><shape DEF="ConvexPolyhedron"><Appearance><Material diffuseColor="#6495ED" /></Appearance><IndexedFaceSet coordIndex="0 1 2 3 -1 4 5 6 7 -1 8 9 10 11 -1 12 13 14 15 -1 16 17 18 19 -1 20 21 22 23 -1"><Coordinate point="-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 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 -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" /></IndexedFaceSet></shape></Scene></x3d></body></html>
<!DOCTYPE html><html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" src="http://x3dom.org/release/x3dom.js"> </script><link rel="stylesheet" type="text/css" href="http://x3dom.org/release/x3dom.css" /></head><body><x3d profile="Interchange" version="4.0" xsi:schemaLocation="http://www.web3d.org/specifications/x3d-4.0.xsd"><Scene><shape DEF="ConvexPolyhedron"><Appearance><Material diffuseColor="#6495ED" /></Appearance><IndexedFaceSet coordIndex="0 1 2 -1 3 4 5 -1 6 7 8 -1 9 10 11 -1 12 13 14 -1 15 16 17 18 -1 19 20 21 22 23 -1 24 25 26 27 -1 28 29 30 31 -1 32 33 34 35 -1 36 37 38 39 -1"><Coordinate point="0.0 0.0 1.2065695672061325 0.20787776934539276 0.6397819884590299 0.7908140285153469 -0.5442310656517493 0.39540701425767344 0.7908140285153469 0.0 0.0 1.2065695672061325 -0.5442310656517493 -0.39540701425767344 0.7908140285153469 0.20787776934539276 -0.6397819884590299 0.7908140285153469 0.0 0.0 1.2065695672061325 -0.5442310656517493 0.39540701425767344 0.7908140285153469 -0.5442310656517493 -0.39540701425767344 0.7908140285153469 0.0 0.0 1.2065695672061325 0.20787776934539276 -0.6397819884590299 0.7908140285153469 0.6727065926127129 0.0 0.7908140285153469 0.0 0.0 1.2065695672061325 0.6727065926127129 0.0 0.7908140285153469 0.20787776934539276 0.6397819884590299 0.7908140285153469 0.20787776934539276 0.6397819884590299 0.0 -0.5442310656517493 0.39540701425767344 0.0 -0.5442310656517493 0.39540701425767344 0.7908140285153469 0.20787776934539276 0.6397819884590299 0.7908140285153469 0.6727065926127129 0.0 0.0 0.20787776934539276 -0.6397819884590299 0.0 -0.5442310656517493 -0.39540701425767344 0.0 -0.5442310656517493 0.39540701425767344 0.0 0.20787776934539276 0.6397819884590299 0.0 0.20787776934539276 -0.6397819884590299 0.0 0.20787776934539276 -0.6397819884590299 0.7908140285153469 -0.5442310656517493 -0.39540701425767344 0.7908140285153469 -0.5442310656517493 -0.39540701425767344 0.0 -0.5442310656517493 -0.39540701425767344 0.0 -0.5442310656517493 -0.39540701425767344 0.7908140285153469 -0.5442310656517493 0.39540701425767344 0.7908140285153469 -0.5442310656517493 0.39540701425767344 0.0 0.6727065926127129 0.0 0.0 0.6727065926127129 0.0 0.7908140285153469 0.20787776934539276 -0.6397819884590299 0.7908140285153469 0.20787776934539276 -0.6397819884590299 0.0 0.6727065926127129 0.0 0.0 0.20787776934539276 0.6397819884590299 0.0 0.20787776934539276 0.6397819884590299 0.7908140285153469 0.6727065926127129 0.0 0.7908140285153469" /></IndexedFaceSet></shape></Scene></x3d></body></html>
36 changes: 22 additions & 14 deletions tests/control/convex_polyhedron.obj
Original file line number Diff line number Diff line change
@@ -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
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
38 changes: 23 additions & 15 deletions tests/control/convex_polyhedron.off
Original file line number Diff line number Diff line change
@@ -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
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
40 changes: 24 additions & 16 deletions tests/control/convex_polyhedron.ply
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
138 changes: 90 additions & 48 deletions tests/control/convex_polyhedron.stl
Original file line number Diff line number Diff line change
@@ -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
40 changes: 24 additions & 16 deletions tests/control/convex_polyhedron.vtk
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
2 changes: 1 addition & 1 deletion tests/control/convex_polyhedron.x3d
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<x3d profile="Interchange" version="4.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:schemaLocation="http://www.web3d.org/specifications/x3d-4.0.xsd"><Scene><shape DEF="ConvexPolyhedron"><Appearance><Material diffuseColor="#6495ED" /></Appearance><IndexedFaceSet coordIndex="0 1 2 3 -1 4 5 6 7 -1 8 9 10 11 -1 12 13 14 15 -1 16 17 18 19 -1 20 21 22 23 -1"><Coordinate point="-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 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 -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" /></IndexedFaceSet></shape></Scene></x3d>
<x3d profile="Interchange" version="4.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:schemaLocation="http://www.web3d.org/specifications/x3d-4.0.xsd"><Scene><shape DEF="ConvexPolyhedron"><Appearance><Material diffuseColor="#6495ED" /></Appearance><IndexedFaceSet coordIndex="0 1 2 -1 3 4 5 -1 6 7 8 -1 9 10 11 -1 12 13 14 -1 15 16 17 18 -1 19 20 21 22 23 -1 24 25 26 27 -1 28 29 30 31 -1 32 33 34 35 -1 36 37 38 39 -1"><Coordinate point="0.0 0.0 1.2065695672061325 0.20787776934539276 0.6397819884590299 0.7908140285153469 -0.5442310656517493 0.39540701425767344 0.7908140285153469 0.0 0.0 1.2065695672061325 -0.5442310656517493 -0.39540701425767344 0.7908140285153469 0.20787776934539276 -0.6397819884590299 0.7908140285153469 0.0 0.0 1.2065695672061325 -0.5442310656517493 0.39540701425767344 0.7908140285153469 -0.5442310656517493 -0.39540701425767344 0.7908140285153469 0.0 0.0 1.2065695672061325 0.20787776934539276 -0.6397819884590299 0.7908140285153469 0.6727065926127129 0.0 0.7908140285153469 0.0 0.0 1.2065695672061325 0.6727065926127129 0.0 0.7908140285153469 0.20787776934539276 0.6397819884590299 0.7908140285153469 0.20787776934539276 0.6397819884590299 0.0 -0.5442310656517493 0.39540701425767344 0.0 -0.5442310656517493 0.39540701425767344 0.7908140285153469 0.20787776934539276 0.6397819884590299 0.7908140285153469 0.6727065926127129 0.0 0.0 0.20787776934539276 -0.6397819884590299 0.0 -0.5442310656517493 -0.39540701425767344 0.0 -0.5442310656517493 0.39540701425767344 0.0 0.20787776934539276 0.6397819884590299 0.0 0.20787776934539276 -0.6397819884590299 0.0 0.20787776934539276 -0.6397819884590299 0.7908140285153469 -0.5442310656517493 -0.39540701425767344 0.7908140285153469 -0.5442310656517493 -0.39540701425767344 0.0 -0.5442310656517493 -0.39540701425767344 0.0 -0.5442310656517493 -0.39540701425767344 0.7908140285153469 -0.5442310656517493 0.39540701425767344 0.7908140285153469 -0.5442310656517493 0.39540701425767344 0.0 0.6727065926127129 0.0 0.0 0.6727065926127129 0.0 0.7908140285153469 0.20787776934539276 -0.6397819884590299 0.7908140285153469 0.20787776934539276 -0.6397819884590299 0.0 0.6727065926127129 0.0 0.0 0.20787776934539276 0.6397819884590299 0.0 0.20787776934539276 0.6397819884590299 0.7908140285153469 0.6727065926127129 0.0 0.7908140285153469" /></IndexedFaceSet></shape></Scene></x3d>
Loading

0 comments on commit 3464b01

Please sign in to comment.