LEGO® MINDSTORMS® and Technic®MINDSTORMS® EV3/NXTMINDSTORMS SensorsLEGO® technical dataLDrawMiscellaneous LEGO®VEX;LEGO® & PhotographyPanoramic PhotographyPhoto GalleryHome

 

 

     

    Edger

    Tutorial written by J.C. Tchang.

    Edger is a tool written in Java by Lee Gaiteri. It allows to create conditional lines between adjacent facets, and regular edge lines on outside (unmatched) facets.

     

Set of polygons, extracted from 2-4sphe.dat primitive.

After adding lines created by Edger. Lines on outside edge are white, conditional lines are dark. Only conditional lines placed on side of the shape are shown.

     

    Edger creates facet edges non adjacent to another facet with regular lines (type 2) in white colour (colour 15). They should not exist in a part, since it means that the shape is open. Generally it means a problem in the part, that's why they are coloured in white.

    Edger creates lines between adjacent facets as conditional lines (type 5). An edge must be shared between 2 and only two facets. Conditional lines are generated with standard edge colour (colour 24).
     

Image showing all facets.

Image showing all white edge lines on the side of the shape, and all grey conditional lines created with Edger.

 

    Download

    Edger is hosted here with Lee Gaiteri authorization.

      Edger package, with multi platform Java code and source, and this tutorial.

    Installation

    Edger being written in Java, a Java interpreter must be installed on your machine. It often comes with your favorite browser, you may also download it on Sun's website (or other).

    The program itself doesn't need to be installed to work. You only need to place

       edger.java
       edger.class

    in the same folder, foe example:

       c:\lego\edger

     

    Utilization

    Create a LDraw file containing the facets to be processed, triangles (type 3) and quads (type 4). Edger doesn't deal directly with primitives (type 1) that must be inlined with a program such as LDraw Design Pad (LDDP).

    Put this file in the same folder as Edger, for example c:\lego\edger.

    Open a "Command Prompt" window, then navigate to Edger folder. In our example, type the command cd c:\lego\edger, or if you are not a command line fan, type only cd followed by a space character, then from Windows explorer opened on Edger repertory, drag and drop folder icon located in the address bar into "Command Prompt" window, select this window then confim with 'enter' key. This is easier, especially if the folder uses long names.

    Enter then the command:
    java edger input_file.dat > output_file.dat
    example:
    java edger test.dat > edger_result.dat In the output file, you'll find a comment line:
    0 WRITE Unmatched edges
    possibly followed by outside lines (type 2) in colour 15, then another a comment line:
    0 WRITE Conditional edges
    followed by conditional lines of adjacent facets.

    You only need to insert lines contained in result file into your part file to complete the operation. Type 2 white lines are inseted only when needed.de type 1 suivant les besoins.

    Using Edger from LDraw Design Pad

    It is possible to use Edger from LDraw Design Pad by creating a edger.batfile containing:

       cd c:\lego\edger
       java edger %1 > %2\edger_result.dat
       copy %1 + %2\edger_result.dat %2\edger_result_plus.dat

    Note: the third line is optional, and edger.bat file must be placed in the folder pointed to by "Path & Filename:" field in dialog box shown below (here LDDP plugin folder).

    Then setup LDDP as follow:

    ...
    to be able to process current file.

    Once properly setup, you can launch Edger on the file opened in LDDP through the menu "Process/External Programs/User Defined Program/Edger" or using the user programs icon of the toolbar.

    Process result is obtained in file edger_result.dat, located in the same folder as the origin file. Thanks to the third line of edger.bat file, a file named edger_result_plus.dat is also created, containing the origin file with Edger created lines appended.

    Copyright

    (c) Lee Gaiteri

    •  Version 0.7: Conditional edges are not output if their reference points are on the same plane with the line.
    •  Version 0.6: Bug fix
    •  Version 0.5: Initial release. Checks for overlapping edges added.

    Tutorial and Adaptation : J.C. Tchang. English translation: Philo

     

LEGO® MINDSTORMS® and Technic®MINDSTORMS® EV3/NXTMINDSTORMS SensorsLEGO® technical dataLDrawMiscellaneous LEGO®VEX;LEGO® & PhotographyPanoramic PhotographyPhoto GalleryHome