mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 00:01:09 -06:00
Incomplete work to store TriangleMesh objects in Model objects instead of extracting vertices and facets
This commit is contained in:
parent
78ee6e5d6d
commit
11e18f681d
8 changed files with 45 additions and 100 deletions
|
@ -50,6 +50,18 @@ TriangleMesh::ReadSTLFile(char* input_file) {
|
|||
stl_open(&stl, input_file);
|
||||
}
|
||||
|
||||
void
|
||||
TriangleMesh::write_ascii(char* output_file)
|
||||
{
|
||||
stl_write_ascii(&this->stl, output_file, "");
|
||||
}
|
||||
|
||||
void
|
||||
TriangleMesh::write_binary(char* output_file)
|
||||
{
|
||||
stl_write_binary(&this->stl, output_file, "");
|
||||
}
|
||||
|
||||
void TriangleMesh::ReadFromPerl(SV* vertices, SV* facets)
|
||||
{
|
||||
stl_initialize(&stl);
|
||||
|
|
|
@ -20,6 +20,8 @@ class TriangleMesh
|
|||
~TriangleMesh();
|
||||
SV* to_SV();
|
||||
void ReadSTLFile(char* input_file);
|
||||
void write_ascii(char* output_file);
|
||||
void write_binary(char* output_file);
|
||||
void ReadFromPerl(SV* vertices, SV* facets);
|
||||
void repair();
|
||||
void WriteOBJFile(char* output_file);
|
||||
|
|
|
@ -139,8 +139,8 @@ extern void stl_close(stl_file *stl);
|
|||
extern void stl_stats_out(stl_file *stl, FILE *file, char *input_file);
|
||||
extern void stl_print_edges(stl_file *stl, FILE *file);
|
||||
extern void stl_print_neighbors(stl_file *stl, char *file);
|
||||
extern void stl_write_ascii(stl_file *stl, char *file, char *label);
|
||||
extern void stl_write_binary(stl_file *stl, char *file, char *label);
|
||||
extern void stl_write_ascii(stl_file *stl, const char *file, const char *label);
|
||||
extern void stl_write_binary(stl_file *stl, const char *file, const char *label);
|
||||
extern void stl_check_facets_exact(stl_file *stl);
|
||||
extern void stl_check_facets_nearby(stl_file *stl, float tolerance);
|
||||
extern void stl_remove_unconnected_facets(stl_file *stl);
|
||||
|
|
|
@ -121,7 +121,7 @@ Normals fixed : %5d\n", stl->stats.normals_fixed);
|
|||
}
|
||||
|
||||
void
|
||||
stl_write_ascii(stl_file *stl, char *file, char *label)
|
||||
stl_write_ascii(stl_file *stl, const char *file, const char *label)
|
||||
{
|
||||
int i;
|
||||
FILE *fp;
|
||||
|
@ -241,7 +241,7 @@ stl_put_little_float(FILE *fp, float value_in)
|
|||
|
||||
|
||||
void
|
||||
stl_write_binary(stl_file *stl, char *file, char *label)
|
||||
stl_write_binary(stl_file *stl, const char *file, const char *label)
|
||||
{
|
||||
FILE *fp;
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue