#include "cs_defs.h"
#include <assert.h>
#include <errno.h>
#include <math.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "fvm_nodal.h"
#include "fvm_nodal_append.h"
#include "cs_mesh_headers.h"
#include "cs_order.h"
#include "cs_parall.h"
#include "cs_math.h"
#include "cs_stl.h"
Functions | |
cs_stl_mesh_t * | cs_stl_mesh_add (const char *name) |
Add a new STL mesh structure. More... | |
cs_stl_mesh_t * | cs_stl_mesh_get_by_name (const char *name) |
Return a pointer to a STL mesh based on its name if present. More... | |
void | cs_stl_mesh_destroy_all (void) |
Free all allocated STL mesh structures. More... | |
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. More... | |
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. More... | |
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:
[in] | path | path to the STL file |
[in] | stl_mesh | pointer to the associated STL mesh structure |
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.
[in] | stl_mesh | pointer to the associated STL mesh structure |
[in] | path | path to the STL file |
cs_stl_mesh_t* cs_stl_mesh_add | ( | const char * | name | ) |
Add a new STL mesh structure.
[in] | name | name of the STL mesh |
void cs_stl_mesh_destroy_all | ( | void | ) |
Free all allocated STL mesh structures.
cs_stl_mesh_t* cs_stl_mesh_get_by_name | ( | const char * | name | ) |
Return a pointer to a STL mesh based on its name if present.
[in] | name | name of the STL mesh |
If no STL mesh of the given name is defined, NULL is returned.