Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

29-03-2015

The checking routine executes as follows for FACET A


a) Read the first edge (vertex 1-2) from STL file.
b) Search the file for a similar edge in opposite
direction.
c) If the edge exists, store this under a temporary file
for approved edges.
d) Do the same for the edges 2 & 3 in the given figure.
e) Read the second edge (vertex 2-3) from STL file.
f) Search the file for a similar edge in opposite
direction.
g) Perform the operation as in point c.
h) Read the third edge (vertex 3-1) from STL file.
i) Search the file for a similar edge in opposite
direction.
j) Perform the operation as in point c.

This process is repeated for the next facet until all the
facets have been searched.

1
29-03-2015

The detection routine executes as follows


FOR FACET A
a) Read the edge (vertex 2-3) from STL file.
b) Search the file for a similar edge in opposite direction (vertex 3-2).
c) If the edge does not exist, store edge (vertex 3-2) in a temporary file (e.g. FILE C)
for suspected gaps bounding edges and store vertex 2-3 in another file (e.g. FILE
B1) for existing edges without adjacent facets.

FOR FACET B
a) Read the edge (vertex 5-2) from STL file.
b) Search the file for a similar edge in opposite direction (vertex 2-5).
c) If the edge does not exist, perform the step (c) mentioned above.
d) Repeat the exercise for the edges 5-2: 7-5: 9-7: 11-9: 3-11.
e) Search the file for a similar edge in opposite direction i.e. 2-5: 5-7: 7-9: 9-11: 11-3
f) If the edge does not exist, store edge in a temporary file (e.g. FILE C) for
suspected gaps bounding edges and store vertex in opposite direction in another
file (e.g. FILE B1) for existing edges without adjacent facets.

File B1 containing information about existing edges without adjacent facets


EDGE
VERTEX FIRST SECOND THIRD FOURTH FIFTH SIXTH
FIRST 2 7 3 5 9 11
SECOND 3 5 11 2 7 9

2
29-03-2015

• When the checking and storing of edges (both with and without adjacent
facets) are completed, a sort is carried out to group all the edges without
adjacent facets to form a complete loop.
• This closed loop would represent the gap detected and be stored in
another temporary file (e.g. FILE D) for further processing.
• Assuming all the “erroneous” edges are stored according to the detection
routine (see the figure in previous slide), then file C will appear as
EDGE

VERTEX FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENTH EIGHTH NINTH
FIRST 3 5 * 11 2 7 * 9 *
SECOND 2 7 * 3 5 9 * 11 *

• It can be observed that all the edges are unordered. Sort will be carried
out to group all the edges into closed loop. The resulting file (FILE D) will
be reflected as
FIRST SECOND THIRD FOURTH FIFTH SIXTH
EDGE EDGE EDGE EDGE EDGE EDGE
FIRST 3 2 5 7 9 11
VERTEX
SECOND 2 5 7 9 11 3
VERTEX

• GENERATION OF FIRST FACET: First two vertices (V2 & V3) in the first two
edges of file D are connected to the first vertex of last edge (V11) in file D.
This information is stored in file E. The facet is then checked for its
orientation using the information stored in file B1 and if it is correct, vertex
V3 will be temporarily removed from file D.
• GENERATION OF SECOND FACET: Of the remaining vertices in file D, the
previous second vertex (V2) will become first edge of file D. The second
facet is formed by connecting first vertex (V2) of first edge with last two
vertices in file D (V9 & V11). The facet is stored in file E. it is then checked
to confirm it its orientation is correct and if it is correct, vertex V11 is
temporarily removed from file D.
• GENERATION OF THIRD FACET: The third facet is formed by connecting
first vertex of first two edges (V2 & V5) with first vertices of last edge in file
D (V9). The facet is stored in file E. it is then checked to confirm it its
orientation is correct and if it is correct, vertex V2 is temporarily removed
from file D.

3
29-03-2015

• GENERATION OF FOURTH FACET: First vertices in the first edge (V5) of file
D is connected to the first vertex of last two edges edge (V7 & V9) in file D.
This information is stored in file E. Once the number of edges in file D is
less than 3 (THREE), the process of facet generation is terminated.

V3 V2 V5 V7 V9 V11
F1 1 2 - - - 3
F2 E 1 - - 2 3
GENERATION OF FACETS
F3 E 1 2 - 3 E
F4 E E 1 2 3 E

FIRST EDGE SECOND EDGE THIRD EDGE


GENERATED
FIRST SECOND FIRST SECOND FIRST SECOND
FACETS
VERTEX VERTEX VERTEX VERTEX VERTEX VERTEX File E containing
FIRST V3 V2 V2 V11 V11 V3 information about
SECOND V2 V9 V9 V11 V11 V2
THIRD V2 V5 V5 V9 V9 V2
facets, edges and
FOURTH V5 V7 V7 V9 V9 V5 vertices

You might also like