added import_3d_mesh (fork); fix in paperfold

This commit is contained in:
leyghisbb 2021-05-11 14:37:20 +02:00
parent 97412c38d7
commit 1a255addad
30 changed files with 2138 additions and 1 deletions

View File

@ -0,0 +1,19 @@
#Name:Cube
#Type:Face-specified
#Direction:Clockwise
v -0.5 -0.5 -0.5
v -0.5 -0.5 0.5
v -0.5 0.5 -0.5
v -0.5 0.5 0.5
v 0.5 -0.5 -0.5
v 0.5 -0.5 0.5
v 0.5 0.5 -0.5
v 0.5 0.5 0.5
f 8 4 2 6
f 8 6 5 7
f 8 7 3 4
f 4 3 1 2
f 1 3 7 5
f 2 1 5 6

View File

@ -0,0 +1,30 @@
#Name:Cuboctahedron
#Type:Face_specified
v -1. 0 0
v -0.5 -0.5 -0.70710678
v -0.5 -0.5 0.70710678
v -0.5 0.5 -0.70710678
v -0.5 0.5 0.70710678
v 0 -1. 0
v 0 1. 0
v 0.5 -0.5 -0.70710678
v 0.5 -0.5 0.70710678
v 0.5 0.5 -0.70710678
v 0.5 0.5 0.70710678
v 1. 0 0
f 12 11 9
f 3 5 1
f 6 9 3
f 5 11 7
f 8 10 12
f 1 4 2
f 2 8 6
f 7 10 4
f 4 10 8 2
f 3 9 11 5
f 9 6 8 12
f 3 1 2 6
f 5 7 4 1
f 11 12 10 7

View File

@ -0,0 +1,36 @@
#NameDodecahedron
#Type:Face_specified
v 0 0 1.4012585
v 0 0 -1.4012585
v 0.17841104 -1.3090170 0.46708618
v 0.17841104 1.3090170 0.46708618
v 0.46708618 -0.80901699 -1.0444364
v 0.46708618 0.80901699 -1.0444364
v 1.0444364 -0.80901699 0.46708618
v 1.0444364 0.80901699 0.46708618
v -1.2228475 -0.5 0.46708618
v -1.2228475 0.5 0.46708618
v 1.2228475 -0.5 -0.46708618
v 1.2228475 0.5 -0.46708618
v -0.93417236 0 -1.0444364
v -0.46708618 -0.80901699 1.0444364
v -0.46708618 0.80901699 1.0444364
v 0.93417236 0 1.0444364
v -1.0444364 -0.80901699 -0.46708618
v -1.0444364 0.80901699 -0.46708618
v -0.17841104 -1.3090170 -0.46708618
v -0.17841104 1.3090170 -0.46708618
f 15 10 9 14 1
f 2 6 12 11 5
f 5 11 7 3 19
f 11 12 8 16 7
f 12 6 20 4 8
f 6 2 13 18 20
f 2 5 19 17 13
f 4 20 18 10 15
f 18 13 17 9 10
f 17 19 3 14 9
f 3 7 16 1 14
f 16 8 4 15 1

View File

@ -0,0 +1,96 @@
#Name:Great Dodecahedron
#Type:Face_specified
v 0. 0. -0.951057
v 0. 0. 0.951057
v -0.425325 -0.309017 -0.100406
v -0.425325 0.309017 -0.100406
v 0.425325 -0.309017 0.100406
v 0.425325 0.309017 0.100406
v -0.688191 -0.5 0.425325
v -0.688191 0.5 0.425325
v 0.688191 -0.5 -0.425325
v 0.688191 0.5 -0.425325
v -0.850651 0. -0.425325
v 0.850651 0. 0.425325
v -0.100406 -0.309017 0.425325
v -0.100406 0.309017 0.425325
v 0.100406 -0.309017 -0.425325
v 0.100406 0.309017 -0.425325
v -0.32492 0. 0.425325
v -0.16246 -0.5 0.100406
v -0.16246 0.5 0.100406
v 0.16246 -0.5 -0.100406
v 0.16246 0.5 -0.100406
v 0.32492 0. -0.425325
v -0.525731 0. 0.100406
v -0.262866 -0.809017 -0.425325
v -0.262866 0.190983 -0.425325
v -0.262866 -0.190983 -0.425325
v -0.262866 0.809017 -0.425325
v 0.262866 -0.809017 0.425325
v 0.262866 0.190983 0.425325
v 0.262866 -0.190983 0.425325
v 0.262866 0.809017 0.425325
v 0.525731 0. -0.100406
f 14 2 31
f 14 31 8
f 14 8 2
f 17 2 8
f 17 8 7
f 17 7 2
f 13 2 7
f 13 7 28
f 13 28 2
f 30 2 28
f 30 28 12
f 30 12 2
f 29 2 12
f 29 12 31
f 29 31 2
f 15 9 24
f 15 24 1
f 15 1 9
f 22 10 9
f 22 9 1
f 22 1 10
f 16 27 10
f 16 10 1
f 16 1 27
f 25 11 27
f 25 27 1
f 25 1 11
f 26 24 11
f 26 11 1
f 26 1 24
f 19 31 27
f 19 27 8
f 19 8 31
f 23 8 11
f 23 11 7
f 23 7 8
f 18 7 24
f 18 24 28
f 18 28 7
f 5 28 9
f 5 9 12
f 5 12 28
f 6 12 10
f 6 10 31
f 6 31 12
f 20 9 28
f 20 28 24
f 20 24 9
f 32 10 12
f 32 12 9
f 32 9 10
f 21 27 31
f 21 31 10
f 21 10 27
f 4 11 8
f 4 8 27
f 4 27 11
f 3 24 7
f 3 7 11
f 3 11 24

View File

@ -0,0 +1,185 @@
#Name:Great Rhombicosidodecahedron
#Type:face_specified
v -1. -1.30902 -3.42705
v -1. -1.30902 3.42705
v -1. 1.30902 -3.42705
v -1. 1.30902 3.42705
v -0.5 -0.5 -3.73607
v -0.5 -0.5 3.73607
v -0.5 0.5 -3.73607
v -0.5 0.5 3.73607
v -0.5 -3.73607 -0.5
v -0.5 -3.73607 0.5
v -0.5 -2.11803 -3.11803
v -0.5 -2.11803 3.11803
v -0.5 3.73607 -0.5
v -0.5 3.73607 0.5
v -0.5 2.11803 -3.11803
v -0.5 2.11803 3.11803
v 0.5 -0.5 -3.73607
v 0.5 -0.5 3.73607
v 0.5 0.5 -3.73607
v 0.5 0.5 3.73607
v 0.5 -3.73607 -0.5
v 0.5 -3.73607 0.5
v 0.5 -2.11803 -3.11803
v 0.5 -2.11803 3.11803
v 0.5 3.73607 -0.5
v 0.5 3.73607 0.5
v 0.5 2.11803 -3.11803
v 0.5 2.11803 3.11803
v 1. -1.30902 -3.42705
v 1. -1.30902 3.42705
v 1. 1.30902 -3.42705
v 1. 1.30902 3.42705
v -3.42705 -1. -1.30902
v -3.42705 -1. 1.30902
v -3.42705 1. -1.30902
v -3.42705 1. 1.30902
v -2.92705 -1.80902 -1.61803
v -2.92705 -1.80902 1.61803
v -2.92705 1.80902 -1.61803
v -2.92705 1.80902 1.61803
v -1.80902 -1.61803 -2.92705
v -1.80902 -1.61803 2.92705
v -1.80902 1.61803 -2.92705
v -1.80902 1.61803 2.92705
v -1.30902 -3.42705 -1.
v -1.30902 -3.42705 1.
v -1.30902 -2.42705 -2.61803
v -1.30902 -2.42705 2.61803
v -1.30902 2.42705 -2.61803
v -1.30902 2.42705 2.61803
v -1.30902 3.42705 -1.
v -1.30902 3.42705 1.
v -2.61803 -1.30902 -2.42705
v -2.61803 -1.30902 2.42705
v -2.61803 1.30902 -2.42705
v -2.61803 1.30902 2.42705
v -3.73607 -0.5 -0.5
v -3.73607 -0.5 0.5
v -3.73607 0.5 -0.5
v -3.73607 0.5 0.5
v -1.61803 -2.92705 -1.80902
v -1.61803 -2.92705 1.80902
v -1.61803 2.92705 -1.80902
v -1.61803 2.92705 1.80902
v -3.11803 -0.5 -2.11803
v -3.11803 -0.5 2.11803
v -3.11803 0.5 -2.11803
v -3.11803 0.5 2.11803
v -2.11803 -3.11803 -0.5
v -2.11803 -3.11803 0.5
v -2.11803 3.11803 -0.5
v -2.11803 3.11803 0.5
v -2.42705 -2.61803 -1.30902
v -2.42705 -2.61803 1.30902
v -2.42705 2.61803 -1.30902
v -2.42705 2.61803 1.30902
v 1.61803 -2.92705 -1.80902
v 1.61803 -2.92705 1.80902
v 1.61803 2.92705 -1.80902
v 1.61803 2.92705 1.80902
v 2.42705 -2.61803 -1.30902
v 2.42705 -2.61803 1.30902
v 2.42705 2.61803 -1.30902
v 2.42705 2.61803 1.30902
v 3.73607 -0.5 -0.5
v 3.73607 -0.5 0.5
v 3.73607 0.5 -0.5
v 3.73607 0.5 0.5
v 2.11803 -3.11803 -0.5
v 2.11803 -3.11803 0.5
v 2.11803 3.11803 -0.5
v 2.11803 3.11803 0.5
v 1.30902 -3.42705 -1.
v 1.30902 -3.42705 1.
v 1.30902 -2.42705 -2.61803
v 1.30902 -2.42705 2.61803
v 1.30902 2.42705 -2.61803
v 1.30902 2.42705 2.61803
v 1.30902 3.42705 -1.
v 1.30902 3.42705 1.
v 2.61803 -1.30902 -2.42705
v 2.61803 -1.30902 2.42705
v 2.61803 1.30902 -2.42705
v 2.61803 1.30902 2.42705
v 3.11803 -0.5 -2.11803
v 3.11803 -0.5 2.11803
v 3.11803 0.5 -2.11803
v 3.11803 0.5 2.11803
v 1.80902 -1.61803 -2.92705
v 1.80902 -1.61803 2.92705
v 1.80902 1.61803 -2.92705
v 1.80902 1.61803 2.92705
v 2.92705 -1.80902 -1.61803
v 2.92705 -1.80902 1.61803
v 2.92705 1.80902 -1.61803
v 2.92705 1.80902 1.61803
v 3.42705 -1. -1.30902
v 3.42705 -1. 1.30902
v 3.42705 1. -1.30902
v 3.42705 1. 1.30902
f 2 6 8 4 44 56 68 66 54 42
f 109 29 17 19 31 111 103 107 105 101
f 24 30 18 6 2 12
f 7 3 15 27 31 19
f 58 57 33 37 73 69 70 74 38 34
f 84 116 120 88 87 119 115 83 91 92
f 90 89 81 113 117 85 86 118 114 82
f 36 40 76 72 71 75 39 35 59 60
f 5 17 29 23 11 1
f 4 8 20 32 28 16
f 67 55 43 3 7 5 1 41 53 65
f 18 30 110 102 106 108 104 112 32 20
f 79 83 115 103 111 97
f 38 74 62 48 42 54
f 4 16 50 44
f 23 29 109 95
f 96 110 30 24
f 43 49 15 3
f 53 41 47 61 73 37
f 98 112 104 116 84 80
f 69 45 9 10 46 70
f 26 100 92 91 99 25
f 82 114 102 110 96 78
f 55 39 75 63 49 43
f 1 11 47 41
f 28 32 112 98
f 61 47 11 23 95 77 93 21 9 45
f 50 16 28 98 80 100 26 14 52 64
f 97 111 31 27
f 42 48 12 2
f 44 50 64 76 40 56
f 77 95 109 101 113 81
f 63 51 13 25 99 79 97 27 15 49
f 46 10 22 94 78 96 24 12 48 62
f 52 14 13 51 71 72
f 22 21 93 89 90 94
f 115 119 107 103
f 34 38 54 66
f 71 51 63 75
f 94 90 82 78
f 114 118 106 102
f 35 39 55 67
f 70 46 62 74
f 99 91 83 79
f 65 53 37 33
f 104 108 120 116
f 77 81 89 93
f 76 64 52 72
f 59 35 67 65 33 57
f 106 118 86 88 120 108
f 68 56 40 36
f 101 105 117 113
f 80 84 92 100
f 73 61 45 69
f 34 66 68 36 60 58
f 105 107 119 87 85 117
f 7 19 17 5
f 6 18 20 8
f 14 26 25 13
f 9 21 22 10
f 58 60 59 57
f 85 87 88 86

