LDraw.org Discussion Forums
problem when inlining conditional lines - 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: problem when inlining conditional lines (/thread-1727.html)

problem when inlining conditional lines - Christian Neumann - 2011-11-29

i recently ran into problems with conditional lines from inlined subfiles, it seems to me that the control points get damaged. i discoverd this when i was inlining c-lines from the minifig head 3626b.dat file.

to reproduce, do the following steps:
1.take original head without inner part s\3626bs02.dat (or use attached file "head.dat")
2. view it with ldview, all c-lines are correct (-> screenshot 1)
3. select all subfiles within "head.dat", and inline them (i used lddp 2.0.4)
4. save, and view it again in ldview
5. notice that the conditional lines are not displayed as they should (-> screenshot 2)

here are two screenshots, taken by this steps and viewed from same angle.

using subfiles:
[Image: 01_head_with_subfiles.png]

inlined subfiles:
[Image: 02_head_inlined.png]

after that, i tried to inline the subfiles with other tools (like slicer pro, edger2, ...), but the result was the same for me, all lines were there, but displayed not correctly.

am i doing something wrong, or can anyone confirm this behavior?

Re: problem when inlining conditional lines - Orion Pobursky - 2011-11-29

This is probably a bug with the way control points are transformed while inlining. Since all these utiliies are written either by myself or Philo, I'll look at my code and see if there's a problem.

Re: problem when inlining conditional lines - Philippe Hurbain - 2011-11-30

No, it's not a problem in tools but in torus primitives! Originally their control points were matching a full torus instead of a planar surface on top and a cylinder on side. Primgen2 now creates proper tori. This one is corrected but not yet official: http://www.ldraw.org/cgi-bin/ptdetail.cgi?s=t04o6250

On the original head, you don't see the issue in LDView if you have primitive substitution "on"

For more details, see http://news.lugnet.com/cad/?n=14809

Re: problem when inlining conditional lines - Christian Neumann - 2011-11-30

that makes sense. unfortunately, i caught just that primitive with wrong c-lines...
thank you for clarifying that!

Re: problem when inlining conditional lines - Travis Cobbs - 2011-11-30

It may not be obvious from the LUGNET post linked above, but the solution to the problem (which LDView uses during primitive substitution) is to have the control points for the final conditional line on round primitives be tangent to the circle in question, instead of going towards the next facet. If you put two of these primitives next to each other, the conditional line from one of them will be visible half the time it's needed, and the conditional line from the other will be visible the other half the time. Many of the primitives in the library have conditional lines like this, but apparently not all were updated.