Rectifier version 1.9


Rectifier version 1.9
#1
When converting quads + lines into rect primitives, Rectifier sometimes provided values near but not equal to 1. I delved into my code and soon found a bug causing this behaviour... then found an even better method that provides tidier and more compact LDraw code.

Get new version 1.9.

Here is a sample output with Rectifier 1.8:
Code:
1 16 0 0 0 0 0 10 -1.73648 0.9848078 0 -9.84808 -1 0 rect.dat
1 16 30 -0.5 0 0 0 10 0.5 20 0 -10 1 0 rect.dat
1 16 -30 -0.555555 0 0 0 10 0.555555 0.9984604 0 -10 0.9999999 0 rect.dat
1 16 -60 -0.555555 1 0 0.005546911 10 0.555555 0.9984604 0 -10 0.9999999 -1 rect.dat
1 16 -90 -2.055555 1 0 -0.1427451 10 0.555555 0.9984604 1.5 -10 0.9999999 -1 rect.dat
1 16 -111.2485 -0.555555 -44.99815 3.827 -0.01610229 9.6215 0.555555 0.9985745 0 -9.2388 0.9999999 2.90295 rect.dat
And the output obtained with Rectifier 1.9:
Code:
1 16 0 0 0 0 0 10 -1.73648 1 0 -9.84808 0 0 rect.dat
1 16 30 -0.5 0 0 0 10 0.5 1 0 -10 0 0 rect.dat
1 16 -30 -0.555555 0 0 0 10 0.555555 1 0 -10 0 0 rect.dat
1 16 -60 -0.555555 1 0 0 10 0.555555 1 0 -10 0 -1 rect.dat
1 16 -90 -2.055555 1 0 0 10 0.555555 1 1.5 -10 0 -1 rect.dat
1 16 -111.2485 -0.555555 -44.99815 3.827 0 9.6215 0.555555 1 0 -9.2388 0 2.90295 rect.dat
In this example, LDraw code was shrunk at 37% with 1.8, it's now only 29%.
Note that there was nothing wrong with 1.8 result, as inlining back both versions gives exactly the same lines and quads.


Attached Files
.dat   source.dat (Size: 1.25 KB / Downloads: 0)
.dat   oldrect.dat (Size: 477 bytes / Downloads: 0)
.dat   newrect.dat (Size: 374 bytes / Downloads: 0)
Reply
Re: Rectifier version 1.9
#2
I will combine this into the next release of LETGui, that should be ready within the next four weeks.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)