View File

@ -0,0 +1,77 @@
#Name:Great Rhombicuboctahedron
#Type:face_specified
v -0.5 1.20711 -1.91421
v -0.5 1.20711 1.91421
v -0.5 -1.20711 -1.91421
v -0.5 -1.20711 1.91421
v -0.5 -1.91421 1.20711
v -0.5 -1.91421 -1.20711
v -0.5 1.91421 1.20711
v -0.5 1.91421 -1.20711
v 0.5 1.20711 -1.91421
v 0.5 1.20711 1.91421
v 0.5 -1.20711 -1.91421
v 0.5 -1.20711 1.91421
v 0.5 -1.91421 1.20711
v 0.5 -1.91421 -1.20711
v 0.5 1.91421 1.20711
v 0.5 1.91421 -1.20711
v 1.20711 -0.5 -1.91421
v 1.20711 -0.5 1.91421
v 1.20711 0.5 -1.91421
v 1.20711 0.5 1.91421
v 1.20711 -1.91421 -0.5
v 1.20711 -1.91421 0.5
v 1.20711 1.91421 -0.5
v 1.20711 1.91421 0.5
v -1.20711 -0.5 -1.91421
v -1.20711 -0.5 1.91421
v -1.20711 0.5 -1.91421
v -1.20711 0.5 1.91421
v -1.20711 -1.91421 -0.5
v -1.20711 -1.91421 0.5
v -1.20711 1.91421 -0.5
v -1.20711 1.91421 0.5
v -1.91421 -0.5 1.20711
v -1.91421 -0.5 -1.20711
v -1.91421 0.5 1.20711
v -1.91421 0.5 -1.20711
v -1.91421 1.20711 -0.5
v -1.91421 1.20711 0.5
v -1.91421 -1.20711 -0.5
v -1.91421 -1.20711 0.5
v 1.91421 -0.5 1.20711
v 1.91421 -0.5 -1.20711
v 1.91421 0.5 1.20711
v 1.91421 0.5 -1.20711
v 1.91421 1.20711 -0.5
v 1.91421 1.20711 0.5
v 1.91421 -1.20711 -0.5
v 1.91421 -1.20711 0.5
f 44 42 17 19
f 14 6 3 11
f 34 36 27 25
f 8 16 9 1
f 20 18 41 43
f 12 4 5 13
f 26 28 35 33
f 2 10 15 7
f 45 23 24 46
f 39 29 30 40
f 48 22 21 47
f 38 32 31 37
f 9 19 17 11 3 25 27 1
f 2 28 26 4 12 18 20 10
f 41 48 47 42 44 45 46 43
f 35 38 37 36 34 39 40 33
f 15 24 23 16 8 31 32 7
f 5 30 29 6 14 21 22 13
f 46 24 15 10 20 43
f 35 28 2 7 32 38
f 41 18 12 13 22 48
f 40 30 5 4 26 33
f 44 19 9 16 23 45
f 37 31 8 1 27 36
f 47 21 14 11 17 42
f 34 25 3 6 29 39

View File

@ -0,0 +1,96 @@
#Name:Great Stellated Dodecahedron
#Type:face_specified
v 0. 0. -0.951057
v 0. 0. 0.951057
v -0.425325 -1.30902 1.80171
v -0.425325 1.30902 1.80171
v 0.425325 -1.30902 -1.80171
v 0.425325 1.30902 -1.80171
v -0.688191 -0.5 0.425325
v -0.688191 0.5 0.425325
v -0.688191 -2.11803 0.425325
v -0.688191 2.11803 0.425325
v 0.688191 -0.5 -0.425325
v 0.688191 0.5 -0.425325
v 0.688191 -2.11803 -0.425325
v 0.688191 2.11803 -0.425325
v -0.850651 0. -0.425325
v 0.850651 0. 0.425325
v -1.11352 -0.809017 -1.80171
v -1.11352 0.809017 -1.80171
v 1.11352 -0.809017 1.80171
v 1.11352 0.809017 1.80171
v -1.80171 -1.30902 -0.425325
v -1.80171 1.30902 -0.425325
v 1.80171 -1.30902 0.425325
v 1.80171 1.30902 0.425325
v -2.22703 0. 0.425325
v 2.22703 0. -0.425325
v -0.262866 -0.809017 -0.425325
v -0.262866 0.809017 -0.425325
v 0.262866 -0.809017 0.425325
v 0.262866 0.809017 0.425325
v -1.37638 0. 1.80171
v 1.37638 0. -1.80171
f 4 2 30
f 4 30 8
f 4 8 2
f 31 2 8
f 31 8 7
f 31 7 2
f 3 2 7
f 3 7 29
f 3 29 2
f 19 2 29
f 19 29 16
f 19 16 2
f 20 2 16
f 20 16 30
f 20 30 2
f 5 11 27
f 5 27 1
f 5 1 11
f 32 12 11
f 32 11 1
f 32 1 12
f 6 28 12
f 6 12 1
f 6 1 28
f 18 15 28
f 18 28 1
f 18 1 15
f 17 27 15
f 17 15 1
f 17 1 27
f 10 30 28
f 10 28 8
f 10 8 30
f 25 8 15
f 25 15 7
f 25 7 8
f 9 7 27
f 9 27 29
f 9 29 7
f 23 29 11
f 23 11 16
f 23 16 29
f 24 16 12
f 24 12 30
f 24 30 16
f 13 11 29
f 13 29 27
f 13 27 11
f 26 12 16
f 26 16 11
f 26 11 12
f 14 28 30
f 14 30 12
f 14 12 28
f 22 15 8
f 22 8 28
f 22 28 15
f 21 27 7
f 21 7 15
f 21 15 27

View File

