Fix Winding in DATHeader: Difference between revisions

From LDraw.org Wiki
Jump to navigation Jump to search
(Created page with "=How to fix a portion of wrong winding in a file with DATHeader= If you have for example a file where at some point the winding is changed: <pre> 0 BFC CW 1 16 5.899 86 -55.1...")
 
Line 37: Line 37:


Finished.
Finished.
 
--[[User:Mikeheide|Mikeheide]] ([[User talk:Mikeheide|talk]]) 14:17, 13 November 2012 (PST)
[[Category:HowTo]]
[[Category:HowTo]]

Revision as of 22:17, 13 November 2012

How to fix a portion of wrong winding in a file with DATHeader

If you have for example a file where at some point the winding is changed:

0 BFC CW
1 16 5.899 86 -55.174 1.029 -0.751882 0 0 0 2 1.1735 1 0 rect2p.dat
5 24 4.8702 88 -56.347 4.8702 84 -56.347 6.9282 88 -54 2.0705 88 -57.7273
5 24 6.9282 88 -54 6.9282 84 -54 4.8702 88 -56.347 10.9282 88 -47.0718
4 16 -4 88 -56.9282 -2.0706 88 -57.7274 -2.0521 88 -55.6382 -3 88 -55.1962
4 16 2.0706 88 -57.7274 4.8702 88 -56.347 3.6526 88 -54.7603 2.0521 88 -55.6382
4 16 4.8702 88 -56.347 6.9282 88 -54 5.1961 88 -53 3.6526 88 -54.7603
0 BFC CCW

Go to the Editor Tab. Mark the lines between both BFC statements. Click the right mouse button and choose from the context menu „Reverse Winding“.

You will got the following code:

0 BFC CW
1 16 5.899 86 -55.174 1.029 -0.751882 0 0 0 2 1.1735 1 0 rect2p.dat
5 24 4.8702 88 -56.347 4.8702 84 -56.347 6.9282 88 -54 2.0705 88 -57.7273
5 24 6.9282 88 -54 6.9282 84 -54 4.8702 88 -56.347 10.9282 88 -47.0718
4 16 -3 88 -55.1962 -2.0521 88 -55.6382 -2.0706 88 -57.7274 -4 88 -56.9282
4 16 2.0521 88 -55.6382 3.6526 88 -54.7603 4.8702 88 -56.347 2.0706 88 -57.7274
4 16 3.6526 88 -54.7603 5.1961 88 -53 6.9282 88 -54 4.8702 88 -56.347
0 BFC CCW

Now delete both BFC statement lines.

1 16 5.899 86 -55.174 1.029 -0.751882 0 0 0 2 1.1735 1 0 rect2p.dat
5 24 4.8702 88 -56.347 4.8702 84 -56.347 6.9282 88 -54 2.0705 88 -57.7273
5 24 6.9282 88 -54 6.9282 84 -54 4.8702 88 -56.347 10.9282 88 -47.0718
4 16 -3 88 -55.1962 -2.0521 88 -55.6382 -2.0706 88 -57.7274 -4 88 -56.9282
4 16 2.0521 88 -55.6382 3.6526 88 -54.7603 4.8702 88 -56.347 2.0706 88 -57.7274
4 16 3.6526 88 -54.7603 5.1961 88 -53 6.9282 88 -54 4.8702 88 -56.347

Now hit the "commit code changes" button. You can now save the file.

Finished. --Mikeheide (talk) 14:17, 13 November 2012 (PST)