Root/solidify/project.h

Source at commit f6ed3bf762b63b950cf801c9282101a818c0ff8e created 8 years 10 months ago.
By Werner Almesberger, solidify now stores the context of sessions in project description files.
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 * line 1: file name of top face (required)
17 * line 2: file name of bottom face (required)
18 * line 3 and beyond, separated by whitespace:
19 * - z distance between faces, in mm
20 * - z distance of the z0 plane from the midpoint of the top face, in mm
21 * - inclination of the x axis of the z0 plane of the top face, in degrees
22 * - inclination of the y axis of the z0 plane of the top face, in degrees
23 * - rotation of the top face, in degrees
24 * - x shift of the top face, in mm
25 * - y shift of the top face, in mm
26 * - the above 6 fields for the bottom face
27 */
28
29#ifndef PROJECT_H
30#define PROJECT_H
31
32#include "solid.h"
33
34
35struct project {
36    const char *name;
37    const char *top;
38    const char *bottom;
39    struct solid s;
40};
41
42
43struct project *new_project(const char *name,
44    const char *top, const char *bottom, double dist_mm);
45struct project *load_project(const char *name);
46void save_project(const struct project *prj);
47
48#endif /* !PROJECT_H */
49

Archive Download this file

Branches:
master



interactive