1
0
mirror of https://gitlab.com/MisterBiggs/stl-process.git synced 2025-08-03 12:01:33 +00:00

added references

This commit is contained in:
2022-03-22 08:26:18 -07:00
parent eae1e0bb1c
commit 33e2b81adc

View File

@@ -7,6 +7,11 @@ stl = load(raw"C:\Users\albig\Downloads\cubeblender.stl")
# stl = load(raw"C:\Coding\stl_read\3DBenchy.stl")
function get_mass_properties(triangles)
"""
Reference:
https://github.com/WoLpH/numpy-stl/blob/42b6c67324e13b8712af6730f77e5e9544ef63b0/stl/base.py#L362
https://www.geometrictools.com/Documentation/PolyhedralMassProperties.pdf
"""
x = reduce(hcat, [[v[1] for v in tri] for tri in triangles])'
y = reduce(hcat, [[v[2] for v in tri] for tri in triangles])'
z = reduce(hcat, [[v[3] for v in tri] for tri in triangles])'