LDInstruction


RE: LDInstruction
#8
(2021-12-13, 10:02)Philippe Hurbain Wrote: ...still struggling to understand how to go from raw 603 model to your nice single page modified version...

All changes are LDraw comments (type 0 lines) with "!LDINSP INSTR" or "!LDINSP INSTRSC" prefix. Every option is enclosed in brackets like [key=value]. Ordering or position of the corresponding line inside the step is not relevant, meaning: you can place every option for a step everywhere between the STEP/ROTSTEP lines. For convenience, the InstructionHelper GUI always places parameter changes at the top of the step and always in the same order, arranging corresponding options per line (e.g. "rotX" and "rotY" and "rotZ" are in one line and "step/maxColumns" and "step/maxRows" are in another line).

All parameters can be set with the GUI. No keyword has to be remembered or typed in. Smile

The following changes inside the official omr lead to the given example (downloadable here):
  • The main file has some global settings. Those are tagged with "doc/" (for the whole document) or "scope/" (options for a specific part that is not a sub-part of the current mpd file).
  • Each sub-model has container layout information (step/maxColumns=0 and step/maxRows=0 where "0" is the special value for "auto layout to fill page").
  • The torso with arms and hands is added as submodel, otherwise those five parts would be listed as separate parts in the pli of step 6.

In more detail:
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]
First line: render images with 150 dpi, define paper width 29700/21000 and paper margin 1000 (all sizes/lengths are given in milli-centimeter, here leading to 29.7cm width and 21.0cm height (DIN A landscape) and 1cm margin).
Second line: define background colors for model (light blue), part list inventory (darker light blue) and inlined sub-steps (light yellow).

Code:
0 !LDINSP INSTRSC [scope=3626ap01.dat] [pli/rotX=15] [pli/rotY=0]
0 !LDINSP INSTRSC [scope=3641.dat] [pli/rotY=45]
Both lines are scoped (it's tagged "INSTRSC" instead of "INSTR"), each line must contain exactly one scope parameter. In those two lines, the rotation in the part list inventory (therefore keys start with "pli/") for parts 3626ap01 (head with pattern) and 3641 (wheel) is changed.

Code:
0 !LDINSP INSTR [zoom=2]
0 !LDINSP INSTR [centerX=15.58] [centerY=-7.841] [centerZ=57.228]
0 !LDINSP INSTR [rotX=30] [rotY=45] [rotZ=0]
0 !LDINSP INSTR [step/noPli=1]
0 !LDINSP INSTR [step/modelX=-2] [step/modelY=-1]
0 !LDINSP INSTR [step/maxColumns=0] [step/maxRows=0]
All lines change the rendering parameter (no prefix) or the layout ("step/" prefix) of all following steps in this sub-file. Each sub-file starts with the default parameter set. Notable parameters here are
  • step/noPli: if set to 1, the step will have no part list inventory (default 0 means "show pli")
  • step/modelX=-2 and step/modelY=-1: place the model horizontally right aligned and vertically centered (0..n is fixed offset, -1 means "center", -2 means "right"/"bottom")
  • step/maxColumns=0 and step/maxRows=0: either give a positive number as maximum cols/rows per page, or (indepently) value 0 means "auto".

The sidecar sub-file has
Code:
0 !LDINSP INSTR [step/modelX=-2] [step/modelY=-1]
0 !LDINSP INSTR [step/maxColumns=0] [step/maxRows=0]
0 !LDINSP INSTR [inl/zoom=1.5]
The first two lines are explained above, the last line sets zoom for the inlined step to 1.5 (all values may be integer, some values like zoom may be floating point values). In the sidecar sub-file step 3 and 4 have rotation information: step 3 sets "[rotX=-30] [rotY=45] [rotZ=0]", and starting from step 4 I wanted to have back default rotation, so I had to set "[rotX=30] [rotY=45] [rotZ=0]". Setting rotZ is optional as it is not changed neither in step 3 nor step 4.

The wheel sub-file has
Code:
0 !LDINSP INSTR [inline]
0 !LDINSP INSTR [step/modelX=-2] [step/modelY=-1]
0 !LDINSP INSTR [step/maxColumns=0] [step/maxRows=0]
The last two lines are explained above, the first line sets this complete sub-file as "inline", so on usage it will not add separate steps but instead will add an inline box in the using step.

The added body sub-file has another sub-file flag
Code:
0 !LDINSP INSTR [aspart]
This tells the instruction processor to treat the whole sub-file as single part.
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 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)