00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <stdio.h>
00042 #include <string.h>
00043 #include "mensagem.h"
00044 #include "memvirtu.h"
00045 #include "lowparam.h"
00046 #include "lowsolid.h"
00047 #include "eulerops.h"
00048 #include "vectorop.h"
00049 #include "mancommd.h"
00050 #include "shpshape.h"
00051 #include "basrov__.h"
00052
00053 void MSD_highNameMakeCirculo(char *name, real r, real h, int n);
00054
00055 void MSD_execNameMakeCirculo(void)
00056 {
00057 char name[30];
00058 float r, h;
00059 int n;
00060
00061 while (4 != sscanf(restbuf, "%s %f %f %d", name, &r, &h, &n))
00062 {
00063 printf("ROV.circulo nome r h n\n");
00064 if (!lineins("? "))
00065 {
00066 return;
00067 }
00068 }
00069 MSD_highNameMakeCirculo(name, r, h, n);
00070 }
00071
00072 void MSD_highNameMakeCirculo(char *name, real r, real h, int n)
00073 {
00074 SPTYPE optr;
00075 Id sn;
00076
00077 if (MSD_getSolidIdFromName(name) != -1)
00078 {
00079 fprintf(stderr, MEN_SolidoJaExiste, NAM_RovCirculo, name);
00080 return;
00081 }
00082 if ((sn = MSD_highMakeCylinder(n, r, h)) != -1)
00083 {
00084 optr = MSD_getSolid(sn);
00085 strcpy(SolName(optr), name);
00086 SolType(optr) = SOLIDO_TIPO_BARRA;
00087 SolGeometria(optr) = BARRA_GEOM_CIRCULO;
00088 SolFronteira(optr) = FRONTEIRA_A;
00089 SolParam1(optr) = r;
00090 SolParam2(optr) = h;
00091 makevec(SolPrincDir(optr), 0.0, 0.0, 1.0, 0.0);
00092 }
00093 if ((sn = MSD_highMakeCylinder(n, r, 0.0)) != -1)
00094 {
00095 SolPerfil(optr) = sn;
00096 strcpy(SolName(MSD_getSolid(sn)), "PerCilindrico");
00097 }
00098 }