mirror of https://github.com/vitalif/openscad
Fixed bug in libtess. Fixes #1210
parent
b2f2323f6b
commit
c50d927216
|
@ -1122,11 +1122,12 @@ static void InitEdgeDict( TESStesselator *tess )
|
|||
h = (tess->bmax[1] - tess->bmin[1]);
|
||||
|
||||
/* If the bbox is empty, ensure that sentinels are not coincident by
|
||||
slightly enlarging it. */
|
||||
smin = tess->bmin[0] - (w > 0 ? w : 0.01);
|
||||
smax = tess->bmax[0] + (w > 0 ? w : 0.01);
|
||||
tmin = tess->bmin[1] - (h > 0 ? h : 0.01);
|
||||
tmax = tess->bmax[1] + (h > 0 ? h : 0.01);
|
||||
slightly enlarging it. To avoid floating point precision issues,
|
||||
make sure to enlarge by a minimal amount. */
|
||||
smin = tess->bmin[0] - (w > 0.01 ? w : 0.01);
|
||||
smax = tess->bmax[0] + (w > 0.01 ? w : 0.01);
|
||||
tmin = tess->bmin[1] - (h > 0.01 ? h : 0.01);
|
||||
tmax = tess->bmax[1] + (h > 0.01 ? h : 0.01);
|
||||
|
||||
AddSentinel( tess, smin, smax, tmin );
|
||||
AddSentinel( tess, smin, smax, tmax );
|
||||
|
|
Loading…
Reference in New Issue