@ -0,0 +1,36 @@
#Name:Icosahedron
#Type:face_specified
v 0 0 -0.95105652
v 0 0 0.95105652
v -0.85065081 0 -0.42532540
v 0.85065081 0 0.42532540
v 0.68819096 -0.50000000 -0.42532540
v 0.68819096 0.50000000 -0.42532540
v -0.68819096 -0.50000000 0.42532540
v -0.68819096 0.50000000 0.42532540
v -0.26286556 -0.80901699 -0.42532540
v -0.26286556 0.80901699 -0.42532540
v 0.26286556 -0.80901699 0.42532540
v 0.26286556 0.80901699 0.42532540
f 2 12 8
f 2 8 7
f 2 7 11
f 2 11 4
f 2 4 12
f 5 9 1
f 6 5 1
f 10 6 1
f 3 10 1
f 9 3 1
f 12 10 8
f 8 3 7
f 7 9 11
f 11 5 4
f 4 6 12
f 5 11 9
f 6 4 5
f 10 12 6
f 3 8 10
f 9 7 3

View File

@ -0,0 +1,65 @@
#Name:Icosidodecahedron
#Type:face_specified
v 0. -1.61803 0.
v 0. 1.61803 0.
v 0.262866 -0.809017 -1.37638
v 0.262866 0.809017 -1.37638
v 0.425325 -1.30902 0.850651
v 0.425325 1.30902 0.850651
v 0.688191 -0.5 1.37638
v 0.688191 0.5 1.37638
v 1.11352 -0.809017 -0.850651
v 1.11352 0.809017 -0.850651
v -1.37638 0. -0.850651
v -0.688191 -0.5 -1.37638
v -0.688191 0.5 -1.37638
v 1.37638 0. 0.850651
v 0.951057 -1.30902 0.
v 0.951057 1.30902 0.
v 0.850651 0. -1.37638
v -0.951057 -1.30902 0.
v -0.951057 1.30902 0.
v -1.53884 -0.5 0.
v -1.53884 0.5 0.
v 1.53884 -0.5 0.
v 1.53884 0.5 0.
v -0.850651 0. 1.37638
v -1.11352 -0.809017 0.850651
v -1.11352 0.809017 0.850651
v -0.425325 -1.30902 -0.850651
v -0.425325 1.30902 -0.850651
v -0.262866 -0.809017 1.37638
v -0.262866 0.809017 1.37638
f 30 24 29 7 8
f 26 24 30
f 25 29 24
f 5 7 29
f 14 8 7
f 6 30 8
f 16 2 6
f 19 21 26
f 20 18 25
f 1 15 5
f 22 23 14
f 2 19 26 30 6
f 21 20 25 24 26
f 18 1 5 29 25
f 15 22 14 7 5
f 23 16 6 8 14
f 12 13 4 17 3
f 3 17 9
f 17 4 10
f 4 13 28
f 13 12 11
f 12 3 27
f 27 1 18
f 9 22 15
f 10 16 23
f 28 19 2
f 11 20 21
f 27 3 9 15 1
f 9 17 10 23 22
f 10 4 28 2 16
f 28 13 11 21 19
f 11 12 27 18 20

View File

@ -0,0 +1,35 @@
#Name:Jessen's Orthogonal Icosahedron
#Type:face_specified
v 0. -0.809017 0.5
v 0. -0.809017 -0.5
v 0. 0.809017 0.5
v 0. 0.809017 -0.5
v 0.5 0. -0.809017
v 0.5 0. 0.809017
v -0.5 0. -0.809017
v -0.5 0. 0.809017
v -0.809017 0.5 0.
v -0.809017 -0.5 0.
v 0.809017 0.5 0.
v 0.809017 -0.5 0.
f 3 1 6
f 6 1 12
f 6 12 5
f 11 3 6
f 6 5 11
f 12 1 10
f 12 10 2
f 5 12 2
f 3 11 9
f 1 3 8
f 8 10 1
f 7 2 10
f 10 8 7
f 3 9 8
f 7 8 9
f 5 2 4
f 2 7 4
f 7 9 4
f 4 9 11
f 5 4 11

View File

@ -0,0 +1,13 @@
#Name:Methane Molecule
#Type:edge_specified
v 0 0 0
v 0 0 0.61237244
v -0.28867513 -0.50000000 -0.20412415
v -0.28867513 0.50000000 -0.20412415
v 0.57735027 0 -0.20412415
l 1 2
l 1 3
l 1 4
l 1 5

View File

@ -0,0 +1,17 @@
#Name:Octahedron
#Type:face_specified
v -0.5 -0.5 0
v -0.5 0.5 0
v 0 0 -0.70710678
v 0 0 0.70710678
v 0.5 -0.5 0
v 0.5 0.5 0
f 4 5 6
f 4 6 2
f 4 2 1
f 4 1 5
f 5 1 3
f 5 3 6
f 3 1 2
f 6 3 2

View File

@ -0,0 +1,12 @@
#Name:Right Handed Coordinate Axes
#Type:Edge_specified
v 0 0 0
v 1 0 0
v 0 1 0
v 0 0 1
l 1 2
l 1 3
l 1 4

View File

@ -0,0 +1,29 @@
#Name:Rhombic Dodecahedron
#Type:face_specified
v -0.816497 -0.816497 0.
v -0.816497 0. -0.57735
v -0.816497 0. 0.57735
v -0.816497 0.816497 0.
v 0. -0.816497 -0.57735
v 0. -0.816497 0.57735
v 0. 0. -1.1547
v 0. 0. 1.1547
v 0. 0.816497 -0.57735
v 0. 0.816497 0.57735
v 0.816497 -0.816497 0.
v 0.816497 0. -0.57735
v 0.816497 0. 0.57735
v 0.816497 0.816497 0.
f 2 1 3 4
f 1 2 7 5
f 6 8 3 1
f 2 4 9 7
f 8 10 4 3
f 11 6 1 5
f 9 4 10 14
f 5 7 12 11
f 11 13 8 6
f 7 9 14 12
f 13 14 10 8
f 14 13 11 12

View File

@ -0,0 +1,65 @@
#Name:Rhombic Triacontahedron
#Type:face_specified
v 0. 0. -1.61803
v 0. 0. 1.61803
v 0.276393 -0.850651 1.17082
v 0.276393 0.850651 1.17082
v 0.894427 0. 1.17082
v 1.17082 -0.850651 0.723607
v 1.17082 -0.850651 -0.276393
v 1.17082 0.850651 0.723607
v 1.17082 0.850651 -0.276393
v -0.894427 0. -1.17082
v -0.447214 -1.37638 0.723607
v -0.447214 -1.37638 -0.276393
v -0.447214 1.37638 0.723607
v -0.447214 1.37638 -0.276393
v 0.447214 -1.37638 0.276393
v 0.447214 -1.37638 -0.723607
v 0.447214 1.37638 0.276393
v 0.447214 1.37638 -0.723607
v -1.44721 0. 0.723607
v -1.44721 0. -0.276393
v -0.723607 -0.525731 1.17082
v -0.723607 0.525731 1.17082
v 0.723607 -0.525731 -1.17082
v 0.723607 0.525731 -1.17082
v 1.44721 0. 0.276393
v 1.44721 0. -0.723607
v -1.17082 -0.850651 0.276393
v -1.17082 -0.850651 -0.723607
v -1.17082 0.850651 0.276393
v -1.17082 0.850651 -0.723607
v -0.276393 -0.850651 -1.17082
v -0.276393 0.850651 -1.17082
f 16 15 11 12
f 14 13 17 18
f 10 28 20 30
f 8 5 6 25
f 12 28 31 16
f 32 30 14 18
f 6 3 11 15
f 8 17 13 4
f 11 21 19 27
f 13 29 19 22
f 7 16 23 26
f 24 18 9 26
f 12 11 27 28
f 30 29 13 14
f 7 6 15 16
f 18 17 8 9
f 2 22 19 21
f 23 1 24 26
f 3 2 21 11
f 4 13 22 2
f 16 31 1 23
f 1 32 18 24
f 31 28 10 1
f 10 30 32 1
f 6 5 2 3
f 8 4 2 5
f 28 27 19 20
f 20 19 29 30
f 26 25 6 7
f 9 8 25 26

View File

