Skip to content
Nils Schmidt edited this page Apr 29, 2015 · 101 revisions

LDPartEditor User Manual (Work In Progress)


This manual does not cover all official LDraw specifications which were ratified by the LDraw Standards Commitee. If you want to start from the beginning, you should probably read the specifications first and gather some experience from the community forums to get started.

Becoming famliar with "part authoring", the creation of parts, is just like playing an instrument: it is a matter of talent, time and effort.

If you want to drop me a note, please create an issue here.

Version 0.8.0

Table of Contents

  1. Getting Started
  2. The Welcome Dialog
  3. The Text Editor
  4. The 3D Editor

1. Getting Started


Make sure that you choose the right architecture for your OS and JVM (64bit or 32bit). Does my JVM support 64-bit?

  1. Download the zip-Archive from here. I recommend to use the 64-bit version, if possible.
  2. Extract the archive content to the location of your choice
    • On windows, double-click "run.bat" to start LPE.
    • On linux/mac, you have to excecute the shell script "run.sh" to start LPE.

The application folder

Please note that this software is in the beta stage. Although, LPE 0.8.0 was carefully tested and developed, there are already known issues for this release. There is a potential risk of data loss.

Top

2. The Welcome Dialog


When you start LDPartEditor for the first time (or you had reset the configuration), you will see the "Welcome Dialog". In this dialog you can specify the path of your LDraw Library, your LDraw Parts Tracker Username and your Real Name. github markdown syntax highlighting Dialog on first start

Note: If you want to contribute to the official LDraw library as a part author you have to agree to release the Work under the Creative Commons Attribution License version 2.0 ("the CCAL"). More info here.

Additionally, you can set your part authoring folder and the folder for the unofficial parts library. The benefits of using a seperate library for unofficial parts are quite self-explanatory: You can't mess up the official library content with LDPartEditor.

Note: In the next release 0.8.1, the LDraw path and the unofficial path folder will be automagically filled if you had set the environment variable %LDRAWDIR% (Windows only)

When all paths are specified, you can hit the OK button. The program will load the primitives first and then it will parse the first line of each official library part. This will take some time and it is slower than parsing the parts.lst file, but it guarantees that you will see the actual library content.

Pro Tip: The application folder will contain a file named config.gz which stores your personal configuration. You can delete this file if you want to reset your settings. This may be neccessary if the 3D view is broken.

Information for beta testers: The file error_log may contain useful debug information for me as the lead developer of LDPartEditor.

Top

3. The Text Editor


The Text Editor

The text editor let you edit the content of a *.dat file.

Pro Tip: You can drag and drop the tabs on other text editor windows and rearrange their order.

Top

Text Editor Shortkeys:

Keys Action
Alt+Shift+R Sync Edit Edit vertex coordinates ("SyncEdit")
Esc Cancel "SyncEdit"
Alt+F Quick fix all issues in the selection
Ctrl+A Select all
Alt+I Inline selection
Alt+C Round selection
Ctrl+Z Undo
Ctrl+Y Redo
Ctrl+S Save

Top

Analysing Part Errors:

Double Click on Error

A double click on an item in the error list will highlight the line in the text editor.

Context Menu On Error

With a right click, you can open the context menu and trigger a quick fix.

Note: Not all errors and warnings can be fixed automatically. Some of them require human brainpower.

Top

Text Editor Buttons:

