Introduction
This program
is built up using Visual Basic 5 as a front end tool which contains
six menus for creating a drawing, feature extraction and recognition,
code generation view, help and quit. The program has four modules. The
first module opens up in AutoCAD, which is a drafting package. The second
module is for extraction of the features of the drawing drawn in AutoCAD
and the program in C also recognizes the features extracted. The third
module uses the features and generates a CNC code for FANUC system only
for rotating parts and the fourth module gives the toll path simulation
in C graphics. A database for the tool and work material combination
using WIDIA Standards is also provided to the user of the software.
Feature
Extraction
The 2-D
feature extraction is done by interpretation of the DXF files. These
DXF files are one of the CAD interfaces available for interpretation
of the drawings. The DXF file contains the details of the drawings in
the form of specific codes, which are read and interpreted. These DXF
files form the input to the package for feature recognition of 2-D drawings.
The various steps to be followed in the extraction of features from
2-d drawings are given below.
To recognize
the entities present in the drawing viz. lines, circles and arcs the
DXF file is analysed by the ‘C’ program. In case if, the recognized
entity is a line, the starting and ending (X,Y) co-ordinates of the
line are noted. Depending upon the start and end (X,Y) co-ordinates,
the line status (i.e., horizontal, vertical or inclined) is determined
below.
• If, start
X - co-ordinate = end X - co-ordinate, then the line is vertical.
• If, start Y - co-ordinate = end Y - co-ordinate, then the line is
horizontal.
• If none of the above is true, then the line is inclined.
•
If the recoginsed entity is an arc, the aspects of arc, starting and
end angles, radius and center point are noted down. The extracted values
are for the figure 1.1 are tabulated in table 1.1 and table 1.2.
In order
to bring the line and arc on a common platform the start and end point
of an arc are calculated using trigonometric relations.
• Say A
is start angle & B is end angle
• Start X - co-ordinates = (radius * Cos A) + center point X - co-ordinate
• Start Y - co-ordinates = (radius * Sin A) + center point Y - co-ordinate
• End X - co-ordinates = (radius * Cos B) + center point X - co-ordinate
• End Y - co-ordinates = (radius * Sin B) + center point Y - co-ordinate