Proposal for subpart naming practice/convention


Proposal for subpart naming practice/convention
#1
Hi,
Creating part using subparts is a great fundamental thing in the LDraw library. However, I found that there might be a little room for improvement with respect to subpart naming.

The `snn` suffix custom incremental naming is a good starting point, but when I looked at parts and their patterned versions, I found there is quite some ambiguity. This makes reusing existing subparts sometimes difficult and even impossible (e.g. when a subpart includes a part of the patterned area).

My suggestion would be to include a best practice where subparts have naming according to their place and/or orientation of the shapes.

Note: for the basic bricks and tiles this might not be needed, since these are mostly built up with primitives anyway.

But take, for example, the door part 92262. It generally has two sides where stickers or patterning could be applied (the front and the back). So these subparts of the model should be separated to provide an easy way to make patterned versions of this part. However, in this case, a small part of the patterned area is included in the top surface of the door. There are multiple ways to correct this or create new subparts, so that's not the issue. The issue is creators of parts might forget about possible future patterning when they divide their part into subparts. This is a great chance for improvement.

Entering my suggestion for naming subparts of possibly patterned parts:

File name suffix - Description
`s01` - Subparts containing a main collection (e.g. mirrorable part)
`sfnn` - Subparts containing the front facing part of a model
`sbnn` - Subparts containing back facing parts
..etc (`u` for upward facing, `d` for downward facing, `l` and `r` for left and right facing)

Alternatively, 'though less meaningful, the practice could be to use`sNn`, where:
N =
1 for main subparts
2 for top facing
3 for bottom facing
4 for front facing
5 for back facing
6 for left facing
7 for right facing
8 for misc (e.g. handles or other unprintable details)

In this practice it is not needed to subpart all these orientations, only the significant ones for that part.

In the case of the door part above, only top, bottom, front and back subparts would be needed. Since top and bottom are always the same within a part variation and only the front and back might have patterned versions to swap in.

To be clear, this would be a best practice and not a restriction. But including it in documentation might encourage more modular subparting with patterns in mind.

What do you think?
Reply
RE: Proposal for subpart naming practice/convention
#2
I created a small summary of the idea here: Subpart proposal
Feel free to comment or send suggestions.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)