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 "mensagem.h"
00043 #include "memvirtu.h"
00044 #include "lowparam.h"
00045 #include "lowmacro.h"
00046 #include "lowsolid.h"
00047 #include "vectorop.h"
00048 #include "eulerops.h"
00049 #include "mancommd.h"
00050 #include "hiegroup.h"
00051
00052 #ifdef __Extended_Version
00053 void MSD_execNameDesassociaGroupSolid(void)
00054 {
00055 char gname[30], sname[30];
00056
00057 while (2 != sscanf(restbuf, "%s %s", gname, sname))
00058 {
00059 printf("DesGroupSolid: group solid\n");
00060 if (!lineins("? "))
00061 {
00062 return;
00063 }
00064 }
00065 MSD_highNameDesassociaGroupSolid(gname, sname);
00066 }
00067
00068 #endif
00069
00070 int MSD_highNameDesassociaGroupSolid(char *name1, char *name2)
00071 {
00072 int sn, gn;
00073
00074 if ((gn = MSD_getGroupIdFromName(name1)) == -1)
00075 {
00076 fprintf(stderr, MEN_NaoEncontrouGroupNome,
00077 NAM_DesassociaGroupSolid, name1);
00078 return(ERROR);
00079 }
00080 if ((sn = MSD_getSolidIdFromName(name2)) == -1)
00081 {
00082 fprintf(stderr, MEN_NaoEncontrouSolidNome,
00083 NAM_DesassociaGroupSolid, name2);
00084 return(ERROR);
00085 }
00086 return(MSD_highAssociaGroupSolid(gn, sn));
00087 }
00088
00089 #ifdef __Extended_Version
00090 void MSD_execDesassociaGroupSolid(void)
00091 {
00092 int sn, gn;
00093
00094 while (2 != sscanf(restbuf, "%d %d", &gn, &sn))
00095 {
00096 printf("DesGroupSolid: gn sn\n");
00097 if (!lineins("? "))
00098 {
00099 return;
00100 }
00101 }
00102 MSD_highDesassociaGroupSolid(gn, sn);
00103 }
00104
00105 #endif
00106
00107 int MSD_highDesassociaGroupSolid(int gn, int sn)
00108 {
00109 GPTYPE gptr;
00110 SPTYPE sptr;
00111
00112 if ((gptr = MSD_getGroup(gn)) == GNIL)
00113 {
00114 fprintf(stderr, MEN_NaoEncontrouGroupId,
00115 NAM_DesassociaGroupSolid, gn);
00116 return(ERROR);
00117 }
00118 if ((sptr = MSD_getSolid(sn)) == SNIL)
00119 {
00120 fprintf(stderr, MEN_NaoEncontrouSolido,
00121 NAM_DesassociaGroupSolid, sn);
00122 return(ERROR);
00123 }
00124 if (SolGroup(sptr) == gptr)
00125 {
00126 return(MSD_lowAssociaGroupSolid(GNIL, sptr));
00127 }
00128 fprintf(stderr, MEN_ParametrosIncorretos, NAM_DesassociaGroupSolid);
00129 return(ERROR);
00130 }