Skip to content

Commit

Permalink
Merge branch 'master' into feature/neuronlistfh-db1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbates committed Jan 26, 2021
2 parents 810e994 + eae539f commit d8e0cd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/hxsurf.R
Expand Up @@ -709,10 +709,7 @@ pointsinside<-function(x, surf, ...) UseMethod('pointsinside')
#' @rdname pointsinside
pointsinside.default<-function(x, surf, ..., rval=c('logical','distance',
'mesh3d', 'consistent_logical')) {
if(!requireNamespace('Rvcg', quietly = TRUE))
stop("Please install suggested library Rvcg to use pointsinside")
rval=match.arg(rval)

if(rval=='logical') {
# use optimised contains_points approach
return(contains_points(surf, x, ...))
Expand All @@ -723,6 +720,9 @@ pointsinside.default<-function(x, surf, ..., rval=c('logical','distance',
"with boundingbox objects!")
}

if(!requireNamespace('Rvcg', quietly = TRUE))
stop("Please install suggested library Rvcg to use pointsinside")

if(!inherits(surf,'mesh3d')) {
surf=as.mesh3d(surf, ...)
}
Expand Down

0 comments on commit d8e0cd8

Please sign in to comment.