[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.269, 1.270
Status: Pre-Alpha
Brought to you by:
henryml
|
From: rimestad <rim...@us...> - 2007-12-12 12:56:18
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20484/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Made recursive inference of intersection on instances with instances... Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.269 retrieving revision 1.270 diff -C2 -d -r1.269 -r1.270 *** View.java 11 Dec 2007 14:49:11 -0000 1.269 --- View.java 12 Dec 2007 12:56:09 -0000 1.270 *************** *** 1290,1298 **** SelectionPath currentPath = new SelectionPath(); if (names > 1) { ! Space instance = (Space)getObject(selectBuffer.get(bufferOffset + names - 1)); ! if (unWantedEntities.contains(instance)) { continue; } - currentPath.addGeometricToPath(instance); } int id = selectBuffer.get(bufferOffset + names); --- 1290,1305 ---- SelectionPath currentPath = new SelectionPath(); if (names > 1) { ! for (int namesIndex = 1; namesIndex < names; namesIndex++) { ! Space instance = (Space)getObject(selectBuffer.get(bufferOffset + namesIndex)); ! if (unWantedEntities.contains(instance)) { ! currentPath = null; ! break; ! } ! currentPath.addGeometricToPath(instance); ! } ! if (currentPath == null) { ! bufferOffset += names + 1; continue; } } int id = selectBuffer.get(bufferOffset + names); *************** *** 1387,1393 **** } else { if (surface.getPathLength() > 1) { - Space space = (Space)surface.getFirstInPath(); Surface theSurface = ! space.getInstanceAnchor().unTranslate((Surface)surface.getLastInPath()); setLastSurface(theSurface); } else { --- 1394,1399 ---- } else { if (surface.getPathLength() > 1) { Surface theSurface = ! (Surface)surface.translateOut((Surface)surface.getLastInPath()); setLastSurface(theSurface); } else { *************** *** 1398,1404 **** if (lastSurface == null && surface != null) { if (surface.getPathLength() > 1) { - Space space = (Space)surface.getFirstInPath(); Surface theSurface = ! space.getInstanceAnchor().unTranslate((Surface)surface.getLastInPath()); setLastSurface(theSurface); } else { --- 1404,1409 ---- if (lastSurface == null && surface != null) { if (surface.getPathLength() > 1) { Surface theSurface = ! (Surface)surface.translateOut((Surface)surface.getLastInPath()); setLastSurface(theSurface); } else { *************** *** 1408,1411 **** --- 1413,1417 ---- if (edge != null) { edges.remove(edge); + Edge theEdge = (Edge)edge.translateOut((Edge)edge.getLastInPath()); if (((Edge)edge.getLastInPath()).getStrippled()) { Iterator iter = edges.iterator(); *************** *** 1413,1418 **** Edge current = (Edge) iter.next(); if (!current.getStrippled()) { ! if (((Edge)edge.getLastInPath()).intersects(current.getFrom()) && ! ((Edge)edge.getLastInPath()).intersects(current.getTo())) { edge = new SelectionPath(current); break; --- 1419,1424 ---- Edge current = (Edge) iter.next(); if (!current.getStrippled()) { ! if (theEdge.intersects(current.getFrom()) && ! theEdge.intersects(current.getTo())) { edge = new SelectionPath(current); break; *************** *** 1437,1443 **** Vertex intersection = (Vertex)vertex.getLastInPath(); if (vertex.getPathLength() > 1) { ! Space instance = (Space)vertex.getFirstInPath(); ! Vertex cur = (Vertex)vertex.getLastInPath(); ! intersection = instance.getInstanceAnchor().unTranslate(cur); } return new Intersection(intersection, Intersection.VERTEX, intersection); --- 1443,1447 ---- Vertex intersection = (Vertex)vertex.getLastInPath(); if (vertex.getPathLength() > 1) { ! intersection = (Vertex)vertex.translateOut(intersection); } return new Intersection(intersection, Intersection.VERTEX, intersection); *************** *** 1448,1452 **** Edge current = (Edge)edge.getLastInPath(); if (edge.getPathLength() > 1) { ! current = ((Space)edge.getFirstInPath()).getInstanceAnchor().unTranslate(current); } if (!current.getStrippled()) { --- 1452,1456 ---- Edge current = (Edge)edge.getLastInPath(); if (edge.getPathLength() > 1) { ! current = (Edge)edge.translateOut(current); } if (!current.getStrippled()) { *************** *** 1511,1516 **** Surface theSurface = (Surface)surface.getLastInPath(); if (surface.getPathLength() > 1) { ! Space instance = (Space)surface.getFirstInPath(); ! theSurface = instance.getInstanceAnchor().unTranslate(theSurface); } Plane plane = theSurface.plane(); --- 1515,1519 ---- Surface theSurface = (Surface)surface.getLastInPath(); if (surface.getPathLength() > 1) { ! theSurface = (Surface)(surface.translateOut(theSurface)); } Plane plane = theSurface.plane(); |