* using log directory 'd:/Rcompile/CRANpkg/local/4.1/cgalPolygons.Rcheck' * using R version 4.1.3 (2022-03-10) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'cgalPolygons/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'cgalPolygons' version '0.1.0' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'cgalPolygons' can be installed ... WARNING Found the following significant warnings: d:/RCompile/CRANpkg/lib/4.1/BH/include/boost/container/detail/copy_move_algo.hpp:226:19: warning: 'void* memmove(void*, const void*, size_t)' writing to an object of type 'value_type' {aka 'struct std::pair::Face_info, CGAL::Epeck, CGAL::Triangulation_face_base_2 >, CGAL::Constrained_triangulation_face_base_2::Face_info, CGAL::Epeck, CGAL::Triangulation_face_base_2 > > > > > > > >, CGAL::Default, CGAL::Default, CGAL::Default>, false>, int>'} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] See 'd:/Rcompile/CRANpkg/local/4.1/cgalPolygons.Rcheck/00install.out' for details. * checking installed package size ... NOTE installed size is 10.6Mb sub-directories of 1Mb or more: libs 10.4Mb * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * loading checks for arch 'i386' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK ** checking loading without being on the library search path ... OK ** checking use of S3 registration ... OK * loading checks for arch 'x64' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK ** checking loading without being on the library search path ... OK ** checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [5s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in shell scripts ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking examples ... ** running examples for arch 'i386' ... [2s] ERROR Running examples in 'cgalPolygons-Ex.R' failed The error most likely occurred in: > ### Name: cgalPolygonWithHoles > ### Title: R6 class to represent a CGAL polygon with holes > ### Aliases: cgalPolygonWithHoles > > ### ** Examples > > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$new` > ## ------------------------------------------------ > > library(cgalPolygons) > pwh <- cgalPolygonWithHoles$new( + squareWithHole[["outerSquare"]], list(squareWithHole[["innerSquare"]]) + ) > pwh Polygon with one hole. > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$area` > ## ------------------------------------------------ > > library(cgalPolygons) > pwh <- cgalPolygonWithHoles$new( + squareWithHole[["outerSquare"]], list(squareWithHole[["innerSquare"]]) + ) > pwh$area() # should be 12 [1] 12 > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$boundingBox` > ## ------------------------------------------------ > > library(cgalPolygons) > pwh <- cgalPolygonWithHoles$new( + squareWithHole[["outerSquare"]], list(squareWithHole[["innerSquare"]]) + ) > pwh$boundingBox() [,1] [,2] min -2 -2 max 2 2 > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$convexParts` > ## ------------------------------------------------ > > library(cgalPolygons) > pwh <- cgalPolygonWithHoles$new( + squareWithHole[["outerSquare"]], list(squareWithHole[["innerSquare"]]) + ) > cxparts <- pwh$convexParts() Found 8 convex parts. > pwh$plot(list(), density = 10) > invisible( + lapply(cxparts, function(cxpart) { + polygon(cxpart, lwd = 2) + }) + ) > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$intersection` > ## ------------------------------------------------ > > library(cgalPolygons) > # function creating a circle > circle <- function(x, y, r) { + t <- seq(0, 2, length.out = 100)[-1L] + t(c(x, y) + r * rbind(cospi(t), sinpi(t))) + } > # take two circles with a hole > plg1 <- cgalPolygonWithHoles$new( + circle(-1, 0, 1.5), holes = list(circle(-1, 0, 0.8)) + ) > plg2 <- cgalPolygonWithHoles$new( + circle(1, 0, 1.5), holes = list(circle(1, 0, 0.8)) + ) > # intersection > plgList <- plg1$intersection(plg2) The intersection consists in one polygon. It doesn't have any hole. > plg <- plgList[[1]] > # plot > opar <- par(mar = c(0, 0, 0, 0)) > plot( + NULL, xlim = c(-2.6, 2.6), ylim = c(-1.6, 1.6), asp = 1, + xlab = NA, ylab = NA, axes = FALSE + ) > plg1$plot(list(lwd = 2), lwd = 2, density = 10, new = FALSE) > plg2$plot(list(lwd = 2), lwd = 2, density = 10, new = FALSE) > plg$plot(lwd = 4, col = "red", new = FALSE) > par(opar) > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$minkowskiSum` > ## ------------------------------------------------ > > library(cgalPolygons) > plg1 <- cgalPolygonWithHoles$new(decagram) > plg2 <- cgalPolygonWithHoles$new(star) > minko <- plg1$minkowskiSum(plg2) No hole in the Minkowski sum. > minko$plot(lwd = 2, col = "limegreen") > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$plot` > ## ------------------------------------------------ > > library(cgalPolygons) > pwh <- cgalPolygonWithHoles$new( + squareWithHole[["outerSquare"]], list(squareWithHole[["innerSquare"]]) + ) > pwh$plot( + outerpars = list(lwd = 2), density = 10 + ) > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$subtract` > ## ------------------------------------------------ > > library(cgalPolygons) > # function creating a circle > circle <- function(x, y, r) { + t <- seq(0, 2, length.out = 100)[-1L] + t(c(x, y) + r * rbind(cospi(t), sinpi(t))) + } > # take two circles with a hole > plg1 <- cgalPolygonWithHoles$new( + circle(-1, 0, 1.5), holes = list(circle(-1, 0, 0.8)) + ) > plg2 <- cgalPolygonWithHoles$new( + circle(1, 0, 1.5), holes = list(circle(1, 0, 0.8)) + ) > # difference > plgList <- plg1$subtract(plg2) The difference consists in 2 polygons. Polygon 1 has no hole. Polygon 2 has no hole. > # plot > opar <- par(mar = c(0, 0, 0, 0)) > plot( + NULL, xlim = c(-2.6, 2.6), ylim = c(-1.6, 1.6), asp = 1, + xlab = NA, ylab = NA, axes = FALSE + ) > plgList[[1]]$plot(lwd = 4, col = "red", new = FALSE) > plgList[[2]]$plot(lwd = 4, col = "red", new = FALSE) > par(opar) > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$symdiff` > ## ------------------------------------------------ > > library(cgalPolygons) > # function creating a circle > circle <- function(x, y, r) { + t <- seq(0, 2, length.out = 100)[-1L] + t(c(x, y) + r * rbind(cospi(t), sinpi(t))) + } > # take two circles with a hole > plg1 <- cgalPolygonWithHoles$new( + circle(-1, 0, 1.5), holes = list(circle(-1, 0, 0.8)) + ) > plg2 <- cgalPolygonWithHoles$new( + circle(1, 0, 1.5), holes = list(circle(1, 0, 0.8)) + ) > # symmetric difference > plgList <- plg1$symdiff(plg2) The symmetric difference consists in one polygon. It has 3 holes. > plg <- plgList[[1L]] > # plot > opar <- par(mar = c(0, 0, 0, 0)) > plg$plot(list(lwd = 4, col = "red"), lwd = 4, col = "white") > par(opar) > > ## ------------------------------------------------ > ## Method `cgalPolygonWithHoles$union` > ## ------------------------------------------------ > > library(cgalPolygons) > # function creating a circle > circle <- function(x, y, r) { + t <- seq(0, 2, length.out = 100)[-1L] + t(c(x, y) + r * rbind(cospi(t), sinpi(t))) + } > # take two circles with a hole > plg1 <- cgalPolygonWithHoles$new( + circle(-1, 0, 1.5), holes = list(circle(-1, 0, 0.8)) + ) > plg2 <- cgalPolygonWithHoles$new( + circle(1, 0, 1.5), holes = list(circle(1, 0, 0.8)) + ) > # union > plgList <- plg1$union(plg2) The union consists in one polygon. It has 2 holes. > plg <- plgList[[1]] > # plot > opar <- par(mar = c(0, 0, 0, 0)) > plg$plot(list(lwd = 4, col = "red"), lwd = 4, col = "white") > par(opar) > > > > graphics::par(get("par.postscript", pos = 'CheckExEnv')) > ### *