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
