aboutsummaryrefslogtreecommitdiffstats
path: root/service/src/stlfile.h
blob: 00cf28dcb88ea88d8a08d87a3872a33c7129dff0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef STLFILE_H
#define STLFILE_H

#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <endian.h>

enum {
	KW_SOLID_BEGIN,
	KW_SOLID_END,
	KW_FACET,
	KW_OUTER,
	KW_VERTEX
};

enum {
	TYPE_ASCII,
	TYPE_BIN
};

struct stack {
	int *data;
	size_t count, cap;
};

struct parseinfo {
	char fmtbuf[256];
	char header[80];
	int type, valid;
	unsigned int loopcount;
	float bbw, bbh;
	char *namehash, *infopath, *stlpath;
};

int parse_file(struct parseinfo *info, char *buf, size_t len);

#endif /* STLFILE_H */