Thread: [Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Command.java, 1.94, 1.95
Status: Pre-Alpha
Brought to you by:
henryml
From: Sebastian G. <sg...@us...> - 2010-07-17 21:19:40
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1012/src/net/sourceforge/bprocessor/model Modified Files: Command.java Log Message: Questions to Michael as comments Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** Command.java 13 Jul 2010 12:33:52 -0000 1.94 --- Command.java 17 Jul 2010 21:19:32 -0000 1.95 *************** *** 1810,1813 **** --- 1810,1814 ---- */ public Frame(Space net) { + // Space net is the B-Net which is part of the construction space, it is saved as the parameter "net" parameters.put("net", net); parameters.put("frame-width", 0.035); *************** *** 1824,1831 **** --- 1825,1834 ---- */ public String title() { + // this is the title shown on top of the parameters section return "Frame Net"; } private List<Edge> simplify(List<Edge> edges) { + // what exactly do you simplify here and why? if (edges.size() > 3) { List<Edge> result = new LinkedList(); *************** *** 1838,1846 **** Vertex next = null; for (int i = 0; i < n; i++) { ! next = vertices.get((i + 1) % n); Vertex u = current.minus(previous); Vertex v = next.minus(current); Vertex cross = u.cross(v); ! if (!cross.isZero()) { live.add(current); } --- 1841,1849 ---- Vertex next = null; for (int i = 0; i < n; i++) { ! next = vertices.get((i + 1) % n); // the reuslt is always i+1, only if i is already the last edge in the list, the operation will return 0 Vertex u = current.minus(previous); Vertex v = next.minus(current); Vertex cross = u.cross(v); ! if (!cross.isZero()) { //this excludes parallel vectors and vectors of length 0 live.add(current); } *************** *** 1876,1880 **** HashMap map = new HashMap(); for (Surface current : net.getSurfaces()) { ! surfaces.add((Surface) current.copy(map)); } } --- 1879,1883 ---- HashMap map = new HashMap(); for (Surface current : net.getSurfaces()) { ! surfaces.add((Surface) current.copy(map)); //what happens here? } } *************** *** 1882,1900 **** { ! Inverse inv = new Inverse(surfaces); for (Edge current : inv.edges()) { Collection<Surface> adjacant = inv.surfaces(current); ! if (adjacant.size() == 1) { boundary.add(current); } } ! boundary = Offset.order(boundary); } Offset.offsetIt(boundary, -inside + (delta / 2)); ! Space union = (Space) net.getOwner().find("Frame"); if (union == null) { --- 1885,1903 ---- { ! Inverse inv = new Inverse(surfaces); // inverse? for (Edge current : inv.edges()) { Collection<Surface> adjacant = inv.surfaces(current); ! if (adjacant.size() == 1) { // if an edge only is adjacent to 1 surface it is a border edge boundary.add(current); } } ! boundary = Offset.order(boundary); //order? does offset basically create a copy here? } Offset.offsetIt(boundary, -inside + (delta / 2)); ! Space union = (Space) net.getOwner().find("Frame"); //check if the frame is created or redrawn... if (union == null) { *************** *** 1907,1918 **** Collection<Surface> inserted = new LinkedList(); ! List<Edge> offset = Offset.offset(boundary, inside - (delta / 2)); Surface exterior = new Surface(simplify(offset)); inserted.add(exterior); ! List<Surface> interior = new LinkedList(); for (Surface current : surfaces) { ! List<Edge> curve = Offset.offset(current.getEdges(), -delta / 2); interior.add(new Surface(simplify(curve))); } --- 1910,1921 ---- Collection<Surface> inserted = new LinkedList(); ! List<Edge> offset = Offset.offset(boundary, inside - (delta / 2)); //offset the boundary to the inside by the frame width minus half the interior width Surface exterior = new Surface(simplify(offset)); inserted.add(exterior); ! //does this mean that the boundary edges are now basically moved inside and the next step is to move all edges inside? List<Surface> interior = new LinkedList(); for (Surface current : surfaces) { ! List<Edge> curve = Offset.offset(current.getEdges(), -delta / 2); //offset all surfaces by half the interior width interior.add(new Surface(simplify(curve))); } *************** *** 1934,1942 **** } ! Shape.addSurfacesTo(union, inserted); { Space ext = Item.createFunctionalSpace(exteriorName); Space frame = Item.createConstructionSpace(frameName); if (depth > 0) { exterior.assignBack(ext, true); --- 1937,1946 ---- } ! Shape.addSurfacesTo(union, inserted); //add geometry to the space { Space ext = Item.createFunctionalSpace(exteriorName); Space frame = Item.createConstructionSpace(frameName); + // ?????????????? What happens here? Do you assign the surface sides to the adjacent spaces? These are named in the paramters, right? if (depth > 0) { exterior.assignBack(ext, true); *************** *** 1955,1958 **** --- 1959,1963 ---- double sign; if (n1.dot(n2) < 0) { + //what does the dot product of two vectors tell me? sign = -depth; } else { |