Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jayant Khatkar
tempaware
Commits
9c38f6bc
Commit
9c38f6bc
authored
Aug 19, 2021
by
Jayant Khatkar
Browse files
read in vtk data for stress
parent
52f14e84
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
main.py
View file @
9c38f6bc
...
...
@@ -10,5 +10,5 @@ def main(fname):
return
if
__name__
==
'__main__'
:
fname
=
't
orsionbar_hor.stl
'
fname
=
't
ensile.vtk
'
pl
=
Planner
(
fname
,
1
,
0.25
)
tensile.vtk
0 → 100644
View file @
9c38f6bc
This diff is collapsed.
Click to expand it.
utils/planner.py
View file @
9c38f6bc
...
...
@@ -24,10 +24,11 @@ class Planner:
# read mesh data
self
.
mesh
=
pv
.
read
(
mesh_file_name
)
self
.
boundary
=
self
.
mesh
.
decimate_boundary
()
#voxelize
hwratio
=
voxel_dim
/
self
.
lheight
m
=
self
.
mesh
.
copy
()
m
=
self
.
boundary
.
copy
()
m
.
points
[:,
2
]
*=
hwratio
self
.
grid
=
pv
.
voxelize
(
m
,
density
=
self
.
voxel_dim
)
self
.
grid
.
points
[:,
2
]
*=
1
/
hwratio
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment