Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jayant Khatkar
tempaware
Commits
c47c5863
Commit
c47c5863
authored
Dec 07, 2021
by
Jayant Khatkar
Browse files
convert new designs, remove catches for old ones
parent
1fff6d4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
voxelise.py
View file @
c47c5863
...
...
@@ -80,10 +80,6 @@ def voxelised_csv(mesh_file_name,
if
from_inches
:
locs
=
locs
*
25.4
locs_pv
=
pv
.
PolyData
(
locs
)
if
'M3'
in
mesh_file_name
:
locs_pv
.
rotate_x
(
-
90
)
elif
'M5'
in
mesh_file_name
:
locs_pv
.
rotate_x
(
90
)
tu
.
transform_to_bed_centre
(
locs_pv
,
bed_centre
)
tu
.
transform_to_z0
(
locs_pv
)
locs
=
locs_pv
.
points
...
...
@@ -109,8 +105,6 @@ def check_data(mesh_file_name, csv_fname, from_inches=False):
if
from_inches
:
locs
=
locs
*
25.4
locs_pv
=
pv
.
PolyData
(
locs
)
#locs_pv.rotate_x(-90) # M3
#locs_pv.rotate_x(90) # M5
tu
.
transform_to_bed_centre
(
locs_pv
,
bed_centre
)
tu
.
transform_to_z0
(
locs_pv
)
pl
=
pv
.
Plotter
()
...
...
@@ -199,7 +193,7 @@ def vox_section_area(voxels, mesh_file_name, vox_dim=3):
if
__name__
==
'__main__'
:
obj
=
'models/
tempaware
'
obj
=
'models/
M1
'
#check_data(obj + '.stl', obj + '_raw.csv', from_inches=False)
#out = voxelised_csv(obj + '.stl', obj + '_raw.csv', voxels=obj+'_vox_centers.csv', from_inches=False)
#out.to_csv(obj + '_voxels.csv')
...
...
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