1
0
mirror of https://github.com/kristov/ldraw2stl.git synced 2025-05-15 22:30:10 -07:00

7 Commits

Author SHA1 Message Date
ceade
9a0073a0c5 Hopefully better support for Windows users
I was concatenating paths together using the unix slash `/`. This change used
`File::Spec::catpath` instead, however I haven't been able to test it on Windows, and
there may be other path issues. Also note: without debugging on the user doesn't see when
files are not found (eg: due to path issues), so it silently creates an empty STL file.
2025-03-19 23:41:12 +01:00
jmerc77
fff3e76d36
a fix for flipped faces...
simple typo fix on line 216. funny enough, I found it accidentally.
2021-01-02 13:22:16 -05:00
ceade
708cca9627 Changes to handling BFC
There are two major changes here:

1) Previously I was inverting the winding of verticies only when calculating the normal. This was the wrong approach and I instead needed to invert the order of the verticies before calculating the normal. This is because most STL processing software (eg: Slic3r) will recalculate the normals based off the winding (correctly).

2) I *think* I am doing proper BFC handling now, although TBH the BFC handling logic in ldraw is super complex to me. See: https://www.ldraw.org/article/415 ("Rendering Engine Guidelines").
2020-05-03 02:34:13 +02:00
ceade
c05cf2c4da Attempt to fix incorrectly inverted sub-parts
There was bad behaviour if there were nested include files combined with a recursive invert flag, resulting in incorrect surface normals for sub-parts. For example try ldraw/parts/3020.dat before this commit. This is not the best way to solve the problem, but it may suffice for now. IMO the best way would be to "flip" the invert flag between states, rather than explcitely set it to 1 or 0. That way recursively setting invert would simply flip the flag.
2020-04-30 22:57:17 +02:00
ceade
ac0c4d00b8 Remove dependency on Moose
It was annoying to install tens of Perl modules for a few getters-setters.
2020-04-30 21:50:18 +02:00
Chris Eade
e3f34ac87b Add --debug flag for adding debug messages
Trying to track down a normals problem with studs on 3020.dat model.
2020-04-30 14:22:59 +02:00
ceade
b76f67e092 Initial commit 2017-08-19 18:30:12 +02:00