@ -0,0 +1,127 @@
#Name:Small Rhombicosidodecahedron
#Type:face_specified
v -0.5 -0.5 -2.11803
v -0.5 -0.5 2.11803
v -0.5 0.5 -2.11803
v -0.5 0.5 2.11803
v -0.5 -2.11803 -0.5
v -0.5 -2.11803 0.5
v -0.5 2.11803 -0.5
v -0.5 2.11803 0.5
v 0. -1.30902 -1.80902
v 0. -1.30902 1.80902
v 0. 1.30902 -1.80902
v 0. 1.30902 1.80902
v 0.5 -0.5 -2.11803
v 0.5 -0.5 2.11803
v 0.5 0.5 -2.11803
v 0.5 0.5 2.11803
v 0.5 -2.11803 -0.5
v 0.5 -2.11803 0.5
v 0.5 2.11803 -0.5
v 0.5 2.11803 0.5
v -1.80902 0. -1.30902
v -1.80902 0. 1.30902
v -0.809017 -1.61803 -1.30902
v -0.809017 -1.61803 1.30902
v -0.809017 1.61803 -1.30902
v -0.809017 1.61803 1.30902
v -1.61803 -1.30902 -0.809017
v -1.61803 -1.30902 0.809017
v -1.61803 1.30902 -0.809017
v -1.61803 1.30902 0.809017
v -2.11803 -0.5 -0.5
v -2.11803 -0.5 0.5
v -2.11803 0.5 -0.5
v -2.11803 0.5 0.5
v -1.30902 -1.80902 0.
v -1.30902 -0.809017 -1.61803
v -1.30902 -0.809017 1.61803
v -1.30902 0.809017 -1.61803
v -1.30902 0.809017 1.61803
v -1.30902 1.80902 0.
v 0.809017 -1.61803 -1.30902
v 0.809017 -1.61803 1.30902
v 0.809017 1.61803 -1.30902
v 0.809017 1.61803 1.30902
v 1.61803 -1.30902 -0.809017
v 1.61803 -1.30902 0.809017
v 1.61803 1.30902 -0.809017
v 1.61803 1.30902 0.809017
v 2.11803 -0.5 -0.5
v 2.11803 -0.5 0.5
v 2.11803 0.5 -0.5
v 2.11803 0.5 0.5
v 1.30902 -1.80902 0.
v 1.30902 -0.809017 -1.61803
v 1.30902 -0.809017 1.61803
v 1.30902 0.809017 -1.61803
v 1.30902 0.809017 1.61803
v 1.30902 1.80902 0.
v 1.80902 0. -1.30902
v 1.80902 0. 1.30902
f 36 23 27
f 37 28 24
f 40 8 7
f 35 5 6
f 38 29 25
f 39 26 30
f 10 14 2
f 9 1 13
f 12 4 16
f 11 15 3
f 54 45 41
f 55 42 46
f 58 19 20
f 53 18 17
f 56 43 47
f 57 48 44
f 34 32 22
f 33 21 31
f 59 51 49
f 60 50 52
f 27 31 21 36
f 23 36 1 9
f 10 2 37 24
f 37 22 32 28
f 8 40 30 26
f 25 29 40 7
f 35 27 23 5
f 6 24 28 35
f 3 38 25 11
f 21 33 29 38
f 39 30 34 22
f 12 26 39 4
f 55 14 10 42
f 41 9 13 54
f 57 44 12 16
f 15 11 43 56
f 45 54 59 49
f 50 60 55 46
f 48 58 20 44
f 43 19 58 47
f 53 17 41 45
f 46 42 18 53
f 59 56 47 51
f 52 48 57 60
f 31 32 34 33
f 17 18 6 5
f 1 3 15 13
f 14 16 4 2
f 7 8 20 19
f 51 52 50 49
f 3 1 36 21 38
f 22 37 2 4 39
f 29 33 34 30 40
f 27 35 28 32 31
f 42 10 24 6 18
f 41 17 5 23 9
f 20 8 26 12 44
f 11 25 7 19 43
f 56 59 54 13 15
f 57 16 14 55 60
f 58 48 52 51 47
f 49 50 46 53 45

View File

@ -0,0 +1,54 @@
#Name:Small Rhombicuboctahedron
#Type:face_specified
v -0.5 -0.5 -1.20711
v -0.5 -0.5 1.20711
v -0.5 0.5 -1.20711
v -0.5 0.5 1.20711
v -0.5 -1.20711 -0.5
v -0.5 -1.20711 0.5
v -0.5 1.20711 -0.5
v -0.5 1.20711 0.5
v 0.5 -0.5 -1.20711
v 0.5 -0.5 1.20711
v 0.5 0.5 -1.20711
v 0.5 0.5 1.20711
v 0.5 -1.20711 -0.5
v 0.5 -1.20711 0.5
v 0.5 1.20711 -0.5
v 0.5 1.20711 0.5
v -1.20711 -0.5 -0.5
v -1.20711 -0.5 0.5
v -1.20711 0.5 -0.5
v -1.20711 0.5 0.5
v 1.20711 -0.5 -0.5
v 1.20711 -0.5 0.5
v 1.20711 0.5 -0.5
v 1.20711 0.5 0.5
f 3 11 9 1
f 2 10 12 4
f 24 22 21 23
f 19 17 18 20
f 5 13 14 6
f 8 16 15 7
f 13 21 22 14
f 16 24 23 15
f 6 18 17 5
f 7 19 20 8
f 6 14 10 2
f 4 12 16 8
f 22 24 12 10
f 2 4 20 18
f 1 9 13 5
f 7 15 11 3
f 9 11 23 21
f 17 19 3 1
f 22 10 14
f 16 12 24
f 6 2 18
f 20 4 8
f 13 9 21
f 23 11 15
f 17 1 5
f 7 3 19

View File

@ -0,0 +1,95 @@
#Name:Small Triambic Icosahedron
#Type:face_specified
v 0. 0. -0.951057
v 0. 0. 0.951057
v 0.262866 -0.809017 0.425325
v 0.262866 0.809017 0.425325
v 0.688191 -0.5 -0.425325
v 0.688191 0.5 -0.425325
v 0.995959 0. -0.190211
v -0.688191 -0.5 0.425325
v -0.688191 0.5 0.425325
v -0.49798 -0.361803 -0.805748
v -0.49798 0.361803 -0.805748
v 0.49798 -0.361803 0.805748
v 0.49798 0.361803 0.805748
v 0.190211 -0.58541 -0.805748
v 0.190211 0.58541 -0.805748
v 0.850651 0. 0.425325
v -0.190211 -0.58541 0.805748
v -0.190211 0.58541 0.805748
v -0.615537 0. 0.805748
v -0.307768 -0.947214 0.190211
v -0.307768 0.947214 0.190211
v 0.307768 -0.947214 -0.190211
v 0.307768 0.947214 -0.190211
v 0.615537 0. -0.805748
v 0.805748 -0.58541 0.190211
v 0.805748 0.58541 0.190211
v -0.850651 0. -0.425325
v -0.262866 -0.809017 -0.425325
v -0.262866 0.809017 -0.425325
v -0.995959 0. 0.190211
v -0.805748 -0.58541 -0.190211
v -0.805748 0.58541 -0.190211
f 18 2 4
f 18 4 9
f 18 9 2
f 19 2 9
f 19 9 8
f 19 8 2
f 17 2 8
f 17 8 3
f 17 3 2
f 12 2 3
f 12 3 16
f 12 16 2
f 13 2 16
f 13 16 4
f 13 4 2
f 14 5 28
f 14 28 1
f 14 1 5
f 24 6 5
f 24 5 1
f 24 1 6
f 15 29 6
f 15 6 1
f 15 1 29
f 11 27 29
f 11 29 1
f 11 1 27
f 10 28 27
f 10 27 1
f 10 1 28
f 21 4 29
f 21 29 9
f 21 9 4
f 30 9 27
f 30 27 8
f 30 8 9
f 20 8 28
f 20 28 3
f 20 3 8
f 25 3 5
f 25 5 16
f 25 16 3
f 26 16 6
f 26 6 4
f 26 4 16
f 22 5 3
f 22 3 28
f 22 28 5
f 7 6 16
f 7 16 5
f 7 5 6
f 23 29 4
f 23 4 6
f 23 6 29
f 32 27 9
f 32 9 29
f 32 29 27
f 31 28 8
f 31 8 27
f 31 27 28

View File

@ -0,0 +1,65 @@
#Name:Snub Cube
#Type:face_specified
v -1.1426135 -0.33775397 -0.62122641
v -1.1426135 0.33775397 0.62122641
v -1.1426135 -0.62122641 0.33775397
v -1.1426135 0.62122641 -0.33775397
v 1.1426135 -0.33775397 0.62122641
v 1.1426135 0.33775397 -0.62122641
v 1.1426135 -0.62122641 -0.33775397
v 1.1426135 0.62122641 0.33775397
v -0.33775397 -1.1426135 0.62122641
v -0.33775397 1.1426135 -0.62122641
v -0.33775397 -0.62122641 -1.1426135
v -0.33775397 0.62122641 1.1426135
v 0.33775397 -1.1426135 -0.62122641
v 0.33775397 1.1426135 0.62122641
v 0.33775397 -0.62122641 1.1426135
v 0.33775397 0.62122641 -1.1426135
v -0.62122641 -1.1426135 -0.33775397
v -0.62122641 1.1426135 0.33775397
v -0.62122641 -0.33775397 1.1426135
v -0.62122641 0.33775397 -1.1426135
v 0.62122641 -1.1426135 0.33775397
v 0.62122641 1.1426135 -0.33775397
v 0.62122641 -0.33775397 -1.1426135
v 0.62122641 0.33775397 1.1426135
f 3 1 17
f 3 17 9
f 3 19 2
f 3 9 19
f 1 4 20
f 1 20 11
f 1 11 17
f 2 19 12
f 2 18 4
f 2 12 18
f 4 18 10
f 4 10 20
f 17 11 13
f 19 9 15
f 18 12 14
f 20 10 16
f 9 21 15
f 11 23 13
f 12 24 14
f 10 22 16
f 13 23 7
f 13 7 21
f 15 21 5
f 15 5 24
f 16 22 6
f 16 6 23
f 14 24 8
f 14 8 22
f 21 7 5
f 23 6 7
f 24 5 8
f 22 8 6
f 1 3 2 4
f 21 9 17 13
f 24 12 19 15
f 10 18 14 22
f 11 20 16 23
f 8 5 7 6

View File

@ -0,0 +1,156 @@
#Name:Snub Dodecahedron
#Type:face_specified
v -2.0502159 -0.64302961 0.17539263
v 2.0502159 -0.64302961 -0.17539263
v -1.6450691 0.64302961 1.2360806
v 1.6450691 0.64302961 -1.2360806
v -2.0927544 0.33092102 0.39812710
v 2.0927544 0.33092102 -0.39812710
v -1.3329632 1.6469179 -0.39812710
v 1.3329632 1.6469179 0.39812710
v -1.8252651 -0.33092102 1.0984232
v 1.8252651 -0.33092102 -1.0984232
v -0.62604653 1.7461864 -1.0984232
v 0.62604653 1.7461864 1.0984232
v -1.0622158 1.4540242 1.1853886
v 1.0622158 1.4540242 -1.1853886
v -1.9321359 0.84755005 -0.44288192
v 1.9321359 0.84755005 0.44288192
v -1.1448745 -0.84755005 1.6181953
v 1.1448745 -0.84755005 -1.6181953
v -1.5819879 -1.4540242 -0.17539263
v 1.5819879 -1.4540242 0.17539263
v -1.0574124 0.37482166 -1.8409298
v 1.0574124 0.37482166 1.8409298
v -0.43913786 -0.37482166 -2.0770897
v 0.43913786 -0.37482166 2.0770897
v -1.5624104 -1.2495038 0.80327387
v 1.5624104 -1.2495038 -0.80327387
v -1.8633072 -0.72833518 -0.80327387
v 1.8633072 -0.72833518 0.80327387
v -1.7000678 1.2495038 0.44288192
v 1.7000678 1.2495038 -0.44288192
v -0.72811404 -1.6469179 1.1853886
v 0.72811404 -1.6469179 -1.1853886
v -0.26565458 -1.7461864 -1.2360806
v 0.26565458 -1.7461864 1.2360806
v -0.75979117 -1.9778390 -0.39812710
v 0.75979117 -1.9778390 0.39812710
v -1.1992186 -1.4152654 -1.0984232
v 1.1992186 -1.4152654 1.0984232
v -1.7903298 0.19289371 -1.1853886
v 1.7903298 0.19289371 1.1853886
v -1.3064371 -0.56771537 -1.6181953
v 1.3064371 -0.56771537 1.6181953
v -0.85331128 0.72833518 1.8409298
v 0.85331128 0.72833518 -1.8409298
v -1.3794145 1.1031568 -1.2360806
v 1.3794145 1.1031568 1.2360806
v -0.10503615 0.56771537 -2.0770897
v 0.10503615 0.56771537 2.0770897
v -0.46822796 2.0970538 -0.17539263
v 0.46822796 2.0970538 0.17539263
v -0.30089684 1.9778390 0.80327387
v 0.30089684 1.9778390 -0.80327387
v -0.16156263 1.4152654 1.6181953
v 0.16156263 1.4152654 -1.6181953
v -0.54417401 -0.19289371 2.0770897
v 0.54417401 -0.19289371 -2.0770897
v -0.23206810 -2.0970538 0.44288192
v 0.23206810 -2.0970538 -0.44288192
v -0.20410113 -1.1031568 1.8409298
v 0.20410113 -1.1031568 -1.8409298
f 5 1 9
f 5 9 3
f 5 29 15
f 5 3 29
f 1 27 19
f 1 19 25
f 1 25 9
f 15 29 7
f 15 45 39
f 15 7 45
f 27 39 41
f 27 41 37
f 27 37 19
f 9 25 17
f 39 45 21
f 39 21 41
f 29 3 13
f 3 43 13
f 19 37 35
f 25 31 17
f 45 7 11
f 7 49 11
f 41 21 23
f 37 33 35
f 17 31 59
f 17 59 55
f 13 43 53
f 13 53 51
f 21 47 23
f 43 55 48
f 43 48 53
f 35 33 58
f 35 58 57
f 31 57 34
f 31 34 59
f 11 49 52
f 11 52 54
f 55 59 24
f 55 24 48
f 49 51 50
f 49 50 52
f 23 47 56
f 23 56 60
f 51 53 12
f 51 12 50
f 33 60 32
f 33 32 58
f 57 58 36
f 57 36 34
f 47 54 44
f 47 44 56
f 48 24 22
f 54 52 14
f 54 14 44
f 60 56 18
f 60 18 32
f 34 36 38
f 24 42 22
f 50 12 8
f 12 46 8
f 32 18 26
f 36 20 38
f 44 14 4
f 22 42 40
f 22 40 46
f 14 30 4
f 18 10 26
f 38 20 28
f 38 28 42
f 42 28 40
f 8 46 16
f 8 16 30
f 46 40 16
f 26 10 2
f 26 2 20
f 20 2 28
f 4 30 6
f 4 6 10
f 30 16 6
f 10 6 2
f 39 27 1 5 15
f 3 9 17 55 43
f 51 49 7 29 13
f 57 31 25 19 35
f 47 21 45 11 54
f 33 37 41 23 60
f 42 24 59 34 38
f 46 12 53 48 22
f 36 58 32 26 20
f 14 52 50 8 30
f 44 4 10 18 56
f 16 40 28 2 6

View File

@ -0,0 +1,24 @@
#Face:Szilassi Polyhedron
#Type:face_specified
v -4.8 0. 4.8
v -2.8 -1. 0.8
v -2.8 0. 0.8
v -1.8 1. 0.8
v -1.5 -1.5 -1.2
v -0.8 2. -3.2
v 0. -5.04 -4.8
v 0. 5.04 -4.8
v 0.8 -2. -3.2
v 1.5 1.5 -1.2
v 1.8 -1. 0.8
v 2.8 0. 0.8
v 2.8 1. 0.8
v 4.8 0. 4.8
f 4 10 6 1 14 13
f 3 2 1 6 8 7
f 5 10 4 3 7 9
f 10 5 11 12 8 6
f 12 13 14 9 7 8
f 11 5 9 14 1 2
f 13 12 11 2 3 4

View File

@ -0,0 +1,12 @@
#Name:Tetrahedron
#Type:face_specified
v 0 0 0.61237244
v -0.28867513 -0.50000000 -0.20412415
v -0.28867513 0.50000000 -0.20412415
v 0.57735027 0 -0.20412415
f 2 3 4
f 3 2 1
f 4 1 2
f 1 4 3

View File

@ -0,0 +1,42 @@
#Name:Truncated Cube
#Type:face_specified
v -0.5 1.2071068 1.2071068
v -0.5 1.2071068 -1.2071068
v -0.5 -1.2071068 1.2071068
v -0.5 -1.2071068 -1.2071068
v 0.5 1.2071068 1.2071068
v 0.5 1.2071068 -1.2071068
v 0.5 -1.2071068 1.2071068
v 0.5 -1.2071068 -1.2071068
v 1.2071068 -0.5 1.2071068
v 1.2071068 -0.5 -1.2071068
v 1.2071068 0.5 1.2071068
v 1.2071068 0.5 -1.2071068
v 1.2071068 1.2071068 -0.5
v 1.2071068 1.2071068 0.5
v 1.2071068 -1.2071068 -0.5
v 1.2071068 -1.2071068 0.5
v -1.2071068 -0.5 1.2071068
v -1.2071068 -0.5 -1.2071068
v -1.2071068 0.5 1.2071068
v -1.2071068 0.5 -1.2071068
v -1.2071068 1.2071068 -0.5
v -1.2071068 1.2071068 0.5
v -1.2071068 -1.2071068 -0.5
v -1.2071068 -1.2071068 0.5
f 6 12 10 8 4 18 20 2
f 1 19 17 3 7 9 11 5
f 3 24 23 4 8 15 16 7
f 5 14 13 6 2 21 22 1
f 9 16 15 10 12 13 14 11
f 19 22 21 20 18 23 24 17
f 16 9 7
f 5 11 14
f 3 17 24
f 22 19 1
f 8 10 15
f 13 12 6
f 23 18 4
f 2 20 21

View File

