Go to the documentation of this file.
64 int main( int argc, char **arg)
71 unsigned int dim_x,dim_y,dim_z;
72 double min_x,max_x,min_y,max_y, min_z,max_z;
79 fprintf(stderr, "Use:\n");
80 fprintf(stderr, " cuikplot3d <filename> dimx dimy dimz min_size <plotname> \n");
81 fprintf(stderr, " <filename> the input .sol file\n");
82 fprintf(stderr, " dimx dimy dimz -> the three dimensions to be plotted (numbered from 1)\n");
83 fprintf(stderr, " min_size -> minimum size for the boxes\n");
84 fprintf(stderr, " <plotname> the output .gcl file\n");
95 Error( "Input file can not be opened");
101 dim_x=( unsigned int)atoi(arg[2]);
102 dim_y=( unsigned int)atoi(arg[3]);
103 dim_z=( unsigned int)atoi(arg[4]);
106 if ((dim_x==0)||(dim_y==0)||(dim_z==0))
107 Error( "Dimensions are numbered from 1\n");
122 minSize=(double)atof(arg[5]);
165 if (((max_x-min_x)<minSize)&&
166 ((max_y-min_y)<minSize)&&
167 ((max_z-min_z)<minSize))
180 PlotBox3d(min_x,max_x,min_y,max_y,min_z,max_z,&plot);
187 } while (token!=EOF);
195 return(EXIT_SUCCESS);
Definition of the boolean type.
Tinterval * GetBoxInterval(unsigned int n, Tbox *b) Returns a pointer to one of the intervals defining the box.
void PlotBox3d(double min_x, double max_x, double min_y, double max_y, double min_z, double max_z, Tplot3d *p) Adds an axis aligned box to the current object.
Data structure to hold the information about the name of a file.
int main(int argc, char **arg) Main body of the cuikplot3d application.
Definition of the Tfilename type and the associated functions.
Definition of the Tplot3d type and the associated functions.
void InitPlot3d(char *name, boolean axes, int argc, char **arg, Tplot3d *p) Constructor.
void Error(const char *s) General error function.
void DeleteFileName(Tfilename *fn) Destructor.
int ReadBox(FILE *f, Tbox *b) Reads a box from a file.
double LowerLimit(Tinterval *i) Gets the lower limit.
Definition of the Tbox type and the associated functions.
Definitions of constants and macros used in several parts of the cuik library.
void CreateFileName(char *path, char *name, char *suffix, char *ext, Tfilename *fn) Constructor.
double UpperLimit(Tinterval *i) Gets the uppser limit.
char * GetFileFullName(Tfilename *fn) Gets the file full name (paht+name+extension).
#define SOL_EXT File extension for solution files.
Definition of the Tcolor type and the associated functions.
void DeleteBox(void *b) Destructor.
#define PLOT3D_EXT File extension for 3D plot files.
#define DCP3D_G Green component of the default color of 3d objects.
void DeleteColor(Tcolor *c) Destructor.
#define DCP3D_R Red component of the default color of 3d objects.
void NewColor(double r, double g, double b, Tcolor *c) Constructor.
#define DCP3D_B Blue component of the default color of 3d objects.
unsigned int StartNew3dObject(Tcolor *c, Tplot3d *p) Start a composed object.
void ClosePlot3d(boolean quit, double average_x, double average_y, double average_z, Tplot3d *p) Destructor.
|
Follow us!