bprocessor-commit Mailing List for B-processor (Page 57)
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: rimestad <rim...@us...> - 2007-08-28 07:04:47
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20300/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: made some changes in the way spaces are drawn Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.224 retrieving revision 1.225 diff -C2 -d -r1.224 -r1.225 *** View.java 20 Aug 2007 12:33:37 -0000 1.224 --- View.java 28 Aug 2007 07:04:47 -0000 1.225 *************** *** 79,82 **** --- 79,85 ---- private static Logger log = Logger.getLogger(View.class); + /** How deep in the struckture there should be drawn */ + private static int drawDepth = Space.SPACE_LEVEL; + private static final boolean DISP = false; *************** *** 430,434 **** * @return The grid size */ ! public static double gridSize() { double size = gridSize; if (adjustGridSize) { --- 433,437 ---- * @return The grid size */ ! private static double gridSize() { double size = gridSize; if (adjustGridSize) { *************** *** 446,450 **** * Set the highlight pattern */ ! public static void setHighlight() { byte b1 = (byte) 0x88; byte b2 = (byte) 0x22; --- 449,453 ---- * Set the highlight pattern */ ! private static void setHighlight() { byte b1 = (byte) 0x88; byte b2 = (byte) 0x22; *************** *** 468,472 **** * Set the seethrough pattern */ ! public static void setSeethrough() { byte b1 = (byte) 0x80; byte b2 = (byte) 0x08; --- 471,475 ---- * Set the seethrough pattern */ ! private static void setSeethrough() { byte b1 = (byte) 0x80; byte b2 = (byte) 0x08; *************** *** 526,530 **** * @param surface Surface */ ! public static void setLastSurface(Surface surface) { lastSurface = surface; } --- 529,533 ---- * @param surface Surface */ ! private static void setLastSurface(Surface surface) { lastSurface = surface; } *************** *** 780,784 **** * The camera setup function */ ! public void initCamera() { if (log.isDebugEnabled()) { log.debug("[display]"); --- 783,787 ---- * The camera setup function */ ! private void initCamera() { if (log.isDebugEnabled()) { log.debug("[display]"); *************** *** 839,843 **** * @param cs the coordinatesystem, */ ! protected void grid(CoordinateSystem cs) { double size = View.gridSize(); gl.glLineWidth(1.0f); --- 842,846 ---- * @param cs the coordinatesystem, */ ! private void grid(CoordinateSystem cs) { double size = View.gridSize(); gl.glLineWidth(1.0f); *************** *** 869,873 **** * @param hitdetection For hitdetection */ ! protected void drawAll(boolean hitdetection) { if (!hitdetection) { drawNormalMode(); --- 872,876 ---- * @param hitdetection For hitdetection */ ! private void drawAll(boolean hitdetection) { if (!hitdetection) { drawNormalMode(); *************** *** 881,885 **** * @return Supporting edges */ ! public Collection<Edge> collectSupportingEdges(Space active) { Collection<Edge> edges = new HashSet<Edge>(); if (active != Project.getInstance().world()) { --- 884,888 ---- * @return Supporting edges */ ! private Collection<Edge> collectSupportingEdges(Space active) { Collection<Edge> edges = new HashSet<Edge>(); if (active != Project.getInstance().world()) { *************** *** 1120,1124 **** transform(space.getTransformations()); if (active) { ! Collection<Surface> surfaces = space.getSurfaces(); switch (drawMode) { case SPACE_ASSGN_MODE: { --- 1123,1140 ---- transform(space.getTransformations()); if (active) { ! Collection<Surface> surfaces = new HashSet<Surface>(); ! for (Space s : space.getElements()) { ! if (s == space.getEmpty()) { ! for (Surface sur : s.getEnvelope()) { ! if (sur.getFrontDomain() == s && sur.getBackDomain() == s) { ! surfaces.add(sur); ! } ! } ! } else { ! if (s.getLevel() <= drawDepth) { ! surfaces.addAll(s.getEnvelope()); ! } ! } ! } switch (drawMode) { case SPACE_ASSGN_MODE: { *************** *** 1136,1146 **** gl.glPolygonOffset(0.5f, 0.5f); gl.glEnable(GL.GL_CULL_FACE); ! gl.glCullFace(GL.GL_BACK); drawSurfaces(surfaces, FRONT); ! gl.glCullFace(GL.GL_FRONT); drawSurfaces(surfaces, BACK); ! gl.glDisable(GL.GL_CULL_FACE); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); --- 1152,1162 ---- gl.glPolygonOffset(0.5f, 0.5f); gl.glEnable(GL.GL_CULL_FACE); ! gl.glCullFace(GL.GL_BACK); drawSurfaces(surfaces, FRONT); ! gl.glCullFace(GL.GL_FRONT); drawSurfaces(surfaces, BACK); ! gl.glDisable(GL.GL_CULL_FACE); gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); *************** *** 1166,1173 **** } ! Collection<Space> elements = space.getElements(); ! for (Space current : elements) { ! if (!(current instanceof Net) || Project.getInstance().getActiveSpace() == current) { ! drawSpace(current, active, selected); } } --- 1182,1190 ---- } ! if (space.getLevel() < drawDepth) { ! for (Space current : space.getElements()) { ! if (!(current instanceof Net) || Project.getInstance().getActiveSpace() == current) { ! drawSpace(current, active, selected); ! } } } *************** *** 1213,1216 **** --- 1230,1250 ---- drawSurface(s, false); gl.glDisable(GL.GL_POLYGON_STIPPLE); + } else if (o instanceof Space) { + Space space = (Space)o; + gl.glLineWidth(2.0f); + Collection<Edge> edges = new LinkedList<Edge>(); + edges.addAll(Surface.edges(space.getEnvelope())); + if (edges.isEmpty()) { + edges.addAll(space.getEdges()); + if (edges.isEmpty()) { + for (Space elem : space.getElements()) { + edges.addAll(elem.getEdges()); + } + } + } + for (Edge e : edges) { + drawEdge(e); + } + gl.glLineWidth(1.0f); } else if (o instanceof ClippingPlane) { ClippingPlane cp = (ClippingPlane) o; *************** *** 1544,1548 **** * @param dodge dodge colors */ ! public void drawGeneralEdges(Collection<Edge> edges, boolean dodge) { Collection selection = Selection.primary(); for (Edge current : edges) { --- 1578,1582 ---- * @param dodge dodge colors */ ! private void drawGeneralEdges(Collection<Edge> edges, boolean dodge) { Collection selection = Selection.primary(); for (Edge current : edges) { *************** *** 1581,1585 **** * @param edges The edges */ ! public void drawConstructionEdges(GLAutoDrawable gld, Collection edges) { gl.glLineWidth(1.0f); gl.glColor3fv(constructorColor, 0); --- 1615,1619 ---- * @param edges The edges */ ! private void drawConstructionEdges(GLAutoDrawable gld, Collection edges) { gl.glLineWidth(1.0f); gl.glColor3fv(constructorColor, 0); *************** *** 1721,1725 **** * @param string The string to draw */ ! void drawString(double x, double y, double z, String string) { gl.glPushMatrix(); gl.glRasterPos3d(x, y, z); --- 1755,1759 ---- * @param string The string to draw */ ! private void drawString(double x, double y, double z, String string) { gl.glPushMatrix(); gl.glRasterPos3d(x, y, z); *************** *** 1735,1739 **** * @param string The String */ ! void drawTextBox(double x, double y, double z, String string) { int width = glut.glutBitmapLength(GLUT.BITMAP_HELVETICA_12, string); gl.glColor3d(0.85, 0.85, 0.85); --- 1769,1773 ---- * @param string The String */ ! private void drawTextBox(double x, double y, double z, String string) { int width = glut.glutBitmapLength(GLUT.BITMAP_HELVETICA_12, string); gl.glColor3d(0.85, 0.85, 0.85); *************** *** 1803,1807 **** * @param clickable if true clicking the labels brings up dialog. */ ! void labelSurface(Surface surface, boolean clickable) { Transformation transformation = transformation(); Vertex from = surface.center(); --- 1837,1841 ---- * @param clickable if true clicking the labels brings up dialog. */ ! private void labelSurface(Surface surface, boolean clickable) { Transformation transformation = transformation(); Vertex from = surface.center(); *************** *** 1932,1936 **** * @param clickable if true clicking the labels brings up dialog. */ ! void labelSelection(boolean clickable) { Collection<Geometric> selection = Selection.primary(); if (selection.size() == 1) { --- 1966,1970 ---- * @param clickable if true clicking the labels brings up dialog. */ ! private void labelSelection(boolean clickable) { Collection<Geometric> selection = Selection.primary(); if (selection.size() == 1) { *************** *** 1966,1987 **** /** - * Compare two doubles to see if they are close enough to - * be considered equal - * @param a A value - * @param b A value - * @return Do they compare? - */ - protected boolean cmp(double a, double b) { - return Math.abs(b - a) < 0.0000001; - } - - /** * Draws the objects for selection */ private void drawSelectionMode() { Space space = Project.getInstance().getActiveSpace(); ! Collection<Surface> surfaces = new LinkedList<Surface>(); ! ! surfaces.addAll(space.getSurfaces()); Collection<Space> elements = space.getElements(); --- 2000,2008 ---- /** * Draws the objects for selection */ private void drawSelectionMode() { Space space = Project.getInstance().getActiveSpace(); ! Collection<Surface> surfaces = new HashSet<Surface>(); Collection<Space> elements = space.getElements(); *************** *** 1989,1992 **** --- 2010,2027 ---- if (element.isUnion()) { surfaces.addAll(element.getSurfaces()); + } else { + if (element == space.getEmpty()) { + for (Surface sur : element.getEnvelope()) { + if (sur.getFrontDomain() == element && sur.getBackDomain() == element) { + surfaces.add(sur); + } + } + } else { + if (element.getSurfaces().isEmpty()) { + surfaces.addAll(element.getEnvelope()); + } else { + surfaces.addAll(element.getSurfaces()); + } + } } } *************** *** 3231,3235 **** * @param glObjects The glObjects to add. */ ! public void addGlObjects3D(Set glObjects) { this.glObjects3D.addAll(glObjects); } --- 3266,3270 ---- * @param glObjects The glObjects to add. */ ! public void addGlObjects3D(Set<? extends GlObject> glObjects) { this.glObjects3D.addAll(glObjects); } |
From: rimestad <rim...@us...> - 2007-08-28 07:01:04
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18534/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: made the popupmenu work with multiselcetion instead of just single entities... Some of the menuActions still lack multiple object handling Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** GenericTreeView.java 24 May 2007 10:57:23 -0000 1.101 --- GenericTreeView.java 28 Aug 2007 07:00:52 -0000 1.102 *************** *** 557,566 **** */ public JPopupMenu menu() { ! JPopupMenu pm = null; ! Object object = this.getUserObject(); ! if (object instanceof Entity) { ! pm = PopupMenu.getEntityMenu((Entity)object); ! } else if (object instanceof Attribute) { ! pm = PopupMenu.getAttributeMenu((Attribute)object); } return pm; --- 557,568 ---- */ public JPopupMenu menu() { ! JPopupMenu pm = PopupMenu.makeSelectionMenu(); ! if (pm == null) { ! Object object = this.getUserObject(); ! if (object instanceof Entity) { ! pm = PopupMenu.getEntityMenu((Entity)object); ! } else if (object instanceof Attribute) { ! pm = PopupMenu.getAttributeMenu((Attribute)object); ! } } return pm; *************** *** 734,744 **** } ! /** ! * Context menu for this SpaceNode ! * @return the menu ! */ ! public JPopupMenu menu() { ! return PopupMenu.getSpaceMenu((Space)this.getUserObject()); ! } } --- 736,750 ---- } ! // /** ! // * Context menu for this SpaceNode ! // * @return the menu ! // */ ! // public JPopupMenu menu() { ! // JPopupMenu pop = PopupMenu.makeSelectionMenu(); ! // if (pop == null) { ! // pop = PopupMenu.getSpaceMenu((Space)this.getUserObject()); ! // } ! // return pop; ! // } } |
From: rimestad <rim...@us...> - 2007-08-28 07:00:59
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18534/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: made the popupmenu work with multiselcetion instead of just single entities... Some of the menuActions still lack multiple object handling Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** PopupMenu.java 19 Jul 2007 12:23:23 -0000 1.39 --- PopupMenu.java 28 Aug 2007 07:00:52 -0000 1.40 *************** *** 426,435 **** if (ent instanceof Space) { interior.add((Space) ent); } } ! if (interior.isEmpty()) { ! //Do nothing ! return; ! } for (Space space : interior) { surfaces.addAll(space.getEnvelope()); --- 426,434 ---- if (ent instanceof Space) { interior.add((Space) ent); + } else if (ent instanceof Surface) { + surfaces.add((Surface)ent); } } ! for (Space space : interior) { surfaces.addAll(space.getEnvelope()); *************** *** 462,466 **** Map<Geometric, Geometric> map = new HashMap<Geometric, Geometric>(); ! for (Space space : interior) { Space copy = space.simpleCopy(); map.put(space, copy); --- 461,465 ---- Map<Geometric, Geometric> map = new HashMap<Geometric, Geometric>(); ! for (Space space : spaces) { Space copy = space.simpleCopy(); map.put(space, copy); *************** *** 515,519 **** geometric.delete(); } ! for (Space space : interior) { space.delete(); } --- 514,518 ---- geometric.delete(); } ! for (Space space : spaces) { space.delete(); } *************** *** 546,548 **** --- 545,578 ---- return menu; } + + /** + * Create a popupMenu for the selection + * @return The popupmenu or null if the selection is empty + */ + public static JPopupMenu makeSelectionMenu() { + if (Selection.primary().isEmpty()) { + return null; + } else { + Iterator sel = Selection.primary().iterator(); + Class<? extends Object> type = null; + while (sel.hasNext()) { + Object next = sel.next(); + if (type == null) { + type = next.getClass(); + } else if (type == next.getClass()) { + // do nothing just continue; + continue; + } else { + return PopupMenu.getEntiesMenu(new LinkedList(Selection.primary())); + } + } + if (type == Space.class) { + return PopupMenu.getSpaceMenu(Selection.primary()); + } else if (type == Surface.class) { + return PopupMenu.getSurfaceMenu(Selection.primary()); + } else { + return PopupMenu.getEntiesMenu(new LinkedList(Selection.primary())); + } + } + } } |
From: Michael L. <he...@us...> - 2007-08-27 14:25:15
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21325/src/net/sourceforge/bprocessor/model Modified Files: SurfaceAnalysis.java Space.java Log Message: Space.getEdgeMap returns an edge-map Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -d -r1.169 -r1.170 *** Space.java 23 Aug 2007 14:24:45 -0000 1.169 --- Space.java 27 Aug 2007 13:39:01 -0000 1.170 *************** *** 145,148 **** --- 145,170 ---- /** + * Returns a map from the vertices in the specified collection + * to the edges sharing the vertex. + * @param vertices Collection a vertices + * @return Map from the specified vertices the the adjacent edges + */ + public Map<Vertex, List<Edge>> getEdgeMap(Collection<Vertex> vertices) { + Map<Vertex, List<Edge>> edgemap = new HashMap(); + for (Vertex current : vertices) { + edgemap.put(current, new LinkedList()); + } + for (Edge current : getEdges()) { + Vertex from = current.getFrom(); + List<Edge> fl = edgemap.get(from); + fl.add(current); + Vertex to = current.getTo(); + List<Edge> tl = edgemap.get(to); + tl.add(current); + } + return edgemap; + } + + /** * Constructor for persistence layer */ Index: SurfaceAnalysis.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceAnalysis.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SurfaceAnalysis.java 26 Jul 2007 09:52:32 -0000 1.10 --- SurfaceAnalysis.java 27 Aug 2007 13:39:01 -0000 1.11 *************** *** 91,106 **** { Collection<Vertex> vertices = space.getVertices(); ! Map<Vertex, List<Edge>> edgemap = new HashMap(); ! for (Vertex current : vertices) { ! edgemap.put(current, new LinkedList()); ! } ! for (Edge current : edges) { ! Vertex from = current.getFrom(); ! List<Edge> fl = edgemap.get(from); ! fl.add(current); ! Vertex to = current.getTo(); ! List<Edge> tl = edgemap.get(to); ! tl.add(current); ! } for (Edge current : edges) { List<Edge> incident = new LinkedList(); --- 91,97 ---- { Collection<Vertex> vertices = space.getVertices(); ! ! Map<Vertex, List<Edge>> edgemap = space.getEdgeMap(vertices); ! for (Edge current : edges) { List<Edge> incident = new LinkedList(); |
From: Michael L. <he...@us...> - 2007-08-27 14:00:29
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30045/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Small fix in Space.getEdgeMap Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.170 retrieving revision 1.171 diff -C2 -d -r1.170 -r1.171 *** Space.java 27 Aug 2007 13:39:01 -0000 1.170 --- Space.java 27 Aug 2007 14:00:31 -0000 1.171 *************** *** 158,165 **** Vertex from = current.getFrom(); List<Edge> fl = edgemap.get(from); ! fl.add(current); Vertex to = current.getTo(); List<Edge> tl = edgemap.get(to); ! tl.add(current); } return edgemap; --- 158,169 ---- Vertex from = current.getFrom(); List<Edge> fl = edgemap.get(from); ! if (fl != null) { ! fl.add(current); ! } Vertex to = current.getTo(); List<Edge> tl = edgemap.get(to); ! if (tl != null) { ! tl.add(current); ! } } return edgemap; |
From: Michael L. <he...@us...> - 2007-08-27 13:39:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21541/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Space.getEdgeMap returns an edge-map Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** FinalMoveTool.java 20 Jun 2007 13:17:55 -0000 1.16 --- FinalMoveTool.java 27 Aug 2007 13:39:05 -0000 1.17 *************** *** 13,16 **** --- 13,17 ---- import java.util.HashMap; import java.util.LinkedList; + import java.util.Map; import java.util.Stack; *************** *** 42,45 **** --- 43,47 ---- private Vertex direction; + /** * @param glv GLView *************** *** 51,54 **** --- 53,62 ---- } + + private Map<Vertex, Vertex> computeMap(Collection<Vertex> vertices) { + + return null; + } + private void updateFeedback() { if (geometrics == null) { |
From: rimestad <rim...@us...> - 2007-08-24 09:54:35
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3974/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java AbstractPencil.java SelectStrategy.java SelectTool.java Log Message: Added shift draw selection and now there is no drag select if right mouse button is clicked as well as the label is staying Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** SpaceTool.java 19 Jul 2007 12:23:32 -0000 1.83 --- SpaceTool.java 24 Aug 2007 09:54:27 -0000 1.84 *************** *** 78,82 **** String side = (String)target; glv.popup(makeSpaceMenu(side), e.getX(), e.getY()); ! done = true; } } --- 78,82 ---- String side = (String)target; glv.popup(makeSpaceMenu(side), e.getX(), e.getY()); ! } } Index: SelectStrategy.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectStrategy.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SelectStrategy.java 10 Aug 2007 11:20:11 -0000 1.16 --- SelectStrategy.java 24 Aug 2007 09:54:27 -0000 1.17 *************** *** 64,67 **** --- 64,69 ---- /** The y */ private int y; + + private boolean activated; /** *************** *** 100,104 **** */ public void pressed(MouseEvent e) { ! log.info("pressed"); Transformation t = glv.getView().transformation(); Vertex first = t.unProject(new Vertex(e.getX(), View.getHeight() - e.getY(), 0.001)); --- 102,106 ---- */ public void pressed(MouseEvent e) { ! log.debug("pressed"); Transformation t = glv.getView().transformation(); Vertex first = t.unProject(new Vertex(e.getX(), View.getHeight() - e.getY(), 0.001)); *************** *** 109,112 **** --- 111,117 ---- View view = glv.getView(); target = view.getObjectAtPoint(x, y, View.OBJECTS); + if (target == null || target instanceof Geometric) { + activated = true; + } } *************** *** 116,156 **** */ public void dragged(MouseEvent e) { ! log.info("dragged"); ! multipleSelection = true; ! Transformation t = glv.getView().transformation(); ! Vertex last = t.unProject(new Vertex(e.getX(), View.getHeight() - e.getY(), 0.001)); ! Vertex temp1 = t.unProject(new Vertex(e.getX(), View.getHeight() - y, 0.001)); ! Vertex temp2 = t.unProject(new Vertex(x, View.getHeight() - e.getY(), 0.001)); ! e1.setTo(temp1); ! e2.setFrom(temp1); ! e2.setTo(last); ! e3.setFrom(last); ! e3.setTo(temp2); ! e4.setFrom(temp2); ! for (Edge constructor : box) { ! glv.getView().addTempEdge(constructor); ! } ! Collection selection = Selection.primary(); ! selection.clear(); ! int newX = e.getX(); ! Set l = new HashSet(glv.getView().getObjectInArea(x, y, ! e.getX(), e.getY())); ! l.removeAll(box); ! l.remove(Project.getInstance().getActiveCoordinateSystem()); ! if (newX > x) { ! Set<Geometric> remove = new HashSet<Geometric>(); ! for (Object o : l) { ! if (o instanceof Geometric) { ! Geometric geo = (Geometric)o; ! Set<Vertex> vertices = geo.collect(); ! if (!l.containsAll(vertices)) { ! remove.add(geo); } } } - l.removeAll(remove); } - glv.getView().makeTarget(null); - selection.addAll(l); } --- 121,165 ---- */ public void dragged(MouseEvent e) { ! log.debug("dragged"); ! if (activated) { ! multipleSelection = true; ! Transformation t = glv.getView().transformation(); ! Vertex last = t.unProject(new Vertex(e.getX(), View.getHeight() - e.getY(), 0.001)); ! Vertex temp1 = t.unProject(new Vertex(e.getX(), View.getHeight() - y, 0.001)); ! Vertex temp2 = t.unProject(new Vertex(x, View.getHeight() - e.getY(), 0.001)); ! e1.setTo(temp1); ! e2.setFrom(temp1); ! e2.setTo(last); ! e3.setFrom(last); ! e3.setTo(temp2); ! e4.setFrom(temp2); ! for (Edge constructor : box) { ! glv.getView().addTempEdge(constructor); ! } ! int newX = e.getX(); ! Set l = new HashSet(glv.getView().getObjectInArea(x, y, ! e.getX(), e.getY())); ! l.removeAll(box); ! l.remove(Project.getInstance().getActiveCoordinateSystem()); ! if (newX > x) { ! Set<Geometric> remove = new HashSet<Geometric>(); ! for (Object o : l) { ! if (o instanceof Geometric) { ! Geometric geo = (Geometric)o; ! Set<Vertex> vertices = geo.collect(); ! if (!l.containsAll(vertices)) { ! remove.add(geo); ! } } } + l.removeAll(remove); + } + glv.getView().makeTarget(null); + if (!e.isShiftDown()) { + Selection.primary().set(l); + } else { + Selection.primary().addAll(l); } } } *************** *** 161,245 **** public void released(MouseEvent e) { log.debug("released with event:" + e.toString()); ! if (multipleSelection) { ! for (Edge constructor : box) { ! glv.getView().removeTempEdge(constructor); ! } ! multipleSelection = false; ! } else { ! Selection selection = Selection.primary(); ! if (e.getClickCount() >= 2) { ! if (e.getClickCount() == 2) { ! Collection<Geometric> extended = new HashSet(); ! extended.addAll(Selection.primary()); ! for (Geometric current : Selection.primary()) { ! if (current instanceof Edge) { ! Edge edge = (Edge) current; ! extended.addAll(edge.getSurfaces()); } ! if (current instanceof Surface) { ! Surface surface = (Surface) current; ! extended.addAll(surface.getEdges()); } } ! Selection.primary().clear(); ! Selection.primary().addAll(extended); ! } else { ! Collection<Geometric> geometrics = ! Geometric.connected(Selection.primary()); ! Selection.primary().set(geometrics); ! } ! ! if (1 < 0) { ! if (target instanceof Space) { ! Space space = (Space) target; ! space.edit(); ! } else if (target instanceof Surface) { ! Surface surface = (Surface) target; ! if (surface.getBackDomain() != null) { ! selection.addAll(surface.getBackDomain().getEnvelope()); ! } ! if (surface.getFrontDomain() != null) { ! selection.addAll(surface.getFrontDomain().getEnvelope()); } - } else if (target instanceof Constructor) { - Constructor c = (Constructor)target; - c.setActive(!c.isActive()); - } else if (target instanceof ClippingPlane) { - ClippingPlane cp = (ClippingPlane)target; - cp.setActive(!cp.isActive()); } else if (target instanceof GlCamera) { GlCamera glcam = (GlCamera)target; Project.getInstance().setCurrentCamera(glcam.getCamera()); - } - } - } else { - if (target == null) { - selection.clear(); - } else if (e.isShiftDown()) { - if (target instanceof Geometric) { - Geometric g = (Geometric)target; - if (!selection.contains(g)) { - selection.add(g); - } else { - selection.remove(g); - } } else { ! log.error("Tried to insert something different from Geometric in selection"); ! } ! } else if (target instanceof GlCamera) { ! GlCamera glcam = (GlCamera)target; ! Project.getInstance().setCurrentCamera(glcam.getCamera()); ! } else { ! if (target instanceof Geometric) { ! if (!selection.contains(target)) { ! selection.set((Geometric)target); } - } else { - log.warn("Target weren't a Geometric"); } } } } ! target = null; } } --- 170,253 ---- public void released(MouseEvent e) { log.debug("released with event:" + e.toString()); ! if (activated) { ! if (multipleSelection) { ! for (Edge constructor : box) { ! glv.getView().removeTempEdge(constructor); ! } ! multipleSelection = false; ! } else { ! Selection selection = Selection.primary(); ! if (e.getClickCount() >= 2) { ! if (e.getClickCount() == 2) { ! Collection<Geometric> extended = new HashSet(); ! extended.addAll(Selection.primary()); ! if (extended.isEmpty()) { ! //Move out one space/union level if possible ! Space sp = Project.getInstance().getActiveSpace(); ! if (sp.getLevel() > Space.PROJECT_LEVEL) { ! sp.getOwner().edit(); ! } } ! for (Geometric current : Selection.primary()) { ! if (current instanceof Edge) { ! Edge edge = (Edge) current; ! extended.addAll(edge.getSurfaces()); ! } else if (current instanceof Surface) { ! Surface surface = (Surface) current; ! extended.addAll(surface.getEdges()); ! } else if (target instanceof Space) { ! Space space = (Space) target; ! extended.clear(); ! space.edit(); ! break; ! } else if (target instanceof Constructor) { ! Constructor c = (Constructor)target; ! c.setActive(!c.isActive()); ! } else if (target instanceof ClippingPlane) { ! ClippingPlane cp = (ClippingPlane)target; ! cp.setActive(!cp.isActive()); ! } else if (target instanceof GlCamera) { ! GlCamera glcam = (GlCamera)target; ! Project.getInstance().setCurrentCamera(glcam.getCamera()); ! } } + Selection.primary().clear(); + Selection.primary().addAll(extended); + } else { + Collection<Geometric> geometrics = + Geometric.connected(Selection.primary()); + Selection.primary().set(geometrics); } ! } else { ! if (target == null) { ! selection.clear(); ! } else if (e.isShiftDown()) { ! if (target instanceof Geometric) { ! Geometric g = (Geometric)target; ! if (!selection.contains(g)) { ! selection.add(g); ! } else { ! selection.remove(g); ! } ! } else { ! log.error("Tried to insert something different from Geometric in selection"); } } else if (target instanceof GlCamera) { GlCamera glcam = (GlCamera)target; Project.getInstance().setCurrentCamera(glcam.getCamera()); } else { ! if (target instanceof Geometric) { ! if (!selection.contains(target)) { ! selection.set((Geometric)target); ! } ! } else { ! log.warn("Target weren't a Geometric"); } } } } + target = null; } ! activated = false; } } Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** SelectTool.java 19 Jun 2007 20:10:24 -0000 1.63 --- SelectTool.java 24 Aug 2007 09:54:27 -0000 1.64 *************** *** 54,58 **** */ protected void dragged(MouseEvent e) { ! select.dragged(e); } --- 54,60 ---- */ protected void dragged(MouseEvent e) { ! if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK) { ! select.dragged(e); ! } } *************** *** 62,66 **** */ protected void released(MouseEvent e) { ! select.released(e); } --- 64,70 ---- */ protected void released(MouseEvent e) { ! if (e.getButton() == MouseEvent.BUTTON1) { ! select.released(e); ! } } Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** AbstractPencil.java 22 Aug 2007 13:22:47 -0000 1.86 --- AbstractPencil.java 24 Aug 2007 09:54:27 -0000 1.87 *************** *** 621,628 **** /** ! * @param intersection intersection ! * @return color */ ! public float[] targetColor(Intersection intersection) { float[] targetColor = View.TARGET_COLOR; switch (intersection.type()) { --- 621,629 ---- /** ! * Find the appropiate hit color for a given intersection ! * @param intersection The intersection ! * @return The resulting color */ ! protected float[] targetColor(Intersection intersection) { float[] targetColor = View.TARGET_COLOR; switch (intersection.type()) { |
From: Michael L. <he...@us...> - 2007-08-23 14:24:51
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21999/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Space name always display Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** Space.java 23 Aug 2007 12:45:23 -0000 1.168 --- Space.java 23 Aug 2007 14:24:45 -0000 1.169 *************** *** 1430,1472 **** } /** ! * Display name used for all occasions where the ! * this space is displayed in the gui. ! * @return display name */ ! public String getDisplayName() { ! String res = ""; switch (level) { case ELEMENT_LEVEL: ! res = "Elm" + res; break; case PART_LEVEL: ! res = "Prt" + res; break; case SPACE_LEVEL: ! res = "Spc" + res; break; case NET_LEVEL: ! res = "Net" + res; break; case PROJECT_LEVEL: ! res = "Proj" + res; break; default: ! res = "Spc(def)" + res; break; } if (isUnion()) { ! return res + " Union"; } ! if (getClassification() != null) { ! return getClassification().toString() + " - " + res + id; } else { ! if (getOwner() == null) { ! return Project.getInstance().getName(); ! } else if (name.equalsIgnoreCase("Void")) { return name; } else { ! return name + " - " + res + id; } } --- 1430,1499 ---- } + /** ! * Returns a string describing the level this space ! * @return string describing level of this space */ ! public String getLevelName() { ! String lvl; switch (level) { case ELEMENT_LEVEL: ! lvl = "Elm"; break; case PART_LEVEL: ! lvl = "Prt"; break; case SPACE_LEVEL: ! lvl = "Spc"; break; case NET_LEVEL: ! lvl = "Net"; break; case PROJECT_LEVEL: ! lvl = "Proj"; break; default: ! lvl = "Unk"; break; } if (isUnion()) { ! return lvl + " Union " + id; ! } else { ! return lvl + id; } ! } ! ! /** ! * Returns string describing the kind of this ! * space ! * @return string describing kind of this space ! */ ! public String getKindName() { ! if (this.isContainer()) { ! String lvl = getLevelName(); ! if (getClassification() != null) { ! return "(" + getClassification().toString() + " - " + lvl + ")"; ! } else { ! return "(" + lvl + ")"; ! } } else { ! return null; ! } ! } ! ! /** ! * Display name used for all occasions where the ! * this space is displayed in the gui. ! * @return display name ! */ ! public String getDisplayName() { ! if (getOwner() == null) { ! return Project.getInstance().getName(); ! } else { ! String lvl = getKindName(); ! if (lvl == null) { return name; } else { ! return name + " " + lvl; } } |
From: Michael L. <he...@us...> - 2007-08-23 12:45:23
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15146/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: space got name again Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** Space.java 13 Aug 2007 11:36:21 -0000 1.167 --- Space.java 23 Aug 2007 12:45:23 -0000 1.168 *************** *** 380,395 **** } ! /** ! * Get the name ! * @return The name ! * @hibernate.property ! */ @Override public String getName() { ! if (getClassification() != null) { ! return getClassification().toString(); ! } else { ! return name; ! } } --- 380,387 ---- } ! /** {@inheritDoc} */ @Override public String getName() { ! return name; } *************** *** 1349,1353 **** public List<Attribute> getAttributes() { ArrayList<Attribute> res = new ArrayList<Attribute>(); ! //res.add(new Attribute("Name", getName())); if (getOwner() == Project.getInstance().world()) { if (isConstructionSpace()) { --- 1341,1345 ---- public List<Attribute> getAttributes() { ArrayList<Attribute> res = new ArrayList<Attribute>(); ! res.add(new Attribute("Name", getName())); if (getOwner() == Project.getInstance().world()) { if (isConstructionSpace()) { *************** *** 1439,1443 **** /** ! * Display name * @return display name */ --- 1431,1436 ---- /** ! * Display name used for all occasions where the ! * this space is displayed in the gui. * @return display name */ |
From: Michael L. <he...@us...> - 2007-08-22 13:23:01
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15885/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: Minor javadoc error Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** AbstractPencil.java 20 Aug 2007 12:33:37 -0000 1.85 --- AbstractPencil.java 22 Aug 2007 13:22:47 -0000 1.86 *************** *** 621,626 **** /** ! * @param intersection ! * @return */ public float[] targetColor(Intersection intersection) { --- 621,626 ---- /** ! * @param intersection intersection ! * @return color */ public float[] targetColor(Intersection intersection) { |
From: rimestad <rim...@us...> - 2007-08-20 12:34:28
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14138/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Improved on extrude tool Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.223 retrieving revision 1.224 diff -C2 -d -r1.223 -r1.224 *** View.java 24 Jul 2007 09:46:42 -0000 1.223 --- View.java 20 Aug 2007 12:33:37 -0000 1.224 *************** *** 2405,2409 **** * @return The object */ ! private Object getName(int index) { return objectTable.get(index - 1); } --- 2405,2409 ---- * @return The object */ ! private Object getObject(int index) { return objectTable.get(index - 1); } *************** *** 2461,2467 **** bufferOffset += names; ! Object current = getName(id); ! if ((current instanceof Surface) || !unWantedEntities.contains(current)) { if (current instanceof Surface) { if (near < nearestSurface) { --- 2461,2467 ---- bufferOffset += names; ! Object current = getObject(id); ! if (!unWantedEntities.contains(current)) { if (current instanceof Surface) { if (near < nearestSurface) { *************** *** 2510,2514 **** } } ! if (surface != null) { if (unWantedEntities.contains(surface)) { --- 2510,2515 ---- } } ! log.debug("Found surface:" + surface + " edge:" + edge + " vertex:" + vertex + ! " glObject:" + glo); if (surface != null) { if (unWantedEntities.contains(surface)) { *************** *** 2791,2795 **** if (names > 0) { int tar = selectBuffer.get(bufferOffset); ! Object current = getName(tar); selection.add(current); bufferOffset += names; --- 2792,2796 ---- if (names > 0) { int tar = selectBuffer.get(bufferOffset); ! Object current = getObject(tar); selection.add(current); bufferOffset += names; |
From: rimestad <rim...@us...> - 2007-08-20 12:34:28
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14138/src/net/sourceforge/bprocessor/gl/tool Modified Files: ExtrusionTool.java AbstractPencil.java Log Message: Improved on extrude tool Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** ExtrusionTool.java 9 Aug 2007 16:04:29 -0000 1.64 --- ExtrusionTool.java 20 Aug 2007 12:33:37 -0000 1.65 *************** *** 167,205 **** protected void moved(MouseEvent e) { if (extrudesurface != null) { to = glv.getView().toPlaneCoords(e.getX(), e.getY(), dragplane); Vertex normal = extrudesurface.normal(); ontoPlane = null; ! Set<Geometric> elements = new HashSet<Geometric>(); if (extrusion != null) { elements.addAll(extrusion); elements.addAll(Surface.edges(extrusion)); elements.add(extrudesurface); } ! Set<Surface> ignore = new HashSet<Surface>(2); ! ignore.add(extrudesurface); ! if (extrudesurface.getExterior() != null) { ! ignore.add(extrudesurface.getExterior()); ! } ! findTarget(e, ignore); { ! if (target instanceof Surface && extrusion != null && !extrusion.contains(target)) { Surface surface = (Surface) target; ! if (!elements.contains(surface)) { Vertex n = surface.normal(); Vertex cross = normal.cross(n); if (cross.isZero()) { ! Vertex v = surface.getFirstVertex(); ! if (!extrudesurface.plane().contains(v)) { ! to = v; ! } calcDistCallExtrude(to, from, normal); } else { ontoPlane = surface.plane(); if (Math.abs(ontoPlane.normal().dot(normal)) <= 0.1) { calcDistCallExtrude(to, from, normal); } else { extrudeOnto(ontoPlane, all, false); } } } } else if (target instanceof Edge) { --- 167,217 ---- protected void moved(MouseEvent e) { if (extrudesurface != null) { + glv.getView().removeTempVertex(to); to = glv.getView().toPlaneCoords(e.getX(), e.getY(), dragplane); Vertex normal = extrudesurface.normal(); ontoPlane = null; ! elements.clear(); if (extrusion != null) { elements.addAll(extrusion); elements.addAll(Surface.edges(extrusion)); elements.add(extrudesurface); + if (extrudesurface.getExterior() != null) { + elements.add(extrudesurface.getExterior()); + } } ! excluded.clear(); ! excluded.add(extrudesurface); ! findTarget(e, excluded); { ! if (target instanceof Surface) { Surface surface = (Surface) target; ! if (!elements.contains(target)) { Vertex n = surface.normal(); Vertex cross = normal.cross(n); if (cross.isZero()) { ! to = glv.getView().toPlaneCoords(e.getX(), e.getY(), surface.plane()); ! current = new Intersection(to, Intersection.SURFACE, surface); calcDistCallExtrude(to, from, normal); } else { ontoPlane = surface.plane(); if (Math.abs(ontoPlane.normal().dot(normal)) <= 0.1) { + current = new Intersection(to, Intersection.PLANE_INTERSECTION, surface); calcDistCallExtrude(to, from, normal); } else { + to = glv.getView().toPlaneCoords(e.getX(), e.getY(), ontoPlane); + current = new Intersection(to, Intersection.PLANE_INTERSECTION, ontoPlane); extrudeOnto(ontoPlane, all, false); } } + } else { + excluded.addAll(elements); + findTarget(e, excluded); + if (target instanceof Surface && surface.plane().contains((Surface)target)) { + // do nothing + current = new Intersection(to, Intersection.SURFACE, target); + } else { + current = new Intersection(to, Intersection.PLANE_INTERSECTION, dragplane); + calcDistCallExtrude(to, from, normal); + } } } else if (target instanceof Edge) { *************** *** 209,212 **** --- 221,227 ---- if (!extrudesurface.plane().contains(v)) { to = v; + current = new Intersection(to, Intersection.EDGE_MIDPOINT, edge); + } else { + current = new Intersection(to, Intersection.PLANE_INTERSECTION, to); } } *************** *** 215,223 **** --- 230,245 ---- if (!elements.contains(target)) { to = (Vertex)target; + current = new Intersection(to, Intersection.VERTEX, to); + } else { + current = new Intersection(to, Intersection.PLANE_INTERSECTION, to); } calcDistCallExtrude(to, from, normal); } else { + current = new Intersection(to, Intersection.PLANE_INTERSECTION, to); calcDistCallExtrude(to, from, normal); } + float[] color = targetColor(current); + glv.getView().addTempVertex(to); + glv.getView().changeColor(to, color); } } else if (extrudeEdges != null) { *************** *** 355,358 **** --- 377,381 ---- start = findIntersection(e); from = start.vertex(); + start = null; setTip(secondClickTip()); } else if (extrudesurface != null) { *************** *** 455,458 **** --- 478,482 ---- */ public void cleanUp() { + glv.getView().removeTempVertex(to); all = false; dragplane = null; Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** AbstractPencil.java 27 Jun 2007 00:33:53 -0000 1.84 --- AbstractPencil.java 20 Aug 2007 12:33:37 -0000 1.85 *************** *** 624,628 **** * @return */ ! private float[] targetColor(Intersection intersection) { float[] targetColor = View.TARGET_COLOR; switch (intersection.type()) { --- 624,628 ---- * @return */ ! public float[] targetColor(Intersection intersection) { float[] targetColor = View.TARGET_COLOR; switch (intersection.type()) { |
From: rimestad <rim...@us...> - 2007-08-13 11:41:30
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27141/src/net/sourceforge/bprocessor/model Modified Files: EnergyCalc.java Log Message: Forgot checkstyle Index: EnergyCalc.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EnergyCalc.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** EnergyCalc.java 13 Aug 2007 11:36:21 -0000 1.10 --- EnergyCalc.java 13 Aug 2007 11:41:25 -0000 1.11 *************** *** 17,21 **** public class EnergyCalc { private static Logger log = Logger.getLogger(EnergyCalc.class); ! /** * energyLoss calculates the total energy transmission loss --- 17,21 ---- public class EnergyCalc { private static Logger log = Logger.getLogger(EnergyCalc.class); ! /** * energyLoss calculates the total energy transmission loss *************** *** 37,43 **** totalloss = totalloss + calcloss(current.getBackDomain(), current); } else ! if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-100")) { ! totalloss = totalloss + calcloss(current.getBackDomain(), current); ! } } if (current.getBackDomain().getClassification() != null) { --- 37,43 ---- totalloss = totalloss + calcloss(current.getBackDomain(), current); } else ! if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-100")) { ! totalloss = totalloss + calcloss(current.getBackDomain(), current); ! } } if (current.getBackDomain().getClassification() != null) { *************** *** 45,51 **** totalloss = totalloss + calcloss(current.getFrontDomain(), current); } else ! if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-100")) { ! totalloss = totalloss + calcloss(current.getFrontDomain(), current); ! } } } --- 45,51 ---- totalloss = totalloss + calcloss(current.getFrontDomain(), current); } else ! if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-100")) { ! totalloss = totalloss + calcloss(current.getFrontDomain(), current); ! } } } *************** *** 55,59 **** return totalloss; } ! /** * Calculates energyloss of a surface --- 55,59 ---- return totalloss; } ! /** * Calculates energyloss of a surface *************** *** 63,66 **** --- 63,67 ---- * @return the enegyloss */ + //TODO implement handling of elemented spaces (make calc recursive) private static double calcloss(Space classification, Surface current) { double loss = 0; *************** *** 99,103 **** Surface closest = null; Space spa = null; ! //Find closest surface that have a functional space as either front or back domain for (Surface sur : classification.getEnvelope()) { --- 100,104 ---- Surface closest = null; Space spa = null; ! //Find closest surface that have a functional space as either front or back domain for (Surface sur : classification.getEnvelope()) { *************** *** 117,121 **** } } ! //Choose the resulting functional space from the closest surface if (closest != null && closest.getFrontDomain().isFunctionalSpace()) { --- 118,122 ---- } } ! //Choose the resulting functional space from the closest surface if (closest != null && closest.getFrontDomain().isFunctionalSpace()) { *************** *** 125,129 **** spa = closest.getBackDomain(); } ! if (spa != null) { if (spa.getClassification() != null) { --- 126,130 ---- spa = closest.getBackDomain(); } ! if (spa != null) { if (spa.getClassification() != null) { *************** *** 139,146 **** } } ! return relevant; } ! /** * heatedArea calculates the total area that is heated in the building --- 140,147 ---- } } ! return relevant; } ! /** * heatedArea calculates the total area that is heated in the building *************** *** 150,154 **** double tha = 0; Iterator it = Project.getInstance().world().getSurfaces().iterator(); ! while (it.hasNext()) { Surface current = (Surface) it.next(); --- 151,155 ---- double tha = 0; Iterator it = Project.getInstance().world().getSurfaces().iterator(); ! while (it.hasNext()) { Surface current = (Surface) it.next(); *************** *** 180,186 **** } } - return tha; } - } --- 181,185 ---- |
From: rimestad <rim...@us...> - 2007-08-13 11:36:34
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25175/src/net/sourceforge/bprocessor/model Modified Files: Space.java Entity.java Edge.java EnergyCalc.java Log Message: fixed energy calc Index: EnergyCalc.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EnergyCalc.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** EnergyCalc.java 26 Jun 2007 10:56:54 -0000 1.9 --- EnergyCalc.java 13 Aug 2007 11:36:21 -0000 1.10 *************** *** 7,33 **** package net.sourceforge.bprocessor.model; import java.util.Iterator; /** * This class handles calculations about energy transmission loss */ public class EnergyCalc { /** * energyLoss calculates the total energy transmission loss * @return the total loss */ public static double energyLoss() { - Iterator it = Project.getInstance().world().getSurfaces().iterator(); double totalloss = 0; ! ! while (it.hasNext()) { ! Surface current = (Surface) it.next(); if (current.getFrontDomain().getClassification() != null) { if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-80")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); ! } ! if (current.getFrontDomain().getClassification().getId(). ! equalsIgnoreCase("-100")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } --- 7,41 ---- package net.sourceforge.bprocessor.model; + import java.util.HashSet; import java.util.Iterator; + import org.apache.log4j.Logger; + /** * This class handles calculations about energy transmission loss */ public class EnergyCalc { + private static Logger log = Logger.getLogger(EnergyCalc.class); /** * energyLoss calculates the total energy transmission loss + * E.i. for every (Space)surface assigned to a functional space that is heated, + * calculate its energy loss * @return the total loss */ public static double energyLoss() { double totalloss = 0; ! HashSet<Surface> functionalAssigned = new HashSet<Surface>(); ! for (Space space : Project.getInstance().world().getElements()) { ! if (space.getType() == Space.FUNCTIONAL) { ! functionalAssigned.addAll(space.getEnvelope()); ! } ! } ! for (Surface current : functionalAssigned) { if (current.getFrontDomain().getClassification() != null) { if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-80")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); ! } else ! if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-100")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } *************** *** 36,42 **** if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-80")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); ! } ! if (current.getBackDomain().getClassification().getId() ! .equalsIgnoreCase("-100")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } --- 44,49 ---- if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-80")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); ! } else ! if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-100")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } *************** *** 51,121 **** /** * Calculates energyloss of a surface ! * @param classification The classifaction of the surface * @param current The current Surface ! * @return the loss */ private static double calcloss(Space classification, Surface current) { double loss = 0; ! boolean first = true; ! if (isrelevant(classification, current)) { ! Iterator it = classification.getElements().iterator(); ! while (it.hasNext()) { ! Space elemcheck = (Space) it.next(); ! if (elemcheck.getName().equalsIgnoreCase("Void") && first) { ! ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-210.01")) { ! loss = (Double)classification.getParameter("uvalue").getValue() * current.getArea(); ! //loss = 0.15 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-215.01") || ! classification.getClassification().getFullId(null).equalsIgnoreCase("-215")) { ! loss = (Double)classification.getParameter("uvalue").getValue() * current.getArea(); ! //loss = 0.15 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-215.04")) { ! loss = (Double)classification.getParameter("uvalue").getValue() * current.getArea(); ! //loss = 0.15 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-205")) { ! loss = (Double)classification.getParameter("uvalue").getValue() * current.getArea(); ! //loss = 0.25 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-205.01")) { ! loss = (Double)classification.getParameter("uvalue").getValue() * current.getArea(); ! return loss; ! } ! if (classification.getClassification().getName().equalsIgnoreCase("termovindue")) { ! loss = 2.5 * current.getArea(); ! return loss; ! } ! if (classification.getClassification(). ! getName().equalsIgnoreCase("2-lags lavenergivindue")) { ! loss = 1.5 * current.getArea(); ! return loss; ! } ! ! if (classification.getClassification(). ! getFullId(null).equalsIgnoreCase("-205.02")) { ! loss = (Double)classification.getParameter("uvalue").getValue() * current.getArea(); ! //loss = 0.8 * current.getArea(); ! return loss; ! } ! ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-205.03")) { ! loss = 1.5 * current.getArea(); ! return loss; ! } ! System.out.println("void - no more element spaces"); ! } if (!elemcheck.getName().equalsIgnoreCase("Void")) { ! System.out.println(elemcheck.getName()); } - first = false; } ! } return loss; --- 58,81 ---- /** * Calculates energyloss of a surface ! * @param classification The space assigned to current that is opposite the heated functional ! * space that have to be assigned to current * @param current The current Surface ! * @return the enegyloss */ private static double calcloss(Space classification, Surface current) { double loss = 0; ! if (isrelevant(classification, current)) { ! for (Space elemcheck : classification.getElements()) { if (!elemcheck.getName().equalsIgnoreCase("Void")) { ! log.warn("The space " + classification + " had elements"); } } ! Attribute a = classification.getParameter("uvalue"); ! if (a != null && a.getValue() != null) { ! loss = (Double)classification.getParameter("uvalue").getValue() * current.getArea(); ! } else { ! log.warn("uvalue for " + classification + " through " + current + " were't there"); ! } ! return loss; } return loss; *************** *** 124,127 **** --- 84,88 ---- /** * Test if the surface is relevant for thermiccalculation + * E.i. current have a * @param classification The classifaction of the surface * @param current The current Surface *************** *** 139,150 **** Space spa = null; ! Iterator it = Project.getInstance().world().getSurfaces().iterator(); ! ! while (it.hasNext()) { ! Surface sur = (Surface) it.next(); Vertex interpoint = sur.plane().intersection(origin, normal, true); if (interpoint != null) { if (sur.surrounds(interpoint)) { ! if (sur.getFrontDomain().isFunctionalSpace() || sur.getBackDomain().isFunctionalSpace()) { if (origin.distance(interpoint) != 0 && (distance == 0 || distance > origin.distance(interpoint))) { --- 100,111 ---- Space spa = null; ! //Find closest surface that have a functional space as either front or back domain ! for (Surface sur : classification.getEnvelope()) { Vertex interpoint = sur.plane().intersection(origin, normal, true); if (interpoint != null) { if (sur.surrounds(interpoint)) { ! if ((sur.getFrontDomain().isFunctionalSpace() || sur.getBackDomain().isFunctionalSpace()) ! && !(sur.getFrontDomain().isFunctionalSpace() & ! sur.getBackDomain().isFunctionalSpace())) { if (origin.distance(interpoint) != 0 && (distance == 0 || distance > origin.distance(interpoint))) { *************** *** 157,163 **** } ! ! ! if (closest != null && closest.getFrontDomain().isFunctionalSpace()) { spa = closest.getFrontDomain(); --- 118,122 ---- } ! //Choose the resulting functional space from the closest surface if (closest != null && closest.getFrontDomain().isFunctionalSpace()) { spa = closest.getFrontDomain(); *************** *** 167,180 **** } - - if (spa != null) { if (spa.getClassification() != null) { if (spa.getClassification().getParent() != null && ! spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { relevant = true; } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) .equalsIgnoreCase("-10")) { relevant = true; --- 126,137 ---- } if (spa != null) { if (spa.getClassification() != null) { if (spa.getClassification().getParent() != null && ! spa.getClassification().getId().equalsIgnoreCase("-10")) { relevant = true; } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getId() .equalsIgnoreCase("-10")) { relevant = true; *************** *** 200,221 **** spa = current.getFrontDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) .equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } } ! } ! if (current.normal().getZ() <= -0.99) { spa = current.getBackDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) .equalsIgnoreCase("-10")) { tha = tha + current.getArea(); --- 157,177 ---- spa = current.getFrontDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getId().equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getId() .equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } } ! } else if (current.normal().getZ() <= -0.99) { spa = current.getBackDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getId().equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getId() .equalsIgnoreCase("-10")) { tha = tha + current.getArea(); Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** Space.java 9 Aug 2007 16:07:53 -0000 1.166 --- Space.java 13 Aug 2007 11:36:21 -0000 1.167 *************** *** 2840,2844 **** */ public Attribute getParameter(String string) { ! Attribute a = new Attribute(string, ownParameters.get(string)); if (a == null && getClassificationType() != null) { a = getClassificationType().getParameter(string); --- 2840,2848 ---- */ public Attribute getParameter(String string) { ! Object param = ownParameters.get(string); ! Attribute a = null; ! if (param != null) { ! a = new Attribute(string, param); ! } if (a == null && getClassificationType() != null) { a = getClassificationType().getParameter(string); Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** Edge.java 20 Jul 2007 13:33:26 -0000 1.94 --- Edge.java 13 Aug 2007 11:36:21 -0000 1.95 *************** *** 55,58 **** --- 55,59 ---- public static Vertex first(List edges) { if (edges.size() == 0) { + log.warn("The list were empty"); return null; } else if (edges.size() == 1) { *************** *** 308,311 **** --- 309,313 ---- return getFrom(); } + log.warn(this + " did not contain " + v); return null; } Index: Entity.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Entity.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Entity.java 18 Jul 2007 12:24:04 -0000 1.19 --- Entity.java 13 Aug 2007 11:36:21 -0000 1.20 *************** *** 70,73 **** --- 70,78 ---- final Comparator<Entity> comparator = new Comparator<Entity>() { public int compare(Entity ent1, Entity ent2) { + if (ent1 == null) { + return 1; + } else if (ent2 == null) { + return -1; + } Long id1 = ent1.getId(); Long id2 = ent2.getId(); |
From: rimestad <rim...@us...> - 2007-08-10 11:23:05
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4536/src/net/sourceforge/bprocessor/model/modellor Modified Files: ModelBathModellor2.java ModelBathModellor.java Log Message: Change bath modellor to be created on the project space instead Index: ModelBathModellor2.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/ModelBathModellor2.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ModelBathModellor2.java 30 May 2007 17:28:58 -0000 1.6 --- ModelBathModellor2.java 10 Aug 2007 11:23:06 -0000 1.7 *************** *** 87,91 **** this(); space = s; ! space.setUnion(true); coord = Project.getInstance().getActiveCoordinateSystem(); width = 1.500; --- 87,91 ---- this(); space = s; ! space.setModellor(this); coord = Project.getInstance().getActiveCoordinateSystem(); width = 1.500; *************** *** 94,97 **** --- 94,98 ---- generateNet(); space.add(net); + update(net); net.edit(); } *************** *** 170,174 **** elementWalls(); ! addTileModellors(); } --- 171,175 ---- elementWalls(); ! //addTileModellors(); } *************** *** 664,669 **** @Override public Modellor newInstance(Space s) { ! if (s.getLevel() == Space.SPACE_LEVEL) { ! return new ModelBathModellor2(s); } else { return null; --- 665,673 ---- @Override public Modellor newInstance(Space s) { ! if (s.getLevel() == Space.PROJECT_LEVEL) { ! Space bath = new Space("Bath-union", Space.CONSTRUCTION, Space.SPACE_LEVEL, true); ! bath.setUnion(true); ! s.add(bath); ! return new ModelBathModellor2(bath); } else { return null; *************** *** 797,801 **** @Override public int getUseableLevel() { ! return Space.SPACE_LEVEL; } } --- 801,805 ---- @Override public int getUseableLevel() { ! return Space.PROJECT_LEVEL; } } Index: ModelBathModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/ModelBathModellor.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ModelBathModellor.java 18 Jul 2007 12:24:09 -0000 1.5 --- ModelBathModellor.java 10 Aug 2007 11:23:06 -0000 1.6 *************** *** 198,203 **** /** {@inheritDoc} */ public Modellor newInstance(Space s) { ! if (s.getLevel() == Space.SPACE_LEVEL) { ! return new ModelBathModellor(s); } else { return null; --- 198,206 ---- /** {@inheritDoc} */ public Modellor newInstance(Space s) { ! if (s.getLevel() == Space.PROJECT_LEVEL) { ! Space bath = new Space("Bath-unio", Space.CONSTRUCTION, Space.SPACE_LEVEL, true); ! bath.setUnion(true); ! s.add(bath); ! return new ModelBathModellor(bath); } else { return null; |
From: rimestad <rim...@us...> - 2007-08-10 11:20:12
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3175/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectStrategy.java Log Message: Changed the select strategy to be able to drag select on objects Index: SelectStrategy.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectStrategy.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SelectStrategy.java 28 Jun 2007 00:37:48 -0000 1.15 --- SelectStrategy.java 10 Aug 2007 11:20:11 -0000 1.16 *************** *** 10,15 **** import java.util.Collection; import java.util.HashSet; - import java.util.Iterator; - import java.util.List; import java.util.Set; --- 10,13 ---- *************** *** 102,188 **** */ public void pressed(MouseEvent e) { Transformation t = glv.getView().transformation(); Vertex first = t.unProject(new Vertex(e.getX(), View.getHeight() - e.getY(), 0.001)); e1.setFrom(first); e4.setTo(first); - Selection selection = Selection.primary(); x = e.getX(); y = e.getY(); View view = glv.getView(); target = view.getObjectAtPoint(x, y, View.OBJECTS); - - if (e.getClickCount() >= 2) { - if (e.getClickCount() == 2) { - Collection<Geometric> extended = new HashSet(); - extended.addAll(Selection.primary()); - for (Geometric current : Selection.primary()) { - if (current instanceof Edge) { - Edge edge = (Edge) current; - extended.addAll(edge.getSurfaces()); - } - if (current instanceof Surface) { - Surface surface = (Surface) current; - extended.addAll(surface.getEdges()); - } - } - Selection.primary().clear(); - Selection.primary().addAll(extended); - } else { - Collection<Geometric> geometrics = - Geometric.connected(Selection.primary()); - Selection.primary().set(geometrics); - } - - if (1 < 0) { - if (target instanceof Space) { - Space space = (Space) target; - space.edit(); - } else if (target instanceof Surface) { - Surface surface = (Surface) target; - if (surface.getBackDomain() != null) { - selection.addAll(surface.getBackDomain().getEnvelope()); - } - if (surface.getFrontDomain() != null) { - selection.addAll(surface.getFrontDomain().getEnvelope()); - } - } else if (target instanceof Constructor) { - Constructor c = (Constructor)target; - c.setActive(!c.isActive()); - } else if (target instanceof ClippingPlane) { - ClippingPlane cp = (ClippingPlane)target; - cp.setActive(!cp.isActive()); - } else if (target instanceof GlCamera) { - GlCamera glcam = (GlCamera)target; - Project.getInstance().setCurrentCamera(glcam.getCamera()); - } - } - } else { - if (target == null) { - selection.clear(); - multipleSelection = true; - } else if (e.isShiftDown()) { - if (target instanceof Geometric) { - Geometric g = (Geometric)target; - if (!selection.contains(g)) { - selection.add(g); - } else { - selection.remove(g); - } - } else { - log.error("Tried to insert something different from Geometric in selection"); - } - } else if (target instanceof GlCamera) { - GlCamera glcam = (GlCamera)target; - Project.getInstance().setCurrentCamera(glcam.getCamera()); - } else { - if (target instanceof Geometric) { - if (!selection.contains(target)) { - selection.set((Geometric)target); - } - } else { - log.warn("Target weren't a Geometric"); - } - } - } } --- 100,112 ---- */ public void pressed(MouseEvent e) { + log.info("pressed"); Transformation t = glv.getView().transformation(); Vertex first = t.unProject(new Vertex(e.getX(), View.getHeight() - e.getY(), 0.001)); e1.setFrom(first); e4.setTo(first); x = e.getX(); y = e.getY(); View view = glv.getView(); target = view.getObjectAtPoint(x, y, View.OBJECTS); } *************** *** 192,212 **** */ public void dragged(MouseEvent e) { ! if (multipleSelection) { ! Transformation t = glv.getView().transformation(); ! Vertex last = t.unProject(new Vertex(e.getX(), View.getHeight() - e.getY(), 0.001)); ! Vertex temp1 = t.unProject(new Vertex(e.getX(), View.getHeight() - y, 0.001)); ! Vertex temp2 = t.unProject(new Vertex(x, View.getHeight() - e.getY(), 0.001)); ! e1.setTo(temp1); ! e2.setFrom(temp1); ! e2.setTo(last); ! e3.setFrom(last); ! e3.setTo(temp2); ! e4.setFrom(temp2); ! Iterator it = box.iterator(); ! while (it.hasNext()) { ! Edge constructor = (Edge)it.next(); ! glv.getView().addTempEdge(constructor); } } } --- 116,156 ---- */ public void dragged(MouseEvent e) { ! log.info("dragged"); ! multipleSelection = true; ! Transformation t = glv.getView().transformation(); ! Vertex last = t.unProject(new Vertex(e.getX(), View.getHeight() - e.getY(), 0.001)); ! Vertex temp1 = t.unProject(new Vertex(e.getX(), View.getHeight() - y, 0.001)); ! Vertex temp2 = t.unProject(new Vertex(x, View.getHeight() - e.getY(), 0.001)); ! e1.setTo(temp1); ! e2.setFrom(temp1); ! e2.setTo(last); ! e3.setFrom(last); ! e3.setTo(temp2); ! e4.setFrom(temp2); ! for (Edge constructor : box) { ! glv.getView().addTempEdge(constructor); ! } ! Collection selection = Selection.primary(); ! selection.clear(); ! int newX = e.getX(); ! Set l = new HashSet(glv.getView().getObjectInArea(x, y, ! e.getX(), e.getY())); ! l.removeAll(box); ! l.remove(Project.getInstance().getActiveCoordinateSystem()); ! if (newX > x) { ! Set<Geometric> remove = new HashSet<Geometric>(); ! for (Object o : l) { ! if (o instanceof Geometric) { ! Geometric geo = (Geometric)o; ! Set<Vertex> vertices = geo.collect(); ! if (!l.containsAll(vertices)) { ! remove.add(geo); ! } ! } } + l.removeAll(remove); } + glv.getView().makeTarget(null); + selection.addAll(l); } *************** *** 216,248 **** */ public void released(MouseEvent e) { if (multipleSelection) { ! Collection selection = Selection.primary(); ! selection.clear(); ! Iterator it = box.iterator(); ! while (it.hasNext()) { ! Edge constructor = (Edge)it.next(); glv.getView().removeTempEdge(constructor); } ! int newX = e.getX(); ! List l = glv.getView().getObjectInArea(x, y, ! e.getX(), e.getY()); ! l.remove(Project.getInstance().getActiveCoordinateSystem()); ! if (newX > x) { ! Set<Geometric> remove = new HashSet<Geometric>(); ! for (Object o : l) { ! if (o instanceof Geometric) { ! Geometric geo = (Geometric)o; ! Set<Vertex> vertices = geo.collect(); ! if (!l.containsAll(vertices)) { ! remove.add(geo); } } } - l.removeAll(remove); } - glv.getView().makeTarget(null); - selection.addAll(l); - multipleSelection = false; } } } --- 160,245 ---- */ public void released(MouseEvent e) { + log.debug("released with event:" + e.toString()); if (multipleSelection) { ! for (Edge constructor : box) { glv.getView().removeTempEdge(constructor); } ! multipleSelection = false; ! } else { ! Selection selection = Selection.primary(); ! if (e.getClickCount() >= 2) { ! if (e.getClickCount() == 2) { ! Collection<Geometric> extended = new HashSet(); ! extended.addAll(Selection.primary()); ! for (Geometric current : Selection.primary()) { ! if (current instanceof Edge) { ! Edge edge = (Edge) current; ! extended.addAll(edge.getSurfaces()); ! } ! if (current instanceof Surface) { ! Surface surface = (Surface) current; ! extended.addAll(surface.getEdges()); } } + Selection.primary().clear(); + Selection.primary().addAll(extended); + } else { + Collection<Geometric> geometrics = + Geometric.connected(Selection.primary()); + Selection.primary().set(geometrics); + } + + if (1 < 0) { + if (target instanceof Space) { + Space space = (Space) target; + space.edit(); + } else if (target instanceof Surface) { + Surface surface = (Surface) target; + if (surface.getBackDomain() != null) { + selection.addAll(surface.getBackDomain().getEnvelope()); + } + if (surface.getFrontDomain() != null) { + selection.addAll(surface.getFrontDomain().getEnvelope()); + } + } else if (target instanceof Constructor) { + Constructor c = (Constructor)target; + c.setActive(!c.isActive()); + } else if (target instanceof ClippingPlane) { + ClippingPlane cp = (ClippingPlane)target; + cp.setActive(!cp.isActive()); + } else if (target instanceof GlCamera) { + GlCamera glcam = (GlCamera)target; + Project.getInstance().setCurrentCamera(glcam.getCamera()); + } + } + } else { + if (target == null) { + selection.clear(); + } else if (e.isShiftDown()) { + if (target instanceof Geometric) { + Geometric g = (Geometric)target; + if (!selection.contains(g)) { + selection.add(g); + } else { + selection.remove(g); + } + } else { + log.error("Tried to insert something different from Geometric in selection"); + } + } else if (target instanceof GlCamera) { + GlCamera glcam = (GlCamera)target; + Project.getInstance().setCurrentCamera(glcam.getCamera()); + } else { + if (target instanceof Geometric) { + if (!selection.contains(target)) { + selection.set((Geometric)target); + } + } else { + log.warn("Target weren't a Geometric"); + } } } } + target = null; } } |
From: rimestad <rim...@us...> - 2007-08-10 09:27:44
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23568/src/net/sourceforge/bprocessor/gui/attrview Modified Files: GenericPanel.java ClassificationIdAttribute.java Log Message: load of types works Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** GenericPanel.java 9 Aug 2007 16:07:48 -0000 1.40 --- GenericPanel.java 10 Aug 2007 09:26:57 -0000 1.41 *************** *** 203,208 **** genAttributes.add(catext); where.add(new AttributeRow(catext)); ! if (a.getThe2ndValue() instanceof Classification) { ! Classification c = (Classification)a.getThe2ndValue(); if (c != null && !c.getId().equalsIgnoreCase("-1") && a.getName().equalsIgnoreCase("Classification")) { --- 203,208 ---- genAttributes.add(catext); where.add(new AttributeRow(catext)); ! if (a.getValue() instanceof Classification) { ! Classification c = (Classification)a.getValue(); if (c != null && !c.getId().equalsIgnoreCase("-1") && a.getName().equalsIgnoreCase("Classification")) { Index: ClassificationIdAttribute.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/ClassificationIdAttribute.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClassificationIdAttribute.java 23 Jul 2007 13:57:39 -0000 1.6 --- ClassificationIdAttribute.java 10 Aug 2007 09:26:57 -0000 1.7 *************** *** 63,67 **** label = createLabel("Code"); component = Box.createHorizontalBox(); ! Classification c = (Classification)attribute.getThe2ndValue(); if (!c.getName().equalsIgnoreCase("Classification") && !c.getId().equalsIgnoreCase("-1")) { --- 63,67 ---- label = createLabel("Code"); component = Box.createHorizontalBox(); ! Classification c = (Classification)attribute.getValue(); if (!c.getName().equalsIgnoreCase("Classification") && !c.getId().equalsIgnoreCase("-1")) { *************** *** 189,193 **** if (editor == null) { component.remove(0); ! Classification c = (Classification)attribute.getThe2ndValue(); if (c != null && !c.getName().equalsIgnoreCase("Classification")) { --- 189,193 ---- if (editor == null) { component.remove(0); ! Classification c = (Classification)attribute.getValue(); if (c != null && !c.getName().equalsIgnoreCase("Classification")) { *************** *** 251,255 **** editor.removeKeyListener(this); editor = null; ! component.add(createValueLabel(attribute.getValue())); component.revalidate(); } --- 251,255 ---- editor.removeKeyListener(this); editor = null; ! component.add(createValueLabel(attribute.getThe2ndValue())); component.revalidate(); } |
From: rimestad <rim...@us...> - 2007-08-10 09:27:44
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23583/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: load of types works Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** Project.java 9 Aug 2007 16:07:53 -0000 1.132 --- Project.java 10 Aug 2007 09:27:01 -0000 1.133 *************** *** 61,65 **** private static Classification functionalClas = null; ! private static Collection<ClassificationType> classificatioTypes; /** The cameras */ --- 61,65 ---- private static Classification functionalClas = null; ! private static Collection<ClassificationType> classificationTypes; /** The cameras */ *************** *** 125,129 **** constructionClas = (Classification)loaded[0]; functionalClas = (Classification)loaded[1]; ! classificatioTypes = (Collection<ClassificationType>)loaded[2]; /*Map<String, ClassificationType> typeMap = ClassificationFileReader.loadTypes(""); constructionClas = ClassificationFileReader.loadClassification(true, "", typeMap); --- 125,129 ---- constructionClas = (Classification)loaded[0]; functionalClas = (Classification)loaded[1]; ! classificationTypes = (Collection<ClassificationType>)loaded[2]; /*Map<String, ClassificationType> typeMap = ClassificationFileReader.loadTypes(""); constructionClas = ClassificationFileReader.loadClassification(true, "", typeMap); *************** *** 883,889 **** if (!Character.isDigit(curid.charAt(1))) { if (!Character.isDigit(curid.charAt(2))) { ! curid = "-" + curid.substring(3); } else { ! curid = "-" + curid.substring(2); } } --- 883,889 ---- if (!Character.isDigit(curid.charAt(1))) { if (!Character.isDigit(curid.charAt(2))) { ! curid = curid.substring(3); } else { ! curid = curid.substring(2); } } *************** *** 901,905 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (curid.equalsIgnoreCase(current.getId())) { cl = current; } --- 901,905 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (curid.endsWith(current.getId())) { cl = current; } *************** *** 940,944 **** public ClassificationType findClassificationType(String id, int type) { StringTokenizer st = new StringTokenizer(id, "."); ! ClassificationType res = null; Classification cl; if (type == Space.CONSTRUCTION) { --- 940,945 ---- public ClassificationType findClassificationType(String id, int type) { StringTokenizer st = new StringTokenizer(id, "."); ! int typeIndex = -1; ! int subTypeIndex = -1; Classification cl; if (type == Space.CONSTRUCTION) { *************** *** 947,974 **** String curid; while (st.hasMoreTokens()) { curid = st.nextToken(); if (("" + curid.charAt(0)).equalsIgnoreCase("-")) { if (!Character.isDigit(curid.charAt(1))) { ! if (cl.getPossibleTypes() != null && cl.getPossibleTypes().getChildren() != null) { ! res = cl.getPossibleTypes().getChildren().get((int)'A' - (int)curid.charAt(1)); ! } if (!Character.isDigit(curid.charAt(2))) { ! if (cl.getPossibleTypes() != null && cl.getPossibleTypes().getChildren() != null) { ! res = res.getChildren().get((int)'A' - (int)curid.charAt(2)); ! } ! curid = "-" + curid.substring(3); } else { ! curid = "-" + curid.substring(2); } } } else { if (!Character.isDigit(curid.charAt(0))) { ! if (cl.getPossibleTypes() != null && cl.getPossibleTypes().getChildren() != null) { ! res = cl.getPossibleTypes().getChildren().get((int)'A' - (int)curid.charAt(1)); ! } if (!Character.isDigit(curid.charAt(1))) { ! if (cl.getPossibleTypes() != null && cl.getPossibleTypes().getChildren() != null) { ! res = res.getChildren().get((int)'A' - (int)curid.charAt(2)); ! } curid = curid.substring(2); } else { --- 948,969 ---- String curid; while (st.hasMoreTokens()) { + typeIndex = -1; + subTypeIndex = -1; curid = st.nextToken(); if (("" + curid.charAt(0)).equalsIgnoreCase("-")) { if (!Character.isDigit(curid.charAt(1))) { ! typeIndex = curid.charAt(1) - (int)'A'; if (!Character.isDigit(curid.charAt(2))) { ! subTypeIndex = curid.charAt(2) - (int)'A'; ! curid = curid.substring(3); } else { ! curid = curid.substring(2); } } } else { if (!Character.isDigit(curid.charAt(0))) { ! typeIndex = curid.charAt(1) - (int)'A'; if (!Character.isDigit(curid.charAt(1))) { ! subTypeIndex = curid.charAt(2) - (int)'A'; curid = curid.substring(2); } else { *************** *** 981,991 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (curid.equalsIgnoreCase(current.getId())) { cl = current; } } } } ! return res; } --- 976,996 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (curid.endsWith(current.getId())) { cl = current; } } } + if (typeIndex > -1 && cl != null && cl.getPossibleTypes() != null && + typeIndex < cl.getPossibleTypes().getChildren().size()) { + ClassificationType ct = cl.getPossibleTypes().getChildren().get(typeIndex); + if (subTypeIndex > -1 && subTypeIndex < ct.getChildren().size()) { + ct = ct.getChildren().get(subTypeIndex); + } + return ct; + } else { + return cl.getPossibleTypes(); + } } ! return null; } *************** *** 1001,1006 **** * @return the classificatioTypes */ ! public static Collection<ClassificationType> getClassificatioTypes() { ! return classificatioTypes; } --- 1006,1011 ---- * @return the classificatioTypes */ ! public static Collection<ClassificationType> getClassificationTypes() { ! return classificationTypes; } *************** *** 1008,1014 **** * @param classificatioTypes the classificatioTypes to set */ ! public static void setClassificatioTypes( List<ClassificationType> classificatioTypes) { ! Project.classificatioTypes = classificatioTypes; } } --- 1013,1019 ---- * @param classificatioTypes the classificatioTypes to set */ ! public static void setClassificationTypes( List<ClassificationType> classificatioTypes) { ! Project.classificationTypes = classificatioTypes; } } |
From: rimestad <rim...@us...> - 2007-08-10 09:27:44
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23568/src/net/sourceforge/bprocessor/gui/treeview Modified Files: DBKTreeView.java Log Message: load of types works Index: DBKTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/DBKTreeView.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DBKTreeView.java 9 Aug 2007 16:07:48 -0000 1.5 --- DBKTreeView.java 10 Aug 2007 09:26:57 -0000 1.6 *************** *** 38,42 **** root.add(new ClassificationContainer(Project.getConstructionClas())); root.add(new ClassificationContainer(Project.getFunctionalClas())); ! root.add(new ClassificationTypeContainer(Project.getClassificatioTypes())); model.nodeStructureChanged(root); } --- 38,42 ---- root.add(new ClassificationContainer(Project.getConstructionClas())); root.add(new ClassificationContainer(Project.getFunctionalClas())); ! root.add(new ClassificationTypeContainer(Project.getClassificationTypes())); model.nodeStructureChanged(root); } *************** *** 49,53 **** ((GenericNode)root.getChildAt(0)).update(Project.getConstructionClas()); ((GenericNode)root.getChildAt(1)).update(Project.getFunctionalClas()); ! ((GenericNode)root.getChildAt(2)).update(Project.getClassificatioTypes()); } } --- 49,53 ---- ((GenericNode)root.getChildAt(0)).update(Project.getConstructionClas()); ((GenericNode)root.getChildAt(1)).update(Project.getFunctionalClas()); ! ((GenericNode)root.getChildAt(2)).update(Project.getClassificationTypes()); } } |
From: rimestad <rim...@us...> - 2007-08-09 16:08:44
|
Update of /cvsroot/bprocessor/build/bin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4756/bin Modified Files: bprocessor.bat Log Message: Made the error message reflect what is needed Index: bprocessor.bat =================================================================== RCS file: /cvsroot/bprocessor/build/bin/bprocessor.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bprocessor.bat 14 Jul 2005 09:55:03 -0000 1.2 --- bprocessor.bat 9 Aug 2007 16:08:45 -0000 1.3 *************** *** 8,12 **** :error echo "You'll need to set the JAVA_HOME variable to point to your Java installation" ! echo "F.ex: set JAVA_HOME=c:\j2sdk1.4.2_08" :end --- 8,12 ---- :error echo "You'll need to set the JAVA_HOME variable to point to your Java installation" ! echo "F.ex: set JAVA_HOME=c:\j2sdk1.5.0" :end |
From: rimestad <rim...@us...> - 2007-08-09 16:08:00
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4350/src/net/sourceforge/bprocessor/model Modified Files: Space.java Attribute.java Persistence.java Surface.java Classification.java ClassificationType.java Project.java ClassificationFileReader.java Log Message: Made the way the attributes are pressented for classification and classificationtype look better and added a types folder to the DBK tree. Made the project hold all the possible types to make it possible to alter them. Space can now hold their own classificationtype parameter values if they are altered there. Index: ClassificationFileReader.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClassificationFileReader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ClassificationFileReader.java 23 Jul 2007 13:58:13 -0000 1.3 --- ClassificationFileReader.java 9 Aug 2007 16:07:53 -0000 1.4 *************** *** 45,51 **** new File(args[0] + "Classification.xml")); log.info("Wrote XML"); ! Classification[] loaded = Persistence.loadDBK(new File(args[0] + "Classification.xml")); ! construction = loaded[0]; ! functional = loaded[1]; log.info("Read XML"); } --- 45,51 ---- new File(args[0] + "Classification.xml")); log.info("Wrote XML"); ! Object[] loaded = Persistence.loadDBK(new File(args[0] + "Classification.xml")); ! construction = (Classification)loaded[0]; ! functional = (Classification)loaded[1]; log.info("Read XML"); } Index: Classification.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Classification.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Classification.java 23 Jul 2007 13:58:13 -0000 1.20 --- Classification.java 9 Aug 2007 16:07:53 -0000 1.21 *************** *** 171,175 **** res.add(new Attribute("Name", getName(), false)); res.add(new Attribute("Code", getFullId(null), false)); ! res.add(new Attribute("Type link", possibleTypes, possibleTypes)); return res; } --- 171,175 ---- res.add(new Attribute("Name", getName(), false)); res.add(new Attribute("Code", getFullId(null), false)); ! res.add(new Attribute("Classification Type", null, possibleTypes)); return res; } Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** Surface.java 20 Jul 2007 13:33:26 -0000 1.171 --- Surface.java 9 Aug 2007 16:07:53 -0000 1.172 *************** *** 1864,1877 **** * @param p The plane to extrude onto * @param sides The the collection of already extruded sides (if none the resulting is added) * @param tops The top surfaces * @return the new created extrusion top surface */ ! public Surface extrusionAllOnto(Plane p, Collection sides, Set tops) { ! Surface top = extrusionOnto(p, sides); tops.add(top); Iterator iter = getHoles().iterator(); while (iter.hasNext()) { Surface hole = (Surface) iter.next(); ! Surface holetop = hole.extrusionAllOnto(p, sides, tops); top.addHole(holetop); } --- 1864,1879 ---- * @param p The plane to extrude onto * @param sides The the collection of already extruded sides (if none the resulting is added) + * @param distance the distance of the extrusion as a backup if the plane is orthogonal * @param tops The top surfaces * @return the new created extrusion top surface */ ! public Surface extrusionAllOnto(Plane p, double distance, ! Collection<Surface> sides, Set<Surface> tops) { ! Surface top = extrusionOnto(p, distance, sides); tops.add(top); Iterator iter = getHoles().iterator(); while (iter.hasNext()) { Surface hole = (Surface) iter.next(); ! Surface holetop = hole.extrusionAllOnto(p, distance, sides, tops); top.addHole(holetop); } *************** *** 1882,1888 **** * @param p the plane to extrude onto * @param sides the collection of all resulting side surfaces * @return the new extrusion top surface */ ! public Surface extrusionOnto(Plane p, Collection sides) { if (p == null) { log.info("p were null for " + this); --- 1884,1891 ---- * @param p the plane to extrude onto * @param sides the collection of all resulting side surfaces + * @param distance The distance of the extrusion as a backup when plane is orthogonal * @return the new extrusion top surface */ ! public Surface extrusionOnto(Plane p, double distance, Collection<Surface> sides) { if (p == null) { log.info("p were null for " + this); *************** *** 1908,1913 **** vmap[i] = inter; } else { ! log.info("The found intersection were null"); ! vmap[i] = v[i].copy().add(normal); } } --- 1911,1917 ---- vmap[i] = inter; } else { ! Vertex ncopy = normal.copy(); ! ncopy.scale(distance); ! vmap[i] = v[i].copy().add(ncopy); } } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** Project.java 23 Jul 2007 13:58:13 -0000 1.131 --- Project.java 9 Aug 2007 16:07:53 -0000 1.132 *************** *** 60,63 **** --- 60,65 ---- /** The classification */ private static Classification functionalClas = null; + + private static Collection<ClassificationType> classificatioTypes; /** The cameras */ *************** *** 120,126 **** instance = new Project(); try { ! Classification[] loaded = Persistence.loadDBK(new File("Classification.xml")); ! constructionClas = loaded[0]; ! functionalClas = loaded[1]; /*Map<String, ClassificationType> typeMap = ClassificationFileReader.loadTypes(""); constructionClas = ClassificationFileReader.loadClassification(true, "", typeMap); --- 122,129 ---- instance = new Project(); try { ! Object[] loaded = Persistence.loadDBK(new File("Classification.xml")); ! constructionClas = (Classification)loaded[0]; ! functionalClas = (Classification)loaded[1]; ! classificatioTypes = (Collection<ClassificationType>)loaded[2]; /*Map<String, ClassificationType> typeMap = ClassificationFileReader.loadTypes(""); constructionClas = ClassificationFileReader.loadClassification(true, "", typeMap); *************** *** 850,854 **** * @return Classification the construction space classification * */ ! public Classification getConstructionClas () { return constructionClas; } --- 853,857 ---- * @return Classification the construction space classification * */ ! public static Classification getConstructionClas () { return constructionClas; } *************** *** 858,862 **** * @return Classification the funcational space classification * */ ! public Classification getFunctionalClas () { return functionalClas; } --- 861,865 ---- * @return Classification the funcational space classification * */ ! public static Classification getFunctionalClas () { return functionalClas; } *************** *** 994,996 **** --- 997,1014 ---- return copyBuffer; } + + /** + * @return the classificatioTypes + */ + public static Collection<ClassificationType> getClassificatioTypes() { + return classificatioTypes; + } + + /** + * @param classificatioTypes the classificatioTypes to set + */ + public static void setClassificatioTypes( + List<ClassificationType> classificatioTypes) { + Project.classificatioTypes = classificatioTypes; + } } Index: Attribute.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Attribute.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Attribute.java 23 Jul 2007 13:58:11 -0000 1.21 --- Attribute.java 9 Aug 2007 16:07:53 -0000 1.22 *************** *** 100,105 **** public Attribute(String name, Object value, Classification classification, Space level) { setName(name); ! setValue(value); ! setThe2ndValue(classification); setLevel(level); editable = true; --- 100,105 ---- public Attribute(String name, Object value, Classification classification, Space level) { setName(name); ! setThe2ndValue(value); ! setValue(classification); setLevel(level); editable = true; *************** *** 109,113 **** * Constructor for Classification Attribute * @param name The name ! * @param rootClassification The outermost possible type * @param selectedClassification The chosen type (can be null) */ --- 109,113 ---- * Constructor for Classification Attribute * @param name The name ! * @param rootClassification The outermost possible type (null for a link) * @param selectedClassification The chosen type (can be null) */ *************** *** 116,121 **** ClassificationType selectedClassification) { setName(name); ! setThe2ndValue(selectedClassification); ! setValue(rootClassification); editable = true; } --- 116,121 ---- ClassificationType selectedClassification) { setName(name); ! setValue(selectedClassification); ! setThe2ndValue(rootClassification); editable = true; } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** Space.java 26 Jul 2007 09:52:32 -0000 1.165 --- Space.java 9 Aug 2007 16:07:53 -0000 1.166 *************** *** 142,146 **** private String room = "0"; ! private Map<String, Attribute> ownParameters = new HashMap<String, Attribute>(); /** --- 142,146 ---- private String room = "0"; ! private LinkedHashMap<String, Object> ownParameters = new LinkedHashMap<String, Object>(); /** *************** *** 945,949 **** */ public void setClassification(Classification classification) { ! if (classification != null) { this.classification = classification; setClassificationType(classification.getPossibleTypes()); --- 945,949 ---- */ public void setClassification(Classification classification) { ! if (classification != null && this.classification != classification) { this.classification = classification; setClassificationType(classification.getPossibleTypes()); *************** *** 963,967 **** */ public void setClassificationType(ClassificationType productType) { ! this.productType = productType; } --- 963,970 ---- */ public void setClassificationType(ClassificationType productType) { ! if (this.productType != productType) { ! this.productType = productType; ! ownParameters.clear(); ! } } *************** *** 1302,1305 **** --- 1305,1309 ---- public void setAttributes(List<Attribute> attributes) { Iterator iter = attributes.iterator(); + boolean changedType = false; while (iter.hasNext()) { Attribute a = (Attribute)iter.next(); *************** *** 1307,1315 **** setName((String)a.getValue()); } else if (a.getName().equals("Classification")) { ! setClassification(((Classification)a.getThe2ndValue())); } else if (a.getName().equals("Type")) { ! ClassificationType cst = (ClassificationType)a.getThe2ndValue(); ! if (getClassification().getPossibleTypes().isPossibleSubtype(cst)) { setClassificationType(cst); } } else if (a.getName().equals("Building")) { --- 1311,1322 ---- setName((String)a.getValue()); } else if (a.getName().equals("Classification")) { ! setClassification(((Classification)a.getValue())); } else if (a.getName().equals("Type")) { ! ClassificationType cst = (ClassificationType)a.getValue(); ! if (getClassification() != null && ! getClassificationType() != cst && ! getClassification().getPossibleTypes().isPossibleSubtype(cst)) { setClassificationType(cst); + changedType = true; } } else if (a.getName().equals("Building")) { *************** *** 1325,1328 **** --- 1332,1342 ---- } else if (a.getName().equals("Description")) { setDescription(((String)a.getValue().toString())); + } else { + if (!changedType && getClassificationType() != null) { + if (getClassificationType().getParameter(a.getName()) != null && + !getClassificationType().getParameter(a.getName()).getValue().equals(a.getValue())) { + setOwnParameter(a.getName(), a.getValue()); + } + } } } *************** *** 1354,1358 **** } } else { ! if (getOwner().getClassification() != null) { res.add(new Attribute("Classification", getOwner().getClassification(), getClassification(), this)); --- 1368,1372 ---- } } else { ! if (getOwner() != null && getOwner().getClassification() != null) { res.add(new Attribute("Classification", getOwner().getClassification(), getClassification(), this)); *************** *** 1366,1370 **** res.add(new Attribute("Type", getClassification().getPossibleTypes(), getClassificationType())); ! res.addAll(getOwnParameters().values()); } if (isFunctionalSpace()) { --- 1380,1387 ---- res.add(new Attribute("Type", getClassification().getPossibleTypes(), getClassificationType())); ! HashMap<String, Object> param = getOwnParameters(); ! for (String s : param.keySet()) { ! res.add(new Attribute(s, param.get(s))); ! } } if (isFunctionalSpace()) { *************** *** 2807,2812 **** * @return A linkedHashMap with alle the parameters */ ! public LinkedHashMap<String, Attribute> getOwnParameters() { ! LinkedHashMap<String, Attribute> res = new LinkedHashMap<String, Attribute>(); if (getClassificationType() != null) { res.putAll(getClassificationType().getAllParameters()); --- 2824,2829 ---- * @return A linkedHashMap with alle the parameters */ ! public LinkedHashMap<String, Object> getOwnParameters() { ! LinkedHashMap<String, Object> res = new LinkedHashMap<String, Object>(); if (getClassificationType() != null) { res.putAll(getClassificationType().getAllParameters()); *************** *** 2823,2828 **** */ public Attribute getParameter(String string) { ! Attribute a = ownParameters.get(string); ! if (a == null) { a = getClassificationType().getParameter(string); } --- 2840,2845 ---- */ public Attribute getParameter(String string) { ! Attribute a = new Attribute(string, ownParameters.get(string)); ! if (a == null && getClassificationType() != null) { a = getClassificationType().getParameter(string); } *************** *** 2831,2834 **** --- 2848,2860 ---- /** + * Set a parameter of the space + * @param key The string rep + * @param object The object to associate with the key + */ + public void setOwnParameter(String key, Object object) { + ownParameters.put(key, object); + } + + /** * Verify that everything is OK */ Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Persistence.java 23 Jul 2007 13:58:13 -0000 1.44 --- Persistence.java 9 Aug 2007 16:07:53 -0000 1.45 *************** *** 85,88 **** --- 85,89 ---- import java.util.HashSet; import java.util.Iterator; + import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; *************** *** 1501,1506 **** } Map map = new HashMap(); ! for (Attribute a : type.getAllParameters().values()) { ! xml.getAttributes().add(externalizeKeyValue(a.getName(), a.getValue(), map)); } return xml; --- 1502,1508 ---- } Map map = new HashMap(); ! HashMap<String, Object> param = type.getAllParameters(); ! for (String s : param.keySet()) { ! xml.getAttributes().add(externalizeKeyValue(s, param.get(s), map)); } return xml; *************** *** 1514,1524 **** * @throws Exception Either an file read exception or some exception from the JAXB framework */ ! public static Classification[] loadDBK(File file) throws Exception { FileInputStream input = new FileInputStream(file); DBK xml = (DBK)loadFile(input); XMLSpecificTypeType rootType = xml.getXMLSpecificType(); ! Map<Long, ClassificationType> typeMap = new HashMap<Long, ClassificationType>(); for (XMLSpecificTypeType specType : (List<XMLSpecificTypeType>)rootType.getXMLSpecificType()) { ! internalizeTypes(specType, typeMap); } Classification construction = internalizeClassification( --- 1516,1528 ---- * @throws Exception Either an file read exception or some exception from the JAXB framework */ ! public static Object[] loadDBK(File file) throws Exception { FileInputStream input = new FileInputStream(file); DBK xml = (DBK)loadFile(input); XMLSpecificTypeType rootType = xml.getXMLSpecificType(); ! LinkedHashMap<Long, ClassificationType> typeMap = ! new LinkedHashMap<Long, ClassificationType>(); ! List<ClassificationType> types = new LinkedList<ClassificationType>(); for (XMLSpecificTypeType specType : (List<XMLSpecificTypeType>)rootType.getXMLSpecificType()) { ! types.add(internalizeTypes(specType, typeMap)); } Classification construction = internalizeClassification( *************** *** 1526,1530 **** Classification functional = internalizeClassification( (XMLClassificationType)xml.getXMLClassification().get(1), typeMap, Space.FUNCTIONAL); ! return new Classification[]{construction, functional}; } --- 1530,1534 ---- Classification functional = internalizeClassification( (XMLClassificationType)xml.getXMLClassification().get(1), typeMap, Space.FUNCTIONAL); ! return new Object[]{construction, functional, types}; } Index: ClassificationType.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClassificationType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ClassificationType.java 23 Jul 2007 13:58:13 -0000 1.3 --- ClassificationType.java 9 Aug 2007 16:07:53 -0000 1.4 *************** *** 18,22 **** public class ClassificationType extends Structure<ClassificationType> implements Parametric { private static int nextClassificationId = 0; ! private LinkedHashMap<String, Attribute> parameter; private long id; private int index; --- 18,22 ---- public class ClassificationType extends Structure<ClassificationType> implements Parametric { private static int nextClassificationId = 0; ! private LinkedHashMap<String, Object> parameter; private long id; private int index; *************** *** 45,49 **** public ClassificationType() { super(); ! parameter = new LinkedHashMap<String, Attribute>(); } --- 45,49 ---- public ClassificationType() { super(); ! parameter = new LinkedHashMap<String, Object>(); } *************** *** 64,68 **** List<Attribute> res = new ArrayList<Attribute>(); res.add(new Attribute("Name", getName())); ! res.addAll(getAllParameters().values()); return res; } --- 64,70 ---- List<Attribute> res = new ArrayList<Attribute>(); res.add(new Attribute("Name", getName())); ! for (String s : parameter.keySet()) { ! res.add(new Attribute(s, parameter.get(s))); ! } return res; } *************** *** 89,93 **** * @return the parameters */ ! public LinkedHashMap<String, Attribute> getAllParameters() { return parameter; } --- 91,95 ---- * @return the parameters */ ! public LinkedHashMap<String, Object> getAllParameters() { return parameter; } *************** *** 99,103 **** */ private void addParameter(String name, Object o) { ! parameter.put(name, new Attribute(name, o, true)); } --- 101,105 ---- */ private void addParameter(String name, Object o) { ! parameter.put(name, o); } *************** *** 109,114 **** */ public Attribute getParameter(String string) { ! Attribute a = parameter.get(string); ! return a; } --- 111,120 ---- */ public Attribute getParameter(String string) { ! Object param = parameter.get(string); ! if (param != null) { ! return new Attribute(string, param, true); ! } else { ! return null; ! } } |
From: rimestad <rim...@us...> - 2007-08-09 16:07:56
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4335/src/net/sourceforge/bprocessor/gui/attrview Modified Files: GenericPanel.java ClassificationTextAttribute.java Log Message: Made the way the attributes are pressented for classification and classificationtype look better and added a types folder to the DBK tree. Made the project hold all the possible types to make it possible to alter them. Space can now hold their own classificationtype parameter values if they are altered there. Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** GenericPanel.java 23 Jul 2007 13:57:39 -0000 1.39 --- GenericPanel.java 9 Aug 2007 16:07:48 -0000 1.40 *************** *** 155,174 **** genAttributes.add(da); where.add(new AttributeRow(da)); - } else if (a.getValue() instanceof Parametric && !(a.getValue() instanceof Structure)) { - // Handles the links - LinkAttribute la = new LinkAttribute(a); - la.addStringAttributeListener(new AttributeListener() { - public void valueChanged(Attribute a) { - obj.setAttributes(attributes); - if (obj instanceof Entity) { - simpleUpdate = true; - ((Entity)obj).changed(); - } else if (obj instanceof Camera) { - Project.getInstance().changed((Camera)obj); - } - } - }); - genAttributes.add(la); - where.add(new AttributeRow(la)); } else if (a.getValue() instanceof Material) { // Handles the materials --- 155,158 ---- *************** *** 203,207 **** genAttributes.add(ba); where.add(new AttributeRow(ba)); ! } else if (a.getValue() instanceof Structure) { // Handles the text part classification ClassificationTextAttribute catext = new ClassificationTextAttribute(a); --- 187,191 ---- genAttributes.add(ba); where.add(new AttributeRow(ba)); ! } else if (a.getThe2ndValue() instanceof Structure) { // Handles the text part classification ClassificationTextAttribute catext = new ClassificationTextAttribute(a); *************** *** 258,261 **** --- 242,261 ---- genAttributes.add(satt); where.add(new AttributeRow(satt)); + } else if (a.getValue() instanceof Parametric) { + // Handles the links + LinkAttribute la = new LinkAttribute(a); + la.addStringAttributeListener(new AttributeListener() { + public void valueChanged(Attribute a) { + obj.setAttributes(attributes); + if (obj instanceof Entity) { + simpleUpdate = true; + ((Entity)obj).changed(); + } else if (obj instanceof Camera) { + Project.getInstance().changed((Camera)obj); + } + } + }); + genAttributes.add(la); + where.add(new AttributeRow(la)); } else { log.info("[GenericPanel] Something were not implemented"); Index: ClassificationTextAttribute.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/ClassificationTextAttribute.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ClassificationTextAttribute.java 23 Jul 2007 13:57:39 -0000 1.9 --- ClassificationTextAttribute.java 9 Aug 2007 16:07:48 -0000 1.10 *************** *** 85,90 **** Box column = Box.createVerticalBox(); component = Box.createHorizontalBox(); ! if (attribute.getThe2ndValue() != null) { ! JLabel cur = (JLabel) createValueLabel((Structure)attribute.getThe2ndValue()); cur.setFont(AttributeView.FONT_PLAIN); component.add(cur); --- 85,90 ---- Box column = Box.createVerticalBox(); component = Box.createHorizontalBox(); ! if (attribute.getValue() != null) { ! JLabel cur = (JLabel) createValueLabel((Structure)attribute.getValue()); cur.setFont(AttributeView.FONT_PLAIN); component.add(cur); *************** *** 94,98 **** component.add(cur); } ! createMenu((Structure)attribute.getValue()); Box header = Box.createHorizontalBox(); header.add(Box.createHorizontalStrut(7)); --- 94,98 ---- component.add(cur); } ! createMenu((Structure)attribute.getThe2ndValue()); Box header = Box.createHorizontalBox(); header.add(Box.createHorizontalStrut(7)); *************** *** 194,200 **** */ private JComponent createValueLabel(Structure value) { ! JLabel valueLabel = new JLabel(value.getName()); ! valueLabel.setFont(AttributeView.FONT_PLAIN); ! /*if (attribute.getClassification().getId().equalsIgnoreCase("-1")) { valueLabel = new JLabel(value.getName()); } else { --- 194,201 ---- */ private JComponent createValueLabel(Structure value) { ! JLabel valueLabel = null; ! if (value != null) { ! valueLabel = new JLabel(value.getName()); ! /*if (attribute.getClassification().getId().equalsIgnoreCase("-1")) { valueLabel = new JLabel(value.getName()); } else { *************** *** 208,212 **** } }*/ ! return valueLabel; } --- 209,218 ---- } }*/ ! ! } else { ! valueLabel = new JLabel("None"); ! } ! valueLabel.setFont(AttributeView.FONT_PLAIN); ! return valueLabel; } *************** *** 278,282 **** if (e.getSource() instanceof MyMenuItem) { MyMenuItem source = (MyMenuItem)(e.getSource()); ! attribute.setThe2ndValue(source.getClassification()); component.remove(0); component.add(createValueLabel((Structure)attribute.getThe2ndValue())); --- 284,288 ---- if (e.getSource() instanceof MyMenuItem) { MyMenuItem source = (MyMenuItem)(e.getSource()); ! attribute.setValue(source.getClassification()); component.remove(0); component.add(createValueLabel((Structure)attribute.getThe2ndValue())); *************** *** 337,341 **** } if (entered != null) { ! attribute.setThe2ndValue(entered); } /*else { Classification newclas, egne; --- 343,347 ---- } if (entered != null) { ! attribute.setValue(entered); } /*else { Classification newclas, egne; *************** *** 358,362 **** editor.removeKeyListener(this); editor = null; ! component.add(createValueLabel((Structure) attribute.getThe2ndValue())); component.revalidate(); valueChanged(); --- 364,368 ---- editor.removeKeyListener(this); editor = null; ! component.add(createValueLabel((Structure) attribute.getValue())); component.revalidate(); valueChanged(); |
From: rimestad <rim...@us...> - 2007-08-09 16:07:47
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4335/src/net/sourceforge/bprocessor/gui/treeview Modified Files: DBKTreeView.java Log Message: Made the way the attributes are pressented for classification and classificationtype look better and added a types folder to the DBK tree. Made the project hold all the possible types to make it possible to alter them. Space can now hold their own classificationtype parameter values if they are altered there. Index: DBKTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/DBKTreeView.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DBKTreeView.java 8 May 2007 12:34:06 -0000 1.4 --- DBKTreeView.java 9 Aug 2007 16:07:48 -0000 1.5 *************** *** 8,14 **** --- 8,21 ---- package net.sourceforge.bprocessor.gui.treeview; + import java.util.ArrayList; + import java.util.Collection; + import java.util.Collections; + import java.util.Comparator; + import java.util.List; + import javax.swing.ImageIcon; import net.sourceforge.bprocessor.model.Classification; + import net.sourceforge.bprocessor.model.ClassificationType; import net.sourceforge.bprocessor.model.Project; *************** *** 29,34 **** super(); root.removeAllChildren(); ! root.add(new ClassificationContainer(Project.getInstance().getConstructionClas())); ! root.add(new ClassificationContainer(Project.getInstance().getFunctionalClas())); model.nodeStructureChanged(root); } --- 36,42 ---- super(); root.removeAllChildren(); ! root.add(new ClassificationContainer(Project.getConstructionClas())); ! root.add(new ClassificationContainer(Project.getFunctionalClas())); ! root.add(new ClassificationTypeContainer(Project.getClassificatioTypes())); model.nodeStructureChanged(root); } *************** *** 39,44 **** public void update() { if (root.getChildCount() == 2) { ! ((GenericNode)root.getChildAt(0)).update(Project.getInstance().getConstructionClas()); ! ((GenericNode)root.getChildAt(1)).update(Project.getInstance().getFunctionalClas()); } } --- 47,117 ---- public void update() { if (root.getChildCount() == 2) { ! ((GenericNode)root.getChildAt(0)).update(Project.getConstructionClas()); ! ((GenericNode)root.getChildAt(1)).update(Project.getFunctionalClas()); ! ((GenericNode)root.getChildAt(2)).update(Project.getClassificatioTypes()); ! } ! } ! ! private class ClassificationTypeComparator implements Comparator<ClassificationType> { ! public int compare(ClassificationType o1, ClassificationType o2) { ! return o1.getName().compareTo(o2.getName()); ! } ! } ! ! private class ClassificationTypeContainer extends GenericNode { ! private List<ClassificationType> types; ! ! /** ! * Constructor for ClassificationTypeContainer ! * @param object The classificationType list ! */ ! public ClassificationTypeContainer(Object object) { ! super("Types"); ! types = new ArrayList((Collection<ClassificationType>)object); ! Collections.sort(types, new ClassificationTypeComparator()); ! for (ClassificationType ct : types) { ! this.add(new ClassificationTypeNode(ct)); ! } ! } ! ! /** ! * Return icon ! * @return Icon ! */ ! public ImageIcon icon() { ! return surfacegroupicon; ! } ! ! /** ! * @param c the object to update with ! */ ! public void update(Object c) { ! } ! } ! ! private class ClassificationTypeNode extends GenericNode { ! public ClassificationTypeNode(Object object) { ! super(object); ! if (object instanceof ClassificationType) { ! ClassificationType ct = (ClassificationType)object; ! for (ClassificationType c : ct.getChildren()) { ! this.add(new ClassificationTypeNode(c)); ! } ! } ! } ! ! /** ! * Return icon ! * @return Icon ! */ ! public ImageIcon icon() { ! return surfacegroupicon; ! } ! ! /** ! * @param c the object to update with ! */ ! public void update(Object c) { ! } } |
From: rimestad <rim...@us...> - 2007-08-09 16:04:38
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3169/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: fixed error in extrusion tool when a surface orthogonal to the one extruded are pressed Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** NetFacadeModellor.java 29 May 2007 11:49:18 -0000 1.34 --- NetFacadeModellor.java 9 Aug 2007 16:04:33 -0000 1.35 *************** *** 986,991 **** Set<Surface> tops = new HashSet<Surface>(); surfaces.add(copy); ! copy.extrusionAllOnto(topPlane, surfaces, tops); ! copy.extrusionAllOnto(bottomPlane, surfaces, tops); for (Surface top : tops) { top.setFrontDomain(cut.getFrontDomain()); --- 986,991 ---- Set<Surface> tops = new HashSet<Surface>(); surfaces.add(copy); ! copy.extrusionAllOnto(topPlane, 0, surfaces, tops); ! copy.extrusionAllOnto(bottomPlane, 0, surfaces, tops); for (Surface top : tops) { top.setFrontDomain(cut.getFrontDomain()); |
From: rimestad <rim...@us...> - 2007-08-09 16:04:34
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3157/src/net/sourceforge/bprocessor/gl/tool Modified Files: ExtrusionTool.java Log Message: fixed error in extrusion tool when a surface orthogonal to the one extruded are pressed Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** ExtrusionTool.java 26 Jul 2007 09:52:27 -0000 1.63 --- ExtrusionTool.java 9 Aug 2007 16:04:29 -0000 1.64 *************** *** 113,117 **** Set<Surface> tops = new HashSet<Surface>(); Surface top = null; - if (plane == null) { if (all) { --- 113,116 ---- *************** *** 123,129 **** } else { if (all) { ! extrudesurface.extrusionAllOnto(plane, sides, tops); } else { ! top = extrudesurface.extrusionOnto(plane, sides); extrusion.add(top); } --- 122,128 ---- } else { if (all) { ! extrudesurface.extrusionAllOnto(plane, distance, sides, tops); } else { ! top = extrudesurface.extrusionOnto(plane, distance, sides); extrusion.add(top); } |