LDraw.org Discussion Forums

Full Version: Naming scheme for primitives - update
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
It seems that there is a need for updating the naming scheme that Primgen2 uses for the primitives.
Here my suggestion:
x, y, z are values that will be substituted by primgen2 for the dimension of the part.
cylinder: x-ycyli.dat : always use cyli
disc: x-ydisc.dat : always use disc
ndisc: x-yndis.dat : always use ndis
chord: x-ychrd.dat : always use chrd
cone: x-yconz.dat : always use con
ring:x-yringz.dat : always use ring
circle: x-yedge.dat : always use edge

The length of the filename is not important anymore because I think we will not reach 25 characters.

If this should be common used, I am going to change Primgen2 quickly.
I am inclined to agree. Would somebody have time to assess the scope of impact on existing official primitives (ldraw/p and ldraw/p/48)?

Thanks for bringing this up for discussion.
Analysis coming up. I can tell straight up, though, that changing 'rin' to 'ring' would be a massive change.
Yes, that is true. With LDFind I made a quick search for 'ring' and found:
Hi-Res Ring 40 x 0.2292 C:\ldraw\p\48\11-48r40.dat
Hi-Res Ring 42 x 0.0833 C:\ldraw\p\48\1-12ri42.dat
Ring 11 x 0.25 C:\ldraw\p\1-4rin11.dat
Ring 8 x 0.375 C:\ldraw\p\3-8ring8.dat

So for ring we have at least 'r', 'ri', 'rin' and 'ring' already in our library.

I believe that for the other primitives we will have similar results. So we need to solve this problem first.

I would go with:
Keep the already official files like they are. Introduce the new naming scheme quickly for new primitives.
Okay so, assuming we leave 'rin' files alone since there's just too many of those to even consider it IMO: I found 51 official primitives that would need renaming. A total of 25 part/subpart files would have to be updated accordingly:

List of primitives:
Code:
13-16chr.dat
48\11-24cyl.dat
48\11-24edg.dat
48\11-24r13.dat
48\11-24r52.dat
48\1-12co24.dat
48\1-12ri17.dat
48\1-12ri20.dat
48\1-12ri38.dat
48\1-12ri42.dat
48\1-12ri78.dat
48\11-48r19.dat
48\11-48r40.dat
48\1-16co11.dat
48\1-16co19.dat
48\1-16co20.dat
48\1-16co24.dat
48\1-16ri13.dat
48\1-16ri14.dat
48\1-16ri19.dat
48\1-16ri21.dat
48\1-16ri43.dat
48\1-24co10.dat
48\1-24co12.dat
48\1-24co14.dat
48\1-24co16.dat
48\1-24co24.dat
48\1-24ri11.dat
48\1-24ri19.dat
48\1-48ri43.dat
48\19-48edg.dat
48\2-4ri240.dat
48\3-16co19.dat
48\4-4ri100.dat
48\5-12ri13.dat
48\5-12ri14.dat
48\5-24co10.dat
48\5-24co12.dat
48\5-24co14.dat
48\5-24co16.dat
48\5-24ri10.dat
48\5-24ri17.dat
48\5-24ri18.dat
48\5-24ri20.dat
48\5-24ri24.dat
48\5-24ri28.dat
48\5-24ri29.dat
48\5-48co12.dat
48\5-48co29.dat
48\5-48ri32.dat
48\7-16ri16.dat

List of affected part files:
Code:
parts/2431pc0.dat
parts/2745.dat
parts/3942bp01.dat
parts/41667.dat
parts/43373.dat
parts/44224.dat
parts/4613.dat
parts/54715.dat
parts/59826ac01.dat
parts/6542a.dat
parts/84752.dat
parts/88492.dat
parts/88493.dat
parts/95188.dat
parts/99378.dat
parts/99551.dat
parts/s/10131s01.dat
parts/s/2431pt2b.dat
parts/s/2870s01.dat
parts/s/30535s01.dat
parts/s/3739a.dat
parts/s/43373s01.dat
parts/s/61481s00.dat
parts/s/86500s01.dat
parts/s/99010s01.dat
parts/u9166.dat

