[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Surface.java,1.95,1.96
Status: Pre-Alpha
Brought to you by:
henryml
|
From: rimestad <rim...@us...> - 2006-05-08 23:58:24
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20672/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Have made the directions of controlled extrusion of bounded vertexes acording to the 3'rd edge and not the normal Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** Surface.java 1 May 2006 10:08:48 -0000 1.95 --- Surface.java 8 May 2006 15:21:23 -0000 1.96 *************** *** 629,633 **** } else { vmap[i] = v[i]; ! v2dir.put(v[i], new Direction(v[i], normal)); } } --- 629,657 ---- } else { vmap[i] = v[i]; ! Vertex dir = null; ! Collection c = v[i].getEdges(); ! Iterator iter = c.iterator(); ! while (iter.hasNext()) { ! Edge cur = (Edge)iter.next(); ! if (!this.contains(cur)) { ! dir = cur.getDirection(); ! if (dir.dot(normal) < 0) { ! dir.scale(-1); ! } ! dir.scale(1 / dir.length()); ! if (normal.getX() != 0) { ! dir.scale(1 / normal.dot(dir)); ! } else if (normal.getY() != 0) { ! dir.scale(1 / normal.dot(dir)); ! } else { ! dir.scale(1 / normal.dot(dir)); ! } ! log.info("Dir became: " + dir); ! } ! } ! if (dir == null) { ! dir = normal; ! } ! v2dir.put(v[i], new Direction(v[i], dir)); } } |