Marching Cubes

Endpoint: https://studiobitonti.appspot.com/marchingCube


The marching cubes function is used to create a mesh from the given line input. Is it used to create a thickness that can be defined by the user, as well as the resolution.

Input:


Lines: Is the uploaded .obj file containing lines to be meshed by Marching Cubes algorithm.
Resolution: Is the integer value defining the resolution of the meshing operation. Lower value gives a more coarse result, whereas a higher value gives out a more refined result.
Member Thickness:  Is a float value defining the radius of the line members being meshed.
Filename: Name of the resultant file of the meshed object.
T: [YOUR SECRET TOKEN]

Output:

A mesh file in .STL or .obj format.

Example:

Sample:   Sample conformal grid

Sample: Sample conformal grid

Sample:   Two topologically equivalent components

Sample: Two topologically equivalent components

For this example we use the built in cell editor to generate two different topologically equivalent lattice components from curves that we then populated a conformal lattice with (shown above)

cell_0 = 'cell_0.obj'
cell_1 = 'cell_1.obj'

genysis.genLatticeUnit(case=3,chamfer=0,centerChamfer=0,bendIn=0,cBendIn=0,connectPt=0,output=cell_0,token=token)
genysis.genLatticeUnit(case=3,chamfer=1,centerChamfer=0,bendIn=0,cBendIn=0,connectPt=0,output=cell_1,token=token)

lattice.setComponent("cell_0.obj")

for i in range(len(attCrvs)):
    lattice.addCurveAttractor(cell_1,attCrvs[i],range=20)

out_file_name = 'conformalLattice_0.obj'
lattice.setOutput(out_file_name)
lattice.populateLattice(token)
Input :  Populated Conformal Lattice

Input: Populated Conformal Lattice

Once our input .obj file is prepared. We specify the resolution and member radius to run the marching cubes function and create a solid mesh.

finalLattice = 'LATTICE.obj'
resolution = 500
memberRadius = .5
genysis.marchingCube(out_file_name,resolution,memberRadius,finalLattice,token)
Result:  A solid mesh structure built from curves

Result: A solid mesh structure built from curves

Francis Bitonti