@ -0,0 +1,96 @@
#Name:Truncated Dodecahedron
#Type:face_specified
v 0 -1.6180340 2.4898983
v 0 -1.6180340 -2.4898983
v 0 1.6180340 2.4898983
v 0 1.6180340 -2.4898983
v 0.42532540 -2.9270510 0.26286556
v 0.42532540 2.9270510 0.26286556
v 0.68819096 -2.1180340 1.9641672
v 0.68819096 2.1180340 1.9641672
v -2.7527638 0 -1.1135164
v -2.0645729 -2.1180340 0.26286556
v -2.0645729 2.1180340 0.26286556
v -1.3763819 -2.6180340 -0.26286556
v -1.3763819 2.6180340 -0.26286556
v -0.68819096 -2.1180340 -1.9641672
v -0.68819096 2.1180340 -1.9641672
v 1.3763819 -2.6180340 0.26286556
v 1.3763819 2.6180340 0.26286556
v 2.7527638 0 1.1135164
v 1.8017073 -1.3090170 -1.9641672
v 1.8017073 1.3090170 -1.9641672
v 2.0645729 -2.1180340 -0.26286556
v 2.0645729 2.1180340 -0.26286556
v 2.2270327 0 1.9641672
v 2.2270327 -1.6180340 -1.1135164
v 2.2270327 1.6180340 -1.1135164
v -2.6523581 -1.3090170 0.26286556
v -2.6523581 1.3090170 0.26286556
v 2.6523581 -1.3090170 -0.26286556
v 2.6523581 1.3090170 -0.26286556
v 2.9152237 -0.5 0.26286556
v 2.9152237 0.5 0.26286556
v -2.9152237 -0.5 -0.26286556
v -2.9152237 0.5 -0.26286556
v 0.95105652 -1.3090170 2.4898983
v 0.95105652 -1.3090170 -2.4898983
v 0.95105652 1.3090170 2.4898983
v 0.95105652 1.3090170 -2.4898983
v 0.85065081 -2.6180340 1.1135164
v 0.85065081 2.6180340 1.1135164
v -0.95105652 -1.3090170 2.4898983
v -0.95105652 -1.3090170 -2.4898983
v -0.95105652 1.3090170 2.4898983
v -0.95105652 1.3090170 -2.4898983
v -1.5388418 -0.5 2.4898983
v -1.5388418 -0.5 -2.4898983
v -1.5388418 0.5 2.4898983
v -1.5388418 0.5 -2.4898983
v 1.5388418 -0.5 2.4898983
v 1.5388418 -0.5 -2.4898983
v 1.5388418 0.5 2.4898983
v 1.5388418 0.5 -2.4898983
v -2.2270327 0 -1.9641672
v -2.2270327 -1.6180340 1.1135164
v -2.2270327 1.6180340 1.1135164
v -0.85065081 -2.6180340 -1.1135164
v -0.85065081 2.6180340 -1.1135164
v -1.8017073 -1.3090170 1.9641672
v -1.8017073 1.3090170 1.9641672
v -0.42532540 -2.9270510 -0.26286556
v -0.42532540 2.9270510 -0.26286556
f 3 42 46 44 40 1 34 48 50 36
f 47 43 4 37 51 49 35 2 41 45
f 2 35 19 24 21 16 5 59 55 14
f 49 51 20 25 29 31 30 28 24 19
f 37 4 15 56 60 6 17 22 25 20
f 43 47 52 9 33 27 11 13 56 15
f 45 41 14 55 12 10 26 32 9 52
f 6 60 13 11 54 58 42 3 8 39
f 27 33 32 26 53 57 44 46 58 54
f 10 12 59 5 38 7 1 40 57 53
f 16 21 28 30 18 23 48 34 7 38
f 31 29 22 17 39 8 36 50 23 18
f 9 32 33
f 18 30 31
f 47 45 52
f 50 48 23
f 10 53 26
f 27 54 11
f 21 24 28
f 29 25 22
f 40 44 57
f 58 46 42
f 35 49 19
f 20 51 37
f 12 55 59
f 60 56 13
f 41 2 14
f 15 4 43
f 34 1 7
f 8 3 36
f 38 5 16
f 17 6 39

View File

@ -0,0 +1,96 @@
#Name:Truncated Icosahedron
#Type:Face_specified
v -0.16245985 -2.1180340 1.2759762
v -0.16245985 2.1180340 1.2759762
v 0.16245985 -2.1180340 -1.2759762
v 0.16245985 2.1180340 -1.2759762
v -0.26286556 -0.80901699 -2.3274384
v -0.26286556 -2.4270510 -0.42532540
v -0.26286556 0.80901699 -2.3274384
v -0.26286556 2.4270510 -0.42532540
v 0.26286556 -0.80901699 2.3274384
v 0.26286556 -2.4270510 0.42532540
v 0.26286556 0.80901699 2.3274384
v 0.26286556 2.4270510 0.42532540
v 0.68819096 -0.5 -2.3274384
v 0.68819096 0.5 -2.3274384
v 1.2139221 -2.1180340 0.42532540
v 1.2139221 2.1180340 0.42532540
v -2.0645729 -0.5 1.2759762
v -2.0645729 0.5 1.2759762
v -1.3763819 -1.0 1.8017073
v -1.3763819 1.0 1.8017073
v -1.3763819 -1.6180340 -1.2759762
v -1.3763819 1.6180340 -1.2759762
v -0.68819096 -0.5 2.3274384
v -0.68819096 0.5 2.3274384
v 1.3763819 -1.0 -1.8017073
v 1.3763819 1.0 -1.8017073
v 1.3763819 -1.6180340 1.2759762
v 1.3763819 1.6180340 1.2759762
v -1.7013016 0 -1.8017073
v 1.7013016 0 1.8017073
v -1.2139221 -2.1180340 -0.42532540
v -1.2139221 2.1180340 -0.42532540
v -1.9641672 -0.80901699 -1.2759762
v -1.9641672 0.80901699 -1.2759762
v 2.0645729 -0.5 -1.2759762
v 2.0645729 0.5 -1.2759762
v 2.2270327 -1.0 -0.42532540
v 2.2270327 1.0 -0.42532540
v 2.3894926 -0.5 0.42532540
v 2.3894926 0.5 0.42532540
v -1.1135164 -1.8090170 1.2759762
v -1.1135164 1.8090170 1.2759762
v 1.1135164 -1.8090170 -1.2759762
v 1.1135164 1.8090170 -1.2759762
v -2.3894926 -0.5 -0.42532540
v -2.3894926 0.5 -0.42532540
v -1.6392475 -1.8090170 0.42532540
v -1.6392475 1.8090170 0.42532540
v 1.6392475 -1.8090170 -0.42532540
v 1.6392475 1.8090170 -0.42532540
v 1.9641672 -0.80901699 1.2759762
v 1.9641672 0.80901699 1.2759762
v 0.85065081 0 2.3274384
v -2.2270327 -1.0 0.42532540
v -2.2270327 1.0 0.42532540
v -0.85065081 0 -2.3274384
v -0.52573111 -1.6180340 -1.8017073
v -0.52573111 1.6180340 -1.8017073
v 0.52573111 -1.6180340 1.8017073
v 0.52573111 1.6180340 1.8017073
f 53 11 24 23 9
f 51 39 40 52 30
f 60 28 16 12 2
f 20 42 48 55 18
f 19 17 54 47 41
f 1 10 15 27 59
f 36 26 44 50 38
f 4 58 22 32 8
f 34 29 33 45 46
f 21 57 3 6 31
f 37 49 43 25 35
f 13 5 56 7 14
f 9 59 27 51 30 53
f 53 30 52 28 60 11
f 11 60 2 42 20 24
f 24 20 18 17 19 23
f 23 19 41 1 59 9
f 13 25 43 3 57 5
f 5 57 21 33 29 56
f 56 29 34 22 58 7
f 7 58 4 44 26 14
f 14 26 36 35 25 13
f 40 38 50 16 28 52
f 16 50 44 4 8 12
f 12 8 32 48 42 2
f 48 32 22 34 46 55
f 55 46 45 54 17 18
f 54 45 33 21 31 47
f 47 31 6 10 1 41
f 10 6 3 43 49 15
f 15 49 37 39 51 27
f 39 37 35 36 38 40

View File

@ -0,0 +1,42 @@
#Name:Truncated Octahedron
#Type:face_specified
v -1.5 -0.5 0
v -1.5 0.5 0
v -1. -1. -0.70710678
v -1. -1. 0.70710678
v -1. 1. -0.70710678
v -1. 1. 0.70710678
v -0.5 -1.5 0
v -0.5 -0.5 -1.4142136
v -0.5 -0.5 1.4142136
v -0.5 0.5 -1.4142136
v -0.5 0.5 1.4142136
v -0.5 1.5 0
v 0.5 -1.5 0
v 0.5 -0.5 -1.4142136
v 0.5 -0.5 1.4142136
v 0.5 0.5 -1.4142136
v 0.5 0.5 1.4142136
v 0.5 1.5 0
v 1. -1. -0.70710678
v 1. -1. 0.70710678
v 1. 1. -0.70710678
v 1. 1. 0.70710678
v 1.5 -0.5 0
v 1.5 0.5 0
f 17 11 9 15
f 14 8 10 16
f 22 24 21 18
f 12 5 2 6
f 13 19 23 20
f 4 1 3 7
f 19 13 7 3 8 14
f 15 9 4 7 13 20
f 16 10 5 12 18 21
f 22 18 12 6 11 17
f 20 23 24 22 17 15
f 14 16 21 24 23 19
f 9 11 6 2 1 4
f 3 1 2 5 10 8

View File

