Автор работы: Пользователь скрыл имя, 05 Февраля 2015 в 18:11, курсовая работа
На настоящий момент САПР становятся обязательной частью любой производственной экономической деятельности. Они помогают обеспечить жизнеспособность фирмы и дают ей возможность развиваться в нынешних условиях жесткой рыночной конкуренции. Основной вклад подобных систем состоит в следующем:
- повышение качества продукции за счет сокращения ошибок в конструкторских и технологических расчетах, удобства внесения инженерных изменений и контроля качества;
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 == 0) ||(ii==1))
{
arrList1.Add(edge);
}
}
list1 = (Tag[])arrList1.ToArray(
// Параметры фаски:
string offset1 = "1";
string offset2 = "1";
string ang = "45";
// Создание фаски.
theUfSession.Modl.
}
/*----------------------------
void gayka2()
{
Tag squares1;
string name1 = "gayka2";
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 = { -15.0, 13.0, 0.0 };
double[] point_A4 = { -15.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;
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.CreateExtrud
sketch2/*Массив объектов выдавливания*/,
taper_angle/*Угол уклона*/,
limit_extrude1/*Начало и
ref_pt_extrude /*базовая точка*/,
direction_extrude1/*Направлени
FeatureSigns.Nullsign/*
out body1);
theUfSession.Modl.
theUfSession.Modl.
theSession.DisplayManager.
}
/*----------------------------
void vint()
{
Tag squares1;
string name1 = "gayka";
int units1 = 1;
theUfSession.Part.New(name1, units1, out squares1);
}
/*----------------------------
void gayka()
{
Tag squares1;
string name1 = "gayka";
int units1 = 1;
theUfSession.Part.New(name1, units1, out squares1);
double[] point_A1 = { 0.0, 0.0, 0.0 };
double[] point_A2 = { 0.0, 15.0, 0.0 };
double[] point_A3 = { -15.0, 15.0, 0.0 };
double[] point_A4 = { -15.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" };