LDraw.org Discussion Forums
Question about edges - 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: Question about edges (/thread-8521.html)

Pages: 1 2 3 4


Re: Question about edges - Ben Supnik - 2013-03-22

Hi Tim,

I implemented this code, but non-iteratively...that is, I collect 'chains' of points that are all near each other and then when all chains are gathered, each set of points in a chain are set to be at the point cloud's centroid, which effectively locks up the points.

As we discussed, a chain of points all within TOL of each other 'cascade' into one collapsed point, even though the extrema of the point chain are more than TOL apart.

But what I also discovered is that my non-iterative problem (find all chains first, "edit" all geometry second) will result in geometry where some points are _within_ TOL of each other.

For example:
Code:
E

A     1      E
B    2      D
  
      C

Points A, B, C, D and E are in a circular arc whose center is (1), and whose radius is slightly smaller than TOL.
Point E is directly above C, such that the distance from E to any point is > TOL (that is, E is enough "up" that it is more than TOL from A, C and E.

Point 2 is the 'centroid' of ABCDE - that is, A, B, C, D and E will all end up at point 2 after locking up points.

When this happens, the distance from 2 to E can easily be below TOL.

I think my question is: do I care??? :-)

That is, at this point am I done snapping and I go home, or do I then need to re-run a snap to detect that 2 and E are close and merge them?

Is the above pattern a legitimate authoring technique or 'too much detail in too small of a place'?

cheers
ben


Re: Question about edges - Tim Gould - 2013-03-22

Ben Supnik Wrote:I think my question is: do I care??? :-)

That is, at this point am I done snapping and I go home, or do I then need to re-run a snap to detect that 2 and E are close and merge them?

Is the above pattern a legitimate authoring technique or 'too much detail in too small of a place'?

cheers
ben

Probably you do not care. If that situation comes up it's very likely to be a result of bad part design. Any detail finer than (say) 1/100th of an LDU is just plain wrong and setting TOL=1e-2 is likely to catch all but the most extreme rounding errors. The one notable exception is if a part used a rotation on something really long to match with another detail. Which is unreliable design and best caught at the design/review stage.

You could get rid of the problem by iterating until no matches are found. But that seems like overkill to me and is possibly more likely to result in false joins.

Tim


Re: Question about edges - Ben Supnik - 2013-03-22

Hi Tim,

Tim Gould Wrote:The one notable exception is if a part used a rotation on something really long to match with another detail. Which is unreliable design and best caught at the design/review stage.

That's the one thing that's strange. I get failures to lock-upon the 6x6 dishes if my TOL is < about 0.05. For example, 0.01 will lock up some but not all of the dishes.

And to make it worse, some pattern parts have markings intentionally authored with triangles < 0.05. (My guess is that these triangles were induced to remove T junctions.)

Quote:You could get rid of the problem by iterating until no matches are found. But that seems like overkill to me and is possibly more likely to result in false joins.

Right - I thought about that, but if the choice is between two somewhat arbitrary outputs for a wrong input, I might as well pick the one that requires less processing time. :-) I'm screening now to see which parts have 'close' outputs despite not having tiny input triangles. One technic part that failed this test had some authoring problems.

My hope was that, with no points closer than TOL after running, I could write the T-splitting with no concern for numeric precision (because TOL would be significantly bigger than the real floating point limits I would face).

But it may instead be the case that where the points are close together, the input was funky and the output can be funky too.

Cheers
Ben


Re: Question about edges - Philippe Hurbain - 2013-03-23

Quote:And to make it worse, some pattern parts have markings intentionally authored with triangles < 0.05. (My guess is that these triangles were induced to remove T junctions.)
Or it may be the result of automatic tool (SlicerPro...)