LDraw.org Discussion Forums

Full Version: cyli2.dat
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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
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.
(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.
(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.
(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.
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) 0.7654

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: sqrt((0.9239-1)^2+(0.3827)^2) = 0.3902


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.
The first, and last, condline in a cyli have a controlpoint on the tangential plane to the cylinder.

[attachment=5851]

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.

[attachment=5852]
(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.
(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?
(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.
Pages: 1 2