[LSC] Coplanarity check tool

Philo philohome at free.fr
Wed Nov 21 09:38:18 EST 2007


I have created a little command line utility to check quad coplanarity
in LDraw files.

Get it here: http://philohome.com/xfer/Planar.zip
BTW: is it possible to send small attachments to this list?

Syntax is "Planar Threshold_Angle LdrawFile LdrawFileOut".

It will create an output file that contains a comment after each warped
quad, along with a triangle split suggestion, such as:

4 16 -1.95 22.67 97.23 -1.81 22.82 97.23 0 23 98.04 0 22.9 98.24
0 Angle 36.352018> 1.000000
0 Suggested split:
0 3 16 -1.950000 22.670000 97.230000 -1.810000 22.820000 97.230000
0.000000 22.900000 98.240000
0 3 16 -1.810000 22.820000 97.230000 0.000000 23.000000 98.040000
0.000000 22.900000 98.240000
0 5 24 -1.810000 22.820000 97.230000 0.000000 22.900000 98.240000
-1.950000 22.670000 97.230000 0.000000 23.000000 98.040000

The suggestion is commented out to induce a manual intervention...

It also report offending line numbers (in output file) to the console.

A nice file to test is 40386.dat, full of warped quads!

After you have a look and report bugs and suggestion, I'll publish it.

Philo




More information about the LSC mailing list