You are on page 1of 9

Solution of “Missing Facet” Problem

By

Dr. Vineet Srivastava


Problem: The facets are missing after Tessellation and
slicing in the .stl file
SOLUTION
Step 1: Checking for Approved Edges with adjacent
Facets
The checking routine executes as follows for FACET A
• Read the first edge (vertex 1-2) from STL file.
• Search the file for a similar edge in opposite direction.
• If the edge exists, store this under a temporary file
for approved edges.
• Do the same for the edges 2 & 3 in the given figure.
• Read the second edge (vertex 2-3) from STL file.
• Search the file for a similar edge in opposite direction.
• Perform the operation as in point c.
• Read the third edge (vertex 3-1) from STL file.
• Search the file for a similar edge in opposite direction.
• Perform the operation as in point c.

This process is repeated for the next facet until all the
facets have been searched.
Step 2: Detection of Gaps in the Tessellated Model
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
d) Read the edge (vertex 5-2) from STL file.
e) Search the file for a similar edge in opposite direction (vertex 2-5).
f) If the edge does not exist, perform the step (c) mentioned above.
g) Repeat the exercise for the edges 5-2: 7-5: 9-7: 11-9: 3-11.
h) Search the file for a similar edge in opposite direction i.e. 2-5: 5-7: 7-9: 9-11: 11-3
i) 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
Step 3: Sorting the Erroneous Edges into a Closed Loop
• 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

FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENTH EIGHTH NINTH


VERTEX
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
Step 4: Generation of Facets to Repair Gaps
• 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.
• 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
SECOND V2 V9 V9 V11 V11 V2
information about
THIRD V2 V5 V5 V9 V9 V2 facets, edges and
FOURTH V5 V7 V7 V9 V9 V5 vertices
THANK YOU

You might also like