Yes, it works great now, thanks for the fixes. I've checked in changes to include a zip file of your generated library with the exe instead of generating the fallback library myself, please let me know if you see any problems. Funny how in the end we could have just created the parts directly. :)
I made 2 small changes: Renamed stu-g1x1 to stud.dat and moved the primitives to the p folder. I needed that because I handle primitives differently, you can notice by how long it takes to load the 50x50 baseplate with and without those changes. On Thu, Sep 11, 2014 at 7:34 AM, Johannes Schauer <[email protected]> wrote: > Hi, > > Quoting Johannes Schauer (2014-09-11 11:16:16) > > most space seems to be wasted by the baseplates with large amounts of > studs. > > > > To solve it, I thought of creating a file stud2.dat which includes a 2x2 > array > > of stud.dat, a file stud4.dat which includes a 2x2 array of stud2.dat > and so on > > and so forth until stud32.dat. Then it would be easy to subdivide any > array of > > studs so that only very few lines of code are needed. > > I applied this optimization and the zip archive is now at 46K. Is that > small > enough for leocad? > > The biggest file in the zip archive is now the single stud itself. > > I can shave off another few bytes by optimizing the stud. Instead of > splitting > the top circle into 16 triangles like a cake, the 16-sided polygon can be > drawn > with just using one triangle and seven quadrilaterals, thus cutting the > amount > of needed primitives to draw the top circle by half. I wonder why this is > not > done for LDraw. Given the amount of studs that must be rendered by the > graphics > card for more complex models, it seems to make sense to apply this > optimization. > > cheers, josch >
_______________________________________________ Leocad mailing list [email protected] https://list.gerf.org/listinfo/leocad
