How to determine whether a file is a part or a subpart
2015-06-28, 20:49 (This post was last modified: 2015-06-29, 4:23 by Travis Cobbs.)
2015-06-28, 20:49 (This post was last modified: 2015-06-29, 4:23 by Travis Cobbs.)
Is there a way to definitively know whether a particular .ldr or .dat file is a full part as opposed to a subpart or primitive? I'm writing an online LDraw visualizer using three.js, and one feature I'd like to add is an animation of the model "blowing up" - all of the pieces coming apart and falling to the floor. In order to do this, I'll need to know which definitions are linked and which aren't (i.e., I don't want the studs coming off the bricks).
My first thought is to assume that all subfile references in the root .ldr file are their own parts. However, I'm not sure if this is a reasonable assumption to make (this would do strange things if one was viewing a part directly, like a 2x4 brick (3001.dat) ).
Being able to identify individual parts will also help with seam width calculations.
My first thought is to assume that all subfile references in the root .ldr file are their own parts. However, I'm not sure if this is a reasonable assumption to make (this would do strange things if one was viewing a part directly, like a 2x4 brick (3001.dat) ).
Being able to identify individual parts will also help with seam width calculations.