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 "memvirtu.h"
00043 #include "lowparam.h"
00044 #include "lowmacro.h"
00045 #include "lowsolid.h"
00046 #include "genfunc_.h"
00047 #include "vectorop.h"
00048 #include "mancommd.h"
00049 #include "hiegroup.h"
00050
00051 void MSD_execManipulateAxis(void)
00052 {
00053 int ip;
00054 char onam[30], anam[30];
00055 float x1, y1, z1, x2, y2, z2, k;
00056
00057 for (ip = 0; ip == 0;)
00058 {
00059 switch (optin())
00060 {
00061 case 'a':
00062 if (2 == sscanf(restbuf, "%s %s", anam, onam))
00063 {
00064 MSD_highNameAssociateAxisElement(anam, onam);
00065 ip = 1;
00066 }
00067 break;
00068
00069 case 'd':
00070 if (1 == sscanf(restbuf, "%s", anam))
00071 {
00072 MSD_highNameDesassociateAxisElement(anam);
00073 ip = 1;
00074 }
00075 break;
00076
00077 case 'e':
00078 if (1 == sscanf(restbuf, "%s", anam))
00079 {
00080 MSD_highNameRemoveAxis(anam);
00081 ip = 1;
00082 }
00083 break;
00084
00085 case 'm':
00086 if (2 == sscanf(restbuf, "%s %f", anam, &k))
00087 {
00088 MSD_highNameTransformUsingAxis(anam, k);
00089 ip = 1;
00090 }
00091 break;
00092
00093 case 'r':
00094 if (7 == sscanf(restbuf, "%s %f %f %f %f %f %f", anam, &x1,
00095 &y1, &z1, &x2, &y2, &z2))
00096 {
00097 MSD_highNameCreateAxisRotation(anam, x1, y1, z1, x2, y2, z2);
00098 ip = 1;
00099 }
00100 break;
00101
00102 case 's':
00103 if (4 == sscanf(restbuf, "%s %f %f %f", anam, &x1, &y1, &z1))
00104 {
00105 MSD_highNameCreateAxisTranslation(anam, x1, y1, z1);
00106 ip = 1;
00107 }
00108 }
00109 if (ip == 0)
00110 {
00111 printf("-rs nome dos eixos [pto sobre os eixos] vector\n");
00112 printf("-m nome dos eixos angulo/numero de vezes\n");
00113 printf("-ade nome dos eixos [nome do objeto/grupo]\n");
00114 if (!lineins("? "))
00115 {
00116 return;
00117 }
00118 }
00119 }
00120 }