Correction of identical vertices

From LDraw.org Wiki
Revision as of 22:10, 21 April 2018 by Steffen (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Identical vertices can occur by using applications in part authoring process or by error if typing by hand. Possibilities for correction:

  • Linetype 2: If vertices 1 and 2 are identical - just delete that line
  • Linetype 3: If vertices 1 and 2 or 1 and 3 are identical - just delete that line
  • Linetype 4: If vertices 1 and 2 identical but 3 and 4 not identical and 1 and 3 not identical - change to triangle (linetype 3). If the quad can not be transformed to a valid triangle (there are 4 possible ways!) then delete that line
  • Linetype 5: If vertices 1 and 2 identical then delete that line

All other identical vertices should be inspected by human as it might be only an error in defining the vertices.

Below please find the content of a test file.

0 Identical Vertices Testfile
0 Name: identical-test.dat
0 Author: Michael Heidemann [mikeheide]
0 !LDRAW_ORG Unofficial_Part
0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt

0 !HELP This file should help to detect errors in software that corrects identical vertices
0 !HELP errors.

0 BFC NOCERTIFY

0 !CATEGORY Animal

2 2 10 0 0 -10 0 0
0 // the above line should stay.
0 // the following line should be deleted.
2 4 10 0 0 10 0 0
0 // the following line should stay.
3 2 10 0 0 0 0 10 20 0 0
0 // the following line should be deleted.
3 4 10 0 0 10 0 0 20 0 0
0 // the following line should stay.
4 2 10 0 0 10 0 10 -10 0 10 -10 0 0
0 // the following line should be transformed to triangle.
4 4 10 0 0 10 0 10 -10 0 10 10 0 0
0 // the following line should stay.
5 2 10 0 0 -10 0 0 0 0 10 0 0 -10
0 // the following line should be deleted.
5 4 10 0 0 10 0 0 0 0 10 0 0 -10
0 // the following line should stay.
5 2 10 0 0 -10 0 0 10 0 0 0 0 -10

--Mikeheide 10:03, 24 June 2011 (EDT)