RE: How do digital lego builders procedurally generate the positions of anti-studs?
2019-03-15, 1:33
2019-03-15, 1:33
(2019-03-14, 11:40)Lasse Boijens Wrote: So I was wondering, does anybody know how lego builders using LDraw assign the locations of all holes/anti-studs?
I'm building my own VR lego builder and getting the studs in is easy because there is a subfile for 'stud' which I can just detect and save the position of. However, since holes are not one subpart but rather the space in-between other subparts, I have no idea how to do this without going through brick-by-brick.
I presume that there must be some method of doing this since I highly doubt that the creators of programs like leocad/stud.io/ldd have taken the time to manually enter the locations for all the hundreds of thousands of anti-studs. I know that leocad is open source but unfortunately, due to my inexperience with the way that program is written, I am unable to find how it is handled there.
Does anyone happen to know how/if it can be done?
LDCad has a custom connections database for determining how parts should connect to each other. Your best bet is probably to support that (or at least a subset of that).