genysis (version 0.3.2)
index
/Users/francisbitonti/Documents/GitHub/genysis_documentation/python_package/genysis_pkg/genysis/__init__.py

GENYSIS is a generitive design toolkit for software developers.

 
Package Contents
       
genysis
meshRepair
meshRepair_v2

 
Classes
       
genysis.genysis.conformalLattice
genysis.genysis.surfaceLattice
genysis.genysis.volumeLattice
genysis.meshRepair_v2.meshRepair_v2

 
class conformalLattice
    This object of for lattices that conform their shape to volumes.
 
  Methods defined here:
__init__(self)
Initialize
addCurveAttractor(self, component, curve, range)
#add curve attractor. For example: (component="unit_1.obj",curve=[[2.8,8,2.7],[-3.3,8,2.7],[-3.3,14,6]],range=2)
addPlaneAttractor(self, component, plane, range)
#add plane attractor. For example:(component="cell_2.obj",plane=[0,1,0,-5],range=10)
addPointAttractor(self, component, point, range)
#add point attractor. For example:(component="cell_2.obj",point=[2.8,8,2.7],range=5)
designGrid(self, token, displayInLine=False, width=800, height=600)
genGrid(self, token)
The conformal grid function generates a grid structure inside a given mesh input. The U,V,W are variables for the number of the grid cells.
 
U: Input the number of grid cells in u direction.
V: Input number of grid cells in v direction.
W: Input number of grid cells in w direction.
Surface: Name of the uploaded .json file of surface grid representations.
Filename: Name of the resultant file for the lattice unit.
populateLattice(self, token)
The Populate modulus function populates a given component into a conformal grid structure. It fill the boxes of the conformal grid into the component defined in the input.
 
Component: Is the uploaded .Obj component to be arrayed.
Boxes: Is the name of uploaded box scaffold json name.
File Name:  Name of the resultant file for the surface lattice.
setComponent(self, component)
#(string) Component: Is the uploaded .Obj component to be arrayed.
setEPSILON(self, EPSILON)
setGridOutput(self, gridOutput)
#(string) Name of the .json file for export.
setOutput(self, output)
#(string) Name of lattice file for export.
setSurfaces(self, surfaces)
#(string) Name of the uploaded .json file of surface grid representations.
setUVW(self, u, v, w)
U: Input the number of grid cells in u direction.
V: Input number of grid cells in v direction.
W: Input number of grid cells in w direction.
setUnitize(self, unitize)
#(boolean) The input of true or false,defines whether to redivide the surface in unitized way.

 
class meshRepair_v2
    Second generation of mesh repair functionality. This will eventually phase out the original "v1" mesh repair operations.
 
  Methods defined here:
__init__(self, token)
Initialize
auto_repair(self)
Will evaluate and repair mesh using our own algorithm.
delete_degenerated_faces(self)
This function will remove degenerate traingels. A degenerate triangle is the "triangle" formed by three collinear points. It doesn't look like a triangle, it looks like a line segment.
detect_edges(self, return_index=False)
Detect naked and nonManifold edges.
detect_overlap_faces(self)
Detect and fix overlaping mesh faces.
detect_separate_shells(self)
Detect if a mesh is composed of multiple shells. You will need to repair this issue using the mesh split function or the union shells.
fill_holes(self, iteration=1)
Fills holes in the mesh.
filter_triangles(self, naked, nonManifold)
Fix nonManifold and naked edges.
round_up_vertices(self, digits)
Merge vertices within a specific tolerance. The digits field represents the number of decimal places that will be merged.
For example, if you have two vertices (1.21 , 2.25, 3.32) and (1.24 , 2.26, 3.38) if you set digits to 1 both vertices will be at (1.2 , 2.2, 3.3)
setInput(self, _input)
setOutput(self, output)
unify_mesh_normals(self)
Set all normals to face the same direction.
union_shells(self)
Merge multiple shells into one unified mesh.

 
class surfaceLattice
    This class is for lattice that form their shapes to surfaces
 
  Methods defined here:
__init__(self)
Initialize
addCurveAttractor(self, component, curve, range)
#add curve attractor. For example: (component="unit_1.obj",curve=[[2.8,8,2.7],[-3.3,8,2.7],[-3.3,14,6]],range=2)
addPlaneAttractor(self, component, plane, range)
#add plane attractor. For example:(component="cell_2.obj",plane=[0,1,0,-5],range=10)
addPointAttractor(self, component, point, range)
#add point attractor. For example:(component="cell_2.obj",point=[2.8,8,2.7],range=5)
run(self, token)
once all the variables are set you will run this function to generate the lattice.
setAutoScale(self, autoScale)
setBin(self, bin)
#(float) Set the bin value.
setCellHeight(self, cellHeight)
#(float) If you do not define a top surface you will need to define a constant height to offset the lattice units.
setComponent(self, component)
#(string) This is the primary component with out attractors.
setEPSILON(self, EPSILON)
#(float) Epsilon is used to determin tolerances that define when two lattice cells are considered touching.
setOutput(self, output)
#(string) this is the name of the file that the function will output after it is computed.
setSurface(self, base)
#(string) Define the base surface to populat lattices on. This will be a mesh with all 4 sided faces.
setTopSurface(self, ceil)
#(string) Define the second surface. Lattice units can be populated between two surfaces of differnt shape with the same topology.

 
class volumeLattice
    This is for lattices that conform to volumes but do not change the shape of the lattice units.
 
  Methods defined here:
__init__(self)
addCurveAttractor(self, component, curve, range)
#add curve attractor. For example: (component="unit_1.obj",curve=[[2.8,8,2.7],[-3.3,8,2.7],[-3.3,14,6]],range=2)
addPlaneAttractor(self, component, plane, range)
#add plane attractor. For example:(component="cell_2.obj",plane=[0,1,0,-5],range=10)
addPointAttractor(self, component, point, range)
#add point attractor. For example:(component="cell_2.obj",point=[2.8,8,2.7],range=5)
run(self, token)
once all the variables are set you will run this function to generate the lattice.
runStochastic(self, token)
once all the variables are set you will run this function to generate a stochastic lattice.
setComponent(self, component)
#(string) Set the file name for the component to be populated to lattice structure
setComponentSize(self, cellHeight)
#(float) This is the size of the lattice grid. For one unit.
setOutput(self, output)
#(string) Set the file name for the exported lattice structure
setPoreSize(self, pore)
#(float) For stochastic lattices only. This will be the miniumum pore size for the stochastic lasttice.
setVolume(self, volume)
#(String) set the volume you want to fill with the lattice

 
Functions
       
blend(compA, compB, value, output, token)
The blend function takes two mesh objects with same topology and different vertices locations, then output a blended geometry given a value between 0 and 1.
 
compA:(string)  name of component A obj file uploaded to storage
compB:(String)  name of component B obj file uploaded to storage
filename:(string) target output file name
value:(float)  float between 0 and 1, the blend position between compA and compB
boolean(input1, input2, output, operation, token, engine='carve')
This is the Doc stings located at the top of the file.
 
Input1:(string) Name of first .obj component file uploaded to storage.
Input2:(string) Name of second .obj component file uploaded to storage.
Output:(string) Result file name for the boolean operation in .obj format.
Operation:(string) Choose one from union,difference and intersection.
convexHull(points, token)
The convex hull function creates a boundary around the outermost laying points. It is used to get a sense of size of the point cloud field.
Input is an array
cylindricalProjection(target, resolution, height, output, token, center='', range='', startDir='', rotationAxis='')
The cylindrical projection function wraps a cylindrical mesh around the input mesh. It can used to shrink wrap the mesh and create a new cleaner and refined mesh. The target and resolution can basic inputs required, whereas advance inputs include defining a center, and axis for the projection. This projection is made using a cylindrical base.
 
Target: (string) The uploaded .Obj target to be projected on.
Resolution: (int) Is the number cells in U and V direction.
Height:(float)  Height of cylinder to be projected.
File Name:(string)  Name of the resultant file for the surface lattice.
 
