LDInstruction


LDInstruction version 0.1 documentation
#18
This post explains the currently (version 0.1) available options.
  • All options can be set in the InstructionHelper GUI.
  • All mcm values are milli-cm, i.e. a value of 1 is 0.001cm, 100 is 1mm and a value of 1000 is 1cm (because of OpenDocument standard).
  • Each model or sub-model starts with the default values (only global ones are for main model and all sub-models).
  • Setting an option does not affect any other option, the new value is used until the option is set again (no "start-end", only "from-here-on" behavior).
  • In the GUI, activate "overwrite" checkbox to set a value; the value entered in the box right of overwrite is used only if the overwrite checkbox is selected. If it is not selected, the greyed value in the left box is used.

Global parameter (prefix: "doc/") which can be set only once and may occur only in the first step of the main model:
  • doc/dpi: dpi; default: 150.
  • doc/width and doc/height: page width and height in mcm; default is 29700/2100 resulting in DIN A4 landscape.
  • doc/margin: margin in mcm; default: 1000.
  • doc/specialStuds: activate special studs with edge color for better contrast (default: 0 meaning "off").
  • doc/debugInfo: activate source and debug information for each step (default: 0 meaning "off").
  • doc/bgModel and doc/bgPli and doc/bgSub: hexadecimal rgb color value for model background (default CFEFFF light blue), part list inventory background (default BFDFFF darker light blue) and inline sub-model background (default FFF0CF light yellow).
Example:
Code:
0 !LDINSP INSTR [doc/dpi=150] [doc/width=29700] [doc/height=21000] [doc/margin=1000]
0 !LDINSP INSTR [doc/bgModel=CFEFFF] [doc/bgPli=BFDFFF] [doc/bgSub=FFF0CF]

Step rendering parameter (prefix: "step/") define options regarding layout and step.
  • step/skip: do not show this step (default: 0 meaning "show step").
  • step/noResult: skip the resulting step but not the included parts (default 0 meaning "show result").
  • step/noPli: do not draw the part list inventory (default: 0 meaning "show pli").
  • step/modelX and step/modelY: exact x/y offset of rendered model image in mcm or special values -1 meaning centered or -2 meaning right/bottom align (default: -1 meaning "center").
  • step/newPage and step/newColumn and step/newRow: start a new page/column/row for this step (default: 0 meaning no explicit page/column/row break).
  • step/maxColumns and step/maxRows: maximum columns/rows in the current layout container or special value 0 for automatic (default: 1 meaning exactly one step per page).
  • step/pliBoxMaxWidth: maximum width of part list inventory box in mcm or special value 0 for automatic size or -1 for model overlay (default: 0 meaning auto; GUI name: "step/pliBMW").
Example:
Code:
0 !LDINSP INSTR [maxWidth=23500] [maxHeight=19000]
0 !LDINSP INSTR [zoom=1]
0 !LDINSP INSTR [rotX=30] [rotY=45] [rotZ=0]
0 !LDINSP INSTR [shiftX=-2252] [shiftY=3201]
0 !LDINSP INSTR [highlight=1] [highlightRgb=00FF0000] [highlightWidth=2]

Inline sub-model parameter (prefix: "inl/") define options regarding inlined models:
  • inl/zoom: special inline zoom factor which is applied as factor.
  • inl/boxMaxWidth: maximum width of inlined sub-model box in mcm or special value 0 for automatic size or -1 for model overlay (default: -1 meaning overlay).
Example:
Code:
0 !LDINSP INSTR [inl/zoom=1.5]

Model rendering parameter (no prefix) and part list inventory rendering parameter (prefix: "pli/"):
  • maxWidth and maxHeight: width and height of rendered image in mcm (default for model: 20000 and 14000, default for pli: 5000 and 7000).
  • lineWidth: width of edge lines (default: 1).
  • shadeWeight: factor to shade colors depending on absolute angle (default: 5.4).
  • zoom: model zoom.
  • centerX and centerY and centerZ: move center of model before rendering in LDraw coordinates (default: all 0).
  • rotX and rotY and rotZ: rotate model before rendering in degrees (default: 30/45/0 for model, 30/-45/0 for pli).
  • shiftX and shiftY: move rendered model image in mcm (default: 0/0).
  • highlight and highlightRgb and highlightWidth: define highlighting for parts added in the current step if highlight=1: highlightRgb is hexadecimal color (default FF0000 red), highlightWidth is width of highlighting (default 1); if highlight=0 other parameters are ignored.
