1
0
mirror of https://gitlab.com/MisterBiggs/stl-process.git synced 2025-08-03 12:01:33 +00:00
Files
STL-Process/test/runtests.jl
2022-03-30 19:16:40 -07:00

20 lines
402 B
Julia

using Test
using stlProcess
using FileIO
using MeshIO
using LinearAlgebra
@testset "simple cube stl" begin
# https://hepweb.ucsd.edu/ph110b/110b_notes/node26.html
stl = load(raw"test\test_assets\cubeblender.stl")
props = get_mass_properties(stl)
@test props.volume == 8.0
@test all(props.center_of_gravity .== 0.0)
@test all(eigvals(props.inertia) .≈ (5.0 + 1 / 3))
end