RE: Mirroring
2020-12-22, 20:36 (This post was last modified: 2020-12-22, 20:37 by Roland Melkert.)
2020-12-22, 20:36 (This post was last modified: 2020-12-22, 20:37 by Roland Melkert.)
(2020-12-22, 2:16)Don Heyse Wrote: I don't actually know the LDCAD MIRROR_INFO format, but I suspect it fits the bill.
Back in 2004 there was an .ini file with a a single line per part containing a transformation matrix and a few options that might include a substitute part. But many parts needed no special instructions and thus were not in the .ini file. One extra line added to some files doesn't seem like a huge burden for part authors, but perhaps more wrinkles to the mirror problem were discovered in the meantime?
Anyhow, I guess a shadow library with extra metas is an adequate solution, so maybe I'll see if I still have the math skills to participate. Is the LDCAD MIRROR_INFO meta documented? I didn't see it listed here http://www.melkert.net/LDCad/tech/meta Meanwhile, for historical reference purposes, I stashed the ancient mirror.ini file and test program in the ldglite github repository.
I did not now about the .ini.
The LDCad mirror hint is reasonable simple it has 6 parameters, namely
baseFlip
This indicates the part space axis to be flipped in order to prevent a negative determinant, this is usually X as most LDraw parts are symmetrical in that direction.
corOri
This is the orientation of the part as it would be to make it its own mirrored counterpart using the baseFlip as the mirroring axis.
counterPart
self -> Indicates only corOri should be used.
auto -> LDCad will try to find a counterpart automatically using the description (replaces left with right etc).
some.dat -> Indicates a static counterpart
posCor
Indicates the mirroring center.
inheritable
true/false, indicated if higher parts using this .dat will inherit the mirroring information or not.
I will add this to the tech doc at some point, I'm a bit behind on that