bprocessor-commit Mailing List for B-processor (Page 97)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael L. <he...@us...> - 2006-10-10 09:23:53
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24224/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java Log Message: extrusion operation suitable for scripting Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** SpaceTool.java 9 Oct 2006 14:02:05 -0000 1.46 --- SpaceTool.java 10 Oct 2006 09:23:49 -0000 1.47 *************** *** 683,697 **** Double distance = (Double) env.get(1); HashSet sides = new HashSet(); ! Project.getInstance().getActiveSpace().add(surface); ! Surface top = surface.extrude(distance.doubleValue(), sides); ! Project.getInstance().getActiveSpace().remove(surface); stack.push(surface); Iterator iter = sides.iterator(); while (iter.hasNext()) { Surface current = (Surface) iter.next(); - Project.getInstance().getActiveSpace().remove(current); stack.push(current); } - Project.getInstance().getActiveSpace().remove(top); stack.push(top); } --- 683,693 ---- Double distance = (Double) env.get(1); HashSet sides = new HashSet(); ! Surface top = surface.extrusion(distance.doubleValue(), sides); stack.push(surface); Iterator iter = sides.iterator(); while (iter.hasNext()) { Surface current = (Surface) iter.next(); stack.push(current); } stack.push(top); } |
From: Michael L. <he...@us...> - 2006-10-10 06:35:32
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22086/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Startet definition of new extrusion operation Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** Surface.java 6 Oct 2006 11:45:49 -0000 1.112 --- Surface.java 10 Oct 2006 06:35:28 -0000 1.113 *************** *** 428,431 **** --- 428,442 ---- /** + * Extrusion + * @param delta Dinstance + * @param sides Set + * @return Top + */ + public Surface extrusion(double delta, Set sides) { + + return null; + } + + /** * Extrude this surface * @param delta How much to extrude along the normal |
From: Michael L. <he...@us...> - 2006-10-09 14:03:18
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21047/src/net/sourceforge/bprocessor/model Modified Files: Geometry.java Space.java Log Message: Implemented Space.insert(Surface) Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** Space.java 9 Oct 2006 06:52:34 -0000 1.74 --- Space.java 9 Oct 2006 14:03:15 -0000 1.75 *************** *** 502,507 **** */ public Vertex insert(Vertex vertex, boolean split) { ! add(vertex); ! return vertex; } --- 502,540 ---- */ public Vertex insert(Vertex vertex, boolean split) { ! Space space = this; ! if (vertex.getOwner() != null) { ! if (vertex.getOwner() == space) { ! return vertex; ! } else { ! vertex = vertex.copy(); ! } ! } ! ! Vertex actual = null; ! { ! Set vertices = ! space.findByLocation (vertex.getX(), vertex.getY(), vertex.getZ(), 0.0000001); ! if (!vertices.isEmpty()) { ! actual = (Vertex) vertices.iterator().next(); ! } ! } ! ! if (actual == null) { ! actual = vertex; ! space.add(actual); ! if (split) { ! Set es = space.findEdge(actual); ! if (es.size() > 0) { ! Iterator iter = es.iterator(); ! while (iter.hasNext()) { ! Edge e = (Edge) iter.next(); ! if (!e.getStrippled()) { ! e.split(actual); ! } ! } ! } ! } ! } ! return actual; } *************** *** 581,589 **** * Insert a edge * @param edge The edge * @return The edge */ ! public Edge insert(Edge edge) { ! add(edge); ! return edge; } --- 614,650 ---- * Insert a edge * @param edge The edge + * @param split Split edges * @return The edge */ ! public Edge insert(Edge edge, boolean split) { ! Space space = this; ! ! Edge actual = edge; ! if (edge.getLength() == 0) { ! return null; ! } ! Vertex from = space.insert(edge.getFrom(), split); ! Vertex to = space.insert(edge.getTo(), split); ! edge.setFrom(from); ! edge.setTo(to); ! { ! Collection edges = space.getEdges(); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! if (current.getFrom() == edge.getFrom() && current.getTo() == edge.getTo()) { ! actual = current; ! break; ! } ! if (current.getFrom() == edge.getTo() && current.getTo() == edge.getFrom()) { ! actual = current; ! break; ! } ! } ! } ! if (actual == edge) { ! space.add(edge); ! } ! return actual; } *************** *** 804,813 **** * Insert a surface * @param surface The surface * @return The surface */ ! public Surface insert(Surface surface) { add(surface); - surface.setBackDomain(empty); - surface.setFrontDomain(empty); return surface; } --- 865,881 ---- * Insert a surface * @param surface The surface + * @param split Allow splits * @return The surface */ ! public Surface insert(Surface surface, boolean split) { ! List edges = surface.getEdges(); ! List actual = new LinkedList(); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! actual.add(insert(current, split)); ! } ! surface.setEdges(actual); add(surface); return surface; } Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Geometry.java 9 Oct 2006 13:26:15 -0000 1.31 --- Geometry.java 9 Oct 2006 14:03:15 -0000 1.32 *************** *** 745,794 **** /** - * Insert a vertex into model - * @param vertex Vertex - * @param split Split - * @return Vertex from model - */ - public static Vertex insertVertex(Vertex vertex, boolean split) { - Project p = Project.getInstance(); - Space space = p.getActiveSpace(); - - if (vertex.getOwner() != null) { - if (vertex.getOwner() == space) { - return vertex; - } else { - vertex = vertex.copy(); - } - } - - Vertex actual = null; - { - Set vertices = - space.findByLocation (vertex.getX(), vertex.getY(), vertex.getZ(), 0.0000001); - if (!vertices.isEmpty()) { - actual = (Vertex) vertices.iterator().next(); - } - } - - if (actual == null) { - actual = vertex; - space.add(actual); - if (split) { - Set es = space.findEdge(actual); - if (es.size() > 0) { - Iterator iter = es.iterator(); - while (iter.hasNext()) { - Edge e = (Edge) iter.next(); - if (!e.getStrippled()) { - e.split(actual); - } - } - } - } - } - return actual; - } - - /** * Insert a Constructor into model * @param c the constructor --- 745,748 ---- *************** *** 801,843 **** /** - * Insert an edge into model - * @param edge Edge - * @param split Split - * @return Edge from model null if to and from were the same - */ - public static Edge insertEdge(Edge edge, boolean split) { - Edge actual = edge; - if (edge.getLength() == 0) { - return null; - } - Vertex from = insertVertex(edge.getFrom(), split); - Vertex to = insertVertex(edge.getTo(), split); - edge.setFrom(from); - edge.setTo(to); - if (edge.getLength() == 0.0) { - return null; - } - { - Collection edges = Project.getInstance().getActiveSpace().getEdges(); - Iterator iter = edges.iterator(); - while (iter.hasNext()) { - Edge current = (Edge) iter.next(); - if (current.getFrom() == edge.getFrom() && current.getTo() == edge.getTo()) { - actual = current; - break; - } - if (current.getFrom() == edge.getTo() && current.getTo() == edge.getFrom()) { - actual = current; - break; - } - } - } - if (actual == edge) { - Project.getInstance().getActiveSpace().add(edge); - } - return actual; - } - - /** * Insert a number edges into the model * @param edges List of edges --- 755,758 ---- *************** *** 845,849 **** */ public static List insertEdges(List edges) { ! //boolean closed = false; List result = new LinkedList(); if (!edges.isEmpty()) { --- 760,764 ---- */ public static List insertEdges(List edges) { ! Space space = Project.getInstance().getActiveSpace(); List result = new LinkedList(); if (!edges.isEmpty()) { *************** *** 854,858 **** while (iter.hasNext()) { Edge current = (Edge) iter.next(); ! Edge edge = insertEdge(current, false); if (edge != null) { actual.add(edge); --- 769,773 ---- while (iter.hasNext()) { Edge current = (Edge) iter.next(); ! Edge edge = space.insert(current, false); if (edge != null) { actual.add(edge); *************** *** 862,866 **** Surface surface = new Surface(actual); result.add(surface); ! Project.getInstance().getActiveSpace().add(surface); holeAnalysis(surface); } --- 777,781 ---- Surface surface = new Surface(actual); result.add(surface); ! space.add(surface); holeAnalysis(surface); } *************** *** 870,874 **** while (iter.hasNext()) { Edge current = (Edge) iter.next(); ! Edge edge = insertEdge(current, true); if (edge != null) { actual.add(edge); --- 785,789 ---- while (iter.hasNext()) { Edge current = (Edge) iter.next(); ! Edge edge = space.insert(current, true); if (edge != null) { actual.add(edge); |
From: Michael L. <he...@us...> - 2006-10-09 14:02:13
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20470/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java SpaceTool.java Log Message: Implemented Space.insert(Surface) Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** SpaceTool.java 6 Oct 2006 11:45:46 -0000 1.45 --- SpaceTool.java 9 Oct 2006 14:02:05 -0000 1.46 *************** *** 718,740 **** Stack stack = new Stack(); function.evaluate(env, stack); while (!stack.empty()) { Object result = stack.pop(); if (result instanceof Vertex) { ! result = Geometry.insertVertex((Vertex)result, true); Selection.primary().add(result); } else if (result instanceof Edge) { ! result = Geometry.insertEdge((Edge)result, true); Selection.primary().add(result); } else if (result instanceof Surface) { ! Surface surface = (Surface) result; ! Geometry.insertEdges(surface.getEdges()); ! glv.setLengthValue(result.toString()); } else { glv.setLengthValue(result.toString()); } } - typing = false; - } catch (Exception error) { log.info(error); --- 718,738 ---- Stack stack = new Stack(); function.evaluate(env, stack); + Space space = Project.getInstance().getActiveSpace(); while (!stack.empty()) { Object result = stack.pop(); if (result instanceof Vertex) { ! result = space.insert((Vertex)result, true); Selection.primary().add(result); } else if (result instanceof Edge) { ! result = space.insert((Edge)result, true); Selection.primary().add(result); } else if (result instanceof Surface) { ! result = space.insert((Surface) result, true); ! Selection.primary().add(result); } else { glv.setLengthValue(result.toString()); } } typing = false; } catch (Exception error) { log.info(error); Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** ToolFactory.java 5 Oct 2006 12:19:59 -0000 1.60 --- ToolFactory.java 9 Oct 2006 14:02:05 -0000 1.61 *************** *** 211,214 **** --- 211,217 ---- this.registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "Biconconstructor.gif", "Constructor"); offBut = this.registerTool(Tool.OFFSET_TOOL, offset, "Biconoffset.gif", "Offset"); + clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, + "Bclip.gif", "Clipping"); + tb.addSeparator(3); |
From: Nordholt <nor...@us...> - 2006-10-09 13:27:26
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6699/src/net/sourceforge/bprocessor/gl/tool Modified Files: OffsetTool.java Log Message: clean up, now works for all surfaces. (no matter orientation) Index: OffsetTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/OffsetTool.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OffsetTool.java 19 Sep 2006 12:22:05 -0000 1.9 --- OffsetTool.java 9 Oct 2006 13:27:15 -0000 1.10 *************** *** 29,32 **** --- 29,33 ---- import net.sourceforge.bprocessor.model.Vertex; + import org.apache.log4j.Logger; /** * OffsetTool *************** *** 34,37 **** --- 35,41 ---- public class OffsetTool extends AbstractPencil { + /** The logger */ + private static Logger log = Logger.getLogger(OffsetTool.class); + /** The current contour */ private List contour; *************** *** 53,57 **** /** Dragging flag */ private boolean dragging; ! /** The point the offset are started from */ private Vertex edgePoint; --- 57,61 ---- /** Dragging flag */ private boolean dragging; ! /** The point the offset are started from */ private Vertex edgePoint; *************** *** 100,104 **** contour.addAll(Edge.offset(edges, surface, -(current.vertex().minus(start.vertex()).length()), directionMap)); - //directionMap = findDirections(contour, surface.normal()); feedback(contour); outNormal = startEdge.getDirection().cross(surface.normal()); --- 104,107 ---- *************** *** 109,112 **** --- 112,116 ---- } } + lastOffsetPoint = current.vertex().copy(); } else { Vertex projection = outNormal.copy(); *************** *** 142,146 **** while (it.hasNext()) { Direction d = (Direction)it.next(); ! Vertex dir = d.getDirection().copy(); dir.scale(length); d.getVertex().move(dir.getX(), dir.getY(), dir.getZ()); --- 146,151 ---- while (it.hasNext()) { Direction d = (Direction)it.next(); ! Vertex dir; ! dir = d.getDirection().copy(1); dir.scale(length); d.getVertex().move(dir.getX(), dir.getY(), dir.getZ()); *************** *** 215,294 **** /** - * Finds the directions each vertex must move inorder for - * the contour to be expanded correctly. These are put in - * the direction map. - * @param edges the contour, the list must be ordered - * @param surfaceNormal the normal of the surface we are offsetting - * @return the directionmap - */ - private Map findDirections(List edges, Vertex surfaceNormal) { - //The direction of a vertex should be the sum of the normals of each - //of its edges, and scaled propably so it does not twist the contour out of shape - Map directions = new HashMap(); - Edge firstEdge = null; - Edge e1 = null; - Edge e2 = null; - Iterator it = edges.iterator(); - if (it.hasNext()) { - firstEdge = (Edge)it.next(); - e1 = firstEdge; - } - while (it.hasNext()) { - e2 = (Edge)it.next(); - Vertex dir1 = e1.getDirection().cross(surfaceNormal); - Vertex dir2 = e2.getDirection().cross(surfaceNormal); - dir1.scale(1 / dir1.length()); - dir2.scale(1 / dir2.length()); - Vertex mainDir = dir1.add(dir2); - mainDir.scale(1 / mainDir.dot(dir1)); - if (e2.contains(e1.getTo())) { - directions.put(e1.getTo(), mainDir); - } else { - directions.put(e1.getFrom(), mainDir); - } - e1 = e2; - } - //Here I make sure the first vertex gets a direction - Vertex dir1 = e1.getDirection().cross(surfaceNormal); - Vertex dir2 = firstEdge.getDirection().cross(surfaceNormal); - dir1.scale(1 / dir1.length()); - dir2.scale(1 / dir2.length()); - Vertex mainDir = dir1.add(dir2); - mainDir.scale(1 / mainDir.dot(dir1)); - if (firstEdge.contains(e1.getTo())) { - directions.put(e1.getTo(), mainDir); - } else { - directions.put(e1.getFrom(), mainDir); - } - return directions; - } - - /** - * Copies the edges of a surface maintaining the connectivity. - * @param surface the surface - * @return a list of the edges - */ - private List copyContour(Surface surface) { - List edges = new LinkedList(); - Vertex from = null; - Vertex to = null; - Vertex first = null; - Iterator it = surface.getVertices().iterator(); - if (it.hasNext()) { - first = ((Vertex)it.next()).copy(); - from = first; - } - while (it.hasNext()) { - to = ((Vertex)it.next()).copy(); - Edge offsetEdge = new Edge(from, to); - edges.add(offsetEdge); - from = to; - } - Edge offsetEdge = new Edge(from, first); - edges.add(offsetEdge); - return edges; - } - - /** * Invoked when a mouse is dragged with button down. * @param e The MouseEvent object --- 220,223 ---- |
From: Nordholt <nor...@us...> - 2006-10-09 13:26:18
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6290/src/net/sourceforge/bprocessor/model Modified Files: Geometry.java Log Message: added logger for debugging Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Geometry.java 9 Oct 2006 06:52:34 -0000 1.30 --- Geometry.java 9 Oct 2006 13:26:15 -0000 1.31 *************** *** 17,20 **** --- 17,22 ---- import java.util.Set; + import org.apache.log4j.Logger; + /** * The Geometry class is for various geometric things *************** *** 22,25 **** --- 24,30 ---- public class Geometry { + /** The logger */ + private static Logger log = Logger.getLogger(Geometry.class); + /** * Calculate the normal that points outwards *************** *** 263,267 **** { Surface clockwise = clockwiseSurface(vertex, last, edges); ! if (clockwise != null) { if (clockwise.angle(vertex.system()) < 0) { space.add(clockwise); --- 268,272 ---- { Surface clockwise = clockwiseSurface(vertex, last, edges); ! if (clockwise != null) { if (clockwise.angle(vertex.system()) < 0) { space.add(clockwise); *************** *** 934,937 **** vertices.add(plane.center()); } ! } } --- 939,942 ---- vertices.add(plane.center()); } ! } } |
From: Nordholt <nor...@us...> - 2006-10-09 13:12:46
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv806/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Log Message: fixed offset method to work with clockwise surfaces aswell. Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Edge.java 5 Oct 2006 11:27:04 -0000 1.59 --- Edge.java 9 Oct 2006 13:12:37 -0000 1.60 *************** *** 561,574 **** /** * Create a offset from a list of lines and a surface ! * PRECONDITION: all the edges have to be in the given surface and the edges ! * in the surface have to be counter clockwise drawn. If the edges are drawn clockwise ! * the offset will be negative outside and positive inside * @param which The list of edges in inner that are going to be offset * @param inner The surface ! * @param offset The offset negative inside and positive outside * @param directions The movement directions send a empty list to retrieve direction map * @return The generated list of Edges */ public static List offset(List which, Surface inner, double offset, Map directions) { HashSet edges = new HashSet(which); ArrayList res = new ArrayList(); --- 561,573 ---- /** * Create a offset from a list of lines and a surface ! * PRECONDITION: all the edges have to be in the given surface. * @param which The list of edges in inner that are going to be offset * @param inner The surface ! * @param offset The offset: negative inside and positive outside * @param directions The movement directions send a empty list to retrieve direction map * @return The generated list of Edges */ public static List offset(List which, Surface inner, double offset, Map directions) { + boolean clockwise = Geometry.angle(inner.getVertices()) > 0; HashSet edges = new HashSet(which); ArrayList res = new ArrayList(); *************** *** 579,586 **** HashMap from2edge = new HashMap(); HashMap v2v = new HashMap(); - Iterator iter = inner.getEdges().iterator(); - Edge prevEdge = null; // Find all the affected vertexes and make the edges while (iter.hasNext()) { Edge e = (Edge)iter.next(); --- 578,584 ---- HashMap from2edge = new HashMap(); HashMap v2v = new HashMap(); Edge prevEdge = null; // Find all the affected vertexes and make the edges + Iterator iter = inner.getEdges().iterator(); while (iter.hasNext()) { Edge e = (Edge)iter.next(); *************** *** 661,665 **** dir2.normalize(); Vertex mainDir = dir1.add(dir2); ! mainDir.scale(1 / mainDir.dot(dir1)); dir.setDirection(mainDir); } else { --- 659,667 ---- dir2.normalize(); Vertex mainDir = dir1.add(dir2); ! if (clockwise) { ! mainDir.scale(-1 / mainDir.dot(dir1)); ! } else { ! mainDir.scale(1 / mainDir.dot(dir1)); ! } dir.setDirection(mainDir); } else { *************** *** 671,675 **** Vertex dir2 = other.minus(work); dir2.normalize(); ! dir2.scale(1 / dir2.dot(dir1)); dir.setDirection(dir2); } --- 673,681 ---- Vertex dir2 = other.minus(work); dir2.normalize(); ! if (clockwise) { ! dir2.scale(-1 / dir2.dot(dir1)); ! } else { ! dir2.scale(1 / dir2.dot(dir1)); ! } dir.setDirection(dir2); } *************** *** 682,686 **** Vertex dir1 = other.minus(work); dir1.normalize(); ! dir1.scale(1 / dir1.dot(dir2)); dir.setDirection(dir1); } --- 688,696 ---- Vertex dir1 = other.minus(work); dir1.normalize(); ! if (clockwise) { ! dir1.scale(-1 / dir1.dot(dir2)); ! } else { ! dir1.scale(1 / dir1.dot(dir2)); ! } dir.setDirection(dir1); } |
From: Nikolaj B. <nbr...@us...> - 2006-10-09 12:42:37
|
Update of /cvsroot/bprocessor/gui/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21502/src/gfx Added Files: Biconconspace.gif Log Message: Made some small adjustments to the treeview. Also changed the gfx on the space nodes, so there is now a visual differencet between construction and functional space icons. --- NEW FILE: Biconconspace.gif --- (This appears to be a binary file; contents omitted.) |
From: Nikolaj B. <nbr...@us...> - 2006-10-09 12:42:37
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21502/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java SpaceTreeView.java Log Message: Made some small adjustments to the treeview. Also changed the gfx on the space nodes, so there is now a visual differencet between construction and functional space icons. Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** GenericTreeView.java 5 Oct 2006 11:26:56 -0000 1.54 --- GenericTreeView.java 9 Oct 2006 12:42:29 -0000 1.55 *************** *** 70,75 **** private static final boolean SHOW_COUNTERS = false; ! /** Space icon */ ! protected static ImageIcon spaceicon; /** Space group icon*/ --- 70,78 ---- private static final boolean SHOW_COUNTERS = false; ! /** Functionalspace icon */ ! protected static ImageIcon functionalspaceicon; ! ! /** Constructionspace icon */ ! protected static ImageIcon constructionspaceicon; /** Space group icon*/ *************** *** 104,108 **** static { - spaceicon = loadIcon("Biconspace.gif"); spacegroupicon = loadIcon("Biconspacegroup.gif"); surfaceicon = loadIcon("Biconsurface.gif"); --- 107,110 ---- *************** *** 115,118 **** --- 117,122 ---- constructoricon = loadIcon("Biconconstructor.gif"); constructorgroupicon = loadIcon("Biconconstructorgroup.gif"); + constructionspaceicon = loadIcon("Biconconspace.gif"); + functionalspaceicon = loadIcon("Biconspace.gif"); } *************** *** 502,505 **** --- 506,512 ---- private static final long serialVersionUID = 1L; + /** The current space*/ + private Space current; + /** * Constructor for SpaceNode *************** *** 508,511 **** --- 515,519 ---- public SpaceNode(Space space) { super(space); + current = space; Set surfaces = space.getEnvelope(); add(new SurfaceContainer("Surfaces", surfaces)); *************** *** 565,569 **** */ public ImageIcon icon() { ! return spaceicon; } --- 573,582 ---- */ public ImageIcon icon() { ! if (current.isConstructionSpace()) { ! return constructionspaceicon; ! } else { ! return functionalspaceicon; ! } ! } *************** *** 585,589 **** */ private static final long serialVersionUID = 1L; ! /** * Constructor for SurfaceNode --- 598,602 ---- */ private static final long serialVersionUID = 1L; ! /** * Constructor for SurfaceNode *************** *** 985,988 **** --- 998,1002 ---- super(p); update(p); + add(new GeometryContainer("Geometry", Project.getInstance().world())); } Index: SpaceTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SpaceTreeView.java 3 Oct 2006 10:04:08 -0000 1.16 --- SpaceTreeView.java 9 Oct 2006 12:42:29 -0000 1.17 *************** *** 50,54 **** root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); root.add(new ParameterBlockNode("Globals", Project.getInstance().getGlobals())); - root.add(new GeometryContainer("Geometry", Project.getInstance().world())); root.add(new ConstructorContainer("Constructors", Project.getInstance().getConstructors())); model.nodeStructureChanged(root); --- 50,53 ---- |
From: rimestad <rim...@us...> - 2006-10-09 08:49:30
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26457/src/net/sourceforge/bprocessor/model Modified Files: Persistence.java Log Message: made changes to the schema so that subtypes get a type attribute that tell which type it represents so that several types can be stored as the same tag, require update of build.xml and Persistence.java as well Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Persistence.java 26 Sep 2006 09:52:24 -0000 1.9 --- Persistence.java 9 Oct 2006 08:49:21 -0000 1.10 *************** *** 189,210 **** } { ! Iterator iter = xml.getPoint().iterator(); ! while (iter.hasNext()) { ! PointType current = (PointType) iter.next(); ! space.add(internalizePoint(current, mapper, xmls)); ! } ! } ! { ! Iterator iter = xml.getLine().iterator(); ! while (iter.hasNext()) { ! LineType current = (LineType) iter.next(); ! space.add(internalizeLine(current, mapper, xmls)); ! } ! } ! { ! Iterator iter = xml.getCoordinatesystem().iterator(); while (iter.hasNext()) { ! CoordinateSystemType current = (CoordinateSystemType) iter.next(); ! space.add(internalizeCoordinateSystem(current, mapper, xmls)); } } --- 189,204 ---- } { ! Iterator iter = xml.getConstructor().iterator(); while (iter.hasNext()) { ! Object current = iter.next(); ! if (current instanceof CoordinateSystemType) { ! space.add(internalizeCoordinateSystem((CoordinateSystemType)current, mapper, xmls)); ! } else if (current instanceof PointType) { ! space.add(internalizePoint((PointType)current, mapper, xmls)); ! } else if (current instanceof LineType) { ! space.add(internalizeLine((LineType)current, mapper, xmls)); ! } else { ! log.info("Const were " + current.getClass()); ! } } } *************** *** 606,610 **** VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap()); xml.setVertex(orig); ! to.getPoint().add(xml); map.put(constructor, xml); } else if (constructor instanceof Line) { --- 600,604 ---- VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap()); xml.setVertex(orig); ! to.getConstructor().add(xml); map.put(constructor, xml); } else if (constructor instanceof Line) { *************** *** 620,624 **** VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap()); xml.setVertex(orig); ! to.getLine().add(xml); map.put(constructor, xml); } else if (constructor instanceof CoordinateSystem) { --- 614,618 ---- VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap()); xml.setVertex(orig); ! to.getConstructor().add(xml); map.put(constructor, xml); } else if (constructor instanceof CoordinateSystem) { *************** *** 638,642 **** VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap()); xml.setVertex(orig); ! to.getCoordinatesystem().add(xml); map.put(constructor, xml); } else { --- 632,636 ---- VertexType orig = externalizeVertex(constructor.getOrigin(), new HashMap()); xml.setVertex(orig); ! to.getConstructor().add(xml); map.put(constructor, xml); } else { |
From: rimestad <rim...@us...> - 2006-10-09 08:49:30
|
Update of /cvsroot/bprocessor/model/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26457/src/etc Modified Files: bprocessor.xsd Log Message: made changes to the schema so that subtypes get a type attribute that tell which type it represents so that several types can be stored as the same tag, require update of build.xml and Persistence.java as well Index: bprocessor.xsd =================================================================== RCS file: /cvsroot/bprocessor/model/src/etc/bprocessor.xsd,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** bprocessor.xsd 26 Sep 2006 09:52:25 -0000 1.17 --- bprocessor.xsd 9 Oct 2006 08:49:21 -0000 1.18 *************** *** 5,16 **** $Id$ --> ! <xsd:schema xmlns:bpr="http://bprocessor.sourceforge.net" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!-- Type definitions --> <xsd:complexType name="EntityType"> ! <xsd:sequence> ! <xsd:element name="id" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="progid" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> </xsd:complexType> --- 5,28 ---- $Id$ --> ! <xsd:schema ! xmlns:bpr="http://bprocessor.sourceforge.net" ! xmlns:xsd="http://www.w3.org/2001/XMLSchema" ! xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" ! xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" ! jaxb:extensionBindingPrefixes="xjc" ! jaxb:version="1.0"> ! ! <xsd:annotation> ! <xsd:appinfo> ! <jaxb:globalBindings> ! <xjc:typeSubstitution type="complex"/> ! </jaxb:globalBindings> ! </xsd:appinfo> ! </xsd:annotation> <!-- Type definitions --> <xsd:complexType name="EntityType"> ! <xsd:attribute name="id" type="xsd:long" use="required"/> ! <xsd:attribute name="progid" type="xsd:long" use="optional"/> </xsd:complexType> *************** *** 18,27 **** <xsd:complexContent> <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element ref="vertex" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="active" type="xsd:boolean" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="editable" type="xsd:boolean" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> --- 30,39 ---- <xsd:complexContent> <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element ref="vertex" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="active" type="xsd:boolean" use="required"/> ! <xsd:attribute name="editable" type="xsd:boolean" use="required"/> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> *************** *** 31,42 **** <xsd:extension base="EntityType"> <xsd:sequence> - <xsd:element name="name" type="xsd:string" maxOccurs="1" minOccurs="0"/> - <xsd:element name="type" type="xsd:int" maxOccurs="1" minOccurs="0"/> - <xsd:element name="level" type="xsd:int" maxOccurs="1" minOccurs="0"/> <xsd:element name="description" type="xsd:string" maxOccurs="1" minOccurs="0"/> <xsd:element name="Classification" type="xsd:string" maxOccurs="1" minOccurs="0"/> <xsd:element name="boundary" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="voidref" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element ref="space" maxOccurs="unbounded" minOccurs="0"/> <xsd:element ref="surface" maxOccurs="unbounded" minOccurs="0"/> --- 43,50 ---- <xsd:extension base="EntityType"> <xsd:sequence> <xsd:element name="description" type="xsd:string" maxOccurs="1" minOccurs="0"/> <xsd:element name="Classification" type="xsd:string" maxOccurs="1" minOccurs="0"/> <xsd:element name="boundary" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="constructor" type="ConstructorType" maxOccurs="unbounded" minOccurs="0"/> <xsd:element ref="space" maxOccurs="unbounded" minOccurs="0"/> <xsd:element ref="surface" maxOccurs="unbounded" minOccurs="0"/> *************** *** 44,51 **** <xsd:element ref="vertex" maxOccurs="unbounded" minOccurs="0"/> <xsd:element ref="material" maxOccurs="unbounded" minOccurs="0"/> - <xsd:element ref="line" maxOccurs="unbounded" minOccurs="0"/> - <xsd:element ref="point" maxOccurs="unbounded" minOccurs="0"/> - <xsd:element ref="coordinatesystem" maxOccurs="unbounded" minOccurs="0"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> --- 52,60 ---- <xsd:element ref="vertex" maxOccurs="unbounded" minOccurs="0"/> <xsd:element ref="material" maxOccurs="unbounded" minOccurs="0"/> </xsd:sequence> + <xsd:attribute name="type" type="xsd:int" use="required"/> + <xsd:attribute name="name" type="xsd:string"/> + <xsd:attribute name="voidref" type="xsd:long" use="required"/> + <xsd:attribute name="level" type="xsd:int" use="required"/> </xsd:extension> </xsd:complexContent> *************** *** 56,60 **** <xsd:extension base="EntityType"> <xsd:sequence> - <xsd:element name="constructor" type="xsd:boolean" maxOccurs="1" minOccurs="0"/> <xsd:element name="edgeref" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> <xsd:element name="hole" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> --- 65,68 ---- *************** *** 65,69 **** <xsd:element name="backMaterial" type="xsd:long" maxOccurs="1" minOccurs="0"/> </xsd:sequence> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> --- 73,77 ---- <xsd:element name="backMaterial" type="xsd:long" maxOccurs="1" minOccurs="0"/> </xsd:sequence> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> *************** *** 75,81 **** <xsd:element name="from" type="xsd:long" maxOccurs="1" minOccurs="0"/> <xsd:element name="to" type="xsd:long" maxOccurs="1" minOccurs="0"/> - <xsd:element name="constructor" type="xsd:boolean" maxOccurs="1" minOccurs="0"/> </xsd:sequence> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> --- 83,89 ---- <xsd:element name="from" type="xsd:long" maxOccurs="1" minOccurs="0"/> <xsd:element name="to" type="xsd:long" maxOccurs="1" minOccurs="0"/> </xsd:sequence> ! <xsd:attribute name="constructor" type="xsd:boolean" use="required"/> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> *************** *** 84,92 **** <xsd:complexContent> <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="x" type="xsd:double"/> ! <xsd:element name="y" type="xsd:double"/> ! <xsd:element name="z" type="xsd:double"/> ! </xsd:sequence> </xsd:extension> </xsd:complexContent> --- 92,98 ---- <xsd:complexContent> <xsd:extension base="EntityType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> </xsd:extension> </xsd:complexContent> *************** *** 96,106 **** <xsd:complexContent> <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="name" type="xsd:string" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="R" type="xsd:float" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="G" type="xsd:float" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="B" type="xsd:float" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> --- 102,110 ---- <xsd:complexContent> <xsd:extension base="EntityType"> ! <xsd:attribute name="name" type="xsd:string" use="required"/> ! <xsd:attribute name="R" type="xsd:float" use="required"/> ! <xsd:attribute name="G" type="xsd:float" use="required"/> ! <xsd:attribute name="B" type="xsd:float" use="required"/> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> *************** *** 128,136 **** <xsd:complexContent> <xsd:extension base="ConstructorType"> ! <xsd:sequence> ! <xsd:element name="onlyplane" type="xsd:boolean" maxOccurs="1" minOccurs="0"/> ! <xsd:element ref="ijn" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> --- 132,140 ---- <xsd:complexContent> <xsd:extension base="ConstructorType"> ! <xsd:sequence> ! <xsd:element ref="ijn" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="onlyplane" type="xsd:boolean" use="required"/> ! </xsd:extension> </xsd:complexContent> </xsd:complexType> *************** *** 148,154 **** <xsd:element name="vertex" type="VertexType"/> <xsd:element name="material" type="MaterialType"/> - <xsd:element name="line" type="LineType"/> - <xsd:element name="point" type="PointType"/> - <xsd:element name="coordinatesystem" type="CoordinateSystemType"/> <xsd:element name="origin" type="VertexType"/> <xsd:element name="direction" type="VertexesType"/> --- 152,155 ---- |
From: rimestad <rim...@us...> - 2006-10-09 08:49:30
|
Update of /cvsroot/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26457 Modified Files: build.xml Log Message: made changes to the schema so that subtypes get a type attribute that tell which type it represents so that several types can be stored as the same tag, require update of build.xml and Persistence.java as well Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/model/build.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** build.xml 5 Sep 2006 12:52:09 -0000 1.16 --- build.xml 9 Oct 2006 08:49:20 -0000 1.17 *************** *** 100,104 **** target="${xml.dir}" package="net.sourceforge.bprocessor.model.xml"> ! <arg value="-nv"/> </xjc> <javac srcdir="${xml.dir}" destdir="${xml.dir}" deprecation="yes" --- 100,104 ---- target="${xml.dir}" package="net.sourceforge.bprocessor.model.xml"> ! <arg value="-extension"/> </xjc> <javac srcdir="${xml.dir}" destdir="${xml.dir}" deprecation="yes" *************** *** 110,118 **** </classpath> </javac> ! <delete> <fileset dir="${xml.dir}"> <include name="**/*.java"/> </fileset> ! </delete> <copy todir="${build.dir}"> <fileset dir="${xml.dir}"/> --- 110,118 ---- </classpath> </javac> ! <!--<delete> <fileset dir="${xml.dir}"> <include name="**/*.java"/> </fileset> ! </delete>--> <copy todir="${build.dir}"> <fileset dir="${xml.dir}"/> |
From: Michael L. <he...@us...> - 2006-10-09 06:52:43
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12071/src/net/sourceforge/bprocessor/model Modified Files: Geometry.java Space.java Log Message: Small changes to Space.insert(Vertex) Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** Space.java 6 Oct 2006 11:45:49 -0000 1.73 --- Space.java 9 Oct 2006 06:52:34 -0000 1.74 *************** *** 498,504 **** * Insert a vertex * @param vertex The vertex * @return The vertex */ ! public Vertex insert(Vertex vertex) { add(vertex); return vertex; --- 498,505 ---- * Insert a vertex * @param vertex The vertex + * @param split Split edges * @return The vertex */ ! public Vertex insert(Vertex vertex, boolean split) { add(vertex); return vertex; Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Geometry.java 6 Oct 2006 11:45:49 -0000 1.29 --- Geometry.java 9 Oct 2006 06:52:34 -0000 1.30 *************** *** 749,760 **** Space space = p.getActiveSpace(); ! if (vertex.getOwner() != space) { ! vertex = vertex.copy(); } Vertex actual = null; { ! Set vertices = p.getActiveSpace().findByLocation ! (vertex.getX(), vertex.getY(), vertex.getZ(), 0.0000001); if (!vertices.isEmpty()) { actual = (Vertex) vertices.iterator().next(); --- 749,764 ---- Space space = p.getActiveSpace(); ! if (vertex.getOwner() != null) { ! if (vertex.getOwner() == space) { ! return vertex; ! } else { ! vertex = vertex.copy(); ! } } Vertex actual = null; { ! Set vertices = ! space.findByLocation (vertex.getX(), vertex.getY(), vertex.getZ(), 0.0000001); if (!vertices.isEmpty()) { actual = (Vertex) vertices.iterator().next(); *************** *** 764,778 **** if (actual == null) { actual = vertex; ! if (actual.getOwner() == null) { ! p.getActiveSpace().add(actual); ! if (split) { ! Set es = p.getActiveSpace().findEdge(actual); ! if (es.size() > 0) { ! Iterator iter = es.iterator(); ! while (iter.hasNext()) { ! Edge e = (Edge) iter.next(); ! if (!e.getStrippled()) { ! e.split(actual); ! } } } --- 768,780 ---- if (actual == null) { actual = vertex; ! space.add(actual); ! if (split) { ! Set es = space.findEdge(actual); ! if (es.size() > 0) { ! Iterator iter = es.iterator(); ! while (iter.hasNext()) { ! Edge e = (Edge) iter.next(); ! if (!e.getStrippled()) { ! e.split(actual); } } |
From: Michael L. <he...@us...> - 2006-10-06 12:44:41
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16020/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Geometry.java Space.java Log Message: Removed usage of Space.insert() Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** Surface.java 18 Sep 2006 14:10:07 -0000 1.111 --- Surface.java 6 Oct 2006 11:45:49 -0000 1.112 *************** *** 423,427 **** } surface.setEdges(edges); ! mesh.insert(surface); return surface; } --- 423,427 ---- } surface.setEdges(edges); ! mesh.add(surface); return surface; } *************** *** 532,536 **** facemap[i] = new Surface(newEdges); e2s.put(b, facemap[i]); ! getOwner().insert(facemap[i]); } sides.add(facemap[i]); --- 532,536 ---- facemap[i] = new Surface(newEdges); e2s.put(b, facemap[i]); ! getOwner().add(facemap[i]); } sides.add(facemap[i]); *************** *** 543,547 **** } top = new Surface(newEdges); ! getOwner().insert(top); } --- 543,547 ---- } top = new Surface(newEdges); ! getOwner().add(top); } *************** *** 735,739 **** facemap[i] = new Surface(newEdges); e2s.put(b, facemap[i]); ! getOwner().insert(facemap[i]); sides.add(facemap[i]); } --- 735,739 ---- facemap[i] = new Surface(newEdges); e2s.put(b, facemap[i]); ! getOwner().add(facemap[i]); sides.add(facemap[i]); } *************** *** 747,751 **** } top = new Surface(newEdges); ! getOwner().insert(top); } else { top = this; --- 747,751 ---- } top = new Surface(newEdges); ! getOwner().add(top); } else { top = this; Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** Space.java 5 Oct 2006 07:46:23 -0000 1.72 --- Space.java 6 Oct 2006 11:45:49 -0000 1.73 *************** *** 684,688 **** edges1.addAll(edges2); Surface surface = new Surface(edges1); ! insert(surface); if (s1.getExterior() != null) { s1.getExterior().addHole(surface); --- 684,688 ---- edges1.addAll(edges2); Surface surface = new Surface(edges1); ! add(surface); if (s1.getExterior() != null) { s1.getExterior().addHole(surface); *************** *** 1666,1681 **** Vertex p2 = new Vertex(xmax, ymax, zmin); Vertex p1 = new Vertex(xmax, ymin, zmin); ! getOwner().insert(p1); ! getOwner().insert(p2); ! getOwner().insert(p3); ! getOwner().insert(p4); Edge e1 = new Edge(p1, p2); Edge e2 = new Edge(p2, p3); Edge e3 = new Edge(p3, p4); Edge e4 = new Edge(p4, p1); ! getOwner().insert(e1); ! getOwner().insert(e2); ! getOwner().insert(e3); ! getOwner().insert(e4); List edges = new LinkedList(); edges.add(e1); --- 1666,1681 ---- Vertex p2 = new Vertex(xmax, ymax, zmin); Vertex p1 = new Vertex(xmax, ymin, zmin); ! getOwner().add(p1); ! getOwner().add(p2); ! getOwner().add(p3); ! getOwner().add(p4); Edge e1 = new Edge(p1, p2); Edge e2 = new Edge(p2, p3); Edge e3 = new Edge(p3, p4); Edge e4 = new Edge(p4, p1); ! getOwner().add(e1); ! getOwner().add(e2); ! getOwner().add(e3); ! getOwner().add(e4); List edges = new LinkedList(); edges.add(e1); *************** *** 1684,1688 **** edges.add(e4); Surface bottom = new Surface(edges); ! getOwner().insert(bottom); bottom.setFrontDomain(this); bottom.extrude(zmax - zmin, new HashSet()); --- 1684,1688 ---- edges.add(e4); Surface bottom = new Surface(edges); ! getOwner().add(bottom); bottom.setFrontDomain(this); bottom.extrude(zmax - zmin, new HashSet()); Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Geometry.java 29 Sep 2006 13:39:03 -0000 1.28 --- Geometry.java 6 Oct 2006 11:45:49 -0000 1.29 *************** *** 260,269 **** int count = 0; List surfaces = new LinkedList(); ! Space mesh = ((Edge) edges.iterator().next()).getOwner(); { Surface clockwise = clockwiseSurface(vertex, last, edges); if (clockwise != null) { if (clockwise.angle(vertex.system()) < 0) { ! mesh.insert(clockwise); holeAnalysis(clockwise); surfaces.add(clockwise); --- 260,269 ---- int count = 0; List surfaces = new LinkedList(); ! Space space = ((Edge) edges.iterator().next()).getOwner(); { Surface clockwise = clockwiseSurface(vertex, last, edges); if (clockwise != null) { if (clockwise.angle(vertex.system()) < 0) { ! space.add(clockwise); holeAnalysis(clockwise); surfaces.add(clockwise); *************** *** 276,280 **** if (counterclockwise != null) { if (counterclockwise.angle(vertex.system()) > 0) { ! mesh.insert(counterclockwise); holeAnalysis(counterclockwise); surfaces.add(counterclockwise); --- 276,280 ---- if (counterclockwise != null) { if (counterclockwise.angle(vertex.system()) > 0) { ! space.add(counterclockwise); holeAnalysis(counterclockwise); surfaces.add(counterclockwise); *************** *** 297,301 **** current.setFrontDomain(exterior.getFrontDomain()); } ! mesh.remove(exterior); } } --- 297,301 ---- current.setFrontDomain(exterior.getFrontDomain()); } ! space.remove(exterior); } } *************** *** 855,859 **** Surface surface = new Surface(actual); result.add(surface); ! Project.getInstance().getActiveSpace().insert(surface); holeAnalysis(surface); } --- 855,859 ---- Surface surface = new Surface(actual); result.add(surface); ! Project.getInstance().getActiveSpace().add(surface); holeAnalysis(surface); } |
From: Michael L. <he...@us...> - 2006-10-06 11:45:54
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16009/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java Log Message: Removed usage of Space.insert() Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** SpaceTool.java 5 Oct 2006 07:46:35 -0000 1.44 --- SpaceTool.java 6 Oct 2006 11:45:46 -0000 1.45 *************** *** 325,339 **** edges.add(se[i]); sf[i] = new Surface(edges); ! space.insert(sf[i]); } { List edges = new LinkedList(Arrays.asList(be)); bottom = new Surface(edges); ! space.insert(bottom); } { List edges = new LinkedList(Arrays.asList(te)); top = new Surface(edges); ! space.insert(top); } } --- 325,339 ---- edges.add(se[i]); sf[i] = new Surface(edges); ! space.add(sf[i]); } { List edges = new LinkedList(Arrays.asList(be)); bottom = new Surface(edges); ! space.add(bottom); } { List edges = new LinkedList(Arrays.asList(te)); top = new Surface(edges); ! space.add(top); } } |
From: Michael L. <he...@us...> - 2006-10-06 11:45:53
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15986/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java Log Message: Removed usage of Space.insert() Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** AttributeView.java 2 Oct 2006 06:10:15 -0000 1.38 --- AttributeView.java 6 Oct 2006 11:45:42 -0000 1.39 *************** *** 71,79 **** */ public void display(Object object) { - if (object != null) { - Project.info("display " + object.getClass().getName()); - } else { - Project.info("display null"); - } this.removeAll(); if (object != null) { --- 71,74 ---- |
From: Nordholt <nor...@us...> - 2006-10-05 13:50:36
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10028/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: experimenting with a new color for constructors to make them stand out more. Constructor color can now be changed in the "GL colors" menu, to make it easier to experiment for yourselfs Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -d -r1.156 -r1.157 *** View.java 2 Oct 2006 06:10:21 -0000 1.156 --- View.java 5 Oct 2006 13:50:28 -0000 1.157 *************** *** 87,92 **** /** SUPPORT flag */ public static final int SUPPORT = 4; ! ! /** IGNORE */ public static final boolean IGNORE = true; --- 87,91 ---- /** SUPPORT flag */ public static final int SUPPORT = 4; ! /** IGNORE */ public static final boolean IGNORE = true; *************** *** 138,147 **** /** Used for vertices on edges */ ! public static final float[] EDGE_ON_COLOR = new float[] {0.2f, 0.3f, 0.6f}; ! ! /** Used for constructor objects */ ! public static final float [] CONSTRUCTOR_COLOR = new float[] {0.8f, 0.7f, 0.6f, 0.50f}; /** Front color for surfaces */ --- 137,145 ---- /** Used for vertices on edges */ ! public static final float[] EDGE_ON_COLOR = new float[] {0.2f, 0.3f, 0.6f}; /** Used for constructor objects */ ! public static final float [] CONSTRUCTOR_COLOR = new float[] {0.11f, 0.72f, 0.67f, 0.0f}; ! //new float[] {0.8f, 0.7f, 0.6f, 0.50f}; /** Front color for surfaces */ *************** *** 915,919 **** { ! gl.glColor3fv(CONSTRUCTOR_COLOR); Iterator it = tempVertices.iterator(); while (it.hasNext()) { --- 913,917 ---- { ! gl.glColor3fv(constructorColor); Iterator it = tempVertices.iterator(); while (it.hasNext()) { *************** *** 1237,1246 **** if (constructor instanceof Point) { if (colorize) { ! gl.glColor3fv(CONSTRUCTOR_COLOR); } drawConstructorPoint(((Point)constructor).getOrigin(), dist); } else if (constructor instanceof Line) { if (colorize) { ! gl.glColor3fv(CONSTRUCTOR_COLOR); } Line l = (Line)constructor; --- 1235,1244 ---- if (constructor instanceof Point) { if (colorize) { ! gl.glColor3fv(constructorColor); } drawConstructorPoint(((Point)constructor).getOrigin(), dist); } else if (constructor instanceof Line) { if (colorize) { ! gl.glColor3fv(constructorColor); } Line l = (Line)constructor; *************** *** 1301,1305 **** if (cs.onlyPlane()) { if (colorize) { ! gl.glColor3fv(CONSTRUCTOR_COLOR); } if (cs.isEditable()) { --- 1299,1303 ---- if (cs.onlyPlane()) { if (colorize) { ! gl.glColor3fv(constructorColor); } if (cs.isEditable()) { |
From: Michael L. <he...@us...> - 2006-10-05 13:24:49
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31895/src/net/sourceforge/bprocessor/model/modellor Modified Files: LayerModellor.java Log Message: Name LayerModellor by defining getGeneralName() Index: LayerModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/LayerModellor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LayerModellor.java 26 Sep 2006 09:52:25 -0000 1.5 --- LayerModellor.java 5 Oct 2006 13:24:47 -0000 1.6 *************** *** 99,102 **** --- 99,111 ---- return "Layer Modellor"; } + + /** + * Return name + * @return Name + */ + public String getGeneralName() { + return "Layer Modellor"; + } + /** *************** *** 181,191 **** } /** ! * @return General name */ ! public String getGeneralName() { return "Layer"; } } } --- 190,207 ---- } + /** ! * @see net.sourceforge.bprocessor.model.Entity#getName() */ ! public String getName() { return "Layer"; } + /** + * @see net.sourceforge.bprocessor.model.Parametric#getGeneralName() + */ + public String getGeneralName() { + return "Layer"; + } } } |
From: Nordholt <nor...@us...> - 2006-10-05 13:07:55
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25063/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java Log Message: Control-key activates select-strategy, no intersections. Also removed showing intersections when using the orbit-strategy. Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** AbstractTool.java 12 Sep 2006 12:59:40 -0000 1.101 --- AbstractTool.java 5 Oct 2006 13:07:53 -0000 1.102 *************** *** 48,51 **** --- 48,54 ---- protected boolean cameraMode = false; + /** Select is active */ + protected boolean selectMode = false; + /** Pan strategy */ protected static Strategy pan; *************** *** 102,108 **** private Cursor orbitCursor; - - - /** * KeyListener for the GL Canvas --- 105,108 ---- *************** *** 202,206 **** */ public void keyPressed(KeyEvent e) { - Camera c = Project.getInstance().getCurrentCamera(); Vertex up = new Vertex(c.getRoll()[0], c.getRoll()[1], c.getRoll()[2]); --- 202,205 ---- *************** *** 216,226 **** glv.setCursor(null); return; ! } ! if (e.getKeyCode() == KeyEvent.VK_CONTROL) { glv.setCursor(null); return; ! } ! if (e.getKeyCode() == KeyEvent.VK_SPACE) { if (!typing) { --- 215,224 ---- glv.setCursor(null); return; ! } if (e.getKeyCode() == KeyEvent.VK_CONTROL) { + selectMode = true; glv.setCursor(null); return; ! } if (e.getKeyCode() == KeyEvent.VK_SPACE) { if (!typing) { *************** *** 237,242 **** escape(); return; ! } ! if (e.getKeyCode() == KeyEvent.VK_UP) { c.translate(new double[] {up.getX(), up.getY(), up.getZ()}); --- 235,239 ---- escape(); return; ! } if (e.getKeyCode() == KeyEvent.VK_UP) { c.translate(new double[] {up.getX(), up.getY(), up.getZ()}); *************** *** 249,254 **** } else { key(e); ! } ! glv.repaint(true); } --- 246,250 ---- } else { key(e); ! } glv.repaint(true); } *************** *** 263,266 **** --- 259,263 ---- } if (e.getKeyCode() == KeyEvent.VK_CONTROL) { + selectMode = false; glv.setCursor(cursor); } *************** *** 285,292 **** int x = e.getX(); int y = e.getY(); - AbstractTool.dx = x - pressPos[0]; AbstractTool.dy = y - pressPos[1]; - if ((e.getModifiersEx() | MouseEvent.BUTTON2_DOWN_MASK) == MouseEvent.BUTTON2_DOWN_MASK) { pan.dragged(e); --- 282,287 ---- *************** *** 294,302 **** if (cameraMode) { orbit.dragged(e); } else { dragged(e); } } - previousPos[0] = x; previousPos[1] = y; --- 289,298 ---- if (cameraMode) { orbit.dragged(e); + } else if (selectMode) { + select.dragged(e); } else { dragged(e); } } previousPos[0] = x; previousPos[1] = y; *************** *** 311,320 **** int x = e.getX(); int y = e.getY(); - dx = x - pressPos[0]; dy = y - pressPos[1]; ! ! moved(e); ! previousPos[0] = x; previousPos[1] = y; --- 307,315 ---- int x = e.getX(); int y = e.getY(); dx = x - pressPos[0]; dy = y - pressPos[1]; ! if (!(cameraMode || selectMode)) { ! moved(e); ! } previousPos[0] = x; previousPos[1] = y; *************** *** 348,361 **** */ public void mousePressed(MouseEvent e) { - if (!e.isPopupTrigger()) { if (e.getButton() == 1) { ! if (e.isMetaDown() || e.isControlDown()) { select.pressed(e); return; } } ! } ! pressPos[0] = e.getX(); pressPos[1] = e.getY(); --- 343,354 ---- */ public void mousePressed(MouseEvent e) { if (!e.isPopupTrigger()) { if (e.getButton() == 1) { ! if (selectMode) { select.pressed(e); return; } } ! } pressPos[0] = e.getX(); pressPos[1] = e.getY(); *************** *** 385,389 **** */ public void mouseReleased(MouseEvent e) { - if (e.getButton() == MouseEvent.BUTTON2) { glv.setCursor(cursor); --- 378,381 ---- *************** *** 392,395 **** --- 384,389 ---- if (cameraMode) { orbit.released(e); + } else if (selectMode) { + select.released(e); } else { released(e); |
From: Nordholt <nor...@us...> - 2006-10-05 13:06:17
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24616/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: removed never called code, escape handled in AbstractTool Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** AbstractPencil.java 26 Sep 2006 09:52:29 -0000 1.68 --- AbstractPencil.java 5 Oct 2006 13:06:15 -0000 1.69 *************** *** 686,691 **** if (e.getKeyCode() == KeyEvent.VK_CAPS_LOCK) { lock = true; - } else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { - cleanUp(); } else if (e.getKeyCode() == KeyEvent.VK_1) { number += "1"; --- 686,689 ---- |
From: Nordholt <nor...@us...> - 2006-10-05 12:20:07
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5801/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: Removed protractor, rotation and multiextrude tools from the GUI Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** ToolFactory.java 28 Aug 2006 06:51:25 -0000 1.59 --- ToolFactory.java 5 Oct 2006 12:19:59 -0000 1.60 *************** *** 62,74 **** private AbstractTool controlled; - /** rotation tool */ - private RotationTool rotation; - /** extrusion tool */ private ExtrudeTool extrusion; - /** multi extrusion tool */ - private MultiExtrudeTool mulextrusion; - /** pencil tool */ private Pencil pencil; --- 62,68 ---- *************** *** 95,101 **** private TapeMeasureTool tapeMeasure; - /** Protractor tool */ - private Protractor protractor; - /** Constructor tool */ private ConstructorTool constructor; --- 89,92 ---- *************** *** 125,136 **** private JToggleButton moveBut; - /** The rotation button */ - private JToggleButton rotBut; - /** The extrude button */ private JToggleButton extrudeBut; - - /** The multi extrude button */ - private JToggleButton mulextrudeBut; /** The clipplane button */ --- 116,121 ---- *************** *** 190,199 **** alternate = new VectorMoveTool(glv, pencilcursor); controlled = new ControlledMoveTool(glv, pencilcursor); - rotation = new RotationTool(glv, pencilcursor); extrusion = new ExtrudeTool(glv, pencilcursor); - mulextrusion = new MultiExtrudeTool(glv, pencilcursor); clipplane = new ClipplaneTool(glv, pencilcursor); tapeMeasure = new TapeMeasureTool(glv, pencilcursor); - protractor = new Protractor(glv, pencilcursor); camera = new CameraTool(glv, rotationCursor); fly = new CameraFlyTool(glv, flyCursor); --- 175,181 ---- *************** *** 220,239 **** "Biconextrudetool.gif", "Extrude"); extrudeBut.setMnemonic(KeyEvent.VK_V); - mulextrudeBut = this.registerTool(Tool.MULTI_EXTRUDE_TOOL, mulextrusion, - "Biconextrudetool2.gif", "Controlled Extrude"); - mulextrudeBut.setMnemonic(KeyEvent.VK_B); moveBut = this.registerTool(Tool.MOVE_TOOL, alternate, "Biconmovetool.gif", "Move"); moveBut.setMnemonic(KeyEvent.VK_M); registerTool(Tool.CONTROLLED_MOVE_TOOL, controlled, "Biconmovetool.gif", "Controlled Move"); - //moveBut.addMouseListener(new MoveButtonMouseListener(moveBut)); - rotBut = this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotobj.gif", "Rotation"); - rotBut.setMnemonic(KeyEvent.VK_R); tb.addSeparator(3); tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, "Bicontapemes.gif", "Tape Measure"); ! this.registerTool(Tool.PROTRACTOR_TOOL, protractor, "Bprotrac.gif", "Protractor"); ! clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, ! "Bclip.gif", "Clipping"); ! this.registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "Biconconstructor.gif", "Constructor"); offBut = this.registerTool(Tool.OFFSET_TOOL, offset, "Biconoffset.gif", "Offset"); --- 202,212 ---- "Biconextrudetool.gif", "Extrude"); extrudeBut.setMnemonic(KeyEvent.VK_V); moveBut = this.registerTool(Tool.MOVE_TOOL, alternate, "Biconmovetool.gif", "Move"); moveBut.setMnemonic(KeyEvent.VK_M); registerTool(Tool.CONTROLLED_MOVE_TOOL, controlled, "Biconmovetool.gif", "Controlled Move"); tb.addSeparator(3); tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, "Bicontapemes.gif", "Tape Measure"); ! this.registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "Biconconstructor.gif", "Constructor"); offBut = this.registerTool(Tool.OFFSET_TOOL, offset, "Biconoffset.gif", "Offset"); *************** *** 357,360 **** --- 330,338 ---- */ class ToolAction extends AbstractAction { + /** + * serial ID + */ + private static final long serialVersionUID = 1L; + /** glv */ protected GLView glv; |
From: Michael L. <he...@us...> - 2006-10-05 11:27:13
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17536/src/net/sourceforge/bprocessor/facade/modellor Modified Files: FacadeModellor.java WindowModellor.java Log Message: Removed methods from Project to add, remove and delete geometry Index: WindowModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/WindowModellor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** WindowModellor.java 4 Oct 2006 14:44:07 -0000 1.11 --- WindowModellor.java 5 Oct 2006 11:27:07 -0000 1.12 *************** *** 202,206 **** framedepth = ((Double)((Attribute)attributes.get(2)).getValue()).doubleValue(); offset = ((Double)((Attribute)attributes.get(3)).getValue()).doubleValue(); ! Iterator sit = Project.getInstance().getSurfaces().iterator(); Object value = ((Attribute)attributes.get(4)).getValue(); while (sit.hasNext()) { --- 202,206 ---- framedepth = ((Double)((Attribute)attributes.get(2)).getValue()).doubleValue(); offset = ((Double)((Attribute)attributes.get(3)).getValue()).doubleValue(); ! Iterator sit = Project.getInstance().getActiveSpace().getSurfaces().iterator(); Object value = ((Attribute)attributes.get(4)).getValue(); while (sit.hasNext()) { Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** FacadeModellor.java 3 Oct 2006 09:52:56 -0000 1.20 --- FacadeModellor.java 5 Oct 2006 11:27:07 -0000 1.21 *************** *** 203,207 **** } else if (a.getName().equals("Front")) { Project.getInstance().checkpoint(); ! Iterator sit = Project.getInstance().getSurfaces().iterator(); while (sit.hasNext()) { Surface s = (Surface)sit.next(); --- 203,207 ---- } else if (a.getName().equals("Front")) { Project.getInstance().checkpoint(); ! Iterator sit = Project.getInstance().getActiveSpace().getSurfaces().iterator(); while (sit.hasNext()) { Surface s = (Surface)sit.next(); |
From: Michael L. <he...@us...> - 2006-10-05 11:27:06
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17382/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Vertex.java ClippingPlane.java EnergyCalc.java Project.java Log Message: Removed methods from Project to add, remove and delete geometry Index: EnergyCalc.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EnergyCalc.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EnergyCalc.java 11 Sep 2006 09:23:20 -0000 1.1 --- EnergyCalc.java 5 Oct 2006 11:27:04 -0000 1.2 *************** *** 19,23 **** */ public static double energyLoss() { ! Iterator it = Project.getInstance().getSurfaces().iterator(); double totalloss = 0; --- 19,23 ---- */ public static double energyLoss() { ! Iterator it = Project.getInstance().world().getSurfaces().iterator(); double totalloss = 0; *************** *** 121,125 **** Space spa = null; ! Iterator it = Project.getInstance().getSurfaces().iterator(); while (it.hasNext()) { --- 121,125 ---- Space spa = null; ! Iterator it = Project.getInstance().world().getSurfaces().iterator(); while (it.hasNext()) { *************** *** 163,167 **** public static double heatedArea() { double tha = 0; ! Iterator it = Project.getInstance().getSurfaces().iterator(); while (it.hasNext()) { --- 163,167 ---- public static double heatedArea() { double tha = 0; ! Iterator it = Project.getInstance().world().getSurfaces().iterator(); while (it.hasNext()) { Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Edge.java 18 Sep 2006 14:10:07 -0000 1.58 --- Edge.java 5 Oct 2006 11:27:04 -0000 1.59 *************** *** 160,164 **** */ public void delete() { ! getOwner().delete(this); } --- 160,166 ---- */ public void delete() { ! if (getOwner() != null) { ! getOwner().delete(this); ! } } Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Vertex.java 29 Sep 2006 13:39:34 -0000 1.46 --- Vertex.java 5 Oct 2006 11:27:04 -0000 1.47 *************** *** 447,451 **** */ public void delete() { ! getOwner().delete(this); } --- 447,453 ---- */ public void delete() { ! if (getOwner() != null) { ! getOwner().delete(this); ! } } Index: ClippingPlane.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClippingPlane.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ClippingPlane.java 18 Sep 2006 14:36:22 -0000 1.10 --- ClippingPlane.java 5 Oct 2006 11:27:04 -0000 1.11 *************** *** 169,173 **** */ public Collection findIntersections() { ! Collection edges = Project.getInstance().getEdges(); ArrayList silluet = new ArrayList(); Collection res = new ArrayList(); --- 169,173 ---- */ public Collection findIntersections() { ! Collection edges = Project.getInstance().getActiveSpace().getEdges(); ArrayList silluet = new ArrayList(); Collection res = new ArrayList(); *************** *** 190,194 **** } } ! Collection surfaces = Project.getInstance().getSurfaces(); it = surfaces.iterator(); while (it.hasNext()) { --- 190,194 ---- } } ! Collection surfaces = Project.getInstance().getActiveSpace().getSurfaces(); it = surfaces.iterator(); while (it.hasNext()) { Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** Project.java 5 Oct 2006 07:46:23 -0000 1.80 --- Project.java 5 Oct 2006 11:27:04 -0000 1.81 *************** *** 16,20 **** import java.util.LinkedList; import java.util.List; - import java.util.Set; import java.util.Stack; --- 16,19 ---- *************** *** 242,255 **** while (iter.hasNext()) { Object next = iter.next(); ! if (next instanceof Edge) { ! remove((Edge)next); ! } else if (next instanceof Surface) { ! remove((Surface)next); ! } else if (next instanceof Vertex) { ! remove((Vertex)next); ! } else if (next instanceof Space) { ! remove((Space)next); ! } else if (next instanceof Constructor) { ! ((Constructor)next).delete(); } } --- 241,247 ---- while (iter.hasNext()) { Object next = iter.next(); ! if (next instanceof Entity) { ! Entity entity = (Entity) next; ! entity.delete(); } } *************** *** 370,388 **** } ! /** ! * Find all construction spaces ! * @return The construction spaces ! */ ! public Collection getConstructionSpaces() { ! Collection result = new HashSet(); ! Iterator iter = world.getElements().iterator(); ! while (iter.hasNext()) { ! Space current = (Space) iter.next(); ! if (current.getType() == Space.CONSTRUCTION) { ! result.add(current); ! } ! } ! return result; ! } /** --- 362,366 ---- } ! /** *************** *** 393,487 **** return world.getElements(); } - - /** - * Remove an Edge - * @param edge The edge - */ - private void remove(Edge edge) { - if (edge.getOwner() != null) { - edge.getOwner().delete(edge); - } else { - log.warn("Owner were null on " + edge); - } - } - - /** - * Find all edges - * @return The edges - */ - public Collection getEdges() { - return getActiveSpace().getEdges(); - } - - /** - * Remove a space dont call changed - * @param space The space to remove - */ - private void remove(Space space) { - if (space.getOwner() != null) { - space.getOwner().remove(space); - } else { - log.warn("Owner were null on " + space); - } - } - - /** - * Find all functional spaces - * @return The functional spaces - */ - public Collection getFunctionalSpaces() { - Collection result = new HashSet(); - Iterator iter = world.getElements().iterator(); - while (iter.hasNext()) { - Space current = (Space) iter.next(); - if (current.getType() == Space.FUNCTIONAL) { - result.add(current); - } - } - return result; - } - - /** - * Remove a surface - * @param surface The surface - */ - private void remove(Surface surface) { - surface.delete(); - } - - /** - * Find all surfaces - * @return The surfaces - */ - public Collection getSurfaces() { - return getActiveSpace().getSurfaces(); - } - - /** - * Find Surface by id - * @param id The id - * @return The Surface - */ - public Surface findSurfaceById(long id) { - return (Surface)world.getSurface(id); - } - - /** - * Remove a vertex dont call changed - * @param vertex The vertex - */ - private void remove(Vertex vertex) { - if (vertex.getOwner() != null) { - vertex.getOwner().delete(vertex); - } - } - - /** - * Find all vertexs - * @return The vertexs - */ - public Collection getVertices() { - return world.getVertices(); - } /** --- 371,374 ---- *************** *** 573,597 **** } - /** - * Find vertex based upon location and delta - * @param x The x coordinate - * @param y The y coordinate - * @param z The z coordinate - * @param delta The delta value - * @return The vertexs - */ - public Set findByLocation(double x, double y, double z, double delta) { - return world.findByLocation(x, y, z, delta); - } - - /** - * Find set of edges that coincides with the vertex - * @param vertex The vertex - * @return The set of edges - */ - public Set findEdge(Vertex vertex) { - return world.findEdge(vertex); - } - /** * Tells you if the projekt has been changed --- 460,463 ---- |
From: Michael L. <he...@us...> - 2006-10-05 11:27:05
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17151/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Removed Files: SurfaceTreeView.java Log Message: Removed methods from Project to add, remove and delete geometry --- SurfaceTreeView.java DELETED --- Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** GenericTreeView.java 3 Oct 2006 10:04:08 -0000 1.53 --- GenericTreeView.java 5 Oct 2006 11:26:56 -0000 1.54 *************** *** 9,14 **** import java.awt.Component; import java.awt.event.ActionListener; - import java.awt.event.KeyEvent; - import java.awt.event.KeyListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; --- 9,12 ---- *************** *** 1287,1331 **** /** - * GenericKeyListener - */ - private class GenericKeyListener implements KeyListener { - /** - * Invoked when a key is pressed - * @param e Key info - */ - public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_DELETE || e.getKeyCode() == KeyEvent.VK_BACK_SPACE) { - TreePath tp = selectionModel.getSelectionPath(); - Object o = tp.getLastPathComponent(); - if (o instanceof GenericNode) { - GenericNode node = (GenericNode) o; - o = node.getUserObject(); - if (o instanceof Entity) { - HashSet set = new HashSet(); - set.add(o); - //Selection.primary().clear(); - Project.getInstance().delete(set); - Project.getInstance().checkpoint(); - } - } - } - } - - /** - * Invoked when a key is released - * @param e Key info - */ - public void keyReleased(KeyEvent e) { - } - - /** - * Invoked when a key is typed - * @param e Key info - */ - public void keyTyped(KeyEvent e) { - } - } - - /** * Update * @param object The changed object --- 1285,1288 ---- |
From: Michael L. <he...@us...> - 2006-10-05 11:27:04
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17151/src/net/sourceforge/bprocessor/gui/actions Removed Files: ToolsDetachActionListener.java ToolsJoinActionListener.java Log Message: Removed methods from Project to add, remove and delete geometry --- ToolsDetachActionListener.java DELETED --- --- ToolsJoinActionListener.java DELETED --- |