1
0
mirror of git://projects.qi-hardware.com/ben-scans.git synced 2024-11-22 09:16:15 +02:00
ben-scans/solidify/project.h
Werner Almesberger f6ed3bf762 solidify now stores the context of sessions in project description files.
- solidify/Makefile (OBJS): added project.o
- solidify/Makefile (new): new target to create a new project
- solidify/Makefile (run): changed to resume previously created project
- solidify/util.h (stralloc): added stralloc (from fped)
- solidify/project.h, solidify/project.c: create, load, and save project
  description files
- solidify/solidify.c (clicked, gui_buttons, gui, main): updated to use
  project instead of solid
- solidify/solidify.c (usage, main): new invocation: four arguments to start
  new project, one argument to resume old project
2010-09-24 21:01:59 -03:00

49 lines
1.3 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:
*
* 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 *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 */