Go to the source code of this file.
◆ cs_stl_file_read()
void cs_stl_file_read |
( |
cs_stl_mesh_t * |
stl_mesh, |
|
|
const char * |
path |
|
) |
| |
Read a binary STL file and store its content in a STL mesh structure.
Each STL file composed of the following header:
uint8[80] – Header uint32 – Number of triangles
followed by 50 byte blocks for each triangle:
- real32[3] – Normal vector
- real32[3] – Vertex 1 coordinates
- real32[3] – Vertex 2 coordinates
- real32[3] – Vertex 3 coordiantes
- uint16 – Attribute (any other information, usually void)
- Parameters
-
[in] | path | path to the STL file |
[in] | stl_mesh | pointer to the associated STL mesh structure |
◆ cs_stl_file_write()
void cs_stl_file_write |
( |
cs_stl_mesh_t * |
stl_mesh, |
|
|
const char * |
path |
|
) |
| |
Write a binary STL file according to a given STL mesh structure.
- Parameters
-
[in] | stl_mesh | pointer to the associated STL mesh structure |
[in] | path | path to the STL file |
◆ cs_stl_mesh_add()
Add a new STL mesh structure.
- Parameters
-
[in] | name | name of the STL mesh |
- Returns
- pointer to the new STL mesh structure
◆ cs_stl_mesh_destroy_all()
void cs_stl_mesh_destroy_all |
( |
void |
| ) |
|
Free all allocated STL mesh structures.
◆ cs_stl_mesh_get_by_name()
Return a pointer to a STL mesh based on its name if present.
- Parameters
-
[in] | name | name of the STL mesh |
If no STL mesh of the given name is defined, NULL is returned.
- Returns
- pointer to the STL mesh structure, or NULL
◆ cs_glob_stl_meshes