OPTIONAL:
to be added
delaunay(points, token)
The delaunay triangulation function creates triangular connections in 2D and 3D. The input is a point cloud array in any dimensions.
Input is an array
download(src='', dest='', token='')
Download files from the genysis servers.
src: location on the genysis servers.
dest: local file name/path
genLatticeUnit(case, chamfer, centerChamfer, bendIn, cBendIn, connectPt, output, token)
Case:(Integer) Is an integer value between 0 - 7,  defining different type of lattice units.
Chamfer:(float) Is a float value between 0 to 0.5 defining the angle of chamfer of the corners.
Center Chamfer:(float) Is a float value between 0 to 0.5 defining the angle of chamfer from the center.
Bendln:(float) Is a float value between 0 and 1, defining angle bend of the lines.
cBendln:(float)  Is a float value between 0 and 1,defining the central bend of the lines.
Connect Pt:(float)  Is a float value between 0 and 1, defining the connection points.
latticeUnitDesign(name='', token='', displayInLine=False, width=800, height=600)
open a default browser window to for the lattice unit design app
marchingCube(lines, resolution, memberThickness, filename, token, preview='')
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.
 
Lines:(string) Is the uploaded .obj file containing lines to be meshed by Marching Cubes algorithm.
Resolution:(int)  Is the integer value between from 64 to 600, 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:(float)  Is a float value defining the radius of the line members being meshed.
Filename:(string) Name of the resultant file of the meshed object.
meshReduce(target, output, portion, token)
Reduce the number of faces of a mesh.
 
target:(string) the name of the mesh you want to reduce
output:(string) the name of the new mesh after reduction.
portion:(float) the percentage you wish to reduce the mesh.
meshSplit(target, output, token)
The split mesh function breaks down the given mesh input into its component mesh parts.
 
Target:(string)  Name of input .obj/.stl file uploaded to storage
Filename:(string) Target output file name
planarProjection(target, center, direction, size, resolution, output, token)
The plane projection function wraps a given mesh input by projecting a place on to it from the specified direction. This function can be used to patch holes, create a new draped mesh over multiple objects, etc. The required inputs include the target file name, center of the object, direction of projection, size of the plane and its resolution.
 
Target:(String) The uploaded .Obj target to be projected on.
Center:(array) 3D coordinate of projection center, by default [0,0,0].
Direction:(vector) 3D vector defining, the direction where projection starts, by default [1,0,0].
Size:(2D vector)  Is the [U,V] input defining the size of the projected plane.
Resolution:(int) Is the number cells in U and V direction.
File Name:(string)  Name of the resultant file for the surface lattice.
sphericalProjection(target, resolution, output, token, center='', range='', startDir='', rotationAxis='')
The spherical projection function works by wraps a given mesh with a sphere either partially or whole in order to create a clean base surface from the input. The target and resolution can basic inputs required, whereas advance inputs include defining a center, and axis for the projection. This projection is made using a spherical base.
 
Target:(String) The uploaded .Obj target to be projected on.
Resolution: (int) Is the number cells in U and V direction.
File Name:(string)  Name of the resultant file for the surface lattice.
 
OPTIONAL:
to be added
upload(src, dest='', token='')
Upload files from the genysis servers.
src: local file name/path
visualize(name, token, displayInLine=False, width=800, height=600)
open a default browser window to visualize a geometry file given its name and user token
voronoi(points, token)
The voronoi function creates partitions based on distance between the input points.
Input is an array

 
Data
        __all__ = ['meshRepair_v2', 'latticeUnitDesign', 'visualize', 'volumeLattice', 'conformalLattice', 'surfaceLattice', 'cylindricalProjection', 'sphericalProjection', 'planarProjection', 'boolean', 'convexHull', 'voronoi', 'delaunay', 'blend', 'meshSplit', 'meshReduce', 'genLatticeUnit', 'marchingCube', 'download', 'upload']
__version__ = '0.3.2'