Example for model:
Code:
0 !LDINSP INSTR [maxWidth=23500] [maxHeight=19000]
0 !LDINSP INSTR [lineWidth=2]
0 !LDINSP INSTR [zoom=1.5]
0 !LDINSP INSTR [shiftX=3064] [shiftY=-1235]
0 !LDINSP INSTR [highlight=1] [highlightRgb=FF0000] [highlightWidth=4]
Example for pli:
Code:
0 !LDINSP INSTR [pli/maxWidth=9000] [pli/maxHeight=9000]
0 !LDINSP INSTR [pli/zoom=0.3]

Additionally, the first step of a sub-model may contain at most one of the following two parameters:
  • inline: add steps of this model as inlined sub-steps in an inline-sub-model-box.
  • aspart: treat this sub-model as part, do not add steps nor inline box.
Example:
Code:
0 !LDINSP INSTR [inline]

Colors can be defined with standard LDraw colour meta, example:
Code:
0 !COLOUR Black                                                 CODE   0    VALUE #1B2A34   EDGE #D0D0D0
0 !COLOUR Green                                                 CODE   2    VALUE #00852B   EDGE #D0D0D0
0 !COLOUR Dark_Bluish_Grey                                      CODE  72    VALUE #646464   EDGE #D0D0D0

Scoped pli-instructions define parameters for not-included (meaning: standard LDraw) parts, example:
Code:
0 !LDINSP INSTRSC [scope=2462.dat] [pli/rotY=0]
0 !LDINSP INSTRSC [scope=4186.dat] [pli/rotX=90] [pli/rotY=0]
Reply
« Next Oldest | Next Newest »



Messages In This Thread
LDInstruction - by Stefan Frenz - 2021-12-12, 13:09
RE: LDInstruction - by Philippe Hurbain - 2021-12-12, 20:05
RE: LDInstruction - by Stefan Frenz - 2021-12-13, 3:03
RE: LDInstruction - by Stefan Frenz - 2021-12-13, 7:06
RE: LDInstruction - by Philippe Hurbain - 2021-12-13, 10:02
RE: LDInstruction - by Stefan Frenz - 2021-12-13, 11:54
RE: LDInstruction - by Philippe Hurbain - 2021-12-13, 12:56
RE: LDInstruction - by Stefan Frenz - 2021-12-13, 13:27
update: LDInstruction - by Stefan Frenz - 2021-12-13, 15:47
RE: update: LDInstruction - by Stefan Frenz - 2021-12-14, 13:59
RE: LDInstruction - by Stefan Frenz - 2021-12-14, 15:00
RE: LDInstruction - by Stefan Frenz - 2021-12-14, 16:43
RE: LDInstruction - by Stefan Frenz - 2021-12-15, 22:01
RE: LDInstruction - by Stefan Frenz - 2021-12-15, 22:07
RE: LDInstruction - by Roland Melkert - 2021-12-15, 23:18
RE: LDInstruction - by Stefan Frenz - 2021-12-16, 8:21
LDInstruction version 0.1 - by Stefan Frenz - 2021-12-16, 13:00
LDInstruction version 0.1 documentation - by Stefan Frenz - 2021-12-16, 15:45
LDInstruction example - by Stefan Frenz - 2021-12-16, 16:10
LDInstruction howto - by Stefan Frenz - 2021-12-18, 8:09
LDInstruction version 0.2 - by Stefan Frenz - 2021-12-19, 18:37
RE: LDInstruction - by Philippe Hurbain - 2021-12-27, 17:10
RE: LDInstruction - by Stefan Frenz - 2021-12-27, 21:15
LDInstruction version 0.3 - by Stefan Frenz - 2021-12-30, 10:05
LDInstruction examples - by Stefan Frenz - 2022-01-07, 23:25
RE: LDInstruction - by Jaco van der Molen - 2022-01-15, 15:18
RE: LDInstruction - by Stefan Frenz - 2022-01-15, 15:46
update: LDInstruction - by Stefan Frenz - 2022-01-25, 14:23
update: LDInstruction - by Stefan Frenz - 2022-02-02, 16:46
RE: LDInstruction - by Stefan Frenz - 2022-02-02, 17:32
update: LDInstruction - by Stefan Frenz - 2022-03-05, 11:09
RE: LDInstruction - by Cam's Bricks - 2022-03-14, 18:18
RE: LDInstruction - by Stefan Frenz - 2022-03-14, 18:33
RE: LDInstruction - by Cam's Bricks - 2022-03-14, 18:52
RE: LDInstruction - by Stefan Frenz - 2022-03-14, 19:07

Forum Jump:


Users browsing this thread: 1 Guest(s)