LDraw.org Discussion Forums
LDView -> POVray bug - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html)
+--- Thread: LDView -> POVray bug (/thread-1590.html)



LDView -> POVray bug - Tim Gould - 2011-11-28

Hi Travis,

Just to point you to a thread and solutions about a bug in your POVray export.

http://forums.ldraw.org/showthread.php?tid=1579&pid=1579#pid1579

Tim


Re: LDView -> POVray bug - Travis Cobbs - 2011-11-28

Thanks. I hadn't been on the board in a couple of days, and all sorts of stuff happens. I believe I have fixed this bug in my development code. Please try the LDView.exe inside this zip.

Note: while I wouldn't have posted the above link if I didn't want people to use it, please be aware that it is a development build based on my development source tree, and as such has not received nearly the amount of testing that an official release gets. So feel free to use it, and even report bugs you find in it, but if you do report bugs, be sure to include the full version number in the bug reports.


Re: LDView -> POVray bug - Tim Gould - 2011-11-28

Hi Travis,

I suspect your current code may still have problems because it will shift the sticker (since ay will be negative). I think the version of the macro I post will avoid this. Or the below.

Tim


Code:
#macro LDXSeamMatrix(Width, Height, Depth, CenterX, CenterY, CenterZ)
#local aw = 0;
#local ah = 0;
#local ad = 0;
#local ax = 0;
#local ay = 0;
#local az = 0;
#if (Width != 0)
#local aw = 1-LDXSW/Width;
#end
#if (Height != 0)
#local ah = 1-LDXSW/Height;
#end
#if (Depth != 0)
#local ad = 1-LDXSW/Depth;
#end
#if (Width != 0 & CenterX != 0)
#local ax = LDXSW/(Width / CenterX);
#end
#if (Height != 0 & CenterY != 0)
#local ay = LDXSW/(Height / CenterY);
#end
#if (Depth != 0 & CenterZ != 0)
#local az = LDXSW/(Depth / CenterZ);
#end
#if (aw <= 0)
#local aw = 1;
#local ax = 0;
#end
#if (ah <= 0)
#local ah = 1;
#local ay = 0;
#end
#if (ad <= 0)
#local ad = 1;
#local az = 0;
#end
matrix <aw,0,0,0,ah,0,0,0,ad,ax,ay,az>
#end



Re: LDView -> POVray bug - Travis Cobbs - 2011-11-29

Thanks. I'll take a look at the source code once I get home, and update it accordingly. (I assume you're OK with me putting your macro code into LDView's source.)


Re: LDView -> POVray bug - Tim Gould - 2011-11-29

Yes of course. Technically it's a derivative work of your macro so GPLd anyway.

Tim


Re: LDView -> POVray bug - Travis Cobbs - 2011-11-29

Here is a build that contains Tim's fix for my fix.


Re: LDView -> POVray bug - Philippe Hurbain - 2011-11-29

Travis,
I have an XP machine on which recent LDView versions crash (regular 4.1 works). I can launch it, open a file or use drag and drop on the opened LDView. But if I use "open with" or launch from LDDP, I get a crash (exception code 0xc000005, Flags=0, record=0, address=0). Windows diagnostic is not more detailed, but if I can help to locate this issue...???
Clearing the registry doesn't help - actually it's worse since I can't even open LDView.


Re: LDView -> POVray bug - Travis Cobbs - 2011-11-29

I'll contact you via email.