1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2025-04-21 12:27:27 +03:00

Initial commit. For older history, see project ben-scans.

http://projects.qi-hardware.com/index.php/p/ben-scans/
This commit is contained in:
Werner Almesberger
2010-09-25 04:46:16 -03:00
commit e8d6837065
23 changed files with 2139 additions and 0 deletions

39
solidify/face.h Normal file
View File

@@ -0,0 +1,39 @@
/*
* face.h - Data structure and handling of one face of a part
*
* 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.
*/
#ifndef FACE_H
#define FACE_H
#include "array.h"
#include "matrix.h"
struct face {
struct array *a;
double x_step, y_step, z_step;
int sx, sy; /* size */
int cx, cy; /* center */
int z_ref;
double fx, fy; /* inclination factor */
struct matrix m;
};
static inline double face_z0(const struct face *f, int x, int y)
{
return f->z_ref+f->fx*(x-f->sx/2)+f->fy*(y-f->sy/2);
}
struct face *read_face(const char *name);
#endif /* !FACE_H */