[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/actions CsvReader.java, 1.2, 1.3
Status: Pre-Alpha
Brought to you by:
henryml
|
From: rimestad <rim...@us...> - 2007-05-30 17:31:23
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8505/src/net/sourceforge/bprocessor/gui/actions Modified Files: CsvReader.java Log Message: tried to make the spaceassignment in the readin better but not with much luck, the winding of the surfaces aren't consistens in the given data as far as I can see at least Index: CsvReader.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CsvReader.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CsvReader.java 31 Jan 2007 20:45:54 -0000 1.2 --- CsvReader.java 30 May 2007 17:31:22 -0000 1.3 *************** *** 20,23 **** --- 20,24 ---- import net.sourceforge.bprocessor.model.Classification; + import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Space; *************** *** 197,204 **** outer.addHole(s); } ! s.setFrontDomain(currentSpace); where.add(s); } else { ! log.warn("There were a edge list with fewer that 3 edges"); } verts.clear(); --- 198,233 ---- outer.addHole(s); } ! CoordinateSystem cs = new CoordinateSystem(new Vertex(1, 0, 0), new Vertex(0, 1, 0), ! new Vertex(0, 0, 1), new Vertex(0, 0, 0)); ! int dir = s.direction(cs); ! if (dir == Surface.LEFT) { ! s.setBackDomain(currentSpace); ! } else if (dir == Surface.RIGHT) { ! s.setFrontDomain(currentSpace); ! } else { ! cs = new CoordinateSystem(new Vertex(0, 0, 1), new Vertex(0, 1, 0), ! new Vertex(1, 0, 0), new Vertex(0, 0, 0)); ! dir = s.direction(cs); ! if (dir == Surface.LEFT) { ! s.setBackDomain(currentSpace); ! } else if (dir == Surface.RIGHT) { ! s.setFrontDomain(currentSpace); ! } else { ! cs = new CoordinateSystem(new Vertex(1, 0, 0), new Vertex(0, 0, 1), ! new Vertex(0, 1, 0), new Vertex(0, 0, 0)); ! dir = s.direction(cs); ! if (dir == Surface.LEFT) { ! s.setBackDomain(currentSpace); ! } else if (dir == Surface.RIGHT) { ! s.setFrontDomain(currentSpace); ! } else { ! log.info("Had to give up assigning"); ! } ! } ! } where.add(s); + log.debug("Surface " + s + " had a direction of " + dir); } else { ! log.warn("There were a edge list with fewer than 3 edges"); } verts.clear(); |