Panoramic PhotographyPhoto GalleryLego & PhotographyLego Mindstorms and TechnicMindstorms SensorsMindstorms NXTHome

 

 


    PlanarCheck, LDraw Quad Coplanarity Checker

    Version Française ici.

    PlanarCheck helps you verify that all quads of a part file are planar enough to fulfill LDraw.org Parts Tracker requirements. While a triangle is always flat, a quad may be warped. This can yield weird rendering results, as exemplified by the center square in the image above (though the effect is generally much less apparent, the center square is VERY distorted for illustration purpose...).

    Coplanarity verification was previously done using "Dist Coplanarity Check" and "Det Coplanarity Check" included in L3P or LDDP. Unfortunately these tools results were not simple to interpret, since Dist values are proportional to the size of the quad, and Det values are proportional to size3. PlanarCheck tries to overcome this issue by calculating the angle between the triangles composing the quad.

    The coplanarity error threshold default is 3°, and a warning is issued for quads whose non-coplanarity exceeds 1°.

    Download

      PlanarCheck package, including program for Windows, documentation, source files (Visual C++ 6.0), sample files.

      Note: Macintosh version (universal binary) courtesy of Jim DeVona.

    History

    • V1.1: Initial release

    Usage

    • The simplest way to use PlanarCheck is to drag and drop the LDraw file to check on a shortcut of the program. A Command Prompt window similar to the one below will open, showing the result.

    • Alternatively, you may also place a shortcut to PlanarCheck.exe in you SendTo folder (C:\Documents and Settings\<your_computer_user_name>\SendTo - warning, this folder is normally hidden!). Then right-click on the file to check and select SendTo > PlanarCheck context menu entry.
    • More conveniently, you may also set up PlanarCheck as an external program to LDDesign Pad (LDDP). See the LDDP options screenshot below.

      PlanarCheck can then be used on the currently active file in LDDP with the external tool icon:

    Advanced Usage

    • Launch a command prompt
    • Type the command line: PlanarCheck LdrawFile LdrawFileOut.
    • When an output file is specified, a quad splitting suggestion is added as a comment when angle exceeds warning threshold:
        4 11 10 0 0 10 0 10 20 0 10 20 0.5 0
        0 Angle 4.047210> 1.000000
        0 Suggested split:
        0 3 11 10 0 0 10 0 10 20 0 10
        0 3 11 10 0 0 20 0 10 20 0.5 0
        0 5 24 10 0 0 20 0 10 10 0 10 20 0.5 0
    • Threshold values can be modified if needed. Create a file named 'PlanarCheck.txt' containing angle warning value as the first line, angle error value as the second and place it in the same folder as 'PlanarCheck.exe'

       

    How PlanarCheck works

    • Input file is read and parsed
    • Each quad in the file is split into 2 triangles (there are two ways of doing that).
    • Angle between triangle planes is calculated for each triangle configuration.
    • The maximum value is compared to the various thresholds and counters incremented accordingly
    • If an output file is specified, a quad splitting suggestion is appended when angle exceeds warning threshold
    • A summary is displayed. 

      LDraw.org

       

Panoramic PhotographyPhoto GalleryLego & PhotographyLego Mindstorms and TechnicMindstorms SensorsMindstorms NXTHome