Button Action
New Dat Creates a new *.dat file
OpenDat Opens an existing *.dat file
Undo Undo (max. 100 steps)
Undo Redo
Cut Cut
Copy Copy
Paste Paste
Delete Delete
Toggle Error List Toggles the part error list visibility.
Find and Replace Opens a standard search and replace dialog. The dialog uses the text editor tab which was last selected.
Sort Sorts the text editor content by a custom criteria. You can set the scope to file or selection and you can sort by... 1. ...colour, ascending. 2. ...colour, descending. 3. ...type, ascending. 4. ...type, descending. 5. ...type and then colour, ascending. 6. ...type and then colour, descending. Pro Tip: The sorting process will not change the BFC winding or !TEXMAP definitions.
Split Quads Splits selected quad lines (type 4) into triangles (type 3)
Unrectifier Splits all quad lines (type 4) into triangles (type 3) and inlines all rect primitives
Duplicates Removes all duplicates and all invisible optional lines
Inline Inlines the selection with partial BFC conformity
Inline Deep Inlines the selection recursively with partial BFC conformity and no comments and whitespace ("Deep Inline")
Inline Linked Inlines the selection "linked" so that the inlined file can be automatically exported with the Subfile Compiler (see Features for the advanced user)
Compile Subfile Data Parses the file for !LPE INLINE meta commands and builds the subfiles automatically (see Features for the advanced user)
Round Rounds the selection. Rounding Settings You can customise the rounding settings by pressing Ctrl and clicking on this button
Toggle TEXMAP Toggles texmap geometry data meta command for the selected text !:
Toggle Comment Toggles the comment mask for the selected text
Palette Opens a dialog for choosing a colour for the selected text. Pro Tip: You can customise the colour palette by pressing Ctrl and clicking on a colour button

Top

Text Editor Features for the Advanced User

###!LPE INLINE

A click on Compile Subfile Data Compile linked Subfile Data parses the file for the special !LPE INLINE meta command. All data between !LPE INLINE and !LPE INLINE END is parsed as subfile data.

Syntax:

0 !LPE INLINE 1 [Colour Code] [Matrix] [Subfile Name]
0 !LPE INLINE END

!LPE INLINE can be nested.

0 !LPE INLINE 1 [Colour Code1] [Matrix1] [Subfile Name1]
0 !LPE INLINE 1 [Colour Code2] [Matrix2] [Subfile Name2]
0 !LPE INLINE END
0 !LPE INLINE 1 [Colour Code3] [Matrix3] [Subfile Name3]
0 !LPE INLINE END
0 !LPE INLINE END

Take a look at this snippet:

1 9 10 -4 10 1 0 0 0 -1 0 0 0 -1 myTestStud.dat
0 !LPE INLINE 1 14 0 -4 0 1 0 0 0 -1 0 0 0 -1 myTestStud.dat
0 Stud Tube Open without Outer Cylinder
0 Name: myTestStud.dat
0 Author: Nils Schmidt [BlackBrick89]
0 !LDRAW_ORG Unofficial_Primitive
0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt
0 BFC CERTIFY CCW
0 !HELP This stud is a "antistud" to be used like a underside stud,
0 !HELP but without the outer cylinder.
0 !HELP 1 47 0 0 0 1 0 0 0 1 0 0 0 1 stud4.dat
0 !HISTORY 2011-12-29 [PTadmin] Official Update 2011-02
1 7 0 0 0 2 0 0 0 -1 0 0 0 -2 4-4ring3.dat
0 BFC INVERTNEXT
1 14 0 -4 0 -6 0 0 0 4 0 0 0 -6 4-4cylc.dat
0 !LPE INLINE_END

After compiling this code, LDPartEditor creates a primitive file in your project location (inside the "P" folder), namely myTestStud.dat. Colour 14 will be replaced by colour 16. The content is also multiplied by the inverse of the original transformation matrix.

Top

!LPE CSG - Contructive Solid Geometry (CSG)

LDPartEditor has build-in CSG features. You can use CSG bodies by defining them with the text editor. I recommend to use basic LDraw primitives first (like box.dat and 8-8sphe.dat), so you can transform them into a CSG model later on.

The general workflow will proceed as follows:

  1. Create basic shapes with the !LPE CSG_{Geom} ... meta command (of course {Geom} needs to be replaced by a valid shape)
  2. Modify the shapes with the set operations !LPE CSG_UNION, !LPE CSG_DIFFERENCE, !LPE CSG_INTERSECTION
  3. Compile the result with !LPE CSG_COMPILE ...

4. The 3D Editor


The 3DEditor

Top

Clone this wiki locally