I am trying to figure out how to take Lego model files and get a list of all parts and how they connect. Ideally, I would get something akin to an edge list (https://en.wikipedia.org/wiki/Edge_list) so I can make a design structure matrix (https://en.wikipedia.org/wiki/Design_structure_matrix) showing how each part connects the others.
I have been looking at stuff, and the files appear to just store each part at a location and the programs state whether they collide or connect. I see that a lot of that information is kept in binary form, or lists the relative location of each connection part (such as stud2).
I am lost as to where to start. Worst case, I would have to do a giant for loop thing to check each part, the location of each other, and if it connects and how. That sounds computationally impossible for larger sets.
If you have any recommendations, please let me know.
If you're curious, this is one that I did manually. It is set 8045: the mini telehandler. You can see parts of the lift part and the fork.
I have been looking at stuff, and the files appear to just store each part at a location and the programs state whether they collide or connect. I see that a lot of that information is kept in binary form, or lists the relative location of each connection part (such as stud2).
I am lost as to where to start. Worst case, I would have to do a giant for loop thing to check each part, the location of each other, and if it connects and how. That sounds computationally impossible for larger sets.
If you have any recommendations, please let me know.
If you're curious, this is one that I did manually. It is set 8045: the mini telehandler. You can see parts of the lift part and the fork.