To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dat.partsOpen lugnet.cad.dat.parts in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / LDraw Files / Parts / 6350
6349  |  6351
Subject: 
Re: Help with Patterns
Newsgroups: 
lugnet.cad.dat.parts
Date: 
Tue, 26 Aug 2008 05:56:21 GMT
Viewed: 
10309 times
  
In lugnet.cad.dat.parts, Benjamin Lyttle wrote:
   So I’m sitting here staring at my part and all of the quads I’ve used to make it • up wondering, how do I minimize T-junctions? Are there primatives that can • replace the quads/ triangles? I have a LOT of T-junctions in what I’ve made up
so far. I’m still getting my head around Quad2dat. Suggestions?!?

First of all, as far as I know, a T-junction in a triangle or quad can always be removed by the addition of one triangle. This can be tedious, but I don’t know of any automated solution. Also, there are often better ways to get rid of T-junctions than adding a triangle. For example:



Notice that the bottom version is made up of 3 quads, while the right version has 3 quads and 2 triangles. That makes the bottom version better, sort of. Most renderers will at some point divide all the quads into triangles, and both versions result in the same number of final triangles, so it’s not necessarily as much better as it might look. (I mention this, because things get a whole lot more complicated as the shapes become more complex, and it’s really not worth trying to figure out the configuration with the fewest number of lines in the LDraw file. The differences are just too minor for that to be worth it.)

So the most basic answer to your question is that to get rid of a T-junction, you add a new triangle inside the existing quad or triangle. One thing that you DON’T want to do is convert a triangle into a quad in order to avoid a T-junction. This won’t actually work right.



In the above example, the correct thing to do is split the triangle into two separate triangles: A•B•D and B•C•D. If you create a quad A•B•C•D, the tracker might reject the part (degenerate quad), but even if it doesn’t, it’s bad. As I said above, the renderer will likely split the quad into two triangles. The thing is, there’s no way to know how that split will go. So it could choose A•B•D and B•C•D, or it could choose A•B•C and A•C•D, which ends up being a triangle with a T-junction and a degenerate triangle (line). LDView will actually pull the D point out of the quad at load time and treat it as a triangle (and spit out a warning).

This all gets much more complicated when the T-junctions happen along the edges of primitives like disks. Sometimes it’s not even possible to get rid of the T-junctions when using primitives, and at least with circular primitives, I think that it’s better to use a circular primitive with a T-junction that can’t be removed than it is to avoid the circular primitive in order to avoid the T-junction.

--Travis



Message has 3 Replies:
  Re: Help with Patterns
 
(...) That's supposed to say that the bottom version is made up of 4 quads. --Travis (16 years ago, 26-Aug-08, to lugnet.cad.dat.parts, FTX)
  Re: Help with Patterns
 
(...) [SNIP-SNAP] Travis, this is a fine explanation! How about uploading a more formal version to the tutorial page (URL) or the specs (URL) (16 years ago, 26-Aug-08, to lugnet.cad.dat.parts)
  Re: Help with Patterns
 
(...) etc. (...) I was wondering if you upload a more concrete example using a lego editing tool and show what the difference would look like between the three examples using one of them - it would be helpful to me to be able to see something that (...) (16 years ago, 27-Aug-08, to lugnet.cad.dat.parts, FTX)  

Message is in Reply To:
  Re: Help with Patterns
 
(...) So I'm sitting here staring at my part and all of the quads I've used to make it up wondering, how do I minimize T-junctions? Are there primatives that can replace the quads/ triangles? I have a LOT of T-junctions in what I've made up so far. (...) (16 years ago, 26-Aug-08, to lugnet.cad.dat.parts)

18 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR