Вы находитесь на странице: 1из 26

Automobile/ PHCET CAD/CAM/CAE

Mahatma Education Society's

Pillai HOC College of Engineering and Technology


Department of Automobile Engineering

Subject: CAD/CAM/CAE Sem:VII

LIST OF EXPERIMENTS

1. 3D modelling of Drill jigusing solidworks


2. 3D modelling of Tool Holder using solidworks
3. 3D modelling of Non-return valve 1 using solidworks
4. 3D modelling of Non-return valve 2 using solidworks
5. 3D modelling of Steam Stop Valve using solidworks
6. 3D modelling of Piston
7. drawing Programming assembly using solidworks
8. Line in C ( DDA and Bresenhams)
9. Programming on Curves (Hermite, Bezier)
10. C++ Programming for 2D and 3 D Transformations
11. G-Code, M-code and APT Part programming

Subject Incharge: I/C HOD


Mr.VaibhavBhagat Mr.Vijay Dhadke

Mr.VaibhavBhagat Page 1 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.1 :

Mr.VaibhavBhagat Page 2 of 26
Automobile/ PHCET CAD/CAM/CAE

Figure shows details and assembly of drill jig, Make 3D part


modelling, assembly and drafting in solidworks.

Mr.VaibhavBhagat Page 3 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 4 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.2 :
Figure shows details and assembly of Tool Holder , Make 3D part
modelling, assembly and drafting in solidworks

Mr.VaibhavBhagat Page 5 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 6 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.3 :
Figure shows details and assembly of Non-return valve, Make 3D
part modelling, assembly and drafting in solidworks.

Mr.VaibhavBhagat Page 7 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 8 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.4 :
Figure shows details and assembly of Non Return Valve, Make 3D
part modelling, assembly and drafting in solid works

Mr.VaibhavBhagat Page 9 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 10 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.5 :

Mr.VaibhavBhagat Page 11 of 26
Automobile/ PHCET CAD/CAM/CAE

Figure shows details and assembly of Steam stop Valve, Make 3D


part modelling, assembly and drafting in solidworks .

Mr.VaibhavBhagat Page 12 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 13 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.6 :
Figure shows details and assembly of Piston, Make 3D part
modelling, assembly and drafting in solidworks

Mr.VaibhavBhagat Page 14 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 15 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.7 :
Write a Cprogram for drawing line by DDA algorithm

DDA Algorithm
Digital Differential Analyzer (DDA) algorithm is the simple line generation
algorithm.

Step 1− Get the input of two end


points (X0,Y0)(X0,Y0) and (X1,Y1)(X1,Y1).
Step 2 − Calculate the difference between two end points.

dx = X1 - X0
dy = Y1 - Y0

Step 3 − Based on the calculated difference in step-2, you need to


identify the number of steps to put pixel. If dx >dy, then you need more
steps in x coordinate; otherwise in y coordinate.

if(absolute(dx)> absolute(dy))
Steps=absolute(dx);
else
Steps=absolute(dy);

Step 4 − Calculate the increment in x coordinate and y coordinate.

Xincrement = dx / (float) steps;


Yincrement = dy / (float) steps;

Step 5 − Put the pixel by successfully incrementing x and y coordinates


accordingly and complete the drawing of the line.

for(int v=0; v <Steps; v++)


{
x = x +Xincrement;
y = y +Yincrement;
putpixel(Round(x),Round(y));
}

Mr.VaibhavBhagat Page 16 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.8 :
Write a C program for drawing line by Bresenham algorithm

Step 1 − Input the two end-points of line, storing the left end-point
in (x0,y0)(x0,y0).
Step 2 − Plot the point (x0,y0).
Step 3 − Calculate the constants dx, dy, 2dy, and (2dy – 2dx) and get
the first value for the decision parameter as −

p0=2dy−dx
Step 4 − At each Xkalong the line, starting at k = 0, perform the
following test −
If pk < 0, the next point to plot is (xk+1,yk)and
pk+1=pk+2dy

