[Ptinpoly-commits] r16 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Apr 29 03:35:35 CEST 2014
Author: jmaisog
Date: 2014-04-29 03:35:28 +0200 (Tue, 29 Apr 2014)
New Revision: 16
Modified:
pkg/R/blocks2vf.R
pkg/man/pip3d.Rd
Log:
Modified: pkg/R/blocks2vf.R
===================================================================
--- pkg/R/blocks2vf.R 2014-04-27 14:25:15 UTC (rev 15)
+++ pkg/R/blocks2vf.R 2014-04-29 01:35:28 UTC (rev 16)
@@ -8,44 +8,45 @@
blkDims1 = dim(Block1)
numFaces = blkDims1[1] ;
numCols1 = blkDims1[2] ;
- if ( numCols1 != 3 ) {
- print("blocks2vf(): Number of columns in Block1 must be 3!")
- return(0);
- }
+ if ( numCols1 != 3 ) {
+ print("blocks2vf(): Number of columns in Block1 must be 3!")
+ return(0);
+ }
# Basic checks of Block2 input argument.
blkDims2 = dim(Block2)
- numRows2 = blkDims2[1] ;
+ numRows2 = blkDims2[1] ;
numCols2 = blkDims2[2] ;
- if ( numCols2 != 3 ) {
- print("blocks2vf(): Number of columns in Block2 must be 3!")
- return(0);
- }
- if ( numRows2 != numFaces ) {
- print("blocks2vf(): Number of rows in Block2 must be the same as the number of rows in Block1!")
- return(0);
- }
+ if ( numCols2 != 3 ) {
+ print("blocks2vf(): Number of columns in Block2 must be 3!")
+ return(0);
+ }
+ if ( numRows2 != numFaces ) {
+ print("blocks2vf(): Number of rows in Block2 must be the same as the number of rows in Block1!")
+ return(0);
+ }
# Basic checks of Block3 input argument.
blkDims3 = dim(Block3)
numRows3 = blkDims3[1] ;
numCols3 = blkDims3[2] ;
- if ( numCols3 != 3 ) {
- print("blocks2vf(): Number of columns in Block3 must be 3!")
- return(0);
- }
- if ( numRows3 != numRows2 ) {
- print("blocks2vf(): Number of rows in Block3 must be the same as the number of rows in Block2!")
- return(0);
- }
+ if ( numCols3 != 3 ) {
+ print("blocks2vf(): Number of columns in Block3 must be 3!")
+ return(0);
+ }
+ if ( numRows3 != numRows2 ) {
+ print("blocks2vf(): Number of rows in Block3 must be the same as the number of rows in Block2!")
+ return(0);
+ }
- # Make sure misc3d is loaded
- if ( ! require("misc3d") ) {
- print("blocks2vf(): package misc3d is required but missing!")
- return(0);
- }
+ # Make sure misc3d is loaded
+ # 4/28/2014: commented out -- misc3d is already attached by Depends.
+ # if ( ! require("misc3d") ) {
+ # print("blocks2vf(): package misc3d is required but missing!")
+ # return(0);
+ # }
- # Use misc3d function to perform the conversion.
+ # Use misc3d function to perform the conversion.
ta = makeTriangles(Block1,Block2,Block3)
ve = misc3d:::t2ve(ta)
verts = t(ve$vb)
Modified: pkg/man/pip3d.Rd
===================================================================
--- pkg/man/pip3d.Rd 2014-04-27 14:25:15 UTC (rev 15)
+++ pkg/man/pip3d.Rd 2014-04-29 01:35:28 UTC (rev 16)
@@ -92,7 +92,6 @@
# Torus example.
# Make a donut-shaped polyhedron.
-# library(misc3d)
torus <- parametric3d(fx = function(u,v) (1+0.25*cos(v))*cos(u),
fy = function(u,v) (1+0.25*cos(v))*sin(u),
fz = function(u,v) 0.25*sin(v),
@@ -103,7 +102,6 @@
# If desired, this torus can be rendered for visualization, e.g.:
# library(geometry)
# library(rgl)
-# library(misc3d)
# drawScene.rgl(torus)
# Convert the torus to vertices-faces representation.
More information about the Ptinpoly-commits
mailing list