Skip to content

Commit

Permalink
test multiple solids in STL files
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Feb 19, 2024
1 parent 0d8009f commit b19fcda
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/loaders/test_stl_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,31 @@ def test_parse_with_error
""" }
end


def test_multiple_solids
loader = Mittsu::STLLoader.new

object = loader.parse """solid
facet normal 0 0 1
outer loop
vertex -1 100.0e-2 0
vertex -1 -1e0 0
vertex 1 100.0e-2 0
endloop
endfacet
endsolid
solid
facet normal 0 0 1
outer loop
vertex -1 -1e0 0
vertex 1 -1e0 0
vertex 1 100.0e-2 0
endloop
endfacet
endsolid
"""

assert_kind_of Mittsu::Group, object
assert_equal 2, object.children.count
end
end

0 comments on commit b19fcda

Please sign in to comment.