-
Notifications
You must be signed in to change notification settings - Fork 10
Home
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.
Make sure that you choose the right architecture for your OS and JVM (64bit or 32bit). Does my JVM support 64-bit?
- Download the zip-Archive from here. I recommend to use the 64-bit version, if possible.
- 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.
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.
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
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.
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.
| Keys | Action |
|---|---|
| Alt+Shift+R |
|
| 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 |
A double click on an item in the error list will highlight the line in the text editor.
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.
| Button | Action |
|---|---|
| Creates a new *.dat file | |
| Opens an existing *.dat file | |
| Undo (max. 100 steps) | |
| Redo | |
| Cut | |
| Copy | |
| Paste | |
| Delete | |
| Toggles the part error list visibility. | |
| Opens a standard search and replace dialog. The dialog uses the text editor tab which was last selected. | |
| 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. | |
| Splits selected quad lines (type 4) into triangles (type 3) | |
| Splits all quad lines (type 4) into triangles (type 3) and inlines all rect primitives | |
| Removes all duplicates and all invisible optional lines | |
| Inlines the selection with partial BFC conformity | |
| Inlines the selection recursively with partial BFC conformity and no comments and whitespace ("Deep Inline") | |
| Inlines the selection "linked" so that the inlined file can be automatically exported with the Subfile Compiler (see Features for the advanced user) | |
| Parses the file for !LPE INLINE meta commands and builds the subfiles automatically (see Features for the advanced user) | |
| Rounds the selection. |
|
| Toggles texmap geometry data meta command for the selected text !: | |
| Toggles the comment mask for the selected text | |
| 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 |
###!LPE INLINE
A click on 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 ENDTake 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_ENDAfter 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.
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 edit them in the 3D editor and transform them into a CSG model later on.
The general workflow will proceed as follows:
- Create basic shapes with the !LPE CSG_{Geom} ... meta command (of course {Geom} needs to be replaced by a valid shape)
- Modify the shapes with the set operations !LPE CSG_UNION, !LPE CSG_DIFFERENCE, !LPE CSG_INTERSECTION
- Compile the result with !LPE CSG_COMPILE ...
- Modify the shapes until your work is finished
- Inline the !LPE CSG_COMPILE meta command to generate the triangles
- Eliminate all T-junctions manually
Now we will create a model like this:
0 // CSG commands can be used in subfiles, too
0 // The identifiers are non-global and bound to the file / subfile
0 // It is possible to inline CSG commands from subfiles
0 BFC CERTIFY CCW
0 // Set the quality and epsilon value (optional)
0 // SYNTAX 0 !LPE CSG_QUALITY [3 to 48]
0 !LPE CSG_QUALITY 24
0 // SYNTAX 0 !LPE CSG_EPSILON [>=.0001]
0 !LPE CSG_EPSILON .0001
0 // Define the shapes
0 // SYNTAX 0 !LPE [CSG SHAPE] [ID] [COLOUR] [MATRIX]
0 !LPE CSG_CUBOID a 4 0 0 0 1 0 0 0 1 0 0 0 1
0 !LPE CSG_ELLIPSOID b 1 0 0 0 1.35 0 0 0 1.35 0 0 0 1.35
0 !LPE CSG_CYLINDER c 2 0 -1 0 .7 0 0 0 2 0 0 0 .7
0 !LPE CSG_CYLINDER d 2 -1 0 0 0 2 0 .7 0 0 0 0 .7
0 !LPE CSG_CYLINDER e 2 0 0 -1 .7 0 0 0 0 .7 0 2 0
0 // Modify the shapes
0 // SYNTAX 0 !LPE [CSG FUNCTION] [ID] [ID2] [ID3]
0 !LPE CSG_UNION c d d
0 !LPE CSG_UNION d e d
0 !LPE CSG_INTERSECTION a b f
0 !LPE CSG_DIFFERENCE f d f
0 // Compile for output
0 // SYNTAX 0 !LPE CSG_COMPILE [ID]
0 // The COMPILE command displays the CSG volume on the screen
0 // Inlining the following line will generate triangles of the CSG volume
0 !LPE CSG_COMPILE f
0 // E.g.
0 // Inlined: !LPE CSG_COMPILE f
3 4 -10 1.5752766 7.3133416 -10 1.5752766 8.313231 -10 3.3930404 7.6749177
3 4 -10 1.5752766 7.3133416 -10 -2.6084895 6.481139 -10 -2.6084895 7.9504156
3 4 -10 1.5752766 7.3133416 -10 -2.6084895 7.9504156 -10 9.094947E-16 8.866396CSG supports the following shapes
- CSG_CIRCLE
- CSG_CONE
- CSG_CUBOID
- CSG_CYLINDER
- CSG_ELLIPSOID
- CSG_QUAD
