Diff of the two buildlogs: -- --- b1/build.log 2021-08-06 07:48:05.208544396 +0000 +++ b2/build.log 2021-08-06 07:52:12.511273215 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Thu Aug 5 19:40:38 -12 2021 -I: pbuilder-time-stamp: 1628235638 +I: Current time: Fri Aug 6 21:48:14 +14 2021 +I: pbuilder-time-stamp: 1628236094 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bullseye-reproducible-base.tgz] I: copying local configuration @@ -16,8 +16,8 @@ I: copying [./octave-geometry_4.0.0-2.debian.tar.xz] I: Extracting source gpgv: unknown type of key resource 'trustedkeys.kbx' -gpgv: keyblock resource '/tmp/dpkg-verify-sig.e0k5fqcR/trustedkeys.kbx': General error -gpgv: Signature made Tue Jul 28 02:41:14 2020 -12 +gpgv: keyblock resource '/tmp/dpkg-verify-sig.2UMQ_y11/trustedkeys.kbx': General error +gpgv: Signature made Wed Jul 29 04:41:14 2020 +14 gpgv: using RSA key 3F464391498FE874BDB5D98F2124AA1983785C90 gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./octave-geometry_4.0.0-2.dsc @@ -28,135 +28,169 @@ dpkg-source: info: applying skip-unit-tests-svg.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/20154/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/9589/tmp/hooks/D01_modify_environment starting +debug: Running on virt32a. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +Removing 'diversion of /bin/sh to /bin/sh.distrib by dash' +Adding 'diversion of /bin/sh to /bin/sh.distrib by bash' +Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' +Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash' +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/9589/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/9589/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=3' - DISTRIBUTION='' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="1" [2]="4" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.1.4(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=4' + DIRSTACK=() + DISTRIBUTION= + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='a2a22cec1bf644399b540fd9b98c6dd5' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='20154' - PS1='# ' - PS2='> ' + INVOCATION_ID=5d17f02b9ffa41c0af58bf1a767a6bad + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=9589 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/tmp.mNG0Jkg5pq/pbuilderrc_KqIC --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.mNG0Jkg5pq/b1 --logfile b1/build.log octave-geometry_4.0.0-2.dsc' - SUDO_GID='114' - SUDO_UID='110' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:8000/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/tmp.mNG0Jkg5pq/pbuilderrc_BihM --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/tmp.mNG0Jkg5pq/b2 --logfile b2/build.log --extrapackages usrmerge octave-geometry_4.0.0-2.dsc' + SUDO_GID=113 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:8000/ I: uname -a - Linux jtx1b 5.10.0-8-arm64 #1 SMP Debian 5.10.46-3 (2021-07-28) aarch64 GNU/Linux + Linux i-capture-the-hostname 5.10.0-8-armmp-lpae #1 SMP Debian 5.10.46-3 (2021-07-28) armv7l GNU/Linux I: ls -l /bin total 3580 - -rwxr-xr-x 1 root root 816764 Aug 4 08:25 bash - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bunzip2 - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bzcat - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzcmp -> bzdiff - -rwxr-xr-x 1 root root 2225 Jul 20 2020 bzdiff - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzegrep -> bzgrep - -rwxr-xr-x 1 root root 4877 Sep 4 2019 bzexe - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzfgrep -> bzgrep - -rwxr-xr-x 1 root root 3775 Jul 20 2020 bzgrep - -rwxr-xr-x 3 root root 26052 Jul 20 2020 bzip2 - -rwxr-xr-x 1 root root 9636 Jul 20 2020 bzip2recover - lrwxrwxrwx 1 root root 6 Jul 20 2020 bzless -> bzmore - -rwxr-xr-x 1 root root 1297 Jul 20 2020 bzmore - -rwxr-xr-x 1 root root 26668 Sep 22 2020 cat - -rwxr-xr-x 1 root root 43104 Sep 22 2020 chgrp - -rwxr-xr-x 1 root root 38984 Sep 22 2020 chmod - -rwxr-xr-x 1 root root 43112 Sep 22 2020 chown - -rwxr-xr-x 1 root root 92616 Sep 22 2020 cp - -rwxr-xr-x 1 root root 75524 Dec 10 2020 dash - -rwxr-xr-x 1 root root 75880 Sep 22 2020 date - -rwxr-xr-x 1 root root 55436 Sep 22 2020 dd - -rwxr-xr-x 1 root root 59912 Sep 22 2020 df - -rwxr-xr-x 1 root root 96764 Sep 22 2020 dir - -rwxr-xr-x 1 root root 55012 Jul 28 07:09 dmesg - lrwxrwxrwx 1 root root 8 Nov 6 2019 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Nov 6 2019 domainname -> hostname - -rwxr-xr-x 1 root root 22508 Sep 22 2020 echo - -rwxr-xr-x 1 root root 28 Nov 9 2020 egrep - -rwxr-xr-x 1 root root 22496 Sep 22 2020 false - -rwxr-xr-x 1 root root 28 Nov 9 2020 fgrep - -rwxr-xr-x 1 root root 47492 Jul 28 07:09 findmnt - -rwsr-xr-x 1 root root 26076 Feb 26 04:12 fusermount - -rwxr-xr-x 1 root root 124508 Nov 9 2020 grep - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 gunzip - -rwxr-xr-x 1 root root 6376 Mar 2 11:30 gzexe - -rwxr-xr-x 1 root root 64212 Mar 2 11:30 gzip - -rwxr-xr-x 1 root root 13784 Nov 6 2019 hostname - -rwxr-xr-x 1 root root 43180 Sep 22 2020 ln - -rwxr-xr-x 1 root root 35068 Feb 7 2020 login - -rwxr-xr-x 1 root root 96764 Sep 22 2020 ls - -rwxr-xr-x 1 root root 99940 Jul 28 07:09 lsblk - -rwxr-xr-x 1 root root 51408 Sep 22 2020 mkdir - -rwxr-xr-x 1 root root 43184 Sep 22 2020 mknod - -rwxr-xr-x 1 root root 30780 Sep 22 2020 mktemp - -rwxr-xr-x 1 root root 34408 Jul 28 07:09 more - -rwsr-xr-x 1 root root 34400 Jul 28 07:09 mount - -rwxr-xr-x 1 root root 9824 Jul 28 07:09 mountpoint - -rwxr-xr-x 1 root root 88524 Sep 22 2020 mv - lrwxrwxrwx 1 root root 8 Nov 6 2019 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 18 03:38 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 26652 Sep 22 2020 pwd - lrwxrwxrwx 1 root root 4 Aug 4 08:25 rbash -> bash - -rwxr-xr-x 1 root root 30740 Sep 22 2020 readlink - -rwxr-xr-x 1 root root 43104 Sep 22 2020 rm - -rwxr-xr-x 1 root root 30732 Sep 22 2020 rmdir - -rwxr-xr-x 1 root root 14144 Sep 27 2020 run-parts - -rwxr-xr-x 1 root root 76012 Dec 22 2018 sed - lrwxrwxrwx 1 root root 4 Aug 1 21:25 sh -> dash - -rwxr-xr-x 1 root root 22532 Sep 22 2020 sleep - -rwxr-xr-x 1 root root 55360 Sep 22 2020 stty - -rwsr-xr-x 1 root root 46704 Jul 28 07:09 su - -rwxr-xr-x 1 root root 22532 Sep 22 2020 sync - -rwxr-xr-x 1 root root 340872 Feb 16 21:55 tar - -rwxr-xr-x 1 root root 9808 Sep 27 2020 tempfile - -rwxr-xr-x 1 root root 67696 Sep 22 2020 touch - -rwxr-xr-x 1 root root 22496 Sep 22 2020 true - -rwxr-xr-x 1 root root 9636 Feb 26 04:12 ulockmgr_server - -rwsr-xr-x 1 root root 22108 Jul 28 07:09 umount - -rwxr-xr-x 1 root root 22520 Sep 22 2020 uname - -rwxr-xr-x 2 root root 2346 Mar 2 11:30 uncompress - -rwxr-xr-x 1 root root 96764 Sep 22 2020 vdir - -rwxr-xr-x 1 root root 38512 Jul 28 07:09 wdctl - lrwxrwxrwx 1 root root 8 Nov 6 2019 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Mar 2 11:30 zcat - -rwxr-xr-x 1 root root 1678 Mar 2 11:30 zcmp - -rwxr-xr-x 1 root root 5880 Mar 2 11:30 zdiff - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zegrep - -rwxr-xr-x 1 root root 29 Mar 2 11:30 zfgrep - -rwxr-xr-x 1 root root 2081 Mar 2 11:30 zforce - -rwxr-xr-x 1 root root 7585 Mar 2 11:30 zgrep - -rwxr-xr-x 1 root root 2206 Mar 2 11:30 zless - -rwxr-xr-x 1 root root 1842 Mar 2 11:30 zmore - -rwxr-xr-x 1 root root 4553 Mar 2 11:30 znew -I: user script /srv/workspace/pbuilder/20154/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 816764 Aug 5 10:25 bash + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bunzip2 + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bzcat + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzcmp -> bzdiff + -rwxr-xr-x 1 root root 2225 Jul 21 2020 bzdiff + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzegrep -> bzgrep + -rwxr-xr-x 1 root root 4877 Sep 5 2019 bzexe + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzfgrep -> bzgrep + -rwxr-xr-x 1 root root 3775 Jul 21 2020 bzgrep + -rwxr-xr-x 3 root root 26052 Jul 21 2020 bzip2 + -rwxr-xr-x 1 root root 9636 Jul 21 2020 bzip2recover + lrwxrwxrwx 1 root root 6 Jul 21 2020 bzless -> bzmore + -rwxr-xr-x 1 root root 1297 Jul 21 2020 bzmore + -rwxr-xr-x 1 root root 26668 Sep 23 2020 cat + -rwxr-xr-x 1 root root 43104 Sep 23 2020 chgrp + -rwxr-xr-x 1 root root 38984 Sep 23 2020 chmod + -rwxr-xr-x 1 root root 43112 Sep 23 2020 chown + -rwxr-xr-x 1 root root 92616 Sep 23 2020 cp + -rwxr-xr-x 1 root root 75524 Dec 11 2020 dash + -rwxr-xr-x 1 root root 75880 Sep 23 2020 date + -rwxr-xr-x 1 root root 55436 Sep 23 2020 dd + -rwxr-xr-x 1 root root 59912 Sep 23 2020 df + -rwxr-xr-x 1 root root 96764 Sep 23 2020 dir + -rwxr-xr-x 1 root root 55012 Jul 29 09:09 dmesg + lrwxrwxrwx 1 root root 8 Nov 8 2019 dnsdomainname -> hostname + lrwxrwxrwx 1 root root 8 Nov 8 2019 domainname -> hostname + -rwxr-xr-x 1 root root 22508 Sep 23 2020 echo + -rwxr-xr-x 1 root root 28 Nov 10 2020 egrep + -rwxr-xr-x 1 root root 22496 Sep 23 2020 false + -rwxr-xr-x 1 root root 28 Nov 10 2020 fgrep + -rwxr-xr-x 1 root root 47492 Jul 29 09:09 findmnt + -rwsr-xr-x 1 root root 26076 Feb 27 06:12 fusermount + -rwxr-xr-x 1 root root 124508 Nov 10 2020 grep + -rwxr-xr-x 2 root root 2346 Mar 3 13:30 gunzip + -rwxr-xr-x 1 root root 6376 Mar 3 13:30 gzexe + -rwxr-xr-x 1 root root 64212 Mar 3 13:30 gzip + -rwxr-xr-x 1 root root 13784 Nov 8 2019 hostname + -rwxr-xr-x 1 root root 43180 Sep 23 2020 ln + -rwxr-xr-x 1 root root 35068 Feb 8 2020 login + -rwxr-xr-x 1 root root 96764 Sep 23 2020 ls + -rwxr-xr-x 1 root root 99940 Jul 29 09:09 lsblk + -rwxr-xr-x 1 root root 51408 Sep 23 2020 mkdir + -rwxr-xr-x 1 root root 43184 Sep 23 2020 mknod + -rwxr-xr-x 1 root root 30780 Sep 23 2020 mktemp + -rwxr-xr-x 1 root root 34408 Jul 29 09:09 more + -rwsr-xr-x 1 root root 34400 Jul 29 09:09 mount + -rwxr-xr-x 1 root root 9824 Jul 29 09:09 mountpoint + -rwxr-xr-x 1 root root 88524 Sep 23 2020 mv + lrwxrwxrwx 1 root root 8 Nov 8 2019 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 19 05:38 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 26652 Sep 23 2020 pwd + lrwxrwxrwx 1 root root 4 Aug 5 10:25 rbash -> bash + -rwxr-xr-x 1 root root 30740 Sep 23 2020 readlink + -rwxr-xr-x 1 root root 43104 Sep 23 2020 rm + -rwxr-xr-x 1 root root 30732 Sep 23 2020 rmdir + -rwxr-xr-x 1 root root 14144 Sep 28 2020 run-parts + -rwxr-xr-x 1 root root 76012 Dec 23 2018 sed + lrwxrwxrwx 1 root root 4 Aug 6 21:48 sh -> bash + lrwxrwxrwx 1 root root 4 Aug 2 23:25 sh.distrib -> dash + -rwxr-xr-x 1 root root 22532 Sep 23 2020 sleep + -rwxr-xr-x 1 root root 55360 Sep 23 2020 stty + -rwsr-xr-x 1 root root 46704 Jul 29 09:09 su + -rwxr-xr-x 1 root root 22532 Sep 23 2020 sync + -rwxr-xr-x 1 root root 340872 Feb 17 23:55 tar + -rwxr-xr-x 1 root root 9808 Sep 28 2020 tempfile + -rwxr-xr-x 1 root root 67696 Sep 23 2020 touch + -rwxr-xr-x 1 root root 22496 Sep 23 2020 true + -rwxr-xr-x 1 root root 9636 Feb 27 06:12 ulockmgr_server + -rwsr-xr-x 1 root root 22108 Jul 29 09:09 umount + -rwxr-xr-x 1 root root 22520 Sep 23 2020 uname + -rwxr-xr-x 2 root root 2346 Mar 3 13:30 uncompress + -rwxr-xr-x 1 root root 96764 Sep 23 2020 vdir + -rwxr-xr-x 1 root root 38512 Jul 29 09:09 wdctl + lrwxrwxrwx 1 root root 8 Nov 8 2019 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Mar 3 13:30 zcat + -rwxr-xr-x 1 root root 1678 Mar 3 13:30 zcmp + -rwxr-xr-x 1 root root 5880 Mar 3 13:30 zdiff + -rwxr-xr-x 1 root root 29 Mar 3 13:30 zegrep + -rwxr-xr-x 1 root root 29 Mar 3 13:30 zfgrep + -rwxr-xr-x 1 root root 2081 Mar 3 13:30 zforce + -rwxr-xr-x 1 root root 7585 Mar 3 13:30 zgrep + -rwxr-xr-x 1 root root 2206 Mar 3 13:30 zless + -rwxr-xr-x 1 root root 1842 Mar 3 13:30 zmore + -rwxr-xr-x 1 root root 4553 Mar 3 13:30 znew +I: user script /srv/workspace/pbuilder/9589/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -653,7 +687,7 @@ Get: 451 http://deb.debian.org/debian bullseye/main armhf libxslt1.1 armhf 1.1.34-4 [220 kB] Get: 452 http://deb.debian.org/debian bullseye/main armhf octave-matgeom all 1.2.2-3 [308 kB] Get: 453 http://deb.debian.org/debian bullseye/main armhf python3-lxml armhf 4.6.3+dfsg-0.1 [1001 kB] -Fetched 139 MB in 30s (4593 kB/s) +Fetched 139 MB in 19s (7336 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package bsdextrautils. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19398 files and directories currently installed.) @@ -2513,8 +2547,26 @@ Writing extended state information... Building tag database... -> Finished parsing the build-deps +Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + usrmerge +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Need to get 13.0 kB of archives. +After this operation, 43.0 kB of additional disk space will be used. +Get:1 http://deb.debian.org/debian bullseye/main armhf usrmerge all 25 [13.0 kB] +debconf: delaying package configuration, since apt-utils is not installed +Fetched 13.0 kB in 0s (518 kB/s) +Selecting previously unselected package usrmerge. +(Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 36899 files and directories currently installed.) +Preparing to unpack .../archives/usrmerge_25_all.deb ... +Unpacking usrmerge (25) ... +Setting up usrmerge (25) ... +The system has been successfully converted. I: Building the package -I: Running cd /build/octave-geometry-4.0.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../octave-geometry_4.0.0-2_source.changes +hostname: Name or service not known +I: Running cd /build/octave-geometry-4.0.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../octave-geometry_4.0.0-2_source.changes dpkg-buildpackage: info: source package octave-geometry dpkg-buildpackage: info: source version 4.0.0-2 dpkg-buildpackage: info: source distribution unstable @@ -2555,8 +2607,8 @@ /usr/bin/mkoctfile --verbose -c connector.cpp -o connector.o /usr/bin/mkoctfile --verbose -c martinez.cpp -o martinez.o /usr/bin/mkoctfile --verbose -c polygon.cpp -o polygon.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -g -Wall -I. -DMEX_DEBUG clipper.cpp -o /tmp/oct-OuFjDN.o g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security connector.cpp -o connector.o -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -g -Wall -I. -DMEX_DEBUG clipper.cpp -o /tmp/oct-WP9k7G.o g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security martinez.cpp -o martinez.o g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security polygon.cpp -o polygon.o clipper.cpp: In function 'void ClipperLib::InitEdge(ClipperLib::TEdge*, ClipperLib::TEdge*, ClipperLib::TEdge*, const ClipperLib::IntPoint&)': @@ -2611,7 +2663,7 @@ 223 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | ^~~~~~~~~~~~~ /usr/bin/mkoctfile --verbose connector.o martinez.o polygon.o utilities.o polybool_mrf.cc -o polybool_mrf.oct -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security polybool_mrf.cc -o /tmp/oct-PcdRJx.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security polybool_mrf.cc -o /tmp/oct-45CNGf.o In file included from /usr/include/c++/10/vector:72, from clipper.hpp:81, from clipper.cpp:70: @@ -2717,7 +2769,7 @@ /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -g -Wall -I. -DMEX_DEBUG mexclipper.cpp -o /tmp/oct-T7oFYE.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -g -Wall -I. -DMEX_DEBUG mexclipper.cpp -o /tmp/oct-xrCBNO.o In file included from /usr/include/c++/10/vector:67, from polygon.h:12, from polybool_mrf.cc:19: @@ -2728,8 +2780,8 @@ /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -g -Wall -o clipper.mex /tmp/oct-WP9k7G.o /tmp/oct-T7oFYE.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro -g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -o polybool_mrf.oct connector.o martinez.o polygon.o utilities.o /tmp/oct-PcdRJx.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -g -Wall -o clipper.mex /tmp/oct-OuFjDN.o /tmp/oct-xrCBNO.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro +g++ -I/usr/include/octave-6.2.0/octave/.. -I/usr/include/octave-6.2.0/octave -pthread -fopenmp -g -O2 -fdebug-prefix-map=/build/octave-geometry-4.0.0=. -fstack-protector-strong -Wformat -Werror=format-security -o polybool_mrf.oct connector.o martinez.o polygon.o utilities.o /tmp/oct-45CNGf.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -Wl,-z,relro make[1]: Leaving directory '/build/octave-geometry-4.0.0/src' copyfile /build/octave-geometry-4.0.0/./src/polybool_mrf.oct /build/octave-geometry-4.0.0/./src/clipper.mex /build/octave-geometry-4.0.0/./inst/arm-unknown-linux-gnueabihf-api-v55 For information about changes from previous versions of the geometry package, run 'news geometry'. @@ -2741,7 +2793,7 @@ load_packages_and_dependencies at line 56 column 5 load_packages at line 53 column 3 pkg at line 588 column 7 - /tmp/tmp.wMyBZA4KA9 at line 9 column 9 + /tmp/tmp.ahSHljunJT at line 9 column 9 warning: Permanently renaming verLessThan.m since it is already present warning: called from @@ -2750,26 +2802,8 @@ load_packages_and_dependencies at line 56 column 5 load_packages at line 53 column 3 pkg at line 588 column 7 - /tmp/tmp.wMyBZA4KA9 at line 9 column 9 + /tmp/tmp.ahSHljunJT at line 9 column 9 -[inst/polysplit.m] ->>>>> /build/octave-geometry-4.0.0/inst/polysplit.m -***** test - x=[1 ;2 ;NaN ;3 ;4]; y=[4 ;3 ;NaN ;2 ;1]; - [cellx,celly]=polysplit(x,y); - assert (cellx, {[1; 2];[3; 4]}); - assert (celly, {[4; 3];[2; 1]}); -***** test - x=[1 2 NaN 3 4]; y=[4 3 NaN 2 1]; - [cellx,celly]=polysplit(x,y); - assert (cellx, {[1 2];[3 4]}); - assert (celly, {[4 3];[2 1]}); -***** test - x=[0 ;2 ;2 ;0 ;0 ;NaN ;NaN]; y=[0 ;0 ;3 ;3 ;0 ;NaN ;NaN]; - [cellx,celly]=polysplit(x,y); - assert (cellx, {[0 ;2 ;2 ;0 ;0]}); - assert (celly, {[0 ;0 ;3 ;3 ;0]}); -3 tests, 3 passed, 0 known failure, 0 skipped [inst/poly2cw.m] >>>>> /build/octave-geometry-4.0.0/inst/poly2cw.m ***** test @@ -2786,130 +2820,38 @@ assert (xcw,xexp); assert (ycw,yexp); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/joinPolygons.m] ->>>>> /build/octave-geometry-4.0.0/inst/joinPolygons.m -***** test - assert (joinPolygons ({1,2}), [1 2]); -***** test - assert (joinPolygons ({}), []); -***** test - XY = joinPolygons ({[1 6; 2 5; 3 4]; [4 3; 5 2; 6 1]}); - assert (XY, [1 6; 2 5; 3 4; NaN NaN; 4 3; 5 2; 6 1]); -***** error joinPolygons ([1 2 NaN 3 4], [56 NaN 78]) -***** error joinPolygons ({[1,0], [0,2]}); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/polygon2shape.m] ->>>>> /build/octave-geometry-4.0.0/inst/polygon2shape.m -***** test - pp = [0 0; 1 0; 1 1; 0 1]; - s = polygon2shape (pp); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/ispolyccw.m] ->>>>> /build/octave-geometry-4.0.0/inst/ispolyccw.m -***** shared pccw, pcw, ph - pccw = pcw = [0 0; 1 0; 1 1; 0 1]; - pcw([2 4],:) = pcw([4 2], :); - ph = [pccw; nan(1,2); 0.5*pcw+[0.25 0.25]]; -***** assert (ispolyccw (pccw)); -***** assert (~ispolyccw (pcw)); -***** assert (ispolyccw ({pccw;pcw}), {true false}); -***** assert (ispolyccw(ph),[true;false]); -***** test - phcw = [pcw; nan(1,2); 0.5*pccw+[0.25 0.25]]; - assert (ispolyccw(phcw),[false;true]); -***** test - x=[0 0 2 2 NaN 0 2 0]; y=[0 2 2 0 NaN 0 0 3]; - assert(ispolyccw(x,y),[false;true]); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/clipPolygon.m] ->>>>> /build/octave-geometry-4.0.0/inst/clipPolygon.m -***** error clipPolygon([],[],[],'abracadabra') -***** error clipPolygon([0 0; 0 1; 0.5 1],[-1 -1; -1 1; 0 1],'no-op') +[inst/plotShape.m] +>>>>> /build/octave-geometry-4.0.0/inst/plotShape.m ***** demo - pol1 = [2 2; 6 2; 6 6; 2 6; 2 2; NaN NaN; 3 3; 3 5; 5 5; 5 3; 3 3]; - pol2 = [1 2; 7 4; 4 7; 1 2; NaN NaN; 2.5 3; 5.5 4; 4 5.5; 2.5 3]; - - subplot (3, 3, 1) - drawFilledPolygon (pol1, 'edgecolor', 'k', 'facecolor', 'c') - axis image - title ('1. Subject polygon') - axis off + # Taylor series of cos(pi*x),sin(pi*x) + n = 5; N = 0:5; + s{1}(1,2:2:2*n+2) = fliplr ( (-1).^N .* (pi).^(2*N) ./ factorial (2*N)); + s{1}(2,1:2:2*n+1) = fliplr ( (-1).^N .* (pi).^(2*N+1) ./ factorial (2*N+1)); - subplot (3, 3, 2) - drawFilledPolygon (pol1, 'linestyle', 'none', 'facecolor', 'c') - drawFilledPolygon (pol2, 'edgecolor', 'b', 'facecolor', 'y') + h(1) = plotShape (s, 'tol', 1e-1, 'color','b'); + h(2) = plotShape (s, 'tol', 1e-3, 'color', 'm'); + h(3) = plotShape (s, 'tol', 1e-9, 'color', 'g'); + legend (h, {'1e-1','1e-3','1e-9'}) axis image - title ('2. Clip polygon') - axis off - - algo = {'clipper', 'mrf'}; - for i = 1:numel (algo) - subplot (3, 3, i+2); - tic - [opol, npol] = clipPolygon (pol1, pol2, 3, 'clipper'); - printf('%s took: %f seconds (union)\n', algo{i}, toc); - drawFilledPolygon (opol, 'edgecolor', 'r', 'facecolor', 'g') - axis image - title (sprintf('Union - %s', algo{i})); - axis off - - subplot (3, 3, i+4); - tic - [opol, npol] = clipPolygon (pol1, pol2, 1, 'clipper'); - printf('%s took: %f seconds (and)\n', algo{i}, toc); - drawFilledPolygon (opol, 'edgecolor', 'r', 'facecolor', 'g') - axis image - title (sprintf('And - %s', algo{i})); - axis off - - subplot (3, 3, i+6); - tic - [opol, npol] = clipPolygon (pol1, pol2, 2, 'clipper'); - printf('%s took: %f seconds (xor)\n', algo{i}, toc); - drawFilledPolygon (opol, 'edgecolor', 'r', 'facecolor', 'g') - axis image - title (sprintf('Xor - %s', algo{i})); - axis off - endfor -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/polyjoin.m] ->>>>> /build/octave-geometry-4.0.0/inst/polyjoin.m -***** demo - x = {[1 2]'; [3 4]'} - y = {[10 20]'; [30 40]'} - [vecx, vecy] = polyjoin (x, y) +***** shared s + s = {[0.1 1; 1 0]}; ***** test - x = {[1 2]'; [3 4]'}; y = {[10 20]'; [30 40]'}; - [vecx, vecy] = polyjoin (x, y); - assert (vecx, [1; 2; NaN; 3; 4]); - assert (vecy, [10; 20; NaN; 30; 40]); + plotShape (s); close; ***** test - x = {[1;2]; [3;4]; [3]}; y = {[10;20]; [30;40]; [10]}; - [vecx, vecy] = polyjoin (x, y); - assert (vecx, [1; 2; NaN; 3; 4; NaN; 3]); - assert (vecy, [10; 20; NaN; 30; 40; NaN; 10]); + plotShape (s,'tol', 1e-4);close; ***** test - x = {[1 2 3]'; 4; [5 6 7 8 NaN 9]'}; - y = {[9 8 7]'; 6; [5 4 3 2 NaN 1]'}; - [vecx, vecy] = polyjoin (x, y); - assert (vecx, [1; 2; 3; NaN; 4; NaN; 5; 6; 7; 8; NaN; 9]); - assert (vecy, [9; 8; 7; NaN; 6; NaN; 5; 4; 3; 2; NaN; 1]); + plotShape (s,'color', 'm', 'tol', 1e-4);close; ***** test - xyi = {[0 0; 0 10; 10, 10; 10, 0; 0, 0]; [1 5; 2 5; 2 6; 1 6; 1 5]}; - xyo = polyjoin (xyi); - assert (polyjoin (xyi), [0 0; 0 10; 10 10; 10 0; 0 0; NaN, NaN; 1 5; 2 5; 2 6; 1 6; 1 5], eps); + plotShape (s,'color', 'm', 'linewidth', 2, 'tol', 1e-4);close; ***** test - xyi = {[0 0 1; 0 10 2; 10, 10 3; 10, 0 2; 0, 0 1]; [1 5 1.5; 2 5 2; 2 6 2.5; 1 6 2; 1 5 1.5]}; - xyo = polyjoin (xyi); - assert (polyjoin (xyi), [0 0 1; 0 10 2; 10 10 3; 10 0 2; 0 0 1; NaN, NaN NaN; 1 5 1.5; 2 5 2; 2 6 2.5; 1 6 2; 1 5 1.5], eps); + plotShape (s,'color', 'm', 'tol', 1e-4, 'linewidth', 2);close; ***** test - assert (polyjoin ({[2, 3]}), [2, 3], eps); -***** error polyjoin (1); -***** error polyjoin ({2}); -***** error polyjoin ({2, 3}); -***** error polyjoin ({1; 2}, [3 4]); -***** warning polyjoin ({1; 2}, {3 4}); -11 tests, 11 passed, 0 known failure, 0 skipped + plotShape (s,'-om', 'tol', 1e-4, 'linewidth', 2);close; + plotShape (s,'tol', 1e-4, '-om', 'linewidth', 2);close; + plotShape (s,'-om', 'linewidth', 2, 'tol', 1e-4);close; +***** test + plotShape (s,'-om', 'tol', 1e-4, 'tol', 1e-2);close; +7 tests, 7 passed, 0 known failure, 0 skipped [inst/isPolygonCCW.m] >>>>> /build/octave-geometry-4.0.0/inst/isPolygonCCW.m ***** shared pccw, pcw, pxccw, pyccw, pxnan, pynan, pnan @@ -2935,71 +2877,9 @@ ***** xtest assert (isPolygonCCW(pnan,[],"clipper"), [true; false]); ***** xtest assert (isPolygonCCW({pnan,pcw},[],"clipper"),{[true; false], false}); 14 tests, 14 passed, 0 known failure, 0 skipped -[inst/simplifyPolygon_geometry.m] ->>>>> /build/octave-geometry-4.0.0/inst/simplifyPolygon_geometry.m -***** test - P = [0 0; 1 0; 0 1]; - P2 = [0 0; 0.1 0; 0.2 0; 0.25 0; 1 0; 0 1; 0 0.7; 0 0.6; 0 0.3; 0 0.1]; - assert(simplifyPolygon_geometry (P2),P,min(P2(:))*eps) -***** demo - - P = [0 0; 1 0; 0 1]; - P2 = [0 0; 0.1 0; 0.2 0; 0.25 0; 1 0; 0 1; 0 0.7; 0 0.6; 0 0.3; 0 0.1]; - Pr = simplifyPolygon_geometry (P2); - - cla - drawPolygon(P,'or;Reference;'); - hold on - drawPolygon(P2,'x-b;Redundant;'); - drawPolygon(Pr,'*g;Simplified;'); - hold off - - # -------------------------------------------------------------------------- - # The two polygons describe the same figure, a triangle. Extra points are - # removed from the redundant one. -1 test, 1 passed, 0 known failure, 0 skipped -[inst/orientPolygon.m] ->>>>> /build/octave-geometry-4.0.0/inst/orientPolygon.m -***** shared pccw, pcw, pxccw, pyccw, pxnan, pynan, pnan - pccw = [0 0; 1 0; 1 1; 0 1]; - pcw = reversePolygon (pccw); - pxccw = pccw(:,1); - pyccw = pccw(:,2); - pxnan = [2; 2; 0; 0; NaN; 0; 0; 2]; - pynan = [0; 2; 2; 0; NaN; 0; 3; 0]; - pnan = [pxnan pynan]; -***** test - x = orientPolygon (pccw,[],"ccw"); - assert (x, pccw); -***** test - x = orientPolygon (pccw,[],"cw"); - assert (x, pcw); -***** test - x = orientPolygon (pcw,[],"ccw"); - assert (x, pccw); -***** test - x = orientPolygon (pcw,[],"cw"); - assert (x, pcw); -***** test - x = orientPolygon (pnan,[],"cw"); - y = splitPolygons (pnan); - y = joinPolygons ({reversePolygon(y{1}); y{2}}); - assert (x, y); -***** test - x = orientPolygon (pnan,[],"ccw"); - y = splitPolygons (pnan); - y = joinPolygons ({y{1}; reversePolygon(y{2})}); - assert (x, y); -***** test - [x y] = orientPolygon (pxccw,pyccw,"ccw"); - assert ([x y], pccw); -***** test - [x y] = orientPolygon (pxccw,pyccw,"cw"); - assert ([x y], pcw); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/shapeCentroid.m] ->>>>> /build/octave-geometry-4.0.0/inst/shapeCentroid.m -***** demo # non-convex bezier shape +[inst/shapeArea.m] +>>>>> /build/octave-geometry-4.0.0/inst/shapeArea.m +***** demo # non-convex piece-wise polynomial shape boomerang = {[ 0 -2 1; ... -4 4 0]; ... [0.25 -1; ... @@ -3008,42 +2888,12 @@ -3 3 0]; [0.25 0.75; ... 0 0]}; - CoM = shapeCentroid (boomerang) - Gcentroid = centroid(shape2polygon(boomerang)) - figure(1); clf; - plotShape(boomerang,'-o'); - hold on - drawPoint(CoM,'xk;shape centroid;'); - drawPoint(Gcentroid,'xr;point centroid;'); - hold off - axis equal -***** demo - Lshape = {[0.00000 0.76635; -0.67579 -0.24067]; ... - [0.77976 0.76635; 0.00000 -0.91646]; ... - [0.00000 1.54611; 0.38614 -0.91646]; ... - [-0.43813 1.54611; 0.00000 -0.53032]; ... - [0.00000 1.10798; 0.28965 -0.53032]; ... - [-0.34163 1.10798; 0.00000 -0.24067]};... - CoM = shapeCentroid (Lshape) - Gcentroid = centroid (shape2polygon (Lshape)) - - plotShape(Lshape,'-o'); - hold on - drawPoint(CoM,'xk;shape centroid;'); - drawPoint(Gcentroid,'xr;point centroid;'); - hold off - axis equal -***** test - warning('off', 'geom2d:cw-shape', 'local'); - square = {[1 -0.5; 0 -0.5]; [0 0.5; 1 -0.5]; [-1 0.5; 0 0.5]; [0 -0.5; -1 0.5]}; - CoM = shapeCentroid (square); - assert (CoM, [0 0], sqrt(eps)); + A = shapeArea (boomerang) ***** test warning('off', 'geom2d:cw-shape', 'local'); - square = {[1 -0.5; 0 -0.5]; [0 0.5; 1 -0.5]; [-1 0.5; 0 0.5]; [0 -0.5; -1 0.5]}; - square_t = transformShape (square,[1;1]); - CoM = shapeCentroid (square_t); - assert (CoM, [1 1], sqrt(eps)); + triangle = {[1 0; 0 0]; [-0.5 1; 1 0]; [-0.5 0.5; -1 1]}; + A = shapeArea (triangle); + assert (0.5, A); ***** test warning('off', 'geom2d:cw-shape', 'local'); circle = {[1.715729 -6.715729 0 5; ... @@ -3054,107 +2904,21 @@ 1.715729 1.568542 -8.284271 0]; ... [-1.715729 -1.568542 8.284271 0; ... -1.715729 6.715729 0 -5]}; - CoM = shapeCentroid (circle); - assert (CoM , [0 0], 5e-3); -***** shared shape - shape = {[-93.172 606.368 -476.054 291.429; ... - -431.196 637.253 11.085 163.791]; ... - [-75.3626 -253.2337 457.1678 328.5714; ... - 438.7659 -653.6278 -7.9953 380.9336]; ... - [-89.5841 344.9716 -275.3876 457.1429; ... - -170.3613 237.8858 1.0469 158.0765];... - [32.900 -298.704 145.804 437.143; ... - -243.903 369.597 -34.265 226.648]; ... - [-99.081 409.127 -352.903 317.143; ... - 55.289 -114.223 -26.781 318.076]; ... - [-342.231 191.266 168.108 274.286; ... - 58.870 -38.083 -89.358 232.362]}; -***** test # x-Reflection - warning('off', 'geom2d:cw-shape', 'local'); - v = shapeCentroid (shape)(:); - T = createLineReflection([0 0 1 0]); - nshape = transformShape (shape, T); - vn = shapeCentroid (nshape)(:); - assert(vn,T(1:2,1:2)*v); -***** test # Rotation - warning('off', 'geom2d:cw-shape', 'local'); - v = shapeCentroid (shape)(:); - T = createRotation(v.',pi/2); - nshape = transformShape (shape, T); - vn = shapeCentroid (nshape)(:); - assert(vn,v,1e-2); -***** test # Translation - warning('off', 'geom2d:cw-shape', 'local'); - v = shapeCentroid (shape)(:); - nshape = transformShape (shape, -v); - vn = shapeCentroid (nshape)(:); - assert(vn,[0; 0],1e-2); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/polybool.m] ->>>>> /build/octave-geometry-4.0.0/inst/polybool.m -***** shared ipol, cpol, ix, iy, cx, cy, xi, yi, xc, yc - ipol = [0 0; 3 0; 3 3; 0 3; 0 0]; - cpol = [2, 1; 5, 1; 5, 4; 2, 4; 2, 1]; - ix = {ipol(:, 1)'}; - iy = {ipol(:, 2)'}; - cx = {cpol(:, 1)'}; - cy = {cpol(:, 2)'}; - xi = {ipol(:, 1)}; - yi = {ipol(:, 2)}; - xc = {cpol(:, 1)}; - yc = {cpol(:, 2)}; -***** test - opol = polybool (0, ipol, cpol); - assert (size (opol), [7, 2]); - assert (polygonArea (opol), 7); -***** test - [ox, oy] = polybool (0, ix, iy, cx, cy); - opol = [ox{1}', oy{1}']; - assert (size (opol), [7, 2]); - assert (polygonArea (opol), 7); -***** test - [ox, oy] = polybool (0, xi, yi, xc, yc); - opol = [ox{1}, oy{1}]; - assert (size (opol), [7, 2]); - assert (polygonArea (opol), 7); -***** test - opol = polybool (1, cpol, ipol); - assert (size (opol), [5, 2]); - assert (polygonArea (opol), 2); -***** test - [ox, oy] = polybool (1, ix, iy, cx, cy); - opol = [ox{1}', oy{1}']; - assert (size (opol), [5, 2]); - assert (polygonArea (opol), 2); -***** test - opol = polybool (2, cpol, ipol); - assert (size (opol), [15, 2]); - assert (polygonArea (opol), 14); + A = shapeArea (circle); + assert (pi*5^2, A, 5e-2); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/joinPolygons.m] +>>>>> /build/octave-geometry-4.0.0/inst/joinPolygons.m ***** test - [ox, oy] = polybool (2, ix, iy, cx, cy); - opol = [ox{1}', oy{1}']; - assert (size (opol), [15, 2]); - assert (polygonArea (opol), 14); + assert (joinPolygons ({1,2}), [1 2]); ***** test - opol = polybool (3, cpol, ipol); - assert (size (opol), [9, 2]); - assert (polygonArea (opol), 16); + assert (joinPolygons ({}), []); ***** test - [ox, oy] = polybool (3, ix, iy, cx, cy); - opol = [ox{1}', oy{1}']; - assert (size (opol), [9, 2]); - assert (polygonArea (opol), 16); -***** error polybool ("a", 1, 2, 3 ,4); -***** error polybool (-1, 1, 2); -***** error polybool (-1, [1 1; 2 2; 3 3], [2 2; 3 3; 4 4]); -***** error polybool (1, [0 0 0; 2 2 2; 5 5 5], [1 1 1; 3 3 3]); -***** error polybool (1, [0 0 0; 2 2 2; 5 5 5], [1 1 1; 3 3 3; 6 6 7]); -***** error polybool (1, {1, 2}, [1, 2]); -***** error polybool (1, {[1, 2, 3]}, {[1, 2, 3, 4]}); -***** error polybool (1, {[1, 2, 3]}, {[1, 2, 3]}, {[1, 2, 3]}, {[1, 2, 4, 5]}); -***** error polybool ('z', {[1, 2, 3]}, {[1, 2, 3]}, {[1, 2, 3]}, {[1, 2, 4]}); -***** error polybool (1, [1 1; 2 2; 3 3], [2 2; 3 3; 4 4], "abc") -19 tests, 19 passed, 0 known failure, 0 skipped + XY = joinPolygons ({[1 6; 2 5; 3 4]; [4 3; 5 2; 6 1]}); + assert (XY, [1 6; 2 5; 3 4; NaN NaN; 4 3; 5 2; 6 1]); +***** error joinPolygons ([1 2 NaN 3 4], [56 NaN 78]) +***** error joinPolygons ({[1,0], [0,2]}); +5 tests, 5 passed, 0 known failure, 0 skipped [inst/clipPolygon_mrf.m] >>>>> /build/octave-geometry-4.0.0/inst/clipPolygon_mrf.m ***** test @@ -3294,6 +3058,134 @@ axis off title "7. Clip - sub"; 4 tests, 4 passed, 0 known failure, 0 skipped +[inst/ispolycw.m] +>>>>> /build/octave-geometry-4.0.0/inst/ispolycw.m +***** shared pccw, pcw, ph + pccw = pcw = [0 0; 1 0; 1 1; 0 1]; + pcw([2 4],:) = pcw([4 2], :); + ph = [pccw; nan(1,2); 0.5*pcw+[0.25 0.25]]; +***** assert (~ispolycw (pccw)); +***** assert (ispolycw (pcw)); +***** assert (ispolycw ({pccw;pcw}), [false;true]); +***** assert (ispolycw ({pccw,pcw}), [false,true]); +***** assert (ispolycw(ph),[false;true]); +***** test + phcw = [pcw; nan(1,2); 0.5*pccw+[0.25 0.25]]; + assert (ispolycw(phcw),[true;false]); +***** test + x=[0 0 2 2 NaN 0 2 0]; y=[0 2 2 0 NaN 0 0 3]; + assert(ispolycw(x,y),[true;false]); +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/polygon2shape.m] +>>>>> /build/octave-geometry-4.0.0/inst/polygon2shape.m +***** test + pp = [0 0; 1 0; 1 1; 0 1]; + s = polygon2shape (pp); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/orientPolygon.m] +>>>>> /build/octave-geometry-4.0.0/inst/orientPolygon.m +***** shared pccw, pcw, pxccw, pyccw, pxnan, pynan, pnan + pccw = [0 0; 1 0; 1 1; 0 1]; + pcw = reversePolygon (pccw); + pxccw = pccw(:,1); + pyccw = pccw(:,2); + pxnan = [2; 2; 0; 0; NaN; 0; 0; 2]; + pynan = [0; 2; 2; 0; NaN; 0; 3; 0]; + pnan = [pxnan pynan]; +***** test + x = orientPolygon (pccw,[],"ccw"); + assert (x, pccw); +***** test + x = orientPolygon (pccw,[],"cw"); + assert (x, pcw); +***** test + x = orientPolygon (pcw,[],"ccw"); + assert (x, pccw); +***** test + x = orientPolygon (pcw,[],"cw"); + assert (x, pcw); +***** test + x = orientPolygon (pnan,[],"cw"); + y = splitPolygons (pnan); + y = joinPolygons ({reversePolygon(y{1}); y{2}}); + assert (x, y); +***** test + x = orientPolygon (pnan,[],"ccw"); + y = splitPolygons (pnan); + y = joinPolygons ({y{1}; reversePolygon(y{2})}); + assert (x, y); +***** test + [x y] = orientPolygon (pxccw,pyccw,"ccw"); + assert ([x y], pccw); +***** test + [x y] = orientPolygon (pxccw,pyccw,"cw"); + assert ([x y], pcw); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/polybool.m] +>>>>> /build/octave-geometry-4.0.0/inst/polybool.m +***** shared ipol, cpol, ix, iy, cx, cy, xi, yi, xc, yc + ipol = [0 0; 3 0; 3 3; 0 3; 0 0]; + cpol = [2, 1; 5, 1; 5, 4; 2, 4; 2, 1]; + ix = {ipol(:, 1)'}; + iy = {ipol(:, 2)'}; + cx = {cpol(:, 1)'}; + cy = {cpol(:, 2)'}; + xi = {ipol(:, 1)}; + yi = {ipol(:, 2)}; + xc = {cpol(:, 1)}; + yc = {cpol(:, 2)}; +***** test + opol = polybool (0, ipol, cpol); + assert (size (opol), [7, 2]); + assert (polygonArea (opol), 7); +***** test + [ox, oy] = polybool (0, ix, iy, cx, cy); + opol = [ox{1}', oy{1}']; + assert (size (opol), [7, 2]); + assert (polygonArea (opol), 7); +***** test + [ox, oy] = polybool (0, xi, yi, xc, yc); + opol = [ox{1}, oy{1}]; + assert (size (opol), [7, 2]); + assert (polygonArea (opol), 7); +***** test + opol = polybool (1, cpol, ipol); + assert (size (opol), [5, 2]); + assert (polygonArea (opol), 2); +***** test + [ox, oy] = polybool (1, ix, iy, cx, cy); + opol = [ox{1}', oy{1}']; + assert (size (opol), [5, 2]); + assert (polygonArea (opol), 2); +***** test + opol = polybool (2, cpol, ipol); + assert (size (opol), [15, 2]); + assert (polygonArea (opol), 14); +***** test + [ox, oy] = polybool (2, ix, iy, cx, cy); + opol = [ox{1}', oy{1}']; + assert (size (opol), [15, 2]); + assert (polygonArea (opol), 14); +***** test + opol = polybool (3, cpol, ipol); + assert (size (opol), [9, 2]); + assert (polygonArea (opol), 16); +***** test + [ox, oy] = polybool (3, ix, iy, cx, cy); + opol = [ox{1}', oy{1}']; + assert (size (opol), [9, 2]); + assert (polygonArea (opol), 16); +***** error polybool ("a", 1, 2, 3 ,4); +***** error polybool (-1, 1, 2); +***** error polybool (-1, [1 1; 2 2; 3 3], [2 2; 3 3; 4 4]); +***** error polybool (1, [0 0 0; 2 2 2; 5 5 5], [1 1 1; 3 3 3]); +***** error polybool (1, [0 0 0; 2 2 2; 5 5 5], [1 1 1; 3 3 3; 6 6 7]); +***** error polybool (1, {1, 2}, [1, 2]); +***** error polybool (1, {[1, 2, 3]}, {[1, 2, 3, 4]}); +***** error polybool (1, {[1, 2, 3]}, {[1, 2, 3]}, {[1, 2, 3]}, {[1, 2, 4, 5]}); +***** error polybool ('z', {[1, 2, 3]}, {[1, 2, 3]}, {[1, 2, 3]}, {[1, 2, 4]}); +***** error polybool (1, [1 1; 2 2; 3 3], [2 2; 3 3; 4 4], "abc") +19 tests, 19 passed, 0 known failure, 0 skipped [inst/poly2ccw.m] >>>>> /build/octave-geometry-4.0.0/inst/poly2ccw.m ***** test @@ -3310,41 +3202,60 @@ assert (xccw,xexp); assert (yccw,yexp); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/plotShape.m] ->>>>> /build/octave-geometry-4.0.0/inst/plotShape.m +[inst/clipPolygon.m] +>>>>> /build/octave-geometry-4.0.0/inst/clipPolygon.m +***** error clipPolygon([],[],[],'abracadabra') +***** error clipPolygon([0 0; 0 1; 0.5 1],[-1 -1; -1 1; 0 1],'no-op') ***** demo - # Taylor series of cos(pi*x),sin(pi*x) - n = 5; N = 0:5; - s{1}(1,2:2:2*n+2) = fliplr ( (-1).^N .* (pi).^(2*N) ./ factorial (2*N)); - s{1}(2,1:2:2*n+1) = fliplr ( (-1).^N .* (pi).^(2*N+1) ./ factorial (2*N+1)); + pol1 = [2 2; 6 2; 6 6; 2 6; 2 2; NaN NaN; 3 3; 3 5; 5 5; 5 3; 3 3]; + pol2 = [1 2; 7 4; 4 7; 1 2; NaN NaN; 2.5 3; 5.5 4; 4 5.5; 2.5 3]; - h(1) = plotShape (s, 'tol', 1e-1, 'color','b'); - h(2) = plotShape (s, 'tol', 1e-3, 'color', 'm'); - h(3) = plotShape (s, 'tol', 1e-9, 'color', 'g'); - legend (h, {'1e-1','1e-3','1e-9'}) + subplot (3, 3, 1) + drawFilledPolygon (pol1, 'edgecolor', 'k', 'facecolor', 'c') axis image -***** shared s - s = {[0.1 1; 1 0]}; -***** test - plotShape (s); close; -***** test - plotShape (s,'tol', 1e-4);close; -***** test - plotShape (s,'color', 'm', 'tol', 1e-4);close; -***** test - plotShape (s,'color', 'm', 'linewidth', 2, 'tol', 1e-4);close; -***** test - plotShape (s,'color', 'm', 'tol', 1e-4, 'linewidth', 2);close; -***** test - plotShape (s,'-om', 'tol', 1e-4, 'linewidth', 2);close; - plotShape (s,'tol', 1e-4, '-om', 'linewidth', 2);close; - plotShape (s,'-om', 'linewidth', 2, 'tol', 1e-4);close; -***** test - plotShape (s,'-om', 'tol', 1e-4, 'tol', 1e-2);close; -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/shapeArea.m] ->>>>> /build/octave-geometry-4.0.0/inst/shapeArea.m -***** demo # non-convex piece-wise polynomial shape + title ('1. Subject polygon') + axis off + + subplot (3, 3, 2) + drawFilledPolygon (pol1, 'linestyle', 'none', 'facecolor', 'c') + drawFilledPolygon (pol2, 'edgecolor', 'b', 'facecolor', 'y') + axis image + title ('2. Clip polygon') + axis off + + algo = {'clipper', 'mrf'}; + for i = 1:numel (algo) + subplot (3, 3, i+2); + tic + [opol, npol] = clipPolygon (pol1, pol2, 3, 'clipper'); + printf('%s took: %f seconds (union)\n', algo{i}, toc); + drawFilledPolygon (opol, 'edgecolor', 'r', 'facecolor', 'g') + axis image + title (sprintf('Union - %s', algo{i})); + axis off + + subplot (3, 3, i+4); + tic + [opol, npol] = clipPolygon (pol1, pol2, 1, 'clipper'); + printf('%s took: %f seconds (and)\n', algo{i}, toc); + drawFilledPolygon (opol, 'edgecolor', 'r', 'facecolor', 'g') + axis image + title (sprintf('And - %s', algo{i})); + axis off + + subplot (3, 3, i+6); + tic + [opol, npol] = clipPolygon (pol1, pol2, 2, 'clipper'); + printf('%s took: %f seconds (xor)\n', algo{i}, toc); + drawFilledPolygon (opol, 'edgecolor', 'r', 'facecolor', 'g') + axis image + title (sprintf('Xor - %s', algo{i})); + axis off + endfor +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/shapeCentroid.m] +>>>>> /build/octave-geometry-4.0.0/inst/shapeCentroid.m +***** demo # non-convex bezier shape boomerang = {[ 0 -2 1; ... -4 4 0]; ... [0.25 -1; ... @@ -3353,12 +3264,42 @@ -3 3 0]; [0.25 0.75; ... 0 0]}; - A = shapeArea (boomerang) + CoM = shapeCentroid (boomerang) + Gcentroid = centroid(shape2polygon(boomerang)) + figure(1); clf; + plotShape(boomerang,'-o'); + hold on + drawPoint(CoM,'xk;shape centroid;'); + drawPoint(Gcentroid,'xr;point centroid;'); + hold off + axis equal +***** demo + Lshape = {[0.00000 0.76635; -0.67579 -0.24067]; ... + [0.77976 0.76635; 0.00000 -0.91646]; ... + [0.00000 1.54611; 0.38614 -0.91646]; ... + [-0.43813 1.54611; 0.00000 -0.53032]; ... + [0.00000 1.10798; 0.28965 -0.53032]; ... + [-0.34163 1.10798; 0.00000 -0.24067]};... + CoM = shapeCentroid (Lshape) + Gcentroid = centroid (shape2polygon (Lshape)) + + plotShape(Lshape,'-o'); + hold on + drawPoint(CoM,'xk;shape centroid;'); + drawPoint(Gcentroid,'xr;point centroid;'); + hold off + axis equal ***** test warning('off', 'geom2d:cw-shape', 'local'); - triangle = {[1 0; 0 0]; [-0.5 1; 1 0]; [-0.5 0.5; -1 1]}; - A = shapeArea (triangle); - assert (0.5, A); + square = {[1 -0.5; 0 -0.5]; [0 0.5; 1 -0.5]; [-1 0.5; 0 0.5]; [0 -0.5; -1 0.5]}; + CoM = shapeCentroid (square); + assert (CoM, [0 0], sqrt(eps)); +***** test + warning('off', 'geom2d:cw-shape', 'local'); + square = {[1 -0.5; 0 -0.5]; [0 0.5; 1 -0.5]; [-1 0.5; 0 0.5]; [0 -0.5; -1 0.5]}; + square_t = transformShape (square,[1;1]); + CoM = shapeCentroid (square_t); + assert (CoM, [1 1], sqrt(eps)); ***** test warning('off', 'geom2d:cw-shape', 'local'); circle = {[1.715729 -6.715729 0 5; ... @@ -3369,27 +3310,65 @@ 1.715729 1.568542 -8.284271 0]; ... [-1.715729 -1.568542 8.284271 0; ... -1.715729 6.715729 0 -5]}; - A = shapeArea (circle); - assert (pi*5^2, A, 5e-2); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/ispolycw.m] ->>>>> /build/octave-geometry-4.0.0/inst/ispolycw.m -***** shared pccw, pcw, ph - pccw = pcw = [0 0; 1 0; 1 1; 0 1]; - pcw([2 4],:) = pcw([4 2], :); - ph = [pccw; nan(1,2); 0.5*pcw+[0.25 0.25]]; -***** assert (~ispolycw (pccw)); -***** assert (ispolycw (pcw)); -***** assert (ispolycw ({pccw;pcw}), [false;true]); -***** assert (ispolycw ({pccw,pcw}), [false,true]); -***** assert (ispolycw(ph),[false;true]); -***** test - phcw = [pcw; nan(1,2); 0.5*pccw+[0.25 0.25]]; - assert (ispolycw(phcw),[true;false]); + CoM = shapeCentroid (circle); + assert (CoM , [0 0], 5e-3); +***** shared shape + shape = {[-93.172 606.368 -476.054 291.429; ... + -431.196 637.253 11.085 163.791]; ... + [-75.3626 -253.2337 457.1678 328.5714; ... + 438.7659 -653.6278 -7.9953 380.9336]; ... + [-89.5841 344.9716 -275.3876 457.1429; ... + -170.3613 237.8858 1.0469 158.0765];... + [32.900 -298.704 145.804 437.143; ... + -243.903 369.597 -34.265 226.648]; ... + [-99.081 409.127 -352.903 317.143; ... + 55.289 -114.223 -26.781 318.076]; ... + [-342.231 191.266 168.108 274.286; ... + 58.870 -38.083 -89.358 232.362]}; +***** test # x-Reflection + warning('off', 'geom2d:cw-shape', 'local'); + v = shapeCentroid (shape)(:); + T = createLineReflection([0 0 1 0]); + nshape = transformShape (shape, T); + vn = shapeCentroid (nshape)(:); + assert(vn,T(1:2,1:2)*v); +***** test # Rotation + warning('off', 'geom2d:cw-shape', 'local'); + v = shapeCentroid (shape)(:); + T = createRotation(v.',pi/2); + nshape = transformShape (shape, T); + vn = shapeCentroid (nshape)(:); + assert(vn,v,1e-2); +***** test # Translation + warning('off', 'geom2d:cw-shape', 'local'); + v = shapeCentroid (shape)(:); + nshape = transformShape (shape, -v); + vn = shapeCentroid (nshape)(:); + assert(vn,[0; 0],1e-2); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/simplifyPolygon_geometry.m] +>>>>> /build/octave-geometry-4.0.0/inst/simplifyPolygon_geometry.m ***** test - x=[0 0 2 2 NaN 0 2 0]; y=[0 2 2 0 NaN 0 0 3]; - assert(ispolycw(x,y),[true;false]); -7 tests, 7 passed, 0 known failure, 0 skipped + P = [0 0; 1 0; 0 1]; + P2 = [0 0; 0.1 0; 0.2 0; 0.25 0; 1 0; 0 1; 0 0.7; 0 0.6; 0 0.3; 0 0.1]; + assert(simplifyPolygon_geometry (P2),P,min(P2(:))*eps) +***** demo + + P = [0 0; 1 0; 0 1]; + P2 = [0 0; 0.1 0; 0.2 0; 0.25 0; 1 0; 0 1; 0 0.7; 0 0.6; 0 0.3; 0 0.1]; + Pr = simplifyPolygon_geometry (P2); + + cla + drawPolygon(P,'or;Reference;'); + hold on + drawPolygon(P2,'x-b;Redundant;'); + drawPolygon(Pr,'*g;Simplified;'); + hold off + + # -------------------------------------------------------------------------- + # The two polygons describe the same figure, a triangle. Extra points are + # removed from the redundant one. +1 test, 1 passed, 0 known failure, 0 skipped [inst/@svg/svg.m] >>>>> /build/octave-geometry-4.0.0/inst/@svg/svg.m ***** test @@ -3412,6 +3391,79 @@ dc.plot(); dc.plot('color','r','linewidth',2); 3 tests, 2 passed, 1 known failure, 0 skipped +[inst/polyjoin.m] +>>>>> /build/octave-geometry-4.0.0/inst/polyjoin.m +***** demo + x = {[1 2]'; [3 4]'} + y = {[10 20]'; [30 40]'} + [vecx, vecy] = polyjoin (x, y) +***** test + x = {[1 2]'; [3 4]'}; y = {[10 20]'; [30 40]'}; + [vecx, vecy] = polyjoin (x, y); + assert (vecx, [1; 2; NaN; 3; 4]); + assert (vecy, [10; 20; NaN; 30; 40]); +***** test + x = {[1;2]; [3;4]; [3]}; y = {[10;20]; [30;40]; [10]}; + [vecx, vecy] = polyjoin (x, y); + assert (vecx, [1; 2; NaN; 3; 4; NaN; 3]); + assert (vecy, [10; 20; NaN; 30; 40; NaN; 10]); +***** test + x = {[1 2 3]'; 4; [5 6 7 8 NaN 9]'}; + y = {[9 8 7]'; 6; [5 4 3 2 NaN 1]'}; + [vecx, vecy] = polyjoin (x, y); + assert (vecx, [1; 2; 3; NaN; 4; NaN; 5; 6; 7; 8; NaN; 9]); + assert (vecy, [9; 8; 7; NaN; 6; NaN; 5; 4; 3; 2; NaN; 1]); +***** test + xyi = {[0 0; 0 10; 10, 10; 10, 0; 0, 0]; [1 5; 2 5; 2 6; 1 6; 1 5]}; + xyo = polyjoin (xyi); + assert (polyjoin (xyi), [0 0; 0 10; 10 10; 10 0; 0 0; NaN, NaN; 1 5; 2 5; 2 6; 1 6; 1 5], eps); +***** test + xyi = {[0 0 1; 0 10 2; 10, 10 3; 10, 0 2; 0, 0 1]; [1 5 1.5; 2 5 2; 2 6 2.5; 1 6 2; 1 5 1.5]}; + xyo = polyjoin (xyi); + assert (polyjoin (xyi), [0 0 1; 0 10 2; 10 10 3; 10 0 2; 0 0 1; NaN, NaN NaN; 1 5 1.5; 2 5 2; 2 6 2.5; 1 6 2; 1 5 1.5], eps); +***** test + assert (polyjoin ({[2, 3]}), [2, 3], eps); +***** error polyjoin (1); +***** error polyjoin ({2}); +***** error polyjoin ({2, 3}); +***** error polyjoin ({1; 2}, [3 4]); +***** warning polyjoin ({1; 2}, {3 4}); +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/ispolyccw.m] +>>>>> /build/octave-geometry-4.0.0/inst/ispolyccw.m +***** shared pccw, pcw, ph + pccw = pcw = [0 0; 1 0; 1 1; 0 1]; + pcw([2 4],:) = pcw([4 2], :); + ph = [pccw; nan(1,2); 0.5*pcw+[0.25 0.25]]; +***** assert (ispolyccw (pccw)); +***** assert (~ispolyccw (pcw)); +***** assert (ispolyccw ({pccw;pcw}), {true false}); +***** assert (ispolyccw(ph),[true;false]); +***** test + phcw = [pcw; nan(1,2); 0.5*pccw+[0.25 0.25]]; + assert (ispolyccw(phcw),[false;true]); +***** test + x=[0 0 2 2 NaN 0 2 0]; y=[0 2 2 0 NaN 0 0 3]; + assert(ispolyccw(x,y),[false;true]); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/polysplit.m] +>>>>> /build/octave-geometry-4.0.0/inst/polysplit.m +***** test + x=[1 ;2 ;NaN ;3 ;4]; y=[4 ;3 ;NaN ;2 ;1]; + [cellx,celly]=polysplit(x,y); + assert (cellx, {[1; 2];[3; 4]}); + assert (celly, {[4; 3];[2; 1]}); +***** test + x=[1 2 NaN 3 4]; y=[4 3 NaN 2 1]; + [cellx,celly]=polysplit(x,y); + assert (cellx, {[1 2];[3 4]}); + assert (celly, {[4 3];[2 1]}); +***** test + x=[0 ;2 ;2 ;0 ;0 ;NaN ;NaN]; y=[0 ;0 ;3 ;3 ;0 ;NaN ;NaN]; + [cellx,celly]=polysplit(x,y); + assert (cellx, {[0 ;2 ;2 ;0 ;0]}); + assert (celly, {[0 ;0 ;3 ;3 ;0]}); +3 tests, 3 passed, 0 known failure, 0 skipped Checking C++ files ... Summary: 103 tests, 102 passed, 1 known failures, 0 skipped dh_installdocs -O--buildsystem=octave @@ -3429,7 +3481,7 @@ dh_strip -a -O--buildsystem=octave dh_makeshlibs -a -O--buildsystem=octave dh_shlibdeps -a -O--buildsystem=octave -dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/octave-geometry/usr/lib/arm-linux-gnueabihf/octave/packages/geometry-4.0.0/arm-unknown-linux-gnueabihf-api-v55/clipper.mex debian/octave-geometry/usr/lib/arm-linux-gnueabihf/octave/packages/geometry-4.0.0/arm-unknown-linux-gnueabihf-api-v55/polybool_mrf.oct were not linked against libpthread.so.0 (they use none of the library's symbols) +dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/octave-geometry/usr/lib/arm-linux-gnueabihf/octave/packages/geometry-4.0.0/arm-unknown-linux-gnueabihf-api-v55/polybool_mrf.oct debian/octave-geometry/usr/lib/arm-linux-gnueabihf/octave/packages/geometry-4.0.0/arm-unknown-linux-gnueabihf-api-v55/clipper.mex were not linked against libpthread.so.0 (they use none of the library's symbols) dh_octave_substvar -O--buildsystem=octave debian/rules override_dh_installdeb make[1]: Entering directory '/build/octave-geometry-4.0.0' @@ -3453,12 +3505,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/9589/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/9589/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/20154 and its subdirectories -I: Current time: Thu Aug 5 19:48:01 -12 2021 -I: pbuilder-time-stamp: 1628236081 +I: removing directory /srv/workspace/pbuilder/9589 and its subdirectories +I: Current time: Fri Aug 6 21:52:08 +14 2021 +I: pbuilder-time-stamp: 1628236328