Skip to content

Commit

Permalink
Merge branch 'master' into vs/rm-quartzimageio
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch authored Mar 16, 2024
2 parents 4cc6ab0 + b7259eb commit 5df2454
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,25 @@ jobs:
fail-fast: false
matrix:
julia-version: ['1.0', '1.6', '1', 'nightly']
julia-arch: [x64, x86]
os: [ubuntu-latest, macOS-latest, windows-latest]
julia-arch: [x64, x86, aarch64]
os: [ubuntu-latest, windows-latest, macOS-13, macOS-14]
exclude:
- os: macOS-latest
- os: ubuntu-latest
julia-arch: aarch64
- os: windows-latest
julia-arch: aarch64
- os: macOS-13
julia-arch: x86
- os: macOS-13
julia-arch: aarch64
- os: macOS-14
julia-arch: x86
- os: macOS-14
julia-arch: x64
- os: macOS-14
julia-version: '1.6'
- os: macOS-14
julia-version: '1.0'

steps:
- name: Set git to use LF (Windows only)
Expand All @@ -42,3 +56,4 @@ jobs:
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 1 addition & 3 deletions src/registry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,7 @@ function detect_stlbinary(io)
number_of_triangle_blocks = read(io, UInt32)
#1 normal, 3 vertices in Float32 + attrib count, usually 0
len != (number_of_triangle_blocks*size_triangleblock)+size_header && (seekstart(io); return false)
skip(io, number_of_triangle_blocks*size_triangleblock-sizeof(UInt16))
attrib_byte_count = read(io, UInt16) # read last attrib_byte
attrib_byte_count != zero(UInt16) && (seekstart(io); return false) # should be zero as not used
skip(io, number_of_triangle_blocks*size_triangleblock)
result = eof(io) # if end of file, we have a stl!
return result
end
Expand Down
Binary file not shown.
3 changes: 3 additions & 0 deletions test/query.jl
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ let file_dir = joinpath(@__DIR__, "files"), file_path = Path(file_dir)
@test typeof(q) <: File{format"STL_ASCII"}
q = query(joinpath(file_dir, "binary_stl_from_solidworks.STL"))
@test typeof(q) <: File{format"STL_BINARY"}
# See Pull Request # 388
q = query(joinpath(file_dir, "binary_stl_with_nonzero_attribute_byte_count.stl"))
@test typeof(q) <: File{format"STL_BINARY"}
open(q) do io
@test position(io) == 0
skipmagic(io)
Expand Down

0 comments on commit 5df2454

Please sign in to comment.