List of matches, sans duplicates (which parts referenced which primitives):
Code:
parts/2431pc0.dat:13-16chr.dat
parts/2745.dat:48\3-16co19.dat
parts/3942bp01.dat:48\1-24co10.dat
parts/3942bp01.dat:48\1-24co12.dat
parts/3942bp01.dat:48\1-24co14.dat
parts/3942bp01.dat:48\1-24co16.dat
parts/3942bp01.dat:48\5-24co10.dat
parts/3942bp01.dat:48\5-24co12.dat
parts/3942bp01.dat:48\5-24co14.dat
parts/3942bp01.dat:48\5-24co16.dat
parts/41667.dat:48\11-48r19.dat
parts/41667.dat:48\11-48r19.dat
parts/41667.dat:48\11-48r40.dat
parts/41667.dat:48\11-48r40.dat
parts/43373.dat:48\5-24ri24.dat
parts/44224.dat:48\1-16ri13.dat
parts/44224.dat:48\1-16ri14.dat
parts/4613.dat:48\5-12ri13.dat
parts/4613.dat:48\5-12ri14.dat
parts/54715.dat:48\1-16ri21.dat
parts/59826ac01.dat:48\2-4ri240.dat
parts/6542a.dat:48\4-4ri100.dat
parts/84752.dat:48\1-24co16.dat
parts/88492.dat:48\1-24ri11.dat
parts/88493.dat:48\11-24cyl.dat
parts/88493.dat:48\11-24edg.dat
parts/95188.dat:48\5-24ri20.dat
parts/95188.dat:48\5-24ri28.dat
parts/95188.dat:48\5-24ri29.dat
parts/99378.dat:48\5-48co12.dat
parts/99551.dat:48\1-16ri13.dat
parts/99551.dat:48\5-24ri20.dat
parts/s/10131s01.dat:48\5-24ri10.dat
parts/s/2431pt2b.dat:48\5-48ri32.dat
parts/s/2870s01.dat:48\11-24cyl.dat
parts/s/2870s01.dat:48\11-24edg.dat
parts/s/2870s01.dat:48\11-24edg.dat
parts/s/2870s01.dat:48\11-24r13.dat
parts/s/2870s01.dat:48\11-24r52.dat
parts/s/2870s01.dat:48\19-48edg.dat
parts/s/2870s01.dat:48\7-16ri16.dat
parts/s/30535s01.dat:48\11-24edg.dat
parts/s/30535s01.dat:48\5-24ri17.dat
parts/s/30535s01.dat:48\5-24ri18.dat
parts/s/3739a.dat:48\1-12co24.dat
parts/s/3739a.dat:48\1-12ri17.dat
parts/s/3739a.dat:48\1-12ri20.dat
parts/s/3739a.dat:48\1-12ri20.dat
parts/s/3739a.dat:48\1-12ri42.dat
parts/s/3739a.dat:48\1-24co24.dat
parts/s/43373s01.dat:48\1-16co24.dat
parts/s/61481s00.dat:48\1-16co19.dat
parts/s/61481s00.dat:48\1-16co20.dat
parts/s/86500s01.dat:48\1-12ri38.dat
parts/s/86500s01.dat:48\1-12ri78.dat
parts/s/99010s01.dat:48\1-16co11.dat
parts/s/99010s01.dat:48\1-16co19.dat
parts/s/99010s01.dat:48\1-16co20.dat
parts/s/99010s01.dat:48\1-16ri19.dat
parts/s/99010s01.dat:48\1-16ri43.dat
parts/s/99010s01.dat:48\5-48co29.dat
parts/u9166.dat:48\1-24ri19.dat
parts/u9166.dat:48\1-48ri43.dat
Why don't we create MOVEDTOs? Then all new parts will use the new scheme and all old parts will be fine until updated
That is actually not too bad. I can create the new files by renaming the existing ones, so please don't start submitting replacements.

I'd like to leave "~Moved to" files in place so that we don't have to fix all the official parts/subparts in one tranche. It is inevitable that when the parts get re-cycled through the Parts Tracker, someone will want to make improvements which could hold up the whole process.
Does the parts tracker already check for usage of "~Moved to" sub-parts and primitives in submitted parts and auto-generate a failure?
No - not at present.
All the "moves" have now been done on the Parts Tracker. I've not yet checked if there are any unofficial primitives that need renaming.
Pages: 1 2