[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Surface.java, 1.163, 1.164 Geometry.
Status: Pre-Alpha
Brought to you by:
henryml
|
From: rimestad <rim...@us...> - 2007-05-30 17:28:45
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7610/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Geometry.java Log Message: small change to surface.direction making it more conservative Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -d -r1.163 -r1.164 *** Surface.java 29 May 2007 11:49:22 -0000 1.163 --- Surface.java 30 May 2007 17:28:33 -0000 1.164 *************** *** 102,105 **** --- 102,106 ---- Vertex v = to.minus(common); Vertex cross = u.cross(v); + cross.normalize(); double determinant = system.determinant(); *************** *** 113,117 **** // the orientation of the coordinate-system: positive means right-handed // and negative means left-handed. ! if (cross.getZ() * determinant < 0) { return RIGHT; --- 114,120 ---- // the orientation of the coordinate-system: positive means right-handed // and negative means left-handed. ! if (Math.abs(cross.getZ()) < 0.01) { ! return PARALLEL; ! } if (cross.getZ() * determinant < 0) { return RIGHT; *************** *** 1369,1373 **** /** ! * * @return value */ --- 1372,1376 ---- /** ! * USE normal for the normal * @return value */ Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Geometry.java 20 May 2007 10:19:41 -0000 1.57 --- Geometry.java 30 May 2007 17:28:33 -0000 1.58 *************** *** 972,976 **** } } ! /** * Untranslates all vertices of a set of geometry, and changes the --- 972,976 ---- } } ! /** * Untranslates all vertices of a set of geometry, and changes the *************** *** 980,986 **** * @param system the coordinate system to untranslate according to */ ! public static void unTranslateGeometry(Collection geometry, CoordinateSystem system) { List<Vertex> vertices = new LinkedList<Vertex>(collect(geometry)); ! List<Vertex> unTranslatedVertices = system.unTranslate(vertices); Iterator it = vertices.iterator(); Iterator unTranslatedIt = unTranslatedVertices.iterator(); --- 980,987 ---- * @param system the coordinate system to untranslate according to */ ! public static void unTranslateGeometry(Collection<? extends Geometric> geometry, ! CoordinateSystem system) { List<Vertex> vertices = new LinkedList<Vertex>(collect(geometry)); ! List<Vertex> unTranslatedVertices = system.unTranslate(vertices, true); Iterator it = vertices.iterator(); Iterator unTranslatedIt = unTranslatedVertices.iterator(); *************** *** 993,997 **** } } ! /** * Find the angle between two edges, where both edges are treated as if they pointed --- 994,998 ---- } } ! /** * Find the angle between two edges, where both edges are treated as if they pointed |