[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30756] branches/soc-2010-rohith291991/ intern/comiso/intern: Hopefully ive got the propagation of period jumps ( p values) working.

Rohith B V rohith291991 at gmail.com
Mon Jul 26 16:14:25 CEST 2010


Revision: 30756
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30756
Author:   rohith291991
Date:     2010-07-26 16:14:25 +0200 (Mon, 26 Jul 2010)

Log Message:
-----------
Hopefully ive got the propagation of period jumps (p values) working. Only cut graph edges have non zero p.

Modified Paths:
--------------
    branches/soc-2010-rohith291991/intern/comiso/intern/CMesh.cpp
    branches/soc-2010-rohith291991/intern/comiso/intern/uv.cpp

Modified: branches/soc-2010-rohith291991/intern/comiso/intern/CMesh.cpp
===================================================================
--- branches/soc-2010-rohith291991/intern/comiso/intern/CMesh.cpp	2010-07-26 11:47:33 UTC (rev 30755)
+++ branches/soc-2010-rohith291991/intern/comiso/intern/CMesh.cpp	2010-07-26 14:14:25 UTC (rev 30756)
@@ -472,9 +472,22 @@
 									face->edges[k]=mesh->edges[l].index;	
 									mesh->edges[l].faces[0]=index;
 									mesh->edges[l].faces[1]=nIndex;
+									mesh->faces[nIndex].theta-=mesh->edges[l].p*(3.14159/2);
+									for (int y=0;y<3;y++)
+										{
+										if(mesh->faces[nIndex].edges[y]!=l)
+											{
+											int sign=1;
+											if(mesh->edges[mesh->faces[nIndex].edges[y]].faces[0]!=nIndex)
+												sign=-1;
+											mesh->edges[mesh->faces[nIndex].edges[y]].p+=sign*mesh->edges[l].p;
+											}
+										
+										}
+									
+									mesh->edges[l].p=0;
 									mesh->edges[l].flag |= CE_SEAM;
 
-
 									}
 
 								else if((mesh->edges[l].v[0]==v[1]&&mesh->edges[l].v[1]==v[0] ))
@@ -482,8 +495,24 @@
 									face->edges[k]=mesh->edges[l].index;
 									mesh->edges[l].faces[1]=index;
 									mesh->edges[l].faces[0]=nIndex;
+									mesh->faces[nIndex].theta-=-mesh->edges[l].p*(3.14159/2);
+									
+									for (int y=0;y<3;y++)
+										{
+										if(mesh->faces[nIndex].edges[y]!=l)
+											{
+											int sign=1;
+											if(mesh->edges[mesh->faces[nIndex].edges[y]].faces[0]!=nIndex)
+												sign=-1;
+											mesh->edges[mesh->faces[nIndex].edges[y]].p+=sign*-mesh->edges[l].p;
+											}
+										
+										}
+									
+									mesh->edges[l].p=0;
 									mesh->edges[l].flag |= CE_SEAM;
 
+
 									}
 
 								}
@@ -512,7 +541,22 @@
 									face->edges[k]=mesh->edges[l].index;	
 									mesh->edges[l].faces[0]=index;
 									mesh->edges[l].faces[1]=nIndex;
+									/*mesh->faces[nIndex].theta-=mesh->edges[l].p*(3.14159/2);
+									for (int y=0;y<3;y++)
+										{
+										if(mesh->faces[nIndex].edges[y]!=l)
+											{
+											int sign=1;
+											if(mesh->edges[mesh->faces[nIndex].edges[y]].faces[0]!=nIndex)
+												sign=-1;
+											mesh->edges[mesh->faces[nIndex].edges[y]].p=sign*mesh->edges[l].p;
+											}
+										
+										}
+								
+									mesh->edges[l].p=0;*/
 
+
 									}
 
 								else if((mesh->edges[l].v[0]==v[1]&&mesh->edges[l].v[1]==v[0] ))
@@ -520,7 +564,21 @@
 									face->edges[k]=mesh->edges[l].index;
 									mesh->edges[l].faces[1]=index;
 									mesh->edges[l].faces[0]=nIndex;
+								/*	mesh->faces[nIndex].theta-=-mesh->edges[l].p*(3.14159/2);
+									for (int y=0;y<3;y++)
+										{
+										if(mesh->faces[nIndex].edges[y]!=l)
+											{
+											int sign=1;
+											if(mesh->edges[mesh->faces[nIndex].edges[y]].faces[0]!=nIndex)
+												sign=-1;
+											mesh->edges[mesh->faces[nIndex].edges[y]].p=sign*-mesh->edges[l].p;
+											}
+										
+										}
+									mesh->edges[l].p=0;*/
 
+
 									}
 
 								}

Modified: branches/soc-2010-rohith291991/intern/comiso/intern/uv.cpp
===================================================================
--- branches/soc-2010-rohith291991/intern/comiso/intern/uv.cpp	2010-07-26 11:47:33 UTC (rev 30755)
+++ branches/soc-2010-rohith291991/intern/comiso/intern/uv.cpp	2010-07-26 14:14:25 UTC (rev 30756)
@@ -498,6 +498,7 @@
 		HEdge * hi=&hm->edges[i];
 		hi->is_resp=0;
 
+		
 		}
 
 	for(int i=0;i<totedge;i++)
@@ -701,7 +702,7 @@
 	miso.solve( A, x, b, ids_to_round);
 	cs.restore_eliminated_vars( C,x, ids_to_elim, new_idx);
 
-	std::cout<<"x: \n\n";
+std::cout<<"x: \n\n";
 	for(int i=0;i<x.size();i++)
 		{
 





More information about the Bf-blender-cvs mailing list