![]() |
|
LDraw.org Official Parts Library Standards: General - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: General (https://forums.ldraw.org/forum-12.html) +--- Forum: Parts Tracker Discussion (https://forums.ldraw.org/forum-36.html) +--- Thread: LDraw.org Official Parts Library Standards: General (/thread-29515.html) |
LDraw.org Official Parts Library Standards: General - Roland Melkert - 2026-04-22 (2026-04-22, 20:27)Orion Pobursky Wrote: It's time to start discussing the LDraw.org Official Parts Library Standards. Only nitpick I noticed at first read trough: Quote:Leading zeros unless immediately before the decimal point must be removed (i.e. 1.5, not 01.5). Found this a bit confusing, so 0.123, 00000.123 and .123 are all allowed? Maybe: Quote:Leading zeros unless at most one immediately before the decimal point must be removed (i.e. 1.5, not 01.5). RE: LDraw.org Official Parts Library Standards: Introduction - Orion Pobursky - 2026-04-22 (2026-04-22, 20:46)Roland Melkert Wrote: Found this a bit confusing, so 0.123, 00000.123 and .123 are all allowed? The first and third are ok, the second is not. This is already enforced by the PT submit validation. Follow up: Should the PT autocorrect these errors and issue a warning instead? Good feedback. RE: LDraw.org Official Parts Library Standards: Introduction - Roland Melkert - 2026-04-22 (2026-04-22, 21:09)Orion Pobursky Wrote: Follow up: Should the PT autocorrect these errors and issue a warning instead? I think this can be an automatic correction (with a proven algorithm). Maybe followed with a message about what has been corrected? RE: LDraw.org Official Parts Library Standards: Introduction - Orion Pobursky - 2026-04-22 (2026-04-22, 20:46)Roland Melkert Wrote: Only nitpick I noticed at first read trough: I just realized that this is skipping ahead to the General section. I'll move these posts when I open discussion on that section. RE: LDraw.org Official Parts Library Standards: Introduction - Gerald Lasser - 2026-04-23 Quote:All part files in the LDraw Parts Library are required to carry the .dat extension. we do have the texture maps as "png" as well LDraw.org Official Parts Library Standards: General - Orion Pobursky - 2026-04-23 Since a few people jumped the gun, I'll open the General sections for comments https://library.ldraw.org/documentation/ldraworg-official-parts-library-standards/general Some comments from the intro thread have been moved here. RE: LDraw.org Official Parts Library Standards: Introduction - Travis Cobbs - 2026-04-23 Suggestions for the General page: Update: Quote:Files shall not exceed five decimal placesto: Quote:Numbers in files shall not exceed five decimal places Update: Quote:Four decimal places (at a minimum) shall be used for high-res primitives ...to: Quote:Four decimal places (at a minimum) shall be used in high-res primitives ... Regarding this: Quote:If the geometry is tangent to the curve. If it is sloped further, then a complementary conditional line shall be placed on the edge of that geometry, with the control points past the edge of the geometry configured to be tangent to the curve, and the two end points of the conditional placed to exactly overlap the complementary conditional line on the edge of the curved primitive. First of all, the first sentence seems to be missing its conclusion (, "then ..."). Secondly, I wanted to verify that these instructions are accurate (along with the sample image). It seems to me that the control point that is on the curve side should be tangent to the curve and not on the next curve vertex. The provided instructions mean that sometimes both overlapping conditionals will be rendered at the same time. Quote:For hinge or hinge like parts, the origin should be at the rotation point**The two asterisks at the end are never defined. Quote:Line types 2 and 5 must use colour 24.I thought that line type 2 was occasionally allowed to use specific colors in patterns. Is this not the case? RE: LDraw.org Official Parts Library Standards: General - Chris Böhnke - 2026-04-23 Stud Orientation: Missing a few words? "The individual studs on a part should be rotated such that the stud logo appears is [like] it would [be] on the real part." Duplicate Lines: Feels a bit random at it's current place in the list. Shouldn't this be more along the basic rules at the top? Header Meta Commands: So, older relics like "0 !CMDLINE -c14" are officially gone? Should this be mentioned for older parts? Colours:
RE: LDraw.org Official Parts Library Standards: Introduction - Orion Pobursky - 2026-04-23 (2026-04-23, 18:14)Travis Cobbs Wrote: First of all, the first sentence seems to be missing its conclusion (, "then ..."). Secondly, I wanted to verify that these instructions are accurate (along with the sample image). It seems to me that the control point that is on the curve side should be tangent to the curve and not on the next curve vertex. The provided instructions mean that sometimes both overlapping conditionals will be rendered at the same time. The above needs to be discussed. All the rest of your comments are fixed. RE: LDraw.org Official Parts Library Standards: General - Orion Pobursky - 2026-04-23 (2026-04-23, 19:58)Chris Böhnke Wrote: Colours: Let's discuss the above. Stud Orientation wording fixed, Duplicate lines section moved, and missing hyperlink added to Header META section. RE: LDraw.org Official Parts Library Standards: General - Orion Pobursky - 2026-04-23 (2026-04-22, 20:46)Roland Melkert Wrote: Found this a bit confusing, so 0.123, 00000.123 and .123 are all allowed? This is now clarified RE: LDraw.org Official Parts Library Standards: General - Peter Blomberg - 2026-05-07 In the format section, "Trailing zeros must be removed" is a bit inaccurate. We mean that trailing decimal zeros or unnecessary trailing zeros must be removed. Maybe "trailing zeros to the right of the decimal point must be removed". Also, there is no requirement to remove the point after a number, i.e. the present text suggests that "10." would be valid. I'd change "A single leading zero before the decimal point is optional" to "The zero before the decimal point is optional" Considering the leftmost picture below, suppose we call the next joint/bend to the right of the line ABCD as line HIJK, then I'd prefer a statement either allowing or disallowing a conditional line from H to K, i.e. without any line from I to J which is usually hidden away inside some other geometry. Personally, I'd prefer to require two separate conditional lines, one for HI and another for JK. This practice/preference has been unevenly enforced. Orientation/Origin It would be good to mention e.g. the standard expected for wheels. I'd prefer mentioning the expectation that studless parts have their origin at the bottom of the part if the bottom can be attached to studded parts. Should the preview keyword be mentioned here? Why is the origin so late in the text? Since it is about the file rather than single lines, I'd expect it to be before or at the start of the geometry section. What about
The 'duplicate lines' should be put under 'geometry'. I also noticed overlap between the 'Header META commands' and the Official Library Header Specification. Do they really need to be two separate pages? Is this some kind of work in progress? Precision - Willy Tschager - 2026-05-22 Guys, The discussion about precision and the number of digits in an LDraw file is probably as old as the standard itself, and we have seen the pendulum swing back and forth on how strictly it is handled. I came across this part: [https://library.ldraw.org/parts/30885](https://library.ldraw.org/parts/30885) with its six digits (probably to avoid triggering warnings in Edger) in the main file and four digits in the subfiles. This equates to 0.00004 mm. I understand the desire to be as accurate as possible, but we also have to consider efficiency and consistency. We have files with 2 decimal places, some with 3, and some with 4. I believe the root of the problem lies in the vagueness of the specs, which currently offer recommendations rather than strict rules: https://www.ldraw.org/article/512.html#precision To ease the review process, I'd like to propose the following changes to the specs:
I'm open to discussing the exact number of digits—I'm fine with 3, 4, or 5 digits for general geometry—but we need to move away from mere recommendations and establish a firm rule. Some concerns have been raised about rotated subfiles, and the fact that general geometry meeting primitives may require 5 digits, as seen here: 1 11 0 0 0 13.1 0 0 0 1 0 0 0 12.9 1-8chrd.dat 1 12 0 0 0 13.1 0 0 0 1 0 0 0 12.9 1-8tndis.dat 3 13 13.1 0 0 9.26301 0 9.12159 10 0 0 Fair point, but personally, I can live with a tiny mismatch if it means I don't have to constantly check during the review process whether they meet a specific requirement. The fewer exceptions, the better. What are your 2 cents? w. RE: Precision - Manfred Schaefer - 2026-05-23 (2026-05-22, 7:16)Willy Tschager Wrote: Guys, Hello, I’m no expert and have so far only tried my hand at printing. In two-dimensional space, I believe two decimal places are sufficient; in three-dimensional space, I think three to four decimal places are required. You have already touched upon what I consider to be the crucial point. As long as I do not use primitives, I have control over the number of decimal places. If I use primitives, the vertices are predefined and I cannot change them. If you limit the number of decimal places, gaps will inevitably arise, or in three-dimensional space the point will move out of the plane. It would first need to be defined at what point a gap is no longer a gap, because this deviation is accepted. The same applies to the point in three-dimensional space: how far is it allowed to protrude from the plane (length of the plane’s normal vector)? Best regards Manfred RE: LDraw.org Official Parts Library Standards: General - Orion Pobursky - 2026-05-24 The draft says this: Quote:Numbers in files shall not exceed five decimal places I think this is just fine. If we want stronger wording, the last line can change to this: Quote:For all other files, three decimal places shall not be exceeded with the exception of matching primitive vertexes or on a case-by-case basis with justification by the author. RE: LDraw.org Official Parts Library Standards: General - Manfred Schaefer - 2026-05-24 (2026-05-24, 1:02)Orion Pobursky Wrote: The draft says this: In my view, the description is accurate, but given my limited experience, I cannot say whether this might cause problems during implementation. In Willy’s example above, the exception would apply, as the triangle is attached to a primitive and the contact points are determined by the primitive. However, if, for example, a pattern is created for a minifigure head without using primitives, I can create it in 2D with two or at most three decimal places. But if I then rotate the individual rectangles of the pattern according to the angles of the individual head surfaces, the limit of three decimal places may be exceeded. If reduced to three decimal places, a point could shift out of the plane. To avoid this, I would have to provide a justification for using more than three decimal places and hope that this justification is accepted by the reviewers. In another post, I had asked about the possibility of creating a new primitive. I wanted a 1/16th of a circular segment, but one that ranges from 22.5° to 45°. Here, it was suggested that I rotate a 1/16th circular segment by 45° and then mirror it along the Z-axis. Rotating it by 45° would then require a resolution of more than five decimal places. That would again be an exceptional case and would probably require justification and approval. I don’t know whether the viewers impose a limit on the number of decimal places, or what value makes sense under which conditions. Regards, Manfred RE: LDraw.org Official Parts Library Standards: General - Willy Tschager - 2026-05-29 Thinking about, there are too may rules with too many exceptions. Just: "Numbers in files shall not exceed five decimal places". Will do nicely. w. RE: LDraw.org Official Parts Library Standards: General - Orion Pobursky - 2026-05-29 Agreed. I do think we should keep the 4dp for prims in there though. RE: LDraw.org Official Parts Library Standards: General - Manfred Schaefer - 2026-05-29 (2026-05-29, 8:24)Willy Tschager Wrote: Thinking about, there are too may rules with too many exceptions. Just: In my opinion, that's fine. However, this inevitably leads to problems if primitives are not rotated in multiples of 90°. In that case, though, we should also define when a gap is considered a gap and how much overlap is allowed. Greetings Manfred |