Commit 90a79182 authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

voxelise input stl

from utils import *
import sys
import numpy as np
import time
#from slicer import Slicer, GCode, plot_meshes, ParsedSettings, utils
import pandas as pd
def main(fname):
if __name__ == '__main__':
fname = 'torsionbar_hor.stl'
pl = Planner(fname, 1)
from .planner import Planner
import numpy as np
import time
import pyvista as pv
from pyvista import examples
from math import pi
import trimesh as tm
import pymeshfix as pf
class Planner:
Track all relevant mesh objects for pin insertion
def __init__(self,
mesh_file_name, # vtk file as generated by FreeCAD
# record params
self.grid_res = grid_res
# read mesh data
self.mesh =
self.grid = pv.voxelize(self.boundary, density=self.grid_res)
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