[Vennerable-commits] r70 - pkg/Vennerable/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Oct 8 15:09:22 CEST 2009


Author: js229
Date: 2009-10-08 15:09:22 +0200 (Thu, 08 Oct 2009)
New Revision: 70

Modified:
   pkg/Vennerable/R/02TissueDrawing.R
Log:


Modified: pkg/Vennerable/R/02TissueDrawing.R
===================================================================
--- pkg/Vennerable/R/02TissueDrawing.R	2009-10-08 13:08:18 UTC (rev 69)
+++ pkg/Vennerable/R/02TissueDrawing.R	2009-10-08 13:09:22 UTC (rev 70)
@@ -1574,21 +1574,25 @@
 	tempface2Name <- ".aSTD.temp";
 	drawing2 <- renameFaces(drawing2,face2Name,tempface2Name)
 
+	# check for name clashes, and also for identical points with different names
+	new2 <- .check.clashes(drawing1,drawing2)
 
-	# first we need to calculate a list of all the intersections and add them in
-	new2 <- .check.clashes(drawing1,drawing2)
+	# calculate a list of all the intersections and add them in as points
 	res <- .add.intersection.points(drawing1=drawing1,drawing2=new2)
 	new1=res$new1;new2=res$new2;intersectionPoints=res$intersectionPoints
+
+	# we may have two edges with different names but identical geometry, if so use the name from diagram1
 	res <- .check.duplicate.edges(drawing1=new1,drawing2=new2)
 	new1<- res$new1; new2 <- res$new2
+
+	# edges only in diagram2 need to be added to diagram1
 	posnames <- sub("^-","",names(new2 at edgeList)); negnames <- paste("-",posnames,sep="")
 	newEdges <- new2 at edgeList[! (posnames %in% names(new1 at edgeList) | negnames %in% names(new1 at edgeList)) ]
 	new1 at edgeList <- c(new1 at edgeList,newEdges)
-	# need to do this in case we relabelled an edge that a face relies on
+	# for lookups below, need to do the same in diagram2 in case we relabelled an edge that a face relies on
 	new2 at edgeList <- c(new2 at edgeList,new1 at edgeList[!names(new1 at edgeList) %in% names(new2 at edgeList)])
 
 
-
 	# that will have updated the single set in new2
 	new1 at setList <- c(new1 at setList,new2 at setList)
 	



More information about the Vennerable-commits mailing list