mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 20:21:09 +02:00
34117153cb
- solidify/project.h (struct project), solidify/project.c (make_project, load_project, save_project): allow project descriptions to begin with any numer of comment lines and preserve them across sessions
51 lines
1.4 KiB
C
51 lines
1.4 KiB
C
/*
|
|
* project.h - Load and save solidify project descriptions
|
|
*
|
|
* Written 2010 by Werner Almesberger
|
|
* Copyright 2010 by Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
/*
|
|
* Project file structure:
|
|
*
|
|
* Zero or more comment lines beginning with a hash sign (#)
|
|
* line 1: file name of top face (required)
|
|
* line 2: file name of bottom face (required)
|
|
* line 3 and beyond, separated by whitespace:
|
|
* - z distance between faces, in mm
|
|
* - z distance of the z0 plane from the midpoint of the top face, in mm
|
|
* - inclination of the x axis of the z0 plane of the top face, in degrees
|
|
* - inclination of the y axis of the z0 plane of the top face, in degrees
|
|
* - rotation of the top face, in degrees
|
|
* - x shift of the top face, in mm
|
|
* - y shift of the top face, in mm
|
|
* - the above 6 fields for the bottom face
|
|
*/
|
|
|
|
#ifndef PROJECT_H
|
|
#define PROJECT_H
|
|
|
|
#include "solid.h"
|
|
|
|
|
|
struct project {
|
|
const char *name;
|
|
const char *comment;
|
|
const char *top;
|
|
const char *bottom;
|
|
struct solid s;
|
|
};
|
|
|
|
|
|
struct project *new_project(const char *name,
|
|
const char *top, const char *bottom, double dist_mm);
|
|
struct project *load_project(const char *name);
|
|
void save_project(const struct project *prj);
|
|
|
|
#endif /* !PROJECT_H */
|