Merge pull request #410 from skalnik/remove-obj

Remove OBJ from supported solids
This commit is contained in:
Ted Nyman
2013-02-26 14:20:45 -08:00
3 changed files with 2 additions and 36 deletions

View File

@@ -151,11 +151,11 @@ module Linguist
['.png', '.jpg', '.jpeg', '.gif'].include?(extname)
end
# Public: Is the blob a support 3D model format?
# Public: Is the blob a supported 3D model format?
#
# Return true or false
def solid?
['.stl', '.obj'].include?(extname)
extname.downcase == '.stl'
end
MEGABYTE = 1024 * 1024

View File

@@ -1,33 +0,0 @@
# test_file
v -18.500000 -24.500000 31.000000
v -18.500000 -24.500000 -0.001000
v 12.500000 -24.500000 -0.001000
v 12.500000 -24.500000 31.000000
v -18.500000 6.500000 31.000000
v -18.500000 6.500000 -0.001000
v 12.500000 6.500000 31.000000
v 12.500000 6.500000 -0.001000
vn 0.000000 -1.000000 0.000000,
vn 0.000000 -1.000000 0.000000,
vn -1.000000 0.000000 0.000000,
vn -1.000000 0.000000 0.000000,
vn 0.000000 1.000000 0.000000,
vn 0.000000 1.000000 0.000000,
vn 1.000000 0.000000 0.000000,
vn 1.000000 0.000000 0.000000,
vn 0.000000 0.000000 -1.000000,
vn 0.000000 0.000000 -1.000000,
vn 0.000000 0.000000 1.000000,
vn 0.000000 0.000000 1.000000,
f 1//1 2//1 3//1
f 1//4 3//4 4//4
f 5//7 6//7 2//7
f 5//10 2//10 1//10
f 6//13 5//13 7//13
f 6//16 7//16 8//16
f 7//19 4//19 3//19
f 7//22 3//22 8//22
f 8//25 3//25 2//25
f 8//28 2//28 6//28
f 5//31 1//31 4//31
f 5//34 4//34 7//34

View File

@@ -135,7 +135,6 @@ class TestBlob < Test::Unit::TestCase
def test_solid
assert blob("Binary/cube.stl").solid?
assert blob("Text/cube.stl").solid?
assert blob("Text/cube.obj").solid?
end
def test_viewable