@ -0,0 +1,24 @@
#Name:Truncated Tetrahedron
#Type:face_specified
v 0 -1. -0.61237244
v 0 1. -0.61237244
v -0.57735027 -1. 0.20412415
v -0.57735027 1. 0.20412415
v -0.28867513 -0.5 1.0206207
v -0.28867513 0.5 1.0206207
v 0.57735027 0 1.0206207
v 1.1547005 0 0.20412415
v -0.86602540 -0.5 -0.61237244
v -0.86602540 0.5 -0.61237244
v 0.86602540 -0.5 -0.61237244
v 0.86602540 0.5 -0.61237244
f 11 12 8
f 3 9 1
f 2 10 4
f 6 5 7
f 11 8 7 5 3 1
f 2 4 6 7 8 12
f 9 3 5 6 4 10
f 2 12 11 1 9 10

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Import 3D Mesh</name>
<id>fablabchemnitz.de.import_3d_mesh</id>
<param name="tab" type="notebook">
<page name="common" gui-text="Model file">
<param name="input_choice" type="optiongroup" appearance="combo" gui-text="Input choice">
<option value="default">Default object</option>
<option value="custom">Custom input file</option>
</param>
<param name="obj" type="optiongroup" appearance="combo" gui-text="Objects">
<option value="cube">Cube</option>
<option value="trunc_cube">Truncated Cube</option>
<option value="snub_cube">Snub Cube</option>
<option value="cuboct">Cuboctahedron</option>
<option value="tet">Tetrahedron</option>
<option value="trunc_tet">Truncated Tetrahedron</option>
<option value="oct">Octahedron</option>
<option value="trunc_oct">Truncated Octahedron</option>
<option value="icos">Icosahedron</option>
<option value="trunc_icos">Truncated Icosahedron</option>
<option value="small_triam_icos">Small Triambic Icosahedron</option>
<option value="dodec">Dodecahedron</option>
<option value="trunc_dodec">Truncated Dodecahedron</option>
<option value="snub_dodec">Snub Dodecahedron</option>
<option value="great_dodec">Great Dodecahedron</option>
<option value="great_stel_dodec">Great Stellated Dodecahedron</option>
</param>
<param name="spec_file" type="path" gui-text="Custom Input File" filetypes="obj,off,ply,stl" mode="file">great_rhombicuboct.obj</param>
<param name="type" type="optiongroup" appearance="combo" gui-text="Object Type:">
<option value="face">Face-Specified</option>
<option value="edge">Edge-Specified</option></param>
<param name="cw_wound" type="bool" gui-text="Clockwise wound object">false</param>
</page>
<page name="view" gui-text="View">
<param name="r1_ax" type="optiongroup" appearance="combo" gui-text="Rotate around:">
<option value="x">X-Axis</option>
<option value="y">Y-Axis</option>
<option value="z">Z-Axis</option></param>
<param name="r1_ang" type="float" min="-360" max="360" gui-text="Rotation (deg):">0</param>
<param name="r2_ax" type="optiongroup" appearance="combo" gui-text="Then rotate around:">
<option value="x">X-Axis</option>
<option value="y">Y-Axis</option>
<option value="z">Z-Axis</option></param>
<param name="r2_ang" type="float" min="-360" max="360" gui-text="Rotation (deg):">0</param>
<param name="r3_ax" type="optiongroup" appearance="combo" gui-text="Then rotate around:">
<option value="x">X-Axis</option>
<option value="y">Y-Axis</option>
<option value="z">Z-Axis</option></param>
<param name="r3_ang" type="float" min="-360" max="360" gui-text="Rotation (deg):">0</param>
<param name="r4_ax" type="optiongroup" appearance="combo" gui-text="Then rotate around:">
<option value="x">X-Axis</option>
<option value="y">Y-Axis</option>
<option value="z">Z-Axis</option></param>
<param name="r4_ang" type="float" min="-360" max="360" gui-text="Rotation (deg):">0</param>
<param name="r5_ax" type="optiongroup" appearance="combo" gui-text="Then rotate around:">
<option value="x">X-Axis</option>
<option value="y">Y-Axis</option>
<option value="z">Z-Axis</option></param>
<param name="r5_ang" type="float" min="-360" max="360" gui-text="Rotation (deg):">0</param>
<param name="r6_ax" type="optiongroup" appearance="combo" gui-text="Then rotate around:">
<option value="x">X-Axis</option>
<option value="y">Y-Axis</option>
<option value="z">Z-Axis</option></param>
<param name="r6_ang" type="float" min="-360" max="360" gui-text="Rotation (deg):">0</param>
</page>
<page name="style" gui-text="Style">
<param name="scl" type="float" min="0" max="10000" gui-text="Scaling factor:">100</param>
<param name="f_r" type="int" min="0" max="255" gui-text="Fill color, Red:">255</param>
<param name="f_g" type="int" min="0" max="255" gui-text="Fill color, Green:">0</param>
<param name="f_b" type="int" min="0" max="255" gui-text="Fill color, Blue:">0</param>
<param name="f_opac" type="int" min="0" max="100" gui-text="Fill opacity (%):">100</param>
<param name="s_opac" type="int" min="0" max="100" gui-text="Stroke opacity (%):">100</param>
<param name="th" type="float" min="0" max="100" gui-text="Stroke width (px):">2</param>
<param name="shade" type="bool" gui-text="Shading">true</param>
<param name="lv_x" type="float" min="-100" max="100" gui-text="Light X:">1</param>
<param name="lv_y" type="float" min="-100" max="100" gui-text="Light Y:">1</param>
<param name="lv_z" type="float" min="-100" max="100" gui-text="Light Z:">-2</param>
<param name="show" type="optiongroup" appearance="combo" gui-text="Show:">
<option value="fce">Faces</option>
<option value="edg">Edges</option>
<option value="vtx">Vertices</option>
</param>
<param name="back" type="bool" gui-text="Draw back-facing polygons">false</param>
<param name="z_sort" type="optiongroup" appearance="combo" gui-text="Z-sort faces by:">
<option value="max">Maximum</option>
<option value="min">Minimum</option>
<option value="cent">Centroid</option></param>
</page>
</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Import/Export/Transfer"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">import_3d_mesh.py</command>
</script>
</inkscape-extension>

View File

@ -0,0 +1,392 @@
#!/usr/bin/env python3
#
# Copyright (C) 2007 John Beard john.j.beard@gmail.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
"""
This extension draws 3d objects from a Wavefront .obj 3D file stored in a local folder
Many settings for appearance, lighting, rotation, etc are available.
^y
|
__--``| |_--``| __--
__--`` | __--``| |_--``
| z | | |_--``|
| <----|--------|-----_0-----|----------------
| | |_--`` | |
| __--`` <-``| |_--``
|__--`` x |__--``|
IMAGE PLANE SCENE|
|
Vertices are given as "v" followed by three numbers (x,y,z).
All files need a vertex list
v x.xxx y.yyy z.zzz
Faces are given by a list of vertices
(vertex 1 is the first in the list above, 2 the second, etc):
f 1 2 3
Edges are given by a list of vertices. These will be broken down
into adjacent pairs automatically.
l 1 2 3
Faces are rendered according to the painter's algorithm and perhaps
back-face culling, if selected. The parameter to sort the faces by
is user-selectable between max, min and average z-value of the vertices
"""
import os
from math import acos, cos, floor, pi, sin, sqrt
import inkex
from inkex.utils import pairwise
from inkex import Group, Circle
from inkex.paths import Move, Line
import numpy
import tempfile
import openmesh as om
def draw_circle(r, cx, cy, width, fill, name, parent):
"""Draw an SVG circle"""
circle = parent.add(Circle(cx=str(cx), cy=str(cy), r=str(r)))
circle.style = {'stroke': '#000000', 'stroke-width': str(width), 'fill': fill}
circle.label = name
def draw_line(x1, y1, x2, y2, width, name, parent):
elem = parent.add(inkex.PathElement())
elem.style = {'stroke': '#000000', 'stroke-width': str(width), 'fill': 'none',
'stroke-linecap': 'round'}
elem.set('inkscape:label', name)
elem.path = [Move(x1, y1), Line(x2, y2)]
def draw_poly(pts, face, st, name, parent):
"""Draw polygone"""
style = {'stroke': '#000000', 'stroke-width': str(st.th), 'stroke-linejoin': st.linejoin,
'stroke-opacity': st.s_opac, 'fill': st.fill, 'fill-opacity': st.f_opac}
path = inkex.Path()
for facet in face:
if not path: # for first point
path.append(Move(pts[facet - 1][0], -pts[facet - 1][1]))
else:
path.append(Line(pts[facet - 1][0], -pts[facet - 1][1]))
path.close()
poly = parent.add(inkex.PathElement())
poly.label = name
poly.style = style
poly.path = path
def draw_edges(edge_list, pts, st, parent):
for edge in edge_list: # for every edge
pt_1 = pts[edge[0] - 1][0:2] # the point at the start
pt_2 = pts[edge[1] - 1][0:2] # the point at the end
name = 'Edge' + str(edge[0]) + '-' + str(edge[1])
draw_line(pt_1[0], -pt_1[1], pt_2[0], -pt_2[1], st.th, name, parent)
def draw_faces(faces_data, pts, obj, shading, fill_col, st, parent):
for face in faces_data: # for every polygon that has been sorted
if shading:
st.fill = get_darkened_colour(fill_col, face[1] / pi) # darken proportionally to angle to lighting vector
else:
st.fill = get_darkened_colour(fill_col, 1) # do not darken colour
face_no = face[3] # the number of the face to draw
draw_poly(pts, obj.fce[face_no], st, 'Face:' + str(face_no), parent)
def get_darkened_colour(rgb, factor):
"""return a hex triplet of colour, reduced in lightness 0.0-1.0"""
return '#' + "%02X" % floor(factor * rgb[0]) \
+ "%02X" % floor(factor * rgb[1]) \
+ "%02X" % floor(factor * rgb[2]) # make the colour string
def make_rotation_log(options):
"""makes a string recording the axes and angles of each rotation, so an object can be repeated"""
return options.r1_ax + str('%.2f' % options.r1_ang) + ':' + \
options.r2_ax + str('%.2f' % options.r2_ang) + ':' + \
options.r3_ax + str('%.2f' % options.r3_ang) + ':' + \
options.r1_ax + str('%.2f' % options.r4_ang) + ':' + \
options.r2_ax + str('%.2f' % options.r5_ang) + ':' + \
options.r3_ax + str('%.2f' % options.r6_ang)
def normalise(vector):
"""return the unit vector pointing in the same direction as the argument"""
length = sqrt(numpy.dot(vector, vector))
return numpy.array(vector) / length
def get_normal(pts, face):
"""normal vector for the plane passing though the first three elements of face of pts"""
return numpy.cross(
(numpy.array(pts[face[0] - 1]) - numpy.array(pts[face[1] - 1])),
(numpy.array(pts[face[0] - 1]) - numpy.array(pts[face[2] - 1])),
).flatten()
def get_unit_normal(pts, face, cw_wound):
"""
Returns the unit normal for the plane passing through the
first three points of face, taking account of winding
"""
# if it is clockwise wound, reverse the vector direction
winding = -1 if cw_wound else 1
return winding * normalise(get_normal(pts, face))
def rotate(matrix, rads, axis):
"""choose the correct rotation matrix to use"""
if axis == 'x':
trans_mat = numpy.array([
[1, 0, 0], [0, cos(rads), -sin(rads)], [0, sin(rads), cos(rads)]])
elif axis == 'y':
trans_mat = numpy.array([
[cos(rads), 0, sin(rads)], [0, 1, 0], [-sin(rads), 0, cos(rads)]])
elif axis == 'z':
trans_mat = numpy.array([
[cos(rads), -sin(rads), 0], [sin(rads), cos(rads), 0], [0, 0, 1]])
return numpy.matmul(trans_mat, matrix)
class Style(object): # container for style information
def __init__(self, options):
self.th = options.th
self.fill = '#ff0000'
self.col = '#000000'
self.r = 2
self.f_opac = str(options.f_opac / 100.0)
self.s_opac = str(options.s_opac / 100.0)
self.linecap = 'round'
self.linejoin = 'round'
class WavefrontObj(object):
"""Wavefront based 3d object defined by the vertices and the faces (eg a polyhedron)"""
name = property(lambda self: self.meta.get('name', None))
def __init__(self, filename):
self.meta = {
'name': os.path.basename(filename).rsplit('.', 1)[0]
}
self.vtx = []
self.edg = []
self.fce = []
self._parse_file(filename)
def _parse_file(self, filename):
if not os.path.isfile(filename):
raise IOError("Can't find wavefront object file {}".format(filename))
with open(filename, 'r') as fhl:
for line in fhl:
self._parse_line(line.strip())
def _parse_line(self, line):
if line.startswith('#'):
if ':' in line:
name, value = line.split(':', 1)
self.meta[name.lower()] = value
elif line:
(kind, line) = line.split(None, 1)
kind_name = 'add_' + kind
if hasattr(self, kind_name):
getattr(self, kind_name)(line)
@staticmethod
def _parse_numbers(line, typ=str):
# Ignore any slash options and always pick the first one
return [typ(v.split('/')[0]) for v in line.split()]
def add_v(self, line):
"""Add vertex from parsed line"""
vertex = self._parse_numbers(line, float)
if len(vertex) == 3:
self.vtx.append(vertex)
def add_l(self, line):
"""Add line from parsed line"""
vtxlist = self._parse_numbers(line, int)
# we need at least 2 vertices to make an edge
if len(vtxlist) > 1:
# we can have more than one vertex per line - get adjacent pairs
self.edg.append(pairwise(vtxlist))
def add_f(self, line):
"""Add face from parsed line"""
vtxlist = self._parse_numbers(line, int)
# we need at least 3 vertices to make an edge
if len(vtxlist) > 2:
self.fce.append(vtxlist)
def get_transformed_pts(self, trans_mat):
"""translate vertex points according to the matrix"""
transformed_pts = []
for vtx in self.vtx:
transformed_pts.append((numpy.matmul(trans_mat, numpy.array(vtx).T)).T.tolist())
return transformed_pts
def get_edge_list(self):
"""make an edge vertex list from an existing face vertex list"""
edge_list = []
for face in self.fce:
for j, edge in enumerate(face):
# Ascending order of certices (for duplicate detection)
edge_list.append(sorted([edge, face[(j + 1) % len(face)]]))
return [list(x) for x in sorted(set(tuple(x) for x in edge_list))]
class Poly3D(inkex.GenerateExtension):
"""Generate a polyhedron from a wavefront 3d model file"""
def add_arguments(self, pars):
pars.add_argument("--tab", default="object")
# MODEL FILE SETTINGS
pars.add_argument("--obj", default='cube')
pars.add_argument("--input_choice", default='default')
pars.add_argument("--spec_file", default='great_rhombicuboct.obj')
pars.add_argument("--cw_wound", type=inkex.Boolean, default=True)
pars.add_argument("--type", default='face')
# VEIW SETTINGS
pars.add_argument("--r1_ax", default="x")
pars.add_argument("--r2_ax", default="x")
pars.add_argument("--r3_ax", default="x")
pars.add_argument("--r4_ax", default="x")
pars.add_argument("--r5_ax", default="x")
pars.add_argument("--r6_ax", default="x")
pars.add_argument("--r1_ang", type=float, default=0.0)
pars.add_argument("--r2_ang", type=float, default=0.0)
pars.add_argument("--r3_ang", type=float, default=0.0)
pars.add_argument("--r4_ang", type=float, default=0.0)
pars.add_argument("--r5_ang", type=float, default=0.0)
pars.add_argument("--r6_ang", type=float, default=0.0)
pars.add_argument("--scl", type=float, default=100.0)
# STYLE SETTINGS
pars.add_argument("--show", type=self.arg_method('gen'))
pars.add_argument("--shade", type=inkex.Boolean, default=True)
pars.add_argument("--f_r", type=int, default=255)
pars.add_argument("--f_g", type=int, default=0)
pars.add_argument("--f_b", type=int, default=0)
pars.add_argument("--f_opac", type=int, default=100)
pars.add_argument("--s_opac", type=int, default=100)
pars.add_argument("--th", type=float, default=2)
pars.add_argument("--lv_x", type=float, default=1)
pars.add_argument("--lv_y", type=float, default=1)
pars.add_argument("--lv_z", type=float, default=-2)
pars.add_argument("--back", type=inkex.Boolean, default=False)
pars.add_argument("--z_sort", type=self.arg_method('z_sort'), default=self.z_sort_min)
def get_filename(self):
"""Get the filename for the spec file"""
if self.options.input_choice == 'custom':
return self.options.spec_file
if self.options.input_choice == 'default':
moddir = self.ext_path()
return os.path.join(moddir, 'Poly3DObjects', self.options.obj + '.obj')
def generate(self):
so = self.options
input_mesh = om.read_polymesh(self.get_filename()) #read input file
output_obj = os.path.join(tempfile.gettempdir(), "input_mesh.obj")
om.write_mesh(output_obj, input_mesh)
#write to obj file
obj = WavefrontObj(output_obj)
scale = self.svg.unittouu('1px') # convert to document units
st = Style(so) # initialise style
# we will put all the rotations in the object name, so it can be repeated in
poly = Group.new(obj.name + ':' + make_rotation_log(so))
(pos_x, pos_y) = self.svg.namedview.center
poly.transform.add_translate(pos_x, pos_y)
poly.transform.add_scale(scale)
# TRANSFORMATION OF THE OBJECT (ROTATION, SCALE, ETC)
trans_mat = numpy.identity(3, float) # init. trans matrix as identity matrix
for i in range(1, 7): # for each rotation
axis = getattr(so, 'r{}_ax'.format(i))
angle = getattr(so, 'r{}_ang'.format(i)) * pi / 180
trans_mat = rotate(trans_mat, angle, axis)
# scale by linear factor (do this only after the transforms to reduce round-off)
trans_mat = trans_mat * so.scl
# the points as projected in the z-axis onto the viewplane
transformed_pts = obj.get_transformed_pts(trans_mat)
so.show(obj, st, poly, transformed_pts)
return poly
def gen_vtx(self, obj, st, poly, transformed_pts):
"""Generate Vertex"""
for i, pts in enumerate(transformed_pts):
draw_circle(st.r, pts[0], pts[1], st.th, '#000000', 'Point' + str(i), poly)
def gen_edg(self, obj, st, poly, transformed_pts):
"""Generate edges"""
# we already have an edge list
edge_list = obj.edg
if obj.fce:
# we must generate the edge list from the faces
edge_list = obj.get_edge_list()
draw_edges(edge_list, transformed_pts, st, poly)
def gen_fce(self, obj, st, poly, transformed_pts):
"""Generate face"""
so = self.options
# colour tuple for the face fill
fill_col = (so.f_r, so.f_g, so.f_b)
# unit light vector
lighting = normalise((so.lv_x, -so.lv_y, so.lv_z))
# we have a face list
if obj.fce:
z_list = []
for i, face in enumerate(obj.fce):
# get the normal vector to the face
norm = get_unit_normal(transformed_pts, face, so.cw_wound)
# get the angle between the normal and the lighting vector
angle = acos(numpy.dot(norm, lighting))
z_sort_param = so.z_sort(transformed_pts, face)
# include all polygons or just the front-facing ones as needed
if so.back or norm[2] > 0:
# record the maximum z-value of the face and angle to
# light, along with the face ID and normal
z_list.append((z_sort_param, angle, norm, i))
z_list.sort(key=lambda x: x[0]) # sort by ascending sort parameter of the face
draw_faces(z_list, transformed_pts, obj, so.shade, fill_col, st, poly)
else: # we cannot generate a list of faces from the edges without a lot of computation
raise inkex.AbortExtension("Face data not found.")
@staticmethod
def z_sort_max(pts, face):
"""returns the largest z_value of any point in the face"""
return max([pts[facet - 1][2] for facet in face])
@staticmethod
def z_sort_min(pts, face):
"""returns the smallest z_value of any point in the face"""
return min([pts[facet - 1][2] for facet in face])
@staticmethod
def z_sort_cent(pts, face):
"""returns the centroid z_value of any point in the face"""
return sum([pts[facet - 1][2] for facet in face]) / len(face)
if __name__ == '__main__':
Poly3D().run()

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3
import openmesh as om
import math
import inkex
import tempfile