Commit e0910c8b authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

reduce python code into single file

parent 3d120f3e
using DataFrames
using CSV
df = DataFrames.DataFrame(CSV.File("tensile-1-1.csv"))
from utils import *
import sys
import numpy as np
import time
#from slicer import Slicer, GCode, plot_meshes, ParsedSettings, utils
import pandas as pd
import pyvista as pv
def main(fname):
return
if __name__ == '__main__':
fname = 'tensile.vtk'
pl = Voxelizer(fname, 1, 1) #0.25)
#pl.export_voxels('tensile')
from .planner import Voxelizer
import sys
import numpy as np
import time
import pandas as pd
import gcode2contour as gc
import pyvista as pv
from pyvista import examples
from math import pi
import trimesh as tm
import pymeshfix as pf
from scipy.spatial import KDTree
from scipy.interpolate import LinearNDInterpolator
import pandas as pd
......@@ -87,3 +87,10 @@ class Voxelizer:
csv_name = "{}-{}-{}.csv".format(fname, self.voxel_dim, self.lheight)
df.to_csv(csv_name)
return csv_name
if __name__ == '__main__':
obj = 'tensile'
pl = Voxelizer(obj + '.vtk', 1, 1) #0.25)
contours = gc.decode_gcode(obj + '.gcode')
#pl.export_voxels('tensile')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment