[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Space.java, 1.256, 1.257 Project.jav
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2011-05-11 10:14:47
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory vz-cvs-2.sog:/tmp/cvs-serv28533/src/net/sourceforge/bprocessor/model Modified Files: Space.java Project.java Log Message: Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.256 retrieving revision 1.257 diff -C2 -d -r1.256 -r1.257 *** Space.java 5 May 2011 10:22:48 -0000 1.256 --- Space.java 11 May 2011 10:14:45 -0000 1.257 *************** *** 280,283 **** --- 280,294 ---- } + + public void checkAll() { + check(); + for (Item current : getElements()) { + if (current instanceof Space) { + Space child = (Space) current; + child.checkAll(); + } + } + } + /** * Perform a consistency check of the geometry. *************** *** 307,314 **** Iterator iter = getEdges().iterator(); while (iter.hasNext()) { ! Geometric current = (Geometric) iter.next(); if (current.getOwner() != this) { throw new Error(current + " not owned by " + this); } } } --- 318,333 ---- Iterator iter = getEdges().iterator(); while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); if (current.getOwner() != this) { throw new Error(current + " not owned by " + this); } + if (current.getFrom() == null) { + System.out.println("from null"); + throw new Error(current.getId() + " null from in" + this); + } + if (current.getTo() == null) { + System.out.println("to null"); + throw new Error(current.getId() + " null to in" + this); + } } } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.205 retrieving revision 1.206 diff -C2 -d -r1.205 -r1.206 *** Project.java 26 Apr 2011 06:23:03 -0000 1.205 --- Project.java 11 May 2011 10:14:45 -0000 1.206 *************** *** 842,845 **** --- 842,856 ---- */ public void setDocument(Document document) { + + Space world = document.getWorld(); + try { + System.out.println("checking : " + world); + world.checkAll(); + System.out.println("done checking : " + world); + } catch(Throwable error) { + System.out.println("caught error in checking"); + System.out.println(error.getMessage()); + } + setWorld(document.getWorld()); setActiveCoordinateSystem(document.getActiveSystem()); |