Автор работы: Пользователь скрыл имя, 05 Февраля 2015 в 18:11, курсовая работа
На настоящий момент САПР становятся обязательной частью любой производственной экономической деятельности. Они помогают обеспечить жизнеспособность фирмы и дают ей возможность развиваться в нынешних условиях жесткой рыночной конкуренции. Основной вклад подобных систем состоит в следующем:
- повышение качества продукции за счет сокращения ошибок в конструкторских и технологических расчетах, удобства внесения инженерных изменений и контроля качества;
double[] origin15 = { 144.5, 19.5, 60 };
double[] origin16 = { 32, 82, 98 + lengthcylk };
double[] origin17 = { 132, 82, 98 + lengthcylk };
double[] origin18 = { 82, 32, 98 + lengthcylk };
double[] origin19 = { 82, 132, 98 + lengthcylk };
double[] origin20 = { 32, 82, 138 };
double[] origin21 = { 132, 82, 138 };
double[] origin22 = { 82, 32, 138 };
double[] origin23 = { 82, 132, 138 };
double[] origin24 = { 32, 82, 38 + lengthcylk };
double[] origin25 = { 132, 82, 38 + lengthcylk };
double[] origin26 = { 82, 32, 38 + lengthcylk };
double[] origin27 = { 82, 132, 38 + lengthcylk };
double[] origin28 = { 32, 82, 48 + lengthcylk };
double[] origin29 = { 132, 82, 48 + lengthcylk };
double[] origin30 = { 82, 32, 48 + lengthcylk };
double[] origin31 = { 82, 132, 48 + lengthcylk };
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
if (comboBox1.Text == "3")
{
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
}
if (comboBox1.Text == "1")
{
theUfSession.Assem.AddPartToAs
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
}
if (comboBox1.Text == "2")
{
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
theUfSession.Assem.
}
theSession.DisplayManager.
}
public void Dispose()
{
isDisposeCalled = true;
}
public static int GetUnloadOption(string arg)
{
return System.Convert.ToInt32(
}
void bolt3()
{
Tag squares1;
string name1 = "bolt3";
int units1 = 1;
theUfSession.Part.New(name1, units1, out squares1);
double[] point_A1 = { 0.0, 0.0, 0.0 };
double[] point_A2 = { 0.0, 13.0, 0.0 };
double[] point_A3 = { 80.0, 13.0, 0.0 };
double[] point_A4 = { 80.0, 0.0, 0.0 };
double[] point_B1 = { 0.0, -18, 10.3923 };
double[] point_B2 = { 0.0, 0.0, 20.7846 };
double[] point_B3 = { 0.0, 18, 10.3923 };
double[] point_B4 = { 0.0, 18, -10.3923 };
double[] point_B5 = { 0.0, 0.0, -20.7846 };
double[] point_B6 = { 0.0, -18, -10.3923 };
double[] point_C1 = { -15.0, 18, 0.0 };
double[] point_C2 = { -15.0, (18 + 5), 0.0 };
double[] point_C3 = { -(15 - 3), (18 + 5), 0.0 };
UFCurve.Line line_A1 = new UFCurve.Line();
UFCurve.Line line_A2 = new UFCurve.Line();
UFCurve.Line line_A3 = new UFCurve.Line();
UFCurve.Line line_A4 = new UFCurve.Line();
UFCurve.Line line_B1 = new UFCurve.Line();
UFCurve.Line line_B2 = new UFCurve.Line();
UFCurve.Line line_B3 = new UFCurve.Line();
UFCurve.Line line_B4 = new UFCurve.Line();
UFCurve.Line line_B5 = new UFCurve.Line();
UFCurve.Line line_B6 = new UFCurve.Line();
UFCurve.Line line_C1 = new UFCurve.Line();
UFCurve.Line line_C2 = new UFCurve.Line();
UFCurve.Line line_C3 = new UFCurve.Line();
line_A1.start_point = new double[3];
line_A1.end_point = new double[3];
line_A2.start_point = new double[3];
line_A2.end_point = new double[3];
line_A3.start_point = new double[3];
line_A3.end_point = new double[3];
line_A4.start_point = new double[3];
line_A4.end_point = new double[3];
line_B1.start_point = new double[3];
line_B1.end_point = new double[3];
line_B2.start_point = new double[3];
line_B2.end_point = new double[3];
line_B3.start_point = new double[3];
line_B3.end_point = new double[3];
line_B4.start_point = new double[3];
line_B4.end_point = new double[3];
line_B5.start_point = new double[3];
line_B5.end_point = new double[3];
line_B6.start_point = new double[3];
line_B6.end_point = new double[3];
line_C1.start_point = new double[3];
line_C1.end_point = new double[3];
line_C2.start_point = new double[3];
line_C2.end_point = new double[3];
line_C3.start_point = new double[3];
line_C3.end_point = new double[3];
for (int i = 0; i < 3; i++)
{
line_A1.start_point[i] = point_A1[i];
line_A1.end_point[i] = point_A2[i];
line_A2.start_point[i] = point_A2[i];
line_A2.end_point[i] = point_A3[i];
line_A3.start_point[i] = point_A3[i];
line_A3.end_point[i] = point_A4[i];
line_A4.start_point[i] = point_A4[i];
line_A4.end_point[i] = point_A1[i];
line_B1.start_point[i] = point_B1[i];
line_B1.end_point[i] = point_B2[i];
line_B2.start_point[i] = point_B2[i];
line_B2.end_point[i] = point_B3[i];
line_B3.start_point[i] = point_B3[i];
line_B3.end_point[i] = point_B4[i];
line_B4.start_point[i] = point_B4[i];
line_B4.end_point[i] = point_B5[i];
line_B5.start_point[i] = point_B5[i];
line_B5.end_point[i] = point_B6[i];
line_B6.start_point[i] = point_B6[i];
line_B6.end_point[i] = point_B1[i];
line_C1.start_point[i] = point_C1[i];
line_C1.end_point[i] = point_C2[i];
line_C2.start_point[i] = point_C2[i];
line_C2.end_point[i] = point_C3[i];
line_C3.start_point[i] = point_C3[i];
line_C3.end_point[i] = point_C1[i];
}
Tag[] sketch1 = new Tag[4];
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
Tag[] sketch2 = new Tag[6];
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
Tag[] sketch3 = new Tag[3];
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
theUfSession.Curve.CreateLine(
double[] ref_pt1 = new double[3];
ref_pt1[0] = 0.00;
ref_pt1[1] = 0.00;
ref_pt1[2] = 0.00;
double[] direction1 = { 1.00, 0.00, 0.00 };
string[] limit1 = { "0", "360" };
Tag[] body1;
theUfSession.Modl.
string taper_angle = "0.0";
string[] limit_extrude1 = { "0", "15" };
double[] ref_pt_extrude = { 0.0, 0.0, 0.0 };
double[] direction_extrude1 = { -1.0, 0.0, 0.0 };
theUfSession.Modl.
sketch2/*Массив объектов выдавливания*/,
taper_angle/*Угол уклона*/,
limit_extrude1/*Начало и
ref_pt_extrude /*базовая точка*/,
direction_extrude1/*
FeatureSigns.Positive/*
out body1);
theUfSession.Modl.
theSession.DisplayManager.
//СОЗДАНИЕ ФАСОК И СКРУГЛЕНИЙ
Tag feat1 = body1[0];
Tag objTag1;
Tag[] edgeArray1;
int edgeCount;
Tag obj_id_camf;
Tag[] list1;
theUfSession.Modl.AskFeatBody(
theUfSession.Modl.
theUfSession.Modl.
ArrayList arrList1 = new ArrayList();// Массивы ребер для создания скруглений и фасок:
for (int ii = 0; ii < edgeCount; ii++)// Перебор ребер детали:
{
Tag edge;
theUfSession.Modl.AskListItem(
if (ii == 5)
{
arrList1.Add(edge);
}
}
list1 = (Tag[])arrList1.ToArray(
// Параметры фаски:
string offset1 = "1";
string offset2 = "1";
string ang = "45";
// Создание фаски.
theUfSession.Modl.
}
/*----------------------------
void bolt2()
{
Tag squares1;
string name1 = "bolt2";
int units1 = 1;
theUfSession.Part.New(name1, units1, out squares1);
double[] point_A1 = { 0.0, 0.0, 0.0 };
double[] point_A2 = { 0.0, 13.0, 0.0 };
double[] point_A3 = { 70.0, 13.0, 0.0 };
double[] point_A4 = { 70.0, 0.0, 0.0 };
/*double[] point_B1 = { 0.0, -18, 10.3923 };
double[] point_B2 = { 0.0, 0.0, 20.7846 };
double[] point_B3 = { 0.0, 18, 10.3923 };
double[] point_B4 = { 0.0, 18, -10.3923 };
double[] point_B5 = { 0.0, 0.0, -20.7846 };
double[] point_B6 = { 0.0, -18, -10.3923 };*/
/* double[] point_C1 = { -15.0, 18, 0.0 };
double[] point_C2 = { -15.0, (18 + 5), 0.0 };
double[] point_C3 = { -(15 - 3), (18 + 5), 0.0 };*/
UFCurve.Line line_A1 = new UFCurve.Line();
UFCurve.Line line_A2 = new UFCurve.Line();
UFCurve.Line line_A3 = new UFCurve.Line();
UFCurve.Line line_A4 = new UFCurve.Line();
UFCurve.Line line_B1 = new UFCurve.Line();
UFCurve.Line line_B2 = new UFCurve.Line();
UFCurve.Line line_B3 = new UFCurve.Line();
UFCurve.Line line_B4 = new UFCurve.Line();
UFCurve.Line line_B5 = new UFCurve.Line();
UFCurve.Line line_B6 = new UFCurve.Line();
UFCurve.Line line_C1 = new UFCurve.Line();
UFCurve.Line line_C2 = new UFCurve.Line();
UFCurve.Line line_C3 = new UFCurve.Line();
line_A1.start_point = new double[3];
line_A1.end_point = new double[3];
line_A2.start_point = new double[3];
line_A2.end_point = new double[3];
line_A3.start_point = new double[3];
line_A3.end_point = new double[3];
line_A4.start_point = new double[3];
line_A4.end_point = new double[3];
line_B1.start_point = new double[3];
line_B1.end_point = new double[3];
line_B2.start_point = new double[3];
line_B2.end_point = new double[3];
line_B3.start_point = new double[3];
line_B3.end_point = new double[3];
line_B4.start_point = new double[3];
line_B4.end_point = new double[3];
line_B5.start_point = new double[3];
line_B5.end_point = new double[3];
line_B6.start_point = new double[3];
line_B6.end_point = new double[3];
line_C1.start_point = new double[3];
line_C1.end_point = new double[3];
line_C2.start_point = new double[3];
line_C2.end_point = new double[3];
line_C3.start_point = new double[3];
line_C3.end_point = new double[3];
for (int i = 0; i < 3; i++)
{
line_A1.start_point[i] = point_A1[i];
line_A1.end_point[i] = point_A2[i];
line_A2.start_point[i] = point_A2[i];
line_A2.end_point[i] = point_A3[i];
line_A3.start_point[i] = point_A3[i];
line_A3.end_point[i] = point_A4[i];
line_A4.start_point[i] = point_A4[i];
line_A4.end_point[i] = point_A1[i];
/*line_B1.start_point[i] = point_B1[i];
line_B1.end_point[i] = point_B2[i];
line_B2.start_point[i] = point_B2[i];