cyli2.dat


cyli2.dat
#1
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. Wink
Reply
RE: cyli2.dat
#2
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.
Reply
RE: cyli2.dat
#3
(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.
Reply
RE: cyli2.dat
#4
(2020-10-31, 20:06)Ulrich Röder Wrote: 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. Wink

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.
Reply
RE: cyli2.dat
#5
(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.
So I think, cyli2 is more less useless nowadays and you are right that this part of the spec should deleted.

Primitives reference documentation updated.
Chris (LDraw Parts Library Admin)
Reply
RE: cyli2.dat
#6
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) [font=Arial, Helvetica, sans-serif]0.7654[/font]

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:[font=Tahoma, Verdana, Arial, sans-serif] sqrt((0.9239-1)^2+(0.3827)^2) = 0.3902[/font]


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.
Reply
RE: cyli2.dat
#7
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.

   
Reply
RE: cyli2.dat
#8
(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.



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.

Thanks Magnus. That clears it up, including why I couldn't make sense of combining primitives for 3/4 cylinders and such.
Reply
RE: cyli2.dat
#9
(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. Wink (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?
Reply
RE: cyli2.dat
#10
(2020-11-02, 19:12)N. W. Perry Wrote: I learned about this myself recently—one of the many "unwritten rules" of LDraw. Wink (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?

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.
Reply
RE: cyli2.dat
#11
(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.
Reply
RE: cyli2.dat
#12
(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.
Reply
RE: cyli2.dat
#13
(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.
Reply
RE: cyli2.dat
#14
(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.
Reply
RE: cyli2.dat
#15
(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?
Reply
RE: cyli2.dat
#16
(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.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)