Root/solidify/project.h

1/*
2 * project.h - Load and save solidify project descriptions
3 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 by Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13/*
14 * Project file structure:
15 *
16 * Zero or more comment lines beginning with a hash sign (#)
17 * line 1: file name of top face (required)
18 * line 2: file name of bottom face (required)
19 * line 3 and beyond, separated by whitespace:
20 * - z distance between faces, in mm
21 * - z distance of the z0 plane from the midpoint of the top face, in mm
22 * - inclination of the x axis of the z0 plane of the top face, in degrees
23 * - inclination of the y axis of the z0 plane of the top face, in degrees
24 * - rotation of the top face, in degrees
25 * - x shift of the top face, in mm
26 * - y shift of the top face, in mm
27 * - the above 6 fields for the bottom face
28 */
29
30#ifndef PROJECT_H
31#define PROJECT_H
32
33#include "solid.h"
34
35
36struct project {
37    const char *name;
38    const char *comment;
39    const char *top;
40    const char *bottom;
41    struct solid s;
42};
43
44
45struct project *new_project(const char *name,
46    const char *top, const char *bottom, double dist_mm);
47struct project *load_project(const char *name);
48void save_project(const struct project *prj);
49
50#endif /* !PROJECT_H */
51

Archive Download this file

Branches:
master



interactive