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_execNameDesassociaGroupAxis(void)
00054 {
00055 char gname[30], aname[30];
00056
00057 while (2 != sscanf(restbuf, "%s %s", gname, aname))
00058 {
00059 printf("DesAxisGroup: grupo axis\n");
00060 if (!lineins("? "))
00061 {
00062 return;
00063 }
00064 }
00065 MSD_highNameDesassociaGroupAxis(gname, aname);
00066 }
00067
00068 #endif
00069
00070 int MSD_highNameDesassociaGroupAxis(char *name1, char *name2)
00071 {
00072 int gn, an;
00073
00074 if ((gn = MSD_getGroupIdFromName(name1)) == -1)
00075 {
00076 fprintf(stderr, MEN_NaoEncontrouGroupNome,
00077 NAM_DesassociaAxisGroup, name1);
00078 return(ERROR);
00079 }
00080 if ((an = MSD_getAxisIdFromName(name2)) == -1)
00081 {
00082 fprintf(stderr, MEN_NaoEncontrouAxisNome,
00083 NAM_DesassociaAxisGroup, name2);
00084 return(ERROR);
00085 }
00086 return(MSD_highAssociaGroupAxis(gn, an));
00087 }
00088
00089 #ifdef __Extended_Version
00090 void MSD_execDesassociaGroupAxis(void)
00091 {
00092 int gn, an;
00093
00094 while (2 != sscanf(restbuf, "%d %d", &gn, &an))
00095 {
00096 printf("DesAxisGroup: gn an\n");
00097 if (!lineins("? "))
00098 {
00099 return;
00100 }
00101 }
00102 MSD_highDesassociaGroupAxis(gn, an);
00103 }
00104
00105 #endif
00106
00107 int MSD_highDesassociaGroupAxis(int gn, int an)
00108 {
00109 GPTYPE gptr;
00110 APTYPE aptr;
00111
00112 if ((gptr = MSD_getGroup(gn)) == GNIL)
00113 {
00114 fprintf(stderr, MEN_NaoEncontrouGroupId,
00115 NAM_DesassociaAxisGroup, gn);
00116 return(ERROR);
00117 }
00118 if ((aptr = MSD_getAxis(an)) == ANIL)
00119 {
00120 fprintf(stderr, MEN_NaoEncontrouAxisId,
00121 NAM_DesassociaAxisGroup, an);
00122 return(ERROR);
00123 }
00124 if (AxsType(aptr) == GROUP)
00125 {
00126 if (AxsAGroup(aptr) == gptr)
00127 {
00128 return(MSD_lowAssociaGroupAxis(aptr, GNIL));
00129 }
00130 }
00131 fprintf(stderr, MEN_ParametrosIncorretos, NAM_DesassociaAxisGroup);
00132 return(ERROR);
00133 }