44# ' Creation of linear tessellations
55# ' and intersections between lintess objects
66# '
7- # ' $Revision: 1.12 $ $Date: 2025/11/27 06:32:02 $
7+ # ' $Revision: 1.13 $ $Date: 2025/11/27 07:50:47 $
88# '
99
1010divide.linnet <- local({
@@ -148,12 +148,12 @@ intersect.lintess <- function(X, Y) {
148148 return (out )
149149}
150150
151- traceTessLinnet <- function (A , L , reltol ) {
151+ traceTessLinnet <- function (A , L , epsfrac ) {
152152 # # linear tessellation on network L induced by 2D tessellation A
153153 stopifnot(is.tess(A ))
154154 stopifnot(is.linnet(L ))
155- # # relative tolerance for close points
156- if (missing(reltol )) reltol <- .Machine $ double.eps
155+ # # relative threshold defining whether two points are different
156+ if (missing(epsfrac )) epsfrac <- .Machine $ double.eps
157157 # # extract tiles as polygons
158158 til <- solapply(tiles(A ), as.polygonal )
159159 ntil <- length(til )
@@ -175,10 +175,10 @@ traceTessLinnet <- function(A, L, reltol) {
175175 # # determine crossing points
176176 xing2D <- unique(crossing.psp(edg , lin ))
177177 xingL <- as.lpp(xing2D , L = L )
178- if (reltol > 0 && npoints(xingL ) > = 2 ) {
178+ if (epsfrac > 0 && npoints(xingL ) > = 2 ) {
179179 # # remove very close pairs of points that lie on the same segment
180180 # # (which usually arise from numerical error)
181- thresh <- reltol * diameter(Frame(A ))
181+ thresh <- epsfrac * diameter(Frame(A ))
182182 if (minnndist(xing2D ) < = thresh ) {
183183 # # find close pairs in 2D
184184 cl <- closepairs(xing2D , thresh , twice = FALSE )
0 commit comments