#ifndef SCHLICHTMUSTER_H
#define SCHLICHTMUSTER_H
#include "step.h"
#include "stack.h"
#include "package.h"
#define VP 15
#define P 0
#define ZS 1
stack *sta;
package *pac;
QVector<step> Schlichtmuster_A_ZS
(int height,
QString p1,
QString s1
);
#endif // SCHLICHTMUSTER_H
#ifndef SCHLICHTMUSTER_H
#define SCHLICHTMUSTER_H
#include "step.h"
#include "stack.h"
#include "package.h"
#define VP 15
#define P 0
#define ZS 1
stack *sta;
package *pac;
QVector<step> Schlichtmuster_A(int height, QString p1, QString s1);
QVector<step> Schlichtmuster_A_ZS(int height, QString p1, QString s1);
#endif // SCHLICHTMUSTER_H
To copy to clipboard, switch view to plain text mode
#include <QVector>
#include "schlichtmuster.h"
int anz_gesamt = 0;
int anz_l,anz_b,anz_h;
int dest_x, dest_y, dest_z, dest_dreh;
int h = height;
sta = new stack(s1);
pac = new package(p1);
QVector<step> steps;
anz_b = sta->width / pac->width;
anz_l = sta->lenght / pac->lenght;
anz_h = h / pac->height;
anz_gesamt = 0;
dest_dreh =0;
qDebug()<<anz_l<<" "<<anz_b<<" "<<anz_h;
for(int i_h =0;i_h<=anz_h;i_h++){
dest_z = sta->height+(i_h*pac->height);
for(int i_l = 0;i_l<anz_l;i_l++){
dest_y = i_l*pac->lenght;
for(int i_b = 0;i_b<anz_b;i_b++){
dest_x = i_b*pac->width;
qDebug()<<dest_x<<" "<<dest_y<<" "<<dest_z;
anz_gesamt++;
steps.insert(anz_gesamt,step(1,anz_gesamt,0,P,dest_x,dest_y,dest_z,dest_dreh,dest_x+VP,dest_y+VP,dest_z+VP,dest_dreh));
}
}
}
return steps;
}
QVector<step> Schlichtmuster_A_ZS
(int height,
QString p1,
QString s1
){ int anz_gesamt = 0;
int anz_l,anz_b,anz_h;
int dest_x, dest_y, dest_z, dest_dreh;
int h = height;
sta = new stack(s1);
pac = new package(p1);
QVector<step> steps;
anz_b = sta->width / pac->width;
anz_l = sta->lenght / pac->lenght;
anz_h = h / pac->height;
anz_gesamt = 0;
dest_dreh =0;
qDebug()<<anz_l<<" "<<anz_b<<" "<<anz_h;
for(int i_h =0;i_h<=anz_h;i_h++){
dest_z = sta->height+(i_h*pac->height);
for(int i_l = 0;i_l<anz_l;i_l++){
dest_y = i_l*pac->lenght;
if(i_h>0){
anz_gesamt++;
steps.insert(anz_gesamt,step(1,anz_gesamt,0,ZS,0,0,dest_z,dest_dreh,0+VP,0+VP,dest_z+VP,dest_dreh));
}
for(int i_b = 0;i_b<anz_b;i_b++){
dest_x = i_b*pac->width;
qDebug()<<dest_x<<" "<<dest_y<<" "<<dest_z;
anz_gesamt++;
steps.insert(anz_gesamt,step(1,anz_gesamt,0,P,dest_x,dest_y,dest_z,dest_dreh,dest_x+VP,dest_y+VP,dest_z+VP,dest_dreh));
}
}
}
return steps;
}
#include <QVector>
#include "schlichtmuster.h"
QVector<step> Schlichtmuster_A(int height, QString p1, QString s1){
int anz_gesamt = 0;
int anz_l,anz_b,anz_h;
int dest_x, dest_y, dest_z, dest_dreh;
int h = height;
sta = new stack(s1);
pac = new package(p1);
QVector<step> steps;
anz_b = sta->width / pac->width;
anz_l = sta->lenght / pac->lenght;
anz_h = h / pac->height;
anz_gesamt = 0;
dest_dreh =0;
qDebug()<<anz_l<<" "<<anz_b<<" "<<anz_h;
for(int i_h =0;i_h<=anz_h;i_h++){
dest_z = sta->height+(i_h*pac->height);
for(int i_l = 0;i_l<anz_l;i_l++){
dest_y = i_l*pac->lenght;
for(int i_b = 0;i_b<anz_b;i_b++){
dest_x = i_b*pac->width;
qDebug()<<dest_x<<" "<<dest_y<<" "<<dest_z;
anz_gesamt++;
steps.insert(anz_gesamt,step(1,anz_gesamt,0,P,dest_x,dest_y,dest_z,dest_dreh,dest_x+VP,dest_y+VP,dest_z+VP,dest_dreh));
}
}
}
return steps;
}
QVector<step> Schlichtmuster_A_ZS(int height, QString p1, QString s1){
int anz_gesamt = 0;
int anz_l,anz_b,anz_h;
int dest_x, dest_y, dest_z, dest_dreh;
int h = height;
sta = new stack(s1);
pac = new package(p1);
QVector<step> steps;
anz_b = sta->width / pac->width;
anz_l = sta->lenght / pac->lenght;
anz_h = h / pac->height;
anz_gesamt = 0;
dest_dreh =0;
qDebug()<<anz_l<<" "<<anz_b<<" "<<anz_h;
for(int i_h =0;i_h<=anz_h;i_h++){
dest_z = sta->height+(i_h*pac->height);
for(int i_l = 0;i_l<anz_l;i_l++){
dest_y = i_l*pac->lenght;
if(i_h>0){
anz_gesamt++;
steps.insert(anz_gesamt,step(1,anz_gesamt,0,ZS,0,0,dest_z,dest_dreh,0+VP,0+VP,dest_z+VP,dest_dreh));
}
for(int i_b = 0;i_b<anz_b;i_b++){
dest_x = i_b*pac->width;
qDebug()<<dest_x<<" "<<dest_y<<" "<<dest_z;
anz_gesamt++;
steps.insert(anz_gesamt,step(1,anz_gesamt,0,P,dest_x,dest_y,dest_z,dest_dreh,dest_x+VP,dest_y+VP,dest_z+VP,dest_dreh));
}
}
}
return steps;
}
To copy to clipboard, switch view to plain text mode
Bookmarks