mirror of
https://gitlab.com/MisterBiggs/stl-process.git
synced 2025-08-03 20:11:31 +00:00
tests and stuff
This commit is contained in:
18
test/runtests.jl
Normal file
18
test/runtests.jl
Normal file
@@ -0,0 +1,18 @@
|
||||
using Test
|
||||
|
||||
using stlProcess
|
||||
|
||||
using FileIO
|
||||
using MeshIO
|
||||
|
||||
using LinearAlgebra
|
||||
|
||||
@testset "simple cube stl" begin
|
||||
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
|
Reference in New Issue
Block a user