cyli2.dat - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: Models and Parts (https://forums.ldraw.org/forum-18.html) +--- Forum: Parts Authoring (https://forums.ldraw.org/forum-19.html) +--- Thread: cyli2.dat (/thread-24262.html) |
cyli2.dat - Ulrich Röder - 2020-10-31 This misinformation should be adapted urgently: https://www.ldraw.org/library/primref/ Circular cylinder: n-fcyli2.dat "This suite of primitives are used to generate cylinders or part cylinders. These are provided in two forms - with conditional lines (n-fcyli) or without conditional lines (n-fcyli2). In most circumstances the "cyli" version should be used. The "cyli2" versions are for special cases, such as the rounded corners of stickers." Magnus pointed out to me that cylinders with conditioning lines are definitely necessary for stickers with rounded inside / outside corners. Nice trap .... for every clueless who obeys the written rules. RE: cyli2.dat - Travis Cobbs - 2020-10-31 Formed stickers use edge lines. However, flat stickers don't. The parts library spec says the following (emphasis added): Quote:The sticker should be modelled as a 0.25 LDU thin box (or whatever shape sticker is in), without any edge lines (type 2 lines), and coloured with main colour 16. The sticker should be oriented such that the top face is at -0.25 Y and parallel with the X-Z plane. The pattern with the hardcoded colours is on the top face. So, cylinders used on the edges of that box would be cyli2, as indicated. RE: cyli2.dat - Magnus Forsberg - 2020-10-31 (2020-10-31, 20:28)Travis Cobbs Wrote: So, cylinders used on the edges of that box would be cyli2, as indicated. No, Sticker don't have edge lines, only condlines. Quote:Conditional lines (type 5 lines), in colour 24, should be provided around curved edges and on the curved surface of formed sticker parts. Solid edges (type 2 lines) are also allowed for folds in formed sticker parts, but not around the edges of the sticker. Stickers with rounded corners must use the cyli primitive, not the cyli2. RE: cyli2.dat - Max Martin Richter - 2020-10-31 (2020-10-31, 20:06)Ulrich Röder Wrote: This misinformation should be adapted urgently: Well, there was a change in the specs concerning condlines and edges for stickers in the past. Before this change condlines and edges were strictly forbidden. With the beginning of modelling formed stickers we decided to allow condlines for flat stickers and edges and condlines for formed stickers. But the box (or whatever shape the sticker is) will never bordered by edges. So I think, cyli2 is more less useless nowadays and you are right that this part of the spec should deleted. RE: cyli2.dat - Chris Dee - 2020-11-01 (2020-10-31, 23:20)Max Martin Richter Wrote: Well, there was a change in the specs concerning condlines and edges for stickers in the past. Before this change condlines and edges were strictly forbidden. With the beginning of modelling formed stickers we decided to allow condlines for flat stickers and edges and condlines for formed stickers. But the box (or whatever shape the sticker is) will never bordered by edges. Primitives reference documentation updated. RE: cyli2.dat - Lasse Deleuran - 2020-11-02 While we are on the subject, there is another piece of information which I can't find for n-fcyli.dat: What is the logic behind placement of the control points for the outer-most conditional lines when the cylinders are not complete? As an example, 1-16cyli is a single segment of a cylinder. It has the following two control points (Click "Load Full Structure" and then the pictures of the conditional lines) [color=white][size=medium][font=Arial, Helvetica, sans-serif]0.7654[/font][/size][/color] 1) 0.7654, 1, 0.7654 2) 1, 1, -0.4142 Here I would have expected control point 1 to be: 0.7071, 1, 0.7071 as that is the corner point of the adjacent quad in the cylinder (See 1-8cyli.dat) Control point 2 I understand, as it corresponds to the primitive being placed next to a rectilinear wall. Looking at the length between the "rogue" control points and the conditional lines they beling to, one can see: The distance from the conditional line to control point 2 is: 0.4142 The distance from the conditional line to control point 1 is: sqrt((0.9239-0.7654)^2+(0.3827-0.7654)^2) = 0.4142 So 0.4142 seems to be the distance used for "rogue" control points. I would just like to know why it differs from the length of a segment:[color=#333333][size=small][size=small][font=Tahoma, Verdana, Arial, sans-serif] sqrt((0.9239-1)^2+(0.3827)^2) = 0.3902[/size][/font][/size][/color] PS. I'm doing all this in order to create unit tests for the primitives and will make a new thread with a full report later. RE: cyli2.dat - Magnus Forsberg - 2020-11-02 The first, and last, condline in a cyli have a controlpoint on the tangential plane to the cylinder. When 2 cyli primitives are placed next to each other these condlines will complement each other. This also explains why an author have to add an extra complementary condline if a surface is not placed in the tangential plane. RE: cyli2.dat - Lasse Deleuran - 2020-11-02 (2020-11-02, 17:04)Magnus Forsberg Wrote: The first, and last, condline in a cyli have a controlpoint on the tangential plane to the cylinder. Thanks Magnus. That clears it up, including why I couldn't make sense of combining primitives for 3/4 cylinders and such. RE: cyli2.dat - N. W. Perry - 2020-11-02 (2020-11-02, 18:24)Lasse Deleuran Wrote: Thanks Magnus. That clears it up, including why I couldn't make sense of combining primitives for 3/4 cylinders and such. I learned about this myself recently—one of the many "unwritten rules" of LDraw. (Actually it is written; the info is here in the forums if you know where to look…but you have to know you're looking.) Makes me wonder if it's worth gathering some of these rules into a single place—even just an indexed thread like they have at Eurobricks? RE: cyli2.dat - Max Martin Richter - 2020-11-02 (2020-11-02, 19:12)N. W. Perry Wrote: I learned about this myself recently—one of the many "unwritten rules" of LDraw. (Actually it is written; the info is here in the forums if you know where to look…but you have to know you're looking.) Long time ago, the last control point has been changed from the next circular face to the tangential face, which makes much more sense in my eyes. RE: cyli2.dat - Magnus Forsberg - 2020-11-02 (2020-11-02, 21:10)Max Martin Richter Wrote: Long time ago, the last control point has been changed from the next circular face to the tangential face, which makes much more sense in my eyes. I wish we had no first/last condlines, in all the curved primitives, forcing the addition of a single (correct) condline, instead of always having to add an extra condline. This would eliminate a lot of condlines showing up "to early" too. RE: cyli2.dat - N. W. Perry - 2020-11-03 (2020-11-02, 21:41)Magnus Forsberg Wrote: I wish we had no first/last condlines, in all the curved primitives, forcing the addition of a single (correct) condline, instead of always having to add an extra condline. This would eliminate a lot of condlines showing up "to early" too. The other confusion is that the rule that is written—i.e., the official library spec—expressly says that conditional lines may not overlap, even in part. However, it could be interpreted that this refers only to condlines within the same file; that is, not to condlines in different (sub)files that happen to overlap. Might be something worth clarifying. RE: cyli2.dat - Lasse Deleuran - 2020-11-03 (2020-11-03, 4:30)N. W. Perry Wrote: The other confusion is that the rule that is written—i.e., the official library spec—expressly says that conditional lines may not overlap, even in part. However, it could be interpreted that this refers only to condlines within the same file; that is, not to condlines in different (sub)files that happen to overlap. Might be something worth clarifying. That the lines belong to different files makes no difference for the rendering. As we do not have normal, nor UV information in the data format, renders have to rely on the information gathered from lines and conditional lines in order to ensure smooth surfaces where expected. However. Overlying conditional lines and conditional lines that intersect wit normal lines cause artefacts, such as seen on the macaroni bricks. Example. Click "3D" and zoom in on the outer curve of a macaroni brick. The UV calculation above the indent for the stud fails and causes the surface to break. This is due to a conditional line and a normal line overlapping. RE: cyli2.dat - N. W. Perry - 2020-11-03 (2020-11-03, 12:18)Lasse Deleuran Wrote: That the lines belong to different files makes no difference for the rendering. Yeah, I just thought it might be the technicality that makes complementary condlines acceptable—which of course they must be, if they are required. More likely, though, is just that the two rules are unintentionally contradictory. RE: cyli2.dat - Max Martin Richter - 2020-11-03 (2020-11-02, 21:41)Magnus Forsberg Wrote: I wish we had no first/last condlines, in all the curved primitives, forcing the addition of a single (correct) condline, instead of always having to add an extra condline. This would eliminate a lot of condlines showing up "to early" too. Maybe we could solve this problem with a new primitive type? cyli3 (or whatever it will be named) containing the content of the normal cyli prim excluding the outer condlines? RE: cyli2.dat - Magnus Forsberg - 2020-11-03 (2020-11-03, 20:47)Max Martin Richter Wrote: Maybe we could solve this problem with a new primitive type? cyli3 (or whatever it will be named) containing the content of the normal cyli prim excluding the outer condlines? Or, simply use the cyli2 primitive, but adding only the wanted condlines, excluding the end condlines. I've seen this usage in a part, but I can't remember where. |