Chi-Tech
mesh_maindoc_page.h
Go to the documentation of this file.
1/** \defgroup LuaMesh A Meshing
2
3
4## Mesh Handling
5
6 Meshing in ChiTech is made available via the chi_mesh namespace. All instances
7 of entities are stored within a handler (chi_mesh::MeshHandler). A mesh handler
8 is created with a call to chiMeshHandlerCreate().
9
10 \code
11 chiMeshHandlerCreate()
12 \endcode
13
14## Predefined 2D Mesh Setup Example
15
16\code
17chiMeshHandlerCreate()
18--
19newSurfMesh = chiSurfaceMeshCreate();
20chiSurfaceMeshImportFromOBJFile(newSurfMesh,"CHI_RESOURCES/TestObjects/SquareMesh2x2.obj")
21loops,loop_count = chiSurfaceMeshGetEdgeLoops(newSurfMesh)
22--
23--
24line_mesh = {};
25line_mesh_count = 0;
26--
27for k=1,loop_count do
28 split_loops,split_count = chiEdgeLoopSplitByAngle(loops,k-1);
29 for m=1,split_count do
30 line_mesh_count = line_mesh_count + 1;
31 line_mesh[line_mesh_count] = chiLineMeshCreateFromLoop(split_loops,m-1);
32 end
33--
34end
35\endcode
36
37*/