My_OB03タグのスケッチ
My_OB03タグのスケッチのスケッチは以下となります。
class My_OB03 extends My_OB
{
void OB03()//大型片持ち梁トラス構造体
{
OB03_01();////架台
OB03_02();//片持ち梁
OB03_03();//軸受け
OB03_04();//基礎
}
void OB03_04()//基礎
{
Y_M20Nut_XYZ(70,-18,80);
Y_M20Nut_XYZ(70,-18,-220);
Y_M20Nut_XYZ(70,-18,-420);
Y_M20Nut_XYZ(-70,-18,80);
Y_M20Nut_XYZ(-70,-18,-220);
Y_M20Nut_XYZ(-70,-18,-420);
Y_M20Nut_XYZ(150,-18,0);
Y_M20Nut_XYZ(150,-18,-140);
Y_M20Nut_XYZ(-150,-18,0);
Y_M20Nut_XYZ(-150,-18,-140);
Y_M20Nut_XYZ(350,-18,0);
Y_M20Nut_XYZ(350,-18,-140);
Y_M20Nut_XYZ(-350,-18,0);
Y_M20Nut_XYZ(-350,-18,-140);
Y_Bar_XYZ(10,200,70,100,80);
Y_Bar_XYZ(10,200,70,100,-220);
Y_Bar_XYZ(10,200,70,100,-420);
Y_Bar_XYZ(10,200,-70,100,80);
Y_Bar_XYZ(10,200,-70,100,-220);
Y_Bar_XYZ(10,200,-70,100,-420);
Y_Bar_XYZ(10,200,150,100,0);
Y_Bar_XYZ(10,200,150,100,-140);
Y_Bar_XYZ(10,200,-150,100,0);
Y_Bar_XYZ(10,200,-150,100,-140);
Y_Bar_XYZ(10,200,350,100,0);
Y_Bar_XYZ(10,200,350,100,-140);
Y_Bar_XYZ(10,200,-350,100,0);
Y_Bar_XYZ(10,200,-350,100,-140);
fill(15,15,0,40);
pushMatrix();
translate(0,200,-200);
box(1000,400,1000);
popMatrix();
fill(255, 255, 255);
}
void Box_XYZ(float Lx,float Ly,float Lz,float Px,float Py,float Pz)
{
pushMatrix();
translate(Px,Py,Pz);
box(Lx,Ly,Lz);
popMatrix();
}
void Z_M16Nut_XYZ(float X,float Y,float Z)
{
pushMatrix();
translate(X,Y,Z);
Z_6Bar(24,13);
popMatrix();
}
void Y_M20Nut_XYZ(float X,float Y,float Z)
{
pushMatrix();
translate(X,Y,Z);
pushMatrix();
rotateX(90*PI/180);
Z_6Bar(30,16);
popMatrix();
popMatrix();
}
void OB03_03()//軸受け
{
pushMatrix();
translate(0,-1520.5,0);
box(200,20,60);
Y_M20Nut_XYZ(70,-18,0);
Y_M20Nut_XYZ(-70,-18,0);
Y_M20Nut_XYZ(70,26,0);
Y_M20Nut_XYZ(-70,26,0);
popMatrix();
}
void OB03_02()//片持ち梁
{
Y_Bar_XYZ(30.25,1418,0,-800,0);
Y_Bar_XYZ(15,29.2,0,-1522.6,0);
Y_Bar_XYZ(15,20,0,-80,0);
X_Bar_XYZ(30.25,3600,1800,-1414,0);
OB03_02_1();
OB03_02_2();
}
void OB03_02_1()
{
pushMatrix();
translate(1550,-782,0);
rotateY(90*PI/180);
rotateX(22.2*PI/180);
Z_Bar(30.25,3347.8);
popMatrix();
}
void OB03_02_2()
{
pushMatrix();
translate(775,-1098,0);
rotateY(90*PI/180);
rotateX(-22.2*PI/180);
Z_Bar(13.6,1673.8);
popMatrix();
}
void Z_Bar_XYZ(float R,float L,float X,float Y,float Z)
{
pushMatrix();
translate(X,Y,Z);
Z_Bar(R,L);
popMatrix();
}
void Y_Bar_XYZ(float R,float L,float X,float Y,float Z)
{
pushMatrix();
translate(X,Y,Z);
pushMatrix();
rotateX(90*PI/180);
Z_Bar(R,L);
popMatrix();
popMatrix();
}
void X_Bar_XYZ(float R,float L,float X,float Y,float Z)
{
pushMatrix();
translate(X,Y,Z);
pushMatrix();
rotateY(90*PI/180);
Z_Bar(R,L);
popMatrix();
popMatrix();
}
void OB03_01()//架台
{
pushMatrix();
translate(0,-5,-205);
box(200,10,630);
translate(275,0,135);
box(350,10,200);
translate(-550,0,0);
box(350,10,200);
popMatrix();
OB03_01_3();//底梁(1)
OB03_01_4();//底梁(2)
OB03_01_6();//斜め梁
OB03_01_5();//中央梁
OB03_01_7();//上軸受け固定板
OB03_01_8();//補強板1
OB03_01_9();//補強板2
OB03_01_10();//補強板3
OB03_01_11();//下軸受け
OB03_01_12();//回転止め
}
void OB03_01_3()//底梁(1)
{
pushMatrix();
translate(0,-40,-205);
//void Z_SqPipe(float Wo,float Wi,float L)//角パイプ
Z_SqPipe(60,56,630);//角パイプ
popMatrix();
}
void OB03_01_4()//底梁(2)
{
pushMatrix();
rotateY(90*PI/180);
translate(70,-40,240);
//void Z_SqPipe(float Wo,float Wi,float L)//角パイプ
Z_SqPipe(60,56,420);//角パイプ
translate(0,0,-480);
Z_SqPipe(60,56,420);//角パイプ
popMatrix();
}
void OB03_01_5()//中央梁
{
pushMatrix();
rotateX(90*PI/180);
translate(0,-70,782);
//void Z_SqPipe(float Wo,float Wi,float L)//角パイプ
Z_SqPipe(60,56,1424);//角パイプ
popMatrix();
}
void OB03_01_6()//斜め梁
{
pushMatrix();
translate(-208,-758.70,-70);
pushMatrix();
rotateX(90*PI/180);
rotateY(16.4*PI/180);
//void Z_SqPipe(float Wo,float Wi,float L)//角パイプ
Z_SqPipe(60,56,1453.7);//角パイプ
popMatrix();
popMatrix();
pushMatrix();
translate(208,-758.70,-70);
pushMatrix();
rotateX(90*PI/180);
rotateY(-16.4*PI/180);
//void Z_SqPipe(float Wo,float Wi,float L)//角パイプ
Z_SqPipe(60,56,1453.7);//角パイプ
popMatrix();
popMatrix();
pushMatrix();
translate(0,-758.70,-278);
pushMatrix();
rotateX((90-16.4)*PI/180);
//void Z_SqPipe(float Wo,float Wi,float L)//角パイプ
Z_SqPipe(60,56,1453.7);//角パイプ
popMatrix();
popMatrix();
}
void OB03_01_7()//上軸受け固定板
{
int Pn=16;//ポイント数
float[] X={100,100,-100,-100,-35,-35,-32.3,-24.3,-12.5,0,12.5,24.3,32.3,35,35,100};
float[] Y={-30,170,170,-30,-30,0,13.3,24.5,32.3,35,32.3,24.5,13.3,0,-30,-30};
float L=16;
pushMatrix();
translate(0,-1502,0);
pushMatrix();
rotateX(-90*PI/180);
//void Z_Polyon_Plate(int Pn,float X[],float Y[],float L)//多角形板
Z_Polyon_Plate(Pn,X,Y,L);
popMatrix();
popMatrix();
}
void OB03_01_8()//補強板1
{
pushMatrix();
translate(0,-1362.5,-70);
box(200,263,10);
translate(0,0,-50);
box(10,263,100);
popMatrix();
}
void OB03_01_9()//補強板2
{
int Pn=4;//ポイント数
float[] X={30,130,30,30};
float[] Y={-70,-70,-170,-70};
float L=10;
pushMatrix();
translate(0,0,-70);
pushMatrix();
//void Z_Polyon_Plate(int Pn,float X[],float Y[],float L)//多角形板
Z_Polyon_Plate(Pn,X,Y,L);
rotateY(90*PI/180);
Z_Polyon_Plate(Pn,X,Y,L);
rotateY(90*PI/180);
Z_Polyon_Plate(Pn,X,Y,L);
popMatrix();
popMatrix();
}
void OB03_01_10()//補強板3
{
int Pn=4;//ポイント数
float[] X={279.3,379.3,351,279.3};
float[] Y={-70,-70,-167.9,-70};
float L=10;
pushMatrix();
translate(0,0,-70);
pushMatrix();
//void Z_Polyon_Plate(int Pn,float X[],float Y[],float L)//多角形板
Z_Polyon_Plate(Pn,X,Y,L);
rotateY(90*PI/180);
Z_Polyon_Plate(Pn,X,Y,L);
rotateY(90*PI/180);
Z_Polyon_Plate(Pn,X,Y,L);
popMatrix();
popMatrix();
}
void OB03_01_11()//下軸受け
{
pushMatrix();
translate(0,-80,35);
box(60,20,150);
popMatrix();
}
void OB03_01_12()//回転止め
{
pushMatrix();
translate(-343.5,-290.5,-35);
pushMatrix();
rotateZ(16.4*PI/180);
box(180,160,10);
Box_XYZ(40,160,10,70,0,70);
Box_XYZ(40,160,10,-70,0,70);
Z_M16Nut_XYZ(70,60,81.5);
Z_M16Nut_XYZ(70,-60,81.5);
Z_M16Nut_XYZ(-70,60,81.5);
Z_M16Nut_XYZ(-70,-60,81.5);
Z_Bar_XYZ(16,90,70,60,35);
Z_Bar_XYZ(16,90,70,-60,35);
Z_Bar_XYZ(16,90,-70,60,35);
Z_Bar_XYZ(16,90,-70,-60,35);
popMatrix();
popMatrix();
pushMatrix();
translate(343.5,-290.5,-35);
pushMatrix();
rotateZ(-16.4*PI/180);
box(180,160,10);
Box_XYZ(40,160,10,70,0,70);
Box_XYZ(40,160,10,-70,0,70);
Z_M16Nut_XYZ(70,60,81.5);
Z_M16Nut_XYZ(70,-60,81.5);
Z_M16Nut_XYZ(-70,60,81.5);
Z_M16Nut_XYZ(-70,-60,81.5);
Z_Bar_XYZ(16,90,70,60,35);
Z_Bar_XYZ(16,90,70,-60,35);
Z_Bar_XYZ(16,90,-70,60,35);
Z_Bar_XYZ(16,90,-70,-60,35);
popMatrix();
popMatrix();
}
}
(1)上記スケッチにおいて、My_OB02クラスはMy_OBクラスを継承します。