feat: Add mystery primitive and MoI example
This commit is contained in:
parent
6942e1f218
commit
d1c48975ad
|
@ -0,0 +1,11 @@
|
|||
"""
|
||||
Computes the moment of inertia for the mystery object
|
||||
"""
|
||||
import numpy as N
|
||||
import cadquery as Cq
|
||||
import nhf.primitive
|
||||
|
||||
if __name__ == '__main__':
|
||||
obj = nhf.primitive.mystery()
|
||||
mat = N.array(Cq.Shape.matrixOfInertia(obj.val()))
|
||||
print(mat)
|
|
@ -0,0 +1,4 @@
|
|||
import cadquery
|
||||
|
||||
def mystery():
|
||||
return cadquery.Workplane().box(10, 5, 5)
|
|
@ -857,4 +857,4 @@ files = [
|
|||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "172a6b2578a05dce25e7ea5c38b6f5217a23b3aa7f91e0ce5ea768a3d6090751"
|
||||
content-hash = "caf46b526858dbf2960b0204782140ad072d96f7b3f161ac7e9db0d9b709b25a"
|
||||
|
|
|
@ -9,6 +9,7 @@ readme = "README.md"
|
|||
python = "^3.10"
|
||||
cadquery = "^2.4.0"
|
||||
build123d = "^0.5.0"
|
||||
numpy = "^1.26.4"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
|
|
Loading…
Reference in New Issue