Chi-Tech
Surface Meshes

Functions

Handle chi_lua::chiSurfaceMeshCreate ()
 
void chi_lua::chiSurfaceMeshExportToObj (int SurfaceHandle, char *FileName)
 
void chi_lua::chiSurfaceMeshExportPolyFile (int SurfaceHandle, char *FileName)
 
void chi_lua::chiSurfaceMeshExtractOpenEdgesToObj (int SurfaceHandle, char FileName)
 
success chi_lua::chiSurfaceMeshImportFromOBJFile (int SurfaceHandle, string FileName, bool polyflag, table3 transform)
 
success chi_lua::chiSurfaceMeshImportFromTriangleFiles (int SurfaceHandle, char *FileName, bool polyflag)
 
void chi_lua::chiSurfaceMeshCheckCycles (int SurfaceHandle, int NumAngles)
 
void chi_lua::chiComputeLoadBalancing (int SurfaceHandle, table Xcuts, table Ycuts)
 

Detailed Description

Function Documentation

◆ chiComputeLoadBalancing()

void chi_lua::chiComputeLoadBalancing ( int  SurfaceHandle,
table  Xcuts,
table  Ycuts 
)

Computes load balancing parameters for given predictive x and y cuts without actually performing cuts.

Parameters
SurfaceHandleint Handle to the surface on which the operation is to be performed.
Xcutstable Array of x-values associated with the xcuts.
Ycutstable Array of y-values associated with the ycuts.
Author
Jan

Definition at line 1076 of file lua_functions.c.

◆ chiSurfaceMeshCheckCycles()

void chi_lua::chiSurfaceMeshCheckCycles ( int  SurfaceHandle,
int  NumAngles 
)

Builds sweep ordering for a number of angles and checks whether any cyclic dependencies are encountered.

Parameters
SurfaceHandleint Handle to the surface on which the operation is to be performed.
NumAnglesint Number of azimuthal angles to use for checking cycles.
Author
Jan

Definition at line 1066 of file lua_functions.c.

◆ chiSurfaceMeshCreate()

Handle chi_lua::chiSurfaceMeshCreate ( )

Creates a new empty surface mesh.

Example

Example usage:

Handle chiSurfaceMeshCreate()
Returns
Handle int Handle to the created surface mesh.
Author
Jan

Definition at line 974 of file lua_functions.c.

◆ chiSurfaceMeshExportPolyFile()

void chi_lua::chiSurfaceMeshExportPolyFile ( int  SurfaceHandle,
char *  FileName 
)

Exports mesh as a .poly format.

Parameters
SurfaceHandleint Handle to the surface on which the operation is to be performed.
FileNamechar* Path and basename to the file to be exported.
Author
Jan

Definition at line 991 of file lua_functions.c.

◆ chiSurfaceMeshExportToObj()

void chi_lua::chiSurfaceMeshExportToObj ( int  SurfaceHandle,
char *  FileName 
)

Exports mesh as a .obj format.

Parameters
SurfaceHandleint Handle to the surface on which the operation is to be performed.
FileNamechar* Path to the file to be exported.
Author
Jan

Definition at line 983 of file lua_functions.c.

◆ chiSurfaceMeshExtractOpenEdgesToObj()

void chi_lua::chiSurfaceMeshExtractOpenEdgesToObj ( int  SurfaceHandle,
char  FileName 
)

Exports all open edges of a surface mesh to file. This is used mostly for graphical error checking.

Parameters
SurfaceHandleint Handle to the surface on which the operation is to be performed.
FileNamechar Filename to which the edges are to be exported.
Author
Jan

Definition at line 1001 of file lua_functions.c.

◆ chiSurfaceMeshImportFromOBJFile()

success chi_lua::chiSurfaceMeshImportFromOBJFile ( int  SurfaceHandle,
string  FileName,
bool  polyflag,
table3  transform 
)

Loads mesh data from a wavefront object.

Parameters
SurfaceHandleint Handle to the surface on which the operation is to be performed.
FileNamestring Path to the file to be imported.
polyflagbool (Optional)Flag indicating whether triangles are to be read as polygons. [Default: true (read as polygons)].
transformtable3 (Optional) Translation vector to move all the vertices. [Default: none].

Note:

If the intent of a surface mesh is to serve as a 3D logical volume then the polyFlag parameter should be set to false.

Example

Example usage:

-- Basic example
surfmesh1 = chiSurfaceMeshCreate()
chiSurfaceMeshImportFromOBJFile(surfmesh1, "MeshFile1.obj")
-- Surface mesh used as Logical volume
lv_surfmesh1 = chiSurfaceMeshCreate()
chiSurfaceMeshImportFromOBJFile(lv_surfmesh1, "MeshFile3D.obj", false)
lv1 = chiLogicalVolumeCreate(SURFACE, lv_surfmesh1)
-- Surface mesh with transform
dx = 1.5
dy = -2.5
lv_surfmesh2 = chiSurfaceMeshCreate()
chiSurfaceMeshImportFromOBJFile(lv_surfmesh2, "MeshFile3D.obj", false, {dx,dy,0.0})
lv2 = chiLogicalVolumeCreate(SURFACE, lv_surfmesh2)
Handle chiLogicalVolumeCreate(int TypeIndex, varying Values)
success chiSurfaceMeshImportFromOBJFile(int SurfaceHandle, string FileName, bool polyflag, table3 transform)
Returns
success bool Return true if file was successfully loaded and false otherwise.
Author
Jan

Definition at line 1043 of file lua_functions.c.

◆ chiSurfaceMeshImportFromTriangleFiles()

success chi_lua::chiSurfaceMeshImportFromTriangleFiles ( int  SurfaceHandle,
char *  FileName,
bool  polyflag 
)

Loads mesh data from a wavefront object.

Parameters
SurfaceHandleint Handle to the surface on which the operation is to be performed.
FileNamechar* Path to the file to be imported.
polyflagbool (Optional)Flag indicating whether triangles are to be read as polygons. [Default: true)
Returns
success bool Return true if file was successfully loaded and false otherwise.
Author
Jan

Definition at line 1055 of file lua_functions.c.