Otherwise,
(xk,yk+1)
pk+1=pk+2dy−2dx

Step 5 − Repeat step 4 (dx – 1) times.

For m > 1, find out whether you need to increment x while incrementing
y each time.

After solving, the equation for decision parameter Pk will be very similar,
just the x and y in the equation gets interchanged.

Mr.VaibhavBhagat Page 17 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.9 :
12.C++ Programming for2D and 3 D Transformations

2D Rotation.
#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
void rotate( int figure[], int edges, double angle, int cx, int cy )
{
int i;
double x, y;
doublecos_a = cos(angle);
doublesin_a = sin(angle);
angle = -1 * (angle*3.14/180);
for(i=0; i < edges; i++)
{
x = figure[2*i] - cx;
y = figure[2*i+1] - cy;
figure[2*i] = ceil( (x * cos_a) - (y * sin_a) + cx );
figure[2*i+1] = ceil( (x * sin_a)+(y * cos_a) + cy );
}
}
void main()
{
int i, figure[20], edges; // A Figure with Max 10 edges.
double angle;
intmax_y = getmaxy();
int cx=0, cy=0;
intgd = DETECT, gm;
initgraph(&gd, &gm, "c://tc//bgi" );
//clrscr();
// cleardevice();
printf( "Number of edges: " );

Mr.VaibhavBhagat Page 18 of 26
Automobile/ PHCET CAD/CAM/CAE

scanf( "%d", &edges );


for(i=0; i<edges; i++) {
printf( "Enter edge (x%d,y%d) : ", i , i );
scanf( "%d %d", &figure[2*i], &figure[2*i+1] ); }
figure[2*i] = figure[0];
figure[2*i+1] = figure[1];
edges += 1;
printf( "Enter angle of rotation in degrees: ");
scanf( "%lf", &angle);
printf( "Enter the center of rotation: \n");
printf( "cx: ");
scanf( "%d", &cx);
printf( "cy: ");
scanf( "%d", &cy);
cy = max_y - cy;
cleardevice();
setbkcolor(WHITE);
setcolor(GREEN);
setlinestyle(SOLID_LINE, 0, 3);
drawpoly( edges, figure );
//getch();
for( i=0; i < edges; i++)
figure[2*i+1] = max_y - figure[2*i+1];
rotate(figure,edges,angle,cx,cy);
for( i=0; i < edges; i++)
figure[2*i+1] = max_y - figure[2*i+1];
setcolor(RED);
drawpoly( edges, figure );
getch();
}

Mr.VaibhavBhagat Page 19 of 26
Automobile/ PHCET CAD/CAM/CAE

Output:

Mr.VaibhavBhagat Page 20 of 26
Automobile/ PHCET CAD/CAM/CAE

2D TRANSALTION
#include<graphics.h>

#include<stdlib.h>

#include<stdio.h>

#include<math.h>

void main()

intgraphdriver=DETECT,graphmode,errorcode;

int i;

int x2,y2,x1,y1,x,y;

printf("Enter the 2 line end points:");

printf("x1,y1,x2,y2");

scanf("%d%d%d%d",&x1,&y1,&x2,&y2);

initgraph(&graphdriver,&graphmode,"c:\\tc\\bgi");

line(x1,y1,x2,y2);

printf("Enter translation co-ordinates ");

printf("x,y");

scanf("%d%d",&x,&y);

x1=x1+x;

y1=y1+y;

x2=x2+x;

y2=y2+y;

printf("Line after translation");

line(x1,y1,x2,y2);

getch();

closegraph();

Mr.VaibhavBhagat Page 21 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 22 of 26
Automobile/ PHCET CAD/CAM/CAE

Experiment No.10:

Mr.VaibhavBhagat Page 23 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 24 of 26
Automobile/ PHCET CAD/CAM/CAE

Mr.VaibhavBhagat Page 25 of 26
Automobile/ PHCET CAD/CAM/CAE

Write a program in MPP and APT for profile milling of the above
part.

Mr.VaibhavBhagat Page 26 of 26

Вам также может понравиться