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 "mancommd.h"
00049 #include "hiegroup.h"
00050
00051 #ifdef __Extended_Version
00052 void MSD_execNameListAxisName(void)
00053 {
00054 char aname[30];
00055
00056 while (1 != sscanf(restbuf, "%s", aname))
00057 {
00058 printf("ListAxisName: name\n");
00059 if (!lineins("? "))
00060 {
00061 return;
00062 }
00063 }
00064 MSD_highNameListAxisName(aname);
00065 }
00066
00067 #endif
00068
00069 int MSD_highNameListAxisName(char *name)
00070 {
00071 APTYPE aptr;
00072
00073 if ((aptr = MSD_lowFindAxisByName(name)) == ANIL)
00074 {
00075 fprintf(stderr, MEN_NaoEncontrouAxisNome, NAM_ListAxis, name);
00076 return(ERROR);
00077 }
00078 return(MSD_lowListAxisName(aptr));
00079 }
00080
00081 int MSD_lowListAxisName(APTYPE aptr)
00082 {
00083 static char *strmode[] = { "\0", "Translacao", "Rotacao " };
00084 int modeidx;
00085
00086 printf("Eixo Nome=%-18s ", AxsName(aptr));
00087 switch (AxsMode(aptr))
00088 {
00089 case AxisOfTranslation:
00090 modeidx = 1;
00091 break;
00092
00093 case AxisOfRotation:
00094 modeidx = 2;
00095 break;
00096
00097 default:
00098 modeidx = 0;
00099 }
00100 printf("mode=%-10s ", strmode[modeidx]);
00101 if (AxsType(aptr) == -1)
00102 {
00103 printf("Nao possui grupo/objeto adjunto!\n");
00104 }
00105 if (AxsType(aptr) == SOLID)
00106 {
00107 printf("Grupo adjunto =%s\n", SolName(AxsASolid(aptr)));
00108 }
00109 if (AxsType(aptr) == GROUP)
00110 {
00111 printf("Grupo adjunto =%s\n", GrpName(AxsAGroup(aptr)));
00112 }
00113 if (AxsMode(aptr) == AxisOfRotation)
00114 {
00115 printf("\tcenter=(%10.3g,%10.3g,%10.3g)\n", AxsCenter(aptr)[0],
00116 AxsCenter(aptr)[1],
00117 AxsCenter(aptr)[2]);
00118 }
00119 printf("\tvector=(%10.3g,%10.3g,%10.3g)\n", AxsVector(aptr)[0],
00120 AxsVector(aptr)[1],
00121 AxsVector(aptr)[2]);
00122 return(TRUE);
00123 }
00124
00125 void MSD_lowListAllAxis(void)
00126 {
00127 APTYPE aptr;
00128
00129 for (AllAxis(aptr))
00130 {
00131 MSD_lowListAxisName(aptr);
00132 }
00133 }
00134
00135 void MSD_lowListAllAxisName(void)
00136 {
00137 APTYPE aptr;
00138
00139 for (AllAxis(aptr))
00140 {
00141 printf("%-20s", AxsName(aptr));
00142 }
00143 printf("\n");
00144 }