Rect decimal precision


Rect decimal precision
#1
Only to prove my point, I have in these files reduced the number of decimals, 3, 2 and 1, and then created rect primitives.
The number of decimals, or the creation of rect primitives, is not the reason for thin gaps.

I challenge anyone to find a gap in them.

The only thing that happens is that there might be a need for some condlines. 
But even they are possible to eliminate as shown in u9563s01- flat no cond.dat.


Attached Files
.dat   u9563s01.dat (Size: 7.23 KB / Downloads: 4)
.dat   u9563s01 - flat no cond.dat (Size: 5.4 KB / Downloads: 2)
.dat   u9563s01 - 1 decimal.dat (Size: 4.45 KB / Downloads: 4)
.dat   u9563s01 - 2 decimal.dat (Size: 4.24 KB / Downloads: 2)
.dat   u9563s01 - 3 decimal.dat (Size: 4.6 KB / Downloads: 2)
Reply
RE: Rect decimal precision
#2
Don't know from where this discussion originates, but good to know. Did you use the Rectifier tool?

In my limited experience, thin gaps tend to occur a) when snap-to-vertex tolerances are too small (human misses the vertex), b) when human changes design on the fly (isecalc need to be rerun), and c) when custom placed polygons adjacent to scaled curved primitives are rounded to the desired number of decimals (the vertices in the subfiles are scaled but not rounded).

In this particular case, I would guess that the problematic rects have been created before rounding and they are rotated such that the vertices of adjacent polygons become rounded to a slightly different value. Perhaps the order of events is the key? To mitigate this type of thin gaps, one should first round to desired number of decimals and only then run Rectifier.

For the general case of interfacing with scaled primitives/subfiles (the custom coordinate is rounded to 4 decimal places while the coordinate calculated from the subfile using the 5-decimal places scaling factor is not rounded), the recommended four decimals appears good enough.
Reply
RE: Rect decimal precision
#3
Interesting discussion... I made some experiments and couldn't find a mismatch failure after using Rectifier in LDPE.
Perhaps the mismatches we can see in some parts (generally so small that only Willy can find them  Big Grin ) actually come from my command line version of Rectifier, often used in Datheader post-processing...
Reply
RE: Rect decimal precision
#4
the rects and how to treat them seem to cause some skub:
https://1d6chan.miraheze.org/wiki/Skub
I think the main cause (of manually done ones) is when they end on some external geometry (like partial/rotated cylos) or at intersections...
if these have bad/odd/unnecessary decimals, rectifying it can worsen things.
(because a rect is at half of the distance, if this is odd, the result will have one decimal more...)
Reply
RE: Rect decimal precision
#5
(Today, 5:56)Peter Blomberg Wrote: Perhaps the order of events is the key? To mitigate this type of thin gaps, one should first round to desired number of decimals and only then run Rectifier.

That's the ideal way - not reality. In real life, people might round and then rectify, but then there are things to fix/optimize/redone. The once ideal rect gets re-used/scaled/repositioned/re-rounded and suddenly the gaps start showing up ... for what: to save one line of code in a rect1.dat. The library is a constant work in progress, and I wonder how many of us inline rects before they start fixing things? Actually hands-up, who uses rects by manually position/rotate/scale them in an editor? We have rects 'cos we have Rectifier. Does it save you time and effort? Do you benefit from the existence of this series of prims?

I stopped generating them a long time ago 'cos the trouble they cause is by far greater than their benefit, and I wish I could turn off that "Convert bordered rhombuses into rects primitives" in LDPE by default.

w.
LEGO ergo sum
Reply
RE: Rect decimal precision
#6
(4 hours ago)Rene Rechthaler Wrote: the rects and how to treat them seem to cause some skub:
https://1d6chan.miraheze.org/wiki/Skub
I think the main cause (of manually done ones) is when they end on some external geometry (like partial/rotated cylos) or at intersections...
if these have bad/odd/unnecessary decimals, rectifying it can worsen things.
(because a rect is at half of the distance, if this is odd, the result will have one decimal more...)
Yes, that's part of the problem.
Moral of the story, use Rectifier carefully if you mind small vertex mismatches (which is generally NOT a problem at all!)
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: Gerald Lasser, 10 Guest(s)