QUESTION 1: Practicing Basic Commands of Pro/E
QUESTION 1: Practicing Basic Commands of Pro/E
QUESTION 1: Practicing Basic Commands of Pro/E
The first step in Pro/E is to select an axis and sketch one of the views. After finalizing one view further
actions can be taken on the model.
1) LINE TOOL
i) 2 point lines
ii) Line tangent to two entities
iii) 2 point centerline
2) RECTANGLE TOOL
3) CIRCLE TOOL
4) ARC TOOL
It is used to create arc or segment of a circle and offers the following options:
i) 3 point arc
ii) Concentric arc
iii) Arc by center and end points
iv) Arc tangent to 3 entities
v) Conic arc
5) FILLET TOOL
It helps us to create a fillet between two entities and offers the following options:
It helps us create a spline curve which is a curve passing through a number of control points.
7) Co-ordinate TOOL
It helps us deal with the coordinates and has the following options:
i) Create point
ii) Create a reference coordinate system
8) Dimension Tool
It helps extrude an entity or in other words extend the view in a direction normal to the view to
create a solid model.
It helps us create a solid section joining two surfaces of unequal dimensions or geometry.
It is used to quickly create ribs which join two entities by filling the gap between a line and a
solid with a thick surface.
2) Select front plane->sketch. Draw a circle of dia 104 on the origin and another circle with dia = 48
with center along x-axis at.
2) Select line->draw a line of 150 units->draw another line at 60⁰ to this line of any length. Draw
another horizontal line at an offset of 60 units from the first line intersecting the second line.
From the origin draw a horizontal line to the left of length 265 units through the intersection
point. Trim off excess line parts. Draw another line from the end point of this line at an angle of
60⁰. Draw the arc and join the final line and trim off excess line parts.
3) Select mirror tool and select Y- axis as the mirror axis. Click ok.
2) Draw a line starting 7 units below origin, move 2.5 units to left, move 0.8 down, move left
0.8 units and move up 3 units.
3) Draw an arc tangent to the outer circle starting at the upper end point of line figure and
radius=6 units
5) Select the lines and the arc , select mirror and select the center line.
6) Choose dynamically thin entities and click on the sections of the circle to trim
8) Extrude by 20units.
Question 5:
1) Draw an arbitrary figure starting the line segment at the origin moving right and then
drawing a line at about 100⁰ to it upwards.
3) Select create circular fillet between two line segments and select the two line segments
and select the two line segments , set the arc radius explicitly to 45 units.
5) Draw a vertical line 105 units away from origin cutting the figure.
8) Select revolve-> revolve as solid->angle=360⁰ and thickness = 5units. It will produce the
desired shape.
Question 6:
DESIGN STEPS :
A)
1) Choose New->Part->Solid. Uncheck ‘use default template’ -> Ok->choose mmns_part_solid->ok.
2) Choose the front plane and click Sketch.
3) As the origin select the intersection of the axis and top surface.
4) Create half sketch of the profile as shown in section B-B.
5) Choose centerline, then choose the origin and create a vertical axis.
6) Click ok to indicate completion of sketch.
7) In the 3D window, select the sketch and click revolve->ok.
B) Flange Design
1) Choose axis->select the top surface and pressing control, select right plane->ok.
2) Choose Datum plane->select right plane , press ctrl, select axis ‘A3’ created earlier->specify angle of
rotation as 21.5⁰ -> ok.
3) Choose Datum plane ->select created plane DTM 1->specify offset as 10 mm.
4) Sketch->DTM 2. If asked for references choose required references.
5) With proper dimensioning sketch the section of the flange. Create a horizontal axis through the center of the
flange. Click ok.
6) Select the flange sketch->extrude->options-side1->to selected->select the conical surface->ok.
7) Choose hole->placement->choose top surface and flange axis->specify dia of hole->options->’to selected’-
>select internal surface of cone->ok
8) For coupling holes->hole->select top surface of flange->offset references->choose axis A4 and a% to
position to axis of 1 hole->click ok. Choose pattern=>axis->choose A5->specify angle as 90⁰ and o. of
instances as 4.
9) Follow a similar process for other flange.
1) With center of the circle of the vertical support as original, create a cross section (side view of the base
part) - click ok
3) Use the round tool to fillet the four vertical edges of the base to required radius.
4) Choose front plane->sketch->create the vertical support with a circle symmetrically->click ok->symmetric
extrude-> specify required width as ‘36’.
1) Select right plane->sketch->create the line or directional profile that defines the rib; For the right rib
create a line, select tangency constraint between the lines and the circular parts->also select co-incidence
between these parts->exit sketcher by clicking ok.
2) Select profile rib->select Created line ->choose appropriate direction of arrow->specify the width of rib as
‘18’-> click ok.
1) Select the top surface of the base->sketch->create the two holes and the rectangle for material removal ->
click ok
2) Choose extrude->remove material , Select created sketch->options->up to surface->select the lower surface
of the base->click ok.
QUESTION 8:
1) Create the conical part in a sketch in the right plane. It consists of a cylindrical part and a conical part->the
base radius of cone is as specified. Create a vertical axis through the origin->click ok
3) Now to create the flat bas create a datum plane. Choose top surface of part->datum plane->offset ‘73mm’
below top->ok.
4) On the newly created plane, create the section of the horizontal base leaving a central hole of diameter-
base diameter of cone-> click ok.
2) Insert->sweep->helical Sweep->cut
III) Holes
1) Choose right plane->sketch->draw the circular profile according to dimensions given. Create an axis a
distance equal to the radius of the tubular section->click ok
1) Create a datum plane at an offset of 165 mm from the end of the pipe.
2) Select the datum plane->sketch->create the profile of the extruded pipe ( φ 20 & φ50)->ok
1) New-> Assembly->design->ok
Assembly:
2) To assemble the curved fitting mate the curved surface, the flat horizontal surfaces and one outside surface
with the flat vertical surface of the fixed base.
3) To assemble the washer, align the axes of the 2 holes of the washer with the axes of the two holes of the
base part. Mate the 2 surfaces.
4) To assemble the nuts and bolts -> align the axes of the nuts and bolts with the axes of the holes and mate
the required surfaces.
Q11. Implementation of DDA algorithm for drawing a line.
->
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
#include<dos.h>
#include<iostream.h>
#include<math.h>
void DD_Line(int x1,int y1,int x2,int y2);
void main(void)
{
int x1,x2,y1,y2,maxx,maxy;
maxx=getmaxx();
maxy=getmaxy();
cin>>x1>>y1;
cout<<"Enter the coordinates of second point (X2,Y2) :->";
cin>>x2>>y2;
int driver=9,mode=2;
initgraph(&driver,&mode,"C:\\TC\\BGI");
outtextxy(250,10,"DD_Line Algo");
DD_Line(x1,y1,x2,y2);
rectangle(0,0,getmaxx(),getmaxy());
getch();
cleardevice();
getch();
closegraph();
}
void DD_Line(int x1,int y1,int x2,int y2)
{
float dx,dy,y,m,x;
int xtra1,xtra2,mark=2;
if(x1>x2)
{
xtra1=y1;y1=y2;y2=xtra1;
xtra2=x1;x1=x2;x2=xtra2;
printf("%d %d %d %d",x1,y1,x2,y2);
}
dx=x2-x1;
dy=y2-y1;
if (fabs(dx)>fabs(dy))
{
m=dy/dx;
y=y1;
for(x=x1;x<x2;x++)
{
putpixel(x,round(y),mark);
y=y+m;mark=5;
}
}
else
{
m=dx/dy;
x=x1;mark=3;
if(y1<y2)
{
for(y=y1;y<y2;y++)
{
putpixel(round(x),y,mark);
x=x+m;mark=6;
}
}
else
{
for(y=y1;y>y2;y--)
{
putpixel(round(x),y,mark);
x=x-m;mark=6;
}
}
}
}
int round(double y)
{
double fraction,integer;
fraction=modf(y,&integer);
if(fraction>=0.5)
return ((int)integer+1);
else
return ((int)integer);
}
Q12. Implementation of Bresenham’s algorithm for drawing line.
->
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
#include<dos.h>
#include<iostream.h>
#include<math.h>
void main(void)
{
int x1,y1,x2,y2;
cin>>x1>>y1;
cout<<"\n\nEnter the coordinates of second point (x2,y2):->";
cin>>x2>>y2;
int driver=9,mode=2;
initgraph(&driver,&mode,"C:\\TC\\BGI");
int round(double y)
{
double fraction,integer;
fraction=modf(y,&integer);
if(fraction>=0.5)
return ((int)integer+1);
else
return ((int)integer);
}
dy=y2-y1;
e_no=dy+dy;
e=e_no-dx;
e_inc=e-dx;
for(x=x1;x<x2;x++)
{
putpixel(x,y,col);
if(e<0)
{e=e+e_no;}
else
{
y=y+1;
e=e+e_inc;
}
}
}
Q13. Draw a circle using midpoint circle algorithm.
->
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<graphics.h>
void plotpoints(int xc,int yc,int x,int y)
{
putpixel(xc+x,yc+y,15);
putpixel(xc-x,yc+y,15);
putpixel(xc+x,yc-y,15);
putpixel(xc-x,yc-y,15);
putpixel(xc+y,yc+x,15);
putpixel(xc-y,yc+x,15);
putpixel(xc+y,yc-x,15);
putpixel(xc-y,yc-x,15);
}
void circlemid(int xc,int yc,int r)
{
int p,x,y;
x=0;
y=r;
plotpoints(xc,yc,x,y);
p=1-r;
while(x<y)
{
x++;
if(p<0)
p=p+2*x+1;
else
{
p=p+2*(x-y)+1;
y--;
}
plotpoints(xc,yc,x,y);
}
}
void main()
{
clrscr();
int xc,yc,r;
int gdriver,gmode;
gdriver=DETECT;
initgraph(&gdriver,&gmode,"c:\\tc\\bgi");
textcolor(RED);
cout<<"enter the center and radius:";
cin>>xc>>yc>>r;
setcolor(4);
circlemid(xc,yc,r);
getch();
}
Q14. Implementation of Cohen Sutherland line clipping algo to clip the line outside window
boundary.
->
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <graphics.h>
#define MAX 20
outcode oc = 0;
if (y > ymax)
oc |= TOP;
else if (y < ymin)
oc |= BOTTOM;
if (x > xmax)
oc |= RIGHT;
else if (x < xmin)
oc |= LEFT;
return oc;
}
void cohen_sutherland (double x1, double y1, double x2, double y2,
double xmin, double ymin, double xmax, double ymax)
{
int accept;
int done;
outcode outcode1, outcode2;
accept = FALSE;
done = FALSE;
do
{
if (outcode1 == 0 && outcode2 == 0)
{
accept = TRUE;
done = TRUE;
}
{
double x, y;
int outcode_ex = outcode1 ? outcode1 : outcode2;
if (outcode_ex & TOP)
{
x = x1 + (x2 - x1) * (ymax - y1) / (y2 - y1);
y = ymax;
else
{
y = y1 + (y2 - y1) * (xmin - x1) / (x2 - x1);
x = xmin;
}
if (outcode_ex == outcode1)
{
x1 = x;
y1 = y;
}
else
{
x2 = x;
y2 = y;
outcode2 = compute_outcode (x2, y2, xmin, ymin, xmax, ymax);
}
}
} while (done == FALSE);
if (accept == TRUE)
line (x1, y1, x2, y2);
}
void main()
{
int n;
int i, j;
int ln[MAX][4];
int clip[4];
int gd = DETECT, gm;
cleardevice();
rectangle (clip[0], clip[1], clip[2], clip[3]);
for (i=0; i<n; i++)
{
cohen_sutherland (ln[i][0], ln[i][1], ln[i][2], ln[i][3],
clip[0], clip[1], clip[2], clip[3]);
getch();
}
closegraph();
}