LDraw.org Discussion Forums

Full Version: LSynth result dependent on absolute position
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Consider this simple file:

Code:
0 SYNTH BEGIN ELECTRIC_CABLE 7
0 SYNTH SHOW
1 1 40 10 0 0 1 0 -1 0 0 0 0 1 LS04.dat
1 1 10 0 0 0 1 0 -1 0 0 0 0 1 LS04.dat
1 1 0 0 0 0 1 0 -1 0 0 0 0 1 LS04.dat
0 SYNTH END

0 SYNTH BEGIN ELECTRIC_CABLE 7
0 SYNTH SHOW
1 1 40 10 500 0 1 0 -1 0 0 0 0 1 LS04.dat
1 1 10 0 500 0 1 0 -1 0 0 0 0 1 LS04.dat
1 1 0 0 500 0 1 0 -1 0 0 0 0 1 LS04.dat
0 SYNTH END

The two portions are exactly the same, the second is just displaced +500z. When processed with LSynth, however, the first portion generates only 24 lines, while the second generates 2911 lines!

I guess this is due to rounding errors and matrix transformations being referred always to (0,0,0), but can it be fixed (other than by splitting the code in two parts)?
You could presumably move the synthesized part into a subfile, and then offset the generated subfile by +500z. If your main file is an MPD, this shouldn't be too difficult. Otherwise, you'll have to keep the subfile around next to your main file.
Though late, when using your file on my installation I get the same results for both sections.

Gerald